From 899b1ed417cf21da5e33cca9b4c5e2bce8ecb301 Mon Sep 17 00:00:00 2001 From: Julien DIOT Date: Tue, 26 Mar 2024 19:42:43 +0900 Subject: [PATCH] rofi-emoji: fix missing dependencies xdotools wtype When trying to insert an emoji, and error notification raises: `Could not find any tool to handle insertion. Please install xdotool or wtype.` This commit add those missing dependencies. To control which of these tools should be installed (one is for x11 and the other for wayland) 2 derivations arguments have been created: `x11Support` and `waylandSupport` defaulting to `true`. --- pkgs/applications/misc/rofi-emoji/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/rofi-emoji/default.nix b/pkgs/applications/misc/rofi-emoji/default.nix index 921ba4ddd9b3..ac8518e6a2d4 100644 --- a/pkgs/applications/misc/rofi-emoji/default.nix +++ b/pkgs/applications/misc/rofi-emoji/default.nix @@ -6,6 +6,9 @@ , autoreconfHook , pkg-config +, waylandSupport ? true +, x11Support ? true + , cairo , glib , libnotify @@ -13,6 +16,8 @@ , wl-clipboard , xclip , xsel +, xdotool +, wtype }: stdenv.mkDerivation rec { @@ -38,9 +43,12 @@ stdenv.mkDerivation rec { postFixup = '' chmod +x $out/share/rofi-emoji/clipboard-adapter.sh wrapProgram $out/share/rofi-emoji/clipboard-adapter.sh \ - --prefix PATH ":" ${lib.makeBinPath [ libnotify wl-clipboard xclip xsel ]} + --prefix PATH ":" ${lib.makeBinPath ([ libnotify wl-clipboard xclip xsel ] + ++ lib.optionals waylandSupport [ wtype ] + ++ lib.optionals x11Support [ xdotool ])} ''; + nativeBuildInputs = [ autoreconfHook pkg-config