From 7c4e6933f062da23687758426d376548d304ebc7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 12 May 2025 03:49:34 +0200 Subject: [PATCH 1/2] buildMozillaMach: reenable system-icu By appling a patch from chaotic-nyx linking against icu76 and newer works again. From Firefox 139 upstream uses icu77, but it already works today on 138.0.1. https://bugzilla.mozilla.org/show_bug.cgi?id=1927380 (cherry picked from commit a8fe4053db91dc61ab699f5eee907ce80d691ad2) --- .../networking/browsers/firefox/common.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index fac624b1696e..6310fe0d15e1 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -65,6 +65,7 @@ in gnum4, gtk3, icu73, + icu76, libGL, libGLU, libevent, @@ -313,6 +314,10 @@ 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 @@ -455,8 +460,7 @@ buildStdenv.mkDerivation { "--with-distribution-id=org.nixos" "--with-libclang-path=${lib.getLib llvmPackagesBuildBuild.libclang}/lib" "--with-system-ffi" - # Firefox 136 fails to link with our icu76.1 - (lib.optionalString (lib.versionOlder version "136") "--with-system-icu") + "--with-system-icu" "--with-system-jpeg" "--with-system-libevent" "--with-system-libvpx" @@ -552,10 +556,8 @@ buildStdenv.mkDerivation { zip zlib ] - ++ lib.optionals (lib.versionOlder version "136") [ - icu73 - libpng - ] + ++ [ (if (lib.versionAtLeast version "138") then icu76 else icu73) ] + ++ lib.optionals (lib.versionOlder version "136") [ libpng ] ++ [ ( if (lib.versionAtLeast version "116") then nss_latest else nss_esr # 3.90 From f3c8d9231b07edf3a740a579e8ee93724972bd00 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 12 May 2025 03:51:57 +0200 Subject: [PATCH 2/2] buildMozillaMach: update nss version range While building Firefox ESR with the latest NSS version generally works we and upstream actually prefer using the ESR versions together. (cherry picked from commit 63a1d0d0f95af5e167361e79a44e1efd3cdce883) --- pkgs/applications/networking/browsers/firefox/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 6310fe0d15e1..f04c01c8de30 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -560,7 +560,7 @@ buildStdenv.mkDerivation { ++ lib.optionals (lib.versionOlder version "136") [ libpng ] ++ [ ( - if (lib.versionAtLeast version "116") then nss_latest else nss_esr # 3.90 + if (lib.versionAtLeast version "129") then nss_latest else nss_esr # 3.90 ) ] ++ lib.optional alsaSupport alsa-lib