From 79a93b5d52be77c87d2d082eecd25c0c1500cd80 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 11 Dec 2024 15:25:16 +0100 Subject: [PATCH] =?UTF-8?q?ocamlPackages.re:=201.11.0=20=E2=86=92=201.12.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/dose3/default.nix | 3 ++- pkgs/development/ocaml-modules/re/default.nix | 16 +++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/development/ocaml-modules/dose3/default.nix b/pkgs/development/ocaml-modules/dose3/default.nix index 70994c47cca7..e271ea128c7f 100644 --- a/pkgs/development/ocaml-modules/dose3/default.nix +++ b/pkgs/development/ocaml-modules/dose3/default.nix @@ -42,7 +42,8 @@ buildDunePackage rec { checkInputs = [ ounit ]; - doCheck = lib.versionAtLeast ocaml.version "4.08"; + # Check are not compatible with re ≥ 1.12 + doCheck = lib.versionAtLeast ocaml.version "4.08" && !lib.versionAtLeast ocaml.version "4.12"; meta = with lib; { description = "Dose library (part of Mancoosi tools)"; diff --git a/pkgs/development/ocaml-modules/re/default.nix b/pkgs/development/ocaml-modules/re/default.nix index badee9a3c91d..54bd7a664ae2 100644 --- a/pkgs/development/ocaml-modules/re/default.nix +++ b/pkgs/development/ocaml-modules/re/default.nix @@ -4,20 +4,26 @@ buildDunePackage, ocaml, ounit, + ounit2, seq, }: let version_sha = - if lib.versionAtLeast ocaml.version "4.08" then + if lib.versionAtLeast ocaml.version "4.12" then + { + version = "1.12.0"; + hash = "sha256-oB8r8i9ywvSrq9jT52NeNcG/a8WkGtbVoAdFTdq60dQ="; + } + else if lib.versionAtLeast ocaml.version "4.08" then { version = "1.11.0"; - sha256 = "sha256-AfwkR4DA9r5yrnlrH7dQ82feGGJP110H7nl4LtbfjU8="; + hash = "sha256-AfwkR4DA9r5yrnlrH7dQ82feGGJP110H7nl4LtbfjU8="; } else { version = "1.9.0"; - sha256 = "1gas4ky49zgxph3870nffzkr6y41kkpqp4nj38pz1gh49zcf12aj"; + hash = "sha256:1gas4ky49zgxph3870nffzkr6y41kkpqp4nj38pz1gh49zcf12aj"; }; in @@ -29,12 +35,12 @@ buildDunePackage rec { src = fetchurl { url = "https://github.com/ocaml/ocaml-re/releases/download/${version}/re-${version}.tbz"; - sha256 = version_sha.sha256; + inherit (version_sha) hash; }; - buildInputs = lib.optional doCheck ounit; propagatedBuildInputs = [ seq ]; doCheck = lib.versionAtLeast ocaml.version "4.08"; + checkInputs = [ (if lib.versionAtLeast version "1.12" then ounit2 else ounit) ]; meta = { homepage = "https://github.com/ocaml/ocaml-re";