about 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/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch23
-rw-r--r--pkgs/os-specific/linux/checksec/default.nix50
-rw-r--r--pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix8
-rw-r--r--pkgs/os-specific/linux/iproute/default.nix4
-rw-r--r--pkgs/os-specific/linux/iputils/build-ninfod-with-openssl.patch13
-rw-r--r--pkgs/os-specific/linux/iputils/default.nix39
-rw-r--r--pkgs/os-specific/linux/kernel/common-config.nix6
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.14.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.19.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-5.1.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-5.2.nix4
-rw-r--r--pkgs/os-specific/linux/trace-cmd/default.nix43
-rw-r--r--pkgs/os-specific/linux/trace-cmd/fix-Makefiles.patch52
-rw-r--r--pkgs/os-specific/linux/trace-cmd/kernelshark.nix39
-rw-r--r--pkgs/os-specific/linux/trace-cmd/src.nix5
-rw-r--r--pkgs/os-specific/linux/udisks/2-default.nix27
18 files changed, 209 insertions, 124 deletions
diff --git a/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch b/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch
index 2caf52f3c0a3..9beeab0f9543 100644
--- a/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch
+++ b/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch
@@ -8,20 +8,21 @@ Signed-off-by: Austin Seipp <aseipp@pobox.com>
  checksec.sh | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
-diff --git a/checksec.sh b/checksec.sh
+diff --git a/checksec b/checksec
 index dd1f72e..63acc29 100644
