···2626 extraMakeFlags ? [],
2727 # The name of the kernel module directory
2828 # Needs to be X.Y.Z[-extra], so pad with zeros if needed.
2929- modDirVersion ? lib.versions.pad 3 version,
2929+ modDirVersion ? null /* derive from version */,
3030 # The kernel source (tarball, git checkout, etc.)
3131 src,
3232 # a list of { name=..., patch=..., extraConfig=...} patches
···5454}:
55555656let
5757+ # Provide defaults. Note that we support `null` so that callers don't need to use optionalAttrs,
5858+ # which can lead to unnecessary strictness and infinite recursions.
5959+ modDirVersion_ = if modDirVersion == null then lib.versions.pad 3 version else modDirVersion;
6060+in
6161+let
6262+ # Shadow the un-defaulted parameter; don't want null.
6363+ modDirVersion = modDirVersion_;
5764 inherit (lib)
5865 hasAttr getAttr optional optionals optionalString optionalAttrs maintainers platforms;
5966