python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / inputmethods / libinput-gestures / default.nix
blobd36f20511613deefc793e1d59c76a3a903ddb193
1 { lib, stdenv, fetchFromGitHub, makeWrapper,
2   libinput, wmctrl, python3,
3   coreutils, xdotool ? null,
4   extraUtilsPath ? lib.optional (xdotool != null) xdotool
5 }:
6 stdenv.mkDerivation rec {
7   pname = "libinput-gestures";
8   version = "2.73";
10   src = fetchFromGitHub {
11     owner = "bulletmark";
12     repo = "libinput-gestures";
13     rev = version;
14     sha256 = "sha256-dtCe3//BMC+FG50qyxVz0ni6nmAPYMPOv13VQTxhls4=";
15   };
16   patches = [
17     ./0001-hardcode-name.patch
18     ./0002-paths.patch
19   ];
21   nativeBuildInputs = [ makeWrapper ];
22   buildInputs = [ python3 ];
24   postPatch =
25     ''
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"
32     '';
33   installPhase =
34     ''
35       runHook preInstall
36       ${stdenv.shell} libinput-gestures-setup -d "$out" install
37       runHook postInstall
38     '';
39   postFixup =
40     ''
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)}"
46     '';
48   meta = with lib; {
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 ];
54   };