From 245e5da5ec2a40e97628a552723ccfd2b7ad44e0 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Tue, 1 Oct 2024 23:11:38 +0200 Subject: [PATCH 1/3] icu: add opt-in support to build icu release candidates --- pkgs/development/libraries/icu/make-icu.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/icu/make-icu.nix b/pkgs/development/libraries/icu/make-icu.nix index 09e7bb3c9654..d7fe46041607 100644 --- a/pkgs/development/libraries/icu/make-icu.nix +++ b/pkgs/development/libraries/icu/make-icu.nix @@ -8,9 +8,13 @@ let pname = "icu4c"; + release = lib.replaceStrings [ "." ] [ "-" ] version; + # To test rc versions of ICU replace the line above with the line below. + #release = lib.replaceStrings [ "." ] [ "-" ] (if lib.hasSuffix "rc" version then lib.replaceStrings [ "1" ] [ "" ] version else version); + baseAttrs = { src = fetchurl { - url = "https://github.com/unicode-org/icu/releases/download/release-${lib.replaceStrings [ "." ] [ "-" ] version}/icu4c-${lib.replaceStrings [ "." ] [ "_" ] version}-src.tgz"; + url = "https://github.com/unicode-org/icu/releases/download/release-${release}/icu4c-${lib.replaceStrings [ "." ] [ "_" ] version}-src.tgz"; inherit hash; }; @@ -75,7 +79,7 @@ let mkdir -p $static/lib mv -v lib/*.a $static/lib '' + lib.optionalString stdenv.hostPlatform.isDarwin '' - sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${version}/pkgdata.inc + sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${lib.versions.majorMinor version}/pkgdata.inc '' + (let replacements = [ { from = "\${prefix}/include"; to = "${placeholder "dev"}/include"; } # --cppflags-searchpath @@ -83,7 +87,7 @@ let { from = "\${pkglibdir}/pkgdata.inc"; to = "${placeholder "dev"}/lib/icu/pkgdata.inc"; } # --incpkgdatafile ]; in '' - rm $out/share/icu/${version}/install-sh $out/share/icu/${version}/mkinstalldirs # Avoid having a runtime dependency on bash + rm $out/share/icu/${lib.versions.majorMinor version}/install-sh $out/share/icu/${lib.versions.majorMinor version}/mkinstalldirs # Avoid having a runtime dependency on bash substituteInPlace "$dev/bin/icu-config" \ ${lib.concatMapStringsSep " " (r: "--replace '${r.from}' '${r.to}'") replacements} From 2ac5b1b494d61465d8a5b0c9f48278cc26745fb1 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Tue, 1 Oct 2024 23:10:49 +0200 Subject: [PATCH 2/3] icu76: init at 76.1rc --- pkgs/development/libraries/icu/default.nix | 4 ++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 5 insertions(+) diff --git a/pkgs/development/libraries/icu/default.nix b/pkgs/development/libraries/icu/default.nix index ed142788c765..e7ad912dc3bd 100644 --- a/pkgs/development/libraries/icu/default.nix +++ b/pkgs/development/libraries/icu/default.nix @@ -6,6 +6,10 @@ let }; in { + icu76 = make-icu { + version = "76.1rc"; + hash = "sha256-HMY4hRYbF4Dsf1EGx+m0NRsCUA+Q/JGRpdGIgym/A5I="; + }; icu75 = make-icu { version = "75.1"; hash = "sha256-y5aN8+TS6H6LEcSaXQHHh70TuVRSgPxmQvgmUnYYyu8="; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bda58a57c3ec..f91287c97a50 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20218,6 +20218,7 @@ with pkgs; icu73 icu74 icu75 + icu76 ; icu = icu74; From ab3e98d6b72ccf09802804ee85387fdbb3db14a6 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Mon, 21 Oct 2024 10:06:24 +0200 Subject: [PATCH 3/3] icu: temporary change to test rc version --- pkgs/development/libraries/icu/make-icu.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/icu/make-icu.nix b/pkgs/development/libraries/icu/make-icu.nix index d7fe46041607..7e137003b030 100644 --- a/pkgs/development/libraries/icu/make-icu.nix +++ b/pkgs/development/libraries/icu/make-icu.nix @@ -8,9 +8,9 @@ let pname = "icu4c"; - release = lib.replaceStrings [ "." ] [ "-" ] version; + #release = lib.replaceStrings [ "." ] [ "-" ] version; # To test rc versions of ICU replace the line above with the line below. - #release = lib.replaceStrings [ "." ] [ "-" ] (if lib.hasSuffix "rc" version then lib.replaceStrings [ "1" ] [ "" ] version else version); + release = lib.replaceStrings [ "." ] [ "-" ] (if lib.hasSuffix "rc" version then lib.replaceStrings [ "1" ] [ "" ] version else version); baseAttrs = { src = fetchurl {