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

41 lines
960 B
Nix
Raw Normal View History

2022-02-02 11:08:03 +00:00
{
lib
, rustPlatform
2022-10-15 14:25:00 +00:00
, pkg-config, udev
2022-02-02 11:08:03 +00:00
, fetchFromGitHub
}:
2021-09-03 12:49:09 +00:00
2022-02-02 11:08:03 +00:00
rustPlatform.buildRustPackage rec {
2021-09-03 12:49:09 +00:00
pname = "evdev-proxy";
version = "0.1.1";
2022-02-02 11:08:03 +00:00
src = fetchFromGitHub {
owner = "PapaTutuWawa";
repo = "evdev-proxy";
rev = "32414604d776d488baa064fe355e297070406c4a";
sha256 = "sha256-wIl01UZ35P5T+lApGyqOFSLQeqBsgK/F4CCPGnCTQA4=";
2021-09-03 12:49:09 +00:00
};
2022-02-02 11:08:03 +00:00
cargoSha256 = "sha256-iM6q3TGS5XjbZGvQ85AmsMVjQW/JNS/T132kQHzDCE8=";
2021-09-03 12:49:09 +00:00
patches = [ ./add-evdev-selector.patch ];
2022-10-15 14:25:00 +00:00
nativeBuildInputs = [ pkg-config ];
2021-09-03 12:49:09 +00:00
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;
};
}