1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 perl,
6 ocaml,
7 findlib,
8 camlidl,
9 gmp,
10 mpfr,
11 bigarray-compat,
12}:
13
14stdenv.mkDerivation rec {
15 pname = "ocaml${ocaml.version}-mlgmpidl";
16 version = "1.3.0";
17 src = fetchFromGitHub {
18 owner = "nberth";
19 repo = "mlgmpidl";
20 rev = version;
21 hash = "sha256-ZmSDKZiHko8MCeIuZL53HjupfwO6PAm8QOCc9O3xJOk=";
22 };
23
24 nativeBuildInputs = [
25 perl
26 ocaml
27 findlib
28 camlidl
29 ];
30 buildInputs = [
31 gmp
32 mpfr
33 ];
34 propagatedBuildInputs = [ bigarray-compat ];
35
36 strictDeps = true;
37
38 prefixKey = "-prefix ";
39
40 postConfigure = ''
41 mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
42 '';
43
44 meta = {
45 description = "OCaml interface to the GMP library";
46 homepage = "https://www.inrialpes.fr/pop-art/people/bjeannet/mlxxxidl-forge/mlgmpidl/";
47 license = lib.licenses.lgpl21;
48 inherit (ocaml.meta) platforms;
49 maintainers = [ lib.maintainers.vbgl ];
50 };
51}