Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / mo / mouse-actions / package.nix
blob652c5ed4243f1a7911300b1a7c0f513c5f7501f9
1 { lib
2 , fetchFromGitHub
3 , rustPlatform
4 , pkg-config
5 , libX11
6 , libXi
7 , libXtst
8 , libevdev
9 }:
11 rustPlatform.buildRustPackage rec {
12   pname = "mouse-actions";
13   version = "0.4.4";
15   src = fetchFromGitHub {
16     owner = "jersou";
17     repo = "mouse-actions";
18     rev = "v${version}";
19     hash = "sha256-02E4HrKIoBV3qZPVH6Tjz9Bv/mh5C8amO1Ilmd+YO5g=";
20   };
22   cargoHash = "sha256-5SUVZlrXIPtlu9KBzucZDCp5t5t8Z4/Nfht2Pw5agVI=";
24   buildInputs = [
25     libX11
26     libXi
27     libXtst
28     libevdev
29   ];
31   nativeBuildInputs = [
32     pkg-config
33   ];
35   postInstall = ''
36     mkdir -p $out/etc/udev/rules.d/
37     echo 'KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput"' >> $out/etc/udev/rules.d/80-mouse-actions.rules
38     echo 'KERNEL=="/dev/input/event*", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput"' >> $out/etc/udev/rules.d/80-mouse-actions.rules
39   '';
41   meta = with lib; {
42     description = "Execute commands from mouse events such as clicks/wheel on the side/corners of the screen, or drawing shapes";
43     homepage = "https://github.com/jersou/mouse-actions";
44     license = licenses.mit;
45     maintainers = with maintainers; [ rgri ];
46     mainProgram = "mouse-actions";
47     platforms = platforms.linux;
48   };