Merge pull request #110805 from kanashimia/master

rofi: wrap gdk-pixbuf, fixes svg icons
This commit is contained in:
Sandro 2021-02-21 08:45:05 +01:00 committed by GitHub
commit b50889fc07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}"''} \