From fafbfd85dbfb9331b27a888ab0e0c7b246ea161a Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 18 Feb 2026 04:51:41 +0000 Subject: [PATCH] darwin.ICU: drop `x86_64-darwin` support --- .../darwin/by-name/ic/ICU/package.nix | 66 ++++++++----------- 1 file changed, 28 insertions(+), 38 deletions(-) diff --git a/pkgs/os-specific/darwin/by-name/ic/ICU/package.nix b/pkgs/os-specific/darwin/by-name/ic/ICU/package.nix index d2678d47b0bc..300dd48f27f3 100644 --- a/pkgs/os-specific/darwin/by-name/ic/ICU/package.nix +++ b/pkgs/os-specific/darwin/by-name/ic/ICU/package.nix @@ -104,48 +104,38 @@ let ++ lib.optional withStatic "static"; outputBin = "dev"; - postPatch = - lib.optionalString self.finalPackage.doCheck ( - '' - # Skip test for missing encodingSamples data. - substituteInPlace test/cintltst/ucsdetst.c \ - --replace-fail "&TestMailFilterCSS" "NULL" + postPatch = lib.optionalString self.finalPackage.doCheck '' + # Skip test for missing encodingSamples data. + substituteInPlace test/cintltst/ucsdetst.c \ + --replace-fail "&TestMailFilterCSS" "NULL" - # Disable failing tests - substituteInPlace test/cintltst/cloctst.c \ - --replace-fail 'TESTCASE(TestCanonicalForm);' "" + # Disable failing tests + substituteInPlace test/cintltst/cloctst.c \ + --replace-fail 'TESTCASE(TestCanonicalForm);' "" - substituteInPlace test/intltest/rbbitst.cpp \ - --replace-fail 'TESTCASE_AUTO(TestExternalBreakEngineWithFakeYue);' "" + substituteInPlace test/intltest/rbbitst.cpp \ + --replace-fail 'TESTCASE_AUTO(TestExternalBreakEngineWithFakeYue);' "" - # Add missing test data. It’s not included in the source release. - chmod u+w "$NIX_BUILD_TOP/source/icu" - tar -C "$NIX_BUILD_TOP/source" -axf ${lib.escapeShellArg icu78.src} icu/testdata - '' - + lib.optionalString stdenv.hostPlatform.isx86_64 '' - # These tests fail under Rosetta 2 with a floating-point exception. - substituteInPlace test/intltest/caltest.cpp \ - --replace-fail 'TESTCASE_AUTO(Test22633RollTwiceGetTimeOverflow);' "" \ - --replace-fail 'TESTCASE_AUTO(Test22750Roll);' "" - '' - ) - + '' - # Otherwise `make install` is broken. - substituteInPlace Makefile.in \ - --replace-fail '$(top_srcdir)/../LICENSE' "$NIX_BUILD_TOP/source/icu/LICENSE" - substituteInPlace config/dist-data.sh \ - --replace-fail "\''${top_srcdir}/../LICENSE" "$NIX_BUILD_TOP/source/icu/LICENSE" + # Add missing test data. It’s not included in the source release. + chmod u+w "$NIX_BUILD_TOP/source/icu" + tar -C "$NIX_BUILD_TOP/source" -axf ${lib.escapeShellArg icu78.src} icu/testdata - # Make sure this ICU build puts C++ symbols in a distinct namespace to avoid symbol clashes with other ICU - # implementations (including both the system ICU and builds of the upstream ICU). - # This breaks binary compatibility for the C++ API, but it’s not ABI stable anyway. Without doing this, - # `dotnet` crashes on macOS 26.4 when linked against `libicucore.A.dylib` from Nixpkgs. - substituteInPlace common/unicode/uvernum.h \ - --replace-fail 'U_ICU_VERSION_SUFFIX ' 'U_ICU_VERSION_SUFFIX _nix' - # Only enable symbol renaming for C++ symbols. C symbols need to remain unversioned for compatibility. - substituteInPlace common/unicode/uversion.h \ - --replace-fail U_DISABLE_RENAMING 0 - ''; + # Otherwise `make install` is broken. + substituteInPlace Makefile.in \ + --replace-fail '$(top_srcdir)/../LICENSE' "$NIX_BUILD_TOP/source/icu/LICENSE" + substituteInPlace config/dist-data.sh \ + --replace-fail "\''${top_srcdir}/../LICENSE" "$NIX_BUILD_TOP/source/icu/LICENSE" + + # Make sure this ICU build puts C++ symbols in a distinct namespace to avoid symbol clashes with other ICU + # implementations (including both the system ICU and builds of the upstream ICU). + # This breaks binary compatibility for the C++ API, but it’s not ABI stable anyway. Without doing this, + # `dotnet` crashes on macOS 26.4 when linked against `libicucore.A.dylib` from Nixpkgs. + substituteInPlace common/unicode/uvernum.h \ + --replace-fail 'U_ICU_VERSION_SUFFIX ' 'U_ICU_VERSION_SUFFIX _nix' + # Only enable symbol renaming for C++ symbols. C symbols need to remain unversioned for compatibility. + substituteInPlace common/unicode/uversion.h \ + --replace-fail U_DISABLE_RENAMING 0 + ''; # remove dependency on bootstrap-tools in early stdenv build postInstall =