From 6d30ce519f9eba0a9e8a9a8d0b662de00989e0e4 Mon Sep 17 00:00:00 2001 From: emilylange Date: Tue, 23 Sep 2025 03:18:27 +0200 Subject: [PATCH 1/2] chromium: fix xlst rendering on `release-25.05` Due to ABI mismatches between our patched libxml2 and the vendored libxlst, chromium and all of electron-source compile just fine, but then fail to actually render xslt content at runtime. Note that as of now only release-25.05 is affected by this, but the same could happen on unstable too. libxlst depends on libxml2, so we should only ever use either our versions or the vendored versions for both, but never mix our and vendored versions. --- pkgs/applications/networking/browsers/chromium/common.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index f4de63a0bb49..cdf2aa9eaf65 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -164,7 +164,8 @@ let # //third_party/libavif:libavif_enc(//build/toolchain/linux/unbundle:default) # needs //third_party/libwebp:libwebp_sharpyuv(//build/toolchain/linux/unbundle:default) # "libwebp" - "libxslt" + "libxml" + "libxslt" # depends on libxml, always remove or re-add as a pair # "opus" ]; From 0d83bf0db367edb3d4df1dc0dbeb5168acbd166a Mon Sep 17 00:00:00 2001 From: emilylange Date: Tue, 23 Sep 2025 03:26:40 +0200 Subject: [PATCH 2/2] chromium: move `export` in `preConfigure` to `env.` Better late than never. This was intended to happen a long time ago. --- .../networking/browsers/chromium/common.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index cdf2aa9eaf65..a6d28e16ed86 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -812,15 +812,7 @@ let // (extraAttrs.gnFlags or { }) ); - # TODO: Migrate this to env.RUSTC_BOOTSTRAP next mass-rebuild. - # Chromium expects nightly/bleeding edge rustc features to be available. - # Our rustc in nixpkgs follows stable, but since bootstrapping rustc requires - # nightly features too, we can (ab-)use RUSTC_BOOTSTRAP here as well to - # enable those features in our stable builds. - preConfigure = '' - export RUSTC_BOOTSTRAP=1 - '' - + lib.optionalString (!isElectron) '' + preConfigure = lib.optionalString (!isElectron) '' ( cd third_party/node grep patch update_npm_deps | sh @@ -841,6 +833,11 @@ let runHook postConfigure ''; + # Chromium expects nightly/bleeding edge rustc features to be available. + # Our rustc in nixpkgs follows stable, but since bootstrapping rustc requires + # nightly features too, we can (ab-)use RUSTC_BOOTSTRAP here as well to + # enable those features in our stable builds. + env.RUSTC_BOOTSTRAP = 1; # Mute some warnings that are enabled by default. This is useful because # our Clang is always older than Chromium's and the build logs have a size # of approx. 25 MB without this option (and this saves e.g. 66 %).