Change:
Steps to reproduce the behavior: Tail of the build log The build failure seems related to these unused options. I tried removing the corresponding lines (in a local directory - so I changed my url to the filesystem path). in but it didn't fix anything. It seems that kernel 5.18 phased out some options. Instead of warning us, there's an explicit error. I have no idea how to fix this since is great for adding lines to the kernel config, but not great at removing them. <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. -- (I'm not exactly sure who to notify about this so I just kind of scanned s of and . Please let me know if there's someone more appropriate to notify.) Please run and paste the result. Not sure how to do this for this specific package (no ).
Can you check if fixes this?
. But, it still fails:
Should be fixed by
I can confirm that fixes this! Thanks !

Discussion:
# Necessary for BTF DEBUG_INFO                = mkMerge [ (whenOlder "5.2" (if (features.debug or false) then yes else no)) <del> (whenAtLeast "5.2" yes) </del> <ins> (whenBetween "5.2" "5.18" yes) </ins> ]; <ins> DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT = whenAtLeast "5.18" yes; </ins> DEBUG_INFO_BTF            = whenAtLeast "5.2" (option yes); BPF_LSM                   = whenAtLeast "5.7" (option yes); DEBUG_KERNEL              = yes;

UDF_FS              = module; NFSD_V2_ACL            = yes; <del> NFSD_V3                = yes; </del> <ins> NFSD_V3                = whenOlder "5.18" yes; </ins> NFSD_V3_ACL            = yes; NFSD_V4                = yes; NFSD_V4_SECURITY_LABEL = yes;

<ins> { lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, modDirVersionArg ? null, ... } @ args: with lib; buildLinux (args // rec { version = "5.18"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; # branchVersion needs to be x.y extraMeta.branch = versions.majorMinor version; src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; sha256 = "1vjwhl4s8qxfg1aabn8xnpjza3qzrjcp5450h9qpjvl999lg3wsi"; }; } // (args.argsOverride or { })) </ins>

linuxPackages_5_15 = linuxKernel.packages.linux_5_15; linuxPackages_5_16 = linuxKernel.packages.linux_5_16; linuxPackages_5_17 = linuxKernel.packages.linux_5_17; <ins> linuxPackages_5_18 = linuxKernel.packages.linux_5_18; </ins> linuxPackages_5_4 = linuxKernel.packages.linux_5_4; linuxPackages_hardkernel_4_14 = linuxKernel.packages.hardkernel_4_14; linuxPackages_rpi0 = linuxKernel.packages.linux_rpi1;

linux_5_15 = linuxKernel.kernels.linux_5_15; linux_5_16 = linuxKernel.kernels.linux_5_16; linux_5_17 = linuxKernel.kernels.linux_5_17; <ins> linux_5_18 = linuxKernel.kernels.linux_5_18; </ins> linux_5_4 = linuxKernel.kernels.linux_5_4; linux_mptcp_95 = linuxKernel.kernels.linux_mptcp_95; linux_rpi0 = linuxKernel.kernels.linux_rpi1;

]; }; <ins> linux_5_18 = callPackage ../os-specific/linux/kernel/linux-5.18.nix { kernelPatches = [ kernelPatches.bridge_stp_helper kernelPatches.request_key_helper ]; }; </ins> linux_testing = let testing = callPackage ../os-specific/linux/kernel/linux-testing.nix { kernelPatches = [

linux_5_15 = recurseIntoAttrs (packagesFor kernels.linux_5_15); linux_5_16 = throw "linux 5.16 was removed because it reached its end of life upstream"; # Added 2022-04-23 linux_5_17 = recurseIntoAttrs (packagesFor kernels.linux_5_17); <ins> linux_5_18 = recurseIntoAttrs (packagesFor kernels.linux_5_18); </ins> }; rtPackages = {

packageAliases = { linux_default = if stdenv.hostPlatform.isi686 then packages.linux_5_10 else packages.linux_5_15; # Update this when adding the newest kernel major version! <del> linux_latest = packages.linux_5_17; </del> <ins> linux_latest = packages.linux_5_18; </ins> linux_mptcp = packages.linux_mptcp_95; linux_rt_default = packages.linux_rt_5_4; linux_rt_latest = packages.linux_rt_5_10;