summary refs log tree commit diff
path: root/pkgs/os-specific/linux
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-01-13 18:05:43 +0100
committerVladimír Čunát <vcunat@gmail.com>2015-01-13 18:07:11 +0100
commit1575bc652eeee758816d63efccd1ab6eca16d2c9 (patch)
treeab042157cc9f9304d9e05bb242681c7b7d0bb556 /pkgs/os-specific/linux
parent1c0477c08cfcb04d41bf7c0b828d642ce2956b4d (diff)
parent7637e71cee2b11d340c5ce99d777f6783a6b9885 (diff)
downloadnixlib-1575bc652eeee758816d63efccd1ab6eca16d2c9.tar
nixlib-1575bc652eeee758816d63efccd1ab6eca16d2c9.tar.gz
nixlib-1575bc652eeee758816d63efccd1ab6eca16d2c9.tar.bz2
nixlib-1575bc652eeee758816d63efccd1ab6eca16d2c9.tar.lz
nixlib-1575bc652eeee758816d63efccd1ab6eca16d2c9.tar.xz
nixlib-1575bc652eeee758816d63efccd1ab6eca16d2c9.tar.zst
nixlib-1575bc652eeee758816d63efccd1ab6eca16d2c9.zip
Merge branch 'master' into staging
Conflicts (simple):
	pkgs/os-specific/linux/util-linux/default.nix

It seems this merge creates a new stdenv hash,
because we had changes on both branches :-/
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r--pkgs/os-specific/linux/afuse/default.nix14
-rw-r--r--pkgs/os-specific/linux/cifs-utils/default.nix9
-rw-r--r--pkgs/os-specific/linux/firmware/iwlwifi/default.nix7
-rw-r--r--pkgs/os-specific/linux/flashbench/default.nix27
-rw-r--r--pkgs/os-specific/linux/kernel/common-config.nix3
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.10.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.14.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.16.nix17
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.17.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.18.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.2.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix12
-rw-r--r--pkgs/os-specific/linux/mstpd/default.nix24
-rw-r--r--pkgs/os-specific/linux/mstpd/fixes.patch72
-rw-r--r--pkgs/os-specific/linux/pam_krb5/default.nix8
-rw-r--r--pkgs/os-specific/linux/radeontop/default.nix37
-rw-r--r--pkgs/os-specific/linux/s6-linux-utils/default.nix20
-rw-r--r--pkgs/os-specific/linux/spl/git.nix17
-rw-r--r--pkgs/os-specific/linux/spl/install_prefix-git.patch173
-rw-r--r--pkgs/os-specific/linux/spl/kernel-3.16.patch34
-rw-r--r--pkgs/os-specific/linux/spl/kernel-3.17.patch175
-rw-r--r--pkgs/os-specific/linux/util-linux/default.nix2
-rw-r--r--pkgs/os-specific/linux/util-linux/rtcwake-search-PATH-for-shutdown.patch30
-rw-r--r--pkgs/os-specific/linux/zfs/bc151f7b312dea09c6ec5b9a320e65140789643a.patch84
-rw-r--r--pkgs/os-specific/linux/zfs/default.nix1
-rw-r--r--pkgs/os-specific/linux/zfs/git.nix12
-rw-r--r--pkgs/os-specific/linux/zfs/nix-build-git.patch133
-rw-r--r--pkgs/os-specific/linux/zfs/remove-lock-checks.patch64
28 files changed, 566 insertions, 429 deletions
diff --git a/pkgs/os-specific/linux/afuse/default.nix b/pkgs/os-specific/linux/afuse/default.nix
index 70c8f36105c7..4cf533110705 100644
--- a/pkgs/os-specific/linux/afuse/default.nix
+++ b/pkgs/os-specific/linux/afuse/default.nix
@@ -1,18 +1,18 @@
-{ stdenv, fetchurl, pkgconfig, fuse }:
+{ stdenv, fetchurl, pkgconfig, autoreconfHook, fuse }:
 
 stdenv.mkDerivation {
-  name = "afuse-0.2";
+  name = "afuse-0.4.1";
 
   src = fetchurl {
-    url = mirror://sourceforge/afuse/0.2/afuse-0.2.tar.gz;
-    sha256 = "1lj2jdks0bgwxbjqp5a9f7qdry19kar6pg7dh1ml98gapx9siylj";
+    url = https://github.com/pcarrier/afuse/archive/v0.4.1.tar.gz;
+    sha256 = "1sfhicmxppkvdd4z9klfn63snb71gr9hff6xij1gzk94xg6m0ycc";
   };
 
-  buildInputs = [ pkgconfig fuse ];
+  buildInputs = [ autoreconfHook pkgconfig fuse ];
 
-  meta = { 
+  meta = {
     description = "Automounter in userspace";
-    homepage = http://sourceforge.net/projects/afuse;
+    homepage = https://github.com/pcarrier/afuse;
     license = stdenv.lib.licenses.gpl2;
     maintainers = [ stdenv.lib.maintainers.marcweber ];
     platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/os-specific/linux/cifs-utils/default.nix b/pkgs/os-specific/linux/cifs-utils/default.nix
index 0183a606b2e1..5126a58e1a3b 100644
--- a/pkgs/os-specific/linux/cifs-utils/default.nix
+++ b/pkgs/os-specific/linux/cifs-utils/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, kerberos, keyutils, pam }:
 
 stdenv.mkDerivation rec {
   name = "cifs-utils-6.4";
@@ -8,11 +8,14 @@ stdenv.mkDerivation rec {
     sha256 = "1qz6d2xg4z1if0hy7qwyzgcr59l0alkhci6gxgjdldglda967z1q";
   };
 
+  buildInputs = [ kerberos keyutils pam ];
+
   makeFlags = "root_sbindir=$(out)/sbin";
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://www.samba.org/linux-cifs/cifs-utils/;
     description = "Tools for managing Linux CIFS client filesystems";
-    platforms = stdenv.lib.platforms.linux;
+    platforms = platforms.linux;
+    license = licenses.lgpl3;
   };
 }
diff --git a/pkgs/os-specific/linux/firmware/iwlwifi/default.nix b/pkgs/os-specific/linux/firmware/iwlwifi/default.nix
index f6df3bb50f42..3b36521ffa78 100644
--- a/pkgs/os-specific/linux/firmware/iwlwifi/default.nix
+++ b/pkgs/os-specific/linux/firmware/iwlwifi/default.nix
@@ -39,10 +39,9 @@ let
     { name = "7265-ucode-25.228.9.0"; sha256 = "1dv9bai1s6vdigsahbrxjwlndnp2dsgkqz8j7021d34s99kbi6z8"; }
 
     # Kernel 3.17+
-    { name = "7260-ucode-23.10.10.0"; sha256 = "0n8blgwj3765zyripgbawbi3h97qyficdv72mmzf8hznk30p6kxg"; }
-    { name = "3160-ucode-23.10.10.0"; sha256 = "0332j710495980avzvhjixnr6f4f8v0srpnqn05x1q0c9sw6n7pp"; }
-    # Bad archive, assumed a problem with the served blob
-    #{ name = "7265-ucode-23.10.10.0"; sha256 = "1v2q9b3dah1p4mnmvv1blvi9awjcbiafmjyll5hi1hr6p28xwhva"; }
+    { name = "7260-ucode-23.11.10.0"; sha256 = "1d9w7kd3h3632qmwb44943lxdafjn3ii8ha9wdvqri3b8fjfn7sa"; }
+    { name = "3160-ucode-23.11.10.0"; sha256 = "0ijpgfzz8735rsbkc6mvk3w7f1v9rr9dgy1l79vzmzc1vh2zpbdm"; }
+    { name = "7265-ucode-23.11.10.0"; sha256 = "1az8nq6z1ns1220309wp8jq1sc5flz2ac5k41pgj50503h54rlvi"; }
   ];
 
   fetchPackage =
