@@ -1,4 +1,4 @@
1−{ symlinkJoin, lib, rofi-unwrapped, makeWrapper, hicolor-icon-theme, theme ? null, plugins ? [] }:
1+{ symlinkJoin, lib, rofi-unwrapped, makeWrapper, wrapGAppsHook, gdk-pixbuf, hicolor-icon-theme, theme ? null, plugins ? [] }:
22
33symlinkJoin {
44 name = "rofi-${rofi-unwrapped.version}";
@@ -7,16 +7,23 @@ symlinkJoin {
77 rofi-unwrapped.out
88 ] ++ (lib.forEach plugins (p: p.out));
99
10− buildInputs = [ makeWrapper ];
10+ nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
11+ buildInputs = [ gdk-pixbuf ];
12+
1113 preferLocalBuild = true;
1214 passthru.unwrapped = rofi-unwrapped;
15+
16+ dontWrapGApps = true;
17+
1318 postBuild = ''
1419 rm -rf $out/bin
1520 mkdir $out/bin
1621 ln -s ${rofi-unwrapped}/bin/* $out/bin
17−
1822 rm $out/bin/rofi
23+
24+ gappsWrapperArgsHook
1925 makeWrapper ${rofi-unwrapped}/bin/rofi $out/bin/rofi \
26+ ''${gappsWrapperArgs[@]} \
2027 --prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share \
2128 ${lib.optionalString (plugins != []) ''--prefix XDG_DATA_DIRS : ${lib.concatStringsSep ":" (lib.forEach plugins (p: "${p.out}/share"))}''} \
2229 ${lib.optionalString (theme != null) ''--add-flags "-theme ${theme}"''} \