git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #60094 from thoughtpolice/nixpkgs/zarith-fixes

ocamlPackages: fix regression in zarith-dependent libraries

commited1b59a98e7bd61dd7eac266569c294fb6b16300 authorVincent Laporte <vbgl@users.noreply.github.com> dateThu 25 Apr 2019, 08:56 (8 years ago) parentce714f21daf31d
1 file changed+9−4
pkgs/development/ocaml-modules/zarith/default.nix+9−4
pkgs/development/ocaml-modules/zarith/default.nix+9−4
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl
1+{ stdenv, buildOcaml, fetchurl
22, ocaml, findlib, pkgconfig, perl
33, gmp
44}:
@@ -16,20 +16,25 @@ let source =
1616 };
1717in
1818
19−stdenv.mkDerivation rec {
20− name = "ocaml${ocaml.version}-zarith-${version}";
19+buildOcaml rec {
20+ name = "zarith";
2121 inherit (source) version;
2222 src = fetchurl { inherit (source) url sha256; };
2323
24+ minimumSupportedOcamlVersion = "3.12.1";
25+
2426 nativeBuildInputs = [ pkgconfig ];
2527 buildInputs = [ ocaml findlib perl ];
2628 propagatedBuildInputs = [ gmp ];
2729
30+ # needed so setup-hook.sh sets CAML_LD_LIBRARY_PATH for dllzarith.so
31+ hasSharedObjects = true;
32+
2833 patchPhase = "patchShebangs ./z_pp.pl";
2934 configurePhase = ''
3035 ./configure -installdir $out/lib/ocaml/${ocaml.version}/site-lib
3136 '';
32− createFindlibDestdir = true;
37+ preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib";
3338
3439 meta = with stdenv.lib; {
3540 description = "Fast, arbitrary precision OCaml integers";