about summary refs log tree commit diff
path: root/pkgs/applications/window-managers/sway/wrapper.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/window-managers/sway/wrapper.nix')
-rw-r--r--pkgs/applications/window-managers/sway/wrapper.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/applications/window-managers/sway/wrapper.nix b/pkgs/applications/window-managers/sway/wrapper.nix
index 3e12e3fcc55f..fe78e1a9ff96 100644
--- a/pkgs/applications/window-managers/sway/wrapper.nix
+++ b/pkgs/applications/window-managers/sway/wrapper.nix
@@ -2,7 +2,7 @@
 , sway-unwrapped, swaybg
 , makeWrapper, symlinkJoin, writeShellScriptBin
 , withBaseWrapper ? true, extraSessionCommands ? "", dbus
-, withGtkWrapper ? false, wrapGAppsHook, gdk-pixbuf
+, withGtkWrapper ? false, wrapGAppsHook, gdk-pixbuf, glib, gtk3
 , extraOptions ? [] # E.g.: [ "--verbose" ]
 }:
 
@@ -33,12 +33,14 @@ in symlinkJoin {
   nativeBuildInputs = [ makeWrapper ]
     ++ (optional withGtkWrapper wrapGAppsHook);
 
-  buildInputs = optional withGtkWrapper gdk-pixbuf;
+  buildInputs = optionals withGtkWrapper [ gdk-pixbuf glib gtk3 ];
+
+  # We want to run wrapProgram manually
+  dontWrapGApps = true;
 
   postBuild = ''
-    # We want to run wrapProgram manually to only wrap sway and add swaybg:
-    export dontWrapGApps=true
-    ${optionalString withGtkWrapper "wrapGAppsHook"}
+    ${optionalString withGtkWrapper "gappsWrapperArgsHook"}
+
     wrapProgram $out/bin/sway \
       --prefix PATH : "${swaybg}/bin" \
       ${optionalString withGtkWrapper ''"''${gappsWrapperArgs[@]}"''} \