diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-02-21 12:19:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-21 12:19:46 +0000 |
commit | 54795a5689f87e53ddc6cc28f84b20dfb706b65f (patch) | |
tree | b52fecc0c74c891acec26c8f829fd8257b55811e /pkgs/development/tools/ocaml | |
parent | 17cbd6f8aba4ca885f9af96e5ad60fe70151d9d0 (diff) | |
parent | cf22d5fee78d8fa5e6fef32acb17d3df3d3c5b28 (diff) | |
download | nixpkgs-54795a5689f87e53ddc6cc28f84b20dfb706b65f.tar nixpkgs-54795a5689f87e53ddc6cc28f84b20dfb706b65f.tar.gz nixpkgs-54795a5689f87e53ddc6cc28f84b20dfb706b65f.tar.bz2 nixpkgs-54795a5689f87e53ddc6cc28f84b20dfb706b65f.tar.lz nixpkgs-54795a5689f87e53ddc6cc28f84b20dfb706b65f.tar.xz nixpkgs-54795a5689f87e53ddc6cc28f84b20dfb706b65f.tar.zst nixpkgs-54795a5689f87e53ddc6cc28f84b20dfb706b65f.zip |
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/tools/ocaml')
-rw-r--r-- | pkgs/development/tools/ocaml/ocamlmod/default.nix | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/development/tools/ocaml/ocamlmod/default.nix b/pkgs/development/tools/ocaml/ocamlmod/default.nix index 77d39029551..cf24a132210 100644 --- a/pkgs/development/tools/ocaml/ocamlmod/default.nix +++ b/pkgs/development/tools/ocaml/ocamlmod/default.nix @@ -1,5 +1,10 @@ { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, ounit }: +let + # ounit is only available for OCaml >= 4.04 + doCheck = lib.versionAtLeast ocaml.version "4.04"; +in + stdenv.mkDerivation { pname = "ocamlmod"; version = "0.0.9"; @@ -9,13 +14,15 @@ stdenv.mkDerivation { sha256 = "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa"; }; - buildInputs = [ ocaml findlib ocamlbuild ounit ]; + buildInputs = [ ocaml findlib ocamlbuild ]; - configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests"; + configurePhase = "ocaml setup.ml -configure --prefix $out" + + lib.optionalString doCheck " --enable-tests"; buildPhase = "ocaml setup.ml -build"; installPhase = "ocaml setup.ml -install"; - doCheck = true; + inherit doCheck; + checkInputs = [ ounit ]; checkPhase = "ocaml setup.ml -test"; |