diff options
author | Nikita Ursol <nikita20001116@gmail.com> | 2021-01-25 19:14:43 +0200 |
---|---|---|
committer | Nikita Ursol <nikita20001116@gmail.com> | 2021-01-25 19:14:43 +0200 |
commit | 2058ec85f6af2b0afd7c2df62c9a88e57c279edf (patch) | |
tree | cb545856d0285185e7e6d683210a33dad90db4a9 /pkgs/applications/misc/rofi | |
parent | f2aa6f79cd320d748804708219edd42a7e604b2a (diff) |
rofi: wrap gdk-pixbuf, fixes svg icons
Diffstat (limited to 'pkgs/applications/misc/rofi')
-rw-r--r-- | pkgs/applications/misc/rofi/wrapper.nix | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/applications/misc/rofi/wrapper.nix b/pkgs/applications/misc/rofi/wrapper.nix index 4e69f9cce1452..6115544e79fc6 100644 --- a/pkgs/applications/misc/rofi/wrapper.nix +++ b/pkgs/applications/misc/rofi/wrapper.nix @@ -1,4 +1,4 @@ -{ symlinkJoin, lib, rofi-unwrapped, makeWrapper, hicolor-icon-theme, theme ? null, plugins ? [] }: +{ symlinkJoin, lib, rofi-unwrapped, makeWrapper, wrapGAppsHook, gdk-pixbuf, hicolor-icon-theme, theme ? null, plugins ? [] }: symlinkJoin { name = "rofi-${rofi-unwrapped.version}"; @@ -7,16 +7,23 @@ symlinkJoin { rofi-unwrapped.out ] ++ (lib.forEach plugins (p: p.out)); - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper wrapGAppsHook ]; + buildInputs = [ gdk-pixbuf ]; + preferLocalBuild = true; passthru.unwrapped = rofi-unwrapped; + + dontWrapGApps = true; + postBuild = '' rm -rf $out/bin mkdir $out/bin ln -s ${rofi-unwrapped}/bin/* $out/bin - rm $out/bin/rofi + + gappsWrapperArgsHook makeWrapper ${rofi-unwrapped}/bin/rofi $out/bin/rofi \ + ''${gappsWrapperArgs[@]} \ --prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share \ ${lib.optionalString (plugins != []) ''--prefix XDG_DATA_DIRS : ${lib.concatStringsSep ":" (lib.forEach plugins (p: "${p.out}/share"))}''} \ ${lib.optionalString (theme != null) ''--add-flags "-theme ${theme}"''} \ |