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