summary refs log tree commit diff
path: root/pkgs/os-specific/linux
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r--pkgs/os-specific/linux/alsa-utils/default.nix2
-rw-r--r--pkgs/os-specific/linux/busybox/default.nix5
-rw-r--r--pkgs/os-specific/linux/busybox/include-missing-sys-resource-header.patch12
-rw-r--r--pkgs/os-specific/linux/cryptodev/default.nix2
-rw-r--r--pkgs/os-specific/linux/iproute/default.nix2
-rw-r--r--pkgs/os-specific/linux/jujuutils/default.nix6
-rw-r--r--pkgs/os-specific/linux/kernel-headers/2.4.nix4
-rw-r--r--pkgs/os-specific/linux/kernel-headers/2.6.28.nix2
-rw-r--r--pkgs/os-specific/linux/kernel-headers/2.6.32.nix4
-rw-r--r--pkgs/os-specific/linux/kernel-headers/3.7.nix (renamed from pkgs/os-specific/linux/kernel-headers/3.3.5.nix)25
-rw-r--r--pkgs/os-specific/linux/kernel-headers/default.nix62
-rw-r--r--pkgs/os-specific/linux/kernel/generic.nix6
-rw-r--r--pkgs/os-specific/linux/kernel/linux-rpi-3.6.nix42
-rw-r--r--pkgs/os-specific/linux/kernel/manual-config.nix2
-rw-r--r--pkgs/os-specific/linux/kernel/perf.nix6
-rw-r--r--pkgs/os-specific/linux/klibc/default.nix2
-rw-r--r--pkgs/os-specific/linux/libcap/default.nix2
-rw-r--r--pkgs/os-specific/linux/libcgroup/default.nix2
-rw-r--r--pkgs/os-specific/linux/mdadm/default.nix2
-rw-r--r--pkgs/os-specific/linux/net-tools/config.h11
-rw-r--r--pkgs/os-specific/linux/net-tools/default.nix12
-rw-r--r--pkgs/os-specific/linux/net-tools/net-tools-labels.patch38
-rw-r--r--pkgs/os-specific/linux/pam/default.nix17
-rw-r--r--pkgs/os-specific/linux/uclibc/default.nix6
-rw-r--r--pkgs/os-specific/linux/udisks/default.nix2
-rw-r--r--pkgs/os-specific/linux/upower/default.nix2
-rw-r--r--pkgs/os-specific/linux/util-linux/default.nix8
-rw-r--r--pkgs/os-specific/linux/wpa_supplicant/default.nix2
-rw-r--r--pkgs/os-specific/linux/wpa_supplicant/gui.nix2
29 files changed, 126 insertions, 164 deletions
diff --git a/pkgs/os-specific/linux/alsa-utils/default.nix b/pkgs/os-specific/linux/alsa-utils/default.nix
index ebaef323491..08df6fe64c2 100644
--- a/pkgs/os-specific/linux/alsa-utils/default.nix
+++ b/pkgs/os-specific/linux/alsa-utils/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ alsaLib ncurses ];
-  buildNativeInputs = [ gettext ];
+  nativeBuildInputs = [ gettext ];
 
   configureFlags = "--disable-xmlto --with-udev-rules-dir=$(out)/lib/udev/rules.d";
 
diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix
index 0848cb33253..a24e0fd2307 100644
--- a/pkgs/os-specific/linux/busybox/default.nix
+++ b/pkgs/os-specific/linux/busybox/default.nix
@@ -44,6 +44,9 @@ stdenv.mkDerivation rec {
     sha256 = "10k8kgrprll9hxfm9gc3jl7kkq79g6l2pygn5snqwqg5v80zy4zb";
   };
 
+  # Remove this patch after the next busybox update.
+  patches = [ ./include-missing-sys-resource-header.patch ];
+
   configurePhase = ''
     make defconfig
     ${configParser}
@@ -60,7 +63,7 @@ stdenv.mkDerivation rec {
     extraCrossConfig = ''
       CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cross.config}-"
     '' +
