nixpkgs-suyu/pkgs/development/tools/ocaml/camlidl/default.nix

45 lines
1.4 KiB
Nix
Raw Normal View History

2016-10-03 21:22:53 +02:00
{ stdenv, fetchurl, makeWrapper, ocaml, ncurses }:
2016-10-05 09:32:30 +02:00
let
pname = "camlidl";
webpage = "http://caml.inria.fr/pub/old_caml_site/camlidl/";
in
2016-10-05 09:32:30 +02:00
stdenv.mkDerivation rec {
name = "${pname}-${version}";
2016-10-05 09:32:30 +02:00
version = "1.05";
src = fetchurl {
url = "http://caml.inria.fr/pub/old_caml_site/distrib/bazar-ocaml/${pname}-${version}.tar.gz";
sha256 = "0483cs66zsxsavcllpw1qqvyhxb39ddil3h72clcd69g7fyxazl5";
};
buildInputs = [ ocaml ];
preBuild = ''
mv config/Makefile.unix config/Makefile
substituteInPlace config/Makefile --replace BINDIR=/usr/local/bin BINDIR=$out
2016-10-05 09:32:30 +02:00
substituteInPlace config/Makefile --replace OCAMLLIB=/usr/local/lib/ocaml OCAMLLIB=$out/lib/ocaml/${ocaml.version}/site-lib/camlidl
2016-10-03 21:22:53 +02:00
substituteInPlace config/Makefile --replace CPP=/lib/cpp CPP=${stdenv.cc}/bin/cpp
2016-10-05 09:32:30 +02:00
mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/camlidl/caml
'';
2015-01-25 22:08:33 +01:00
postInstall = ''
2016-10-05 09:32:30 +02:00
cat >$out/lib/ocaml/${ocaml.version}/site-lib/camlidl/META <<EOF
2015-01-25 22:08:33 +01:00
# Courtesy of GODI
description = "Stub generator"
version = "${version}"
archive(byte) = "com.cma"
archive(native) = "com.cmxa"
EOF
mkdir -p $out/bin
ln -s $out/camlidl $out/bin
'';
meta = {
description = "A stub code generator and COM binding for Objective Caml";
homepage = "${webpage}";
license = "LGPL";
maintainers = [ stdenv.lib.maintainers.roconnor ];
};
}