From c164f7c021e632614d0a95957cd4b3f795995dbf Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Fri, 14 Oct 2022 09:25:08 +0200 Subject: [PATCH] ocamlPackages.re: 1.9.0 -> 1.10.4 --- pkgs/development/ocaml-modules/re/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/re/default.nix b/pkgs/development/ocaml-modules/re/default.nix index 4734d4a9bf5..174324d49cf 100644 --- a/pkgs/development/ocaml-modules/re/default.nix +++ b/pkgs/development/ocaml-modules/re/default.nix @@ -1,16 +1,29 @@ { lib, fetchurl, buildDunePackage, ocaml, ounit, seq }: +let version_sha = if lib.versionAtLeast ocaml.version "4.08" + then + { + version = "1.10.4"; + sha256 = "sha256-g+s+QwCqmx3HggdJAQ9DYuqDUkdCEwUk14wgzpnKdHw="; + } + else + { + version = "1.9.0"; + sha256 = "1gas4ky49zgxph3870nffzkr6y41kkpqp4nj38pz1gh49zcf12aj"; + }; +in + buildDunePackage rec { pname = "re"; - version = "1.9.0"; + version = version_sha.version; - minimumOCamlVersion = "4.02"; + minimalOCamlVersion = "4.02"; useDune2 = lib.versionAtLeast ocaml.version "4.08"; src = fetchurl { url = "https://github.com/ocaml/ocaml-re/releases/download/${version}/re-${version}.tbz"; - sha256 = "1gas4ky49zgxph3870nffzkr6y41kkpqp4nj38pz1gh49zcf12aj"; + sha256 = version_sha.sha256; }; buildInputs = lib.optional doCheck ounit;