nixos-config/packages/tools/virtualisation/evdev-proxy/default.nix

41 lines
960 B
Nix

{
lib
, rustPlatform
, pkg-config, udev
, fetchFromGitHub
}:
rustPlatform.buildRustPackage rec {
pname = "evdev-proxy";
version = "0.1.1";
src = fetchFromGitHub {
owner = "PapaTutuWawa";
repo = "evdev-proxy";
rev = "32414604d776d488baa064fe355e297070406c4a";
sha256 = "sha256-wIl01UZ35P5T+lApGyqOFSLQeqBsgK/F4CCPGnCTQA4=";
};
cargoSha256 = "sha256-iM6q3TGS5XjbZGvQ85AmsMVjQW/JNS/T132kQHzDCE8=";
patches = [ ./add-evdev-selector.patch ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ udev ];
postInstall = ''
# Install udev rules
mkdir -p $out/lib/udev/rules.d/
cp 70-uinput-evdev-proxy.rules $out/lib/udev/rules.d/70-uinput-evdev-proxy.rules
'';
meta = with lib; {
description = "Creates virtual device to proxy evdev devices events";
homepage = "https://github.com/redrampage/evdev-proxy";
license = licenses.gpl3;
maintainers = [];
platforms = platforms.linux;
};
}