mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
brscan5: remove deprecated SYSFS udev rule
This patch resolves an issue where systemd-udevd outputs events like:
/nix/store/jm9paymkapbi6pzwbjgmi634vaf2y5va-udev-rules/49-brother-mfp-brscan5-1.0.2-2.rules:17 Invalid key 'SYSFS'.
(cherry picked from commit ff62fe4136)
This commit is contained in:
committed by
github-actions[bot]
parent
8ff79da307
commit
7c33418bb0
@@ -48,6 +48,10 @@ import ./make-test-python.nix (
|
||||
print(scanimage)
|
||||
assert """device `brother5:net1;dev0' is a Brother b ADS-1200""" in scanimage
|
||||
assert """device `brother5:net1;dev1' is a Brother a ADS-1200""" in scanimage
|
||||
|
||||
# Confirm systemd-udevd no longer logs errors about SYSFS
|
||||
logs = machine.succeed('journalctl --unit systemd-udevd')
|
||||
assert "Invalid key 'SYSFS'" not in logs
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
||||
@@ -79,6 +79,9 @@ stdenv.mkDerivation rec {
|
||||
# driver is hardcoded to look in /opt/brother/scanner/brscan5/models for model metadata.
|
||||
# patch it to look in /etc/opt/brother/scanner/models instead, so nixos environment.etc can make it available
|
||||
printf '/etc/opt/brother/scanner/models\x00' | dd of=opt/brother/scanner/brscan5/libsane-brother5.so.1.0.7 bs=1 seek=${toString patchOffsetBytes} conv=notrunc
|
||||
|
||||
# remove deprecated SYSFS udev rule
|
||||
sed -i -e '/^SYSFS/d' opt/brother/scanner/brscan5/udev-rules/*.rules
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
||||
Reference in New Issue
Block a user