1 { symlinkJoin, lib, rofi-unwrapped, makeWrapper, wrapGAppsHook3, gdk-pixbuf, hicolor-icon-theme, theme ? null, plugins ? [], symlink-dmenu ? false }:
4 name = "rofi-${rofi-unwrapped.version}";
8 ] ++ (lib.forEach plugins (p: p.out));
10 nativeBuildInputs = [ makeWrapper wrapGAppsHook3 ];
11 buildInputs = [ gdk-pixbuf ];
13 preferLocalBuild = true;
14 passthru.unwrapped = rofi-unwrapped;
21 ln -s ${rofi-unwrapped}/bin/* $out/bin
25 makeWrapper ${rofi-unwrapped}/bin/rofi $out/bin/rofi \
26 ''${gappsWrapperArgs[@]} \
27 --prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share \
28 ${lib.optionalString (plugins != []) ''--prefix XDG_DATA_DIRS : ${lib.concatStringsSep ":" (lib.forEach plugins (p: "${p.out}/share"))}''} \
29 ${lib.optionalString (theme != null) ''--add-flags "-theme ${theme}"''} \
30 ${lib.optionalString (plugins != []) ''--add-flags "-plugin-path $out/lib/rofi"''}
32 ${lib.optionalString symlink-dmenu "ln -s ${rofi-unwrapped}/bin/rofi $out/bin/dmenu"}
34 rm $out/bin/rofi-theme-selector
35 makeWrapper ${rofi-unwrapped}/bin/rofi-theme-selector $out/bin/rofi-theme-selector \
36 --prefix XDG_DATA_DIRS : $out/share
39 meta = rofi-unwrapped.meta // {
40 priority = (rofi-unwrapped.meta.priority or lib.meta.defaultPriority) - 1;