nixpkgs/pkgs/by-name/in/inputplug/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

41 lines
944 B
Nix

{ fetchCrate
, installShellFiles
, lib
, libbsd
, pkg-config
, rustPlatform
, stdenv
}:
rustPlatform.buildRustPackage rec {
pname = "inputplug";
version = "0.4.0";
src = fetchCrate {
inherit pname version;
hash = "sha256-8Gy0h0QMcittnjuKm+atIJNsY2d6Ua29oab4fkUU+wE=";
};
nativeBuildInputs = [ installShellFiles pkg-config ];
buildInputs = [ libbsd ];
cargoHash = "sha256-W6LvdjR3jTf08X75wPWloLx7FUYTpboB3E5f0g75M5g=";
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;
platforms = platforms.unix;
# `daemon(3)` is deprecated on macOS and `pidfile-rs` needs updating
broken = stdenv.hostPlatform.isDarwin;
maintainers = with maintainers; [ jecaro ];
mainProgram = "inputplug";
};
}