about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Laporte <vbgl@users.noreply.github.com>2019-04-25 08:56:55 +0200
committerGitHub <noreply@github.com>2019-04-25 08:56:55 +0200
commited1b59a98e7bd61dd7eac266569c294fb6b16300 (patch)
tree7a01d0a5d7689f222acd5e3c3c4d95dd6d4093e6
parentce714f2b04315c4ff54d80c5aaa2b16fc561f59c (diff)
parent1daf31dc8e3e152d42b633998342248df9bb6570 (diff)
downloadnixlib-ed1b59a98e7bd61dd7eac266569c294fb6b16300.tar
nixlib-ed1b59a98e7bd61dd7eac266569c294fb6b16300.tar.gz
nixlib-ed1b59a98e7bd61dd7eac266569c294fb6b16300.tar.bz2
nixlib-ed1b59a98e7bd61dd7eac266569c294fb6b16300.tar.lz
nixlib-ed1b59a98e7bd61dd7eac266569c294fb6b16300.tar.xz
nixlib-ed1b59a98e7bd61dd7eac266569c294fb6b16300.tar.zst
nixlib-ed1b59a98e7bd61dd7eac266569c294fb6b16300.zip
Merge pull request #60094 from thoughtpolice/nixpkgs/zarith-fixes
ocamlPackages: fix regression in zarith-dependent libraries
-rw-r--r--pkgs/development/ocaml-modules/zarith/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/development/ocaml-modules/zarith/default.nix b/pkgs/development/ocaml-modules/zarith/default.nix
index 9122a3509d96..1d331090a44f 100644
--- a/pkgs/development/ocaml-modules/zarith/default.nix
+++ b/pkgs/development/ocaml-modules/zarith/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl
+{ stdenv, buildOcaml, fetchurl
 , ocaml, findlib, pkgconfig, perl
 , gmp
 }:
@@ -16,20 +16,25 @@ let source =
   };
 in
 
-stdenv.mkDerivation rec {
-  name = "ocaml${ocaml.version}-zarith-${version}";
+buildOcaml rec {
+  name = "zarith";
   inherit (source) version;
   src = fetchurl { inherit (source) url sha256; };
 
+  minimumSupportedOcamlVersion = "3.12.1";
+
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ ocaml findlib perl ];
   propagatedBuildInputs = [ gmp ];
 
+  # needed so setup-hook.sh sets CAML_LD_LIBRARY_PATH for dllzarith.so
+  hasSharedObjects = true;
+
   patchPhase = "patchShebangs ./z_pp.pl";
   configurePhase = ''
     ./configure -installdir $out/lib/ocaml/${ocaml.version}/site-lib
   '';
-  createFindlibDestdir = true;
+  preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib";
 
   meta = with stdenv.lib; {
     description = "Fast, arbitrary precision OCaml integers";