diff --git a/pkgs/development/ocaml-modules/re/default.nix b/pkgs/development/ocaml-modules/re/default.nix index 3be49072eb37..861ac8b3bc81 100644 --- a/pkgs/development/ocaml-modules/re/default.nix +++ b/pkgs/development/ocaml-modules/re/default.nix @@ -11,9 +11,10 @@ stdenv.mkDerivation rec { buildInputs = [ ocaml findlib ocamlbuild ounit ]; - configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests"; + configurePhase = "ocaml setup.ml -configure --prefix $out" + + stdenv.lib.optionalString doCheck " --enable-tests"; buildPhase = "ocaml setup.ml -build"; - doCheck = true; + doCheck = !stdenv.lib.versionAtLeast ocaml.version "4.06"; checkPhase = "ocaml setup.ml -test"; installPhase = "ocaml setup.ml -install";