diff --git a/packages/ch57x-keyboard-tool.nix b/packages/ch57x-keyboard-tool.nix index 6cf8270..7b64eb2 100644 --- a/packages/ch57x-keyboard-tool.nix +++ b/packages/ch57x-keyboard-tool.nix @@ -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 = {