File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
pkgs/by-name/ud/udevCheckHook Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ udevCheckHook() {
2121 echo Finished udevCheckPhase
2222}
2323
24- if [[ -z " ${dontUdevCheck-} " ]]; then
24+ if [[ -z " ${dontUdevCheck-} " && -n " @udevadm@ " ]]; then
2525 echo " Using udevCheckHook"
2626 preInstallCheckHooks+=(udevCheckHook)
2727fi
Original file line number Diff line number Diff line change 22 lib ,
33 makeSetupHook ,
44 systemdMinimal ,
5+ udev ,
6+ stdenv ,
57} :
6-
8+ let
9+ # udev rules can only be checked if systemd (specifically, 'udevadm') can be executed on build platform
10+ # if udev is not available on hostPlatform, there is no point in checking rules
11+ applyHook =
12+ lib . meta . availableOn stdenv . hostPlatform udev
13+ && lib . meta . availableOn stdenv . buildPlatform systemdMinimal ;
14+ in
715makeSetupHook {
816 name = "udev-check-hook" ;
917 substitutions = {
10- udevadm = lib . getExe' systemdMinimal "udevadm" ;
18+ udevadm = if applyHook then lib . getExe' systemdMinimal "udevadm" else " ";
1119 } ;
1220 meta = {
1321 description = "check validity of udev rules in outputs" ;
You can’t perform that action at this time.
0 commit comments