Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions nixos/tests/brscan5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can now be replaced by adding the new udev setup hook to the derivation's native build inputs.
See #407629

'';
}
)
3 changes: 3 additions & 0 deletions pkgs/by-name/br/brscan5/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down