about summary refs log tree commit diff
path: root/pkgs/applications/misc
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2019-12-26 02:22:07 +0100
committerGitHub <noreply@github.com>2019-12-26 02:22:07 +0100
commit622c199eac953bf21083153eba8c1490e740aef5 (patch)
treeaba02a9cd92e3b26322a6e3e5604fe9ff9e372f5 /pkgs/applications/misc
parent8daee5f6ce7be7c29cdaac60c0d7dcf9ae610a48 (diff)
parentb12dfd075797393e936093d377fc7e1023f0e0fe (diff)
downloadnixlib-622c199eac953bf21083153eba8c1490e740aef5.tar
nixlib-622c199eac953bf21083153eba8c1490e740aef5.tar.gz
nixlib-622c199eac953bf21083153eba8c1490e740aef5.tar.bz2
nixlib-622c199eac953bf21083153eba8c1490e740aef5.tar.lz
nixlib-622c199eac953bf21083153eba8c1490e740aef5.tar.xz
nixlib-622c199eac953bf21083153eba8c1490e740aef5.tar.zst
nixlib-622c199eac953bf21083153eba8c1490e740aef5.zip
Merge pull request #76302 from MetaDark/rofi
rofi: fix displaying hicolor icons
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r--pkgs/applications/misc/rofi/default.nix9
-rw-r--r--pkgs/applications/misc/rofi/wrapper.nix12
2 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/applications/misc/rofi/default.nix b/pkgs/applications/misc/rofi/default.nix
index eabf77f0e951..94381d4f6f96 100644
--- a/pkgs/applications/misc/rofi/default.nix
+++ b/pkgs/applications/misc/rofi/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, makeWrapper
+{ stdenv, lib, fetchurl
 , autoreconfHook, pkgconfig, libxkbcommon, pango, which, git
 , cairo, libxcb, xcbutil, xcbutilwm, xcbutilxrm, libstartup_notification
 , bison, flex, librsvg, check
@@ -19,16 +19,11 @@ stdenv.mkDerivation rec {
     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
     libstartup_notification libxcb xcbutil xcbutilwm xcbutilxrm which
   ];
 
-  postInstall = ''
-    wrapProgram $out/bin/rofi-theme-selector \
-      --prefix XDG_DATA_DIRS : $out/share
-  '';
-
   doCheck = false;
 
   meta = with lib; {
diff --git a/pkgs/applications/misc/rofi/wrapper.nix b/pkgs/applications/misc/rofi/wrapper.nix
index 8c24d27f0752..1c7284a2db26 100644
--- a/pkgs/applications/misc/rofi/wrapper.nix
+++ b/pkgs/applications/misc/rofi/wrapper.nix
@@ -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 // {