diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index cd3fc4a73b21..0121686b086a 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -24,6 +24,8 @@ let overridableKernel = lib.makeOverridable ( # The kernel source tarball. { + pname ? "linux", + src, # The kernel version. @@ -96,25 +98,6 @@ let # files. let - # Dirty hack to make sure that `version` & `src` have - # `` as position - # when using `builtins.unsafeGetAttrPos`. - # - # This is to make sure that ofborg actually detects changes in the kernel derivation - # and pings all maintainers. - # - # For further context, see https://github.com/NixOS/nixpkgs/pull/143113#issuecomment-953319957 - basicArgs = removeAttrs args ( - lib.filter ( - x: - !(builtins.elem x [ - "version" - "pname" - "src" - ]) - ) (lib.attrNames args) - ); - # Combine the `features' attribute sets of all the kernel patches. kernelFeatures = lib.foldr (x: y: (x.features or { }) // y) ( { @@ -298,26 +281,25 @@ let }; }; # end of configfile derivation - kernel = (callPackage ./manual-config.nix { inherit lib stdenv buildPackages; }) ( - basicArgs - // { - inherit - kernelPatches - randstructSeed - extraMakeFlags - extraMeta - configfile - modDirVersion - ; - pos = builtins.unsafeGetAttrPos "version" args; + kernel = (callPackage ./manual-config.nix { inherit lib stdenv buildPackages; }) { + inherit + pname + version + src + kernelPatches + randstructSeed + extraMakeFlags + extraMeta + configfile + modDirVersion + ; - config = { - CONFIG_MODULES = "y"; - CONFIG_FW_LOADER = "y"; - CONFIG_RUST = if withRust then "y" else "n"; - }; - } - ); + config = { + CONFIG_MODULES = "y"; + CONFIG_FW_LOADER = "y"; + CONFIG_RUST = if withRust then "y" else "n"; + }; + }; in kernel.overrideAttrs ( @@ -326,7 +308,6 @@ let passthru = previousAttrs.passthru or { } // extraPassthru - // basicArgs // { features = kernelFeatures; inherit diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 807fd00e504f..0839eaa9fdd9 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -51,8 +51,6 @@ lib.makeOverridable ( version, # The kernel pname (should be set for variants) pname ? "linux", - # Position of the Linux build expression - pos ? null, # Additional kernel make flags extraMakeFlags ? [ ], # The name of the kernel module directory @@ -551,8 +549,6 @@ lib.makeOverridable ( karch = stdenv.hostPlatform.linuxArch; - pos = lib.optionalDrvAttr (pos != null) pos; - meta = { # https://github.com/NixOS/nixpkgs/pull/345534#issuecomment-2391238381 broken = withRust && lib.versionOlder version "6.12";