ocamlPackages.ounit2: disable for OCaml < 4.08

This commit is contained in:
Vincent Laporte 2023-05-12 23:09:22 +02:00
parent bc9afd1686
commit c81792a457
No known key found for this signature in database
GPG key ID: EBD582ADDDB1F81F
20 changed files with 37 additions and 56 deletions

View file

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

View file

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

View file

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

View file

@ -19,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;

View file

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

View file

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

View file

@ -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 = {

View file

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

View file

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

View file

@ -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" ]) // {

View file

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

View file

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

View file

@ -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 = {

View file

@ -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)
];

View file

@ -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 = {

View file

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

View file

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

View file

@ -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 = {

View file

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

View file

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