about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-08-14 16:18:38 +0300
committerGitHub <noreply@github.com>2023-08-14 16:18:38 +0300
commitb16cdbe2027a56a525f575e7d6aa6971d3d918f2 (patch)
tree29b44ec4baa69650fa96be910738dcd9dc798270 /pkgs
parent68c071f1c4841b00c56db0507d3e742a6424834a (diff)
parenta37e23c8caeff04f32ac0d98b6f53d5910d86a45 (diff)
Merge pull request #243088 from Alper-Celik/kde-accessibility-fix
plasma-desktop: add missing gsettings schemas on kaccess
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/desktops/plasma-5/plasma-desktop/default.nix20
1 files changed, 12 insertions, 8 deletions
diff --git a/pkgs/desktops/plasma-5/plasma-desktop/default.nix b/pkgs/desktops/plasma-5/plasma-desktop/default.nix
index f4ab7969cfead..28dfa434f7b0a 100644
--- a/pkgs/desktops/plasma-5/plasma-desktop/default.nix
+++ b/pkgs/desktops/plasma-5/plasma-desktop/default.nix
@@ -58,7 +58,14 @@
 , runCommandLocal
 , makeWrapper
 }:
-
+let
+  # run gsettings with desktop schemas for using in "kcm_access" kcm
+  # and in kaccess
+  gsettings-wrapper = runCommandLocal "gsettings-wrapper" { nativeBuildInputs = [ makeWrapper ]; } ''
+    mkdir -p $out/bin
+    makeWrapper ${glib}/bin/gsettings $out/bin/gsettings --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas.out}/share/gsettings-schemas/${gsettings-desktop-schemas.name}
+  '';
+in
 mkDerivation {
   pname = "plasma-desktop";
   nativeBuildInputs = [ extra-cmake-modules kdoctools wayland-scanner ];
@@ -122,19 +129,16 @@ mkDerivation {
     ./kcm-access.patch
   ];
   CXXFLAGS =
-    let
-      # run gsettings with desktop schemas for using in kcm_accces kcm
-      gsettings-wrapper = runCommandLocal "gsettings-wrapper" { nativeBuildInputs = [ makeWrapper ]; } ''
-        makeWrapper ${glib}/bin/gsettings $out --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas.out}/share/gsettings-schemas/${gsettings-desktop-schemas.name}
-      '';
-    in
     [
       ''-DNIXPKGS_HWCLOCK=\"${lib.getBin util-linux}/bin/hwclock\"''
-      ''-DNIXPKGS_GSETTINGS=\"${gsettings-wrapper}\"''
+      ''-DNIXPKGS_GSETTINGS=\"${gsettings-wrapper}/bin/gsettings\"''
     ];
   postInstall = ''
     # Display ~/Desktop contents on the desktop by default.
     sed -i "''${!outputBin}/share/plasma/shells/org.kde.plasma.desktop/contents/defaults" \
         -e 's/Containment=org.kde.desktopcontainment/Containment=org.kde.plasma.folder/'
   '';
+
+  # wrap kaccess with wrapped gsettings so it can access accessibility schemas
+  qtWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ gsettings-wrapper ]}" ];
 }