about summary refs log tree commit diff
path: root/pkgs/applications/misc/rofi
diff options
context:
space:
mode:
authorluc65r <59375051+luc65r@users.noreply.github.com>2020-03-29 23:18:56 +0000
committerGitHub <noreply@github.com>2020-03-30 01:18:56 +0200
commit8edd400bfb7dadd3b1d07b00f002547b4287f215 (patch)
tree80326f062482639a19d4c4f880e24f93780638a7 /pkgs/applications/misc/rofi
parent40fab12bd5dcd1e07813bcd571509697d0ba9ea5 (diff)
rofi-calc: init at 1.6 (#83136)
Also:
* maintainers: add albakhamj
* maintainers: add luc65r
* rofi: add plugins argument to wrapper

Co-authored-by: Maciej Krüger <mkg20001@gmail.com>
Diffstat (limited to 'pkgs/applications/misc/rofi')
-rw-r--r--pkgs/applications/misc/rofi/wrapper.nix20
1 files changed, 11 insertions, 9 deletions
diff --git a/pkgs/applications/misc/rofi/wrapper.nix b/pkgs/applications/misc/rofi/wrapper.nix
index 1c7284a2db267..e43614d9d2269 100644
--- a/pkgs/applications/misc/rofi/wrapper.nix
+++ b/pkgs/applications/misc/rofi/wrapper.nix
@@ -1,23 +1,25 @@
-{ stdenv, rofi-unwrapped, makeWrapper, hicolor-icon-theme, theme ? null }:
+{ symlinkJoin, lib, rofi-unwrapped, makeWrapper, hicolor-icon-theme, theme ? null, plugins ? [] }:
 
-stdenv.mkDerivation {
-  pname = "rofi";
-  version = rofi-unwrapped.version;
+symlinkJoin {
+  name = "rofi-${rofi-unwrapped.version}";
+
+  paths = [
+    rofi-unwrapped.out
+  ] ++ (lib.forEach plugins (p: p.out));
 
   buildInputs = [ makeWrapper ];
   preferLocalBuild = true;
   passthru.unwrapped = rofi-unwrapped;
-  buildCommand = ''
-    mkdir $out
-    ln -s ${rofi-unwrapped}/* $out
-    rm $out/bin
+  postBuild = ''
+    rm -rf $out/bin
     mkdir $out/bin
     ln -s ${rofi-unwrapped}/bin/* $out/bin
 
     rm $out/bin/rofi
     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 ""}
+      ${lib.optionalString (theme != null) ''--add-flags "-theme ${theme}"''} \
+      ${lib.optionalString (plugins != []) ''--add-flags "-plugin-path $out/lib/rofi"''}
 
     rm $out/bin/rofi-theme-selector
     makeWrapper ${rofi-unwrapped}/bin/rofi-theme-selector $out/bin/rofi-theme-selector \