summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2018-08-17 20:53:27 +0200
committerVladimír Čunát <vcunat@gmail.com>2018-08-17 20:53:27 +0200
commit14aa936ec52cc01c0b67470bf83b7b0b9aad6aef (patch)
treeb8b511e368df0c9583d41b9347673b3164a797dd /pkgs/os-specific
parent6cb6ea1fed65bef4f2e9f02241a3e828c57fe57d (diff)
parent4ff7702082bad838e70140091afe7e77a9f00eca (diff)
downloadnixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.tar
nixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.tar.gz
nixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.tar.bz2
nixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.tar.lz
nixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.tar.xz
nixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.tar.zst
nixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.zip
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/alsa-oss/default.nix9
-rw-r--r--pkgs/os-specific/linux/alsa-tools/default.nix7
-rw-r--r--pkgs/os-specific/linux/alsa-utils/default.nix7
-rw-r--r--pkgs/os-specific/linux/atop/default.nix7
-rw-r--r--pkgs/os-specific/linux/checksec/default.nix8
-rw-r--r--pkgs/os-specific/linux/cpufrequtils/default.nix6
-rw-r--r--pkgs/os-specific/linux/cramfsswap/default.nix7
-rw-r--r--pkgs/os-specific/linux/firmware/fwupd/default.nix13
-rw-r--r--pkgs/os-specific/linux/iotop/default.nix8
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.14.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.17.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.18.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.4.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.9.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix4
-rw-r--r--pkgs/os-specific/linux/lsscsi/default.nix6
-rw-r--r--pkgs/os-specific/linux/microcode/intel-microcode2ucode.c154
-rw-r--r--pkgs/os-specific/linux/microcode/intel.nix21
-rw-r--r--pkgs/os-specific/linux/microcode/iucode-tool.nix25
-rw-r--r--pkgs/os-specific/linux/spl/default.nix96
-rw-r--r--pkgs/os-specific/linux/spl/install_prefix-0.7.9.patch162
-rw-r--r--pkgs/os-specific/linux/zfs/default.nix49
22 files changed, 134 insertions, 475 deletions
diff --git a/pkgs/os-specific/linux/alsa-oss/default.nix b/pkgs/os-specific/linux/alsa-oss/default.nix
index 431353e234ef..2b8ef40461d0 100644
--- a/pkgs/os-specific/linux/alsa-oss/default.nix
+++ b/pkgs/os-specific/linux/alsa-oss/default.nix
@@ -15,11 +15,7 @@ stdenv.mkDerivation rec {
 
   installFlags = "ASOUND_STATE_DIR=$(TMPDIR)/dummy";
 
-  preConfigure =
-    ''
-    '';
-
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://www.alsa-project.org/;
     description = "ALSA, the Advanced Linux Sound Architecture alsa-oss emulation";
 
@@ -28,6 +24,7 @@ stdenv.mkDerivation rec {
       MIDI functionality to the Linux-based operating system.
     '';
 
-    platforms = stdenv.lib.platforms.linux;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/os-specific/linux/alsa-tools/default.nix b/pkgs/os-specific/linux/alsa-tools/default.nix
index 1ce94d14803c..8faba250fb3e 100644
--- a/pkgs/os-specific/linux/alsa-tools/default.nix
+++ b/pkgs/os-specific/linux/alsa-tools/default.nix
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
     done
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://www.alsa-project.org/;
     description = "ALSA, the Advanced Linux Sound Architecture tools";
 
@@ -47,7 +47,8 @@ stdenv.mkDerivation rec {
       MIDI functionality to the Linux-based operating system.
     '';
 
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.fps ];
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.fps ];
   };
 }
diff --git a/pkgs/os-specific/linux/alsa-utils/default.nix b/pkgs/os-specific/linux/alsa-utils/default.nix
index 86d9aeebf1b9..60e3b9750d71 100644
--- a/pkgs/os-specific/linux/alsa-utils/default.nix
+++ b/pkgs/os-specific/linux/alsa-utils/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
 
   installFlags = "ASOUND_STATE_DIR=$(TMPDIR)/dummy";
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://www.alsa-project.org/;
     description = "ALSA, the Advanced Linux Sound Architecture utils";
     longDescription = ''
