2021-08-25 08:27:29 +00:00
|
|
|
{ fetchCrate
|
|
|
|
, installShellFiles
|
|
|
|
, lib
|
|
|
|
, libbsd
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
2023-10-09 19:29:22 +00:00
|
|
|
, stdenv
|
2021-08-25 08:27:29 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "inputplug";
|
|
|
|
version = "0.4.0";
|
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-8Gy0h0QMcittnjuKm+atIJNsY2d6Ua29oab4fkUU+wE=";
|
2021-08-25 08:27:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ libbsd ];
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
cargoHash = "sha256-W6LvdjR3jTf08X75wPWloLx7FUYTpboB3E5f0g75M5g=";
|
2021-08-25 08:27:29 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage inputplug.1
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Monitor XInput events and run arbitrary scripts on hierarchy change events";
|
|
|
|
homepage = "https://github.com/andrewshadura/inputplug";
|
|
|
|
license = licenses.mit;
|
2023-10-09 19:29:22 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
# `daemon(3)` is deprecated on macOS and `pidfile-rs` needs updating
|
|
|
|
broken = stdenv.isDarwin;
|
2021-08-25 08:27:29 +00:00
|
|
|
maintainers = with maintainers; [ jecaro ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "inputplug";
|
2021-08-25 08:27:29 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|