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

35 lines
874 B
Nix
Raw Normal View History

2021-09-03 12:49:09 +00:00
{ lib, rustPlatform,
pkgconfig, udev }:
rustPlatform.buildRustPackage {
pname = "evdev-proxy";
version = "0.1.1";
src = builtins.fetchGit {
url = "https://github.com/redrampage/evdev-proxy.git";
ref = "a21092a7b52144c3bb2b630704c990cee24cb745";
};
cargoSha256 = "18y3pjkiwqpwkwrn5dbkn4rdj86c96h6i2b9ih73jajlw1xli1qy";
patches = [ ./add-evdev-selector.patch ];
nativeBuildInputs = [ pkgconfig ];
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;
};
}