2012-04-09 10:42:20 +01:00
|
|
|
{stdenv, fetchurl, ocaml, findlib, ncurses, python, ocaml_make}:
|
2012-01-16 10:20:13 +00:00
|
|
|
|
2012-04-09 10:42:20 +01:00
|
|
|
# This is the original pycaml version with patches from debian.
|
2012-01-16 10:20:13 +00:00
|
|
|
|
2012-04-09 10:42:20 +01:00
|
|
|
let debian = fetchurl {
|
|
|
|
url = "mirror://debian/pool/main/p/pycaml/pycaml_0.82-14.debian.tar.gz";
|
|
|
|
sha256 = "a763088ec1fa76c769bf586ed6692e7ac035b0a2bfd48a90a8e7a9539ec0c2f1";
|
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "pycaml-0.82-14";
|
2012-01-16 10:20:13 +00:00
|
|
|
|
2012-04-09 10:42:20 +01:00
|
|
|
srcs = [
|
|
|
|
(fetchurl {
|
|
|
|
url = "mirror://debian/pool/main/p/pycaml/pycaml_0.82.orig.tar.gz";
|
|
|
|
sha256 = "d57be559c8d586c575717d47817986bbdbcebe2ffd16ad6b291525c62868babe";
|
|
|
|
})
|
2012-01-16 10:20:13 +00:00
|
|
|
|
2012-04-09 10:42:20 +01:00
|
|
|
(fetchurl {
|
|
|
|
url = "mirror://debian/pool/main/p/pycaml/pycaml_0.82-14.debian.tar.gz";
|
|
|
|
sha256 = "a763088ec1fa76c769bf586ed6692e7ac035b0a2bfd48a90a8e7a9539ec0c2f1";
|
|
|
|
})
|
|
|
|
];
|
2012-01-16 10:20:13 +00:00
|
|
|
|
2012-04-09 10:42:20 +01:00
|
|
|
postPatch = ''
|
|
|
|
rm -f Makefile* configure*
|
|
|
|
cp ../debian/META ../debian/Makefile .
|
|
|
|
sed -i "Makefile" -e's|/usr/share/ocamlmakefile/OCamlMakefile|${ocaml_make}/include/OCamlMakefile|g'
|
|
|
|
'';
|
|
|
|
|
|
|
|
sourceRoot = "pycaml";
|
|
|
|
patches = [ "../debian/patches/*.patch" ];
|
|
|
|
|
|
|
|
buildInputs = [ ncurses ocaml findlib python ocaml_make ];
|
|
|
|
createFindlibDestdir = true;
|
2012-01-16 10:20:13 +00:00
|
|
|
|
|
|
|
# the Makefile is not shipped with an install target, hence we do it ourselves.
|
|
|
|
installPhase = ''
|
|
|
|
ocamlfind install pycaml \
|
2012-04-09 10:42:20 +01:00
|
|
|
dllpycaml_stubs.so libpycaml_stubs.a pycaml.a pycaml.cma \
|
|
|
|
pycaml.cmi pycaml.cmo pycaml.cmx pycaml.cmxa \
|
|
|
|
META
|
|
|
|
'';
|
2012-01-16 10:20:13 +00:00
|
|
|
|
|
|
|
meta = {
|
2017-08-22 19:50:04 +01:00
|
|
|
homepage = https://github.com/chemoelectric/pycaml;
|
2012-01-16 10:20:13 +00:00
|
|
|
description = "Bindings for python and ocaml";
|
|
|
|
license = "LGPL";
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2012-01-16 10:20:13 +00:00
|
|
|
};
|
|
|
|
}
|