---- a/checksec.sh
-+++ b/checksec.sh
-@@ -337,7 +337,8 @@ kernelcheck() {
-   printf "  userspace processes, this option lists the status of kernel configuration\n"
-   printf "  options that harden the kernel itself against attack.\n\n"
-   printf "  Kernel config: "
-- 
+--- a/checksec
++++ b/checksec
+@@ -676,7 +676,8 @@ kernelcheck() {
+   echo_message "  userspace processes, this option lists the status of kernel configuration\n" '' '' ''
+   echo_message "  options that harden the kernel itself against attack.\n\n" '' '' ''
+   echo_message "  Kernel config:\n" '' '' '{ "kernel": '
+-
 +
 +  modprobe configs 2> /dev/null
-   if [ -f /proc/config.gz ] ; then
-     kconfig="zcat /proc/config.gz"
-     printf "\033[32m/proc/config.gz\033[m\n\n"
+   if [[ ! "${1}" == "" ]] ; then
+     kconfig="cat ${1}"
+     echo_message "  Warning: The config ${1} on disk may not represent running kernel config!\n\n" "${1}" "<kernel config=\"${1}\"" "{ \"KernelConfig\":\"${1}\","
+     # update the architecture based on the config rather than the system
 -- 
 1.8.3.2
 
diff --git a/pkgs/os-specific/linux/checksec/default.nix b/pkgs/os-specific/linux/checksec/default.nix
index 6c927ae93afb..dc704dc167e0 100644
--- a/pkgs/os-specific/linux/checksec/default.nix
+++ b/pkgs/os-specific/linux/checksec/default.nix
@@ -1,43 +1,39 @@
-{ stdenv, fetchurl, file, findutils, binutils-unwrapped, glibc, coreutils, sysctl }:
+{ stdenv, fetchFromGitHub, makeWrapper, file, findutils
+, binutils-unwrapped, glibc, coreutils, sysctl, openssl
+}:
 
 stdenv.mkDerivation rec {
-  name = "checksec-${version}";
-  version = "1.5";
+  pname = "checksec";
+  version = "2.0.1";
 
-  src = fetchurl {
-    url    = "https://www.trapkit.de/tools/checksec.sh";
-    sha256 = "0iq9v568mk7g7ksa1939g5f5sx7ffq8s8n2ncvphvlckjgysgf3p";
+  src = fetchFromGitHub {
+    owner = "slimm609";
+    repo = "checksec.sh";
+    rev = version;
+    sha256 = "04lzwm24d576h425rgvgjj2wim29i3961jrj35r43wrswmrsc3r2";
   };
 
   patches = [ ./0001-attempt-to-modprobe-config-before-checking-kernel.patch ];
+  nativeBuildInputs = [ makeWrapper ];
 
-  unpackPhase = ''
-    mkdir ${name}
-    cp $src ${name}/checksec.sh
-    cd ${name}
-  '';
-
-  installPhase = ''
+  installPhase = let
+    path = stdenv.lib.makeBinPath [
+      findutils file binutils-unwrapped sysctl openssl
+    ];
+  in ''
     mkdir -p $out/bin
-    cp checksec.sh $out/bin/checksec
-    chmod +x $out/bin/checksec
-    substituteInPlace $out/bin/checksec --replace /bin/bash ${stdenv.shell}
+    install checksec $out/bin
     substituteInPlace $out/bin/checksec --replace /lib/libc.so.6 ${glibc.out}/lib/libc.so.6
-    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-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 -"
+    wrapProgram $out/bin/checksec \
+      --prefix PATH : ${path}
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "A tool for checking security bits on executables";
     homepage    = "http://www.trapkit.de/tools/checksec.html";
-    license     = stdenv.lib.licenses.bsd3;
-    platforms   = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    license     = licenses.bsd3;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ thoughtpolice globin ];
   };
 }
diff --git a/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix b/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
index a1a15bab0fea..c251e3963e7b 100644
--- a/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
+++ b/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   name = "firmware-linux-nonfree-${version}";
-  version = "2019-04-16";
+  version = "2019-07-17";
 
   src = fetchgit {
     url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
-    rev = "20190416";
-    sha256 = "1grsxch5x65piqm8zswa7za3zccwxk0sxdm5qpgidmmq729xq3py";
+    rev = "20190717";
+    sha256 = "1dcaqdqyffxiadx420pg20157wqidz0c0ca5mrgyfxgrbh6a4mdj";
   };
 
   installFlags = [ "DESTDIR=$(out)" ];
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
 
   outputHashMode = "recursive";
   outputHashAlgo = "sha256";
-  outputHash = "1fh6gwdx4paswhpyx8z43kf41l9svicp6ji06pdfhsnbx2l859zi";
+  outputHash = "1q3zqa3xxg4679p893xzwpa43afvdnnkg5xb0qs6mac75sizngid";
 
   meta = with stdenv.lib; {
     description = "Binary firmware collection packaged by kernel.org";
diff --git a/pkgs/os-specific/linux/iproute/default.nix b/pkgs/os-specific/linux/iproute/default.nix
index 1e53112d360d..527edc5ea741 100644
--- a/pkgs/os-specific/linux/iproute/default.nix
+++ b/pkgs/os-specific/linux/iproute/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "iproute2";
-  version = "5.1.0";
+  version = "5.2.0";
 
   src = fetchurl {
     url = "mirror://kernel/linux/utils/net/${pname}/${pname}-${version}.tar.xz";
-    sha256 = "1kvvrz5mlpjxqcm7vl6i8w6l1cb2amp6p5xyq006pgzafc49hnnw";
+    sha256 = "1a2dywa2kam24951byv9pl32mb9z6klh7d4vp8fwfgrm4vn5vfd5";
   };
 
   preConfigure = ''
diff --git a/pkgs/os-specific/linux/iputils/build-ninfod-with-openssl.patch b/pkgs/os-specific/linux/iputils/build-ninfod-with-openssl.patch
deleted file mode 100644
index 7ce1b4f527ec..000000000000
--- a/pkgs/os-specific/linux/iputils/build-ninfod-with-openssl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/ninfod/meson.build b/ninfod/meson.build
-index ea7ec1b..fada05b 100644
---- a/ninfod/meson.build
-+++ b/ninfod/meson.build
-@@ -10,7 +10,7 @@ ninfod_sources = files('''
- 	ninfod_name.c
- '''.split())
- executable('ninfod', [ninfod_sources, git_version_h],
--	dependencies : [cap_dep, crypto_dep, rt_dep, threads],
-+	dependencies : [cap_dep, dependency('openssl'), rt_dep, threads],
- 	link_with : [libcommon],
- 	include_directories : inc,
- 	install: true,
diff --git a/pkgs/os-specific/linux/iputils/default.nix b/pkgs/os-specific/linux/iputils/default.nix
index 0d27d5d97fca..3944a7b37fb8 100644
--- a/pkgs/os-specific/linux/iputils/default.nix
+++ b/pkgs/os-specific/linux/iputils/default.nix
@@ -1,42 +1,27 @@
 { stdenv, fetchFromGitHub, fetchpatch
 , meson, ninja, pkgconfig, gettext, libxslt, docbook_xsl_ns
-, libcap, nettle, libidn2, openssl, systemd
+, libcap, nettle, libidn2, systemd
 }:
 
 with stdenv.lib;
 
 let
-  time = "20190515";
-  # ninfod probably could build on cross, but the Makefile doesn't pass --host
-  # etc to the sub configure...
-  withNinfod = stdenv.hostPlatform == stdenv.buildPlatform;
+  version = "20190709";
   sunAsIsLicense = {
     fullName = "AS-IS, SUN MICROSYSTEMS license";
-    url = "https://github.com/iputils/iputils/blob/s${time}/rdisc.c";
+    url = "https://github.com/iputils/iputils/blob/s${version}/rdisc.c";
   };
-in stdenv.mkDerivation {
-  name = "iputils-${time}";
+in stdenv.mkDerivation rec {
+  pname = "iputils";
+  inherit version;
 
   src = fetchFromGitHub {
-    owner = "iputils";
-    repo = "iputils";
-    rev = "s${time}";
-    sha256 = "1k2wzgk0d47d1g9k8c1a5l24ml8h8xxz1vrs0vfbyxr7qghdhn4i";
+    owner = pname;
+    repo = pname;
+    rev = "s${version}";
+    sha256 = "04bp4af15adp79ipxmiakfp0ij6hx5qam266flzbr94pr8z8l693";
   };
 
-  # ninfod cannot be build with nettle yet:
-  patches =
-    [ ./build-ninfod-with-openssl.patch
-      (fetchpatch { # build-sys/doc: Fix the dependency on xsltproc
-        url = "https://github.com/iputils/iputils/commit/3b013f271931c3fe771e5a2c591f35d617de90f3.patch";
-        sha256 = "0ilhlgiqdflry7km3ik8i4h1yymm5f5zmwyl5r029q7x1p8kinfw";
-      })
-      (fetchpatch { # build-sys: Make setcap really optional
-        url = "https://github.com/iputils/iputils/commit/473be6467f995865244e7e68b2fa587a4ee79551.patch";
-        sha256 = "0781147qaf0jwa177jbmh474r8hqs0jwgi5vgx9csb43jzdm8hqf";
-      })
-    ];
-
   mesonFlags =
     [ "-DUSE_CRYPTO=nettle"
       "-DBUILD_RARPD=true"
@@ -44,14 +29,12 @@ in stdenv.mkDerivation {
       "-DNO_SETCAP_OR_SUID=true"
       "-Dsystemdunitdir=etc/systemd/system"
     ]
-    ++ optional (!withNinfod) "-DBUILD_NINFOD=false"
     # Disable idn usage w/musl (https://github.com/iputils/iputils/pull/111):
     ++ optional stdenv.hostPlatform.isMusl "-DUSE_IDN=false";
 
   nativeBuildInputs = [ meson ninja pkgconfig gettext libxslt.bin docbook_xsl_ns ];
   buildInputs = [ libcap nettle systemd ]
-    ++ optional (!stdenv.hostPlatform.isMusl) libidn2
-    ++ optional withNinfod openssl; # TODO: Build with nettle
+    ++ optional (!stdenv.hostPlatform.isMusl) libidn2;
 
   meta = {
     homepage = https://github.com/iputils/iputils;
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index 855f854b111d..b392dc853d35 100644
--- a/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/pkgs/os-specific/linux/kernel/common-config.nix
@@ -699,11 +699,13 @@ let
       PREEMPT_VOLUNTARY = yes;
 
     } // optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "aarch64-linux") {
-      # Enable memory hotplug support
-      # Allows you to dynamically add & remove memory to a VM client running NixOS without requiring a reboot
+      # Enable CPU/memory hotplug support
+      # Allows you to dynamically add & remove CPUs/memory to a VM client running NixOS without requiring a reboot
+      ACPI_HOTPLUG_CPU = yes;
       ACPI_HOTPLUG_MEMORY = yes;
       MEMORY_HOTPLUG = yes;
       MEMORY_HOTREMOVE = yes;
+      HOTPLUG_CPU = yes;
       MIGRATION = yes;
       SPARSEMEM = yes;
 
diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix
index d3d2e2728a2d..448c36a481ce 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.133";
+  version = "4.14.134";
 
   # 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 = "005pg4f8l2qz8g6hd71pj567z91hwjwdwb37h4dbb3fj6kjl965y";
+    sha256 = "0b9xj1rwr5fpw2giirfghzxxc0wp1hwf4nqvalx314pxxysyf88b";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-4.19.nix b/pkgs/os-specific/linux/kernel/linux-4.19.nix
index b244f48f24c9..8a07b99900c3 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.19.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.19.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "4.19.59";
+  version = "4.19.62";
 
   # 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 = "0nxkr196q0b1hs3a3zavpsjp0jgbqmcwdf0y0f3hbpirshjiid5q";
+    sha256 = "1p6s1ksrsq3za7644j0qf9brf6brwq39jxpfln5ypmyfi5qn9gh7";
   };
 } // (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 1e3da9085196..366bf1ad2656 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, fetchurl, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.4.185";
+  version = "4.4.186";
   extraMeta.branch = "4.4";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1ll694m5193dmwn8ys4sf2p6a6njd5pm38v862ih1iw7l3vj0l3s";
+    sha256 = "113rjf8842glzi23y1g1yrwncihv2saah6wz0r726r06bk9p64hb";
   };
 } // (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 d611e4cf71e6..8fe5d3dfcb22 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, fetchurl, perl, buildLinux, ... } @ args:
 
 buildLinux (args // rec {
-  version = "4.9.185";
+  version = "4.9.186";
   extraMeta.branch = "4.9";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "16z3ijfzffpkp4mj42j3j8zbnpba1a67kd5cdqwb28spf32a66vc";
+    sha256 = "0sjbp7m6d625rw06wv34a0805d1lgldii4pxiqfpja871m1q8914";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-5.1.nix b/pkgs/os-specific/linux/kernel/linux-5.1.nix
index 958aca390480..ad3b292656e9 100644
--- a/pkgs/os-specific/linux/kernel/linux-5.1.nix
+++ b/pkgs/os-specific/linux/kernel/linux-5.1.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "5.1.18";
+  version = "5.1.21";
 
   # 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/v5.x/linux-${version}.tar.xz";
-    sha256 = "0spkk3pqp5fhvchgjhcm53zl1qqwsvdy7p4filb1nz4xypfff4v0";
+    sha256 = "1xj1wfhjz2s5a8j6zx3fsd7rrrkvw5waszzylf2gn3ag6615yjan";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-5.2.nix b/pkgs/os-specific/linux/kernel/linux-5.2.nix
index 512fb3512005..324c52374448 100644
--- a/pkgs/os-specific/linux/kernel/linux-5.2.nix
+++ b/pkgs/os-specific/linux/kernel/linux-5.2.nix
@@ -3,7 +3,7 @@
 with stdenv.lib;
 
 buildLinux (args // rec {
-  version = "5.2.1";
+  version = "5.2.4";
 
   # 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/v5.x/linux-${version}.tar.xz";
-    sha256 = "01k5v3kdwk65cfx6bw4cl32jbfvf976jbya7q4a8lab3km7fi09m";
+    sha256 = "0hzfayq79bksng09ngw3k3h3zkd6ndfn059rvwpznypy1fg8pkdi";
   };
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/trace-cmd/default.nix b/pkgs/os-specific/linux/trace-cmd/default.nix
index 33dbfe5bf0a7..3133602b44eb 100644
--- a/pkgs/os-specific/linux/trace-cmd/default.nix
+++ b/pkgs/os-specific/linux/trace-cmd/default.nix
@@ -1,25 +1,40 @@
 { stdenv, fetchgit, asciidoc, docbook_xsl, libxslt }:
-
 stdenv.mkDerivation rec {
   name    = "trace-cmd-${version}";
-  version = "2.6";
+  version = "2.8.3";
 
-  src = fetchgit {
-    url    = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git";
-    rev    = "refs/tags/trace-cmd-v${version}";
-    sha256 = "15d6b7l766h2mamqgphx6l6a33b1zn0yar2h7i6b24ph6kz3idxn";
-  };
+  src = fetchgit (import ./src.nix);
+
+  patches = [ ./fix-Makefiles.patch ];
+
+  nativeBuildInputs = [ asciidoc libxslt ];
 
-  buildInputs = [ asciidoc libxslt ];
+  outputs = [ "out" "lib" "dev" "man" ];
+
+  MANPAGE_DOCBOOK_XSL="${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl";
 
   dontConfigure = true;
-  buildPhase     = "make prefix=$out MANPAGE_DOCBOOK_XSL=${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl all doc";
-  installPhase   = "make prefix=$out install install_doc";
 
-  meta = {
+  buildPhase = "make trace-cmd libs doc";
+
+  installTargets = [ "install_cmd" "install_libs" "install_man" ];
+  installFlags = [
+    "bindir=${placeholder "out"}/bin"
+    "man_dir=${placeholder "man"}/share/man"
+    "libdir=${placeholder "lib"}/lib"
+    "includedir=${placeholder "dev"}/include/trace-cmd"
+    "BASH_COMPLETE_DIR=${placeholder "out"}/etc/bash_completion.d"
+  ];
+
+  postInstall = ''
+    mv $dev/include/trace-cmd/traceevent $dev/include/traceevent
+  '';
+
+  meta = with stdenv.lib; {
     description = "User-space tools for the Linux kernel ftrace subsystem";
-    license     = stdenv.lib.licenses.gpl2;
-    platforms   = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    homepage    = http://kernelshark.org/;
+    license     = licenses.gpl2;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ thoughtpolice basvandijk ];
   };
 }
diff --git a/pkgs/os-specific/linux/trace-cmd/fix-Makefiles.patch b/pkgs/os-specific/linux/trace-cmd/fix-Makefiles.patch
new file mode 100644
index 000000000000..0d6f5c5d8bfe
--- /dev/null
+++ b/pkgs/os-specific/linux/trace-cmd/fix-Makefiles.patch
@@ -0,0 +1,52 @@
+diff --git a/Documentation/Makefile b/Documentation/Makefile
+index 21e42fd..826361d 100644
+--- a/Documentation/Makefile
++++ b/Documentation/Makefile
+@@ -108,7 +108,11 @@ $(IMGS_INSTALL): %.png.install : %.png force
+ 
+ GUI_INSTALL = $(HTML_INSTALL) $(IMGS_INSTALL)
+ 
+-install: $(MAN1_INSTALL) $(MAN5_INSTALL) $(GUI_INSTALL)
++install_man: $(MAN1_INSTALL) $(MAN5_INSTALL)
++
++install_gui: $(GUI_INSTALL)
++
++install: install_man install_gui
+ 
+ clean:
+ 	(cd $(obj); \
+diff --git a/Makefile b/Makefile
+index 2bcc383..107ead0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -289,7 +289,7 @@ libtraceevent.a: $(LIBTRACEEVENT_STATIC)
+ libtracecmd.a: $(LIBTRACECMD_STATIC)
+ libtracecmd.so: $(LIBTRACECMD_SHARED)
+ 
+-libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_SHARED)
++libs: $(LIBTRACECMD_SHARED) $(LIBTRACEEVENT_SHARED) $(LIBTRACECMD_STATIC) $(LIBTRACEEVENT_STATIC)
+ 
+ plugins: force $(obj)/plugins/trace_plugin_dir $(obj)/plugins/trace_python_dir
+ 	$(Q)$(MAKE) -C $(src)/plugins
+@@ -345,6 +345,8 @@ install_gui: install_cmd gui
+ install_libs: libs
+ 	$(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ))
+ 	$(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ))
++	$(Q)$(call do_install,$(LIBTRACECMD_STATIC),$(libdir_SQ))
++	$(Q)$(call do_install,$(LIBTRACEEVENT_STATIC),$(libdir_SQ))
+ 	$(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(includedir_SQ)/traceevent)
+ 	$(Q)$(call do_install,$(src)/include/traceevent/trace-seq.h,$(includedir_SQ)/traceevent)
+ 	$(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ))
+@@ -356,6 +358,12 @@ doc:
+ doc_clean:
+ 	$(MAKE) -C $(src)/Documentation clean
+ 
++install_man:
++	$(MAKE) -C $(src)/Documentation install_man
++
++install_gui_docs:
++	$(MAKE) -C $(src)/Documentation install_gui
++
+ install_doc:
+ 	$(MAKE) -C $(src)/Documentation install
+ 
diff --git a/pkgs/os-specific/linux/trace-cmd/kernelshark.nix b/pkgs/os-specific/linux/trace-cmd/kernelshark.nix
new file mode 100644
index 000000000000..8e49af771394
--- /dev/null
+++ b/pkgs/os-specific/linux/trace-cmd/kernelshark.nix
@@ -0,0 +1,39 @@
+{ stdenv, mkDerivation, fetchgit, qtbase, cmake, json_c, mesa_glu, freeglut, trace-cmd, pkg-config }:
+mkDerivation rec {
+  pname = "kernelshark";
+  version = "0.9.8";
+
+  src = fetchgit (import ./src.nix);
+
+  patches = [ ./fix-Makefiles.patch ];
+
+  outputs = [ "out" "doc" ];
+
+  preConfigure = "pushd kernel-shark";
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ qtbase json_c mesa_glu freeglut pkg-config ];
+
+  cmakeFlags = [
+    "-D_INSTALL_PREFIX=${placeholder "out"}"
+    "-DTRACECMD_BIN_DIR=${trace-cmd}/bin"
+    "-DTRACECMD_INCLUDE_DIR=${trace-cmd.dev}/include"
+    "-DTRACECMD_LIBRARY=${trace-cmd.lib}/lib/libtracecmd.a"
+    "-DTRACEEVENT_LIBRARY=${trace-cmd.lib}/lib/libtraceevent.a"
+  ];
+
+  preInstall = ''
+    popd
+    make install_gui_docs prefix=$doc
+    pushd kernel-shark/build
+  '';
+
+  meta = with stdenv.lib; {
+    description = "GUI for trace-cmd which is an interface for the Linux kernel ftrace subsystem";
+    homepage    = http://kernelshark.org/;
+    license     = licenses.gpl2;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ basvandijk ];
+  };
+}
diff --git a/pkgs/os-specific/linux/trace-cmd/src.nix b/pkgs/os-specific/linux/trace-cmd/src.nix
new file mode 100644
index 000000000000..836e71b1851e
--- /dev/null
+++ b/pkgs/os-specific/linux/trace-cmd/src.nix
@@ -0,0 +1,5 @@
+{
+  url    = "git://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/";
+  rev    = "138c70106835ee0f05879e7f2f46bca8dae7ca99"; # branch: trace-cmd-stable-v2.8
+  sha256 = "1grpip7lywf98nsm7ql1d6bgc0ky0672savr8jz3a8hf9ny265nx";
+}
diff --git a/pkgs/os-specific/linux/udisks/2-default.nix b/pkgs/os-specific/linux/udisks/2-default.nix
index 484697d42ea9..e99e9e37d823 100644
--- a/pkgs/os-specific/linux/udisks/2-default.nix
+++ b/pkgs/os-specific/linux/udisks/2-default.nix
@@ -5,16 +5,15 @@
 , xfsprogs, f2fs-tools, dosfstools, e2fsprogs, btrfs-progs, exfat, nilfs-utils, ntfs3g
 }:
 
