1 { lib, stdenv, fetchFromGitHub, makeWrapper,
2 libinput, wmctrl, python3,
3 coreutils, xdotool ? null,
4 extraUtilsPath ? lib.optional (xdotool != null) xdotool
6 stdenv.mkDerivation rec {
7 pname = "libinput-gestures";
10 src = fetchFromGitHub {
12 repo = "libinput-gestures";
14 sha256 = "sha256-dtCe3//BMC+FG50qyxVz0ni6nmAPYMPOv13VQTxhls4=";
17 ./0001-hardcode-name.patch
21 nativeBuildInputs = [ makeWrapper ];
22 buildInputs = [ python3 ];
26 substituteInPlace libinput-gestures-setup --replace /usr/ /
28 substituteInPlace libinput-gestures \
29 --replace /etc "$out/etc" \
30 --subst-var-by libinput "${libinput}/bin/libinput" \
31 --subst-var-by wmctrl "${wmctrl}/bin/wmctrl"
36 ${stdenv.shell} libinput-gestures-setup -d "$out" install
41 rm "$out/bin/libinput-gestures-setup"
42 substituteInPlace "$out/share/systemd/user/libinput-gestures.service" --replace "/usr" "$out"
43 substituteInPlace "$out/share/applications/libinput-gestures.desktop" --replace "/usr" "$out"
44 chmod +x "$out/share/applications/libinput-gestures.desktop"
45 wrapProgram "$out/bin/libinput-gestures" --prefix PATH : "${lib.makeBinPath ([coreutils] ++ extraUtilsPath)}"
49 homepage = "https://github.com/bulletmark/libinput-gestures";
50 description = "Gesture mapper for libinput";
51 license = licenses.gpl3Plus;
52 platforms = platforms.linux;
53 maintainers = with maintainers; [ teozkr ];