-      (if (stdenv.cross.platform.kernelMajor == "2.4") then ''
+      (if stdenv.cross.platform.kernelMajor == "2.4" then ''
         CONFIG_IONICE n
       '' else "");
   };
diff --git a/pkgs/os-specific/linux/busybox/include-missing-sys-resource-header.patch b/pkgs/os-specific/linux/busybox/include-missing-sys-resource-header.patch
new file mode 100644
index 00000000000..8163a86e3cd
--- /dev/null
+++ b/pkgs/os-specific/linux/busybox/include-missing-sys-resource-header.patch
@@ -0,0 +1,12 @@
+diff --git a/include/libbb.h b/include/libbb.h
+index f12800f..e7806c2 100644
+--- a/include/libbb.h
++++ b/include/libbb.h
+@@ -40,6 +40,7 @@
+ #include <sys/poll.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
++#include <sys/resource.h>
+ #include <sys/socket.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
diff --git a/pkgs/os-specific/linux/cryptodev/default.nix b/pkgs/os-specific/linux/cryptodev/default.nix
index cb797f07aa3..b9e5690e80e 100644
--- a/pkgs/os-specific/linux/cryptodev/default.nix
+++ b/pkgs/os-specific/linux/cryptodev/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "13hybl5p0ck0vgi2gxmiwa2810gcfk78kdy17ai8nczj8il15mn0";
   };
 
-  buildPhase = if (!onlyHeaders) then ''
+  buildPhase = if !onlyHeaders then ''
     make -C ${kernel}/lib/modules/${kernel.modDirVersion}/build \
       SUBDIRS=`pwd` INSTALL_PATH=$out
   '' else ":";
diff --git a/pkgs/os-specific/linux/iproute/default.nix b/pkgs/os-specific/linux/iproute/default.nix
index c97c7416de1..2b22f4a2881 100644
--- a/pkgs/os-specific/linux/iproute/default.nix
+++ b/pkgs/os-specific/linux/iproute/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
     + " MANDIR=$(out)/share/man";
 
   buildInputs = [ db4 iptables ];
-  buildNativeInputs = [ bison flex pkgconfig ];
+  nativeBuildInputs = [ bison flex pkgconfig ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/os-specific/linux/jujuutils/default.nix b/pkgs/os-specific/linux/jujuutils/default.nix
index c52aae291eb..7c688943ea8 100644
--- a/pkgs/os-specific/linux/jujuutils/default.nix
+++ b/pkgs/os-specific/linux/jujuutils/default.nix
@@ -1,18 +1,18 @@
-{stdenv, fetchurl, linuxHeaders}:
+{ stdenv, fetchurl, linuxHeaders }:
 
 stdenv.mkDerivation {
   name = "jujuutils-0.2";
 
   src = fetchurl {
-    url = http://jujuutils.googlecode.com/files/jujuutils-0.2.tar.gz;
+    url = "http://jujuutils.googlecode.com/files/jujuutils-0.2.tar.gz";
     sha256 = "1r74m7s7rs9d6y7cffi7mdap3jf96qwm1v6jcw53x5cikgmfxn4x";
   };
 
   buildInputs = [ linuxHeaders ];
 
   meta = {
+    homepage = "http://code.google.com/p/jujuutils/";
     description = "Utilities around FireWire devices connected to a Linux computer";
     license = "GPLv2";
-    homepage = http://code.google.com/p/jujuutils/;
   };
 }
diff --git a/pkgs/os-specific/linux/kernel-headers/2.4.nix b/pkgs/os-specific/linux/kernel-headers/2.4.nix
index c5926ff2e47..9457769f5ef 100644
--- a/pkgs/os-specific/linux/kernel-headers/2.4.nix
+++ b/pkgs/os-specific/linux/kernel-headers/2.4.nix
@@ -4,7 +4,7 @@ assert cross == null -> stdenv.isLinux;
 
 let
   version = "2.4.37.9";
-  kernelHeadersBaseConfig = if (cross == null) then
+  kernelHeadersBaseConfig = if cross == null then
       stdenv.platform.kernelHeadersBaseConfig
     else
       cross.platform.kernelHeadersBaseConfig;
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
     sha256 = "08rca9lcb5l5w483hgaqk8pi2njd7cmwpkifjqxwlb3g8liz4r5g";
   };
 
