2014-05-05 22:58:51 +04:00
|
|
|
{ config, pkgs, lib, ... }:
|
2012-08-04 17:45:26 +04:00
|
|
|
|
|
|
|
let
|
2014-05-05 22:58:51 +04:00
|
|
|
configfile = builtins.storePath (builtins.toFile "config" (lib.concatStringsSep "\n"
|
2012-08-04 17:45:26 +04:00
|
|
|
(map (builtins.getAttr "configLine") config.system.requiredKernelConfig))
|
|
|
|
);
|
|
|
|
|
2014-01-22 05:05:55 +04:00
|
|
|
origKernel = pkgs.buildLinux {
|
2012-08-04 17:45:26 +04:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
}));
|
|
|
|
|
2013-03-02 18:10:58 +04:00
|
|
|
kernelPackages = pkgs.linuxPackagesFor kernel;
|
2012-08-04 17:45:26 +04:00
|
|
|
in {
|
|
|
|
boot.kernelPackages = kernelPackages;
|
|
|
|
}
|