diff options
author | Ulrik Strid <ulrik.strid@outlook.com> | 2023-05-15 11:18:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 11:18:34 +0200 |
commit | f0e4eea013241ded0af9388d353a73851d17952d (patch) | |
tree | 9b6dd1c51814a60bc246e634b28d6001affadfe1 | |
parent | aa23ec90588c4e6d66fe4b5df482888333a3ca8d (diff) | |
parent | c81792a4571d5a6ba7a7f3d84cbc0e5dc5f16335 (diff) | |
download | nixlib-f0e4eea013241ded0af9388d353a73851d17952d.tar nixlib-f0e4eea013241ded0af9388d353a73851d17952d.tar.gz nixlib-f0e4eea013241ded0af9388d353a73851d17952d.tar.bz2 nixlib-f0e4eea013241ded0af9388d353a73851d17952d.tar.lz nixlib-f0e4eea013241ded0af9388d353a73851d17952d.tar.xz nixlib-f0e4eea013241ded0af9388d353a73851d17952d.tar.zst nixlib-f0e4eea013241ded0af9388d353a73851d17952d.zip |
Merge pull request #231536 from vbgl/ounit2
ocamlPackages.ounit2: disable for OCaml < 4.08
23 files changed, 42 insertions, 116 deletions
diff --git a/pkgs/development/ocaml-modules/cfstream/default.nix b/pkgs/development/ocaml-modules/cfstream/default.nix index 0de51fbb5787..22e78c1aeeb2 100644 --- a/pkgs/development/ocaml-modules/cfstream/default.nix +++ b/pkgs/development/ocaml-modules/cfstream/default.nix @@ -1,11 +1,9 @@ -{ lib, buildDunePackage, fetchFromGitHub, m4, camlp-streams, core_kernel, ounit }: +{ lib, buildDunePackage, fetchFromGitHub, ocaml, m4, camlp-streams, core_kernel, ounit }: buildDunePackage rec { pname = "cfstream"; version = "1.3.2"; - duneVersion = "3"; - minimalOCamlVersion = "4.04.1"; src = fetchFromGitHub { @@ -23,7 +21,7 @@ buildDunePackage rec { checkInputs = [ ounit ]; propagatedBuildInputs = [ camlp-streams core_kernel ]; - doCheck = true; + doCheck = lib.versionAtLeast ocaml.version "4.08"; meta = with lib; { inherit (src.meta) homepage; diff --git a/pkgs/development/ocaml-modules/cudf/default.nix b/pkgs/development/ocaml-modules/cudf/default.nix index b4cd7e458a70..6cef074498d6 100644 --- a/pkgs/development/ocaml-modules/cudf/default.nix +++ b/pkgs/development/ocaml-modules/cudf/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { checkInputs = [ ounit ]; - doCheck = true; + doCheck = lib.versionAtLeast ocaml.version "4.08"; preInstall = "mkdir -p $OCAMLFIND_DESTDIR"; installFlags = [ "BINDIR=$(out)/bin" ]; diff --git a/pkgs/development/ocaml-modules/diet/default.nix b/pkgs/development/ocaml-modules/diet/default.nix index cd14d2a06af5..5be9cde83661 100644 --- a/pkgs/development/ocaml-modules/diet/default.nix +++ b/pkgs/development/ocaml-modules/diet/default.nix @@ -1,22 +1,20 @@ -{ lib, buildDunePackage, fetchurl, stdlib-shims, ounit }: +{ lib, buildDunePackage, fetchurl, ocaml, stdlib-shims, ounit }: buildDunePackage rec { pname = "diet"; version = "0.4"; - useDune2 = true; - src = fetchurl { url = "https://github.com/mirage/ocaml-diet/releases/download/v${version}/diet-v${version}.tbz"; sha256 = "96acac2e4fdedb5f47dd8ad2562e723d85ab59cd1bd85554df21ec907b071741"; }; - minimumOCamlVersion = "4.03"; + minimalOCamlVersion = "4.03"; propagatedBuildInputs = [ stdlib-shims ]; - doCheck = true; + doCheck = lib.versionAtLeast ocaml.version "4.08"; checkInputs = [ ounit ]; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/expat/0.9.nix b/pkgs/development/ocaml-modules/expat/0.9.nix deleted file mode 100644 index 326ffc60b1ad..000000000000 --- a/pkgs/development/ocaml-modules/expat/0.9.nix +++ /dev/null @@ -1,54 +0,0 @@ -{stdenv, lib, fetchurl, ocaml, findlib, ounit, expat}: - -let - pname = "ocaml-expat"; - testcase = fetchurl { - url = "http://www.w3.org/TR/1998/REC-xml-19980210.xml"; - sha256 = "00a3gsfvlkdhmcbziqhvpvy1zmcgbcihfqwcvl6ay03zf7gvw0k1"; - }; - -in - -stdenv.mkDerivation rec { - name = "${pname}-${version}"; - version = "0.9.1"; - - src = fetchurl { - url = "http://www.xs4all.nl/~mmzeeman/ocaml/${pname}-${version}.tar.gz"; - sha256 = "16n2j3y0jc9xgqyshw9plrwqnjiz30vnpbhahmgxlidbycw8rgjz"; - }; - - nativeBuildInputs = [ocaml findlib ]; - buildInputs = [ ounit expat]; - - strictDeps = true; - - createFindlibDestdir = true; - - patches = [ ./unittest.patch ]; - - postPatch = '' - substituteInPlace "unittest.ml" \ - --replace "/home/maas/xml-samples/REC-xml-19980210.xml.txt" "${testcase}" - substituteInPlace Makefile --replace "EXPAT_LIBDIR=/usr/local/lib" "EXPAT_LIBDIR=${expat.out}/lib" \ - --replace "EXPAT_INCDIR=/usr/local/include" "EXPAT_INCDIR=${expat.dev}/include" \ - --replace "gcc" "\$(CC)" - ''; - - dontConfigure = true; # Skip configure - - buildPhase = '' - make all allopt - ''; - - doCheck = true; - - checkTarget = "testall"; - - meta = { - homepage = "http://www.xs4all.nl/~mmzeeman/ocaml/"; - description = "An ocaml wrapper for the Expat XML parsing library"; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.roconnor ]; - }; -} diff --git a/pkgs/development/ocaml-modules/expat/default.nix b/pkgs/development/ocaml-modules/expat/default.nix index 0bd6c733e6fb..5f491a1bb6d3 100644 --- a/pkgs/development/ocaml-modules/expat/default.nix +++ b/pkgs/development/ocaml-modules/expat/default.nix @@ -1,5 +1,8 @@ { stdenv, lib, fetchFromGitHub, expat, ocaml, findlib, ounit }: +lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02") + "ocaml_expat is not available for OCaml ${ocaml.version}" + stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-expat"; version = "1.1.0"; @@ -16,12 +19,13 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ ocaml findlib ]; - buildInputs = [ expat ounit ]; + buildInputs = [ expat ]; strictDeps = true; - doCheck = lib.versionOlder ocaml.version "4.06"; + doCheck = lib.versionAtLeast ocaml.version "4.08"; checkTarget = "testall"; + checkInputs = [ ounit ]; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/fileutils/default.nix b/pkgs/development/ocaml-modules/fileutils/default.nix index 0431c733cb90..832da7d3dc15 100644 --- a/pkgs/development/ocaml-modules/fileutils/default.nix +++ b/pkgs/development/ocaml-modules/fileutils/default.nix @@ -19,7 +19,7 @@ buildDunePackage rec { checkInputs = [ ounit2 ]; - doCheck = lib.versionAtLeast ocaml.version "4.04"; + doCheck = lib.versionAtLeast ocaml.version "4.08"; meta = with lib; { description = "OCaml API to manipulate real files (POSIX like) and filenames"; diff --git a/pkgs/development/ocaml-modules/jingoo/default.nix b/pkgs/development/ocaml-modules/jingoo/default.nix index c21cf9df42aa..7ed0e995df7a 100644 --- a/pkgs/development/ocaml-modules/jingoo/default.nix +++ b/pkgs/development/ocaml-modules/jingoo/default.nix @@ -1,4 +1,4 @@ -{ lib, buildDunePackage, fetchFromGitHub +{ lib, buildDunePackage, fetchFromGitHub, ocaml , menhir, ppxlib, ppx_deriving, re, uutf, uucp, ounit2 }: @@ -6,8 +6,6 @@ buildDunePackage rec { pname = "jingoo"; version = "1.4.4"; - duneVersion = "3"; - minimalOCamlVersion = "4.05"; src = fetchFromGitHub { @@ -20,7 +18,7 @@ buildDunePackage rec { nativeBuildInputs = [ menhir ]; propagatedBuildInputs = [ ppxlib ppx_deriving re uutf uucp ]; checkInputs = [ ounit2 ]; - doCheck = true; + doCheck = lib.versionAtLeast ocaml.version "4.08"; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/lambdasoup/default.nix b/pkgs/development/ocaml-modules/lambdasoup/default.nix index c01faa3eec0a..a5b61880da7d 100644 --- a/pkgs/development/ocaml-modules/lambdasoup/default.nix +++ b/pkgs/development/ocaml-modules/lambdasoup/default.nix @@ -6,8 +6,6 @@ buildDunePackage rec { minimalOCamlVersion = "4.03"; - duneVersion = "3"; - src = fetchFromGitHub { owner = "aantron"; repo = pname; @@ -17,7 +15,7 @@ buildDunePackage rec { propagatedBuildInputs = [ camlp-streams markup ]; - doCheck = lib.versionAtLeast ocaml.version "4.04"; + doCheck = lib.versionAtLeast ocaml.version "4.08"; checkInputs = [ ounit2 ]; meta = { diff --git a/pkgs/development/ocaml-modules/macaddr/default.nix b/pkgs/development/ocaml-modules/macaddr/default.nix index ab2126843a27..aac62b549d8d 100644 --- a/pkgs/development/ocaml-modules/macaddr/default.nix +++ b/pkgs/development/ocaml-modules/macaddr/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, buildDunePackage +{ lib, fetchurl, buildDunePackage, ocaml , ppx_sexp_conv, ounit2 }: @@ -7,7 +7,6 @@ buildDunePackage rec { version = "5.4.0"; minimalOCamlVersion = "4.04"; - duneVersion = "3"; src = fetchurl { url = "https://github.com/mirage/ocaml-ipaddr/releases/download/v${version}/ipaddr-${version}.tbz"; @@ -15,7 +14,7 @@ buildDunePackage rec { }; checkInputs = [ ppx_sexp_conv ounit2 ]; - doCheck = true; + doCheck = lib.versionAtLeast ocaml.version "4.08"; meta = with lib; { homepage = "https://github.com/mirage/ocaml-ipaddr"; diff --git a/pkgs/development/ocaml-modules/markup/default.nix b/pkgs/development/ocaml-modules/markup/default.nix index 535557c0e8df..6f286346a9a0 100644 --- a/pkgs/development/ocaml-modules/markup/default.nix +++ b/pkgs/development/ocaml-modules/markup/default.nix @@ -16,7 +16,7 @@ buildDunePackage rec { propagatedBuildInputs = [ uchar uutf ]; checkInputs = [ ounit2 ]; - doCheck = lib.versionAtLeast ocaml.version "4.04"; + doCheck = lib.versionAtLeast ocaml.version "4.08"; meta = with lib; { homepage = "https://github.com/aantron/markup.ml/"; diff --git a/pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix b/pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix index e6a778194654..1a96c7adfe99 100644 --- a/pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix +++ b/pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix @@ -1,4 +1,4 @@ -{ buildDunePackage, ocaml_gettext, camomile, ounit, fileutils }: +{ lib, buildDunePackage, ocaml, ocaml_gettext, camomile, ounit, fileutils }: buildDunePackage { pname = "gettext-camomile"; @@ -6,7 +6,7 @@ buildDunePackage { propagatedBuildInputs = [ camomile ocaml_gettext ]; - doCheck = true; + doCheck = lib.versionAtLeast ocaml.version "4.08"; checkInputs = [ ounit fileutils ]; meta = (builtins.removeAttrs ocaml_gettext.meta [ "mainProgram" ]) // { diff --git a/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix b/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix index 28ab9450e032..43bd194b655b 100644 --- a/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix +++ b/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix @@ -1,4 +1,4 @@ -{ buildDunePackage, ocaml_gettext, dune-configurator, ounit }: +{ lib, buildDunePackage, ocaml, ocaml_gettext, dune-configurator, ounit }: buildDunePackage rec { @@ -12,7 +12,7 @@ buildDunePackage rec { propagatedBuildInputs = [ ocaml_gettext ]; - doCheck = true; + doCheck = lib.versionAtLeast ocaml.version "4.08"; checkInputs = [ ounit ]; diff --git a/pkgs/development/ocaml-modules/ounit2/default.nix b/pkgs/development/ocaml-modules/ounit2/default.nix index e44bd5bb35a9..756c6259e0a1 100644 --- a/pkgs/development/ocaml-modules/ounit2/default.nix +++ b/pkgs/development/ocaml-modules/ounit2/default.nix @@ -1,7 +1,7 @@ { lib, ocaml, buildDunePackage, fetchurl, seq, stdlib-shims, ncurses }: -buildDunePackage (rec { - minimalOCamlVersion = "4.04"; +buildDunePackage rec { + minimalOCamlVersion = "4.08"; pname = "ounit2"; version = "2.2.6"; @@ -14,7 +14,6 @@ buildDunePackage (rec { propagatedBuildInputs = [ seq stdlib-shims ]; doCheck = true; - checkInputs = lib.optional (lib.versionOlder ocaml.version "4.07") ncurses; meta = with lib; { homepage = "https://github.com/gildor478/ounit"; @@ -22,6 +21,4 @@ buildDunePackage (rec { license = licenses.mit; maintainers = with maintainers; [ sternenseemann ]; }; -} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") { - duneVersion = "1"; -}) +} diff --git a/pkgs/development/ocaml-modules/parse-argv/default.nix b/pkgs/development/ocaml-modules/parse-argv/default.nix index 4bc409245eed..88df0bc281d1 100644 --- a/pkgs/development/ocaml-modules/parse-argv/default.nix +++ b/pkgs/development/ocaml-modules/parse-argv/default.nix @@ -7,9 +7,7 @@ buildDunePackage rec { pname = "parse-argv"; version = "0.2.0"; - useDune2 = true; - - minimumOCamlVersion = "4.03"; + minimalOCamlVersion = "4.03"; src = fetchurl { url = "https://github.com/mirage/parse-argv/releases/download/v${version}/parse-argv-v${version}.tbz"; @@ -18,7 +16,7 @@ buildDunePackage rec { propagatedBuildInputs = [ astring ]; - doCheck = lib.versionAtLeast ocaml.version "4.04"; + doCheck = lib.versionAtLeast ocaml.version "4.08"; checkInputs = [ ounit ]; meta = { diff --git a/pkgs/development/ocaml-modules/ppx_deriving/default.nix b/pkgs/development/ocaml-modules/ppx_deriving/default.nix index b911b3da1886..031c8335186b 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving/default.nix @@ -52,7 +52,8 @@ buildDunePackage rec { result ]; - doCheck = lib.versionOlder ocaml.version "5.0"; + doCheck = lib.versionAtLeast ocaml.version "4.08" + && lib.versionOlder ocaml.version "5.0"; checkInputs = [ (if lib.versionAtLeast version "5.2" then ounit2 else ounit) ]; diff --git a/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix index 1359540d0664..aa261f0bbb82 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix @@ -1,4 +1,4 @@ -{ lib, buildDunePackage, fetchFromGitHub, ppxlib, ounit +{ lib, buildDunePackage, fetchFromGitHub, ocaml, ppxlib, ounit , ppx_deriving, yojson }: @@ -17,7 +17,6 @@ buildDunePackage rec { inherit (param) version; minimalOCamlVersion = "4.07"; - duneVersion = "3"; src = fetchFromGitHub { owner = "ocaml-ppx"; @@ -28,7 +27,7 @@ buildDunePackage rec { propagatedBuildInputs = [ ppxlib ppx_deriving yojson ]; - doCheck = true; + doCheck = lib.versionAtLeast ocaml.version "4.08"; checkInputs = [ ounit ]; meta = { diff --git a/pkgs/development/ocaml-modules/rdbg/default.nix b/pkgs/development/ocaml-modules/rdbg/default.nix index c7915749bd0f..281358618007 100644 --- a/pkgs/development/ocaml-modules/rdbg/default.nix +++ b/pkgs/development/ocaml-modules/rdbg/default.nix @@ -4,9 +4,7 @@ buildDunePackage rec { pname = "rdbg"; version = "1.199.0"; - duneVersion = "3"; - - minimalOCamlVersion = "4.07"; + minimalOCamlVersion = "4.08"; src = fetchurl { url = "http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/pool/rdbg.v${version}.tgz"; diff --git a/pkgs/development/ocaml-modules/re/default.nix b/pkgs/development/ocaml-modules/re/default.nix index bbddba331ee3..5244aaf9edd0 100644 --- a/pkgs/development/ocaml-modules/re/default.nix +++ b/pkgs/development/ocaml-modules/re/default.nix @@ -26,7 +26,7 @@ buildDunePackage (rec { buildInputs = lib.optional doCheck ounit; propagatedBuildInputs = [ seq ]; - doCheck = lib.versionAtLeast ocaml.version "4.04"; + doCheck = lib.versionAtLeast ocaml.version "4.08"; meta = { homepage = "https://github.com/ocaml/ocaml-re"; diff --git a/pkgs/development/ocaml-modules/rfc7748/default.nix b/pkgs/development/ocaml-modules/rfc7748/default.nix index 40356ec9aa5f..b15ad8684eab 100644 --- a/pkgs/development/ocaml-modules/rfc7748/default.nix +++ b/pkgs/development/ocaml-modules/rfc7748/default.nix @@ -18,14 +18,11 @@ buildDunePackage rec { sha256 = "sha256-mgZooyfxrKBVQFn01B8PULmFUW9Zq5HJfgHCSJSkJo4="; }; - useDune2 = true; - - minimumOCamlVersion = "4.05"; + minimalOCamlVersion = "4.05"; propagatedBuildInputs = [ zarith ]; - # the tests fail for 4.05 - doCheck = lib.versionAtLeast ocaml.version "4.06"; + doCheck = lib.versionAtLeast ocaml.version "4.08"; checkInputs = [ ounit ]; meta = { diff --git a/pkgs/development/ocaml-modules/sha/default.nix b/pkgs/development/ocaml-modules/sha/default.nix index bdf3b16c4a91..c54c143d5b48 100644 --- a/pkgs/development/ocaml-modules/sha/default.nix +++ b/pkgs/development/ocaml-modules/sha/default.nix @@ -1,9 +1,8 @@ -{ lib, fetchurl, buildDunePackage, stdlib-shims, ounit2 }: +{ lib, fetchurl, buildDunePackage, ocaml, stdlib-shims, ounit2 }: buildDunePackage rec { pname = "sha"; version = "1.15.4"; - duneVersion = "3"; src = fetchurl { url = "https://github.com/djs55/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; @@ -14,7 +13,7 @@ buildDunePackage rec { stdlib-shims ]; - doCheck = true; + doCheck = lib.versionAtLeast ocaml.version "4.08"; checkInputs = [ ounit2 ]; diff --git a/pkgs/development/ocaml-modules/tcslib/default.nix b/pkgs/development/ocaml-modules/tcslib/default.nix index 4454359d5845..53bc8c9292cb 100644 --- a/pkgs/development/ocaml-modules/tcslib/default.nix +++ b/pkgs/development/ocaml-modules/tcslib/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, ocamlPackages, buildOasisPackage, ounit, extlib, num }: +{ lib, fetchFromGitHub, ocamlPackages, buildOasisPackage, extlib, num }: buildOasisPackage rec { pname = "tcslib"; @@ -13,7 +13,6 @@ buildOasisPackage rec { sha256 = "05g6m82blsccq8wx8knxv6a5fzww7hi624jx91f9h87nk2fsplhi"; }; - buildInputs = [ ounit ]; propagatedBuildInputs = [ extlib num ]; meta = { diff --git a/pkgs/development/tools/ocaml/ocamlmod/default.nix b/pkgs/development/tools/ocaml/ocamlmod/default.nix index ee287a92388f..c9e57fa6a09c 100644 --- a/pkgs/development/tools/ocaml/ocamlmod/default.nix +++ b/pkgs/development/tools/ocaml/ocamlmod/default.nix @@ -1,8 +1,8 @@ { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, ounit }: let - # ounit is only available for OCaml >= 4.04 - doCheck = lib.versionAtLeast ocaml.version "4.04"; + # ounit is only available for OCaml >= 4.08 + doCheck = lib.versionAtLeast ocaml.version "4.08"; in lib.throwIf (lib.versionAtLeast ocaml.version "5.0") diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index efe610cbd0d4..7f305b79e927 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1107,10 +1107,7 @@ let ocaml_cryptgps = callPackage ../development/ocaml-modules/cryptgps { }; - ocaml_expat = - if lib.versionAtLeast ocaml.version "4.02" - then callPackage ../development/ocaml-modules/expat { } - else callPackage ../development/ocaml-modules/expat/0.9.nix { }; + ocaml_expat = callPackage ../development/ocaml-modules/expat { }; ocaml-freestanding = callPackage ../development/ocaml-modules/ocaml-freestanding { }; |