-  targetConfig = if (cross != null) then cross.config else null;
+  targetConfig = if cross != null then cross.config else null;
 
   platform =
     if cross != null then cross.platform.kernelArch else
diff --git a/pkgs/os-specific/linux/kernel-headers/2.6.28.nix b/pkgs/os-specific/linux/kernel-headers/2.6.28.nix
index b576b68773c..1ba03010f8a 100644
--- a/pkgs/os-specific/linux/kernel-headers/2.6.28.nix
+++ b/pkgs/os-specific/linux/kernel-headers/2.6.28.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
     sha256 = "0hifjh75sinifr5138v22zwbpqln6lhn65k8b57a1dyzlqca7cl9";
   };
 
-  targetConfig = if (cross != null) then cross.config else null;
+  targetConfig = if cross != null then cross.config else null;
 
   platform =
     if cross != null then cross.arch else
diff --git a/pkgs/os-specific/linux/kernel-headers/2.6.32.nix b/pkgs/os-specific/linux/kernel-headers/2.6.32.nix
index a2fc597eaac..100dd0c611b 100644
--- a/pkgs/os-specific/linux/kernel-headers/2.6.32.nix
+++ b/pkgs/os-specific/linux/kernel-headers/2.6.32.nix
@@ -4,7 +4,7 @@ assert cross == null -> stdenv.isLinux;
 
 let
   version = "2.6.32.16";
-  kernelHeadersBaseConfig = if (cross == null) then
+  kernelHeadersBaseConfig = if cross == null then
       stdenv.platform.kernelHeadersBaseConfig
     else
       cross.platform.kernelHeadersBaseConfig;
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
     sha256 = "1ndvqvfaxachsklzzr5db1bzvfhnzz8diddrm1zlv7171fzmn13j";
   };
 
-  targetConfig = if (cross != null) then cross.config else null;
+  targetConfig = if cross != null then cross.config else null;
 
   platform =
     if cross != null then cross.platform.kernelArch else
diff --git a/pkgs/os-specific/linux/kernel-headers/3.3.5.nix b/pkgs/os-specific/linux/kernel-headers/3.7.nix
index f4dd28dab03..4371bf7df9c 100644
--- a/pkgs/os-specific/linux/kernel-headers/3.3.5.nix
+++ b/pkgs/os-specific/linux/kernel-headers/3.7.nix
@@ -3,22 +3,25 @@
 assert cross == null -> stdenv.isLinux;
 
 let
-  version = "3.3.5";
-  kernelHeadersBaseConfig = if cross == null then
-      stdenv.platform.kernelHeadersBaseConfig
-    else
-      cross.platform.kernelHeadersBaseConfig;
+
+  version = "3.7.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/v3.x/linux-${version}.tar.xz";
-    sha256 = "0i74jn47f6vs5kcvk8abvz3k08z32c9bbqw0sdjkdxwvr4jbczpv";
+    url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.bz2";
+    sha256 = "1bb1dxj1i6j7pj926kfy6pz58kw03swyyikl9f3fq3jnswispaj2";
   };
 
-  targetConfig = if (cross != null) then cross.config else null;
+  targetConfig = if cross != null then cross.config else null;
 
   platform =
     if cross != null then cross.platform.kernelArch else
