2022-11-21 17:40:18 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, perl, ocaml, findlib, camlidl, gmp, mpfr, bigarray-compat }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-02-10 20:34:41 +00:00
|
|
|
pname = "ocaml${ocaml.version}-mlgmpidl";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.2.15";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nberth";
|
|
|
|
repo = "mlgmpidl";
|
|
|
|
rev = version;
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-85wy5eVWb5qdaa2lLDcfqlUTIY7vnN3nGMdxoj5BslU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [ perl ocaml findlib camlidl ];
|
2022-03-05 16:20:37 +00:00
|
|
|
buildInputs = [ gmp mpfr ];
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = [ bigarray-compat ];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
prefixKey = "-prefix ";
|
|
|
|
configureFlags = [
|
|
|
|
"--gmp-prefix ${gmp.dev}"
|
|
|
|
"--mpfr-prefix ${mpfr.dev}"
|
2022-11-21 17:40:18 +00:00
|
|
|
"-disable-profiling"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postConfigure = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
substituteInPlace Makefile --replace "/bin/rm" "rm"
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "OCaml interface to the GMP library";
|
|
|
|
homepage = "https://www.inrialpes.fr/pop-art/people/bjeannet/mlxxxidl-forge/mlgmpidl/";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.lgpl21;
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2021-01-15 22:18:51 +00:00
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|