diff --git a/nixos/tests/brscan5.nix b/nixos/tests/brscan5.nix index ba1916e27d26..f61228bac41e 100644 --- a/nixos/tests/brscan5.nix +++ b/nixos/tests/brscan5.nix @@ -48,10 +48,6 @@ 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 ''; } ) diff --git a/pkgs/by-name/br/brscan5/package.nix b/pkgs/by-name/br/brscan5/package.nix index 01a36caff2ab..688d12caa454 100644 --- a/pkgs/by-name/br/brscan5/package.nix +++ b/pkgs/by-name/br/brscan5/package.nix @@ -9,6 +9,7 @@ glib, libredirect, nixosTests, + udevCheckHook, }: let myPatchElf = file: '' @@ -43,6 +44,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper patchelf + udevCheckHook ]; buildInputs = [ libusb1 @@ -114,7 +116,7 @@ stdenv.mkDerivation rec { echo "brother5" > $out/etc/sane.d/dll.d/brother5.conf mkdir -p $out/etc/udev/rules.d - cp -p $PATH_TO_BRSCAN5/udev-rules/NN-brother-mfp-brscan5-1.0.2-2.rules \ + install -m 0444 $PATH_TO_BRSCAN5/udev-rules/NN-brother-mfp-brscan5-1.0.2-2.rules \ $out/etc/udev/rules.d/49-brother-mfp-brscan5-1.0.2-2.rules ETCDIR=$out/etc/opt/brother/scanner/brscan5 @@ -124,6 +126,9 @@ stdenv.mkDerivation rec { runHook postInstall ''; + # We want to run the udevCheckHook + doInstallCheck = true; + dontPatchELF = true; passthru.tests = { inherit (nixosTests) brscan5; };