From fe35d034046871233c74b9f247e27ba6d244f291 Mon Sep 17 00:00:00 2001 From: Sean Borg Date: Wed, 19 Apr 2023 06:55:40 +0100 Subject: [PATCH 1/3] spectacle: add wrapGAppsHook Fixes no Gsettings error when clicking saveAs. Following method mentioned in https://github.com/NixOS/nixpkgs/issues/16285 --- pkgs/applications/kde/spectacle.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/kde/spectacle.nix b/pkgs/applications/kde/spectacle.nix index db819ba41f97..93e3f8563980 100644 --- a/pkgs/applications/kde/spectacle.nix +++ b/pkgs/applications/kde/spectacle.nix @@ -5,11 +5,12 @@ , knotifications, kscreen, kwidgetsaddons, kwindowsystem, kxmlgui, libkipi , qtx11extras, knewstuff, kwayland, qttools, kcolorpicker, kimageannotator , qcoro, qtquickcontrols2, wayland, plasma-wayland-protocols, kpurpose, kpipewire +, wrapGAppsHook }: mkDerivation { pname = "spectacle"; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ]; buildInputs = [ kconfig kcoreaddons kdbusaddons kdeclarative ki18n kio knotifications kscreen kwidgetsaddons kwindowsystem kxmlgui libkipi qtx11extras xcb-util-cursor @@ -20,6 +21,13 @@ mkDerivation { substituteInPlace desktop/org.kde.spectacle.desktop.cmake \ --replace "Exec=@QtBinariesDir@/qdbus" "Exec=${lib.getBin qttools}/bin/qdbus" ''; + + dontWrapGApps = true; + + preFixup = '' + qtWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + propagatedUserEnvPkgs = [ kipi-plugins libkipi ]; meta = with lib; { homepage = "https://apps.kde.org/spectacle/"; From 50d922a5aeaf5e7af113ead88a153f02edd4e98f Mon Sep 17 00:00:00 2001 From: Sean Borg Date: Wed, 19 Apr 2023 07:06:25 +0100 Subject: [PATCH 2/3] texmaker: add wrapGAppsHook Fixes no Gsettings error when clicking Open or SaveAs. Following method mentioned in https://github.com/NixOS/nixpkgs/issues/16285 --- pkgs/applications/editors/texmaker/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/texmaker/default.nix b/pkgs/applications/editors/texmaker/default.nix index d4bfdebd6a55..01c2e8e74ae1 100644 --- a/pkgs/applications/editors/texmaker/default.nix +++ b/pkgs/applications/editors/texmaker/default.nix @@ -1,4 +1,4 @@ -{ lib, mkDerivation, fetchurl, qtbase, qtscript, qtwebengine, qmake, zlib, pkg-config, poppler }: +{ lib, mkDerivation, fetchurl, qtbase, qtscript, qtwebengine, qmake, zlib, pkg-config, poppler, wrapGAppsHook }: mkDerivation rec { pname = "texmaker"; @@ -10,7 +10,7 @@ mkDerivation rec { }; buildInputs = [ qtbase qtscript poppler zlib qtwebengine ]; - nativeBuildInputs = [ pkg-config poppler qmake ]; + nativeBuildInputs = [ pkg-config poppler qmake wrapGAppsHook ]; env.NIX_CFLAGS_COMPILE = "-I${poppler.dev}/include/poppler"; qmakeFlags = [ @@ -19,6 +19,12 @@ mkDerivation rec { "METAINFODIR=${placeholder "out"}/share/metainfo" ]; + dontWrapGApps = true; + + preFixup = '' + qtWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + meta = with lib; { description = "TeX and LaTeX editor"; longDescription='' From e797a476c62a21320739e73df48b0e1a6d18e374 Mon Sep 17 00:00:00 2001 From: Sean Borg Date: Wed, 19 Apr 2023 07:15:05 +0100 Subject: [PATCH 3/3] vlc: add wrapGAppsHook Fixes no Gsettings error when trying to open file picker. Following method mentioned in https://github.com/NixOS/nixpkgs/issues/16285 --- pkgs/applications/video/vlc/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix index 457aa7a0da5d..fd263557d48a 100644 --- a/pkgs/applications/video/vlc/default.nix +++ b/pkgs/applications/video/vlc/default.nix @@ -71,7 +71,7 @@ , onlyLibVLC ? false , skins2Support ? !onlyLibVLC, freetype , waylandSupport ? true, wayland, wayland-protocols -, withQt5 ? true, qtbase, qtsvg, qtwayland, qtx11extras, wrapQtAppsHook +, withQt5 ? true, qtbase, qtsvg, qtwayland, qtx11extras, wrapQtAppsHook, wrapGAppsHook }: # chromecastSupport requires TCP port 8010 to be open for it to work. @@ -177,6 +177,7 @@ stdenv.mkDerivation rec { pkg-config removeReferencesTo unzip + wrapGAppsHook ] ++ optionals withQt5 [ wrapQtAppsHook ] ++ optionals waylandSupport [ wayland wayland-protocols ]; @@ -209,6 +210,14 @@ stdenv.mkDerivation rec { /usr/share/fonts/truetype/freefont ${freefont_ttf}/share/fonts/truetype ''; + + # to prevent double wrapping of Qtwrap and Gwrap + dontWrapGApps = true; + + preFixup = '' + qtWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + # - Touch plugins (plugins cache keyed off mtime and file size: # https://github.com/NixOS/nixpkgs/pull/35124#issuecomment-370552830 # - Remove references to the Qt development headers (used in error messages)