@@ -29,7 +29,8 @@ stdenv.mkDerivation rec {
       MIDI functionality to the Linux-based operating system.
     '';
 
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.AndersonTorres ];
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.AndersonTorres ];
   };
 }
diff --git a/pkgs/os-specific/linux/atop/default.nix b/pkgs/os-specific/linux/atop/default.nix
index 7b4ac9e1f3b8..739342b77fda 100644
--- a/pkgs/os-specific/linux/atop/default.nix
+++ b/pkgs/os-specific/linux/atop/default.nix
@@ -33,15 +33,16 @@ stdenv.mkDerivation rec {
     make systemdinstall $makeFlags
   '';
 
-  meta = {
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [raskin];
+  meta = with stdenv.lib; {
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ raskin ];
     description = ''Console system performance monitor'';
 
     longDescription = ''
       Atop is an ASCII full-screen performance monitor that is capable of reporting the activity of all processes (even if processes have finished during the interval), daily logging of system and process activity for long-term analysis, highlighting overloaded system resources by using colors, etc. At regular intervals, it shows system-level activity related to the CPU, memory, swap, disks and network layers, and for every active process it shows the CPU utilization, memory growth, disk utilization, priority, username, state, and exit code.
     '';
     inherit version;
+    license = licenses.gpl2;
     downloadPage = http://atoptool.nl/downloadatop.php;
   };
 }
