mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-24 01:21:11 +00:00
buildLinux: passthru by <pkg>.overrideAttrs instead of lib.extendDerivation
This commit is contained in:
@@ -212,7 +212,10 @@ let
|
|||||||
config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; } // lib.optionalAttrs withRust { CONFIG_RUST = "y"; };
|
config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; } // lib.optionalAttrs withRust { CONFIG_RUST = "y"; };
|
||||||
} // lib.optionalAttrs (modDirVersion != null) { inherit modDirVersion; });
|
} // lib.optionalAttrs (modDirVersion != null) { inherit modDirVersion; });
|
||||||
|
|
||||||
passthru = basicArgs // {
|
in
|
||||||
|
kernel.overrideAttrs (finalAttrs: previousAttrs: {
|
||||||
|
|
||||||
|
passthru = previousAttrs.passthru or { } // basicArgs // {
|
||||||
features = kernelFeatures;
|
features = kernelFeatures;
|
||||||
inherit commonStructuredConfig structuredExtraConfig extraMakeFlags isZen isHardened isLibre;
|
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;
|
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
|
tests = let
|
||||||
overridableKernel = finalKernel // {
|
overridableKernel = finalAttrs.finalPackage // {
|
||||||
override = args:
|
override = args:
|
||||||
lib.warn (
|
lib.warn (
|
||||||
"override is stubbed for NixOS kernel tests, not applying changes these arguments: "
|
"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;
|
in [ (nixosTests.kernel-generic.passthru.testsForKernel overridableKernel) ] ++ kernelTests;
|
||||||
};
|
};
|
||||||
|
|
||||||
finalKernel = lib.extendDerivation true passthru kernel;
|
})
|
||||||
in finalKernel
|
|
||||||
|
|||||||
Reference in New Issue
Block a user