Commit 899b1ed4 authored by Julien DIOT's avatar Julien DIOT Committed by Cole Helbling
Browse files

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`.
parent 3e8d4e7e
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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