summary refs log tree commit diff stats
path: root/rust/qmk-hid-com/src_c
diff options
context:
space:
mode:
Diffstat (limited to 'rust/qmk-hid-com/src_c')
-rw-r--r--rust/qmk-hid-com/src_c/contrib/lib/udev/rules.d/099-allow-hid.rules1
-rw-r--r--rust/qmk-hid-com/src_c/package.nix6
2 files changed, 7 insertions, 0 deletions
diff --git a/rust/qmk-hid-com/src_c/contrib/lib/udev/rules.d/099-allow-hid.rules b/rust/qmk-hid-com/src_c/contrib/lib/udev/rules.d/099-allow-hid.rules
new file mode 100644
index 0000000..c4fc74b
--- /dev/null
+++ b/rust/qmk-hid-com/src_c/contrib/lib/udev/rules.d/099-allow-hid.rules
@@ -0,0 +1 @@
+KERNEL=="hidraw4", SUBSYSTEM=="hidraw", ATTRS{idProduct}=="1969", ATTRS{idVendor}=="3297", TAG+="uaccess"
diff --git a/rust/qmk-hid-com/src_c/package.nix b/rust/qmk-hid-com/src_c/package.nix
index 17f84db..5089ebb 100644
--- a/rust/qmk-hid-com/src_c/package.nix
+++ b/rust/qmk-hid-com/src_c/package.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation {
       (type == "directory")
       || (builtins.elem (builtins.baseNameOf name) [
         "virtual-keyboard-unstable-v1.xml"
+        "099-allow-hid.rules"
       ])
       || (lib.strings.hasSuffix ".c" (builtins.baseNameOf name))
       || (lib.strings.hasSuffix ".h" (builtins.baseNameOf name))
@@ -41,6 +42,7 @@ stdenv.mkDerivation {
     b_pie = "false";
     c_std = "gnu2x";
   };
+
   # ar with gcc plugins for lto objects
   preConfigure = ''
     CC="gcc";
@@ -49,6 +51,10 @@ stdenv.mkDerivation {
     export CC AR RANLIB
   '';
 
+  postInstall = ''
+    install --mode=644 -D $src/contrib/lib/udev/rules.d/099-allow-hid.rules "$out/lib/udev/rules.d/19-allow-hid.rules"
+  '';
+
   strictDeps = true;
   nativeBuildInputs = [
     meson