From 55aa1bc36226e88765b700e16132365f269d9c67 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 19 Apr 2023 14:38:18 +0200 Subject: [PATCH 1/2] firefox-esr-102-unwrapped: Drop obsolete rust-cbindgen patch We don't have any consumer with a version older than 102.6.0 anymore. --- pkgs/applications/networking/browsers/firefox/common.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index ee07ee23e874..306c344435a1 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -221,14 +221,7 @@ buildStdenv.mkDerivation ({ "profilingPhase" ]; - patches = lib.optionals (lib.versionOlder version "102.6.0") [ - (fetchpatch { - # https://bugzilla.mozilla.org/show_bug.cgi?id=1773259 - name = "rust-cbindgen-0.24.2-compat.patch"; - url = "https://raw.githubusercontent.com/canonical/firefox-snap/5622734942524846fb0eb7108918c8cd8557fde3/patches/fix-ftbfs-newer-cbindgen.patch"; - hash = "sha256-+wNZhkDB3HSknPRD4N6cQXY7zMT/DzNXx29jQH0Gb1o="; - }) - ] + patches = [ ] ++ lib.optional (lib.versionOlder version "111") ./env_var_for_system_dir-ff86.patch ++ lib.optional (lib.versionAtLeast version "111") ./env_var_for_system_dir-ff111.patch ++ lib.optional (lib.versionAtLeast version "96") ./no-buildconfig-ffx96.patch From b979f3be1f956228058179315d56203e05fd679b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 19 Apr 2023 14:39:58 +0200 Subject: [PATCH 2/2] firefox-unwrapped: Apply patch for mozbz#1803016 https://bugzilla.mozilla.org/show_bug.cgi?id=1803016 Resolves crashes on wayland, when the either component of the window size wouldn't be divisible by the desktop scaling. Unfortunately marked wontfix for Firefox 112, so we apply this patch instead. Closes: #226539 --- .../networking/browsers/firefox/common.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 306c344435a1..ce69742a3f6a 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -221,7 +221,15 @@ buildStdenv.mkDerivation ({ "profilingPhase" ]; - patches = [ ] + patches = lib.optionals (lib.versionAtLeast version "112.0" && lib.versionOlder version "113.0") [ + (fetchpatch { + # Crash when desktop scaling does not divide window scale on Wayland + # https://bugzilla.mozilla.org/show_bug.cgi?id=1803016 + name = "mozbz1803016.patch"; + url = "https://hg.mozilla.org/mozilla-central/raw-rev/1068e0955cfb"; + hash = "sha256-iPqmofsmgvlFNm+mqVPbdgMKmP68ANuzYu+PzfCpoNA="; + }) + ] ++ lib.optional (lib.versionOlder version "111") ./env_var_for_system_dir-ff86.patch ++ lib.optional (lib.versionAtLeast version "111") ./env_var_for_system_dir-ff111.patch ++ lib.optional (lib.versionAtLeast version "96") ./no-buildconfig-ffx96.patch