diff --git a/pkgs/os-specific/linux/flashbench/default.nix b/pkgs/os-specific/linux/flashbench/default.nix
new file mode 100644
index 000000000000..0a6364f07df5
--- /dev/null
+++ b/pkgs/os-specific/linux/flashbench/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchgit }:
+
+stdenv.mkDerivation rec {
+  name = "flashbench-${version}";
+  version = "2012-06-06";
+
+  src = fetchgit {
+    url = "https://github.com/bradfa/flashbench.git";
+    rev = "2e30b1968a66147412f21002ea844122a0d5e2f0";
+    sha256 = "037rhd2alwfip9qk78cy8fwwnc2kdyzccsyc7v2zpmvl4vvpvnhg";
+  };
+
+  installPhase = ''
+    install -d -m755 $out/bin $out/share/doc/flashbench
+    install -v -m755 flashbench $out/bin
+    install -v -m755 erase $out/bin/flashbench-erase
+    install -v -m644 README $out/share/doc/flashbench
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Testing tool for flash based memory devices";
+    homepage = https://github.com/bradfa/flashbench;
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.rycee ];
+  };
+}
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index 48493044065c..ef061459191e 100644
--- a/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/pkgs/os-specific/linux/kernel/common-config.nix
@@ -7,6 +7,9 @@ with stdenv.lib;
   DEBUG_KERNEL y
   PM_ADVANCED_DEBUG y
   PM_RUNTIME y
+  ${optionalString (versionAtLeast version "3.10") ''
+    X86_INTEL_PSTATE y
+  ''}
   TIMER_STATS y
   ${optionalString (versionOlder version "3.10") ''
     USB_SUSPEND y
diff --git a/pkgs/os-specific/linux/kernel/linux-3.10.nix b/pkgs/os-specific/linux/kernel/linux-3.10.nix
index 80143bb49050..fbcab796ddac 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.10.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.10.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "3.10.63";
+  version = "3.10.64";
   extraMeta.branch = "3.10";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-    sha256 = "0ajgw7xr4ilbssr9lcs4078584kr5nlycc3gc28ywc29z7vi8sjm";
+    sha256 = "0k3n5q4d5y88xady3rdjvy3p3g12gk1fxszc27sw7a752hv41qpq";
   };
 
   features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.14.nix b/pkgs/os-specific/linux/kernel/linux-3.14.nix
index 7d4c741193f9..3ed4bf211071 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.14.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.14.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "3.14.27";
+  version = "3.14.28";
   # Remember to update grsecurity!
   extraMeta.branch = "3.14";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-    sha256 = "09fxykm280zy3jq2zak6qiglsgv4756ryqwmx23hl014rk8bzszn";
+    sha256 = "08akxzqpj3708ixraxks81bwd5c69nzz4n6ysb53zpsl6h7vybbp";
   };
 
   features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.16.nix b/pkgs/os-specific/linux/kernel/linux-3.16.nix
deleted file mode 100644
index 6997d51a0f1a..000000000000
--- a/pkgs/os-specific/linux/kernel/linux-3.16.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ stdenv, fetchurl, ... } @ args:
-
-import ./generic.nix (args // rec {
-  version = "3.16.7";
-  extraMeta.branch = "3.16";
-
-  src = fetchurl {
-    url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-    sha256 = "0vm3ahw6wzq72z6jim05pcj9gzjw8jc4r1dr5wnfl810nib89pbk";
-  };
-
-  features.iwlwifi = true;
-  features.efiBootStub = true;
-  features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
-  features.netfilterRPFilter = true;
-} // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-3.17.nix b/pkgs/os-specific/linux/kernel/linux-3.17.nix
index a459e33f4d66..5c1aa2a04a14 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.17.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.17.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "3.17.7";
+  version = "3.17.8";
   extraMeta.branch = "3.17";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-    sha256 = "074f56sz22wqnn21gamwf63llhsqc2hgb7dzkbkd5gqjx6pfdj53";
+    sha256 = "0g2q0pnsbsfwzk9rl2ggkfhsmj9bzmy9lccclpd98zfw7kflz8ca";
   };
 
   features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.18.nix b/pkgs/os-specific/linux/kernel/linux-3.18.nix
index e12588e052ba..b3e46a8ef8b1 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.18.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.18.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "3.18.1";
+  version = "3.18.2";
   # Remember to update grsecurity!
   extraMeta.branch = "3.18";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-    sha256 = "13m0s2m0zg304w86yvcmxgbjl41c4kc420044avi8rnr1xwcscsq";
+    sha256 = "1gqs5c3s2qm5slhmqwdrrnkjn0w4mwaj71q79x8qxhyxvnagm40h";
   };
 
   features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.2.nix b/pkgs/os-specific/linux/kernel/linux-3.2.nix
index 330b643e46a2..994d14ecae58 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.2.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.2.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "3.2.65";
+  version = "3.2.66";
   extraMeta.branch = "3.2";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-    sha256 = "1j9ibivhrkav5dfb7pv5m2j2y4577nqxp63npcpmna7wp7y132wm";
+    sha256 = "09l0rfv10c5kzlgfhi339ly496f6j9ichq3arpvkb3fivjkxcm45";
   };
 
   # We don't provide these patches if grsecurity is enabled, because
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 8c707c7e570d..6265a2eea18b 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -60,17 +60,17 @@ rec {
   };
 
   grsecurity_stable = grsecPatch
