ocamlPackages.zarith: enable for OCaml 4.08

This commit is contained in:
Vincent Laporte 2019-08-08 15:35:52 +00:00 committed by Vincent Laporte
parent 2f1cb20e50
commit 3cc99ee1eb
1 changed files with 6 additions and 10 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, buildOcaml, fetchurl { stdenv, fetchurl
, ocaml, findlib, pkgconfig, perl , ocaml, findlib, pkgconfig, perl
, gmp , gmp
}: }:
@ -16,31 +16,27 @@ let source =
}; };
in in
buildOcaml rec { stdenv.mkDerivation rec {
name = "zarith"; name = "ocaml${ocaml.version}-zarith-${version}";
inherit (source) version; inherit (source) version;
src = fetchurl { inherit (source) url sha256; }; src = fetchurl { inherit (source) url sha256; };
minimumSupportedOcamlVersion = "3.12.1";
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ocaml findlib perl ]; buildInputs = [ ocaml findlib perl ];
propagatedBuildInputs = [ gmp ]; propagatedBuildInputs = [ gmp ];
# needed so setup-hook.sh sets CAML_LD_LIBRARY_PATH for dllzarith.so
hasSharedObjects = true;
patchPhase = "patchShebangs ./z_pp.pl"; patchPhase = "patchShebangs ./z_pp.pl";
configurePhase = '' configurePhase = ''
./configure -installdir $out/lib/ocaml/${ocaml.version}/site-lib ./configure -installdir $out/lib/ocaml/${ocaml.version}/site-lib
''; '';
preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib";
preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Fast, arbitrary precision OCaml integers"; description = "Fast, arbitrary precision OCaml integers";
homepage = "http://forge.ocamlcore.org/projects/zarith"; homepage = "http://forge.ocamlcore.org/projects/zarith";
license = licenses.lgpl2; license = licenses.lgpl2;
platforms = ocaml.meta.platforms or []; inherit (ocaml.meta) platforms;
maintainers = with maintainers; [ thoughtpolice vbgl ]; maintainers = with maintainers; [ thoughtpolice vbgl ];
}; };
} }