kernel: allow features to be used in common-config
Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
parent
8b6300822b
commit
80d0e31a94
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, version, kernelPlatform, extraConfig }:
|
{ stdenv, version, kernelPlatform, extraConfig, features }:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
|
@ -109,12 +109,6 @@ let
|
|||||||
crossConfig = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; };
|
crossConfig = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
configWithPlatform = kernelPlatform:
|
|
||||||
import ./common-config.nix { inherit stdenv version kernelPlatform extraConfig; };
|
|
||||||
|
|
||||||
config = configWithPlatform stdenv.platform;
|
|
||||||
configCross = configWithPlatform stdenv.cross.platform;
|
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
# Combine the `features' attribute sets of all the kernel patches.
|
# Combine the `features' attribute sets of all the kernel patches.
|
||||||
features = lib.fold (x: y: (x.features or {}) // y) features kernelPatches;
|
features = lib.fold (x: y: (x.features or {}) // y) features kernelPatches;
|
||||||
@ -124,6 +118,14 @@ let
|
|||||||
passthru = kernel.passthru // (removeAttrs passthru [ "passthru" "meta" ]);
|
passthru = kernel.passthru // (removeAttrs passthru [ "passthru" "meta" ]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configWithPlatform = kernelPlatform: import ./common-config.nix
|
||||||
|
{ inherit stdenv version kernelPlatform extraConfig;
|
||||||
|
features = passthru.features; # Ensure we know of all extra patches, etc.
|
||||||
|
};
|
||||||
|
|
||||||
|
config = configWithPlatform stdenv.platform;
|
||||||
|
configCross = configWithPlatform stdenv.cross.platform;
|
||||||
|
|
||||||
nativeDrv = lib.addPassthru kernel.nativeDrv passthru;
|
nativeDrv = lib.addPassthru kernel.nativeDrv passthru;
|
||||||
|
|
||||||
crossDrv = lib.addPassthru kernel.crossDrv passthru;
|
crossDrv = lib.addPassthru kernel.crossDrv passthru;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user