diff --git a/pkgs/os-specific/linux/checksec/default.nix b/pkgs/os-specific/linux/checksec/default.nix
index a8ffb133a905..6c927ae93afb 100644
--- a/pkgs/os-specific/linux/checksec/default.nix
+++ b/pkgs/os-specific/linux/checksec/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, file, findutils, binutils, glibc, coreutils, sysctl }:
+{ stdenv, fetchurl, file, findutils, binutils-unwrapped, glibc, coreutils, sysctl }:
 
 stdenv.mkDerivation rec {
   name = "checksec-${version}";
@@ -26,9 +26,9 @@ stdenv.mkDerivation rec {
     substituteInPlace $out/bin/checksec --replace find ${findutils}/bin/find
     substituteInPlace $out/bin/checksec --replace "file $" "${file}/bin/file $"
     substituteInPlace $out/bin/checksec --replace "xargs file" "xargs ${file}/bin/file"
-    substituteInPlace $out/bin/checksec --replace " readelf -" " ${binutils.out}/bin/readelf -"
-    substituteInPlace $out/bin/checksec --replace "(readelf -" "(${binutils.out}/bin/readelf -"
-    substituteInPlace $out/bin/checksec --replace "command_exists readelf" "command_exists ${binutils.out}/bin/readelf"
+    substituteInPlace $out/bin/checksec --replace " readelf -" " ${binutils-unwrapped}/bin/readelf -"
+    substituteInPlace $out/bin/checksec --replace "(readelf -" "(${binutils-unwrapped}/bin/readelf -"
+    substituteInPlace $out/bin/checksec --replace "command_exists readelf" "command_exists ${binutils-unwrapped}/bin/readelf"
     substituteInPlace $out/bin/checksec --replace "/sbin/sysctl -" "${sysctl}/bin/sysctl -"
     substituteInPlace $out/bin/checksec --replace "/usr/bin/id -" "${coreutils}/bin/id -"
   '';
diff --git a/pkgs/os-specific/linux/cpufrequtils/default.nix b/pkgs/os-specific/linux/cpufrequtils/default.nix
index e36aaa5e38d0..04da31176da2 100644
--- a/pkgs/os-specific/linux/cpufrequtils/default.nix
+++ b/pkgs/os-specific/linux/cpufrequtils/default.nix
@@ -21,8 +21,10 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ stdenv.cc.libc.linuxHeaders libtool gettext ];
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Tools to display or change the CPU governor settings";
-    platforms = stdenv.lib.platforms.linux;
+    homepage = http://ftp.be.debian.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/os-specific/linux/cramfsswap/default.nix b/pkgs/os-specific/linux/cramfsswap/default.nix
index 6f11a3bb7a72..d183bb25cb56 100644
--- a/pkgs/os-specific/linux/cramfsswap/default.nix
+++ b/pkgs/os-specific/linux/cramfsswap/default.nix
@@ -10,7 +10,10 @@ stdenv.mkDerivation {
 
   buildInputs = [zlib];
 
-  meta = {
-    platforms = stdenv.lib.platforms.linux;
+  meta = with stdenv.lib; {
+    description = "swap endianess of a cram filesystem (cramfs)";
+    homepage = "https://packages.debian.org/sid/utils/cramfsswap";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix
index fec1b3ed6f04..f018b5c2a7df 100644
--- a/pkgs/os-specific/linux/firmware/fwupd/default.nix
+++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, gtk-doc, pkgconfig, gobjectIntrospection, intltool
+{ stdenv, fetchurl, gtk-doc, pkgconfig, gobjectIntrospection, intltool
 , libgudev, polkit, appstream-glib, gusb, sqlite, libarchive, glib-networking
 , libsoup, help2man, gpgme, libxslt, elfutils, libsmbios, efivar, glibcLocales
 , gnu-efi, libyaml, valgrind, meson, libuuid, colord, docbook_xml_dtd_43, docbook_xsl
@@ -7,7 +7,7 @@
 }:
 let
   # Updating? Keep $out/etc synchronized with passthru.filesInstalledToEtc
-  version = "1.1.0";
+  version = "1.1.1";
   python = python3.withPackages (p: with p; [ pygobject3 pycairo pillow ]);
   installedTestsPython = python3.withPackages (p: with p; [ pygobject3 requests ]);
 
@@ -18,7 +18,7 @@ in stdenv.mkDerivation {
   name = "fwupd-${version}";
   src = fetchurl {
     url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
-    sha256 = "0flfpzb0fxgixxddpwak4s63i35kr915pdfq5mfrnxq4bwcj24yd";
+    sha256 = "0szakfnp6pl8vv3ivb40p5j8pxapfp724a55s2dr1qzzdlbjd08s";
   };
 
   outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ];
@@ -37,13 +37,6 @@ in stdenv.mkDerivation {
 
   patches = [
     ./fix-paths.patch
-
-    # Allow localedir in lib output
-    # https://github.com/hughsie/fwupd/pull/626
-    (fetchpatch {
-      url = https://github.com/hughsie/fwupd/commit/9822c387ea13419a0eb2624fcd13d50735cb89f8.patch;
-      sha256 = "12bk6ga2hvsswpc4gal95l2z5a6gp3vdjq16zm2npligcvf37b6i";
-    })
   ];
 
   postPatch = ''
diff --git a/pkgs/os-specific/linux/iotop/default.nix b/pkgs/os-specific/linux/iotop/default.nix
index a19b3d4ec16c..e2ded7a8fd0c 100644
--- a/pkgs/os-specific/linux/iotop/default.nix
+++ b/pkgs/os-specific/linux/iotop/default.nix
@@ -10,9 +10,11 @@ python2Packages.buildPythonApplication rec {
 
   doCheck = false;
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "A tool to find out the processes doing the most IO";
-    maintainers = [ stdenv.lib.maintainers.raskin ];
-    platforms = stdenv.lib.platforms.linux;
+    homepage = http://guichaz.free.fr/iotop;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.raskin ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix
index 400574a31446..0bfd3d0ac34c 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.14.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.14.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "4.14.62";
+  version = "4.14.63";
 
   # modDirVersion needs to be x.y.z, will automatically add .0 if needed
   modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1ar29ikway5im17iw9ag1fxivr7sbj8nhxxw347xqmp1irz4vjji";
+    sha256 = "1ly6pjvlfrlrclfnl98ghwal25z58lppnj6gj7x1m1mswzq54bnd";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-4.17.nix b/pkgs/os-specific/linux/kernel/linux-4.17.nix
index fda3b77c0a8b..7d29f9f805fc 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.17.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.17.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "4.17.14";
+  version = "4.17.15";
 
   # modDirVersion needs to be x.y.z, will automatically add .0 if needed
   modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1bxsiishhw6ichifqglkbcmgc0518ih396yi23clvrsfyj6h6in8";
+    sha256 = "0yg0hh1ld3d5cd4ll7f48p769wda2a1ap8fmnnsfsazidka5vf75";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-4.18.nix b/pkgs/os-specific/linux/kernel/linux-4.18.nix
index 4f183b696cc0..691ab096e8ae 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.18.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.18.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "4.18";
+  version = "4.18.1";
 
   # modDirVersion needs to be x.y.z, will automatically add .0 if needed
   modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
@@ -13,6 +13,6 @@ buildLinux (args // rec {
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1wgay4k8wj08fc711j290fvi81x75yib8iaa6r7csc7mkvsbrn0r";
+    sha256 = "0hps1h8rs1cc8385m69754vwbjmwasr7bfv9f9nsv8fmx73aspvj";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix
index 60113959665c..0516c947e8c7 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.4.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix
@@ -1,11 +1,11 @@
 { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.4.147";
+  version = "4.4.148";
   extraMeta.branch = "4.4";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "06mcilxd5qi8snycb5bhy52icbbwfl056xwmra66yknmpycyad67";
+    sha256 = "10yrqizwkawbs332rl3fmr3cpwcl2j0mik4md7isg5xlkc00zc8r";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix
index d29855a093ec..add40aaa8159 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.9.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix
@@ -1,11 +1,11 @@
 { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.9.119";
+  version = "4.9.120";
   extraMeta.branch = "4.9";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "0d8bwsma9j7dhgymcfbchr8k3503w5vp3p18mfqv81x6l40pzqa9";
+    sha256 = "14gx6gqahz74vaw8jd0wkxn0w05i7cyfgi24ld2q3p2yhq3gannp";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix b/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix
index 3fc08e642871..53d8accb1856 100644
--- a/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix
+++ b/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix
@@ -6,7 +6,7 @@ buildLinux (args // rec {
   # modDirVersion needs to be x.y.z.
   modDirVersion = "4.14.55";
 
-  # branchVersion needs to be x.y. 
+  # branchVersion needs to be x.y.
   extraMeta.branch = "4.14";
 
   src = fetchFromGitHub {
@@ -28,4 +28,6 @@ buildLinux (args // rec {
 
   '' + (args.extraConfig or "");
 
+  extraMeta.platforms = [ "armv7l-linux" ];
+
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/lsscsi/default.nix b/pkgs/os-specific/linux/lsscsi/default.nix
index d250d658282f..96b84c00a5f0 100644
--- a/pkgs/os-specific/linux/lsscsi/default.nix
+++ b/pkgs/os-specific/linux/lsscsi/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation {
-  name = "lsscsi-0.29";
+  name = "lsscsi-0.30";
 
   src = fetchurl {
-    url = "http://sg.danny.cz/scsi/lsscsi-0.29.tgz";
-    sha256 = "0538fjgxky03yn7mzyslkyi2af3yy5llsnjjcgjx73x08wd6hv5n";
+    url = "http://sg.danny.cz/scsi/lsscsi-0.30.tgz";
+    sha256 = "05cba72m0hj3kpikk26h7j02cly7zy5lgww2fvswa0jz823j36k1";
   };
 
   preConfigure = ''
diff --git a/pkgs/os-specific/linux/microcode/intel-microcode2ucode.c b/pkgs/os-specific/linux/microcode/intel-microcode2ucode.c
deleted file mode 100644
index c1660fae38a1..000000000000
--- a/pkgs/os-specific/linux/microcode/intel-microcode2ucode.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Convert Intel microcode.dat into a single binary microcode.bin file
- *
- * Based on code by Kay Sievers <kay.sievers@vrfy.org>
- * Changed to create a single file by Thomas Bächler <thomas@archlinux.org>
- */
-
-
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <limits.h>
-#include <stdbool.h>
-#include <inttypes.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-
-struct microcode_header_intel {
-	unsigned int hdrver;
-	unsigned int rev;
-	unsigned int date;
-	unsigned int sig;
-	unsigned int cksum;
-	unsigned int ldrver;
-	unsigned int pf;
-	unsigned int datasize;
-	unsigned int totalsize;
-	unsigned int reserved[3];
-};
-
-union mcbuf {
-	struct microcode_header_intel hdr;
-	unsigned int i[0];
-	char c[0];
-};
-
-int main(int argc, char *argv[])
-{
-	const char *filename = "/lib/firmware/microcode.dat";
-	FILE *f;
-	char line[LINE_MAX];
-	char buf[4000000];
-	union mcbuf *mc;
-	size_t bufsize, count, start;
-	int rc = EXIT_SUCCESS;
-
-	if (argv[1] != NULL)
-		filename = argv[1];
-
-	count = 0;
-	mc = (union mcbuf *) buf;
-	f = fopen(filename, "re");
-	if (f == NULL) {
-		printf("open %s: %m\n", filename);
-		rc = EXIT_FAILURE;
-		goto out;
-	}
-
-	while (fgets(line, sizeof(line), f) != NULL) {
-		if (sscanf(line, "%x, %x, %x, %x",
-		    &mc->i[count],
-		    &mc->i[count + 1],
-		    &mc->i[count + 2],
-		    &mc->i[count + 3]) != 4)
-			continue;
-		count += 4;
-	}
-	fclose(f);
-
-	bufsize = count * sizeof(int);
-	printf("%s: %lu(%luk) bytes, %zu integers\n",
-	       filename,
-	       bufsize,
-	       bufsize / 1024,
-	       count);
-
-	if (bufsize < sizeof(struct microcode_header_intel))
-		goto out;
-
-	f = fopen("microcode.bin", "we");
-	if (f == NULL) {
-		printf("open microcode.bin: %m\n");
-		rc = EXIT_FAILURE;
-		goto out;
-	}
-
-	start = 0;
-	for (;;) {
-		size_t size;
-		unsigned int family, model, stepping;
-		unsigned int year, month, day;
-
-		mc = (union mcbuf *) &buf[start];
-
-		if (mc->hdr.totalsize)
-			size = mc->hdr.totalsize;
-		else
-			size = 2000 + sizeof(struct microcode_header_intel);
-
-		if (mc->hdr.ldrver != 1 || mc->hdr.hdrver != 1) {
-			printf("unknown version/format:\n");
-			rc = EXIT_FAILURE;
-			break;
-		}
-
-		/*
-		 *  0- 3 stepping
-		 *  4- 7 model
-		 *  8-11 family
-		 * 12-13 type
-		 * 16-19 extended model
-		 * 20-27 extended family
-		 */
-		family = (mc->hdr.sig >> 8) & 0xf;
-		if (family == 0xf)
-			family += (mc->hdr.sig >> 20) & 0xff;
-		model = (mc->hdr.sig >> 4) & 0x0f;
-		if (family == 0x06)
-			model += ((mc->hdr.sig >> 16) & 0x0f) << 4;
-		stepping = mc->hdr.sig & 0x0f;
-
-		year = mc->hdr.date & 0xffff;
-		month = mc->hdr.date >> 24;
-		day = (mc->hdr.date >> 16) & 0xff;
-
-		printf("\n");
-		printf("signature: 0x%02x\n", mc->hdr.sig);
-		printf("flags:     0x%02x\n", mc->hdr.pf);
-		printf("revision:  0x%02x\n", mc->hdr.rev);
-		printf("date:      %04x-%02x-%02x\n", year, month, day);
-		printf("size:      %zu\n", size);
-
-		if (fwrite(mc, size, 1, f) != 1) {
-			printf("write microcode.bin: %m\n");
-			rc = EXIT_FAILURE;
-			goto out;
-		}
-
-		start += size;
-		if (start >= bufsize)
-			break;
-	}
-	fclose(f);
-	printf("\n");
-out:
-	return rc;
-}
diff --git a/pkgs/os-specific/linux/microcode/intel.nix b/pkgs/os-specific/linux/microcode/intel.nix
index 857a3b580a8e..403824fb3a45 100644
--- a/pkgs/os-specific/linux/microcode/intel.nix
+++ b/pkgs/os-specific/linux/microcode/intel.nix
@@ -1,27 +1,26 @@
-{ stdenv, fetchurl, libarchive }:
+{ stdenv, fetchurl, libarchive, iucode-tool }:
 
 stdenv.mkDerivation rec {
   name = "microcode-intel-${version}";
-  version = "20180312";
+  version = "20180807";
 
   src = fetchurl {
-    url = "https://downloadmirror.intel.com/27591/eng/microcode-${version}.tgz";
-    sha256 = "0yg7q5blcqgq8jyjxhn9n48rxws77ylqzyn4kn10l6yzwan1yf0b";
+    url = "https://downloadmirror.intel.com/28039/eng/microcode-${version}.tgz";
+    sha256 = "0h4ygwx5brnrjz8v47aikrwhf0q3jhizxmzcii4bdjg64zffiy99";
   };
 
-  buildInputs = [ libarchive ];
+  nativeBuildInputs = [ iucode-tool libarchive ];
 
   sourceRoot = ".";
 
-  buildPhase = ''
-    gcc -O2 -Wall -o intel-microcode2ucode ${./intel-microcode2ucode.c}
-    ./intel-microcode2ucode microcode.dat
-  '';
-
   installPhase = ''
+    runHook preInstall
+
     mkdir -p $out kernel/x86/microcode
-    mv microcode.bin kernel/x86/microcode/GenuineIntel.bin
+    iucode_tool -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/
     echo kernel/x86/microcode/GenuineIntel.bin | bsdcpio -o -H newc -R 0:0 > $out/intel-ucode.img
+
+    runHook postInstall
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/os-specific/linux/microcode/iucode-tool.nix b/pkgs/os-specific/linux/microcode/iucode-tool.nix
new file mode 100644
index 000000000000..485272b1401b
--- /dev/null
+++ b/pkgs/os-specific/linux/microcode/iucode-tool.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitLab, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  name = "iucode-tool-${version}";
+  version = "2.3.1";
+
+  src = fetchFromGitLab {
+    owner  = "iucode-tool";
+    repo   = "iucode-tool";
+    rev    = "v${version}";
+    sha256 = "04dlisw87dd3q3hhmkqc5dd58cp22fzx3rzah7pvcyij135yjc3a";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Intel® 64 and IA-32 processor microcode tool";
+    homepage = https://gitlab.com/iucode-tool/iucode-tool;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms = [ "x86_64-linux" "i686-linux" ];
+  };
+}
diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix
index 880da81c42e0..58c4fc53a419 100644
--- a/pkgs/os-specific/linux/spl/default.nix
+++ b/pkgs/os-specific/linux/spl/default.nix
@@ -6,78 +6,50 @@
 
 with stdenv.lib;
 
-let
-  common = { version
-    , sha256
-    , rev ? "spl-${version}"
-    , broken ? false
-    , patches ? []
-    }: stdenv.mkDerivation rec {
-      name = "spl-${version}-${kernel.version}";
+assert kernel != null;
 
-      src = fetchFromGitHub {
-        owner = "zfsonlinux";
-        repo = "spl";
-        inherit rev sha256;
-      };
+stdenv.mkDerivation rec {
+  name = "spl-${version}-${kernel.version}";
 
-      inherit patches;
+  src = fetchFromGitHub {
+    owner = "zfsonlinux";
+    repo = "spl";
+    rev = "spl-0.7.9";
+    sha256 = "0540m1dv9jvrzk9kw61glg0h0cwj976mr9zb42y3nh17k47ywff0";
+  };
 
-      nativeBuildInputs = [ autoreconfHook ] ++ kernel.moduleBuildDependencies;
+  patches = [ ./install_prefix.patch ];
 
-      hardeningDisable = [ "fortify" "stackprotector" "pic" ];
+  nativeBuildInputs = [ autoreconfHook ] ++ kernel.moduleBuildDependencies;
 
-      preConfigure = ''
-        substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid
-        substituteInPlace ./module/spl/spl-generic.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:${gawk}:/bin"
-        substituteInPlace ./module/splat/splat-vnode.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin"
-        substituteInPlace ./module/splat/splat-linux.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin"
-      '';
+  hardeningDisable = [ "fortify" "stackprotector" "pic" ];
 
-      configureFlags = [
-        "--with-config=kernel"
-        "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
-        "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
-      ];
+  preConfigure = ''
+    substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid
+    substituteInPlace ./module/spl/spl-generic.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:${gawk}:/bin"
+    substituteInPlace ./module/splat/splat-vnode.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin"
+    substituteInPlace ./module/splat/splat-linux.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin"
+  '';
 
-      enableParallelBuilding = true;
+  configureFlags = [
+    "--with-config=kernel"
+    "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
+    "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
+  ];
 
-      meta = {
-        description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)";
+  enableParallelBuilding = true;
 
-        longDescription = ''
-          This kernel module is a porting layer for ZFS to work inside the linux
-          kernel.
-        '';
+  meta = {
+    description = "Kernel module driver for solaris porting layer (needed by in-kernel zfs)";
 
-        inherit broken;
+    longDescription = ''
+      This kernel module is a porting layer for ZFS to work inside the linux
+      kernel.
+    '';
 
-        homepage = http://zfsonlinux.org/;
-        platforms = platforms.linux;
-        license = licenses.gpl2Plus;
-        maintainers = with maintainers; [ jcumming wizeman wkennington fpletz globin ];
-      };
+    homepage = http://zfsonlinux.org/;
+    platforms = platforms.linux;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ jcumming wizeman wkennington fpletz globin ];
   };
-in
-  assert kernel != null;
-{
-    splStable = common {
-      version = "0.7.9";
-      sha256 = "0540m1dv9jvrzk9kw61glg0h0cwj976mr9zb42y3nh17k47ywff0";
-      patches = [ ./install_prefix-0.7.9.patch ];
-    };
-
-    splUnstable = common {
-      version = "2018-05-07";
-      rev = "1149b62d20b7ed9d8ae25d5da7a06213d79b7602";
-      sha256 = "07qlx7l23y696gzyy7ynly7n1141w66y21gkmxiia2xwldj8klkx";
-      patches = [ ./install_prefix.patch ];
-    };
-
-    splLegacyCrypto = common {
-      version = "2018-01-24";
-      rev = "23602fdb39e1254c669707ec9d2d0e6bcdbf1771";
-      sha256 = "09py2dwj77f6s2qcnkwdslg5nxb3hq2bq39zpxpm6msqyifhl69h";
-      patches = [ ./install_prefix.patch ];
-    };
 }
diff --git a/pkgs/os-specific/linux/spl/install_prefix-0.7.9.patch b/pkgs/os-specific/linux/spl/install_prefix-0.7.9.patch
deleted file mode 100644
index 114ca1231470..000000000000
--- a/pkgs/os-specific/linux/spl/install_prefix-0.7.9.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 4977448..ac17217 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 712e94e..4af9fb7 100644
---- a/include/linux/Makefile.am
-+++ b/include/linux/Makefile.am
-@@ -18,6 +18,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 73c4a84..31a9f50 100644
---- a/include/sys/Makefile.am
-+++ b/include/sys/Makefile.am
-@@ -107,7 +107,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/util/Makefile.am b/include/util/Makefile.am
-index e2bf09f..3f5d6ce 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 d4e62e1..73fa01c 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@; \
--	if [ -n "$(DESTDIR)" ]; then \
-+	kmoddir=@prefix@/$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
-+	if [ -n "@prefix@" ]; 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/default.nix b/pkgs/os-specific/linux/zfs/default.nix
index 45edf8945c0e..c689faad492f 100644
--- a/pkgs/os-specific/linux/zfs/default.nix
+++ b/pkgs/os-specific/linux/zfs/default.nix
@@ -9,7 +9,7 @@
 , gawk, gnugrep, gnused, systemd
 
 # Kernel dependencies
-, kernel ? null, spl ? null, splUnstable ? null, splLegacyCrypto ? null
+, kernel ? null, spl ? null
 }:
 
 with stdenv.lib;
@@ -51,7 +51,7 @@ let
       '';
 
       nativeBuildInputs = [ autoreconfHook nukeReferences ]
-         ++ optional buildKernel (kernel.moduleBuildDependencies ++ [ perl ]);
+        ++ optional buildKernel (kernel.moduleBuildDependencies ++ [ perl ]);
       buildInputs =
            optionals buildKernel [ spl ]
         ++ optionals buildUser [ zlib libuuid python attr ]
@@ -93,7 +93,7 @@ let
 
       configureFlags = [
         "--with-config=${configFile}"
-        ] ++ optionals buildUser [
+      ] ++ optionals buildUser [
         "--with-dracutdir=$(out)/lib/dracut"
         "--with-udevdir=$(out)/lib/udev"
         "--with-systemdunitdir=$(out)/etc/systemd/system"
@@ -103,10 +103,11 @@ let
         "--sysconfdir=/etc"
         "--localstatedir=/var"
         "--enable-systemd"
-        ] ++ optionals buildKernel [
-        "--with-spl=${spl}/libexec/spl"
+      ] ++ optionals buildKernel [
         "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
         "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
+      ] ++ optionals (buildKernel && spl != null) [
+        "--with-spl=${spl}/libexec/spl"
       ];
 
       enableParallelBuilding = true;
@@ -157,7 +158,7 @@ in {
   # to be adapted
   zfsStable = common {
     # comment/uncomment if breaking kernel versions are known
-    incompatibleKernelVersion = null;
+    incompatibleKernelVersion = "4.18";
 
     # this package should point to the latest release.
     version = "0.7.9";
@@ -179,43 +180,19 @@ in {
     incompatibleKernelVersion = null;
 
     # this package should point to a version / git revision compatible with the latest kernel release
-    version = "2018-05-22";
-
-    rev = "ba863d0be4cbfbea938b10e49fb6ff459ac9ec20";
-    sha256 = "11dhigw1gybalwg2m6si148b6w195dj2lw38snqf6576wb5zndd0";
-    isUnstable = true;
-
-    extraPatches = [
-      (fetchpatch {
-        url = "https://github.com/Mic92/zfs/compare/${rev}...nixos-zfs-2018-02-02.patch";
-        sha256 = "1gqmgqi39qhk5kbbvidh8f2xqq25vj58i9x0wjqvcx6a71qj49ch";
-      })
-    ];
-
-    spl = splUnstable;
-  };
-
-  # TODO: Remove this module before 18.09
-  # also remove boot.zfs.enableLegacyCrypto
-  zfsLegacyCrypto = common {
-    # comment/uncomment if breaking kernel versions are known
-    incompatibleKernelVersion = null;
-
-    # this package should point to a version / git revision compatible with the latest kernel release
-    version = "2018-02-01";
+    version = "2018-08-13";
 
-    rev = "4c46b99d24a6e71b3c72462c11cb051d0930ad60";
-    sha256 = "011lcp2x44jgfzqqk2gjmyii1v7rxcprggv20prxa3c552drsx3c";
+    rev = "64e96969a88c21aebb2f8d982a8c345e55a2ae6c";
+    sha256 = "164fvsf9zqvq3vafnvjxafjl8gihmfqfsjwsmky16i90a6hs96gf";
     isUnstable = true;
 
     extraPatches = [
       (fetchpatch {
-        url = "https://github.com/Mic92/zfs/compare/4c46b99d24a6e71b3c72462c11cb051d0930ad60...nixos-zfs-2018-02-01.patch";
-        sha256 = "1gqmgqi39qhk5kbbvidh8f2xqq25vj58i9x0wjqvcx6a71qj49ch";
+        url = "https://github.com/Mic92/zfs/compare/${rev}...nixos-zfs-2018-08-13.patch";
+        sha256 = "1sdcr1w2jp3djpwlf1f91hrxxmc34q0jl388smdkxh5n5bpw5gzw";
       })
     ];
 
-    spl = splLegacyCrypto;
+    spl = null;
   };
-
 }