···2 lib,
3 makeSetupHook,
4 systemdMinimal,
5- udev,
6 stdenv,
7}:
8let
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;
0014in
15makeSetupHook {
16 name = "udev-check-hook";
···2 lib,
3 makeSetupHook,
4 systemdMinimal,
05 stdenv,
6}:
7let
8 # udev rules can only be checked if systemd (specifically, 'udevadm') can be executed on build platform
9+ # If cross-compiling linux -> non-linux, udev rules are still checked, even if they end up being unused.
10+ # This is not a problem:
11+ # - If there are no udev rules, the hook is a noop
12+ # - If the udev rules are broken, they should be flagged as such
13+ # - if rules are not needed on a target platform where they are broken, they should be deleted from package output
14+ applyHook = lib.meta.availableOn stdenv.buildPlatform systemdMinimal;
15in
16makeSetupHook {
17 name = "udev-check-hook";