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