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