-    { kversion  = "3.14.27";
-      revision  = "201412280859";
+    { kversion  = "3.14.28";
+      revision  = "201501120819";
       branch    = "stable";
-      sha256    = "185sq4bsgwmpq9g0g5fhm69ba875xhxha2rs0cn6n647v90rxrjk";
+      sha256    = "0ipgaifbbzn75kmkrrvq3rfijdddanivq1lidrc3gc4aclblnzs8";
     };
 
   grsecurity_unstable = grsecPatch
-    { kversion  = "3.18.1";
-      revision  = "201412281149";
+    { kversion  = "3.18.2";
+      revision  = "201501120821";
       branch    = "test";
-      sha256    = "10pq6lslfn6ck7pm1651s6pd5mqmjxvqv3iv70qrpwwb2gdhpdin";
+      sha256    = "146vy632wvjlnnvbh3kc7pssz71x0zdgwglpk1i68pm8rnq4awig";
     };
 
   grsec_fix_path =
diff --git a/pkgs/os-specific/linux/mstpd/default.nix b/pkgs/os-specific/linux/mstpd/default.nix
new file mode 100644
index 000000000000..374300db460a
--- /dev/null
+++ b/pkgs/os-specific/linux/mstpd/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchsvn }:
+
+stdenv.mkDerivation rec {
+  name = "mstpd-svn-${toString version}";
+  version = 61;
+
+  src = fetchsvn {
+    url = "svn://svn.code.sf.net/p/mstpd/code/trunk";
+    rev = version;
+    sha256 = "0n5vqqqq8hk6iqdz100j9ps4zkz71vyl5qgz5bzjhayab2dyq1fd";
+  };
+
+  patches = [ ./fixes.patch ];
+
+  installFlags = [ "DESTDIR=\${out}" ];
+
+  meta = with stdenv.lib; {
+    description = "Multiple Spanning Tree Protocol daemon";
+    homepage = http://sourceforge.net/projects/mstpd/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ wkennington ];
+  };
+}
diff --git a/pkgs/os-specific/linux/mstpd/fixes.patch b/pkgs/os-specific/linux/mstpd/fixes.patch
new file mode 100644
index 000000000000..7303e1d7b4d3
--- /dev/null
+++ b/pkgs/os-specific/linux/mstpd/fixes.patch
@@ -0,0 +1,72 @@
+diff --git a/Makefile b/Makefile
+index dde9f81..5af7cab 100644
+--- a/Makefile
++++ b/Makefile
+@@ -34,7 +34,6 @@ install: all
+ 	-mkdir -pv $(DESTDIR)/sbin
+ 	install -m 755 mstpd $(DESTDIR)/sbin/mstpd
+ 	install -m 755 mstpctl $(DESTDIR)/sbin/mstpctl
+-	install -m 755 bridge-stp /sbin/bridge-stp
+ 	-mkdir -pv $(DESTDIR)/lib/mstpctl-utils/
+ 	cp -rv lib/* $(DESTDIR)/lib/mstpctl-utils/
+ 	gzip -f $(DESTDIR)/lib/mstpctl-utils/mstpctl.8
+@@ -42,8 +41,9 @@ install: all
+ 	if [ -d $(DESTDIR)/etc/network/if-pre-up.d ] ; then ln -sf /lib/mstpctl-utils/ifupdown.sh $(DESTDIR)/etc/network/if-pre-up.d/mstpctl ; fi
+ 	if [ -d $(DESTDIR)/etc/network/if-pre-up.d ] ; then ln -sf /lib/mstpctl-utils/ifupdown.sh $(DESTDIR)/etc/network/if-post-down.d/mstpctl ; fi
+ 	if [ -d $(DESTDIR)/etc/bash_completion.d ] ; then ln -sf /lib/mstpctl-utils/bash_completion $(DESTDIR)/etc/bash_completion.d/mstpctl ; fi
+-	ln -sf /lib/mstpctl-utils/mstpctl.8.gz $(DESTDIR)/usr/share/man/man8/mstpctl.8.gz
+-	ln -sf /lib/mstpctl-utils/mstpctl-utils-interfaces.5.gz $(DESTDIR)/usr/share/man/man5/mstpctl-utils-interfaces.5.gz
++	mkdir -p $(DESTDIR)/share/man/man8 $(DESTDIR)/share/man/man5
++	ln -sf /lib/mstpctl-utils/mstpctl.8.gz $(DESTDIR)/share/man/man8/mstpctl.8.gz
++	ln -sf /lib/mstpctl-utils/mstpctl-utils-interfaces.5.gz $(DESTDIR)/share/man/man5/mstpctl-utils-interfaces.5.gz
+ 
+ romfs: all
+ 	$(ROMFSINST) /sbin/mstpd
+diff --git a/bridge_track.c b/bridge_track.c
+index c92fdf6..0c01aec 100644
+--- a/bridge_track.c
++++ b/bridge_track.c
+@@ -28,6 +28,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <linux/param.h>
++#include <linux/in6.h>
+ #include <linux/if_bridge.h>
+ #include <asm/byteorder.h>
+ 
+diff --git a/broadcom_xstrata/driver_deps.c b/broadcom_xstrata/driver_deps.c
+index e72e9e3..5194253 100644
+--- a/broadcom_xstrata/driver_deps.c
++++ b/broadcom_xstrata/driver_deps.c
+@@ -14,6 +14,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <asm/byteorder.h>
++#include <linux/in6.h>
+ #include <linux/if_bridge.h>
+ 
+ #include "log.h"
+diff --git a/ctl_functions.h b/ctl_functions.h
+index 9c3b914..df464de 100644
+--- a/ctl_functions.h
++++ b/ctl_functions.h
+@@ -27,6 +27,7 @@
+ #ifndef CTL_SOCKET_H
+ #define CTL_SOCKET_H
+ 
++#include <linux/in6.h>
+ #include <linux/if_bridge.h>
+ #include <asm/byteorder.h>
+ 
+diff --git a/mstp.c b/mstp.c
+index 1c6a2df..b2a1acd 100644
+--- a/mstp.c
++++ b/mstp.c
+@@ -37,6 +37,7 @@
+ 
+ #include <string.h>
+ #include <sys/time.h>
++#include <linux/in6.h>
+ #include <linux/if_bridge.h>
+ #include <asm/byteorder.h>
+ 
diff --git a/pkgs/os-specific/linux/pam_krb5/default.nix b/pkgs/os-specific/linux/pam_krb5/default.nix
index 5c0cc033de9f..40e7e1216a64 100644
--- a/pkgs/os-specific/linux/pam_krb5/default.nix
+++ b/pkgs/os-specific/linux/pam_krb5/default.nix
@@ -1,17 +1,17 @@
 { stdenv, fetchurl, pam, kerberos }:
 
 stdenv.mkDerivation rec {
-  name = "pam_krb5-2.4.9";
+  name = "pam-krb5-4.7";
 
   src = fetchurl {
-    url = "https://fedorahosted.org/releases/p/a/pam_krb5/${name}.tar.gz";
-    sha256 = "0vcb35shzp406jvvz0pkgqm8qq1qzhgwmkl0nrm0wrrkqlr22rfb";
+    url = "http://archives.eyrie.org/software/kerberos/${name}.tar.gz";
+    sha256 = "04klg9a2rhdz0a2dw4f0ybcm28vcbab6lrynwq7rm4sn0hnzakwv";
   };
 
   buildInputs = [ pam kerberos ];
 
   meta = with stdenv.lib; {
-    homepage = https://fedorahosted.org/pam_krb5;
+    homepage = http://www.eyrie.org/~eagle/software/pam-krb5/;
     description = "PAM module allowing PAM-aware applications to authenticate users by performing an AS exchange with a Kerberos KDC";
     longDescription = ''
       pam_krb5 can optionally convert Kerberos 5 credentials to Kerberos IV
diff --git a/pkgs/os-specific/linux/radeontop/default.nix b/pkgs/os-specific/linux/radeontop/default.nix
new file mode 100644
index 000000000000..921021833c1a
--- /dev/null
+++ b/pkgs/os-specific/linux/radeontop/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchgit, pkgconfig, gettext, ncurses, libdrm, libpciaccess }:
+
+stdenv.mkDerivation rec {
+  name = "radeontop-${version}";
+  version = "v0.8-8-g575a416";
+
+  src = fetchgit {
+    url = git://github.com/clbr/radeontop.git;
+    rev = "575a416596dbedb25bc6f3f0b16a0e2296fbb9bb";
+    sha256 = "6100a7159384cfcd71e59ef7096450e975d01786ee4e3a7cf9c0e56045c4ac91";
+  };
+
+  buildInputs = [ pkgconfig gettext ncurses libdrm libpciaccess ];
+
+  enableParallelBuilding = true;
+
+  patchPhase = ''
+    substituteInPlace getver.sh --replace ver=unknown ver=${version}
+  '';
+
+  makeFlags = "PREFIX=$(out)";
+
+  meta = with stdenv.lib; {
+    description = "Top-like tool for viewing AMD Radeon GPU utilization";
+    longDescription = ''
+      View GPU utilization, both for the total activity percent and individual
+      blocks. Supports R600 and later cards: even Southern Islands should work.
+      Works with both the open drivers and AMD Catalyst. Total GPU utilization
+      is also valid for OpenCL loads; the other blocks are only useful for GL
+      loads. Requires root rights or other permissions to read /dev/mem.
+    '';
+    homepage = https://github.com/clbr/radeontop;
+    platforms = platforms.linux;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ rycee nckx ];
+  };
+}
diff --git a/pkgs/os-specific/linux/s6-linux-utils/default.nix b/pkgs/os-specific/linux/s6-linux-utils/default.nix
index b7a546a3ea06..42a4357c74cf 100644
--- a/pkgs/os-specific/linux/s6-linux-utils/default.nix
+++ b/pkgs/os-specific/linux/s6-linux-utils/default.nix
@@ -1,12 +1,8 @@
-{ stdenv
-, fetchurl
-, skalibs
-, skarnetConfCompile
-}:
+{ stdenv, fetchurl, skalibs }:
 
 let
 
-  version = "1.0.3.1";
+  version = "2.0.0.0";
 
 in stdenv.mkDerivation rec {
 
@@ -14,12 +10,18 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://www.skarnet.org/software/s6-linux-utils/${name}.tar.gz";
-    sha256 = "1s17g03z5hfpiz32g001g5wyamyvn9l36fr2csk3k7r0jkqfnl0d";
+    sha256 = "0lfgfwnk81vjlkvmr1gzknz9swgcrp5s7x19dfkw6shvi95fyirh";
   };
 
-  buildInputs = [ skalibs skarnetConfCompile ];
+  dontDisableStatic = true;
 
-  sourceRoot = "admin/${name}";
+  configureFlags = [
+    "--includedir=\${prefix}/include"
+    "--with-sysdeps=${skalibs}/lib/skalibs/sysdeps"
+    "--with-include=${skalibs}/include"
+    "--with-lib=${skalibs}/lib"
+    "--with-dynlib=${skalibs}/lib"
+  ];
 
   meta = {
     homepage = http://www.skarnet.org/software/s6-linux-utils/;
diff --git a/pkgs/os-specific/linux/spl/git.nix b/pkgs/os-specific/linux/spl/git.nix
index 93629495164b..369e69cf1c51 100644
--- a/pkgs/os-specific/linux/spl/git.nix
+++ b/pkgs/os-specific/linux/spl/git.nix
@@ -1,14 +1,15 @@
 { stdenv, fetchgit, kernel, perl, autoconf, automake, libtool, coreutils, gawk }:
 
 stdenv.mkDerivation {
-  name = "spl-0.6.3-${kernel.version}";
+  name = "spl-0.6.4-${kernel.version}";
+
   src = fetchgit {
     url = git://github.com/zfsonlinux/spl.git;
-    rev = "31cb5383bff0fddc5058973e32a6f2c446d45e59";
-    sha256 = "0mcivbddms8kbapbs9x6achqyvh5i6h1rd2b3jm8g5yjn0flc5gl";
+    rev = "a3c1eb77721a0d511b4fe7111bb2314686570c4b";
+    sha256 = "050qvaw45rxlfwm3dxlxw89p3d3hcnkls6k1s4anlzb4qz5x5ph9";
   };
 
-  patches = [ ./install_prefix.patch ./const.patch ./kernel-3.16.patch ./kernel-3.17.patch ];
+  patches = [ ./const.patch ./install_prefix-git.patch ];
 
   buildInputs = [ perl autoconf automake libtool ];
 
@@ -23,10 +24,10 @@ stdenv.mkDerivation {
     substituteInPlace ./module/splat/splat-linux.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin"
   '';
 
-  configureFlags = ''
-     --with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source
-     --with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build
-  '';
+  configureFlags = [
+    "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
+    "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
+  ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/os-specific/linux/spl/install_prefix-git.patch b/pkgs/os-specific/linux/spl/install_prefix-git.patch
new file mode 100644
index 000000000000..0f12f531f7ae
--- /dev/null
+++ b/pkgs/os-specific/linux/spl/install_prefix-git.patch
@@ -0,0 +1,173 @@
+diff --git a/Makefile.am b/Makefile.am
+index 89af931..674420c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -12,10 +12,10 @@ endif
+ if CONFIG_KERNEL
+ SUBDIRS += module
+ 
+-extradir = @prefix@/src/spl-$(VERSION)
++extradir = @prefix@/libexec/spl
+ extra_HEADERS = spl.release.in spl_config.h.in
+ 
+-kerneldir = @prefix@/src/spl-$(VERSION)/$(LINUX_VERSION)
++kerneldir = @prefix@/libexec/spl/$(LINUX_VERSION)
+ nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS)
+ endif
+ 
+diff --git a/include/Makefile.am b/include/Makefile.am
+index 3200222..4a47aaa 100644
+--- a/include/Makefile.am
++++ b/include/Makefile.am
+@@ -13,6 +13,6 @@ USER_H =
+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/spl-$(VERSION)/include
++kerneldir = @prefix@/libexec/spl/include
+ kernel_HEADERS = $(KERNEL_H)
+ endif
+diff --git a/include/fs/Makefile.am b/include/fs/Makefile.am
+index e0da4b3..d6d7af0 100644
+--- a/include/fs/Makefile.am
++++ b/include/fs/Makefile.am
+@@ -8,6 +8,6 @@ USER_H =
+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/spl-$(VERSION)/include/fs
++kerneldir = @prefix@/libexec/spl/include/fs
+ kernel_HEADERS = $(KERNEL_H)
+ endif
+diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am
+index 1cca44a..e0d843b 100644
+--- a/include/linux/Makefile.am
++++ b/include/linux/Makefile.am
+@@ -19,6 +19,6 @@ USER_H =
+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/spl-$(VERSION)/include/linux
++kerneldir = @prefix@/libexec/spl/include/linux
+ kernel_HEADERS = $(KERNEL_H)
+ endif
+diff --git a/include/rpc/Makefile.am b/include/rpc/Makefile.am
+index cfc8246..4fbd33d 100644
+--- a/include/rpc/Makefile.am
++++ b/include/rpc/Makefile.am
+@@ -9,6 +9,6 @@ USER_H =
+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/spl-$(VERSION)/include/rpc
++kerneldir = @prefix@/libexec/spl/include/rpc
+ kernel_HEADERS = $(KERNEL_H)
+ endif
+diff --git a/include/sharefs/Makefile.am b/include/sharefs/Makefile.am
+index 10e7093..febecdf 100644
+--- a/include/sharefs/Makefile.am
++++ b/include/sharefs/Makefile.am
+@@ -8,6 +8,6 @@ USER_H =
+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/spl-$(VERSION)/include/sharefs
++kerneldir = @prefix@/libexec/spl/include/sharefs
+ kernel_HEADERS = $(KERNEL_H)
+ endif
+diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am
+index 2d21c57..3958cfd 100644
+--- a/include/sys/Makefile.am
++++ b/include/sys/Makefile.am
+@@ -104,7 +104,7 @@ USER_H =
+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/spl-$(VERSION)/include/sys
++kerneldir = @prefix@/libexec/spl/include/sys
+ kernel_HEADERS = $(KERNEL_H)
+ endif
+ 
+diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am
+index 2821cbe..a84ce8e 100644
+--- a/include/sys/fm/Makefile.am
++++ b/include/sys/fm/Makefile.am
+@@ -9,6 +9,6 @@ USER_H =
+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fm
++kerneldir = @prefix@/libexec/spl/include/sys/fm
+ kernel_HEADERS = $(KERNEL_H)
+ endif
+diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am
+index 581083e..0c35fb7 100644
+--- a/include/sys/fs/Makefile.am
++++ b/include/sys/fs/Makefile.am
+@@ -8,6 +8,6 @@ USER_H =
+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fs
++kerneldir = @prefix@/libexec/spl/include/sys/fs
+ kernel_HEADERS = $(KERNEL_H)
+ endif
+diff --git a/include/sys/sysevent/Makefile.am b/include/sys/sysevent/Makefile.am
+index 63d9af3..de1aa18 100644
+--- a/include/sys/sysevent/Makefile.am
++++ b/include/sys/sysevent/Makefile.am
+@@ -8,6 +8,6 @@ USER_H =
+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/sysevent
++kerneldir = @prefix@/libexec/spl/include/sys/sysevent
+ kernel_HEADERS = $(KERNEL_H)
+ endif
+diff --git a/include/util/Makefile.am b/include/util/Makefile.am
+index b721b50..cbb9a05 100644
+--- a/include/util/Makefile.am
++++ b/include/util/Makefile.am
+@@ -9,6 +9,6 @@ USER_H =
+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/spl-$(VERSION)/include/util
++kerneldir = @prefix@/libexec/spl/include/util
+ kernel_HEADERS = $(KERNEL_H)
+ endif
+diff --git a/include/vm/Makefile.am b/include/vm/Makefile.am
+index 7faab0a..8148b3d 100644
+--- a/include/vm/Makefile.am
++++ b/include/vm/Makefile.am
+@@ -10,6 +10,6 @@ USER_H =
+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/spl-$(VERSION)/include/vm
++kerneldir = @prefix@/libexec/spl/include/vm
+ kernel_HEADERS = $(KERNEL_H)
+ endif
+diff --git a/module/Makefile.in b/module/Makefile.in
+index 41c1010..3141397 100644
+--- a/module/Makefile.in
++++ b/module/Makefile.in
+@@ -21,15 +21,15 @@ clean:
+ modules_install:
+ 	@# Install the kernel modules
+ 	$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
+-		INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
++		INSTALL_MOD_PATH=@prefix@/$(INSTALL_MOD_PATH) \
+ 		INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
+ 		KERNELRELEASE=@LINUX_VERSION@
+ 	@# Remove extraneous build products when packaging
+-	kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
++	kmoddir=@prefix@/$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
+ 	if [ -n $$kmoddir ]; then \
+ 		find $$kmoddir -name 'modules.*' | xargs $(RM); \
+ 	fi
+-	sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
++	sysmap=@prefix@/$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
+ 	if [ -f $$sysmap ]; then \
+ 		depmod -ae -F $$sysmap @LINUX_VERSION@; \
+ 	fi
diff --git a/pkgs/os-specific/linux/spl/kernel-3.16.patch b/pkgs/os-specific/linux/spl/kernel-3.16.patch
deleted file mode 100644
index 25641c7a384f..000000000000
--- a/pkgs/os-specific/linux/spl/kernel-3.16.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From e3020723dc43af2bc22af0d68571a61daf9b44d0 Mon Sep 17 00:00:00 2001
-From: Turbo Fredriksson <turbo@bayour.com>
-Date: Sun, 14 Sep 2014 15:47:22 +0000
-Subject: [PATCH] Linux 3.16 compat: smp_mb__after_clear_bit()
-
-The smp_mb__{before,after}_clear_bit functions have been renamed
-smp_mb__{before,after}_atomic.  Rather than adding a compatibility
-function to handle this the code has been updated to use smp_wmb().
-
-This has the advantage of being a stable functionally equivalent
-interface.  On many architectures smp_mb__after_clear_bit() expands
-to smp_wmb().  Others might be able to do something slightly more
-efficient but this will be safe and correct on all of them.
-
-Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #386
----
- module/spl/spl-kmem.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
-index 6de513e..79954eb 100644
---- a/module/spl/spl-kmem.c
-+++ b/module/spl/spl-kmem.c
-@@ -2365,7 +2365,7 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count)
- 
- 	spl_slab_reclaim(skc, count, 1);
- 	clear_bit(KMC_BIT_REAPING, &skc->skc_flags);
--	smp_mb__after_clear_bit();
-+	smp_wmb();
- 	wake_up_bit(&skc->skc_flags, KMC_BIT_REAPING);
- out:
- 	atomic_dec(&skc->skc_ref);
diff --git a/pkgs/os-specific/linux/spl/kernel-3.17.patch b/pkgs/os-specific/linux/spl/kernel-3.17.patch
deleted file mode 100644
index f5ce2c8805d8..000000000000
--- a/pkgs/os-specific/linux/spl/kernel-3.17.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From 2fc44f66ec9b83069593d87cf311069458c0d5ae Mon Sep 17 00:00:00 2001
-From: Ned Bass <bass6@llnl.gov>
-Date: Fri, 8 Aug 2014 17:41:22 -0700
-Subject: [PATCH] Linux 3.17 compat: remove wait_on_bit action function
-
-Linux kernel 3.17 removes the action function argument from
-wait_on_bit().  Add autoconf test and compatibility macro to support
-the new interface.
-
-The former "wait_on_bit" interface required an 'action' function to
-be provided which does the actual waiting. There were over 20 such
-functions in the kernel, many of them identical, though most cases
-can be satisfied by one of just two functions: one which uses
-io_schedule() and one which just uses schedule().  This API change
-was made to consolidate all of those redundant wait functions.
-
-References: torvalds/linux@7431620
-
-Signed-off-by: Ned Bass <bass6@llnl.gov>
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #378
----
- config/spl-build.m4         | 26 ++++++++++++++++++++++++++
- include/linux/Makefile.am   |  1 +
- include/linux/wait_compat.h | 45 +++++++++++++++++++++++++++++++++++++++++++++
- include/sys/types.h         |  1 +
- module/spl/spl-kmem.c       | 11 ++---------
- 5 files changed, 75 insertions(+), 9 deletions(-)
- create mode 100644 include/linux/wait_compat.h
-
-diff --git a/config/spl-build.m4 b/config/spl-build.m4
-index eef5233..2514d8c 100644
---- a/config/spl-build.m4
-+++ b/config/spl-build.m4
-@@ -94,6 +94,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
- 	SPL_AC_2ARGS_VFS_GETATTR
- 	SPL_AC_USLEEP_RANGE
- 	SPL_AC_KMEM_CACHE_ALLOCFLAGS
-+	SPL_AC_WAIT_ON_BIT
- ])
- 
- AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
-@@ -2570,3 +2571,28 @@ AC_DEFUN([SPL_AC_KMEM_CACHE_ALLOCFLAGS], [
- 		])
- 	])
- ])
-+
-+dnl #
-+dnl # 3.17 API change,
-+dnl # wait_on_bit() no longer requires an action argument. The former
-+dnl # "wait_on_bit" interface required an 'action' function to be provided
-+dnl # which does the actual waiting. There were over 20 such functions in the
-+dnl # kernel, many of them identical, though most cases can be satisfied by one
-+dnl # of just two functions: one which uses io_schedule() and one which just
-+dnl # uses schedule().  This API change was made to consolidate all of those
-+dnl # redundant wait functions.
-+dnl #
-+AC_DEFUN([SPL_AC_WAIT_ON_BIT], [
-+	AC_MSG_CHECKING([whether wait_on_bit() takes an action])
-+	SPL_LINUX_TRY_COMPILE([
-+		#include <linux/wait.h>
-+	],[
-+		int (*action)(void *) = NULL;
-+		wait_on_bit(NULL, 0, action, 0);
-+	],[
-+		AC_MSG_RESULT(yes)
-+		AC_DEFINE(HAVE_WAIT_ON_BIT_ACTION, 1, [yes])
-+	],[
-+		AC_MSG_RESULT(no)
-+	])
-+])
-diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am
-index 59f2ec5..ec7023d 100644
---- a/include/linux/Makefile.am
-+++ b/include/linux/Makefile.am
-@@ -17,6 +17,7 @@ KERNEL_H = \
- 	$(top_srcdir)/include/linux/sysctl_compat.h \
- 	$(top_srcdir)/include/linux/time_compat.h \
- 	$(top_srcdir)/include/linux/uaccess_compat.h \
-+	$(top_srcdir)/include/linux/wait_compat.h \
- 	$(top_srcdir)/include/linux/zlib_compat.h
- 
- USER_H =
-diff --git a/include/linux/wait_compat.h b/include/linux/wait_compat.h
-new file mode 100644
-index 0000000..66f9a9a
---- /dev/null
-+++ b/include/linux/wait_compat.h
-@@ -0,0 +1,45 @@
-+/*****************************************************************************\
-+ *  Copyright (C) 2007-2014 Lawrence Livermore National Security, LLC.
-+ *  Copyright (C) 2007 The Regents of the University of California.
-+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
-+ *  Written by Brian Behlendorf <behlendorf1@llnl.gov>.
-+ *  UCRL-CODE-235197
-+ *
-+ *  This file is part of the SPL, Solaris Porting Layer.
-+ *  For details, see <http://zfsonlinux.org/>.
-+ *
-+ *  The SPL is free software; you can redistribute it and/or modify it
-+ *  under the terms of the GNU General Public License as published by the
-+ *  Free Software Foundation; either version 2 of the License, or (at your
-+ *  option) any later version.
-+ *
-+ *  The SPL is distributed in the hope that it will be useful, but WITHOUT
-+ *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-+ *  for more details.
-+ *
-+ *  You should have received a copy of the GNU General Public License along
-+ *  with the SPL.  If not, see <http://www.gnu.org/licenses/>.
-+\*****************************************************************************/
-+
-+#ifndef _SPL_WAIT_COMPAT_H
-+#define _SPL_WAIT_COMPAT_H
-+
-+
-+#ifndef HAVE_WAIT_ON_BIT_ACTION
-+#  define spl_wait_on_bit(word, bit, mode) wait_on_bit(word, bit, mode)
-+#else
-+
-+static inline int
-+spl_bit_wait(void *word)
-+{
-+        schedule();
-+        return 0;
-+}
-+
-+#define spl_wait_on_bit(word, bit, mode)			\
-+	wait_on_bit(word, bit, spl_bit_wait, mode)
-+
-+#endif /* HAVE_WAIT_ON_BIT_ACTION */
-+
-+#endif /* SPL_WAIT_COMPAT_H */
-diff --git a/include/sys/types.h b/include/sys/types.h
-index decb6bb..fcec0fa 100644
---- a/include/sys/types.h
-+++ b/include/sys/types.h
-@@ -43,6 +43,7 @@
- #include <linux/zlib_compat.h>
- #include <linux/mm_compat.h>
- #include <linux/delay.h>
-+#include <linux/wait_compat.h>
- 
- #ifndef HAVE_UINTPTR_T
- typedef unsigned long			uintptr_t;
-diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
-index 0a9d775..6de513e 100644
---- a/module/spl/spl-kmem.c
-+++ b/module/spl/spl-kmem.c
-@@ -1900,13 +1900,6 @@ spl_cache_grow_wait(spl_kmem_cache_t *skc)
- 	return !test_bit(KMC_BIT_GROWING, &skc->skc_flags);
- }
- 
--static int
--spl_cache_reclaim_wait(void *word)
--{
--	schedule();
--	return 0;
--}
--
- /*
-  * No available objects on any slabs, create a new slab.  Note that this
-  * functionality is disabled for KMC_SLAB caches which are backed by the
-@@ -1928,8 +1921,8 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj)
- 	 * then return so the local magazine can be rechecked for new objects.
- 	 */
- 	if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) {
--		rc = wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING,
--		    spl_cache_reclaim_wait, TASK_UNINTERRUPTIBLE);
-+		rc = spl_wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING,
-+		    TASK_UNINTERRUPTIBLE);
- 		SRETURN(rc ? rc : -EAGAIN);
- 	}
- 
diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix
index 3715a93d9328..8842e76362a3 100644
--- a/pkgs/os-specific/linux/util-linux/default.nix
+++ b/pkgs/os-specific/linux/util-linux/default.nix
@@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6";
   };
 
