Make custom kernel accept boot.kernelPatches
This commit is contained in:
parent
91fb4b5fbe
commit
40bcae409d
2 changed files with 153 additions and 138 deletions
|
|
@ -6,7 +6,14 @@
|
|||
}:
|
||||
{
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackagesFor (import ./kernel.nix { inherit pkgs lib kernel-src; });
|
||||
kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./kernel.nix {
|
||||
inherit lib kernel-src;
|
||||
structuredExtraConfig = { };
|
||||
kernelPatches = [ ];
|
||||
extraConfig = "";
|
||||
features = { };
|
||||
randstructSeed = null;
|
||||
});
|
||||
kernelPatches = [
|
||||
{
|
||||
name = "gpu";
|
||||
|
|
|
|||
|
|
@ -2,12 +2,16 @@
|
|||
pkgs,
|
||||
lib,
|
||||
kernel-src,
|
||||
buildLinux,
|
||||
structuredExtraConfig ? { },
|
||||
kernelPatches ? [ ],
|
||||
extraConfig ? "",
|
||||
sccacheDir ? "/var/cache/sccache/nix-builds/kernel",
|
||||
sccacheServerUds ? null,
|
||||
enforceSccache ? true,
|
||||
features ? { },
|
||||
randstructSeed ? null,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
|
|
@ -30,9 +34,14 @@ let
|
|||
|
||||
kver = "${V}.${P}.${S}${E}";
|
||||
in
|
||||
pkgs.callPackage (
|
||||
{ buildLinux, ... }@args:
|
||||
let
|
||||
let
|
||||
args = {
|
||||
inherit
|
||||
buildLinux
|
||||
features
|
||||
randstructSeed
|
||||
;
|
||||
};
|
||||
llvm = pkgs.llvmPackages_latest;
|
||||
rust = pkgs.rustc-unwrapped;
|
||||
|
||||
|
|
@ -105,8 +114,8 @@ pkgs.callPackage (
|
|||
# LTO_NONE = no;
|
||||
})
|
||||
// structuredExtraConfig;
|
||||
in
|
||||
buildLinux (
|
||||
in
|
||||
buildLinux (
|
||||
args
|
||||
// {
|
||||
inherit kernelPatches extraConfig;
|
||||
|
|
@ -181,5 +190,4 @@ pkgs.callPackage (
|
|||
|
||||
extraMeta.branch = "${V}.${P}";
|
||||
}
|
||||
)
|
||||
) { }
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue