mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-09 21:53:24 +00:00
linuxConfig: avoid buildPackages.callPackage
This commit is contained in:
parent
384e59a631
commit
57a9ba010a
@ -16310,25 +16310,26 @@ 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 = let
|
linuxConfig = {
|
||||||
kernelArch = stdenv.hostPlatform.kernelArch;
|
|
||||||
in buildPackages.callPackage ({
|
|
||||||
src,
|
src,
|
||||||
version ? (builtins.parseDrvName src.name).version,
|
version ? (builtins.parseDrvName src.name).version,
|
||||||
makeTarget ? "defconfig",
|
makeTarget ? "defconfig",
|
||||||
name ? "kernel.config",
|
name ? "kernel.config",
|
||||||
lib, stdenv, bison, flex
|
}: stdenvNoCC.mkDerivation {
|
||||||
}: stdenv.mkDerivation {
|
|
||||||
inherit name src;
|
inherit name src;
|
||||||
nativeBuildInputs = lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ];
|
depsBuildBuild = [ buildPackages.stdenv.cc ]
|
||||||
|
++ lib.optionals (lib.versionAtLeast version "4.16") [ buildPackages.bison buildPackages.flex ];
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
set -x
|
set -x
|
||||||
make ${makeTarget} ARCH=${kernelArch}
|
make \
|
||||||
|
ARCH=${stdenv.hostPlatform.kernelArch} \
|
||||||
|
HOSTCC=${buildPackages.stdenv.cc.targetPrefix}gcc \
|
||||||
|
${makeTarget}
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
cp .config $out
|
cp .config $out
|
||||||
'';
|
'';
|
||||||
});
|
};
|
||||||
|
|
||||||
buildLinux = attrs: callPackage ../os-specific/linux/kernel/generic.nix attrs;
|
buildLinux = attrs: callPackage ../os-specific/linux/kernel/generic.nix attrs;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user