summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-09-14 19:24:48 -0400
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2017-09-15 18:41:03 +0300
commitc13cf47e7971cd94553d55caca6a004dc72c98e1 (patch)
tree3b009e71f4a16e2bf1f9d9f000ce10075e6cd2ec
parentbaaed4c80151c3f3d02160f86b3bdecadd55445c (diff)
downloadnixlib-c13cf47e7971cd94553d55caca6a004dc72c98e1.tar
nixlib-c13cf47e7971cd94553d55caca6a004dc72c98e1.tar.gz
nixlib-c13cf47e7971cd94553d55caca6a004dc72c98e1.tar.bz2
nixlib-c13cf47e7971cd94553d55caca6a004dc72c98e1.tar.lz
nixlib-c13cf47e7971cd94553d55caca6a004dc72c98e1.tar.xz
nixlib-c13cf47e7971cd94553d55caca6a004dc72c98e1.tar.zst
nixlib-c13cf47e7971cd94553d55caca6a004dc72c98e1.zip
linux-headers 4.4: Remove arch fallback code
@dezgeg was right: The `platform` field of a linux platorm is already
manadatory---if not specified it is inferred, and all such inferences
include a `kernelArch` field. Therefore linux packages can indeed rely
on it being defined.
-rw-r--r--pkgs/os-specific/linux/kernel-headers/4.4.nix7
1 files changed, 1 insertions, 6 deletions
diff --git a/pkgs/os-specific/linux/kernel-headers/4.4.nix b/pkgs/os-specific/linux/kernel-headers/4.4.nix
index 716ad799bc64..0ef5280d13b6 100644
--- a/pkgs/os-specific/linux/kernel-headers/4.4.nix
+++ b/pkgs/os-specific/linux/kernel-headers/4.4.nix
@@ -20,12 +20,7 @@ stdenvNoCC.mkDerivation {
 
   targetConfig = if hostPlatform != buildPlatform then hostPlatform.config else null;
 
-  platform = hostPlatform.platform.kernelArch or (
-    if hostPlatform.system == "i686-linux" then "i386" else
-    if hostPlatform.system == "x86_64-linux" then "x86_64" else
-    if hostPlatform.system == "powerpc-linux" then "powerpc" else
-    if hostPlatform.isArm then "arm" else
-    abort "don't know what the kernel include directory is called for this platform");
+  platform = hostPlatform.platform.kernelArch;
 
   # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc.
   # We do this so we have a build->build, not build->host, C compiler.