From d3f6db7df25ac892d27740b91675821a642acb74 Mon Sep 17 00:00:00 2001 From: Sizhe Zhao Date: Thu, 10 Jul 2025 01:08:17 +0800 Subject: [PATCH] qt6.qtwebengine: fix build (cherry picked from commit 7f96522ec71de7cfaff72e4f68861265a15c1287) --- .../qt-6/modules/qtwebengine/default.nix | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtwebengine/default.nix b/pkgs/development/libraries/qt-6/modules/qtwebengine/default.nix index 710c53091de14..44ab5d63eb455 100644 --- a/pkgs/development/libraries/qt-6/modules/qtwebengine/default.nix +++ b/pkgs/development/libraries/qt-6/modules/qtwebengine/default.nix @@ -7,6 +7,7 @@ buildPackages, bison, coreutils, + fetchpatch2, flex, git, gperf, @@ -100,20 +101,30 @@ qtModule { # which cannot be set at the same time as -Wformat-security hardeningDisable = [ "format" ]; - patches = [ - # Don't assume /usr/share/X11, and also respect the XKB_CONFIG_ROOT - # environment variable, since NixOS relies on it working. - # See https://github.com/NixOS/nixpkgs/issues/226484 for more context. - ./xkb-includes.patch + patches = + [ + # Don't assume /usr/share/X11, and also respect the XKB_CONFIG_ROOT + # environment variable, since NixOS relies on it working. + # See https://github.com/NixOS/nixpkgs/issues/226484 for more context. + ./xkb-includes.patch - ./link-pulseaudio.patch + ./link-pulseaudio.patch - # Override locales install path so they go to QtWebEngine's $out - ./locales-path.patch + # Override locales install path so they go to QtWebEngine's $out + ./locales-path.patch - # Reproducibility QTBUG-136068 - ./gn-object-sorted.patch - ]; + # Reproducibility QTBUG-136068 + ./gn-object-sorted.patch + ] + ++ lib.optionals stdenv.cc.isClang [ + # https://chromium-review.googlesource.com/c/chromium/src/+/6445471 + (fetchpatch2 { + url = "https://github.com/chromium/chromium/commit/f8f21fb4aa01f75acbb12abf5ea8c263c6817141.patch?full_index=1"; + stripLen = 1; + extraPrefix = "src/3rdparty/chromium/"; + hash = "sha256-wcby9uD8xb4re9+s+rdl1hcpxDcHxuI68vUNAC7Baas="; + }) + ]; postPatch = ''