rofi: fix displaying hicolor icons
This adds the hicolor theme to XDG_DATA_DIRS for rofi and moves all wrapping to rofi/wrapper.nix. The wrapper will now always be generated, even when a theme is not provided.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
{ stdenv, rofi-unwrapped, makeWrapper, theme ? null }:
|
||||
{ stdenv, rofi-unwrapped, makeWrapper, hicolor-icon-theme, theme ? null }:
|
||||
|
||||
if theme == null then rofi-unwrapped else
|
||||
stdenv.mkDerivation {
|
||||
pname = "rofi";
|
||||
version = rofi-unwrapped.version;
|
||||
@@ -14,8 +13,15 @@ stdenv.mkDerivation {
|
||||
rm $out/bin
|
||||
mkdir $out/bin
|
||||
ln -s ${rofi-unwrapped}/bin/* $out/bin
|
||||
|
||||
rm $out/bin/rofi
|
||||
makeWrapper ${rofi-unwrapped}/bin/rofi $out/bin/rofi --add-flags "-theme ${theme}"
|
||||
makeWrapper ${rofi-unwrapped}/bin/rofi $out/bin/rofi \
|
||||
--prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share \
|
||||
${if theme != null then ''--add-flags "-theme ${theme}"'' else ""}
|
||||
|
||||
rm $out/bin/rofi-theme-selector
|
||||
makeWrapper ${rofi-unwrapped}/bin/rofi-theme-selector $out/bin/rofi-theme-selector \
|
||||
--prefix XDG_DATA_DIRS : $out/share
|
||||
'';
|
||||
|
||||
meta = rofi-unwrapped.meta // {
|
||||
|
||||
Reference in New Issue
Block a user