summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-07-26 13:46:04 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-07-26 13:46:04 -0400
commit9be40841ea4251a09ae7a1023abc1b6d191f61bb (patch)
treef45a3e2cc682740887b81517eca4bd4fecd6c1c2 /pkgs/tools
parent8ce4780eff33591ed54b2fb97ca96108e4e7a740 (diff)
parentac4c567c3603c5106862f144c21037f6ad76c0ad (diff)
downloadnixlib-9be40841ea4251a09ae7a1023abc1b6d191f61bb.tar
nixlib-9be40841ea4251a09ae7a1023abc1b6d191f61bb.tar.gz
nixlib-9be40841ea4251a09ae7a1023abc1b6d191f61bb.tar.bz2
nixlib-9be40841ea4251a09ae7a1023abc1b6d191f61bb.tar.lz
nixlib-9be40841ea4251a09ae7a1023abc1b6d191f61bb.tar.xz
nixlib-9be40841ea4251a09ae7a1023abc1b6d191f61bb.tar.zst
nixlib-9be40841ea4251a09ae7a1023abc1b6d191f61bb.zip
Merge remote-tracking branch 'upstream/master' into staging-base
Conflicts:
	pkgs/build-support/cc-wrapper/default.nix
	pkgs/build-support/gcc-wrapper-old/builder.sh
	pkgs/build-support/trivial-builders.nix
	pkgs/desktops/kde-4.14/kde-package/default.nix
	pkgs/development/compilers/openjdk-darwin/8.nix
	pkgs/development/compilers/openjdk-darwin/default.nix
	pkgs/development/compilers/openjdk/7.nix
	pkgs/development/compilers/openjdk/8.nix
	pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
	pkgs/development/compilers/zulu/default.nix
	pkgs/development/haskell-modules/generic-builder.nix
	pkgs/misc/misc.nix
	pkgs/stdenv/generic/builder.sh
	pkgs/stdenv/generic/setup.sh
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/X11/setroot/default.nix5
-rw-r--r--pkgs/tools/backup/borg/default.nix4
-rw-r--r--pkgs/tools/backup/znapzend/default.nix4
-rw-r--r--pkgs/tools/compression/zstd/default.nix4
-rw-r--r--pkgs/tools/filesystems/ceph/generic.nix10
-rw-r--r--pkgs/tools/misc/crudini/default.nix24
-rw-r--r--pkgs/tools/misc/dateutils/default.nix4
-rw-r--r--pkgs/tools/misc/ddccontrol/default.nix2
-rw-r--r--pkgs/tools/misc/quota/default.nix24
-rw-r--r--pkgs/tools/misc/xfstests/default.nix17
-rw-r--r--pkgs/tools/misc/xxd/default.nix16
-rw-r--r--pkgs/tools/networking/haproxy/default.nix4
-rw-r--r--pkgs/tools/networking/mailutils/default.nix85
-rw-r--r--pkgs/tools/networking/mailutils/fix-build-mb-len-max.patch14
-rw-r--r--pkgs/tools/networking/mailutils/fix-test-ali-awk.patch16
-rw-r--r--pkgs/tools/networking/mailutils/no-gets.patch14
-rw-r--r--pkgs/tools/networking/mailutils/path-to-cat.patch49
-rw-r--r--pkgs/tools/networking/mailutils/scm_c_string.patch15
-rw-r--r--pkgs/tools/package-management/apt/default.nix65
-rw-r--r--pkgs/tools/package-management/nix-index/default.nix32
-rw-r--r--pkgs/tools/system/honcho/default.nix44
-rw-r--r--pkgs/tools/system/osquery/default.nix79
-rw-r--r--pkgs/tools/system/osquery/misc.patch187
-rw-r--r--pkgs/tools/system/osquery/platform-nixos.patch22
-rw-r--r--pkgs/tools/text/html-tidy/default.nix5
25 files changed, 641 insertions, 104 deletions
diff --git a/pkgs/tools/X11/setroot/default.nix b/pkgs/tools/X11/setroot/default.nix
index 81b888ccb783..2245f03ec7fe 100644
--- a/pkgs/tools/X11/setroot/default.nix
+++ b/pkgs/tools/X11/setroot/default.nix
@@ -5,14 +5,14 @@
 assert enableXinerama -> libXinerama != null;
 
 stdenv.mkDerivation rec {
-  version = "1.4.4";
+  version = "2.0.1";
   name = "setroot-${version}";
 
   src = fetchFromGitHub {
     owner = "ttzhou";
     repo = "setroot";
     rev = "v${version}";
-    sha256 = "0vphma0as8pnqrakdw6gaiiz7xawb4y72sc9dna755kkclgbyl8m";
+    sha256 = "01krjfc3xpp0wbqz9nvf1n34gkpd41gysn289sj1wcjxia4n4gsi";
   };
 
   buildInputs = [ libX11 imlib2 ]
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
     description = "Simple X background setter inspired by imlibsetroot and feh";
     homepage = https://github.com/ttzhou/setroot;
     license = licenses.gpl3Plus;
+    maintainers = maintainers.vyp;
     platforms = platforms.unix;
   };
 }
