linuxConfig: fix deps and cross-compiling behavior
This commit is contained in:
parent
05a4237301
commit
384e59a631
@ -16310,17 +16310,25 @@ in
|
|||||||
linuxManualConfig = makeOverridable (callPackage ../os-specific/linux/kernel/manual-config.nix {});
|
linuxManualConfig = makeOverridable (callPackage ../os-specific/linux/kernel/manual-config.nix {});
|
||||||
|
|
||||||
# Derive one of the default .config files
|
# Derive one of the default .config files
|
||||||
linuxConfig = { src, makeTarget ? "defconfig", name ? "kernel.config" }:
|
linuxConfig = let
|
||||||
stdenv.mkDerivation {
|
kernelArch = stdenv.hostPlatform.kernelArch;
|
||||||
inherit name src;
|
in buildPackages.callPackage ({
|
||||||
buildPhase = ''
|
src,
|
||||||
set -x
|
version ? (builtins.parseDrvName src.name).version,
|
||||||
make ${makeTarget}
|
makeTarget ? "defconfig",
|
||||||
'';
|
name ? "kernel.config",
|
||||||
installPhase = ''
|
lib, stdenv, bison, flex
|
||||||
cp .config $out
|
}: stdenv.mkDerivation {
|
||||||
'';
|
inherit name src;
|
||||||
};
|
nativeBuildInputs = lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ];
|
||||||
|
buildPhase = ''
|
||||||
|
set -x
|
||||||
|
make ${makeTarget} ARCH=${kernelArch}
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
cp .config $out
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
buildLinux = attrs: callPackage ../os-specific/linux/kernel/generic.nix attrs;
|
buildLinux = attrs: callPackage ../os-specific/linux/kernel/generic.nix attrs;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user