From db57a90dccb2b0fc0b6d5302f08365db1e4db81e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 5 Apr 2022 15:11:56 +0200 Subject: [PATCH] qt5*.qtwayland: deconflict patching This fixes build in qt514 case. The usual way here is to provide patches for each qt5 version separately. No other module adds them in this generic way. The problem is when you combine the approaches; qtModule will only take the list from the module and ignore the version-specific list. --- pkgs/development/libraries/qt-5/5.12/default.nix | 6 ++++++ pkgs/development/libraries/qt-5/5.14/default.nix | 8 +++++++- pkgs/development/libraries/qt-5/5.15/default.nix | 6 ++++++ pkgs/development/libraries/qt-5/modules/qtwayland.nix | 6 ------ 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix index 01b65eb3e43a..a3664ae9e055 100644 --- a/pkgs/development/libraries/qt-5/5.12/default.nix +++ b/pkgs/development/libraries/qt-5/5.12/default.nix @@ -84,6 +84,12 @@ let qtlocation = [ ./qtlocation-gcc-9.patch ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; + qtwayland = [ + # NixOS-specific, ensure that app_id is correctly determined for + # wrapped executables from `wrapQtAppsHook` (see comment in patch for further + # context). Beware: shared among different Qt5 versions. + ../modules/qtwayland-app_id.patch + ]; qtwebengine = [ # glibc 2.34 compat (fetchpatch { diff --git a/pkgs/development/libraries/qt-5/5.14/default.nix b/pkgs/development/libraries/qt-5/5.14/default.nix index 5a3bf205fbce..15c85961adcf 100644 --- a/pkgs/development/libraries/qt-5/5.14/default.nix +++ b/pkgs/development/libraries/qt-5/5.14/default.nix @@ -126,7 +126,13 @@ let ./qtwebkit-darwin-no-qos-classes.patch ]; qttools = [ ./qttools.patch ]; - qtwayland = [ ./qtwayland-libdrm-build.patch ]; + qtwayland = [ + ./qtwayland-libdrm-build.patch + # NixOS-specific, ensure that app_id is correctly determined for + # wrapped executables from `wrapQtAppsHook` (see comment in patch for further + # context). Beware: shared among different Qt5 versions. + ../modules/qtwayland-app_id.patch + ]; }; addPackages = self: with self; diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 5943a80a701e..946c196f4a2d 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -60,6 +60,12 @@ let ./qtwebengine-darwin-no-platform-check.patch ./qtwebengine-mac-dont-set-dsymutil-path.patch ]; + qtwayland = [ + # NixOS-specific, ensure that app_id is correctly determined for + # wrapped executables from `wrapQtAppsHook` (see comment in patch for further + # context). Beware: shared among different Qt5 versions. + ../modules/qtwayland-app_id.patch + ]; qtwebkit = [ (fetchpatch { name = "qtwebkit-bison-3.7-build.patch"; diff --git a/pkgs/development/libraries/qt-5/modules/qtwayland.nix b/pkgs/development/libraries/qt-5/modules/qtwayland.nix index edb15b0b48b1..1bd1adedaf04 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwayland.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwayland.nix @@ -6,10 +6,4 @@ qtModule { buildInputs = [ wayland ]; nativeBuildInputs = [ pkg-config ]; outputs = [ "out" "dev" "bin" ]; - patches = [ - # NixOS-specific, ensure that app_id is correctly determined for - # wrapped executables from `wrapQtAppsHook` (see comment in patch for further - # context). - ./qtwayland-app_id.patch - ]; }