+  patches = [ ./rtcwake-search-PATH-for-shutdown.patch ];
+
   #FIXME: make it also work on non-nixos?
   postPatch = ''
     # Substituting store paths would create a circular dependency on systemd
diff --git a/pkgs/os-specific/linux/util-linux/rtcwake-search-PATH-for-shutdown.patch b/pkgs/os-specific/linux/util-linux/rtcwake-search-PATH-for-shutdown.patch
new file mode 100644
index 000000000000..92cb07d43834
--- /dev/null
+++ b/pkgs/os-specific/linux/util-linux/rtcwake-search-PATH-for-shutdown.patch
@@ -0,0 +1,30 @@
+Search $PATH for the shutdown binary instead of hard-coding /sbin/shutdown,
+which isn't valid on NixOS (and a compatibility link on most other modern
+distros anyway).
+
+  -- nckx <tobias.geerinckx.rice@gmail.com>
+
+diff -Naur a/include/pathnames.h b/include/pathnames.h
+--- a/include/pathnames.h	2014-09-16 14:37:06.138551680 +0200
++++ b/include/pathnames.h	2015-01-01 20:41:02.510948314 +0100
+@@ -43,7 +43,7 @@
+ #define _PATH_INITTAB		"/etc/inittab"
+ #define _PATH_RC		"/etc/rc"
+ #define _PATH_REBOOT		"/sbin/reboot"
+-#define _PATH_SHUTDOWN		"/sbin/shutdown"
++#define _PATH_SHUTDOWN		"shutdown"
+ #define _PATH_SINGLE		"/etc/singleboot"
+ #define _PATH_SHUTDOWN_CONF	"/etc/shutdown.conf"
+ 
+diff -Naur a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c
+--- a/sys-utils/rtcwake.c	2014-10-24 11:21:20.447389309 +0200
++++ b/sys-utils/rtcwake.c	2015-01-01 20:57:59.398911209 +0100
+@@ -582,7 +582,7 @@
+ 		arg[i]   = NULL;
+ 
+ 		if (!dryrun) {
+-			execv(arg[0], arg);
++			execvp(arg[0], arg);
+ 
+ 			warn(_("failed to execute %s"), _PATH_SHUTDOWN);
+ 			rc = EXIT_FAILURE;
diff --git a/pkgs/os-specific/linux/zfs/bc151f7b312dea09c6ec5b9a320e65140789643a.patch b/pkgs/os-specific/linux/zfs/bc151f7b312dea09c6ec5b9a320e65140789643a.patch
deleted file mode 100644
index 382c8ce63eea..000000000000
--- a/pkgs/os-specific/linux/zfs/bc151f7b312dea09c6ec5b9a320e65140789643a.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From bc151f7b312dea09c6ec5b9a320e65140789643a Mon Sep 17 00:00:00 2001
-From: Ned Bass <bass6@llnl.gov>
-Date: Thu, 16 Oct 2014 13:52:56 -0700
-Subject: [PATCH] Remove checks for mandatory locks
-
-The Linux VFS handles mandatory locks generically so we shouldn't
-need to check for conflicting locks in zfs_read(), zfs_write(), or
-zfs_freesp().  Linux 3.18 removed the lock_may_read() and
-lock_may_write() interfaces which we were relying on for this
-purpose.  Rather than emulating those interfaces we remove the
-redundant checks.
-
-Signed-off-by: Ned Bass <bass6@llnl.gov>
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #2804
----
- module/zfs/zfs_vnops.c | 18 ------------------
- module/zfs/zfs_znode.c | 10 ----------
- 2 files changed, 28 deletions(-)
-
-diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
-index 33f9e0e..2f55e56 100644
---- a/module/zfs/zfs_vnops.c
-+++ b/module/zfs/zfs_vnops.c
-@@ -474,15 +474,6 @@ zfs_read(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
- 	}
- 
- 	/*
--	 * Check for mandatory locks
--	 */
--	if (mandatory_lock(ip) &&
--	    !lock_may_read(ip, uio->uio_loffset, uio->uio_resid)) {
--		ZFS_EXIT(zsb);
--		return (SET_ERROR(EAGAIN));
--	}
--
--	/*
- 	 * If we're in FRSYNC mode, sync out this znode before reading it.
- 	 */
- 	if (ioflag & FRSYNC || zsb->z_os->os_sync == ZFS_SYNC_ALWAYS)
-@@ -651,15 +642,6 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
- 	}
- 
- 	/*
--	 * Check for mandatory locks before calling zfs_range_lock()
--	 * in order to prevent a deadlock with locks set via fcntl().
--	 */
--	if (mandatory_lock(ip) && !lock_may_write(ip, woff, n)) {
--		ZFS_EXIT(zsb);
--		return (SET_ERROR(EAGAIN));
--	}
--
--	/*
- 	 * Pre-fault the pages to ensure slow (eg NFS) pages
- 	 * don't hold up txg.
- 	 * Skip this if uio contains loaned arc_buf.
-diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c
-index 90dbfd3..f02c021 100644
---- a/module/zfs/zfs_znode.c
-+++ b/module/zfs/zfs_znode.c
-@@ -1546,7 +1546,6 @@ zfs_trunc(znode_t *zp, uint64_t end)
- int
- zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
- {
--	struct inode *ip = ZTOI(zp);
- 	dmu_tx_t *tx;
- 	zfs_sb_t *zsb = ZTOZSB(zp);
- 	zilog_t *zilog = zsb->z_log;
-@@ -1567,15 +1566,6 @@ zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
- 		goto out;
- 	}
- 
--	/*
--	 * Check for any locks in the region to be freed.
--	 */
--	if (ip->i_flock && mandatory_lock(ip)) {
--		uint64_t length = (len ? len : zp->z_size - off);
--		if (!lock_may_write(ip, off, length))
--			return (SET_ERROR(EAGAIN));
--	}
--
- 	if (len == 0) {
- 		error = zfs_trunc(zp, off);
- 	} else {
diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix
index 3661137fc295..a893154b9365 100644
--- a/pkgs/os-specific/linux/zfs/default.nix
+++ b/pkgs/os-specific/linux/zfs/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation rec {
     substituteInPlace ./config/zfs-build.m4       --replace "\$sysconfdir/init.d"     "$out/etc/init.d"
     substituteInPlace ./etc/zfs/Makefile.am       --replace "\$(sysconfdir)"          "$out/etc"
     substituteInPlace ./cmd/zed/Makefile.am       --replace "\$(sysconfdir)"          "$out/etc"
+    substituteInPlace ./module/Makefile.in        --replace "/bin/cp"                 "cp"
 
     ./autogen.sh
   '';
diff --git a/pkgs/os-specific/linux/zfs/git.nix b/pkgs/os-specific/linux/zfs/git.nix
index fde5310deed2..21a580136d56 100644
--- a/pkgs/os-specific/linux/zfs/git.nix
+++ b/pkgs/os-specific/linux/zfs/git.nix
@@ -1,15 +1,17 @@
 { stdenv, fetchgit, kernel, spl_git, perl, autoconf, automake, libtool, zlib, libuuid, coreutils, utillinux }:
 
 stdenv.mkDerivation {
-  name = "zfs-0.6.3-${kernel.version}";
+  name = "zfs-0.6.4-${kernel.version}";
 
   src = fetchgit {
     url = git://github.com/zfsonlinux/zfs.git;
-    rev = "07dabd234dd51a1e5adc5bd21cddf5b5fdc70732";
-    sha256 = "1yqsfdhyzh33aisfvwqd692n5kfgnlz7yjixd2gqn8vx9bv0dz0b";
+    rev = "74328ee18f94d27f9c802d29fdd311018dab2adf";
+    sha256 = "0ayyqbb2crki1xvibfmscav5j7g0z77ys83dx10430ljamvylwb0";
   };
 
-  patches = [ ./mount_zfs_prefix.patch ./nix-build.patch ./bc151f7b312dea09c6ec5b9a320e65140789643a.patch ];
+  patches = [
+    ./nix-build-git.patch
+  ];
 
   buildInputs = [ spl_git perl autoconf automake libtool zlib libuuid coreutils ];
 
@@ -28,6 +30,7 @@ stdenv.mkDerivation {
     substituteInPlace ./config/zfs-build.m4       --replace "\$sysconfdir/init.d"     "$out/etc/init.d"
     substituteInPlace ./etc/zfs/Makefile.am       --replace "\$(sysconfdir)"          "$out/etc"
     substituteInPlace ./cmd/zed/Makefile.am       --replace "\$(sysconfdir)"          "$out/etc"
+    substituteInPlace ./module/Makefile.in        --replace "/bin/cp"                 "cp"
 
     ./autogen.sh
   '';
@@ -41,6 +44,7 @@ stdenv.mkDerivation {
     "--with-udevdir=$(out)/lib/udev"
     "--with-systemdunitdir=$(out)/etc/systemd/system"
     "--with-systemdpresetdir=$(out)/etc/systemd/system-preset"
+    "--with-mounthelperdir=$(out)/sbin"
     "--sysconfdir=/etc"
     "--localstatedir=/var"
   ];
diff --git a/pkgs/os-specific/linux/zfs/nix-build-git.patch b/pkgs/os-specific/linux/zfs/nix-build-git.patch
new file mode 100644
index 000000000000..ae8e82f703af
--- /dev/null
+++ b/pkgs/os-specific/linux/zfs/nix-build-git.patch
@@ -0,0 +1,133 @@
+diff --git a/Makefile.am b/Makefile.am
+index 49b417a..f4af44d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -12,10 +12,10 @@ endif
+ if CONFIG_KERNEL
+ SUBDIRS += module
+ 
+-extradir = @prefix@/src/zfs-$(VERSION)
++extradir = @prefix@/libexec/zfs-$(VERSION)
+ extra_HEADERS = zfs.release.in zfs_config.h.in
+ 
+-kerneldir = @prefix@/src/zfs-$(VERSION)/$(LINUX_VERSION)
++kerneldir = @prefix@/zfs-$(VERSION)/$(LINUX_VERSION)
+ nodist_kernel_HEADERS = zfs.release zfs_config.h module/$(LINUX_SYMBOLS)
+ endif
+ 
+diff --git a/include/Makefile.am b/include/Makefile.am
+index a94cad5..a160fe2 100644
+--- a/include/Makefile.am
++++ b/include/Makefile.am
+@@ -29,6 +29,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
+ endif
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/zfs-$(VERSION)/include
++kerneldir = @prefix@/include
+ kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
+ endif
+diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am
+index d00b1c8..3242d2e 100644
+--- a/include/linux/Makefile.am
++++ b/include/linux/Makefile.am
+@@ -17,6 +17,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
+ endif
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/zfs-$(VERSION)/include/linux
++kerneldir = @prefix@/include/linux
+ kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
+ endif
+diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am
+index 7ddace0..8da3870 100644
+--- a/include/sys/Makefile.am
++++ b/include/sys/Makefile.am
+@@ -102,6 +102,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
+ endif
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys
++kerneldir = @prefix@/include/sys
+ kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
+ endif
+diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am
+index 8bca5d8..a5eafcd 100644
+--- a/include/sys/fm/Makefile.am
++++ b/include/sys/fm/Makefile.am
+@@ -16,6 +16,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
+ endif
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fm
++kerneldir = @prefix@/include/sys/fm
+ kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
+ endif
+diff --git a/include/sys/fm/fs/Makefile.am b/include/sys/fm/fs/Makefile.am
+index fdc9eb5..807c47c 100644
+--- a/include/sys/fm/fs/Makefile.am
++++ b/include/sys/fm/fs/Makefile.am
+@@ -13,6 +13,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
+ endif
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fm/fs
++kerneldir = @prefix@/include/sys/fm/fs
+ kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
+ endif
+diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am
+index 0859b9f..b0c6eec 100644
+--- a/include/sys/fs/Makefile.am
++++ b/include/sys/fs/Makefile.am
+@@ -13,6 +13,6 @@ libzfs_HEADERS = $(COMMON_H) $(USER_H)
+ endif
+ 
+ if CONFIG_KERNEL
+-kerneldir = @prefix@/src/zfs-$(VERSION)/include/sys/fs
++kerneldir = @prefix@/include/sys/fs
+ kernel_HEADERS = $(COMMON_H) $(KERNEL_H)
+ endif
+diff --git a/module/Makefile.in b/module/Makefile.in
+index 686402b..9cbf598 100644
+--- a/module/Makefile.in
++++ b/module/Makefile.in
+@@ -18,9 +18,9 @@ modules:
+ 	@# installed devel headers, or they may be in the module
+ 	@# subdirectory when building against the spl source tree.
+ 	@if [ -f @SPL_OBJ@/@SPL_SYMBOLS@ ]; then \
+-		/bin/cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \
++		cp @SPL_OBJ@/@SPL_SYMBOLS@ .; \
+ 	elif [ -f @SPL_OBJ@/module/@SPL_SYMBOLS@ ]; then \
+-		/bin/cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
++		cp @SPL_OBJ@/module/@SPL_SYMBOLS@ .; \
+ 	else \
+ 		echo -e "\n" \
+ 		"*** Missing spl symbols ensure you have built the spl:\n" \
+@@ -28,6 +28,8 @@ modules:
+ 		"*** - @SPL_OBJ@/module/@SPL_SYMBOLS@\n"; \
+ 		exit 1; \
+ 	fi
++	@# when copying a file out of the nix store, we need to make it writable again. 
++	chmod +w @SPL_SYMBOLS@
+ 	$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ CONFIG_ZFS=m $@
+ 
+ clean:
+@@ -42,15 +44,15 @@ clean:
+ modules_install:
+ 	@# Install the kernel modules
+ 	$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
+-		INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
++		INSTALL_MOD_PATH=@prefix@/$(INSTALL_MOD_PATH) \
+ 		INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
+ 		KERNELRELEASE=@LINUX_VERSION@
+ 	@# Remove extraneous build products when packaging
+-	kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
++	kmoddir=@prefix@/$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
+ 	if [ -n $$kmoddir ]; then \
+ 		find $$kmoddir -name 'modules.*' | xargs $(RM); \
+ 	fi
+-	sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
++	sysmap=@prefix@/$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
+ 	if [ -f $$sysmap ]; then \
+ 		depmod -ae -F $$sysmap @LINUX_VERSION@; \
+ 	fi
diff --git a/pkgs/os-specific/linux/zfs/remove-lock-checks.patch b/pkgs/os-specific/linux/zfs/remove-lock-checks.patch
deleted file mode 100644
index 1261b49ee1d4..000000000000
--- a/pkgs/os-specific/linux/zfs/remove-lock-checks.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
-index 33f9e0e..2f55e56 100644
---- a/module/zfs/zfs_vnops.c
-+++ b/module/zfs/zfs_vnops.c
-@@ -474,15 +474,6 @@ zfs_read(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
- 	}
- 
- 	/*
--	 * Check for mandatory locks
--	 */
--	if (mandatory_lock(ip) &&
--	    !lock_may_read(ip, uio->uio_loffset, uio->uio_resid)) {
--		ZFS_EXIT(zsb);
--		return (SET_ERROR(EAGAIN));
--	}
--
--	/*
- 	 * If we're in FRSYNC mode, sync out this znode before reading it.
- 	 */
- 	if (ioflag & FRSYNC || zsb->z_os->os_sync == ZFS_SYNC_ALWAYS)
-@@ -651,15 +642,6 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
- 	}
- 
- 	/*
--	 * Check for mandatory locks before calling zfs_range_lock()
--	 * in order to prevent a deadlock with locks set via fcntl().
--	 */
--	if (mandatory_lock(ip) && !lock_may_write(ip, woff, n)) {
--		ZFS_EXIT(zsb);
--		return (SET_ERROR(EAGAIN));
--	}
--
--	/*
- 	 * Pre-fault the pages to ensure slow (eg NFS) pages
- 	 * don't hold up txg.
- 	 * Skip this if uio contains loaned arc_buf.
-diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c
-index 90dbfd3..f02c021 100644
---- a/module/zfs/zfs_znode.c
-+++ b/module/zfs/zfs_znode.c
-@@ -1546,7 +1546,6 @@ zfs_trunc(znode_t *zp, uint64_t end)
- int
- zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
- {
--	struct inode *ip = ZTOI(zp);
- 	dmu_tx_t *tx;
- 	zfs_sb_t *zsb = ZTOZSB(zp);
- 	zilog_t *zilog = zsb->z_log;
-@@ -1567,15 +1566,6 @@ zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
- 		goto out;
- 	}
- 
--	/*
--	 * Check for any locks in the region to be freed.
--	 */
--	if (ip->i_flock && mandatory_lock(ip)) {
--		uint64_t length = (len ? len : zp->z_size - off);
--		if (!lock_may_write(ip, off, length))
--			return (SET_ERROR(EAGAIN));
--	}
--
- 	if (len == 0) {
- 		error = zfs_trunc(zp, off);
- 	} else {