@@ -33,15 +36,15 @@ stdenv.mkDerivation {
 
   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 [];
 
   buildPhase = ''
     if test -n "$targetConfig"; then
        export ARCH=$platform
     fi
-    make ${kernelHeadersBaseConfig}
-    make mrproper headers_check
+    make ${kernelHeadersBaseConfig} SHELL=bash
+    make mrproper headers_check SHELL=bash
   '';
 
   installPhase = ''
diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix
deleted file mode 100644
index 3fb5ef8ef2d..00000000000
--- a/pkgs/os-specific/linux/kernel-headers/default.nix
+++ /dev/null
@@ -1,62 +0,0 @@
-{ stdenv, fetchurl, perl, cross ? null }:
-
-assert cross == null -> stdenv.isLinux;
-
-let
-  version = "2.6.35.14";
-  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/longterm/v2.6.35/linux-${version}.tar.bz2";
-    sha256 = "1wzml7s9karfbk2yi36g1r8fyaq4d4f16yizc68zgchv0xzj39zl";
-  };
-
-  targetConfig = if (cross != null) then cross.config else null;
-
-  platform =
-    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.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 [])
-    else if stdenv.system == "powerpc-linux" then ["ppc"] else [];
-
-  buildPhase = ''
-    if test -n "$targetConfig"; then
-       export ARCH=$platform
-    fi
-    make ${kernelHeadersBaseConfig}
-    make mrproper headers_check
-  '';
-
-  installPhase = ''
-    make INSTALL_HDR_PATH=$out headers_install
-
-    # Some builds (e.g. KVM) want a kernel.release.
-    mkdir -p $out/include/config
-    echo "${version}-default" > $out/include/config/kernel.release
-  '';
-
-  # !!! hacky
-  fixupPhase = ''
-    ln -s asm $out/include/asm-$platform
-    if test "$platform" = "i386" -o "$platform" = "x86_64"; then
-      ln -s asm $out/include/asm-x86
-    fi
-  '';
-}
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix
index a58430401c5..eecf52b1ddf 100644
--- a/pkgs/os-specific/linux/kernel/generic.nix
+++ b/pkgs/os-specific/linux/kernel/generic.nix
@@ -83,7 +83,7 @@ stdenv.mkDerivation {
   # For UML and non-PC, just ignore all options that don't apply (We are lazy).
   ignoreConfigErrors = stdenv.platform.name != "pc";
 
-  buildNativeInputs = [ perl mktemp ];
+  nativeBuildInputs = [ perl mktemp ];
   buildInputs = lib.optional (stdenv.platform.uboot != null)
     (ubootChooser stdenv.platform.uboot);
 
@@ -119,8 +119,8 @@ stdenv.mkDerivation {
 
       # The substitution of crossAttrs happens *after* the stdenv cross adapter sets
       # the parameters for the usual stdenv. Thus, we need to specify
-      # the ".hostDrv" in the buildInputs here.
-      buildInputs = lib.optional (cp.uboot != null) (ubootChooser cp.uboot).hostDrv;
+      # the ".crossDrv" in the buildInputs here.
+      buildInputs = lib.optional (cp.uboot != null) (ubootChooser cp.uboot).crossDrv;
     };
 
   meta = {
diff --git a/pkgs/os-specific/linux/kernel/linux-rpi-3.6.nix b/pkgs/os-specific/linux/kernel/linux-rpi-3.6.nix
new file mode 100644
index 00000000000..0dc6378fff3
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/linux-rpi-3.6.nix
@@ -0,0 +1,42 @@
+args @ {
+  stdenv, fetchgit, extraConfig ? "" , perl, mktemp, module_init_tools, ...
+}:
+
+let
+  configWithPlatform = kernelPlatform :
+    ''
+      ${if kernelPlatform ? kernelExtraConfig then kernelPlatform.kernelExtraConfig else ""}
+      ${extraConfig}
+    '';
+in
+
+import ./generic.nix (
+
+  rec {
+    version = "3.6.y";
+    testing = false;
+
+    preConfigure = ''
+      substituteInPlace scripts/depmod.sh --replace '-b "$INSTALL_MOD_PATH"' ""
+    '';
+
+    src = fetchgit {
+      url = https://github.com/raspberrypi/linux;
+      rev = "6e1f8bce970043a658d15f9350eb85152fd5fc4e";
+      sha256 = "";
+    };
+
+    config = configWithPlatform stdenv.platform;
+    configCross = configWithPlatform stdenv.cross.platform;
+
+    features.iwlwifi = true;
+    #features.efiBootStub = true;
+    #features.needsCifsUtils = true;
+    #features.canDisableNetfilterConntrackHelpers = true;
+    #features.netfilterRPFilter = true;
+
+    fetchurl = null;
+  }
+
+  // removeAttrs args ["extraConfig"]
+)
diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix
index 44c31d824ae..5d84dee0a28 100644
--- a/pkgs/os-specific/linux/kernel/manual-config.nix
+++ b/pkgs/os-specific/linux/kernel/manual-config.nix
@@ -122,7 +122,7 @@ stdenv.mkDerivation {
     runHook postConfigure
   '';
 
-  buildNativeInputs = [ perl nettools ];
+  nativeBuildInputs = [ perl nettools ];
 
   makeFlags = commonMakeFlags ++ [
    "INSTALLKERNEL=${installkernel stdenv.platform.kernelTarget}"
diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix
index 01d989e75b1..8f2db1b15bd 100644
--- a/pkgs/os-specific/linux/kernel/perf.nix
+++ b/pkgs/os-specific/linux/kernel/perf.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
   '';
 
   # perf refers both to newt and slang
-  buildNativeInputs = [ asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt flex bison ];
+  nativeBuildInputs = [ asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt flex bison ];
   buildInputs = [ elfutils python perl newt slang pkgconfig] ++
     stdenv.lib.optional withGtk gtk;
 
@@ -27,9 +27,9 @@ stdenv.mkDerivation {
   crossAttrs = {
     /* I don't want cross-python or cross-perl -
        I don't know if cross-python even works */
-    propagatedBuildInputs = [ elfutils.hostDrv newt.hostDrv ];
+    propagatedBuildInputs = [ elfutils.crossDrv newt.crossDrv ];
     makeFlags = "CROSS_COMPILE=${stdenv.cross.config}-";
-    elfutils = elfutils.hostDrv;
+    elfutils = elfutils.crossDrv;
   };
 
   meta = {
diff --git a/pkgs/os-specific/linux/klibc/default.nix b/pkgs/os-specific/linux/klibc/default.nix
index 781bb67edca..42fd6097da0 100644
--- a/pkgs/os-specific/linux/klibc/default.nix
+++ b/pkgs/os-specific/linux/klibc/default.nix
@@ -70,5 +70,5 @@ stdenv.mkDerivation {
     cp usr/dash/sh $dir/
   '';
   
-  buildNativeInputs = [ perl bison mktemp ];
+  nativeBuildInputs = [ perl bison mktemp ];
 }
diff --git a/pkgs/os-specific/linux/libcap/default.nix b/pkgs/os-specific/linux/libcap/default.nix
index 667fe63bba7..92f15c1ade3 100644
--- a/pkgs/os-specific/linux/libcap/default.nix
+++ b/pkgs/os-specific/linux/libcap/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "03q50j6bg65cc501q87qh328ncav1i8qw2bjig99vxmmfx4bvsvk";
   };
   
-  buildNativeInputs = [ perl ];
+  nativeBuildInputs = [ perl ];
   propagatedBuildInputs = [ attr ];
 
   preConfigure = "cd libcap";
diff --git a/pkgs/os-specific/linux/libcgroup/default.nix b/pkgs/os-specific/linux/libcgroup/default.nix
index 0246f6729b1..6323d8c4f23 100644
--- a/pkgs/os-specific/linux/libcgroup/default.nix
+++ b/pkgs/os-specific/linux/libcgroup/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ pam ];
 
-  buildNativeInputs = [ yacc flex ];
+  nativeBuildInputs = [ yacc flex ];
 
   meta = {
     description = "Library and tools to manage Linux's cgroup resource management system";
diff --git a/pkgs/os-specific/linux/mdadm/default.nix b/pkgs/os-specific/linux/mdadm/default.nix
index a88107ae73d..1653c018ce1 100644
--- a/pkgs/os-specific/linux/mdadm/default.nix
+++ b/pkgs/os-specific/linux/mdadm/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
   # Enable incremental activation of swraid arrays from udev.
   patches = [ ./udev.patch ];
 
-  buildNativeInputs = [ groff ];
+  nativeBuildInputs = [ groff ];
 
   preConfigure = "sed -e 's@/lib/udev@\${out}/lib/udev@' -e 's@ -Werror @ @' -i Makefile";
 
diff --git a/pkgs/os-specific/linux/net-tools/config.h b/pkgs/os-specific/linux/net-tools/config.h
index b060bea12c2..dedaac6247d 100644
--- a/pkgs/os-specific/linux/net-tools/config.h
+++ b/pkgs/os-specific/linux/net-tools/config.h
@@ -38,6 +38,7 @@
 #define HAVE_AFECONET 0
 #define HAVE_AFDECnet 0
 #define HAVE_AFASH 0
+#define HAVE_AFBLUETOOTH 0
 
 /* 
  * 
@@ -49,20 +50,23 @@
 #define HAVE_HWSLIP 1
 #define HAVE_HWPPP 1
 #define HAVE_HWTUNNEL 1
-#define HAVE_HWSTRIP 1
-#define HAVE_HWTR 1
+#define HAVE_HWSTRIP 0
+#define HAVE_HWTR 0
 #define HAVE_HWAX25 0
 #define HAVE_HWROSE 0
 #define HAVE_HWNETROM 1
 #define HAVE_HWX25 0
 #define HAVE_HWFR 1
-#define HAVE_HWSIT 0
+#define HAVE_HWSIT 1
 #define HAVE_HWFDDI 0
 #define HAVE_HWHIPPI 0
 #define HAVE_HWASH 0
 #define HAVE_HWHDLCLAPB 0
 #define HAVE_HWIRDA 1
 #define HAVE_HWEC 0
+#define HAVE_HWEC 0
+#define HAVE_HWEUI64 1
+#define HAVE_HWIB 1
 
 /* 
  * 
@@ -72,3 +76,4 @@
 #define HAVE_FW_MASQUERADE 0
 #define HAVE_IP_TOOLS 0
 #define HAVE_MII 0
+#define HAVE_SELINUX 0
diff --git a/pkgs/os-specific/linux/net-tools/default.nix b/pkgs/os-specific/linux/net-tools/default.nix
index 59af976a71b..9386b50969f 100644
--- a/pkgs/os-specific/linux/net-tools/default.nix
+++ b/pkgs/os-specific/linux/net-tools/default.nix
@@ -1,15 +1,13 @@
 { stdenv, fetchurl }:
 
-stdenv.mkDerivation {
-  name = "net-tools-1.60";
-  
+stdenv.mkDerivation rec {
+  name = "net-tools-1.60_p20120127084908";
+
   src = fetchurl {
-    url = http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-1.60.tar.bz2;
-    md5 = "888774accab40217dde927e21979c165";
+    url = "mirror://gentoo/distfiles/${name}.tar.xz";
+    sha256 = "408a51964aa142a4f45c4cffede2478abbd5630a7c7346ba0d3611059a2a3c94";
   };
 
-  patches = [ ./net-tools-labels.patch ];
-  
   preBuild =
     ''
       cp ${./config.h} config.h
diff --git a/pkgs/os-specific/linux/net-tools/net-tools-labels.patch b/pkgs/os-specific/linux/net-tools/net-tools-labels.patch
deleted file mode 100644
index 82c3a27d9c6..00000000000
--- a/pkgs/os-specific/linux/net-tools/net-tools-labels.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -ruN net-tools-1.60/hostname.c net-tools-1.60-new/hostname.c
---- net-tools-1.60/hostname.c	2001-04-08 19:04:23.000000000 +0200
-+++ net-tools-1.60-new/hostname.c	2004-12-17 14:48:15.624174382 +0100
-@@ -98,6 +98,7 @@
- 	    fprintf(stderr, _("%s: name too long\n"), program_name);
- 	    break;
- 	default:
-+	    break;
- 	}
- 	exit(1);
-     };
-@@ -117,6 +118,7 @@
- 	    fprintf(stderr, _("%s: name too long\n"), program_name);
- 	    break;
- 	default:
-+	    break;
- 	}
- 	exit(1);
-     };
-@@ -174,6 +176,7 @@
- 	printf("%s\n", hp->h_name);
- 	break;
-     default:
-+	break;
-     }
- }
- 
-diff -ruN net-tools-1.60/lib/inet_sr.c net-tools-1.60-new/lib/inet_sr.c
---- net-tools-1.60/lib/inet_sr.c	2000-02-20 22:46:45.000000000 +0100
-+++ net-tools-1.60-new/lib/inet_sr.c	2004-12-17 14:37:15.416349441 +0100
-@@ -105,6 +105,7 @@
-     case 2:
-        isnet = 0; break;
-     default:
-+	break;
-     }
- 
-     /* Fill in the other fields. */
diff --git a/pkgs/os-specific/linux/pam/default.nix b/pkgs/os-specific/linux/pam/default.nix
index 7da03cf9cad..112c82d1ea0 100644
--- a/pkgs/os-specific/linux/pam/default.nix
+++ b/pkgs/os-specific/linux/pam/default.nix
@@ -1,14 +1,15 @@
 { stdenv, fetchurl, flex, cracklib, libxcrypt }:
 
 stdenv.mkDerivation rec {
-  name = "linux-pam-1.1.1";
+  name = "linux-pam-1.1.6";
 
   src = fetchurl {
-    url = http://www.linux-pam.org/library/Linux-PAM-1.1.1.tar.bz2;
-    sha256 = "015r3xdkjpqwcv4lvxavq0nybdpxhfjycqpzbx8agqd5sywkx3b0";
+    url = https://fedorahosted.org/releases/l/i/linux-pam/Linux-PAM-1.1.6.tar.bz2;
+    sha256 = "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s";
   };
 
-  buildNativeInputs = [ flex ];
+  nativeBuildInputs = [ flex ];
+
   buildInputs = [ cracklib ]
     ++ stdenv.lib.optional
       (!stdenv.isArm && stdenv.system != "mips64el-linux")
@@ -16,9 +17,9 @@ stdenv.mkDerivation rec {
 
   crossAttrs = {
     # Skip libxcrypt cross-building, as it fails for mips and arm
-    propagatedBuildInputs = [ flex.hostDrv cracklib.hostDrv ];
+    propagatedBuildInputs = [ flex.crossDrv cracklib.crossDrv ];
     preConfigure = preConfigure + ''
-      ar x ${flex.hostDrv}/lib/libfl.a
+      ar x ${flex.crossDrv}/lib/libfl.a
       mv libyywrap.o libyywrap-target.o
       ar x ${flex}/lib/libfl.a
       mv libyywrap.o libyywrap-host.o
@@ -27,13 +28,13 @@ stdenv.mkDerivation rec {
     '';
     postConfigure = ''
       sed -e "s@ $PWD/libyywrap-target.o@ $PWD/libyywrap-host.o@" -i doc/specs/Makefile
-    ''; 
+    '';
   };
 
   postInstall = ''
     mv -v $out/sbin/unix_chkpwd{,.orig}
     ln -sv /var/setuid-wrappers/unix_chkpwd $out/sbin/unix_chkpwd
-    '';
+  '';
 
   preConfigure = ''
     configureFlags="$configureFlags --includedir=$out/include/security"
diff --git a/pkgs/os-specific/linux/uclibc/default.nix b/pkgs/os-specific/linux/uclibc/default.nix
index 1ad392ad6fa..e7cce315e8c 100644
--- a/pkgs/os-specific/linux/uclibc/default.nix
+++ b/pkgs/os-specific/linux/uclibc/default.nix
@@ -33,8 +33,8 @@ let
     }
   '';
 
-  archMakeFlag = if (cross != null) then "ARCH=${cross.arch}" else "";
-  crossMakeFlag = if (cross != null) then "CROSS=${cross.config}-" else "";
+  archMakeFlag = if cross != null then "ARCH=${cross.arch}" else "";
+  crossMakeFlag = if cross != null then "CROSS=${cross.config}-" else "";
 
   # UCLIBC_SUSV4_LEGACY defines 'tmpnam', needed for gcc libstdc++ builds.
   nixConfig = ''
@@ -74,7 +74,7 @@ stdenv.mkDerivation {
   '';
 
   # Cross stripping hurts.
-  dontStrip = if (cross != null) then true else false;
+  dontStrip = cross != null;
 
   makeFlags = [ crossMakeFlag "VERBOSE=1" ];
 
diff --git a/pkgs/os-specific/linux/udisks/default.nix b/pkgs/os-specific/linux/udisks/default.nix
index b46efd46874..b53af52755f 100644
--- a/pkgs/os-specific/linux/udisks/default.nix
+++ b/pkgs/os-specific/linux/udisks/default.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
       lvm2 libatasmart intltool libuuid libxslt docbook_xsl
     ];
 
-  buildNativeInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig ];
 
   configureFlags = "--localstatedir=/var --enable-lvm2";
 
diff --git a/pkgs/os-specific/linux/upower/default.nix b/pkgs/os-specific/linux/upower/default.nix
index 6ae4c22f48a..cce12f7954a 100644
--- a/pkgs/os-specific/linux/upower/default.nix
+++ b/pkgs/os-specific/linux/upower/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
     [ dbus_glib polkit intltool libxslt docbook_xsl udev libusb1 ]
     ++ stdenv.lib.optional useSystemd systemd;
 
-  buildNativeInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig ];
 
   configureFlags =
     [ "--with-backend=linux" "--localstatedir=/var" ]
diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix
index 35d01739a2a..08f3f53e58e 100644
--- a/pkgs/os-specific/linux/util-linux/default.nix
+++ b/pkgs/os-specific/linux/util-linux/default.nix
@@ -1,13 +1,11 @@
 { stdenv, fetchurl, zlib, ncurses ? null, perl ? null }:
 
 stdenv.mkDerivation rec {
-  name = "util-linux-2.20.1";
+  name = "util-linux-2.21.2";
 
   src = fetchurl {
-    # This used to be mirror://kernel/linux/utils/util-linux, but it
-    # disappeared in the kernel.org meltdown.
-    url = "mirror://gentoo/distfiles/${name}.tar.bz2";
-    sha256 = "1q5vjcvw4f067c63vj2n3xggvk5prm11571x6vnqiav47vdbqvni";
+    url = "http://www.kernel.org/pub/linux/utils/util-linux/v2.21/${name}.tar.bz2";
+    sha256 = "0c1xp9pzwizxfk09anvjaz5cv8gvxracvvb6s84xiaxza679svq6";
   };
 
   patches = [ ./linux-specific-header.patch ];
diff --git a/pkgs/os-specific/linux/wpa_supplicant/default.nix b/pkgs/os-specific/linux/wpa_supplicant/default.nix
index b1bc15ff083..a69c5646d74 100644
--- a/pkgs/os-specific/linux/wpa_supplicant/default.nix
+++ b/pkgs/os-specific/linux/wpa_supplicant/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ openssl dbus_libs libnl ];
 
-  buildNativeInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig ];
 
   patches =
     [ (fetchurl {
diff --git a/pkgs/os-specific/linux/wpa_supplicant/gui.nix b/pkgs/os-specific/linux/wpa_supplicant/gui.nix
index 12ec08361a6..29591bf0335 100644
--- a/pkgs/os-specific/linux/wpa_supplicant/gui.nix
+++ b/pkgs/os-specific/linux/wpa_supplicant/gui.nix
@@ -7,7 +7,7 @@ stdenv.mkDerivation {
 
   buildInputs = [ qt4 ];
 
-  buildNativeInputs = [ inkscape ];
+  nativeBuildInputs = [ inkscape ];
 
   prePatch = "cd wpa_supplicant/wpa_gui-qt4";