summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel-headers
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/kernel-headers')
-rw-r--r--pkgs/os-specific/linux/kernel-headers/3.14.nix (renamed from pkgs/os-specific/linux/kernel-headers/2.6.28.nix)38
1 files changed, 24 insertions, 14 deletions
diff --git a/pkgs/os-specific/linux/kernel-headers/2.6.28.nix b/pkgs/os-specific/linux/kernel-headers/3.14.nix
index 1ba03010f8ab..d9d0ce7e3b3d 100644
--- a/pkgs/os-specific/linux/kernel-headers/2.6.28.nix
+++ b/pkgs/os-specific/linux/kernel-headers/3.14.nix
@@ -1,46 +1,50 @@
-{stdenv, fetchurl, perl, cross ? null}:
+{ stdenv, fetchurl, perl, cross ? null }:
 
 assert cross == null -> stdenv.isLinux;
 
-let version = "2.6.28.5"; in
+let
+
+  version = "3.14.1";
+
+  kernelHeadersBaseConfig =
+    if cross == null
+    then stdenv.platform.kernelHeadersBaseConfig
+    else cross.platform.kernelHeadersBaseConfig;
+
+in
 
 stdenv.mkDerivation {
   name = "linux-headers-${version}";
 
   src = fetchurl {
-    url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2";
-    sha256 = "0hifjh75sinifr5138v22zwbpqln6lhn65k8b57a1dyzlqca7cl9";
+    url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
+    sha256 = "1njm8gvlj7cq0m1051yxszl4f63383a7sv1na13hkqkv36kipgqx";
   };
 
   targetConfig = if cross != null then cross.config else null;
 
   platform =
-    if cross != null then cross.arch else
+    if cross != null then cross.platform.kernelArch else
     if stdenv.system == "i686-linux" then "i386" else
     if stdenv.system == "x86_64-linux" then "x86_64" else
     if stdenv.system == "powerpc-linux" then "powerpc" else
     if stdenv.isArm then "arm" else
-    if stdenv.system == "mips64el-linux" then "mips" else
+    if stdenv.platform ? kernelArch then stdenv.platform.kernelArch else
     abort "don't know what the kernel include directory is called for this platform";
 
   buildInputs = [perl];
 
   extraIncludeDirs =
     if cross != null then
-	(if cross.arch == "powerpc" then ["ppc"] else [])
+        (if cross.arch == "powerpc" then ["ppc"] else [])
     else if stdenv.system == "powerpc-linux" then ["ppc"] else [];
 
-  patchPhase = ''
-    patch --verbose -p1 < "${./unifdef-getline.patch}"
-    sed -i '/scsi/d' include/Kbuild
-    sed -i 's|/ %/: prepare scripts FORCE|%/: prepare scripts FORCE|' Makefile
-  '';
-
   buildPhase = ''
     if test -n "$targetConfig"; then
        export ARCH=$platform
     fi
-    make mrproper headers_check
+    make ${kernelHeadersBaseConfig} SHELL=bash
+    make mrproper headers_check SHELL=bash
   '';
 
   installPhase = ''
@@ -58,4 +62,10 @@ stdenv.mkDerivation {
       ln -s asm $out/include/asm-x86
     fi
   '';
+
+  meta = with stdenv.lib; {
+    description = "Header files and scripts for Linux kernel";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
 }