programs: patch udev rules more effectively

This commit is contained in:
2024-12-09 23:13:22 +00:00
parent 9d20f55815
commit 13bc81fb6a

View File

@@ -342,8 +342,14 @@ let
done done
for d in $outdir/lib/udev/rules.d/*.rules; do for d in $outdir/lib/udev/rules.d/*.rules; do
# sandboxed path used as the first argument in a udev rule:
trySubstitute "$d" '"'"%s/$binLoc" trySubstitute "$d" '"'"%s/$binLoc"
trySubstitute "$d" '"'"%s/etc"
trySubstitute "$d" '"'"%s/share" trySubstitute "$d" '"'"%s/share"
# sandboxed path used as the n'th argument in a udev rule (e.g. RUN+="do-something /nix/store/.../etc/config")
trySubstitute "$d" ' '"%s/$binLoc"
trySubstitute "$d" ' '"%s/etc"
trySubstitute "$d" ' '"%s/share"
done done
for d in $outdir/lib/mozilla/native-messaging-hosts/*.json; do for d in $outdir/lib/mozilla/native-messaging-hosts/*.json; do