kernel: allow features to be used in common-config

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2014-05-07 17:26:33 -05:00
parent 8b6300822b
commit 80d0e31a94
2 changed files with 9 additions and 7 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, version, kernelPlatform, extraConfig }:
{ stdenv, version, kernelPlatform, extraConfig, features }:
with stdenv.lib;

View file

@ -109,12 +109,6 @@ let
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 = {
# Combine the `features' attribute sets of all the kernel patches.
features = lib.fold (x: y: (x.features or {}) // y) features kernelPatches;
@ -124,6 +118,14 @@ let
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;
crossDrv = lib.addPassthru kernel.crossDrv passthru;