Merge pull request #76302 from MetaDark/rofi

rofi: fix displaying hicolor icons
This commit is contained in:
Maximilian Bosch 2019-12-26 02:22:07 +01:00 committed by GitHub
commit 622c199eac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 10 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, makeWrapper { stdenv, lib, fetchurl
, autoreconfHook, pkgconfig, libxkbcommon, pango, which, git , autoreconfHook, pkgconfig, libxkbcommon, pango, which, git
, cairo, libxcb, xcbutil, xcbutilwm, xcbutilxrm, libstartup_notification , cairo, libxcb, xcbutil, xcbutilwm, xcbutilxrm, libstartup_notification
, bison, flex, librsvg, check , bison, flex, librsvg, check
@ -19,16 +19,11 @@ stdenv.mkDerivation rec {
sed -i 's/~root/~nobody/g' test/helper-expand.c sed -i 's/~root/~nobody/g' test/helper-expand.c
''; '';
nativeBuildInputs = [ autoreconfHook pkgconfig makeWrapper ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ libxkbcommon pango cairo git bison flex librsvg check buildInputs = [ libxkbcommon pango cairo git bison flex librsvg check
libstartup_notification libxcb xcbutil xcbutilwm xcbutilxrm which libstartup_notification libxcb xcbutil xcbutilwm xcbutilxrm which
]; ];
postInstall = ''
wrapProgram $out/bin/rofi-theme-selector \
--prefix XDG_DATA_DIRS : $out/share
'';
doCheck = false; doCheck = false;
meta = with lib; { meta = with lib; {

View file

@ -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 { stdenv.mkDerivation {
pname = "rofi"; pname = "rofi";
version = rofi-unwrapped.version; version = rofi-unwrapped.version;
@ -14,8 +13,15 @@ stdenv.mkDerivation {
rm $out/bin rm $out/bin
mkdir $out/bin mkdir $out/bin
ln -s ${rofi-unwrapped}/bin/* $out/bin ln -s ${rofi-unwrapped}/bin/* $out/bin
rm $out/bin/rofi 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 // { meta = rofi-unwrapped.meta // {