Unverified Commit b50c7a37 authored by 7c6f434c's avatar 7c6f434c Committed by GitHub
Browse files

icu76: init at 76.1rc (#345784)

parents 394fbdae ab3e98d6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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=";
+7 −3
Original line number Diff line number Diff line
@@ -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}
+1 −0
Original line number Diff line number Diff line
@@ -20211,6 +20211,7 @@ with pkgs;
    icu73
    icu74
    icu75
    icu76
  ;
  icu = icu74;