-let
-  version = "2.8.2";
-in stdenv.mkDerivation rec {
-  name = "udisks-${version}";
+stdenv.mkDerivation rec {
+  pname = "udisks";
+  version = "2.8.4";
 
   src = fetchFromGitHub {
     owner = "storaged-project";
     repo = "udisks";
-    rev = name;
-    sha256 = "000xf99id1f6w8l20jxm3f2g32v9wx68rzv6q2bwrfz6vmy76xwy";
+    rev = "${pname}-${version}";
+    sha256 = "01wx2x8xyal595dhdih7rva2bz7gqzgwdp56gi0ikjdzayx17wcf";
   };
 
   outputs = [ "out" "man" "dev" "devdoc" ];
@@ -33,7 +32,10 @@ in stdenv.mkDerivation rec {
     })
     (substituteAll {
       src = ./force-path.patch;
-      path = stdenv.lib.makeBinPath [ btrfs-progs coreutils dosfstools e2fsprogs exfat f2fs-tools nilfs-utils xfsprogs ntfs3g parted utillinux ];
+      path = stdenv.lib.makeBinPath [
+        btrfs-progs coreutils dosfstools e2fsprogs exfat f2fs-tools nilfs-utils
+        xfsprogs ntfs3g parted utillinux
+      ];
     })
   ];
 
@@ -59,6 +61,7 @@ in stdenv.mkDerivation rec {
     "--localstatedir=/var"
     "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
     "--with-udevdir=$(out)/lib/udev"
+    "--with-tmpfilesdir=no"
   ];
 
   makeFlags = [
@@ -66,13 +69,15 @@ in stdenv.mkDerivation rec {
     "INTROSPECTION_TYPELIBDIR=$(out)/lib/girepository-1.0"
   ];
 
-  doCheck = false; # fails
+  enableParallelBuilding = true;
+
+  doCheck = true;
 
   meta = with stdenv.lib; {
     description = "A daemon, tools and libraries to access and manipulate disks, storage devices and technologies";
-    homepage = https://www.freedesktop.org/wiki/Software/udisks/;
-    license = licenses.gpl2Plus; # lgpl2Plus for the library, gpl2Plus for the tools & daemon
-    maintainers = with maintainers; [];
+    homepage = "https://www.freedesktop.org/wiki/Software/udisks/";
+    license = with licenses; [ lgpl2Plus gpl2Plus ]; # lgpl2Plus for the library, gpl2Plus for the tools & daemon
+    maintainers = with maintainers; [ johnazoidberg ];
     platforms = platforms.linux;
   };
 }