···26 extraMakeFlags ? [],
27 # The name of the kernel module directory
28 # Needs to be X.Y.Z[-extra], so pad with zeros if needed.
29- modDirVersion ? lib.versions.pad 3 version,
30 # The kernel source (tarball, git checkout, etc.)
31 src,
32 # a list of { name=..., patch=..., extraConfig=...} patches
···54}:
5556let
000000057 inherit (lib)
58 hasAttr getAttr optional optionals optionalString optionalAttrs maintainers platforms;
59
···26 extraMakeFlags ? [],
27 # The name of the kernel module directory
28 # Needs to be X.Y.Z[-extra], so pad with zeros if needed.
29+ modDirVersion ? null /* derive from version */,
30 # The kernel source (tarball, git checkout, etc.)
31 src,
32 # a list of { name=..., patch=..., extraConfig=...} patches
···54}:
5556let
57+ # Provide defaults. Note that we support `null` so that callers don't need to use optionalAttrs,
58+ # which can lead to unnecessary strictness and infinite recursions.
59+ modDirVersion_ = if modDirVersion == null then lib.versions.pad 3 version else modDirVersion;
60+in
61+let
62+ # Shadow the un-defaulted parameter; don't want null.
63+ modDirVersion = modDirVersion_;
64 inherit (lib)
65 hasAttr getAttr optional optionals optionalString optionalAttrs maintainers platforms;
66