3
0
Fork 0
forked from mirrors/nixpkgs

linuxHeadersCross: Remove and just use linuxHeaders

This commit is contained in:
John Ericson 2017-02-15 13:46:02 -05:00
parent 5870795cc6
commit f0e1907bee

View file

@ -7707,7 +7707,7 @@ with pkgs;
glibcCross = forcedNativePackages.glibc.override {
gccCross = gccCrossStageStatic;
linuxHeaders = linuxHeadersCross;
inherit (forcedNativePackages) linuxHeaders;
};
# We can choose:
@ -11684,25 +11684,30 @@ with pkgs;
lkl = callPackage ../applications/virtualization/lkl { };
linuxHeaders = linuxHeaders_4_4;
linuxHeaders24Cross = forcedNativePackages.callPackage ../os-specific/linux/kernel-headers/2.4.nix {
cross = assert targetPlatform != buildPlatform; targetPlatform;
linuxHeaders_2_4 = callPackage ../os-specific/linux/kernel-headers/2.4.nix {
cross = if targetPlatform != hostPlatform then targetPlatform else null;
};
linuxHeaders26Cross = forcedNativePackages.callPackage ../os-specific/linux/kernel-headers/4.4.nix {
cross = assert targetPlatform != buildPlatform; targetPlatform;
linuxHeaders_2_6 = callPackage ../os-specific/linux/kernel-headers/4.4.nix {
cross = if targetPlatform != hostPlatform then targetPlatform else null;
};
linuxHeaders_4_4 = callPackage ../os-specific/linux/kernel-headers/4.4.nix { };
linuxHeaders_4_4 = callPackage ../os-specific/linux/kernel-headers/4.4.nix {
cross = if targetPlatform != hostPlatform then targetPlatform else null;
};
# We can choose:
linuxHeadersCrossChooser = ver : if ver == "2.4" then linuxHeaders24Cross
else if ver == "2.6" then linuxHeaders26Cross
else throw "Unknown linux kernel version";
linuxHeadersCross = assert targetPlatform != buildPlatform;
linuxHeadersCrossChooser targetPlatform.platform.kernelMajor;
linuxHeaders =
if targetPlatform != hostPlatform
then
{ # switch
"2.4" = linuxHeaders_2_4;
"2.6" = linuxHeaders_2_6;
"4.4" = linuxHeaders_4_4;
}.${targetPlatform.platform.kernelMajor}
or (throw "Unknown linux kernel version")
else
linuxHeaders_4_4;
kernelPatches = callPackage ../os-specific/linux/kernel/patches.nix { };
@ -12358,7 +12363,7 @@ with pkgs;
uclibc = callPackage ../os-specific/linux/uclibc { };
uclibcCross = lowPrio (callPackage ../os-specific/linux/uclibc {
linuxHeaders = linuxHeadersCross;
inherit (buildPackages) linuxHeaders;
gccCross = gccCrossStageStatic;
cross = assert targetPlatform != buildPlatform; targetPlatform;
});