From f7ac029a1dec02245c057f967a324b7e3eecd5fb Mon Sep 17 00:00:00 2001 From: Samir Hafez Date: Sun, 21 Mar 2021 22:52:17 +0000 Subject: [PATCH] rofi: Add option to symlink dmenu (#107146) Co-authored-by: Sandro --- pkgs/applications/misc/rofi/wrapper.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/rofi/wrapper.nix b/pkgs/applications/misc/rofi/wrapper.nix index 6115544e79f..2f98fe16416 100644 --- a/pkgs/applications/misc/rofi/wrapper.nix +++ b/pkgs/applications/misc/rofi/wrapper.nix @@ -1,4 +1,4 @@ -{ symlinkJoin, lib, rofi-unwrapped, makeWrapper, wrapGAppsHook, gdk-pixbuf, hicolor-icon-theme, theme ? null, plugins ? [] }: +{ symlinkJoin, lib, rofi-unwrapped, makeWrapper, wrapGAppsHook, gdk-pixbuf, hicolor-icon-theme, theme ? null, plugins ? [], symlink-dmenu ? false }: symlinkJoin { name = "rofi-${rofi-unwrapped.version}"; @@ -29,6 +29,8 @@ symlinkJoin { ${lib.optionalString (theme != null) ''--add-flags "-theme ${theme}"''} \ ${lib.optionalString (plugins != []) ''--add-flags "-plugin-path $out/lib/rofi"''} + ${lib.optionalString symlink-dmenu "ln -s ${rofi-unwrapped}/bin/rofi $out/bin/dmenu"} + rm $out/bin/rofi-theme-selector makeWrapper ${rofi-unwrapped}/bin/rofi-theme-selector $out/bin/rofi-theme-selector \ --prefix XDG_DATA_DIRS : $out/share