mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 13:37:21 +03:00
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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user