diff options
author | Austin Seipp <aseipp@pobox.com> | 2019-01-15 00:35:11 -0600 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2019-01-15 00:35:11 -0600 |
commit | b44d5136e8a8d2d40727699acf38eccf8a0b15e1 (patch) | |
tree | 30563a26a08ca8a887d929e5480b382d234e20cd /pkgs/development/ocaml-modules/zarith | |
parent | 9d5a7af4e57b79b36cb3920b9ba50b3cbd27d2ea (diff) | |
download | nixlib-b44d5136e8a8d2d40727699acf38eccf8a0b15e1.tar nixlib-b44d5136e8a8d2d40727699acf38eccf8a0b15e1.tar.gz nixlib-b44d5136e8a8d2d40727699acf38eccf8a0b15e1.tar.bz2 nixlib-b44d5136e8a8d2d40727699acf38eccf8a0b15e1.tar.lz nixlib-b44d5136e8a8d2d40727699acf38eccf8a0b15e1.tar.xz nixlib-b44d5136e8a8d2d40727699acf38eccf8a0b15e1.tar.zst nixlib-b44d5136e8a8d2d40727699acf38eccf8a0b15e1.zip |
Revert "ocamlPackages.zarith: use buildOcaml instead of mkDerivation"
This reverts commit 9d5a7af4e57b79b36cb3920b9ba50b3cbd27d2ea.
Diffstat (limited to 'pkgs/development/ocaml-modules/zarith')
-rw-r--r-- | pkgs/development/ocaml-modules/zarith/default.nix | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/pkgs/development/ocaml-modules/zarith/default.nix b/pkgs/development/ocaml-modules/zarith/default.nix index d91f6e1c8a31..e5d954970589 100644 --- a/pkgs/development/ocaml-modules/zarith/default.nix +++ b/pkgs/development/ocaml-modules/zarith/default.nix @@ -1,9 +1,8 @@ -{ stdenv, buildOcaml, fetchurl -, ocaml, findlib, pkgconfig, perl -, gmp -}: +{ stdenv, fetchurl, ocaml, findlib, pkgconfig, gmp, perl }: -let source = +assert stdenv.lib.versionAtLeast ocaml.version "3.12.1"; + +let param = if stdenv.lib.versionAtLeast ocaml.version "4.02" then { version = "1.7"; @@ -16,20 +15,18 @@ let source = }; in -buildOcaml rec { - name = "zarith"; - inherit (source) version; - src = fetchurl { inherit (source) url sha256; }; +stdenv.mkDerivation rec { + name = "zarith-${version}"; + inherit (param) version; - minimumSupportedOcamlVersion = "3.12.1"; + src = fetchurl { + inherit (param) url sha256; + }; 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 |