diff --git a/pkgs/tools/backup/borg/default.nix b/pkgs/tools/backup/borg/default.nix
index 476c42504a26..dcea9c9435b9 100644
--- a/pkgs/tools/backup/borg/default.nix
+++ b/pkgs/tools/backup/borg/default.nix
@@ -2,13 +2,13 @@
 
 python3Packages.buildPythonApplication rec {
   name = "borgbackup-${version}";
-  version = "1.0.10";
+  version = "1.0.11";
   namePrefix = "";
 
   src = fetchurl {
     url = "https://github.com/borgbackup/borg/releases/download/"
       + "${version}/${name}.tar.gz";
-    sha256 = "1sarmpzwr8dhbg0hsvaclcsjfax36ssb32d9klhhah4j8kqji3wp";
+    sha256 = "14fjk5dfwmjkn7nmkbhhbrk3g1wfrn8arvqd5r9jaij534nzsvpw";
   };
 
   nativeBuildInputs = with python3Packages; [
diff --git a/pkgs/tools/backup/znapzend/default.nix b/pkgs/tools/backup/znapzend/default.nix
index 311df9086890..cacfb8287a33 100644
--- a/pkgs/tools/backup/znapzend/default.nix
+++ b/pkgs/tools/backup/znapzend/default.nix
@@ -1,8 +1,8 @@
 { stdenv, fetchFromGitHub, zfs, mbuffer, perl, perlPackages, wget, autoconf, automake }:
 
 let
-  version = "0.15.7";
-  checksum = "1xb94kxfq9sm3g0s6wpyyz6h2aihgca5gyybg0a5r8sar7yz97j0";
+  version = "0.17.0";
+  checksum = "0cncwkiw0w2am7gwi01p6ln87zgg1x6blfyxx7n7x8m1mv6704hl";
 in
 stdenv.mkDerivation rec {
   name = "znapzend-${version}";
diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix
index 82ead0baa16d..fb9301bf1ced 100644
--- a/pkgs/tools/compression/zstd/default.nix
+++ b/pkgs/tools/compression/zstd/default.nix
@@ -3,10 +3,10 @@
 
 stdenv.mkDerivation rec {
   name = "zstd-${version}";
-  version = "1.2.0";
+  version = "1.3.0";
 
   src = fetchFromGitHub {
-    sha256 = "01b5w4yrwa8lgnjyi42zxjhw8cfyh8yfhdsjr04y5qsblz0hv0zl";
+    sha256 = "1rnxfhcmg8zsagyf70hiwm32mam60hq58pzgy7jn8c3iwv24mpz5";
     rev = "v${version}";
     repo = "zstd";
     owner = "facebook";
diff --git a/pkgs/tools/filesystems/ceph/generic.nix b/pkgs/tools/filesystems/ceph/generic.nix
index e4c8b0f33bcd..0af97dd3b540 100644
--- a/pkgs/tools/filesystems/ceph/generic.nix
+++ b/pkgs/tools/filesystems/ceph/generic.nix
@@ -4,7 +4,7 @@
 
 # Optional Dependencies
 , snappy ? null, leveldb ? null, yasm ? null, fcgi ? null, expat ? null
-, curl ? null, fuse ? null, accelio ? null, libibverbs ? null, librdmacm ? null
+, curl ? null, fuse ? null, libibverbs ? null, librdmacm ? null
 , libedit ? null, libatomic_ops ? null, kinetic-cpp-client ? null
 , rocksdb ? null, libs3 ? null
 
@@ -50,7 +50,6 @@ let
   optExpat = shouldUsePkg expat;
   optCurl = shouldUsePkg curl;
   optFuse = shouldUsePkg fuse;
-  optAccelio = shouldUsePkg accelio;
   optLibibverbs = shouldUsePkg libibverbs;
   optLibrdmacm = shouldUsePkg librdmacm;
   optLibedit = shouldUsePkg libedit;
@@ -76,10 +75,6 @@ let
   hasOsd = hasServer;
   hasRadosgw = optFcgi != null && optExpat != null && optCurl != null && optLibedit != null;
 
-  hasXio = (stdenv.isLinux || stdenv.isFreeBSD) &&
-    versionAtLeast version "9.0.3" &&
-    optAccelio != null && optLibibverbs != null && optLibrdmacm != null;
-
   hasRocksdb = versionAtLeast version "9.0.0" && optRocksdb != null;
 
   # TODO: Reenable when kinetic support is fixed
@@ -128,8 +123,6 @@ stdenv.mkDerivation {
     optSnappy optLeveldb
   ] ++ optionals hasRadosgw [
     optFcgi optExpat optCurl optFuse optLibedit
-  ] ++ optionals hasXio [
-    optAccelio optLibibverbs optLibrdmacm
   ] ++ optionals hasRocksdb [
     optRocksdb
   ] ++ optionals hasKinetic [
@@ -192,7 +185,6 @@ stdenv.mkDerivation {
     (mkWith   (malloc == optGperftools)    "tcmalloc"             null)
     (mkEnable false                        "pgrefdebugging"       null)
     (mkEnable false                        "cephfs-java"          null)
-    (mkEnable hasXio                       "xio"                  null)
     (mkWith   (optLibatomic_ops != null)   "libatomic-ops"        null)
     (mkWith   true                         "ocf"                  null)
     (mkWith   hasKinetic                   "kinetic"              null)
diff --git a/pkgs/tools/misc/crudini/default.nix b/pkgs/tools/misc/crudini/default.nix
index 856138f046ae..7ca103062c11 100644
--- a/pkgs/tools/misc/crudini/default.nix
+++ b/pkgs/tools/misc/crudini/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, python2Packages }:
+{ stdenv, fetchFromGitHub, python2Packages, help2man }:
 
 python2Packages.buildPythonApplication rec {
   name = "crudini-${version}";
@@ -11,10 +11,30 @@ python2Packages.buildPythonApplication rec {
     sha256 = "0x9z9lsygripj88gadag398pc9zky23m16wmh8vbgw7ld1nhkiav";
   };
 
+  nativeBuildInputs = [ help2man ];
   propagatedBuildInputs = with python2Packages; [ iniparse ];
 
-  checkPhase = ''
+  doCheck = true;
+
+  prePatch = ''
+    # make runs the unpatched version in src so we need to patch them in addition to tests
     patchShebangs .
+  '';
+
+  postBuild = ''
+    make all
+  '';
+
+  postInstall = ''
+    mkdir -p $out/share/{man/man1,doc/crudini}
+
+    cp README EXAMPLES $out/share/doc/crudini/
+    for f in *.1 ; do
+      gzip -c $f > $out/share/man/man1/$(basename $f).gz
+    done
+  '';
+
+  checkPhase = ''
     pushd tests >/dev/null
     ./test.sh
   '';
diff --git a/pkgs/tools/misc/dateutils/default.nix b/pkgs/tools/misc/dateutils/default.nix
index 40d729d063d6..396d26a6cd14 100644
--- a/pkgs/tools/misc/dateutils/default.nix
+++ b/pkgs/tools/misc/dateutils/default.nix
@@ -4,10 +4,10 @@ stdenv.mkDerivation rec {
   version = "0.4.1";
   name = "dateutils-${version}";
 
-  src =fetchurl {
+  src = fetchurl {
     url = "https://bitbucket.org/hroptatyr/dateutils/downloads/${name}.tar.xz";
     sha256 = "0y2jsmvilljbid14lzmk3kgvasn4h7hr6y3wwbr3lkgwfn4y9k3c";
- 	};
+  };
 
   meta = with stdenv.lib; {
     description = "A bunch of tools that revolve around fiddling with dates and times in the command line";
diff --git a/pkgs/tools/misc/ddccontrol/default.nix b/pkgs/tools/misc/ddccontrol/default.nix
index b3aca778cd9e..26c5a6b21395 100644
--- a/pkgs/tools/misc/ddccontrol/default.nix
+++ b/pkgs/tools/misc/ddccontrol/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
 
   patches = [ ./automake.patch ];
 
-  hardeningDisable = [ "format" ];
+  hardeningDisable = [ "format" "bindnow" ];
 
   prePatch = ''
       newPath=$(echo "${ddccontrol-db}/share/ddccontrol-db" | sed "s/\\//\\\\\\//g")
diff --git a/pkgs/tools/misc/quota/default.nix b/pkgs/tools/misc/quota/default.nix
new file mode 100644
index 000000000000..9ba138bf0e9d
--- /dev/null
+++ b/pkgs/tools/misc/quota/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, e2fsprogs, openldap, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  version = "4.03";
+  name = "quota-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/linuxquota/quota-${version}.tar.gz";
+    sha256 = "0jv7vhxhjp3gc4hwgmrhg448sbzzqib80gdas9nm0c5zwyd4sv4w";
+  };
+
+  outputs = [ "out" "dev" "doc" "man" ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ e2fsprogs openldap ];
+
+  meta = with stdenv.lib; {
+    description = "Tools to manage kernel-level quotas in Linux";
+    homepage = http://sourceforge.net/projects/linuxquota/;
+    license = licenses.gpl2; # With some files being BSD as an exception
+    platforms = platforms.linux;
+    maintainers = [ maintainers.dezgeg ];
+  };
+}
diff --git a/pkgs/tools/misc/xfstests/default.nix b/pkgs/tools/misc/xfstests/default.nix
index f312f4770b54..a28614e2a263 100644
--- a/pkgs/tools/misc/xfstests/default.nix
+++ b/pkgs/tools/misc/xfstests/default.nix
@@ -1,17 +1,18 @@
-{ stdenv, acl, attr, autoreconfHook, bash, bc, coreutils, e2fsprogs, fetchgit, fio, gawk
-, lib, libaio, libcap, libuuid, libxfs, lvm2, openssl, perl, procps, psmisc, su
+{ stdenv, acl, attr, autoconf, automake, bash, bc, coreutils, e2fsprogs, fetchgit, fio, gawk
+, lib, libaio, libcap, libtool, libuuid, libxfs, lvm2, openssl, perl, procps, psmisc, quota, su
 , time, utillinux, which, writeScript, xfsprogs }:
 
 stdenv.mkDerivation {
-  name = "xfstests-2017-03-26";
+  name = "xfstests-2017-07-16";
 
   src = fetchgit {
     url = "git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git";
-    rev = "7400c10e503fed20fe2d9f8b03b2157eba4ff3b8";
-    sha256 = "0m30mx8nv49ryijlkqffjmkw2g1xdxsrq868jh9crwh19055v7qp";
+    rev = "c3893c2dc623a07b1ace8e72ee4beb29f8bfae15";
+    sha256 = "1p42dakry4r2366hdgj4i1wcnjs4qk0bfmyr70r1n7s7ykvnvnrl";
   };
 
-  buildInputs = [ acl autoreconfHook attr gawk libaio libuuid libxfs openssl perl ];
+  nativeBuildInputs = [ autoconf automake libtool ];
+  buildInputs = [ acl attr gawk libaio libuuid libxfs openssl perl ];
 
   hardeningDisable = [ "format" ];
   enableParallelBuilding = true;
@@ -55,6 +56,8 @@ stdenv.mkDerivation {
     export MAKE=$(type -P make)
     export SED=$(type -P sed)
     export SORT=$(type -P sort)
+
+    make configure
   '';
 
   postInstall = ''
@@ -83,7 +86,7 @@ stdenv.mkDerivation {
       ln -s @out@/lib/xfstests/$f $f
     done
 
-    export PATH=${lib.makeBinPath [acl attr bc e2fsprogs fio gawk libcap lvm2 perl procps psmisc utillinux which xfsprogs]}:$PATH
+    export PATH=${lib.makeBinPath [acl attr bc e2fsprogs fio gawk libcap lvm2 perl procps psmisc quota utillinux which xfsprogs]}:$PATH
     exec ./check "$@"
   '';
 
diff --git a/pkgs/tools/misc/xxd/default.nix b/pkgs/tools/misc/xxd/default.nix
new file mode 100644
index 000000000000..a4cfd4321ba0
--- /dev/null
+++ b/pkgs/tools/misc/xxd/default.nix
@@ -0,0 +1,16 @@
+{ stdenv, vim }:
+
+stdenv.mkDerivation rec {
+  name = "xxd-${version}";
+  inherit (vim) version;
+  phases = [ "installPhase" ];
+  installPhase = ''
+    mkdir -p $out/{bin,share/man/man1}
+    install -m755 ${stdenv.lib.getBin vim}/bin/xxd $out/bin/xxd
+    install -m644 ${stdenv.lib.getBin vim}/share/man/man1/xxd.1.gz $out/share/man/man1/xxd.1.gz
+  '';
+  meta = with stdenv.lib; {
+    description = "Make a hexdump or do the reverse.";
+    inherit (vim.meta) homepage license maintainers platforms;
+  };
+}
diff --git a/pkgs/tools/networking/haproxy/default.nix b/pkgs/tools/networking/haproxy/default.nix
index dda4452f6448..332edce45cd4 100644
--- a/pkgs/tools/networking/haproxy/default.nix
+++ b/pkgs/tools/networking/haproxy/default.nix
@@ -10,13 +10,13 @@ assert usePcre -> pcre != null;
 stdenv.mkDerivation rec {
   pname = "haproxy";
   majorVersion = "1.7";
-  minorVersion = "3";
+  minorVersion = "8";
   version = "${majorVersion}.${minorVersion}";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "http://www.haproxy.org/download/${majorVersion}/src/${name}.tar.gz";
-    sha256 = "ebb31550a5261091034f1b6ac7f4a8b9d79a8ce2a3ddcd7be5b5eb355c35ba65";
+    sha256 = "0hp1k957idaphhmw4m0x8cdzdw9ga1mzgsnk2m0as86xrqy1b47c";
   };
 
   buildInputs = [ openssl zlib ]
diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix
index f83ea004db63..aee5302405a5 100644
--- a/pkgs/tools/networking/mailutils/default.nix
+++ b/pkgs/tools/networking/mailutils/default.nix
@@ -1,36 +1,81 @@
-{ fetchurl, stdenv, gettext, gdbm, libtool, pam, readline
-, ncurses, gnutls, sasl, fribidi, gss , mysql, guile, texinfo,
-  gnum4, dejagnu, nettools }:
+{ stdenv, fetchurl, fetchpatch, autoreconfHook, dejagnu, gettext, libtool, pkgconfig
+, gdbm, pam, readline, ncurses, gnutls, guile, texinfo, gnum4, sasl, fribidi, nettools
+, gss, mysql }:
 
+let
+  p = "https://raw.githubusercontent.com/gentoo/gentoo/9c921e89d51876fd876f250324893fd90c019326/net-mail/mailutils/files";
+in
 stdenv.mkDerivation rec {
-  name = "mailutils-2.2";
+  name = "${project}-${version}";
+  project = "mailutils";
+  version = "3.2";
 
   src = fetchurl {
-    url = "mirror://gnu/mailutils/${name}.tar.bz2";
-    sha256 = "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65";
+    url = "mirror://gnu/${project}/${name}.tar.xz";
+    sha256 = "0zh7xn8yvnw9zkc7gi5290i34viwxp1rn0g1q9nyvmckkvk59lwn";
   };
 
-  hardeningDisable = [ "format" ];
+  nativeBuildInputs = [
+    autoreconfHook gettext libtool pkgconfig
+  ] ++ stdenv.lib.optional doCheck dejagnu;
+  buildInputs = [
+    gdbm pam readline ncurses gnutls guile texinfo gnum4 sasl fribidi nettools
+    gss mysql.lib
+  ];
 
-  patches = [ ./path-to-cat.patch ./no-gets.patch ./scm_c_string.patch ];
+  patches = [
+    (fetchpatch {
+      url = "https://git.savannah.gnu.org/cgit/mailutils.git/patch/?id=afbb33cf9ff";
+      excludes = [ "NEWS" ];
+      sha256 = "0yzkfx3j1zkkb43fhchjqphw4xznbclj39bjzjggv32gppy6d1db";
+    })
+    ./fix-build-mb-len-max.patch
+    ./fix-test-ali-awk.patch
+    ./path-to-cat.patch
+  ];
 
-  postPatch = ''
-    sed -i -e '/chown root:mail/d' \
-           -e 's/chmod [24]755/chmod 0755/' \
-      */Makefile{,.in,.am}
-  '';
+  doCheck = true;
+  enableParallelBuilding = true;
+  hardeningDisable = [ "format" ];
 
   configureFlags = [
+    "--with-gssapi"
     "--with-gsasl"
-    "--with-gssapi=${gss}"
+    "--with-mysql"
   ];
 
-  buildInputs =
-   [ gettext gdbm libtool pam readline ncurses
-     gnutls mysql.lib guile texinfo gnum4 sasl fribidi gss nettools ]
-   ++ stdenv.lib.optional doCheck dejagnu;
+  readmsg-tests = stdenv.lib.optionals doCheck [
+    (fetchurl { url = "${p}/hdr.at"; sha256 = "0phpkqyhs26chn63wjns6ydx9468ng3ssbjbfhcvza8h78jlsd98"; })
+    (fetchurl { url = "${p}/nohdr.at"; sha256 = "1vkbkfkbqj6ml62s1am8i286hxwnpsmbhbnq0i2i0j1i7iwkk4b7"; })
+    (fetchurl { url = "${p}/twomsg.at"; sha256 = "15m29rg2xxa17xhx6jp4s2vwa9d4khw8092vpygqbwlhw68alk9g"; })
+    (fetchurl { url = "${p}/weed.at"; sha256 = "1101xakhc99f5gb9cs3mmydn43ayli7b270pzbvh7f9rbvh0d0nh"; })
+  ];
 
-  doCheck = true;
+  postPatch = ''
+    sed -e '/AM_GNU_GETTEXT_VERSION/s/0.18/0.19/' -i configure.ac
+    sed -i -e '/chown root:mail/d' \
+           -e 's/chmod [24]755/chmod 0755/' \
+      */Makefile{.in,.am}
+  '';
+
+  preCheck = ''
+    # Add missing files.
+    cp ${builtins.toString readmsg-tests} readmsg/tests/
+    for f in hdr.at nohdr.at twomsg.at weed.at; do
+      mv readmsg/tests/*-$f readmsg/tests/$f
+    done
+    # Disable comsat tests that fail without tty in the sandbox.
+    tty -s || echo > comsat/tests/testsuite.at
+    # Disable lmtp tests that require root spool.
+    echo > maidag/tests/lmtp.at
+    # Disable mda tests that require /etc/passwd to contain root.
+    grep -qo '^root:' /etc/passwd || echo > maidag/tests/mda.at
+    # Provide libraries for mhn.
+    export LD_LIBRARY_PATH=$(pwd)/lib/.libs
+  '';
+  postCheck = ''
+    unset LD_LIBRARY_PATH
+  '';
 
   meta = with stdenv.lib; {
     description = "Rich and powerful protocol-independent mail framework";
@@ -60,7 +105,7 @@ stdenv.mkDerivation rec {
       gpl3Plus /* tools */
     ];
 
-    maintainers = with maintainers; [ vrthra ];
+    maintainers = with maintainers; [ orivej vrthra ];
 
     homepage = http://www.gnu.org/software/mailutils/;
 
diff --git a/pkgs/tools/networking/mailutils/fix-build-mb-len-max.patch b/pkgs/tools/networking/mailutils/fix-build-mb-len-max.patch
new file mode 100644
index 000000000000..b28dfc5d99ca
--- /dev/null
+++ b/pkgs/tools/networking/mailutils/fix-build-mb-len-max.patch
@@ -0,0 +1,14 @@
+diff --git a/frm/frm.h b/frm/frm.h
+index 178b87d54..7931faada 100644
+--- a/frm/frm.h
++++ b/frm/frm.h
+@@ -34,6 +34,9 @@
+ #ifdef HAVE_ICONV_H
+ # include <iconv.h>
+ #endif
++#ifdef HAVE_LIMITS_H
++# include <limits.h>
++#endif
+ #ifndef MB_LEN_MAX
+ # define MB_LEN_MAX 4
+ #endif
diff --git a/pkgs/tools/networking/mailutils/fix-test-ali-awk.patch b/pkgs/tools/networking/mailutils/fix-test-ali-awk.patch
new file mode 100644
index 000000000000..3d301d530def
--- /dev/null
+++ b/pkgs/tools/networking/mailutils/fix-test-ali-awk.patch
@@ -0,0 +1,16 @@
+diff --git a/mh/tests/ali.at b/mh/tests/ali.at
+index 28c0e5451..c76cf9363 100644
+--- a/mh/tests/ali.at
++++ b/mh/tests/ali.at
+@@ -85,9 +85,9 @@ ali -a ./mh_aliases korzen | tr -d ' '
+ [expout])
+ 
+ MH_CHECK([ali: group id],[ali05 ali-group-id ali-gid],[
+-cat /etc/passwd | awk -F : '/^#/ { next } $4==0 { print $1 }' > expout
++cat /etc/passwd | awk -F : '/^#/ { next } $4==0 { print $1; exit }' > expout
+ test -s expout || AT_SKIP_TEST
+-name=`awk -F : '/^#/ { next } $3==0 { print $1 }' /etc/group < /dev/null`
++name=`awk -F : '/^#/ { next } $3==0 { print $1; exit }' /etc/group < /dev/null`
+ test -z "$name" && AT_SKIP_TEST
+ 
+ echo "korzen: +$name" > mh_aliases
diff --git a/pkgs/tools/networking/mailutils/no-gets.patch b/pkgs/tools/networking/mailutils/no-gets.patch
deleted file mode 100644
index d72fa3f056cc..000000000000
--- a/pkgs/tools/networking/mailutils/no-gets.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/lib/stdio.in.h
-+++ b/lib/stdio.in.h
-@@ -138,8 +138,10 @@
- /* It is very rare that the developer ever has full control of stdin,
-    so any use of gets warrants an unconditional warning.  Assume it is
-    always declared, since it is required by C89.  */
--#undef gets
-+#ifdef gets
-+# undef gets
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
-+#endif
- 
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@
diff --git a/pkgs/tools/networking/mailutils/path-to-cat.patch b/pkgs/tools/networking/mailutils/path-to-cat.patch
index a9ae7c5366d2..698ee08f340f 100644
--- a/pkgs/tools/networking/mailutils/path-to-cat.patch
+++ b/pkgs/tools/networking/mailutils/path-to-cat.patch
@@ -1,8 +1,47 @@
-Fix absolute path to `cat'.
-
---- mailutils-2.2/testsuite/lib/mailutils.exp	2010-09-10 13:39:58.000000000 +0200
-+++ mailutils-2.2/testsuite/lib/mailutils.exp	2010-09-10 13:40:00.000000000 +0200
-@@ -719,7 +719,7 @@ proc mu_test_file {args} {
+diff --git a/mh/show.c b/mh/show.c
+index a43afe10c..6985386ec 100644
+--- a/mh/show.c
++++ b/mh/show.c
+@@ -254,7 +254,7 @@ main (int argc, char **argv)
+   */
+ 
+   if (!use_showproc)
+-    showproc = "/bin/cat";
++    showproc = "cat";
+   else
+     showproc = mh_global_profile_get ("showproc", NULL);
+ 
+diff --git a/mh/tests/mhparam.at b/mh/tests/mhparam.at
+index 54b7fc06a..3abd5bf9b 100644
+--- a/mh/tests/mhparam.at
++++ b/mh/tests/mhparam.at
+@@ -28,7 +28,7 @@ mhparam -all | tr '\t' ' ' | sed 's/^Path:.*/Path: Mail/;s/^mhetcdir:.*/mhetcdir
+ [0],
+ [Path: Mail
+ mhetcdir: dir
+-moreproc: /bin/cat
++moreproc: cat
+ Sequence-Negation: not
+ Draft-Folder: Mail/drafts
+ Aliasfile: .mh_aliases
+diff --git a/mh/tests/testsuite.at b/mh/tests/testsuite.at
+index c6820843c..6675a4a9c 100644
+--- a/mh/tests/testsuite.at
++++ b/mh/tests/testsuite.at
+@@ -25,7 +25,7 @@ export MH
+ cat > $MH <<EOT
+ Path: $HOME/Mail
+ mhetcdir: $abs_top_srcdir/mh/etc
+-moreproc: /bin/cat
++moreproc: cat
+ EOT
+ MTSTAILOR=$HOME/mtstailor
+ export MTSTAILOR
+diff --git a/testsuite/lib/mailutils.exp b/testsuite/lib/mailutils.exp
+index d4691d922..c1b056933 100644
+--- a/testsuite/lib/mailutils.exp
++++ b/testsuite/lib/mailutils.exp
+@@ -728,7 +728,7 @@ proc mu_test_file {args} {
          set pattern [lrange $args 1 end]
      }
      
diff --git a/pkgs/tools/networking/mailutils/scm_c_string.patch b/pkgs/tools/networking/mailutils/scm_c_string.patch
deleted file mode 100644
index 367dd2d64066..000000000000
--- a/pkgs/tools/networking/mailutils/scm_c_string.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-See https://lists.gnu.org/archive/html/bug-mailutils/2010-10/msg00005.html
-
-diff -u mailutils-2.2/libmu_scm/mu_message.c mailutils-2.2.new/libmu_scm/mu_message.c
---- mailutils-2.2/libmu_scm/mu_message.c	2010-04-18 10:29:07.000000000 -0700
-+++ mailutils-2.2.new/libmu_scm/mu_message.c	2016-07-03 21:18:53.746185547 -0700
-@@ -510,8 +510,8 @@
-     {
-       SCM car = SCM_CAR (lst);
-       if (scm_is_string (car)
- 	  && mu_c_strncasecmp (scm_i_string_chars (car), name,
--			       scm_i_string_length (car)) == 0)
-+			       scm_c_string_length (car)) == 0)
- 	return 1;
-     }
-   return 0;
diff --git a/pkgs/tools/package-management/apt/default.nix b/pkgs/tools/package-management/apt/default.nix
new file mode 100644
index 000000000000..de1c24050761
--- /dev/null
+++ b/pkgs/tools/package-management/apt/default.nix
@@ -0,0 +1,65 @@
+{ stdenv, lib, fetchzip, pkgconfig, cmake, perl, curl, gtest, lzma, bzip2 , lz4
+, db, dpkg, libxslt, docbook_xsl, docbook_xml_dtd_45
+
+# used when WITH_DOC=ON
+, w3m
+, Po4a
+, doxygen
+
+# used when WITH_NLS=ON
+, gettext
+
+# opts
+, withDocs ? true
+, withNLS ? true
+}:
+
+stdenv.mkDerivation rec {
+  name = "apt-${version}";
+
+  version = "1.4.6";
+
+  src = fetchzip {
+    url = "https://launchpad.net/ubuntu/+archive/primary/+files/apt_${version}.tar.xz";
+    sha256 = "0ahwhmscrmnpvl1r732wg93dzkhv8c1sph2yrqgsrhr73c1616ix";
+  };
+
+  buildInputs = [
+    pkgconfig cmake perl curl gtest lzma bzip2 lz4 db dpkg libxslt.bin
+  ] ++ lib.optionals withDocs [
+    doxygen Po4a w3m
+  ] ++ lib.optionals withNLS [
+    gettext
+  ];
+
+  preConfigure = ''
+    export PERL5LIB="$PERL5LIB''${PERL5LIB:+:}${Po4a}/lib/perl5";
+
+    cmakeFlagsArray+=(
+      -DBERKELEY_DB_INCLUDE_DIRS="${db}"/include
+      -DDOCBOOK_XSL="${docbook_xsl}"/share/xml/docbook-xsl
+      -DROOT_GROUP=root
+      -DWITH_DOC=${if withDocs then "ON" else "OFF"}
+      -DUSE_NLS=${if withNLS then "ON" else "OFF"}
+    )
+
+    for f in doc/*; do
+      if [[ -f "$f" ]]; then
+        substituteInPlace "$f" \
+          --replace \
+            "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
+            "${docbook_xml_dtd_45}/xml/dtd/docbook/docbookx.dtd"
+      fi
+    done
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "";
+    homepage = "https://launchpad.net/ubuntu/+source/apt";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ cstrahan ];
+  };
+}
diff --git a/pkgs/tools/package-management/nix-index/default.nix b/pkgs/tools/package-management/nix-index/default.nix
new file mode 100644
index 000000000000..388942f6ad87
--- /dev/null
+++ b/pkgs/tools/package-management/nix-index/default.nix
@@ -0,0 +1,32 @@
+{ lib, rustPlatform, fetchFromGitHub, pkgconfig, openssl, curl }:
+
+with rustPlatform;
+
+buildRustPackage rec {
+  name = "nix-index-${version}";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "bennofs";
+    repo = "nix-index";
+    rev = "v${version}";
+    sha256 = "1lmg65yqkwf2a5qxm3dmv8158kqhnriir062vlgar5wimf409rm5";
+  };
+  depsSha256 = "0v145fi9bfiwvsdy7hz9lw4m2f2j8sxvixfzmjwfnq4klm51c8yl";
+  buildInputs = [pkgconfig openssl curl];
+
+  postInstall = ''
+    mkdir -p $out/etc/profile.d
+    cp ./command-not-found.sh $out/etc/profile.d/command-not-found.sh
+    substituteInPlace $out/etc/profile.d/command-not-found.sh \
+      --replace "@out@" "$out"
+  '';
+
+  meta = with lib; {
+    description = "A files database for nixpkgs";
+    homepage = https://github.com/bennofs/nix-index;
+    license = with licenses; [ bsd3 ];
+    maintainers = [ maintainers.bennofs ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/system/honcho/default.nix b/pkgs/tools/system/honcho/default.nix
index 6946862422ba..d42a6488c7f1 100644
--- a/pkgs/tools/system/honcho/default.nix
+++ b/pkgs/tools/system/honcho/default.nix
@@ -1,26 +1,45 @@
 { stdenv, fetchFromGitHub, pythonPackages }:
 
-let honcho = pythonPackages.buildPythonApplication rec {
-  name = "honcho-${version}";
-  version = "0.6.6";
+let
+  inherit (pythonPackages) python;
+  pname = "honcho";
+
+in
+
+pythonPackages.buildPythonApplication rec {
+  name = "${pname}-${version}";
+  version = "1.0.1";
   namePrefix = "";
 
   src = fetchFromGitHub {
     owner = "nickstenning";
     repo = "honcho";
     rev = "v${version}";
-    sha256 = "0lawwcyrrsd9z9jcr94qn1yabl9bzc529jkpc51jq720fhdlfcr0";
+    sha256 = "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b";
   };
 
-  buildInputs = with pythonPackages; [ nose mock jinja2 ];
+  buildInputs = with pythonPackages; [ jinja2 pytest mock coverage ];
+
+  buildPhase = ''
+    ${python.interpreter} setup.py build
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/lib/${python.libPrefix}/site-packages"
+
+    export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
+
+    ${python}/bin/${python.executable} setup.py install \
+      --install-lib=$out/lib/${python.libPrefix}/site-packages \
+      --prefix="$out"
+  '';
+
   checkPhase = ''
     runHook preCheck
-    nosetests
+    PATH=$out/bin:$PATH coverage run -m pytest
     runHook postCheck
   '';
 
-  doCheck = false;
-
   meta = with stdenv.lib; {
     description = "A Python clone of Foreman, a tool for managing Procfile-based applications";
     license = licenses.mit;
@@ -28,11 +47,4 @@ let honcho = pythonPackages.buildPythonApplication rec {
     maintainers = with maintainers; [ benley ];
     platforms = platforms.unix;
   };
-};
-
-in
-
-# Some of honcho's tests require that honcho be installed in the environment in
-# order to work. This is a trick to build it without running tests, then pass
-# it to itself as a buildInput so the tests work.
-honcho.overrideDerivation (x: { buildInputs = [ honcho ]; doCheck = true; })
+}
diff --git a/pkgs/tools/system/osquery/default.nix b/pkgs/tools/system/osquery/default.nix
new file mode 100644
index 000000000000..7924054b7203
--- /dev/null
+++ b/pkgs/tools/system/osquery/default.nix
@@ -0,0 +1,79 @@
+{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake, pythonPackages
+, udev, audit, aws-sdk-cpp, cryptsetup, lvm2, libgcrypt, libarchive
+, libgpgerror, libuuid, iptables, apt, dpkg, lzma, lz4, bzip2, rpm
+, beecrypt, augeas, libxml2, sleuthkit, yara, lldpd, google-gflags
+, thrift, boost, rocksdb_lite, cpp-netlib, glog, gbenchmark, snappy
+, openssl, linenoise-ng, file, doxygen, devicemapper
+, gtest, sqlite
+}:
+
+let
+  thirdparty = fetchFromGitHub {
+    owner = "osquery";
+    repo = "third-party";
+    rev = "6919841175b2c9cb2dee8986e0cfe49191ecb868";
+    sha256 = "1kjxrky586jd1b2z1vs9cm7x1dxw51cizpys9kddiarapc2ih65j";
+  };
+
+in
+
+stdenv.mkDerivation rec {
+  name = "osquery-${version}";
+  version = "2.5.2";
+
+  # this is what `osquery --help` will show as the version.
+  OSQUERY_BUILD_VERSION = version;
+
+  src = fetchFromGitHub {
+    owner = "facebook";
+    repo = "osquery";
+    rev = version;
+    sha256 = "16isplk66qpvhrf041l0lxb4z6k7wwd1sg7kpsw2q6kivkxpnk3z";
+  };
+
+  patches = [ ./misc.patch ] ++ lib.optional stdenv.isLinux ./platform-nixos.patch;
+
+  nativeBuildInputs = [
+    pkgconfig cmake pythonPackages.python pythonPackages.jinja2
+  ];
+
+  buildInputs = [
+    udev audit
+
+    (aws-sdk-cpp.override {
+      apis = [ "firehose" "kinesis" "sts" ];
+      customMemoryManagement = false;
+    })
+
+    lvm2 libgcrypt libarchive libgpgerror libuuid iptables.dev apt dpkg
+    lzma lz4 bzip2 rpm beecrypt augeas libxml2 sleuthkit
+    yara lldpd google-gflags thrift boost
+    cpp-netlib glog gbenchmark snappy openssl linenoise-ng
+    file doxygen devicemapper cryptsetup
+    gtest sqlite
+
+    # need to be consistent about the malloc implementation
+    (rocksdb_lite.override { jemalloc = null; gperftools = null; })
+  ];
+
+  preConfigure = ''
+    export NIX_CFLAGS_COMPILE="-I${libxml2.dev}/include/libxml2 $NIX_CFLAGS_COMPILE"
+
+    cmakeFlagsArray+=(
+      -DCMAKE_LIBRARY_PATH=${cryptsetup}/lib
+      -DCMAKE_VERBOSE_MAKEFILE=OFF
+    )
+
+    cp -r ${thirdparty}/* third-party
+    chmod +w -R third-party
+    rm -r third-party/{googletest,sqlite3}
+  '';
+
+  meta = with lib; {
+    description = "SQL powered operating system instrumentation, monitoring, and analytics";
+    homepage = "https://osquery.io/";
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ cstrahan ];
+  };
+}
diff --git a/pkgs/tools/system/osquery/misc.patch b/pkgs/tools/system/osquery/misc.patch
new file mode 100644
index 000000000000..1a0ef267f0df
--- /dev/null
+++ b/pkgs/tools/system/osquery/misc.patch
@@ -0,0 +1,187 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a976a46d..408ac308 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -125,14 +125,13 @@ else()
+     set(CXX_COMPILE_FLAGS "${CXX_COMPILE_FLAGS} -std=c++14 -stdlib=libc++")
+   else()
+     set(LINUX TRUE)
+-    set(CXX_COMPILE_FLAGS "${CXX_COMPILE_FLAGS} -std=c++14 -stdlib=libstdc++")
++    set(CXX_COMPILE_FLAGS "${CXX_COMPILE_FLAGS} -std=c++14")
+   endif()
+   set(POSIX TRUE)
+ endif()
+ 
+ if(POSIX)
+   add_compile_options(
+-    -Qunused-arguments
+     -Wstrict-aliasing
+     -Wno-missing-field-initializers
+     -Wno-unused-local-typedef
+@@ -154,7 +153,6 @@ if(POSIX)
+   )
+   if(NOT FREEBSD)
+     add_compile_options(
+-      -Werror=shadow
+       -fvisibility=hidden
+       -fvisibility-inlines-hidden
+     )
+@@ -372,12 +370,6 @@ elseif(NOT FREEBSD)
+   endif()
+ endif()
+ 
+-if(NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/third-party/sqlite3")
+-  WARNING_LOG("Cannot find git submodule third-party/sqlite3 directory")
+-  WARNING_LOG("Please run: make deps or git submodule update --init")
+-  message(FATAL_ERROR "No sqlite3 directory")
+-endif()
+-
+ # Make sure deps were built before compiling (else show warning).
+ execute_process(
+   COMMAND "${CMAKE_SOURCE_DIR}/tools/provision.sh" check "${CMAKE_BINARY_DIR}"
+@@ -439,6 +431,8 @@ endif()
+ 
+ if(APPLE)
+   LOG_PLATFORM("OS X")
++elseif(OSQUERY_BUILD_PLATFORM STREQUAL "nixos")
++  LOG_PLATFORM("NixOS")
+ elseif(OSQUERY_BUILD_PLATFORM STREQUAL "debian")
+   LOG_PLATFORM("Debian")
+ elseif(OSQUERY_BUILD_PLATFORM STREQUAL "ubuntu")
+@@ -477,7 +471,6 @@ if(POSIX)
+   include_directories("${BUILD_DEPS}/include/openssl")
+ endif()
+ 
+-include_directories("${CMAKE_SOURCE_DIR}/third-party/sqlite3")
+ include_directories("${CMAKE_SOURCE_DIR}/include")
+ include_directories("${CMAKE_SOURCE_DIR}")
+ 
+@@ -559,21 +552,10 @@ else()
+   set(GTEST_FLAGS "-DGTEST_USE_OWN_TR1_TUPLE=0")
+ endif()
+ 
+-set(GTEST_FLAGS
+-  ${GTEST_FLAGS}
+-  "-I${CMAKE_SOURCE_DIR}/third-party/googletest/googletest/include"
+-  "-I${CMAKE_SOURCE_DIR}/third-party/googletest/googlemock/include"
+-)
+-join("${GTEST_FLAGS}" " " GTEST_FLAGS)
+-
+ set(BUILD_GTEST TRUE)
+ 
+-add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/googletest")
+-
+ include(Thrift)
+ 
+-add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/sqlite3")
+-
+ add_subdirectory(osquery)
+ add_subdirectory(tools/tests)
+ 
+diff --git a/include/osquery/core.h b/include/osquery/core.h
+index b597edee..b0628037 100644
+--- a/include/osquery/core.h
++++ b/include/osquery/core.h
+@@ -15,8 +15,9 @@
+ #include <string>
+ #include <vector>
+ 
+-#if defined(__APPLE__) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__linux__)
+ #include <boost/thread/shared_mutex.hpp>
++#include <boost/thread/recursive_mutex.hpp>
+ #else
+ #include <shared_mutex>
+ #endif
+@@ -188,7 +189,7 @@ inline bool isPlatform(PlatformType a, const PlatformType& t = kPlatformType) {
+   return (static_cast<int>(t) & static_cast<int>(a)) != 0;
+ }
+ 
+-#if defined(__APPLE__) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__linux__)
+ #define MUTEX_IMPL boost
+ #else
+ #define MUTEX_IMPL std
+@@ -204,10 +205,10 @@ using WriteLock = MUTEX_IMPL::unique_lock<Mutex>;
+ using ReadLock = MUTEX_IMPL::shared_lock<Mutex>;
+ 
+ /// Helper alias for defining recursive mutexes.
+-using RecursiveMutex = std::recursive_mutex;
++using RecursiveMutex = MUTEX_IMPL::recursive_mutex;
+ 
+ /// Helper alias for write locking a recursive mutex.
+-using RecursiveLock = std::lock_guard<std::recursive_mutex>;
++using RecursiveLock = MUTEX_IMPL::lock_guard<MUTEX_IMPL::recursive_mutex>;
+ }
+ 
+ /**
+diff --git a/osquery/CMakeLists.txt b/osquery/CMakeLists.txt
+index 77913d31..671b20d4 100644
+--- a/osquery/CMakeLists.txt
++++ b/osquery/CMakeLists.txt
+@@ -57,7 +57,7 @@ endif()
+ 
+ # Construct a set of all object files, starting with third-party and all
+ # of the osquery core objects (sources from ADD_CORE_LIBRARY macros).
+-set(OSQUERY_OBJECTS $<TARGET_OBJECTS:osquery_sqlite>)
++set(OSQUERY_OBJECTS "")
+ 
+ # Add subdirectories
+ add_subdirectory(config)
+@@ -138,6 +138,8 @@ elseif(FREEBSD)
+   ADD_OSQUERY_LINK_ADDITIONAL("rocksdb-lite")
+ endif()
+ 
++ADD_OSQUERY_LINK_CORE("sqlite3")
++
+ if(POSIX)
+   ADD_OSQUERY_LINK_CORE("boost_system")
+   ADD_OSQUERY_LINK_CORE("boost_filesystem")
+@@ -157,6 +159,7 @@ ADD_OSQUERY_LINK_ADDITIONAL("cppnetlib-client-connections${WO_KEY}")
+ ADD_OSQUERY_LINK_CORE("glog${WO_KEY}")
+ 
+ if(POSIX)
++  ADD_OSQUERY_LINK_ADDITIONAL("benchmark")
+   ADD_OSQUERY_LINK_ADDITIONAL("snappy")
+   ADD_OSQUERY_LINK_ADDITIONAL("ssl")
+   ADD_OSQUERY_LINK_ADDITIONAL("crypto")
+@@ -336,13 +339,6 @@ if(NOT OSQUERY_BUILD_SDK_ONLY)
+ 
+   install(DIRECTORY "${CMAKE_SOURCE_DIR}/packs/"
+     DESTINATION "${CMAKE_INSTALL_PREFIX}/share/osquery/packs" COMPONENT main)
+-  if(APPLE)
+-    install(FILES "${CMAKE_SOURCE_DIR}/tools/deployment/com.facebook.osqueryd.plist"
+-      DESTINATION "${CMAKE_INSTALL_PREFIX}/share/osquery/" COMPONENT main)
+-  else()
+-    install(PROGRAMS "${CMAKE_SOURCE_DIR}/tools/deployment/osqueryd.initd"
+-      DESTINATION "/etc/init.d/" RENAME "osqueryd" COMPONENT main)
+-  endif()
+ endif()
+ 
+ if(NOT SKIP_TESTS)
+diff --git a/osquery/tables/system/linux/tests/md_tables_tests.cpp b/osquery/tables/system/linux/tests/md_tables_tests.cpp
+index 126be362..119d361d 100644
+--- a/osquery/tables/system/linux/tests/md_tables_tests.cpp
++++ b/osquery/tables/system/linux/tests/md_tables_tests.cpp
+@@ -72,7 +72,7 @@ void GetDrivesForArrayTestHarness(std::string arrayName,
+   EXPECT_CALL(md, getArrayInfo(arrayDevPath, _))
+       .WillOnce(DoAll(SetArgReferee<1>(arrayInfo), Return(true)));
+ 
+-  Sequence::Sequence s1;
++  Sequence s1;
+   for (int i = 0; i < MD_SB_DISKS; i++) {
+     mdu_disk_info_t diskInfo;
+     diskInfo.number = i;
+diff --git a/specs/windows/services.table b/specs/windows/services.table
+index 4ac24ee9..657d8b99 100644
+--- a/specs/windows/services.table
++++ b/specs/windows/services.table
+@@ -12,7 +12,7 @@ schema([
+     Column("path", TEXT, "Path to Service Executable"),
+     Column("module_path", TEXT, "Path to ServiceDll"),
+     Column("description", TEXT, "Service Description"),
+-    Column("user_account", TEXT, "The name of the account that the service process will be logged on as when it runs. This name can be of the form Domain\UserName. If the account belongs to the built-in domain, the name can be of the form .\UserName."),
++    Column("user_account", TEXT, "The name of the account that the service process will be logged on as when it runs. This name can be of the form Domain\\UserName. If the account belongs to the built-in domain, the name can be of the form .\\UserName."),
+ ])
+ implementation("system/windows/services@genServices")
+ examples([
diff --git a/pkgs/tools/system/osquery/platform-nixos.patch b/pkgs/tools/system/osquery/platform-nixos.patch
new file mode 100644
index 000000000000..7e1afcb640b3
--- /dev/null
+++ b/pkgs/tools/system/osquery/platform-nixos.patch
@@ -0,0 +1,22 @@
+diff --git a/tools/get_platform.py b/tools/get_platform.py
+index 3dd34516..f53ca83a 100644
+--- a/tools/get_platform.py
++++ b/tools/get_platform.py
+@@ -26,6 +26,8 @@ DEBIAN_VERSION = "/etc/debian_version"
+ GENTOO_RELEASE = "/etc/gentoo-release"
+ 
+ def _platform():
++    return ("nixos", "nixos")
++
+     osType, _, _, _, _, _ = platform.uname()
+ 
+     if osType == "Windows":
+@@ -75,6 +77,8 @@ def _platform():
+         return (None, osType.lower())
+ 
+ def _distro(osType):
++    return "unknown_version"
++
+     def getRedhatDistroVersion(pattern):
+         with open(SYSTEM_RELEASE, "r") as fd:
+             contents = fd.read()
diff --git a/pkgs/tools/text/html-tidy/default.nix b/pkgs/tools/text/html-tidy/default.nix
index cc3283cf8541..571dd41244b2 100644
--- a/pkgs/tools/text/html-tidy/default.nix
+++ b/pkgs/tools/text/html-tidy/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   name = "html-tidy-${version}";
-  version = "5.2.0";
+  version = "5.4.0";
 
   src = fetchFromGitHub {
     owner = "htacg";
     repo = "tidy-html5";
     rev = version;
-    sha256 = "1yxp3kjsxd5zwwn4r5rpyq5ndyylbcnb9pisdyf7dxjqd47z64bc";
+    sha256 = "1q9ag2dh2j636fw9vyz6gg0kiss8p6lvj22h25nqsw0daan57c32";
   };
 
   nativeBuildInputs = [ cmake libxslt/*manpage*/ ];
@@ -33,4 +33,3 @@ stdenv.mkDerivation rec {
     maintainers = with maintainers; [ edwtjo ];
   };
 }
-