2015-01-25 21:08:33 +00:00
|
|
|
{stdenv, fetchurl, makeWrapper, gcc, ocaml, ncurses}:
|
2011-10-04 02:40:45 +01:00
|
|
|
let
|
|
|
|
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
|
|
|
pname = "camlidl";
|
|
|
|
version = "1.05";
|
|
|
|
webpage = "http://caml.inria.fr/pub/old_caml_site/camlidl/";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
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
|
|
|
|
substituteInPlace config/Makefile --replace OCAMLLIB=/usr/local/lib/ocaml OCAMLLIB=$out/lib/ocaml/${ocaml_version}/site-lib/camlidl
|
2015-01-25 21:08:33 +00:00
|
|
|
substituteInPlace config/Makefile --replace CPP=/lib/cpp CPP=${gcc}/bin/cpp
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/lib/ocaml/${ocaml_version}/site-lib/camlidl/caml
|
2011-10-04 02:40:45 +01:00
|
|
|
'';
|
|
|
|
|
2015-01-25 21:08:33 +00:00
|
|
|
postInstall = ''
|
|
|
|
cat >$out/lib/ocaml/${ocaml_version}/site-lib/camlidl/META <<EOF
|
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
2011-10-04 02:40:45 +01:00
|
|
|
meta = {
|
2015-04-30 16:05:14 +01:00
|
|
|
description = "A stub code generator and COM binding for Objective Caml";
|
2011-10-04 02:40:45 +01:00
|
|
|
homepage = "${webpage}";
|
|
|
|
license = "LGPL";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.roconnor ];
|
|
|
|
};
|
|
|
|
}
|