nixpkgs/nixos/modules/testing/minimal-kernel.nix
Shea Levy d18bc25b95 Rename linuxManualConfig to buildLinux
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-01-21 20:05:55 -05:00

28 lines
830 B
Nix

{ config, pkgs, ... }:
let
configfile = builtins.storePath (builtins.toFile "config" (pkgs.lib.concatStringsSep "\n"
(map (builtins.getAttr "configLine") config.system.requiredKernelConfig))
);
origKernel = pkgs.buildLinux {
inherit (pkgs.linux) src version;
inherit configfile;
allowImportFromDerivation = true;
kernelPatches = [ pkgs.kernelPatches.cifs_timeout_2_6_38 ];
};
kernel = origKernel // (derivation (origKernel.drvAttrs // {
configurePhase = ''
runHook preConfigure
mkdir ../build
make $makeFlags "''${makeFlagsArray[@]}" mrproper
make $makeFlags "''${makeFlagsArray[@]}" KCONFIG_ALLCONFIG=${configfile} allnoconfig
runHook postConfigure
'';
}));
kernelPackages = pkgs.linuxPackagesFor kernel;
in {
boot.kernelPackages = kernelPackages;
}