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