From 843508dad46d2205ea8dd81c446349d573187a87 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 4 Jan 2022 20:26:12 +0100 Subject: [PATCH] chromiumDev: Backport important fixes for Wayland This will be required to prevent crashes on Wayland compositors that support version 4 of the wl_output protocol (available since Wayland 1.20.0). This should affect any compositor that is based on wlroots 0.15.0 and soon more. Upstream will hopefully backport those patches soon (if not we could also apply them to M97 - only two trivial changes are necessary to apply the first patch). More information: - Chromium bug report: https://bugs.chromium.org/p/chromium/issues/detail?id=1279574 - wlroots bug report: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3344 --- .../networking/browsers/chromium/common.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 7edec1f5a625..b4fdf61d1668 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -161,6 +161,18 @@ let ./patches/no-build-timestamps.patch # For bundling Widevine (DRM), might be replaceable via bundle_widevine_cdm=true in gnFlags: ./patches/widevine-79.patch + ] ++ lib.optionals (versionRange "98" "99") [ + # A critical Ozone/Wayland fix: + (githubPatch { + # [linux/wayland] Fixed terminate caused by binding to wrong version. + commit = "dd4c3ddadbb9869f59cee201a38e9ca3b9154f4d"; + sha256 = "sha256-FH7lBQTruMzkBT2XQ+kgADmJA0AxJfaV/gvtoqfQ4a4="; + }) + (githubPatch { + # [linux/wayland] Fixed terminate caused by binding to wrong version. (fixup) + commit = "a84b79daa8897b822336b8f348ef4daaae07af37"; + sha256 = "sha256-2x6/rGGzTC6lKLMkVyD9RNCTsMVrtRQyr/NjSpaj2is="; + }) ]; postPatch = ''