ch57x-keyboard-tool: Add udev rules
This commit is contained in:
parent
0dc339825b
commit
0d4ab4220a
1 changed files with 10 additions and 0 deletions
|
@ -2,8 +2,14 @@
|
|||
, lib
|
||||
, nix-update-script
|
||||
, rustPlatform
|
||||
, writeText
|
||||
}:
|
||||
|
||||
let
|
||||
rules = writeText "ch57x-udev-rules" ''
|
||||
ATTRS{idVendor}=="1189", ATTRS{idProduct}=="8890", MODE="0660", TAG+="uaccess"
|
||||
'';
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ch57x-keyboard-tool";
|
||||
version = "1.1.0";
|
||||
|
@ -14,6 +20,10 @@ rustPlatform.buildRustPackage rec {
|
|||
};
|
||||
cargoHash = "sha256-Jt2pwpPuc9MbS82jCxhFeJpHt0D3VZWYEU0MWporUO8=";
|
||||
|
||||
postInstall = ''
|
||||
install -D ${rules} $out/etc/udev/rules.d/70-ch57x.rules
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
|
|
Loading…
Reference in a new issue