diff options
author | Yueh-Shun Li <shamrocklee@posteo.net> | 2024-02-06 23:44:49 +0000 |
---|---|---|
committer | Yueh-Shun Li <shamrocklee@posteo.net> | 2024-02-10 22:03:53 +0800 |
commit | f10331cf2e8ebe5125f7890769861545d91a6690 (patch) | |
tree | a911ba7ccac6d63f139cf984ca85628aecd5e971 /pkgs/os-specific/linux/kernel/generic.nix | |
parent | ae5c332cbb5827f6b1f02572496b141021de335f (diff) |
buildLinux: passthru by <pkg>.overrideAttrs instead of lib.extendDerivation
Diffstat (limited to 'pkgs/os-specific/linux/kernel/generic.nix')
-rw-r--r-- | pkgs/os-specific/linux/kernel/generic.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index a2f80505cd95d..58b7b96fbf21c 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -212,7 +212,10 @@ let config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; } // lib.optionalAttrs withRust { CONFIG_RUST = "y"; }; } // lib.optionalAttrs (modDirVersion != null) { inherit modDirVersion; }); - passthru = basicArgs // { +in +kernel.overrideAttrs (finalAttrs: previousAttrs: { + + passthru = previousAttrs.passthru or { } // basicArgs // { features = kernelFeatures; inherit commonStructuredConfig structuredExtraConfig extraMakeFlags isZen isHardened isLibre; isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true; @@ -225,9 +228,8 @@ let ]); }); - passthru = kernel.passthru // (removeAttrs passthru [ "passthru" ]); tests = let - overridableKernel = finalKernel // { + overridableKernel = finalAttrs.finalPackage // { override = args: lib.warn ( "override is stubbed for NixOS kernel tests, not applying changes these arguments: " @@ -237,5 +239,4 @@ let in [ (nixosTests.kernel-generic.passthru.testsForKernel overridableKernel) ] ++ kernelTests; }; - finalKernel = lib.extendDerivation true passthru kernel; -in finalKernel +}) |