2013-06-16 20:23:51 +00:00
|
|
|
{stdenv, fetchurl, ocaml, findlib, gmp, mpfr, ncurses }:
|
|
|
|
|
2017-06-26 17:38:47 +00:00
|
|
|
if stdenv.lib.versionAtLeast ocaml.version "4.03"
|
|
|
|
then throw "mlgmp is not available for OCaml ${ocaml.version}" else
|
|
|
|
|
2013-06-16 20:23:51 +00:00
|
|
|
let
|
|
|
|
pname = "mlgmp";
|
|
|
|
in
|
|
|
|
|
2016-10-05 07:32:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2013-06-16 20:23:51 +00:00
|
|
|
name = "${pname}-${version}";
|
2016-10-05 07:32:30 +00:00
|
|
|
version = "20120224";
|
2013-06-16 20:23:51 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www-verimag.imag.fr/~monniaux/download/${pname}_${version}.tar.gz";
|
|
|
|
sha256 = "3ce1a53fa452ff5a9ba618864d3bc46ef32190b57202d1e996ca7df837ad4f24";
|
|
|
|
};
|
|
|
|
|
|
|
|
makeFlags = [
|
2016-10-05 07:32:30 +00:00
|
|
|
"DESTDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib/gmp"
|
2013-06-16 20:23:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = "make clean";
|
|
|
|
buildInputs = [ocaml findlib gmp mpfr ncurses];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
propagatedbuildInputs = [gmp mpfr ncurses];
|
|
|
|
|
|
|
|
postInstall = ''
|
2016-10-05 07:32:30 +00:00
|
|
|
cp ${./META} $out/lib/ocaml/${ocaml.version}/site-lib/gmp/META
|
2013-06-16 20:23:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://opam.ocamlpro.com/pkg/mlgmp.20120224.html";
|
2013-06-16 20:23:51 +00:00
|
|
|
description = "OCaml bindings to GNU MP library";
|
|
|
|
license = "Free software ?";
|
|
|
|
};
|
|
|
|
}
|