1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00

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

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