Skip to content

Commit

Permalink
ocamlPackages.re: 1.11.0 → 1.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vbgl committed Dec 24, 2024
1 parent 531093c commit 79a93b5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion pkgs/development/ocaml-modules/dose3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)";
Expand Down
16 changes: 11 additions & 5 deletions pkgs/development/ocaml-modules/re/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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";
Expand Down

0 comments on commit 79a93b5

Please sign in to comment.