summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/zarith/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/zarith/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/zarith/default.nix16
1 files changed, 6 insertions, 10 deletions
diff --git a/pkgs/development/ocaml-modules/zarith/default.nix b/pkgs/development/ocaml-modules/zarith/default.nix
index 1d331090a44..cb90c200547 100644
--- a/pkgs/development/ocaml-modules/zarith/default.nix
+++ b/pkgs/development/ocaml-modules/zarith/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildOcaml, fetchurl
+{ stdenv, fetchurl
 , ocaml, findlib, pkgconfig, perl
 , gmp
 }:
@@ -16,31 +16,27 @@ let source =
   };
 in
 
-buildOcaml rec {
-  name = "zarith";
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-zarith-${version}";
   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
   '';
-  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; {
     description = "Fast, arbitrary precision OCaml integers";
     homepage    = "http://forge.ocamlcore.org/projects/zarith";
     license     = licenses.lgpl2;
-    platforms   = ocaml.meta.platforms or [];
+    inherit (ocaml.meta) platforms;
     maintainers = with maintainers; [ thoughtpolice vbgl ];
   };
 }