From fb10ea41b2a080cb4ecac34aa12cf056d8d3f90e Mon Sep 17 00:00:00 2001 From: emilylange Date: Thu, 18 Apr 2024 19:26:17 +0200 Subject: chromium: fix `--ozone-platform-hint` flag on wayland M124 shipped with broken `--ozone-platform-hint` flag handling, which we rely on NIXOS_OZONE_WL (wayland) environment variable. This resulted in chromium M124 opening as blank/transparent window under wayland. X11 continued to work fine, which is why our X11-only chromium VM test did not catch this. See https://issues.chromium.org/issues/329678163 for details. Fortunately, the fix for that which landed in M125, applies cleanly on M124, so we do just that and essentially backport that fix to M124. --- pkgs/applications/networking/browsers/chromium/common.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pkgs/applications/networking/browsers/chromium') diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 400c61130111e..df33a2bbe7571 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -248,6 +248,15 @@ let # Partial revert of https://github.com/chromium/chromium/commit/3687976b0c6d36cf4157419a24a39f6770098d61 # allowing us to use our rustc and our clang. ./patches/chromium-121-rust.patch + ] ++ lib.optionals (chromiumVersionAtLeast "124" && !chromiumVersionAtLeast "125") [ + # M124 shipped with broken --ozone-platform-hint flag handling, which we rely on + # for our NIXOS_OZONE_WL (wayland) environment variable. + # See . + # This is the commit for the fix that landed in M125, which applies clean on M124. + (githubPatch { + commit = "c7f4c58f896a651eba80ad805ebdb49d19ebdbd4"; + hash = "sha256-6nYWT2zN+j73xAIXLdGYT2eC71vGnGfiLCB0OwT0CAI="; + }) ]; postPatch = '' -- cgit 1.4.1