btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / in / inputplug / package.nix
blobc14ff710d4a7ff92124d351cb1cb9785e5ddc34b
1 { fetchCrate
2 , installShellFiles
3 , lib
4 , libbsd
5 , pkg-config
6 , rustPlatform
7 , stdenv
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "inputplug";
12   version = "0.4.0";
14   src = fetchCrate {
15     inherit pname version;
16     hash = "sha256-8Gy0h0QMcittnjuKm+atIJNsY2d6Ua29oab4fkUU+wE=";
17   };
19   nativeBuildInputs = [ installShellFiles pkg-config ];
21   buildInputs = [ libbsd ];
23   cargoHash = "sha256-W6LvdjR3jTf08X75wPWloLx7FUYTpboB3E5f0g75M5g=";
25   postInstall = ''
26     installManPage inputplug.1
27   '';
29   meta = with lib; {
30     description = "Monitor XInput events and run arbitrary scripts on hierarchy change events";
31     homepage = "https://github.com/andrewshadura/inputplug";
32     license = licenses.mit;
33     platforms = platforms.unix;
34     # `daemon(3)` is deprecated on macOS and `pidfile-rs` needs updating
35     broken = stdenv.hostPlatform.isDarwin;
36     maintainers = with maintainers; [ jecaro ];
37     mainProgram = "inputplug";
38   };