diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 1c43346c1fb9..d4532106533f 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -520,9 +520,6 @@ let revert = true; hash = "sha256-PuinMLhJ2W4KPXI5K0ujw85ENTB1wG7Hv785SZ55xnY="; }) - ] - ++ lib.optionals (chromiumVersionAtLeast "134" && lib.versionOlder rustcVersion "1.86") [ - ./patches/chromium-134-rust-adler2.patch ]; postPatch = diff --git a/pkgs/development/tools/electron/common.nix b/pkgs/development/tools/electron/common.nix index 0a92ed74a765..a93a286e3164 100644 --- a/pkgs/development/tools/electron/common.nix +++ b/pkgs/development/tools/electron/common.nix @@ -81,7 +81,15 @@ in src = null; - patches = base.patches; + patches = + base.patches + # Fix building with Rust 1.86+ + # electron_33 and electron_34 use older chromium versions which expect rust + # to provide the older `adler` library instead of the newer `adler2` library + # This patch makes those older versions also use the new adler2 library + ++ lib.optionals (lib.versionOlder info.version "35") [ + ./use-rust-adler2.patch + ]; npmRoot = "third_party/node"; diff --git a/pkgs/applications/networking/browsers/chromium/patches/chromium-134-rust-adler2.patch b/pkgs/development/tools/electron/use-rust-adler2.patch similarity index 92% rename from pkgs/applications/networking/browsers/chromium/patches/chromium-134-rust-adler2.patch rename to pkgs/development/tools/electron/use-rust-adler2.patch index 3487954ec998..7a7bdacecd3d 100644 --- a/pkgs/applications/networking/browsers/chromium/patches/chromium-134-rust-adler2.patch +++ b/pkgs/development/tools/electron/use-rust-adler2.patch @@ -6,8 +6,8 @@ index 6b996aa1fe3865187d02c017e56c0918bcc9b8f4..68b085be200fa4f116aa709b9157c4d2 # These are no longer present in the Windows toolchain. stdlib_files += [ "addr2line", -- "adler2", -+ "adler", +- "adler", ++ "adler2", "gimli", "libc", "memchr",