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`.
This commit is contained in:
Julien DIOT 2024-03-26 19:42:43 +09:00 committed by Cole Helbling
parent 3e8d4e7ea0
commit 899b1ed417
1 changed files with 9 additions and 1 deletions

View File

@ -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