surface-control: Fix udev rule
This commit is contained in:
parent
ff47345fa6
commit
d311ebb152
@ -0,0 +1,9 @@
|
|||||||
|
diff --git a/etc/udev/40-surface-control.rules b/etc/udev/40-surface-control.rules
|
||||||
|
index db90d63..f5857c8 100644
|
||||||
|
--- a/etc/udev/40-surface-control.rules
|
||||||
|
+++ b/etc/udev/40-surface-control.rules
|
||||||
|
@@ -1,2 +1,2 @@
|
||||||
|
-KERNEL=="01:03:01:00:01", SUBSYSTEM=="surface_aggregator", RUN+="/usr/bin/chmod 664 /sys/bus/surface_aggregator/devices/01:03:01:00:01/perf_mode"
|
||||||
|
-KERNEL=="01:03:01:00:01", SUBSYSTEM=="surface_aggregator", RUN+="/usr/bin/chown root:surface-control /sys/bus/surface_aggregator/devices/01:03:01:00:01/perf_mode"
|
||||||
|
+KERNEL=="01:03:01:00:01", SUBSYSTEM=="surface_aggregator", RUN+="@CHMODBINARY@ 664 /sys/bus/surface_aggregator/devices/01:03:01:00:01/perf_mode"
|
||||||
|
+KERNEL=="01:03:01:00:01", SUBSYSTEM=="surface_aggregator", RUN+="@CHMODBINARY@ root:surface-control /sys/bus/surface_aggregator/devices/01:03:01:00:01/perf_mode"
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
lib
|
lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, rustPlatform
|
, rustPlatform, coreutils
|
||||||
, pkg-config, udev
|
, pkg-config, udev
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -16,6 +16,8 @@ rustPlatform.buildRustPackage rec {
|
|||||||
sha256 = "0606imcz38kcfxcjs00j3va7j7i8fzr4mcspyh5d6jrwwgl1xjxb";
|
sha256 = "0606imcz38kcfxcjs00j3va7j7i8fzr4mcspyh5d6jrwwgl1xjxb";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./0000-nixos-chmod.patch ];
|
||||||
|
|
||||||
cargoSha256 = "1yqwaba1rkm3kw1py87j23q4jbdhdsx6fmqidzxgqhr7awrq763y";
|
cargoSha256 = "1yqwaba1rkm3kw1py87j23q4jbdhdsx6fmqidzxgqhr7awrq763y";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
@ -24,6 +26,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/lib/udev/rules.d/
|
mkdir -p $out/lib/udev/rules.d/
|
||||||
cp etc/udev/40-surface-control.rules $out/lib/udev/rules.d/40-surface-control.rules
|
cp etc/udev/40-surface-control.rules $out/lib/udev/rules.d/40-surface-control.rules
|
||||||
|
sed -e "s|@CHMODBINARY@|${coreutils}/bin/chmod|g" --in-place $out/lib/udev/rules.d/40-surface-control.rules
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user