From c43b8cd611788219d465157017ee659ce79d34f8 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 28 Jan 2026 23:17:59 +0100 Subject: [PATCH] buildMozillaMach: use vendored icu library Mozilla vendors various patches on top of ICU that upstream is very slow to accept. Instead of extracting the patches and keeping them up to date on our system icu we decided it would likely be fine to rely on the vendored version. --- .../mailreaders/thunderbird/packages.nix | 26 ------------------- .../build-mozilla-mach/default.nix | 10 ++----- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/thunderbird/packages.nix b/pkgs/applications/networking/mailreaders/thunderbird/packages.nix index 43117b3af188..adb295c8c682 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird/packages.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird/packages.nix @@ -4,30 +4,11 @@ buildMozillaMach, callPackage, fetchurl, - icu77, - icu78, fetchpatch2, config, }: let - patchICU = - icu: - icu.overrideAttrs (attrs: { - # standardize vtzone output - # Work around ICU-22132 https://unicode-org.atlassian.net/browse/ICU-22132 - # https://bugzilla.mozilla.org/show_bug.cgi?id=1790071 - patches = attrs.patches ++ [ - (fetchpatch2 { - url = "https://hg.mozilla.org/mozilla-central/raw-file/fb8582f80c558000436922fb37572adcd4efeafc/intl/icu-patches/bug-1790071-ICU-22132-standardize-vtzone-output.diff"; - stripLen = 3; - hash = "sha256-MGNnWix+kDNtLuACrrONDNcFxzjlUcLhesxwVZFzPAM="; - }) - ]; - }); - icu77' = patchICU icu77; - icu78' = patchICU icu78; - common = { version, @@ -48,10 +29,6 @@ let # The file to be patched is different from firefox's `no-buildconfig-ffx90.patch`. (if lib.versionOlder version "140" then ./no-buildconfig.patch else ./no-buildconfig-tb140.patch) ]; - extraPassthru = { - icu77 = icu77'; - icu78 = icu78'; - }; meta = { changelog = "https://www.thunderbird.net/en-US/thunderbird/${version}/releasenotes/"; @@ -76,9 +53,6 @@ let webrtcSupport = false; pgoSupport = false; # console.warn: feeds: "downloadFeed: network connection unavailable" - - icu77 = icu77'; - icu78 = icu78'; }; in diff --git a/pkgs/build-support/build-mozilla-mach/default.nix b/pkgs/build-support/build-mozilla-mach/default.nix index 183f717d6c4b..1236f7b79369 100644 --- a/pkgs/build-support/build-mozilla-mach/default.nix +++ b/pkgs/build-support/build-mozilla-mach/default.nix @@ -76,8 +76,6 @@ in glib, gnum4, gtk3, - icu77, # if you fiddle with the icu parameters, please check Thunderbird's overrides - icu78, libGL, libGLU, libevent, @@ -359,10 +357,6 @@ buildStdenv.mkDerivation { rm -rf obj-x86_64-pc-linux-gnu patchShebangs mach build '' - # https://bugzilla.mozilla.org/show_bug.cgi?id=1927380 - + lib.optionalString (lib.versionAtLeast version "134") '' - sed -i "s/icu-i18n/icu-uc &/" js/moz.configure - '' + extraPostPatch; # Ignore trivial whitespace changes in patches, this fixes compatibility of @@ -506,7 +500,8 @@ buildStdenv.mkDerivation { # MacOS builds use bundled versions of libraries: https://bugzilla.mozilla.org/show_bug.cgi?id=1776255 "--enable-system-pixman" "--with-system-ffi" - "--with-system-icu" + # Mozilla vendors 10+ patches and ICU upstream is very slow to adopt them + # "--with-system-icu" "--with-system-jpeg" "--with-system-libevent" "--with-system-libvpx" @@ -609,7 +604,6 @@ buildStdenv.mkDerivation { libdrm ] )) - ++ [ (if (lib.versionAtLeast version "147") then icu78 else icu77) ] ++ lib.optional gssSupport libkrb5 ++ lib.optional jemallocSupport jemalloc ++ extraBuildInputs;