Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1# shellcheck shell=bash 2 3udevCheckHook() { 4 runHook preUdevCheck 5 echo Executing udevCheckPhase 6 7 # as per nixos/modules/services/hardware/udev.nix: 8 # - both /lib and /etc is valid paths for udev rules 9 # - udev rules are expected to be part of the $bin output 10 # However, not all udev rules are actually in $bin (some are in $lib or $out). 11 # This means we have to actually check all outputs here. 12 for output in $(getAllOutputNames); do 13 for path in etc lib ; do 14 if [ -d "${!output}/$path/udev/rules.d" ]; then 15 @udevadm@ verify --resolve-names=never --no-style "${!output}/$path/udev/rules.d" 16 fi 17 done 18 done 19 20 runHook postUdevCheck 21 echo Finished udevCheckPhase 22} 23 24if [[ -z "${dontUdevCheck-}" && -n "@udevadm@" ]]; then 25 echo "Using udevCheckHook" 26 preInstallCheckHooks+=(udevCheckHook) 27fi