From 4cab70b1295ada831b38cd9ef5f15c77cc6b6e85 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 30 Dec 2024 19:24:37 +0100 Subject: feat(qmk_unicode_type): Include udev rules --- rust/qmk-hid-com/contrib/lib/udev/rules.d/099-allow-hid.rules | 1 - rust/qmk-hid-com/src_c/contrib/lib/udev/rules.d/099-allow-hid.rules | 1 + rust/qmk-hid-com/src_c/package.nix | 6 ++++++ 3 files changed, 7 insertions(+), 1 deletion(-) delete mode 100644 rust/qmk-hid-com/contrib/lib/udev/rules.d/099-allow-hid.rules create mode 100644 rust/qmk-hid-com/src_c/contrib/lib/udev/rules.d/099-allow-hid.rules diff --git a/rust/qmk-hid-com/contrib/lib/udev/rules.d/099-allow-hid.rules b/rust/qmk-hid-com/contrib/lib/udev/rules.d/099-allow-hid.rules deleted file mode 100644 index c4fc74b..0000000 --- a/rust/qmk-hid-com/contrib/lib/udev/rules.d/099-allow-hid.rules +++ /dev/null @@ -1 +0,0 @@ -KERNEL=="hidraw4", SUBSYSTEM=="hidraw", ATTRS{idProduct}=="1969", ATTRS{idVendor}=="3297", TAG+="uaccess" 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 -- cgit 1.4.1