2021-01-11 13:49:15 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, perl, ocaml, findlib, camlidl, gmp, mpfr }:
|
2016-10-12 12:12:46 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-02-06 23:35:27 +01:00
|
|
|
pname = "ocaml${ocaml.version}-mlgmpidl";
|
2020-01-28 10:25:19 +01:00
|
|
|
version = "1.2.12";
|
2016-10-12 12:12:46 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nberth";
|
|
|
|
repo = "mlgmpidl";
|
|
|
|
rev = version;
|
2020-01-28 10:25:19 +01:00
|
|
|
sha256 = "17xqiclaqs4hmnb92p9z6z9a1xfr31vcn8nlnj8ykk57by31vfza";
|
2016-10-12 12:12:46 +02:00
|
|
|
};
|
|
|
|
|
2022-03-04 11:30:58 +01:00
|
|
|
nativeBuildInputs = [ perl ocaml findlib camlidl ];
|
2022-02-22 10:59:04 +01:00
|
|
|
buildInputs = [ gmp mpfr ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
2016-10-12 12:12:46 +02:00
|
|
|
|
2019-02-21 15:43:19 +01:00
|
|
|
prefixKey = "-prefix ";
|
|
|
|
configureFlags = [
|
|
|
|
"--gmp-prefix ${gmp.dev}"
|
|
|
|
"--mpfr-prefix ${mpfr.dev}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postConfigure = ''
|
2022-03-04 11:30:58 +01:00
|
|
|
substituteInPlace Makefile --replace "/bin/rm" "rm"
|
2020-01-28 10:25:19 +01:00
|
|
|
mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
|
2016-10-12 12:12:46 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "OCaml interface to the GMP library";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.inrialpes.fr/pop-art/people/bjeannet/mlxxxidl-forge/mlgmpidl/";
|
2021-01-11 13:49:15 +01:00
|
|
|
license = lib.licenses.lgpl21;
|
2016-10-12 12:12:46 +02:00
|
|
|
inherit (ocaml.meta) platforms;
|
2021-01-11 13:49:15 +01:00
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2016-10-12 12:12:46 +02:00
|
|
|
};
|
|
|
|
}
|