lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

udevCheckHook: guard platform

It is technically possible to guard all udevCheckHook usages behind
`lib.optionals (lib.meta.availableOn stdenv.buildPlatform systemdMinimal)`.

However, doing this is hard to read, clunky, and hard to discover.
*Not* doing such a guard would mean cross-compilation darwin -> linux breaks.
The workaround here is to just accept any udev rules if they can't be properly checked.

Grimmauld 1461a840 efb042f5

+11 -3
+1 -1
pkgs/by-name/ud/udevCheckHook/hook.sh
··· 21 21 echo Finished udevCheckPhase 22 22 } 23 23 24 - if [[ -z "${dontUdevCheck-}" ]]; then 24 + if [[ -z "${dontUdevCheck-}" && -n "@udevadm@" ]]; then 25 25 echo "Using udevCheckHook" 26 26 preInstallCheckHooks+=(udevCheckHook) 27 27 fi
+10 -2
pkgs/by-name/ud/udevCheckHook/package.nix
··· 2 2 lib, 3 3 makeSetupHook, 4 4 systemdMinimal, 5 + udev, 6 + stdenv, 5 7 }: 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 7 15 makeSetupHook { 8 16 name = "udev-check-hook"; 9 17 substitutions = { 10 - udevadm = lib.getExe' systemdMinimal "udevadm"; 18 + udevadm = if applyHook then lib.getExe' systemdMinimal "udevadm" else ""; 11 19 }; 12 20 meta = { 13 21 description = "check validity of udev rules in outputs";