Merge master into staging-next

This commit is contained in:
github-actions[bot]
2021-02-21 12:19:43 +00:00
committed by GitHub
24 changed files with 213 additions and 120 deletions

View File

@@ -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";