summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/X11/xdg-utils/default.nix2
-rw-r--r--pkgs/tools/admin/awscli/default.nix4
-rw-r--r--pkgs/tools/admin/docker-credential-gcr/default.nix28
-rw-r--r--pkgs/tools/admin/fastlane/Gemfile.lock22
-rw-r--r--pkgs/tools/admin/fastlane/gemset.nix38
-rw-r--r--pkgs/tools/admin/lego/default.nix24
-rw-r--r--pkgs/tools/admin/lego/deps.nix219
-rw-r--r--pkgs/tools/archivers/unarj/default.nix2
-rw-r--r--pkgs/tools/archivers/zip/default.nix2
-rw-r--r--pkgs/tools/audio/abcm2ps/default.nix4
-rw-r--r--pkgs/tools/audio/abcmidi/default.nix4
-rw-r--r--pkgs/tools/audio/beets/default.nix2
-rw-r--r--pkgs/tools/backup/attic/default.nix56
-rw-r--r--pkgs/tools/backup/backup/default.nix5
-rw-r--r--pkgs/tools/backup/borg/default.nix2
-rw-r--r--pkgs/tools/backup/burp/default.nix8
-rw-r--r--pkgs/tools/backup/ddar/default.nix39
-rw-r--r--pkgs/tools/backup/diskrsync/default.nix27
-rw-r--r--pkgs/tools/backup/diskrsync/deps.nix21
-rw-r--r--pkgs/tools/backup/restic/default.nix14
-rw-r--r--pkgs/tools/cd-dvd/cue2pops/default.nix30
-rw-r--r--pkgs/tools/cd-dvd/ecm-tools/default.nix29
-rw-r--r--pkgs/tools/compression/xz/default.nix2
-rw-r--r--pkgs/tools/filesystems/archivemount/default.nix4
-rw-r--r--pkgs/tools/filesystems/bcachefs-tools/default.nix16
-rw-r--r--pkgs/tools/filesystems/ceph/0001-kv-RocksDBStore-API-break-additional.patch58
-rw-r--r--pkgs/tools/filesystems/ceph/default.nix12
-rw-r--r--pkgs/tools/filesystems/ceph/generic.nix236
-rw-r--r--pkgs/tools/filesystems/cryfs/default.nix4
-rw-r--r--pkgs/tools/filesystems/exfat/default.nix4
-rw-r--r--pkgs/tools/filesystems/file-rename/default.nix24
-rw-r--r--pkgs/tools/filesystems/idsk/default.nix30
-rw-r--r--pkgs/tools/filesystems/mergerfs/default.nix4
-rw-r--r--pkgs/tools/filesystems/nixpart/0.4/pyblock.nix2
-rw-r--r--pkgs/tools/filesystems/nixpart/0.4/pykickstart.nix2
-rw-r--r--pkgs/tools/filesystems/snapraid/default.nix6
-rw-r--r--pkgs/tools/graphics/graph-easy/default.nix18
-rw-r--r--pkgs/tools/graphics/graphviz/base.nix5
-rw-r--r--pkgs/tools/graphics/oxipng/default.nix22
-rw-r--r--pkgs/tools/graphics/pngquant/default.nix4
-rw-r--r--pkgs/tools/graphics/vips/default.nix10
-rw-r--r--pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix12
-rw-r--r--pkgs/tools/inputmethods/interception-tools/default.nix6
-rw-r--r--pkgs/tools/misc/autojump/default.nix3
-rw-r--r--pkgs/tools/misc/autorandr/default.nix21
-rw-r--r--pkgs/tools/misc/bcunit/default.nix4
-rw-r--r--pkgs/tools/misc/cloc/default.nix14
-rw-r--r--pkgs/tools/misc/ddccontrol/default.nix21
-rw-r--r--pkgs/tools/misc/edid-decode/default.nix26
-rw-r--r--pkgs/tools/misc/fd/default.nix9
-rw-r--r--pkgs/tools/misc/figlet/default.nix17
-rw-r--r--pkgs/tools/misc/findutils/default.nix1
-rw-r--r--pkgs/tools/misc/geteltorito/default.nix2
-rw-r--r--pkgs/tools/misc/hyperfine/default.nix25
-rw-r--r--pkgs/tools/misc/ipxe/default.nix8
-rw-r--r--pkgs/tools/misc/less/default.nix4
-rw-r--r--pkgs/tools/misc/man-db/default.nix20
-rw-r--r--pkgs/tools/misc/massren/default.nix22
-rw-r--r--pkgs/tools/misc/ministat/default.nix31
-rw-r--r--pkgs/tools/misc/mktorrent/default.nix2
-rw-r--r--pkgs/tools/misc/mongodb-tools/default.nix11
-rw-r--r--pkgs/tools/misc/mongodb-tools/deps.nix182
-rw-r--r--pkgs/tools/misc/mprime/default.nix21
-rw-r--r--pkgs/tools/misc/mprime/makefile.patch47
-rw-r--r--pkgs/tools/misc/otfcc/default.nix4
-rw-r--r--pkgs/tools/misc/papis/default.nix44
-rw-r--r--pkgs/tools/misc/plotinus/default.nix44
-rw-r--r--pkgs/tools/misc/rename/default.nix18
-rw-r--r--pkgs/tools/misc/roundup/default.nix38
-rw-r--r--pkgs/tools/misc/screen/default.nix7
-rw-r--r--pkgs/tools/misc/screenfetch/default.nix65
-rw-r--r--pkgs/tools/misc/smenu/default.nix4
-rw-r--r--pkgs/tools/misc/ultrastar-creator/default.nix2
-rw-r--r--pkgs/tools/misc/ultrastar-manager/default.nix2
-rw-r--r--pkgs/tools/misc/uudeview/default.nix24
-rw-r--r--pkgs/tools/misc/vdirsyncer/default.nix4
-rw-r--r--pkgs/tools/misc/watchexec/default.nix25
-rw-r--r--pkgs/tools/misc/yle-dl/default.nix4
-rw-r--r--pkgs/tools/misc/youtube-dl/default.nix4
-rw-r--r--pkgs/tools/misc/zsh-autoenv/default.nix40
-rw-r--r--pkgs/tools/networking/acme-client/default.nix38
-rw-r--r--pkgs/tools/networking/arping/default.nix25
-rw-r--r--pkgs/tools/networking/biosdevname/default.nix4
-rw-r--r--pkgs/tools/networking/cjdns/default.nix4
-rw-r--r--pkgs/tools/networking/connman-ncurses/default.nix32
-rw-r--r--pkgs/tools/networking/curl/default.nix2
-rw-r--r--pkgs/tools/networking/dhcp/default.nix2
-rw-r--r--pkgs/tools/networking/http-prompt/default.nix4
-rw-r--r--pkgs/tools/networking/inetutils/default.nix10
-rw-r--r--pkgs/tools/networking/iperf/3.nix14
-rw-r--r--pkgs/tools/networking/keepalived/default.nix4
-rw-r--r--pkgs/tools/networking/minio-client/default.nix45
-rw-r--r--pkgs/tools/networking/ntopng/default.nix2
-rw-r--r--pkgs/tools/networking/openntpd/default.nix5
-rw-r--r--pkgs/tools/networking/ppp/default.nix1
-rw-r--r--pkgs/tools/networking/ppp/musl-fix-headers.patch137
-rw-r--r--pkgs/tools/networking/siege/default.nix4
-rw-r--r--pkgs/tools/networking/stunnel/default.nix6
-rw-r--r--pkgs/tools/networking/tinc/default.nix4
-rw-r--r--pkgs/tools/networking/tlspool/default.nix2
-rw-r--r--pkgs/tools/networking/unbound/default.nix2
-rw-r--r--pkgs/tools/package-management/conda/default.nix71
-rw-r--r--pkgs/tools/package-management/nix/default.nix67
-rw-r--r--pkgs/tools/package-management/nixops/deps.nix20
-rw-r--r--pkgs/tools/package-management/nixops/nixops-dns.nix26
-rw-r--r--pkgs/tools/package-management/packagekit/default.nix4
-rw-r--r--pkgs/tools/package-management/packagekit/qt.nix24
-rw-r--r--pkgs/tools/package-management/rpm/default.nix5
-rw-r--r--pkgs/tools/security/afl/default.nix7
-rw-r--r--pkgs/tools/security/eschalot/default.nix28
-rw-r--r--pkgs/tools/security/hash_extender/default.nix27
-rw-r--r--pkgs/tools/security/kbfs/default.nix6
-rw-r--r--pkgs/tools/security/keybase-gui/default.nix10
-rw-r--r--pkgs/tools/security/keybase/default.nix4
-rw-r--r--pkgs/tools/security/nmap/qt.nix53
-rw-r--r--pkgs/tools/security/rhash/darwin.patch38
-rw-r--r--pkgs/tools/security/rhash/default.nix33
-rw-r--r--pkgs/tools/security/secp256k1/default.nix7
-rw-r--r--pkgs/tools/security/sops/default.nix4
-rw-r--r--pkgs/tools/security/spectre-meltdown-checker/default.nix4
-rw-r--r--pkgs/tools/security/sudo/default.nix1
-rw-r--r--pkgs/tools/security/theharvester/default.nix41
-rw-r--r--pkgs/tools/system/acpica-tools/default.nix36
-rw-r--r--pkgs/tools/system/augeas/default.nix4
-rw-r--r--pkgs/tools/system/bfs/default.nix38
-rw-r--r--pkgs/tools/system/bfs/tests.patch10
-rw-r--r--pkgs/tools/system/ddrescue/default.nix4
-rw-r--r--pkgs/tools/system/efivar/default.nix14
-rw-r--r--pkgs/tools/system/fio/default.nix4
-rw-r--r--pkgs/tools/system/hardlink/default.nix4
-rw-r--r--pkgs/tools/system/htop/default.nix11
-rw-r--r--pkgs/tools/system/pciutils/default.nix2
-rw-r--r--pkgs/tools/system/smartmontools/default.nix11
-rw-r--r--pkgs/tools/system/supervise/default.nix4
-rw-r--r--pkgs/tools/text/agrep/default.nix4
-rw-r--r--pkgs/tools/text/catdocx/default.nix30
-rw-r--r--pkgs/tools/text/fanficfare/default.nix4
-rw-r--r--pkgs/tools/text/gnupatch/default.nix6
-rw-r--r--pkgs/tools/text/groff/default.nix6
-rw-r--r--pkgs/tools/text/groff/look-for-ar.patch39
-rw-r--r--pkgs/tools/text/replace/default.nix2
-rw-r--r--pkgs/tools/text/ripgrep/default.nix21
-rw-r--r--pkgs/tools/text/shocco/default.nix28
-rw-r--r--pkgs/tools/typesetting/asciidoctor/default.nix16
-rw-r--r--pkgs/tools/video/flvtool2/default.nix5
-rw-r--r--pkgs/tools/virtualization/awsebcli/default.nix14
-rw-r--r--pkgs/tools/virtualization/govc/default.nix24
147 files changed, 2177 insertions, 874 deletions
diff --git a/pkgs/tools/X11/xdg-utils/default.nix b/pkgs/tools/X11/xdg-utils/default.nix
index f71bcdef9f4f..52ecdc267340 100644
--- a/pkgs/tools/X11/xdg-utils/default.nix
+++ b/pkgs/tools/X11/xdg-utils/default.nix
@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with stdenv.lib; {
-    homepage = https://portland.freedesktop.org/wiki/;
+    homepage = https://www.freedesktop.org/wiki/Software/xdg-utils/;
     description = "A set of command line tools that assist applications with a variety of desktop integration tasks";
     license = if mimiSupport then licenses.gpl2 else licenses.free;
     maintainers = [ maintainers.eelco ];
diff --git a/pkgs/tools/admin/awscli/default.nix b/pkgs/tools/admin/awscli/default.nix
index bad9ccae799d..4c6a91ec321b 100644
--- a/pkgs/tools/admin/awscli/default.nix
+++ b/pkgs/tools/admin/awscli/default.nix
@@ -26,12 +26,12 @@ let
 
 in buildPythonPackage rec {
   pname = "awscli";
-  version = "1.14.29";
+  version = "1.14.41";
   namePrefix = "";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "96edb1dd72fbc13638967fe07c436e95133169759cc962b973bb79ba959bc652";
+    sha256 = "8cf2a52d56f26e22e2fbd7b72649ef1d3de8930df7a730d7f27418d129bb3a6a";
   };
 
   # No tests included
diff --git a/pkgs/tools/admin/docker-credential-gcr/default.nix b/pkgs/tools/admin/docker-credential-gcr/default.nix
new file mode 100644
index 000000000000..52b68a7477cc
--- /dev/null
+++ b/pkgs/tools/admin/docker-credential-gcr/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "docker-credential-gcr-${version}";
+  version = "1.4.3";
+
+  goPackagePath = "github.com/GoogleCloudPlatform/docker-credential-gcr";
+
+  src = fetchFromGitHub {
+    owner = "GoogleCloudPlatform";
+    repo = "docker-credential-gcr";
+    rev = "v${version}";
+    sha256 = "1xb88xjyyrdmjcgfv7fqdkv1ip3dpzsdif5vm7vkqvn83s5wj5df";
+  };
+
+  meta = with stdenv.lib; {
+    description = "A Docker credential helper for GCR (https://gcr.io) users";
+    longDescription = ''
+      docker-credential-gcr is Google Container Registry's Docker credential
+      helper. It allows for Docker clients v1.11+ to easily make
+      authenticated requests to GCR's repositories (gcr.io, eu.gcr.io, etc.).
+    '';
+    homepage = https://github.com/GoogleCloudPlatform/docker-credential-gcr;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ suvash ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/tools/admin/fastlane/Gemfile.lock b/pkgs/tools/admin/fastlane/Gemfile.lock
index 5dddccfe78ac..a578bb4bca27 100644
--- a/pkgs/tools/admin/fastlane/Gemfile.lock
+++ b/pkgs/tools/admin/fastlane/Gemfile.lock
@@ -4,6 +4,7 @@ GEM
     CFPropertyList (2.3.6)
     addressable (2.5.2)
       public_suffix (>= 2.0.2, < 4.0)
+    atomos (0.1.2)
     babosa (1.0.2)
     claide (1.0.2)
     colored (1.2)
@@ -16,7 +17,7 @@ GEM
       unf (>= 0.0.5, < 1.0.0)
     dotenv (2.2.1)
     excon (0.60.0)
-    faraday (0.13.1)
+    faraday (0.14.0)
       multipart-post (>= 1.2, < 3)
     faraday-cookie_jar (0.0.6)
       faraday (>= 0.7.4)
@@ -24,8 +25,8 @@ GEM
     faraday_middleware (0.12.2)
       faraday (>= 0.7.4, < 1.0)
     fastimage (2.1.1)
-    fastlane (2.75.1)
-      CFPropertyList (>= 2.3, < 3.0.0)
+    fastlane (2.80.0)
+      CFPropertyList (>= 2.3, < 4.0.0)
       addressable (>= 2.3, < 3.0.0)
       babosa (>= 1.0.2, < 2.0.0)
       bundler (>= 1.12.0, < 2.0.0)
@@ -49,16 +50,16 @@ GEM
       public_suffix (~> 2.0.0)
       rubyzip (>= 1.1.0, < 2.0.0)
       security (= 0.1.3)
-      slack-notifier (>= 1.3, < 2.0.0)
+      slack-notifier (>= 2.0.0, < 3.0.0)
       terminal-notifier (>= 1.6.2, < 2.0.0)
       terminal-table (>= 1.4.5, < 2.0.0)
       tty-screen (>= 0.6.3, < 1.0.0)
-      tty-spinner (>= 0.7.0, < 1.0.0)
+      tty-spinner (>= 0.8.0, < 1.0.0)
       word_wrap (~> 1.0.0)
       xcodeproj (>= 1.5.2, < 2.0.0)
       xcpretty (>= 0.2.4, < 1.0.0)
       xcpretty-travis-formatter (>= 0.0.3)
-    gh_inspector (1.0.3)
+    gh_inspector (1.1.1)
     google-api-client (0.13.6)
       addressable (~> 2.5, >= 2.5.1)
       googleauth (~> 0.5)
@@ -89,7 +90,7 @@ GEM
       mime-types-data (~> 3.2015)
     mime-types-data (3.2016.0521)
     mini_magick (4.5.1)
-    multi_json (1.13.0)
+    multi_json (1.13.1)
     multi_xml (0.6.0)
     multipart-post (2.0.0)
     nanaimo (0.2.3)
@@ -109,13 +110,13 @@ GEM
       faraday (~> 0.9)
       jwt (>= 1.5, < 3.0)
       multi_json (~> 1.10)
-    slack-notifier (1.5.1)
+    slack-notifier (2.3.2)
     terminal-notifier (1.8.0)
     terminal-table (1.8.0)
       unicode-display_width (~> 1.1, >= 1.1.1)
     tty-cursor (0.5.0)
     tty-screen (0.6.4)
-    tty-spinner (0.7.0)
+    tty-spinner (0.8.0)
       tty-cursor (>= 0.5.0)
     uber (0.1.0)
     unf (0.1.4)
@@ -123,8 +124,9 @@ GEM
     unf_ext (0.0.7.4)
     unicode-display_width (1.3.0)
     word_wrap (1.0.0)
-    xcodeproj (1.5.4)
+    xcodeproj (1.5.6)
       CFPropertyList (~> 2.3.3)
+      atomos (~> 0.1.2)
       claide (>= 1.0.2, < 2.0)
       colored2 (~> 3.1)
       nanaimo (~> 0.2.3)
diff --git a/pkgs/tools/admin/fastlane/gemset.nix b/pkgs/tools/admin/fastlane/gemset.nix
index a309de07a11e..c9ddb7b77c04 100644
--- a/pkgs/tools/admin/fastlane/gemset.nix
+++ b/pkgs/tools/admin/fastlane/gemset.nix
@@ -8,6 +8,14 @@
     };
     version = "2.5.2";
   };
+  atomos = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "10z69hjv30r2w5q5wmlf0cq4jv3w744jrac8ylln8sf45ckqj7wk";
+      type = "gem";
+    };
+    version = "0.1.2";
+  };
   babosa = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -102,10 +110,10 @@
     dependencies = ["multipart-post"];
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1gyqsj7vlqynwvivf9485zwmcj04v1z7gq362z0b8zw2zf4ag0hw";
+      sha256 = "1c3x3s8vb5nf7inyfvhdxwa4q3swmnacpxby6pish5fgmhws7zrr";
       type = "gem";
     };
-    version = "0.13.1";
+    version = "0.14.0";
   };
   faraday-cookie_jar = {
     dependencies = ["faraday" "http-cookie"];
@@ -137,18 +145,18 @@
     dependencies = ["CFPropertyList" "addressable" "babosa" "colored" "commander-fastlane" "dotenv" "excon" "faraday" "faraday-cookie_jar" "faraday_middleware" "fastimage" "gh_inspector" "google-api-client" "highline" "json" "mini_magick" "multi_json" "multi_xml" "multipart-post" "plist" "public_suffix" "rubyzip" "security" "slack-notifier" "terminal-notifier" "terminal-table" "tty-screen" "tty-spinner" "word_wrap" "xcodeproj" "xcpretty" "xcpretty-travis-formatter"];
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0v5i9wnbmsmvz3xhbkvs1w5qj9b0ib5431i3zlimfasf8h138l9y";
+      sha256 = "0saas50qdfipkms66snyg7imvzn1vfngd87dfygj9x8v18bqwvis";
       type = "gem";
     };
-    version = "2.75.1";
+    version = "2.80.0";
   };
   gh_inspector = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1lxvp8xpjd2cazzcp90phy567spp4v41bnk9awgx8absndv70k1x";
+      sha256 = "0mpfl279k8yff2ia601b37zw31blwh2plkr501iz6qj8drx3mq3c";
       type = "gem";
     };
-    version = "1.0.3";
+    version = "1.1.1";
   };
   google-api-client = {
     dependencies = ["addressable" "googleauth" "httpclient" "mime-types" "representable" "retriable"];
@@ -262,10 +270,10 @@
   multi_json = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "05rrhxl08qvd37g5q13v6k8qqbr1ixn6g53ld6rxrvj4lxrjvxns";
+      sha256 = "1rl0qy4inf1mp8mybfk56dfga0mvx97zwpmq5xmiwl5r770171nv";
       type = "gem";
     };
-    version = "1.13.0";
+    version = "1.13.1";
   };
   multi_xml = {
     source = {
@@ -368,10 +376,10 @@
   slack-notifier = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0xavibxh00gy62mm79l6id9l2fldjmdqifk8alqfqy5z38ffwah6";
+      sha256 = "1pkfn99dhy5s526r6k8d87fwwb6j287ga9s7lxqmh60z28xqh3bv";
       type = "gem";
     };
-    version = "1.5.1";
+    version = "2.3.2";
   };
   terminal-notifier = {
     source = {
@@ -410,10 +418,10 @@
     dependencies = ["tty-cursor"];
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0sblbhnscgchnxpbsxa5xmnxnpw13nd4lgsykazm9mhsxmjmhggw";
+      sha256 = "1xv5bycgmiyx00bq0kx2bdixi3h1ffi86mwj858gqbxlpjbzsi94";
       type = "gem";
     };
-    version = "0.7.0";
+    version = "0.8.0";
   };
   uber = {
     source = {
@@ -457,13 +465,13 @@
     version = "1.0.0";
   };
   xcodeproj = {
-    dependencies = ["CFPropertyList" "claide" "colored2" "nanaimo"];
+    dependencies = ["CFPropertyList" "atomos" "claide" "colored2" "nanaimo"];
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "04kv04y5yz2zniwwywh5ik29gpnjpsp23yr6w07qn3m243icvi76";
+      sha256 = "0zqx24qhax7p91rs1114da0v86cy9m7an1bjwxq6dyccp8g6kb50";
       type = "gem";
     };
-    version = "1.5.4";
+    version = "1.5.6";
   };
   xcpretty = {
     dependencies = ["rouge"];
diff --git a/pkgs/tools/admin/lego/default.nix b/pkgs/tools/admin/lego/default.nix
new file mode 100644
index 000000000000..fe165b1e66e3
--- /dev/null
+++ b/pkgs/tools/admin/lego/default.nix
@@ -0,0 +1,24 @@
+{ lib, fetchFromGitHub, buildGoPackage }:
+
+buildGoPackage rec {
+  name = "lego-unstable-${version}";
+  version = "2018-02-02";
+  rev = "06a8e7c475c03ef8d4773284ac63357d2810601b";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "xenolf";
+    repo = "lego";
+    sha256 = "11a9gcgi3317z4lb1apkf6dnbjhf7xni0670nric3fbf5diqfwh2";
+  };
+
+  goPackagePath = "github.com/xenolf/lego";
+  goDeps = ./deps.nix;
+
+  meta = with lib; {
+    description = "Let's Encrypt client and ACME library written in Go";
+    license = licenses.mit;
+    homepage = https://github.com/xenolf/lego;
+    maintainers = with maintainers; [ andrew-d ];
+  };
+}
diff --git a/pkgs/tools/admin/lego/deps.nix b/pkgs/tools/admin/lego/deps.nix
new file mode 100644
index 000000000000..6d842c5f3f51
--- /dev/null
+++ b/pkgs/tools/admin/lego/deps.nix
@@ -0,0 +1,219 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
+[
+  {
+    goPackagePath = "cloud.google.com/go";
+    fetch = {
+      type = "git";
+      url = "https://code.googlesource.com/gocloud";
+      rev = "fd7767e8876b52efa597af4d0ec944e9b2574120";
+      sha256 = "1m7yd2vwbgypi9izgyif4k8rifgfmgsh747s1z467qlr5k17cjy5";
+    };
+  }
+  {
+    goPackagePath = "github.com/Azure/azure-sdk-for-go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/Azure/azure-sdk-for-go";
+      rev = "f111fc2fa3861c5fdced76cae4c9c71821969577";
+      sha256 = "1xfm3phjwb222nkhzi16qslj0r374rgvjw99c9wrzzlzkq2qkb38";
+    };
+  }
+  {
+    goPackagePath = "github.com/Azure/go-autorest";
+    fetch = {
+      type = "git";
+      url = "https://github.com/Azure/go-autorest";
+      rev = "5a06e9ddbe3c22262059b8e061777b9934f982bd";
+      sha256 = "0dy80x5gxsq6vf8lpihpgv8cb8mnsk76q4ywxx3cxzfglqdjlwz6";
+    };
+  }
+  {
+    goPackagePath = "github.com/JamesClonk/vultr";
+    fetch = {
+      type = "git";
+      url = "https://github.com/JamesClonk/vultr";
+      rev = "fa1c0367800db75e4d10d0ec90c49a8731670224";
+      sha256 = "1bx2x17aa6wfn4qy9lxk8sh7shs3x5ppz2z49s0xm8qq0rs1qi92";
+    };
+  }
+  {
+    goPackagePath = "github.com/aws/aws-sdk-go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/aws/aws-sdk-go";
+      rev = "fb9d53b0db7e801eb0d4fa021f5860794d845da3";
+      sha256 = "0md4bvrr4y5604l3bif7xx1bvhn6cc81v578s6w15mp63k9yjlpn";
+    };
+  }
+  {
+    goPackagePath = "github.com/decker502/dnspod-go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/decker502/dnspod-go";
+      rev = "f33a2c6040fc2550a631de7b3a53bddccdcd73fb";
+      sha256 = "0c5v7y465k8mi5vxhln53pjn3z4h022sh14mngnx71h6szakzykg";
+    };
+  }
+  {
+    goPackagePath = "github.com/dgrijalva/jwt-go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/dgrijalva/jwt-go";
+      rev = "dbeaa9332f19a944acb5736b4456cfcc02140e29";
+      sha256 = "0zk6l6kzsjdijfn7c4h0aywdjx5j2hjwi67vy1k6wr46hc8ks2hs";
+    };
+  }
+  {
+    goPackagePath = "github.com/dnsimple/dnsimple-go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/dnsimple/dnsimple-go";
+      rev = "e43ab24dc4818cd584429752f69885fbc8a74baa";
+      sha256 = "0cq1xjv27nssarmflnh0w4i0l8v74129va4inhi5m2wxrz2247z7";
+    };
+  }
+  {
+    goPackagePath = "github.com/edeckers/auroradnsclient";
+    fetch = {
+      type = "git";
+      url = "https://github.com/edeckers/auroradnsclient";
+      rev = "1563e622aaca0a8bb895a448f31d4a430ab97586";
+      sha256 = "0d1izyqnlqasp56mldrpfnyhzmih2k955jn78ibzhay22dmn8ndr";
+    };
+  }
+  {
+    goPackagePath = "github.com/exoscale/egoscale";
+    fetch = {
+      type = "git";
+      url = "https://github.com/exoscale/egoscale";
+      rev = "7c8b1e7975be2af74d6e462dbea467e9061f9619";
+      sha256 = "00bqam37lkwls4rr209pcrld1rb025nm935h004lgfd8i2xjv5g4";
+    };
+  }
+  {
+    goPackagePath = "github.com/google/go-querystring";
+    fetch = {
+      type = "git";
+      url = "https://github.com/google/go-querystring";
+      rev = "53e6ce116135b80d037921a7fdd5138cf32d7a8a";
+      sha256 = "0lkbm067nhmxk66pyjx59d77dbjjzwyi43gdvzyx2f8m1942rq7f";
+    };
+  }
+  {
+    goPackagePath = "github.com/miekg/dns";
+    fetch = {
+      type = "git";
+      url = "https://github.com/miekg/dns";
+      rev = "5364553f1ee9cddc7ac8b62dce148309c386695b";
+      sha256 = "1r56ws5ayza5xk6xlkjvv7wcj6misbm5cyixvyf3pnz8wgja31wp";
+    };
+  }
+  {
+    goPackagePath = "github.com/ovh/go-ovh";
+    fetch = {
+      type = "git";
+      url = "https://github.com/ovh/go-ovh";
+      rev = "df6beeb652924ef66aa95690b392f62864ad8842";
+      sha256 = "1nxgsrbqhznqivjxh67pn8laf4pysja5xyc40bdjvprl9nc40z6q";
+    };
+  }
+  {
+    goPackagePath = "github.com/rainycape/memcache";
+    fetch = {
+      type = "git";
+      url = "https://github.com/rainycape/memcache";
+      rev = "1031fa0ce2f20c1c0e1e1b51951d8ea02c84fa05";
+      sha256 = "02cbhy192vi0d1kwh57mdrg1mkr027ndkvd1y0cx0kn0h6pszggn";
+    };
+  }
+  {
+    goPackagePath = "github.com/stretchr/testify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/stretchr/testify";
+      rev = "be8372ae8ec5c6daaed3cc28ebf73c54b737c240";
+      sha256 = "1ljfacbhd180yr0lc9myvxxdka0iji2ihsx0fcczja4ik5f2mb5p";
+    };
+  }
+  {
+    goPackagePath = "github.com/timewasted/linode";
+    fetch = {
+      type = "git";
+      url = "https://github.com/timewasted/linode";
+      rev = "37e84520dcf74488f67654f9c775b9752c232dc1";
+      sha256 = "08gpys1c5xkh7f92fq31wb24vjksfnpbhfwini73dlvyi2w25a3c";
+    };
+  }
+  {
+    goPackagePath = "github.com/urfave/cli";
+    fetch = {
+      type = "git";
+      url = "https://github.com/urfave/cli";
+      rev = "a1c7408de3f632d86eee604a3bb755f1ffb68226";
+      sha256 = "1fq0amfgpccf35nll7xw0k6smwrb7h0wy62n70kfd9kvh64n8hbn";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/crypto";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/crypto";
+      rev = "5119cf507ed5294cc409c092980c7497ee5d6fd2";
+      sha256 = "0r8ffhagvzpjrkm25rrlby4h6bsqqlq6kcm01g54iqm7b2yrjy1p";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/net";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/net";
+      rev = "f5dfe339be1d06f81b22525fe34671ee7d2c8904";
+      sha256 = "01y9j7pjnnld4ipmzjvs0hls0hh698f2sga8cxaw5y6r5j7igaah";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/oauth2";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/oauth2";
+      rev = "543e37812f10c46c622c9575afd7ad22f22a12ba";
+      sha256 = "0kc816fq1zj5wdw4mfa7w2q26rnh273157w8n0d30xpzl8ba2isr";
+    };
+  }
+  {
+    goPackagePath = "google.golang.org/api";
+    fetch = {
+      type = "git";
+      url = "https://code.googlesource.com/google-api-go-client";
+      rev = "068431dcab1a5817548dd244d9795788a98329f4";
+      sha256 = "1yn5qfmmmqbm6k5h8qj5n6ra3xv9aispvjv9kqarxwvv7q5xql83";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/ini.v1";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/ini.v1";
+      rev = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a";
+      sha256 = "0mhgxw5q6b0pryhikx3k4wby7g32rwjjljzihi47lwn34kw5y1qn";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/ns1/ns1-go.v2";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/ns1/ns1-go.v2";
+      rev = "1f132c4ac59d2c7022353a8824002a15deb66f1e";
+      sha256 = "0fx646hzhi6w58hiwc76hfjxn0dj9vxbrdqkb64lqxymzxzsrfnb";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/square/go-jose.v1";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/square/go-jose.v1";
+      rev = "aa2e30fdd1fe9dd3394119af66451ae790d50e0d";
+      sha256 = "0drajyadd6c4m5qv0jxcv748qczg8sgxz28nva1jn39f234m02is";
+    };
+  }
+]
diff --git a/pkgs/tools/archivers/unarj/default.nix b/pkgs/tools/archivers/unarj/default.nix
index 9537701ebe7f..2505c012b26b 100644
--- a/pkgs/tools/archivers/unarj/default.nix
+++ b/pkgs/tools/archivers/unarj/default.nix
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     sha256 = "0r027z7a0azrd5k885xvwhrxicpd0ah57jzmaqlypxha2qjw7p6p";
-    url = "http://pkgs.fedoraproject.org/repo/pkgs/unarj/${name}.tar.gz/c6fe45db1741f97155c7def322aa74aa/${name}.tar.gz";
+    url = "http://src.fedoraproject.org/repo/pkgs/unarj/${name}.tar.gz/c6fe45db1741f97155c7def322aa74aa/${name}.tar.gz";
   };
 
   preInstall = ''
diff --git a/pkgs/tools/archivers/zip/default.nix b/pkgs/tools/archivers/zip/default.nix
index cb2d29e239dc..6d979bbf33d8 100644
--- a/pkgs/tools/archivers/zip/default.nix
+++ b/pkgs/tools/archivers/zip/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
   src = fetchurl {
     urls = [
       ftp://ftp.info-zip.org/pub/infozip/src/zip30.tgz
-      http://pkgs.fedoraproject.org/repo/pkgs/zip/zip30.tar.gz/7b74551e63f8ee6aab6fbc86676c0d37/zip30.tar.gz
+      http://src.fedoraproject.org/repo/pkgs/zip/zip30.tar.gz/7b74551e63f8ee6aab6fbc86676c0d37/zip30.tar.gz
     ];
     sha256 = "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h";
   };
diff --git a/pkgs/tools/audio/abcm2ps/default.nix b/pkgs/tools/audio/abcm2ps/default.nix
index 6d50a849a778..f93231d80222 100644
--- a/pkgs/tools/audio/abcm2ps/default.nix
+++ b/pkgs/tools/audio/abcm2ps/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "abcm2ps-${version}";
-  version = "8.13.19";
+  version = "8.13.20";
 
   src = fetchFromGitHub {
     owner = "leesavide";
     repo = "abcm2ps";
     rev = "v${version}";
-    sha256 = "0iv8fzl601rkww9dplajwzlfdb8r7142qdsj8xmvrbwqkaval51f";
+    sha256 = "0zgwrclky6b1l1pd07s31azyxf4clwi3cp5x0wjix0wp78b89pbx";
   };
 
   prePatch = ''
diff --git a/pkgs/tools/audio/abcmidi/default.nix b/pkgs/tools/audio/abcmidi/default.nix
index 941c5e343b92..6915f8a90711 100644
--- a/pkgs/tools/audio/abcmidi/default.nix
+++ b/pkgs/tools/audio/abcmidi/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "abcMIDI-${version}";
-  version = "2018.01.25";
+  version = "2018.02.07";
 
   src = fetchzip {
     url = "http://ifdo.ca/~seymour/runabc/${name}.zip";
-    sha256 = "18h6gqhh75qdi8krpp0m2pxbxi0n08wrh8xay477jm3vaggyr8s9";
+    sha256 = "16hdv114hs5agg288kpbijqw53wdiswjmprpbhy7kgdjnp9ijwxw";
   };
 
   # There is also a file called "makefile" which seems to be preferred by the standard build phase
diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix
index 899845a044c6..b8f3318057b4 100644
--- a/pkgs/tools/audio/beets/default.nix
+++ b/pkgs/tools/audio/beets/default.nix
@@ -224,7 +224,7 @@ in pythonPackages.buildPythonApplication rec {
     description = "Music tagger and library organizer";
     homepage = http://beets.radbox.org;
     license = licenses.mit;
-    maintainers = with maintainers; [ aszlig domenkozar pjones profpatsch ];
+    maintainers = with maintainers; [ aszlig domenkozar pjones ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/tools/backup/attic/default.nix b/pkgs/tools/backup/attic/default.nix
deleted file mode 100644
index 754e12e7f776..000000000000
--- a/pkgs/tools/backup/attic/default.nix
+++ /dev/null
@@ -1,56 +0,0 @@
-{ stdenv, fetchzip, python3Packages, openssl, acl, fetchurl, pkgconfig, fuse, attr, which }:
-
-let
-
-  # Old version needed for attic (backup program) due to breaking change in
-  # llfuse >= 0.42.
-  llfuse-0-41 = python3Packages.buildPythonPackage rec {
-    name = "llfuse-0.41.1";
-    src = fetchurl {
-      url = "mirror://pypi/l/llfuse/${name}.tar.bz2";
-      sha256 = "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa";
-    };
-  nativeBuildInputs = [ pkgconfig ];
-    buildInputs = with python3Packages; [ pytest fuse attr which ];
-    propagatedBuildInputs = with python3Packages; [ contextlib2 ];
-    checkPhase = ''
-      py.test
-    '';
-    # FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin'
-    doCheck = false;
-    meta = {
-      description = "Python bindings for the low-level FUSE API";
-      homepage = https://code.google.com/p/python-llfuse/;
-      license = stdenv.lib.licenses.lgpl2Plus;
-      platforms = stdenv.lib.platforms.unix;
-      maintainers = with stdenv.lib.maintainers; [ bjornfor ];
-    };
-  };
-
-in python3Packages.buildPythonApplication rec {
-  name = "attic-${version}";
-  version = "0.16";
-  namePrefix = "";
-
-  src = fetchzip {
-    name = "${name}-src";
-    url = "https://github.com/jborg/attic/archive/${version}.tar.gz";
-    sha256 = "008566hhsd3ck70ql0fdn4vaqjfcnf493gwd49d6294f8r7qn06z";
-  };
-
-  propagatedBuildInputs = with python3Packages;
-    [ cython msgpack openssl acl llfuse-0-41 ];
-
-  preConfigure = ''
-    export ATTIC_OPENSSL_PREFIX="${openssl.dev}"
-    substituteInPlace setup.py --replace "version=versioneer.get_version()" "version='${version}'"
-  '';
-
-  meta = with stdenv.lib; {
-    description = "A deduplicating backup program";
-    homepage = https://attic-backup.org;
-    license = licenses.bsd3;
-    maintainers = [ maintainers.wscott ];
-    platforms = platforms.unix; # Darwin and FreeBSD mentioned on homepage
-  };
-}
diff --git a/pkgs/tools/backup/backup/default.nix b/pkgs/tools/backup/backup/default.nix
index cf97eba8eded..23affbb8af66 100644
--- a/pkgs/tools/backup/backup/default.nix
+++ b/pkgs/tools/backup/backup/default.nix
@@ -1,14 +1,15 @@
-{ stdenv, lib, bundlerEnv, ruby_2_1, curl }:
+{ stdenv, lib, bundlerEnv, ruby, curl }:
 
 bundlerEnv {
   name = "backup_v4";
 
-  ruby = ruby_2_1;
+  inherit ruby;
   gemdir = ./.;
 
   buildInputs = [ curl ];
 
   meta = with lib; {
+    broken = true; # need ruby 2.1
     description = "Easy full stack backup operations on UNIX-like systems";
     homepage    = http://backup.github.io/backup/v4/;
     license     = licenses.mit;
diff --git a/pkgs/tools/backup/borg/default.nix b/pkgs/tools/backup/borg/default.nix
index eb40dfefb83c..4f0d24a27d90 100644
--- a/pkgs/tools/backup/borg/default.nix
+++ b/pkgs/tools/backup/borg/default.nix
@@ -19,7 +19,7 @@ python3Packages.buildPythonApplication rec {
     lz4 openssl python3Packages.setuptools_scm
   ] ++ stdenv.lib.optionals stdenv.isLinux [ acl ];
   propagatedBuildInputs = with python3Packages; [
-    cython msgpack
+    cython msgpack-python
   ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ llfuse ];
 
   preConfigure = ''
diff --git a/pkgs/tools/backup/burp/default.nix b/pkgs/tools/backup/burp/default.nix
index 783a0796e91b..5540822c99b5 100644
--- a/pkgs/tools/backup/burp/default.nix
+++ b/pkgs/tools/backup/burp/default.nix
@@ -1,18 +1,18 @@
-{ stdenv, fetchFromGitHub, autoreconfHook
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig
 , acl, librsync, ncurses, openssl, zlib, uthash }:
 
 stdenv.mkDerivation rec {
   name = "burp-${version}";
-  version = "2.0.54";
+  version = "2.1.28";
 
   src = fetchFromGitHub {
     owner = "grke";
     repo = "burp";
     rev = version;
-    sha256 = "1z1w013hqxbfjgri0fan2570qwhgwvm4k4ghajbzqg8kly4fgk5x";
+    sha256 = "1i8j15pmnn9cn6cd4dnp28qbisq8cl9l4y3chsmil4xqljr9fi5x";
   };
 
-  nativeBuildInputs = [ autoreconfHook ];
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
   buildInputs = [ librsync ncurses openssl zlib uthash ]
     ++ stdenv.lib.optional (!stdenv.isDarwin) acl;
 
diff --git a/pkgs/tools/backup/ddar/default.nix b/pkgs/tools/backup/ddar/default.nix
new file mode 100644
index 000000000000..eac589813f47
--- /dev/null
+++ b/pkgs/tools/backup/ddar/default.nix
@@ -0,0 +1,39 @@
+{ lib, buildPythonApplication, fetchFromGitHub, python, protobuf, roundup }:
+
+buildPythonApplication rec {
+  pname = "ddar";
+  version = "1.0";
+
+  src = fetchFromGitHub {
+    owner = "basak";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "158jdy5261k9yw540g48hddy5zyqrr81ir9fjlcy4jnrwfkg7ynm";
+  };
+
+  prePatch = ''
+    substituteInPlace t/local-functions \
+      --replace 'PATH="$ddar_src:$PATH"' 'PATH="$out/bin:$PATH"'
+    # Test requires additional software and compilation of some C programs
+    substituteInPlace t/basic-test.sh \
+      --replace it_stores_and_extracts_corpus0 dont_test
+  '';
+
+  preBuild = ''
+    make -f Makefile.prep synctus/ddar_pb2.py
+  '';
+
+  propagatedBuildInputs = [ protobuf ];
+
+  checkInputs = [ roundup ];
+
+  checkPhase = ''
+    roundup t/basic-test.sh
+  '';
+
+  meta = with lib; {
+    description = "Unix de-duplicating archiver";
+    license = licenses.gpl3;
+    homepage = src.meta.homepage;
+  };
+}
diff --git a/pkgs/tools/backup/diskrsync/default.nix b/pkgs/tools/backup/diskrsync/default.nix
new file mode 100644
index 000000000000..b04a1dab40f5
--- /dev/null
+++ b/pkgs/tools/backup/diskrsync/default.nix
@@ -0,0 +1,27 @@
+{ buildGoPackage, fetchFromGitHub, stdenv }:
+
+buildGoPackage rec {
+
+  name = "${pname}-${version}";
+  pname = "diskrsync";
+  version = "unstable-2018-02-03";
+
+  src = fetchFromGitHub {
+    owner = "dop251";
+    repo = pname;
+    rev = "2f36bd6e5084ce16c12a2ee216ebb2939a7d5730";
+    sha256 = "1rpfk7ds4lpff30aq4d8rw7g9j4bl2hd1bvcwd1pfxalp222zkxn";
+  };
+
+  goPackagePath = "github.com/dop251/diskrsync";
+  goDeps = ./deps.nix;
+
+  meta = with stdenv.lib; {
+    description = "Rsync for block devices and disk images";
+    homepage = https://github.com/dop251/diskrsync;
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jluttine ];
+  };
+
+}
diff --git a/pkgs/tools/backup/diskrsync/deps.nix b/pkgs/tools/backup/diskrsync/deps.nix
new file mode 100644
index 000000000000..684100968e88
--- /dev/null
+++ b/pkgs/tools/backup/diskrsync/deps.nix
@@ -0,0 +1,21 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
+[
+  {
+    goPackagePath = "github.com/dop251/spgz";
+    fetch = {
+      type = "git";
+      url = "https://github.com/dop251/spgz";
+      rev = "d50e5e978e08044da0cf9babc6b42b55ec8fe0d5";
+      sha256 = "11h8z6cwxw272rn5zc4y3w9d6py113iaimy681v6xxv26d30m8bx";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/crypto";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/crypto";
+      rev = "1875d0a70c90e57f11972aefd42276df65e895b9";
+      sha256 = "1kprrdzr4i4biqn7r9gfxzsmijya06i9838skprvincdb1pm0q2q";
+    };
+  }
+]
diff --git a/pkgs/tools/backup/restic/default.nix b/pkgs/tools/backup/restic/default.nix
index 40d8e0a4fbc4..4a51a65b4065 100644
--- a/pkgs/tools/backup/restic/default.nix
+++ b/pkgs/tools/backup/restic/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "restic-${version}";
-  version = "0.8.1";
+  version = "0.8.2";
 
   goPackagePath = "github.com/restic/restic";
 
@@ -10,7 +10,7 @@ buildGoPackage rec {
     owner = "restic";
     repo = "restic";
     rev = "v${version}";
-    sha256 = "13pawz031pzyc4ap5kk229cmzj0qjx5x0j1mw7jhwhc4w4ximvl3";
+    sha256 = "1prk8r0kmcscj79fc53a0qjvik6ygjr50xwnahs0amlyh03pyb46";
   };
 
   buildPhase = ''
@@ -19,8 +19,16 @@ buildGoPackage rec {
   '';
 
   installPhase = ''
-    mkdir -p $bin/bin/
+    mkdir -p \
+      $bin/bin \
+      $bin/etc/bash_completion.d \
+      $bin/share/zsh/vendor-completions \
+      $bin/share/man/man1
     cp restic $bin/bin/
+    $bin/bin/restic generate \
+      --bash-completion $bin/etc/bash_completion.d/restic.sh \
+      --zsh-completion $bin/share/zsh/vendor-completions/restic.sh \
+      --man $bin/share/man/man1
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/cd-dvd/cue2pops/default.nix b/pkgs/tools/cd-dvd/cue2pops/default.nix
new file mode 100644
index 000000000000..6523c8a0cf3f
--- /dev/null
+++ b/pkgs/tools/cd-dvd/cue2pops/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub }:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+  name = "cue2pops-${version}";
+  version = "git-2018-01-04";
+
+  src = fetchFromGitHub {
+    owner = "makefu";
+    repo = "cue2pops-linux";
+    rev = "541863adf23fdecde92eba5899f8d58586ca4551";
+    sha256 = "05w84726g3k33rz0wwb9v77g7xh4cnhy9sxlpilf775nli9bynrk";
+  };
+
+  dontConfigure = true;
+
+  makeFlags = ["CC=cc"];
+
+  installPhase = ''
+    install --directory --mode=755 $out/bin
+    install --mode=755 cue2pops $out/bin
+  '';
+
+  meta = {
+    description = "Convert CUE to ISO suitable to POPStarter";
+    homepage = https://github.com/makefu/cue2pops-linux;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/cd-dvd/ecm-tools/default.nix b/pkgs/tools/cd-dvd/ecm-tools/default.nix
new file mode 100644
index 000000000000..ec814d97bde0
--- /dev/null
+++ b/pkgs/tools/cd-dvd/ecm-tools/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "ecm-tools-${version}";
+  version = "1.0.3";
+
+  src = fetchFromGitHub {
+    owner = "alucryd";
+    repo = "ecm-tools";
+    rev = "v${version}";
+    sha256 = "1rvyx5gcy8lfklgj80szlz3312x45wzx0d9jsgwyvy8f6m4nnb0c";
+  };
+
+  dontConfigure = true;
+
+  installPhase = ''
+    install --directory --mode=755 $out/bin
+    install --mode=755 bin2ecm $out/bin
+    (cd $out/bin; ln -s bin2ecm ecm2bin)
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A utility to uncompress ECM files to BIN CD format";
+    homepage = https://github.com/alucryd/ecm-tools;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix
index 05cc672ab15e..8d02e926e57f 100644
--- a/pkgs/tools/compression/xz/default.nix
+++ b/pkgs/tools/compression/xz/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   doCheck = true;
 
   # In stdenv-linux, prevent a dependency on bootstrap-tools.
-  preConfigure = "unset CONFIG_SHELL";
+  preConfigure = "CONFIG_SHELL=/bin/sh";
 
   postInstall = "rm -rf $out/share/doc";
 
diff --git a/pkgs/tools/filesystems/archivemount/default.nix b/pkgs/tools/filesystems/archivemount/default.nix
index f4133f12541f..72403bd3dc0c 100644
--- a/pkgs/tools/filesystems/archivemount/default.nix
+++ b/pkgs/tools/filesystems/archivemount/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchurl, pkgconfig, fuse, libarchive }:
 
 let
-  name = "archivemount-0.8.3";
+  name = "archivemount-0.8.7";
 in
 stdenv.mkDerivation {
   inherit name;
 
   src = fetchurl {
     url = "http://www.cybernoia.de/software/archivemount/${name}.tar.gz";
-    sha256 = "1zv1fvik76kpp1q5f2dz01f4fwg1m5a8rl168px47jy9nyl9k277";
+    sha256 = "1diiw6pnlnrnikn6l5ld92dx59lhrxjlqms8885vwbynsjl5q127";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/tools/filesystems/bcachefs-tools/default.nix b/pkgs/tools/filesystems/bcachefs-tools/default.nix
index fc4d3f505cdc..0a5017de53c4 100644
--- a/pkgs/tools/filesystems/bcachefs-tools/default.nix
+++ b/pkgs/tools/filesystems/bcachefs-tools/default.nix
@@ -1,29 +1,25 @@
-{ stdenv, pkgs, fetchgit, pkgconfig, attr, libuuid, libscrypt, libsodium, keyutils, liburcu, zlib, libaio }:
+{ stdenv, pkgs, fetchgit, pkgconfig, attr, libuuid, libscrypt, libsodium
+, keyutils, liburcu, zlib, libaio }:
 
 stdenv.mkDerivation rec {
-  name = "bcachefs-tools-unstable-2017-08-28";
+  name = "bcachefs-tools-unstable-2018-02-08";
 
   src = fetchgit {
     url = "https://evilpiepirate.org/git/bcachefs-tools.git";
-    rev = "b1814f2dd0c6b61a12a2ebb67a13d406d126b227";
-    sha256 = "05ba1h09rrqj6vjr3q37ybca3nbrmnifmffdyk83622l28fpv350";
+    rev = "fc96071b58c28ea492103e7649c0efd5bab50ead";
+    sha256 = "0a2sxkz0mkmvb5g4k2v8g2c89dj29haw9bd3bpwk0dsfkjif92vy";
   };
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ attr libuuid libscrypt libsodium keyutils liburcu zlib libaio ];
 
-  preConfigure = ''
-    substituteInPlace cmd_migrate.c --replace /usr/include/dirent.h ${stdenv.lib.getDev stdenv.cc.libc}/include/dirent.h
-  '';
-
   installFlags = [ "PREFIX=$(out)" ];
 
   meta = with stdenv.lib; {
     description = "Tool for managing bcachefs filesystems";
-    homepage = http://bcachefs.org/;
+    homepage = https://bcachefs.org/;
     license = licenses.gpl2;
     maintainers = with maintainers; [ davidak ];
     platforms = platforms.linux;
   };
 }
-
diff --git a/pkgs/tools/filesystems/ceph/0001-kv-RocksDBStore-API-break-additional.patch b/pkgs/tools/filesystems/ceph/0001-kv-RocksDBStore-API-break-additional.patch
new file mode 100644
index 000000000000..0b6f1d30a4c9
--- /dev/null
+++ b/pkgs/tools/filesystems/ceph/0001-kv-RocksDBStore-API-break-additional.patch
@@ -0,0 +1,58 @@
+Seulement dans ceph: ceph.old
+diff -ur ceph.old/src/kv/RocksDBStore.cc ceph/src/kv/RocksDBStore.cc
+--- ceph.old/src/kv/RocksDBStore.cc	1980-01-02 00:00:00.000000000 +0100
++++ ceph/src/kv/RocksDBStore.cc	2018-01-24 14:08:35.017553372 +0100
+@@ -505,7 +505,7 @@
+   // considering performance overhead, default is disabled
+   if (g_conf->rocksdb_perf) {
+     rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex);
+-    rocksdb::perf_context.Reset();
++    rocksdb::get_perf_context()->Reset();
+   }
+ 
+   RocksDBTransactionImpl * _t =
+@@ -532,13 +532,13 @@
+     utime_t write_wal_time;
+     utime_t write_pre_and_post_process_time;
+     write_wal_time.set_from_double(
+-	static_cast<double>(rocksdb::perf_context.write_wal_time)/1000000000);
++	static_cast<double>(rocksdb::get_perf_context()->write_wal_time)/1000000000);
+     write_memtable_time.set_from_double(
+-	static_cast<double>(rocksdb::perf_context.write_memtable_time)/1000000000);
++	static_cast<double>(rocksdb::get_perf_context()->write_memtable_time)/1000000000);
+     write_delay_time.set_from_double(
+-	static_cast<double>(rocksdb::perf_context.write_delay_time)/1000000000);
++	static_cast<double>(rocksdb::get_perf_context()->write_delay_time)/1000000000);
+     write_pre_and_post_process_time.set_from_double(
+-	static_cast<double>(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000);
++	static_cast<double>(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000);
+     logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time);
+     logger->tinc(l_rocksdb_write_delay_time, write_delay_time);
+     logger->tinc(l_rocksdb_write_wal_time, write_wal_time);
+@@ -558,7 +558,7 @@
+   // considering performance overhead, default is disabled
+   if (g_conf->rocksdb_perf) {
+     rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex);
+-    rocksdb::perf_context.Reset();
++    rocksdb::get_perf_context()->Reset();
+   }
+ 
+   RocksDBTransactionImpl * _t =
+@@ -586,13 +586,13 @@
+     utime_t write_wal_time;
+     utime_t write_pre_and_post_process_time;
+     write_wal_time.set_from_double(
+-	static_cast<double>(rocksdb::perf_context.write_wal_time)/1000000000);
++	static_cast<double>(rocksdb::get_perf_context()->write_wal_time)/1000000000);
+     write_memtable_time.set_from_double(
+-	static_cast<double>(rocksdb::perf_context.write_memtable_time)/1000000000);
++	static_cast<double>(rocksdb::get_perf_context()->write_memtable_time)/1000000000);
+     write_delay_time.set_from_double(
+-	static_cast<double>(rocksdb::perf_context.write_delay_time)/1000000000);
++	static_cast<double>(rocksdb::get_perf_context()->write_delay_time)/1000000000);
+     write_pre_and_post_process_time.set_from_double(
+-	static_cast<double>(rocksdb::perf_context.write_pre_and_post_process_time)/1000000000);
++	static_cast<double>(rocksdb::get_perf_context()->write_pre_and_post_process_time)/1000000000);
+     logger->tinc(l_rocksdb_write_memtable_time, write_memtable_time);
+     logger->tinc(l_rocksdb_write_delay_time, write_delay_time);
+     logger->tinc(l_rocksdb_write_wal_time, write_wal_time);
diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix
index 334525e79026..0f712853f24a 100644
--- a/pkgs/tools/filesystems/ceph/default.nix
+++ b/pkgs/tools/filesystems/ceph/default.nix
@@ -1,20 +1,12 @@
 { callPackage, fetchgit, fetchpatch, ... } @ args:
 
 callPackage ./generic.nix (args // rec {
-  version = "9.2.0";
+  version = "12.2.2";
 
   src = fetchgit {
     url = "https://github.com/ceph/ceph.git";
     rev = "refs/tags/v${version}";
-    sha256 = "0a2v3bgkrbkzardcw7ymlhhyjlwi08qmcm7g34y2sjsxk9bd78an";
+    sha256 = "01anqxyffa8l2lzgyb0dj6fjicfjdx2cq9y1klh24x69gxwkdh00";
   };
 
-  patches = [
-    ./fix-pythonpath.patch
-    # For building with xfsprogs 4.5.0:
-    (fetchpatch {
-      url = "https://github.com/ceph/ceph/commit/602425abd5cef741fc1b5d4d1dd70c68e153fc8d.patch";
-      sha256 = "1iyf0ml2n50ki800vjich8lvzmcdviwqwkbs6cdj0vqv2nc5ii1g";
-    })
-  ];
 })
diff --git a/pkgs/tools/filesystems/ceph/generic.nix b/pkgs/tools/filesystems/ceph/generic.nix
index ffcf20d1651b..a18051f9c126 100644
--- a/pkgs/tools/filesystems/ceph/generic.nix
+++ b/pkgs/tools/filesystems/ceph/generic.nix
@@ -1,12 +1,17 @@
-{ stdenv, ensureNewerSourcesHook, autoconf, automake, makeWrapper, pkgconfig
-, libtool, which, git
-, boost, python2Packages, libxml2, zlib
+{ stdenv, ensureNewerSourcesHook, cmake, pkgconfig
+, which, git
+, boost, python2Packages
+, libxml2, zlib
+, openldap, lttngUst
+, babeltrace, gperf
+, cunit, snappy
+, rocksdb
 
 # Optional Dependencies
-, snappy ? null, leveldb ? null, yasm ? null, fcgi ? null, expat ? null
+, yasm ? null, fcgi ? null, expat ? null
 , curl ? null, fuse ? null, libibverbs ? null, librdmacm ? null
 , libedit ? null, libatomic_ops ? null, kinetic-cpp-client ? null
-, rocksdb ? null, libs3 ? null
+, libs3 ? null
 
 # Mallocs
 , jemalloc ? null, gperftools ? null
@@ -30,21 +35,11 @@ assert cryptopp != null || (nss != null && nspr != null);
 with stdenv;
 with stdenv.lib;
 let
-  inherit (python2Packages) python;
-  mkFlag = trueStr: falseStr: cond: name: val: "--"
-    + (if cond then trueStr else falseStr)
-    + name
-    + optionalString (val != null && cond != false) "=${val}";
-  mkEnable = mkFlag "enable-" "disable-";
-  mkWith = mkFlag "with-" "without-";
-  mkOther = mkFlag "" "" true;
 
   shouldUsePkg = pkg_: let pkg = (builtins.tryEval pkg_).value;
     in if lib.any (x: x == system) (pkg.meta.platforms or [])
       then pkg else null;
 
-  optSnappy = shouldUsePkg snappy;
-  optLeveldb = shouldUsePkg leveldb;
   optYasm = shouldUsePkg yasm;
   optFcgi = shouldUsePkg fcgi;
   optExpat = shouldUsePkg expat;
@@ -55,7 +50,6 @@ let
   optLibedit = shouldUsePkg libedit;
   optLibatomic_ops = shouldUsePkg libatomic_ops;
   optKinetic-cpp-client = shouldUsePkg kinetic-cpp-client;
-  optRocksdb = shouldUsePkg rocksdb;
   optLibs3 = if versionAtLeast version "10.0.0" then null else shouldUsePkg libs3;
 
   optJemalloc = shouldUsePkg jemalloc;
@@ -69,13 +63,11 @@ let
   optLibxfs = shouldUsePkg libxfs;
   optZfs = shouldUsePkg zfs;
 
-  hasServer = optSnappy != null && optLeveldb != null;
-  hasMon = hasServer;
-  hasMds = hasServer;
-  hasOsd = hasServer;
+  hasMon = true;
+  hasMds = true;
+  hasOsd = true;
   hasRadosgw = optFcgi != null && optExpat != null && optCurl != null && optLibedit != null;
 
-  hasRocksdb = versionAtLeast version "9.0.0" && optRocksdb != null;
 
   # TODO: Reenable when kinetic support is fixed
   #hasKinetic = versionAtLeast version "9.0.0" && optKinetic-cpp-client != null;
@@ -93,192 +85,80 @@ let
     none = [ ];
   };
 
-  wrapArgs = "--set PYTHONPATH \"$(toPythonPath $lib)\""
-    + " --prefix PYTHONPATH : \"$(toPythonPath ${python2Packages.flask})\""
-    + " --set PATH \"$out/bin\"";
+  ceph-python-env = python2Packages.python.withPackages (ps: [ 
+	ps.sphinx
+	ps.flask
+	ps.argparse
+	ps.cython 
+	ps.setuptools
+	ps.pip
+	]);
+
 in
 stdenv.mkDerivation {
   name="ceph-${version}";
 
   inherit src;
 
-  patches = patches ++ [
-    ./0001-Makefile-env-Don-t-force-sbin.patch
+  patches = [ 
+ #	 ./ceph-patch-cmake-path.patch
+    ./0001-kv-RocksDBStore-API-break-additional.patch   
   ];
 
   nativeBuildInputs = [
-    autoconf automake makeWrapper pkgconfig libtool which git
+    cmake
+    pkgconfig which git
     (ensureNewerSourcesHook { year = "1980"; })
-  ]
-    ++ optionals (versionAtLeast version "9.0.2") [
-      python2Packages.setuptools python2Packages.argparse
-    ];
+  ];
+  
   buildInputs = buildInputs ++ cryptoLibsMap.${cryptoStr} ++ [
-    boost python libxml2 optYasm optLibatomic_ops optLibs3 malloc python2Packages.flask zlib
-  ] ++ optionals (versionAtLeast version "9.0.0") [
-    python2Packages.sphinx # Used for docs
+    boost ceph-python-env libxml2 optYasm optLibatomic_ops optLibs3 
+    malloc zlib openldap lttngUst babeltrace gperf cunit
+    snappy rocksdb
   ] ++ optionals stdenv.isLinux [
     linuxHeaders libuuid udev keyutils optLibaio optLibxfs optZfs
-  ] ++ optionals hasServer [
-    optSnappy optLeveldb
   ] ++ optionals hasRadosgw [
     optFcgi optExpat optCurl optFuse optLibedit
-  ] ++ optionals hasRocksdb [
-    optRocksdb
   ] ++ optionals hasKinetic [
     optKinetic-cpp-client
   ];
-
-  postPatch = ''
-    # Fix zfs pkgconfig detection
-    sed -i 's,\[zfs\],\[libzfs\],g' configure.ac
-
-    # Fix seagate kinetic linking
-    sed -i 's,libcrypto.a,-lcrypto,g' src/os/Makefile.am
-  '' + optionalString (versionAtLeast version "9.0.0") ''
-    # Fix gmock
-    patchShebangs src/gmock
+  
+  preConfigure =''
+    # rip off submodule that interfer with system libs
+	rm -rf src/boost
+	rm -rf src/rocksdb
+	
+	# require LD_LIBRARY_PATH for cython to find internal dep
+	export LD_LIBRARY_PATH="$PWD/build/lib:$LD_LIBRARY_PATH"
+	
+	# requires setuptools due to embedded in-cmake setup.py usage
+	export PYTHONPATH="${python2Packages.setuptools}/lib/python2.7/site-packages/:$PYTHONPATH"
   '';
 
-  preConfigure = ''
-    # Ceph expects the arch command to be usable during configure
-    # for detecting the assembly type
-    mkdir -p mybin
-    echo "#${stdenv.shell} -e" >> mybin/arch
-    echo "uname -m" >> mybin/arch
-    chmod +x mybin/arch
-    PATH="$PATH:$(pwd)/mybin"
-
-    ./autogen.sh
-
-    # Fix the python site-packages install directory
-    sed -i "s,\(PYTHON\(\|_EXEC\)_PREFIX=\).*,\1'$lib',g" configure
-
-    # Fix the PYTHONPATH for installing ceph-detect-init to $out
-    mkdir -p "$(toPythonPath $out)"
-    export PYTHONPATH="$(toPythonPath $out):$PYTHONPATH"
-  '';
-
-  configureFlags = [
-    (mkOther                               "exec_prefix"         "\${out}")
-    (mkOther                               "sysconfdir"          "/etc")
-    (mkOther                               "localstatedir"       "/var")
-    (mkOther                               "libdir"              "\${lib}/lib")
-    (mkOther                               "includedir"          "\${lib}/include")
-    (mkWith   true                         "rbd"                  null)
-    (mkWith   true                         "cephfs"               null)
-    (mkWith   hasRadosgw                   "radosgw"              null)
-    (mkWith   true                         "radosstriper"         null)
-    (mkWith   hasServer                    "mon"                  null)
-    (mkWith   hasServer                    "osd"                  null)
-    (mkWith   hasServer                    "mds"                  null)
-    (mkEnable true                         "client"               null)
-    (mkEnable hasServer                    "server"               null)
-    (mkWith   (cryptoStr == "cryptopp")    "cryptopp"             null)
-    (mkWith   (cryptoStr == "nss")         "nss"                  null)
-    (mkEnable false                        "root-make-check"      null)
-    (mkWith   false                        "profiler"             null)
-    (mkWith   false                        "debug"                null)
-    (mkEnable false                        "coverage"             null)
-    (mkWith   (optFuse != null)            "fuse"                 null)
-    (mkWith   (malloc == optJemalloc)      "jemalloc"             null)
-    (mkWith   (malloc == optGperftools)    "tcmalloc"             null)
-    (mkEnable false                        "pgrefdebugging"       null)
-    (mkEnable false                        "cephfs-java"          null)
-    (mkWith   (optLibatomic_ops != null)   "libatomic-ops"        null)
-    (mkWith   true                         "ocf"                  null)
-    (mkWith   hasKinetic                   "kinetic"              null)
-    (mkWith   hasRocksdb                   "librocksdb"           null)
-    (mkWith   false                        "librocksdb-static"    null)
-  ] ++ optional stdenv.isLinux [
-    (mkWith   (optLibaio != null)          "libaio"               null)
-    (mkWith   (optLibxfs != null)          "libxfs"               null)
-    (mkWith   (optZfs != null)             "libzfs"               null)
-  ] ++ optional (versionAtLeast version "0.94.3") [
-    (mkWith   false                        "tcmalloc-minimal"     null)
-  ] ++ optional (versionAtLeast version "9.0.1") [
-    (mkWith   false                        "valgrind"             null)
-  ] ++ optional (versionAtLeast version "9.0.2") [
-    (mkWith   true                         "man-pages"            null)
-    (mkWith   true                         "systemd-libexec-dir"  "\${out}/libexec")
-  ] ++ optional (versionOlder version "9.1.0") [
-    (mkWith   (optLibs3 != null)           "system-libs3"         null)
-    (mkWith   true                         "rest-bench"           null)
-  ] ++ optional (versionAtLeast version "9.1.0") [
-    (mkWith   true                         "rgw-user"             "rgw")
-    (mkWith   true                         "rgw-group"            "rgw")
-    (mkWith   true                         "systemd-unit-dir"     "\${out}/etc/systemd/system")
-    (mkWith   false                        "selinux"              null)  # TODO: Implement
+  cmakeFlags = [ 
+    "-DENABLE_GIT_VERSION=OFF"
+    "-DWITH_SYSTEM_BOOST=ON"
+    "-DWITH_SYSTEM_ROCKSDB=ON"
+    "-DWITH_LEVELDB=OFF"
+    
+    # enforce shared lib
+    "-DBUILD_SHARED_LIBS=ON"
+    
+    # disable cephfs, cmake build broken for now
+    "-DWITH_CEPHFS=OFF"
+    "-DWITH_LIBCEPHFS=OFF"
   ];
 
-  preBuild = optionalString (versionAtLeast version "9.0.0") ''
-    (cd src/gmock; make -j $NIX_BUILD_CORES)
-  '';
-
-  installFlags = [ "sysconfdir=\${out}/etc" ];
-
-  outputs = [ "out" "lib" ];
-
-  postInstall = ''
-    # Wrap all of the python scripts
-    wrapProgram $out/bin/ceph ${wrapArgs}
-    wrapProgram $out/bin/ceph-brag ${wrapArgs}
-    wrapProgram $out/bin/ceph-rest-api ${wrapArgs}
-    wrapProgram $out/sbin/ceph-create-keys ${wrapArgs}
-    wrapProgram $out/sbin/ceph-disk ${wrapArgs}
-
-    # Bring in lib as a run-time dependency
-    mkdir -p $out/nix-support
-    echo "$lib" > $out/nix-support/propagated-build-inputs
-
-    # Fix the python library loading
-    find $lib/lib -name \*.pyc -or -name \*.pyd -exec rm {} \;
-    for PY in $(find $lib/lib -name \*.py); do
-      LIBS="$(sed -n "s/.*find_library('\([^)]*\)').*/\1/p" "$PY")"
-
-      # Delete any calls to find_library
-      sed -i '/find_library/d' "$PY"
-
-      # Fix each find_library call
-      for LIB in $LIBS; do
-        REALLIB="$lib/lib/lib$LIB.so"
-        sed -i "s,\(lib$LIB = CDLL(\).*,\1'$REALLIB'),g" "$PY"
-      done
-
-      # Reapply compilation optimizations
-      NAME=$(basename -s .py "$PY")
-      rm -f "$PY"{c,o}
-      pushd "$(dirname $PY)"
-      python -c "import $NAME"
-      python -O -c "import $NAME"
-      popd
-      test -f "$PY"c
-      test -f "$PY"o
-    done
-
-    # Fix .la file link dependencies
-    find "$lib/lib" -name \*.la | xargs sed -i \
-      -e 's,-lboost_[a-z]*,-L${boost.out}/lib \0,g' \
-  '' + optionalString (cryptoStr == "cryptopp") ''
-      -e 's,-lcryptopp,-L${optCryptopp}/lib \0,g' \
-  '' + optionalString (cryptoStr == "nss") ''
-      -e 's,-l\(plds4\|plc4\|nspr4\),-L${optNss}/lib \0,g' \
-      -e 's,-l\(ssl3\|smime3\|nss3\|nssutil3\),-L${optNspr}/lib \0,g' \
-  '' + ''
-
-  '';
-
   enableParallelBuilding = true;
+  
+  outputs = [ "dev" "lib" "out" "doc" ];
 
   meta = {
     homepage = http://ceph.com/;
     description = "Distributed storage system";
     license = licenses.lgpl21;
-    maintainers = with maintainers; [ ak wkennington ];
+    maintainers = with maintainers; [ adev ak wkennington ];
     platforms = platforms.unix;
-    # Broken because of https://lwn.net/Vulnerabilities/709844/
-    # and our version is quite out of date.
-    broken = true;
   };
 
   passthru.version = version;
diff --git a/pkgs/tools/filesystems/cryfs/default.nix b/pkgs/tools/filesystems/cryfs/default.nix
index 7bbfafef819d..dfd522f5a094 100644
--- a/pkgs/tools/filesystems/cryfs/default.nix
+++ b/pkgs/tools/filesystems/cryfs/default.nix
@@ -5,13 +5,13 @@
 
 stdenv.mkDerivation rec {
   name = "cryfs-${version}";
-  version = "0.9.8";
+  version = "0.9.9";
 
   src = fetchFromGitHub {
     owner  = "cryfs";
     repo   = "cryfs";
     rev    = "${version}";
-    sha256 = "1lrzmzjakv08qjq09a3krllfw5vrgblfxzijpf3lm3yjgih63r1k";
+    sha256 = "07f2k2b595m3vkwwlmlc0m7px0nwrrzrph3z6sss9354m0b0lcri";
   };
 
   prePatch = ''
diff --git a/pkgs/tools/filesystems/exfat/default.nix b/pkgs/tools/filesystems/exfat/default.nix
index 831594973e21..47ff22ae20dd 100644
--- a/pkgs/tools/filesystems/exfat/default.nix
+++ b/pkgs/tools/filesystems/exfat/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "exfat-${version}";
-  version = "1.2.7";
+  version = "1.2.8";
 
   src = fetchFromGitHub {
     owner = "relan";
     repo = "exfat";
     rev = "v${version}";
-    sha256 = "1sk4z133djh8sdvx2vvmd8kf4qfly2i3hdar4zpg0s41jpbzdx69";
+    sha256 = "0q02g3yvfmxj70h85a69d8s4f6y7jask268vr87j44ya51lzndd9";
   };
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
diff --git a/pkgs/tools/filesystems/file-rename/default.nix b/pkgs/tools/filesystems/file-rename/default.nix
new file mode 100644
index 000000000000..1818a517fd25
--- /dev/null
+++ b/pkgs/tools/filesystems/file-rename/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, perlPackages, makeWrapper }:
+
+perlPackages.buildPerlPackage rec {
+  name = "File-Rename-0.20";
+
+  src = fetchurl {
+    url = "mirror://cpan/authors/id/R/RM/RMBARKER/${name}.tar.gz";
+    sha256 = "1cf6xx2hiy1xalp35fh8g73j67r0w0g66jpcbc6971x9jbm7bvjy";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  postInstall = ''
+    wrapProgram $out/bin/rename \
+      --prefix PERL5LIB : $out/lib/perl5/site_perl
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Perl extension for renaming multiple files";
+    homepage = http://search.cpan.org/~rmbarker;
+    license = licenses.artistic1;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+}
diff --git a/pkgs/tools/filesystems/idsk/default.nix b/pkgs/tools/filesystems/idsk/default.nix
new file mode 100644
index 000000000000..617457f55b61
--- /dev/null
+++ b/pkgs/tools/filesystems/idsk/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+
+  repo = "idsk";
+  version = "unstable-2018-02-11";
+  rev = "1846729ac3432aa8c2c0525be45cfff8a513e007";
+  name = "${repo}-${version}";
+
+  meta = with stdenv.lib; {
+    description = "Manipulating CPC dsk images and files";
+    homepage = https://github.com/cpcsdk/idsk ;
+    license = "unknown";
+    maintainers = [ maintainers.genesis ];
+    platforms = platforms.linux;
+  };
+
+  src = fetchFromGitHub {
+    inherit rev repo;
+    owner = "cpcsdk";
+    sha256 = "0d891lvf2nc8bys8kyf69k54rf3jlwqrcczbff8xi0w4wsiy5ckv";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp iDSK $out/bin
+  '';
+}
diff --git a/pkgs/tools/filesystems/mergerfs/default.nix b/pkgs/tools/filesystems/mergerfs/default.nix
index 929c6690a269..a97f67b1b9e8 100644
--- a/pkgs/tools/filesystems/mergerfs/default.nix
+++ b/pkgs/tools/filesystems/mergerfs/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "mergerfs-${version}";
-  version = "2.23.0";
+  version = "2.23.1";
 
   # not using fetchFromGitHub because of changelog being built with git log
   src = fetchgit {
     url = "https://github.com/trapexit/mergerfs";
     rev = "refs/tags/${version}";
-    sha256 = "0k4nn0f4c355q7hnni7iia8qi9m0khvyd04hx1hmlrnf0zsi9mfw";
+    sha256 = "0kbw64fkp3pjc7qm3y1q0ja20v3lhxi0nsq6gd19rq3m7ch9hcgl";
     deepClone = true;
     leaveDotGit = true;
   };
diff --git a/pkgs/tools/filesystems/nixpart/0.4/pyblock.nix b/pkgs/tools/filesystems/nixpart/0.4/pyblock.nix
index 3ed145c82f2d..6fb9bd98fb36 100644
--- a/pkgs/tools/filesystems/nixpart/0.4/pyblock.nix
+++ b/pkgs/tools/filesystems/nixpart/0.4/pyblock.nix
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
   md5_path = "f6d33a8362dee358517d0a9e2ebdd044";
 
   src = fetchurl rec {
-    url = "http://pkgs.fedoraproject.org/repo/pkgs/python-pyblock/"
+    url = "http://src.fedoraproject.org/repo/pkgs/python-pyblock/"
         + "${name}.tar.bz2/${md5_path}/${name}.tar.bz2";
     sha256 = "f6cef88969300a6564498557eeea1d8da58acceae238077852ff261a2cb1d815";
   };
diff --git a/pkgs/tools/filesystems/nixpart/0.4/pykickstart.nix b/pkgs/tools/filesystems/nixpart/0.4/pykickstart.nix
index 1da01bc2e607..b86c0e5229af 100644
--- a/pkgs/tools/filesystems/nixpart/0.4/pykickstart.nix
+++ b/pkgs/tools/filesystems/nixpart/0.4/pykickstart.nix
@@ -6,7 +6,7 @@ buildPythonApplication rec {
   md5_path = "d249f60aa89b1b4facd63f776925116d";
 
   src = fetchurl rec {
-    url = "http://pkgs.fedoraproject.org/repo/pkgs/pykickstart/"
+    url = "http://src.fedoraproject.org/repo/pkgs/pykickstart/"
         + "${name}.tar.gz/${md5_path}/${name}.tar.gz";
     sha256 = "e0d0f98ac4c5607e6a48d5c1fba2d50cc804de1081043f9da68cbfc69cad957a";
   };
diff --git a/pkgs/tools/filesystems/snapraid/default.nix b/pkgs/tools/filesystems/snapraid/default.nix
index 597be1b0f42f..279d6adf9a22 100644
--- a/pkgs/tools/filesystems/snapraid/default.nix
+++ b/pkgs/tools/filesystems/snapraid/default.nix
@@ -2,15 +2,17 @@
 
 stdenv.mkDerivation rec {
   name = "snapraid-${version}";
-  version = "11.1";
+  version = "11.2";
 
   src = fetchFromGitHub {
     owner = "amadvance";
     repo = "snapraid";
     rev = "v${version}";
-    sha256 = "1vgyiagn6qvyyz4jkf8pzlg0w9apb6mzza97a9x03p82fav2afx0";
+    sha256 = "01z8fl3x2j5bnm0rybj7hhch18is6dkwqc43yzwc6418spr4imsd";
   };
 
+  VERSION = version;
+
   doCheck = true;
 
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/pkgs/tools/graphics/graph-easy/default.nix b/pkgs/tools/graphics/graph-easy/default.nix
new file mode 100644
index 000000000000..e505f0bb6db5
--- /dev/null
+++ b/pkgs/tools/graphics/graph-easy/default.nix
@@ -0,0 +1,18 @@
+{ stdenv, buildPerlPackage, fetchurl }:
+
+buildPerlPackage rec {
+  name = "Graph-Easy-${version}";
+  version = "0.76";
+  src = fetchurl {
+    url = "mirror://cpan/authors/id/S/SH/SHLOMIF/${name}.tar.gz";
+    sha256 = "d4a2c10aebef663b598ea37f3aa3e3b752acf1fbbb961232c3dbe1155008d1fa";
+  };
+  
+  meta = with stdenv.lib; {
+    homepage = http://search.cpan.org/~tels/Graph-Easy/bin/graph-easy;
+    description = "Render/convert graphs in/from various formats";
+    license = licenses.gpl1;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.jensbin ];
+  };
+}
diff --git a/pkgs/tools/graphics/graphviz/base.nix b/pkgs/tools/graphics/graphviz/base.nix
index 8a46b302dcdf..f61c7923d794 100644
--- a/pkgs/tools/graphics/graphviz/base.nix
+++ b/pkgs/tools/graphics/graphviz/base.nix
@@ -31,7 +31,10 @@ stdenv.mkDerivation rec {
   CPPFLAGS = stdenv.lib.optionalString (xorg != null && stdenv.isDarwin)
     "-I${cairo.dev}/include/cairo";
 
-  configureFlags = optional (xorg == null) "--without-x";
+  configureFlags = [
+    "--with-ltdl-lib=${libtool.lib}/lib"
+    "--with-ltdl-include=${libtool}/include"
+  ] ++ stdenv.lib.optional (xorg == null) [ "--without-x" ];
 
   postPatch = ''
     for f in $(find . -name Makefile.in); do
diff --git a/pkgs/tools/graphics/oxipng/default.nix b/pkgs/tools/graphics/oxipng/default.nix
new file mode 100644
index 000000000000..1a2b5b19e37a
--- /dev/null
+++ b/pkgs/tools/graphics/oxipng/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchFromGitHub, rustPlatform }:
+
+rustPlatform.buildRustPackage rec {
+  version = "1.0.0";
+  name = "oxipng-${version}";
+
+  src = fetchFromGitHub {
+    owner = "shssoichiro";
+    repo = "oxipng";
+    rev = "v${version}";
+    sha256 = "1w3y9qy72sfz6zv1iizp843fd39rf1qfh7b9mllbn5w8w4hd658w";
+  };
+
+  cargoSha256 = "0mj45svb0nly3cl5d1fmm7nh2zswxpgb56g9xnb4cks5186sn5fi";
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/shssoichiro/oxipng;
+    description = "A lossless PNG compression optimizer";
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/graphics/pngquant/default.nix b/pkgs/tools/graphics/pngquant/default.nix
index 992e66965f8d..b53a07bcfadf 100644
--- a/pkgs/tools/graphics/pngquant/default.nix
+++ b/pkgs/tools/graphics/pngquant/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   name = "pngquant-${version}";
-  version = "2.9.1";
+  version = "2.11.7";
 
   src = fetchgit {
     url = "https://www.github.com/pornel/pngquant.git";
     rev = "refs/tags/${version}";
-    sha256 = "0xhnrjsk55jy5q68f81y7l61c6x18i4fzkm3i4dgndrhri5g4n1q";
+    sha256 = "1qr5qr2wznzp0v9xwyz4r3982rcm9kys913w8gwmv7qd1akvx2qh";
     fetchSubmodules = true;
   };
 
diff --git a/pkgs/tools/graphics/vips/default.nix b/pkgs/tools/graphics/vips/default.nix
index 4fb16b497176..c50d7ec8fad9 100644
--- a/pkgs/tools/graphics/vips/default.nix
+++ b/pkgs/tools/graphics/vips/default.nix
@@ -1,20 +1,22 @@
-{ stdenv, fetchurl, pkgconfig, glib, libxml2, flex, bison, vips,
+{ stdenv, fetchurl, pkgconfig, glib, libxml2, flex, bison, vips, expat,
   fftw, orc, lcms, imagemagick, openexr, libtiff, libjpeg, libgsf, libexif,
   python27, libpng, matio ? null, cfitsio ? null, libwebp ? null
 }:
 
 stdenv.mkDerivation rec {
-  name = "vips-8.3.1";
+  name = "vips-${version}";
+  version = "8.6.2";
 
   src = fetchurl {
-    url = "http://www.vips.ecs.soton.ac.uk/supported/current/${name}.tar.gz";
-    sha256 = "01hh1baar2r474kny24fcq6ddshcvq104207mqxnkis0as6pzjq9";
+    url = "https://github.com/jcupitt/libvips/releases/download/v${version}/${name}.tar.gz";
+    sha256 = "18hjwk000w49yjjb41qrk4s39mr1xccisrvwy2x063vyjbdbr1ll";
   };
 
   buildInputs =
     [ pkgconfig glib libxml2 fftw orc lcms
       imagemagick openexr libtiff libjpeg
       libgsf libexif python27 libpng
+      expat
     ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix
index 227e17347c1f..929cdb30b919 100644
--- a/pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix
+++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix
@@ -1,22 +1,16 @@
-{ stdenv, fetchurl, fetchpatch, cmake, fcitx, gettext }:
+{ stdenv, fetchurl, cmake, fcitx, gettext }:
 
 stdenv.mkDerivation rec {
   name = "fcitx-table-other-${version}";
-  version = "0.2.3";
+  version = "0.2.4";
 
   src = fetchurl {
     url = "http://download.fcitx-im.org/fcitx-table-other/${name}.tar.xz";
-    sha256 = "12fqbsjrpx5pndx2jf7fksrlp01a4yxz62h2vpxrbkpk73ljly4v";
+    sha256 = "1di60lr6l5k2sdwi3yrc0hl89j2k0yipayrsn803vd040w1fgfhq";
   };
 
   buildInputs = [ cmake fcitx gettext ];
 
-  patches = [
-    (fetchpatch { url = https://sources.debian.net/data/main/f/fcitx-table-other/0.2.3-3/debian/patches/0001-table-other-fix-build.patch;
-                  sha256 = "06n1df9szfgfjm5al8r1mvp4cib5h0cm601kwngl6k1vqyyjzg1j";
-                })
-  ];
-
   preInstall = ''
    substituteInPlace tables/cmake_install.cmake \
       --replace ${fcitx} $out
diff --git a/pkgs/tools/inputmethods/interception-tools/default.nix b/pkgs/tools/inputmethods/interception-tools/default.nix
index 77ac02649ad3..33fea9705acd 100644
--- a/pkgs/tools/inputmethods/interception-tools/default.nix
+++ b/pkgs/tools/inputmethods/interception-tools/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, cmake, libyamlcppWithoutBoost,
+{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, cmake, libyamlcpp,
   libevdev, libudev }:
 
 let
@@ -12,8 +12,8 @@ in stdenv.mkDerivation {
     sha256 = "14g4pphvylqdb922va322z1pbp12ap753hcf7zf9sii1ikvif83j";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ cmake libevdev libudev libyamlcppWithoutBoost ];
+  nativeBuildInputs = [ cmake pkgconfig ];
+  buildInputs = [ libevdev libudev libyamlcpp ];
 
   prePatch = ''
     substituteInPlace CMakeLists.txt --replace \
diff --git a/pkgs/tools/misc/autojump/default.nix b/pkgs/tools/misc/autojump/default.nix
index 817510bfb761..ba38a55dda02 100644
--- a/pkgs/tools/misc/autojump/default.nix
+++ b/pkgs/tools/misc/autojump/default.nix
@@ -22,6 +22,9 @@ in
       mkdir -p "$out/etc/bash_completion.d"
       cp -v $out/share/autojump/autojump.bash "$out/etc/bash_completion.d"
 
+      mkdir -p $out/share/fish/vendor_completions.d/
+      cp -v $out/share/autojump/autojump.fish "$out/share/fish/vendor_completions.d/autojump.fish"
+
       cat <<SCRIPT > $out/bin/autojump-share
       #!/bin/sh
       # Run this script to find the autojump shared folder where all the shell
diff --git a/pkgs/tools/misc/autorandr/default.nix b/pkgs/tools/misc/autorandr/default.nix
index 405eb29f6bf9..db2e1fc622fa 100644
--- a/pkgs/tools/misc/autorandr/default.nix
+++ b/pkgs/tools/misc/autorandr/default.nix
@@ -2,19 +2,23 @@
 , python3Packages
 , fetchFromGitHub
 , systemd
-, xrandr
-, makeWrapper }:
+, xrandr }:
 
 let
   python = python3Packages.python;
-  wrapPython = python3Packages.wrapPython;
-  version = "1.1";
+  version = "1.4";
 in
   stdenv.mkDerivation {
     name = "autorandr-${version}";
 
     buildInputs = [ python ];
-    nativeBuildInputs = [ makeWrapper ];
+
+    # no wrapper, as autorandr --batch does os.environ.clear()
+    buildPhase = ''
+      substituteInPlace autorandr.py \
+        --replace 'os.popen("xrandr' 'os.popen("${xrandr}/bin/xrandr' \
+        --replace '["xrandr"]' '["${xrandr}/bin/xrandr"]'
+    '';
 
     installPhase = ''
       runHook preInstall
@@ -40,16 +44,11 @@ in
       runHook postInstall
     '';
 
-    postFixup = ''
-      wrapProgram $out/bin/autorandr \
-        --prefix PATH : ${xrandr}/bin
-    '';
-
     src = fetchFromGitHub {
       owner = "phillipberndt";
       repo = "autorandr";
       rev = "${version}";
-      sha256 = "05jlzxlrdyd4j90srr71fv91c2hf32diw40n9rmybgcdvy45kygd";
+      sha256 = "08i71r221ilc8k1c59w89g3iq5m7zwhnjjzapavhqxlr8y9dcpf5";
     };
 
     meta = {
diff --git a/pkgs/tools/misc/bcunit/default.nix b/pkgs/tools/misc/bcunit/default.nix
index b1ca28a7ca9d..1c681d4986d7 100644
--- a/pkgs/tools/misc/bcunit/default.nix
+++ b/pkgs/tools/misc/bcunit/default.nix
@@ -2,13 +2,13 @@
 stdenv.mkDerivation rec {
   name = "${baseName}-${version}";
   baseName = "bcunit";
-  version = "3.0";
+  version = "3.0.2";
   buildInputs = [cmake];
   src = fetchFromGitHub {
     owner = "BelledonneCommunications";
     repo = "${baseName}";
     rev = "${version}";
-    sha256 = "1kdq9w8i3nypfz7d43rmv1csqrqpip9p8xfa7vyp52aqkmhrby9l";
+    sha256 = "063yl7kxkix76r49qrj0h1qpz2p538d1yw8aih0x4i47g35k00y7";
   };
 
   meta = {
diff --git a/pkgs/tools/misc/cloc/default.nix b/pkgs/tools/misc/cloc/default.nix
index a1c04f06d144..97c0251d9d64 100644
--- a/pkgs/tools/misc/cloc/default.nix
+++ b/pkgs/tools/misc/cloc/default.nix
@@ -1,21 +1,25 @@
-{ stdenv, fetchFromGitHub, makeWrapper, perl, AlgorithmDiff, RegexpCommon }:
+{ stdenv, fetchFromGitHub, makeWrapper, perl
+, AlgorithmDiff, ParallelForkManager, RegexpCommon
+}:
 
 stdenv.mkDerivation rec {
   name = "cloc-${version}";
-  version = "1.74";
+  version = "1.76";
 
   src = fetchFromGitHub {
     owner = "AlDanial";
     repo = "cloc";
-    rev = version;
-    sha256 = "1ihma4f6f92jp1mvzr4rjrgyh9m5wzrlxngaxfn7g0a8r2kyi65b";
+    rev = "v${version}";
+    sha256 = "03z4ar959ximsddd92zchi013lh82ganzisk309y3b09q10hl9k7";
   };
 
   setSourceRoot = ''
     sourceRoot=$(echo */Unix)
   '';
 
-  buildInputs = [ makeWrapper perl AlgorithmDiff RegexpCommon ];
+  buildInputs = [
+    makeWrapper perl AlgorithmDiff ParallelForkManager RegexpCommon
+  ];
 
   makeFlags = [ "prefix=" "DESTDIR=$(out)" "INSTALL=install" ];
 
diff --git a/pkgs/tools/misc/ddccontrol/default.nix b/pkgs/tools/misc/ddccontrol/default.nix
index 45995f02c689..b03a286d2022 100644
--- a/pkgs/tools/misc/ddccontrol/default.nix
+++ b/pkgs/tools/misc/ddccontrol/default.nix
@@ -1,9 +1,10 @@
 { stdenv, fetchurl, autoreconfHook, intltool, perl, perlPackages, libxml2
 , pciutils, pkgconfig, gtk2, ddccontrol-db
+, makeDesktopItem
 }:
 
 let version = "0.4.2"; in
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   name = "ddccontrol-${version}";
 
   src = fetchurl {
@@ -32,6 +33,24 @@ stdenv.mkDerivation {
       sed -e "s/chmod 4711/chmod 0711/" -i src/ddcpci/Makefile*
   '';
 
+  postInstall = ''
+    mkdir -p $out/share/applications/
+    cp $desktopItem/share/applications/* $out/share/applications/
+    for entry in $out/share/applications/*.desktop; do
+      substituteAllInPlace $entry
+    done
+  '';
+
+  desktopItem = makeDesktopItem {
+    name = "gddccontrol";
+    desktopName = "gddccontrol";
+    genericName = "DDC/CI control";
+    comment = meta.description;
+    exec = "@out@/bin/gddccontrol";
+    icon = "gddccontrol";
+    categories = "Settings;HardwareSettings;";
+  };
+
   meta = with stdenv.lib; {
     description = "A program used to control monitor parameters by software";
     homepage = http://ddccontrol.sourceforge.net/;
diff --git a/pkgs/tools/misc/edid-decode/default.nix b/pkgs/tools/misc/edid-decode/default.nix
new file mode 100644
index 000000000000..e4968b12e6cc
--- /dev/null
+++ b/pkgs/tools/misc/edid-decode/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchgit }:
+let
+  version = "2017-09-18";
+in stdenv.mkDerivation rec {
+  name = "edid-decode-unstable-${version}";
+
+  src = fetchgit {
+    url = "git://anongit.freedesktop.org/xorg/app/edid-decode";
+    rev = "f56f329ed23a25d002352dedba1e8f092a47286f";
+    sha256 = "1qzaq342dsdid0d99y7kj60p6bzgp2zjsmspyckddc68mmz4cs9n";
+  };
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp edid-decode $out/bin
+  '';
+
+  meta = {
+    description = "EDID decoder and conformance tester";
+    homepage = http://cgit.freedesktop.org/xorg/app/edid-decode/;
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.chiiruno ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
+
diff --git a/pkgs/tools/misc/fd/default.nix b/pkgs/tools/misc/fd/default.nix
index 2681d14665cb..3c8262068693 100644
--- a/pkgs/tools/misc/fd/default.nix
+++ b/pkgs/tools/misc/fd/default.nix
@@ -2,13 +2,13 @@
 
 rustPlatform.buildRustPackage rec {
   name = "fd-${version}";
-  version = "6.2.0";
+  version = "6.3.0";
 
   src = fetchFromGitHub {
     owner = "sharkdp";
     repo = "fd";
     rev = "v${version}";
-    sha256 = "1l1p7jlrryd54jwwrwgvs4njr3r59m8xsh31z7db0bzpw3dk7n5k";
+    sha256 = "1q666k7rssjd2cbkm8bm2gsn5shlkh756qpam53kibi5ahrwa7dc";
   };
 
   cargoSha256 = "1dikix9d46f0ydi81ray2vdvsy6y326w8ql6c89zx0p9cjm8m83r";
@@ -17,9 +17,9 @@ rustPlatform.buildRustPackage rec {
     mkdir -p "$out/man/man1"
     cp "$src/doc/fd.1" "$out/man/man1"
 
-    mkdir -p "$out/share/"{bash-completion/completions,fish/completions,zsh/site-functions}
+    mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
     cp target/release/build/fd-find-*/out/fd.bash "$out/share/bash-completion/completions/"
-    cp target/release/build/fd-find-*/out/fd.fish "$out/share/fish/completions/"
+    cp target/release/build/fd-find-*/out/fd.fish "$out/share/fish/vendor_completions.d/"
     cp target/release/build/fd-find-*/out/_fd "$out/share/zsh/site-functions/"
   '';
 
@@ -33,6 +33,7 @@ rustPlatform.buildRustPackage rec {
     '';
     homepage = "https://github.com/sharkdp/fd";
     license = with licenses; [ asl20 /* or */ mit ];
+    maintainers = with maintainers; [ dywedir ];
     platforms = platforms.all;
   };
 }
diff --git a/pkgs/tools/misc/figlet/default.nix b/pkgs/tools/misc/figlet/default.nix
index f68ae1ec2455..86434847b4a2 100644
--- a/pkgs/tools/misc/figlet/default.nix
+++ b/pkgs/tools/misc/figlet/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, fetchpatch }:
 
 stdenv.mkDerivation {
   name = "figlet-2.2.5";
@@ -9,12 +9,17 @@ stdenv.mkDerivation {
     sha256 = "0za1ax15x7myjl8jz271ybly8ln9kb9zhm1gf6rdlxzhs07w925z";
   };
 
-  installPhase = "make prefix=$out install";
+  patches = [
+    (fetchpatch {
+      url = https://git.alpinelinux.org/cgit/aports/plain/main/figlet/musl-fix-cplusplus-decls.patch?h=3.4-stable&id=71776c73a6f04b6f671430f702bcd40b29d48399;
+      name = "musl-fix-cplusplus-decls.patch";
+      sha256 = "1720zgrfk9makznqkbjrnlxm7nnhk6zx7g458fv53337n3g3zn7j";
+    })
+  ];
 
-  preConfigure = ''
-    mkdir -p $out/{man/man6,bin}
-    makeFlags="DESTDIR=$out/bin MANDIR=$out/man/man6 DEFAULTFONTDIR=$out/share/figlet CC=cc LD=cc"
-  '';
+  makeFlags = [ "prefix=$(out)" "CC:=$(CC)" "LD:=$(CC)" ];
+
+  doCheck = true;
 
   meta = {
     description = "Program for making large letters out of ordinary text";
diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix
index 4eef3f7a9d59..f79720289bf5 100644
--- a/pkgs/tools/misc/findutils/default.nix
+++ b/pkgs/tools/misc/findutils/default.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
   doCheck
     =  !hostPlatform.isDarwin
     && !(hostPlatform.libc == "glibc" && hostPlatform.isi686)
+    && (hostPlatform.libc != "musl")
     && hostPlatform == buildPlatform;
 
   outputs = [ "out" "info" ];
diff --git a/pkgs/tools/misc/geteltorito/default.nix b/pkgs/tools/misc/geteltorito/default.nix
index 7336665594a7..b95c7179141d 100644
--- a/pkgs/tools/misc/geteltorito/default.nix
+++ b/pkgs/tools/misc/geteltorito/default.nix
@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
   meta = with stdenv.lib; {
     description = "Extract the initial/default boot image from a CD image if existent";
     homepage = https://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/;
-    maintainers = [ maintainers.profpatsch ];
+    maintainers = [ maintainers.Profpatsch ];
     license = licenses.gpl2;
   };
 
diff --git a/pkgs/tools/misc/hyperfine/default.nix b/pkgs/tools/misc/hyperfine/default.nix
new file mode 100644
index 000000000000..322151739843
--- /dev/null
+++ b/pkgs/tools/misc/hyperfine/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, rustPlatform }:
+
+with rustPlatform;
+
+buildRustPackage rec {
+  name = "hyperfine-${version}";
+  version = "0.4.0";
+
+  src = fetchFromGitHub {
+    owner  = "sharkdp";
+    repo   = "hyperfine";
+    rev    = "refs/tags/v${version}";
+    sha256 = "1ynqyacbx0x971lyd1k406asms58bc7vzl8gca3sg34rx0hx3wzi";
+  };
+
+  cargoSha256 = "109yv1618bi19vh1jjv2ki06mafhcrv35a3a1zsr34kg3gsjv0rb";
+
+  meta = with stdenv.lib; {
+    description = "Command-line benchmarking tool";
+    homepage    = https://github.com/sharkdp/hyperfine;
+    license     = with licenses; [ asl20 /* or */ mit ];
+    maintainers = [ maintainers.thoughtpolice ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/pkgs/tools/misc/ipxe/default.nix b/pkgs/tools/misc/ipxe/default.nix
index 2d36ad17eec7..786b3992a5cc 100644
--- a/pkgs/tools/misc/ipxe/default.nix
+++ b/pkgs/tools/misc/ipxe/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchgit, perl, cdrkit, syslinux, xz, openssl }:
+{ stdenv, lib, fetchgit, perl, cdrkit, syslinux, xz, openssl
+, embedScript ? null
+}:
 
 let
   date = "20170922";
@@ -24,7 +26,7 @@ stdenv.mkDerivation {
   makeFlags =
     [ "ECHO_E_BIN_ECHO=echo" "ECHO_E_BIN_ECHO_E=echo" # No /bin/echo here.
       "ISOLINUX_BIN_LIST=${syslinux}/share/syslinux/isolinux.bin"
-    ];
+    ] ++ lib.optional (embedScript != null) "EMBED=${embedScript}";
 
 
   enabledOptions = [ "DOWNLOAD_PROTO_HTTPS" ];
@@ -46,6 +48,8 @@ stdenv.mkDerivation {
     ln -s undionly.kpxe $out/undionly.kpxe.0
   '';
 
+  enableParallelBuilding = true;
+
   meta = with stdenv.lib;
     { description = "Network boot firmware";
       homepage = http://ipxe.org/;
diff --git a/pkgs/tools/misc/less/default.nix b/pkgs/tools/misc/less/default.nix
index 2907af43a296..57eeb39f5431 100644
--- a/pkgs/tools/misc/less/default.nix
+++ b/pkgs/tools/misc/less/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, ncurses, lessSecure ? false }:
 
 stdenv.mkDerivation rec {
-  name = "less-529";
+  name = "less-530";
 
   src = fetchurl {
     url = "http://www.greenwoodsoftware.com/less/${name}.tar.gz";
-    sha256 = "02wspzv90cki8936m50qxk0vrribvwwqlva21nyvfx41qga2r96v";
+    sha256 = "1qpj2z38c53qmvqn8jaa0kq26q989cfbfjj4y0s6z17l1amr2gsh";
   };
 
   configureFlags = [ "--sysconfdir=/etc" ] # Look for ‘sysless’ in /etc.
diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix
index d0cb9a223366..eadb736aeeb2 100644
--- a/pkgs/tools/misc/man-db/default.nix
+++ b/pkgs/tools/misc/man-db/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff, makeWrapper }:
+{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff, libiconv, makeWrapper, buildPackages }:
 
 stdenv.mkDerivation rec {
   name = "man-db-2.7.5";
@@ -11,8 +11,10 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "doc" ];
   outputMan = "out"; # users will want `man man` to work
 
-  nativeBuildInputs = [ pkgconfig makeWrapper ];
-  buildInputs = [ libpipeline db groff ];
+  nativeBuildInputs = [ pkgconfig makeWrapper groff ]
+    ++ stdenv.lib.optionals doCheck checkInputs;
+  buildInputs = [ libpipeline db groff ]; # (Yes, 'groff' is both native and build input)
+  checkInputs = [ libiconv /* for 'iconv' binary */ ];
 
   postPatch = ''
     substituteInPlace src/man_db.conf.in \
@@ -41,6 +43,18 @@ stdenv.mkDerivation rec {
     done
   '';
 
+  postFixup = stdenv.lib.optionalString (buildPackages.groff != groff) ''
+    # Check to make sure none of the outputs depend on build-time-only groff:
+    for outName in $outputs; do
+      out=''${!outName}
+      echo "Checking $outName(=$out) for references to build-time groff..."
+      if grep -r '${buildPackages.groff}' $out; then
+        echo "Found an erroneous dependency on groff ^^^" >&2
+        exit 1
+      fi
+    done
+  '';
+
   enableParallelBuilding = true;
 
   doCheck = true;
diff --git a/pkgs/tools/misc/massren/default.nix b/pkgs/tools/misc/massren/default.nix
new file mode 100644
index 000000000000..085e6f41a091
--- /dev/null
+++ b/pkgs/tools/misc/massren/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "massren-${version}";
+  version = "1.5.4";
+
+  src = fetchFromGitHub {
+    owner = "laurent22";
+    repo = "massren";
+    rev = "v${version}";
+    sha256 = "1bn6qy30kpxi3rkr3bplsc80xnhj0hgfl0qaczbg3zmykfmsl3bl";
+  };
+
+  goPackagePath = "github.com/laurent22/massren";
+
+  meta = with lib; {
+    description = "Easily rename multiple files using your text editor";
+    license = licenses.mit;
+    homepage = https://github.com/laurent22/massren;
+    maintainers = with maintainers; [ andrew-d ];
+  };
+}
diff --git a/pkgs/tools/misc/ministat/default.nix b/pkgs/tools/misc/ministat/default.nix
new file mode 100644
index 000000000000..7b9549a80fea
--- /dev/null
+++ b/pkgs/tools/misc/ministat/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchgit }:
+
+stdenv.mkDerivation rec {
+  name = "ministat-${version}";
+  version = "20150715-1";
+
+  src = fetchgit {
+    url = "https://git.decadent.org.uk/git/ministat.git";
+    rev = "refs/tags/debian/${version}";
+    sha256 = "1p4g0yqgsy4hiqhr8gqp8d38zxzrss5qz70s0bw3i2pg4w668k6f";
+  };
+
+  postPatch = ''
+    patch -p1 < debian/patches/fix-ctype-usage.patch
+    patch -p1 < debian/patches/not-bsd
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin $out/share/man/man1
+    cp ministat $out/bin
+    cp ministat.1 $out/share/man/man1/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Simple tool for statistical comparison of data sets";
+    homepage = https://git.decadent.org.uk/gitweb/?p=ministat.git;
+    license = licenses.beerware;
+    maintainers = [ maintainers.dezgeg ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/tools/misc/mktorrent/default.nix b/pkgs/tools/misc/mktorrent/default.nix
index 0e1d3b8f49f3..6f56267ebf72 100644
--- a/pkgs/tools/misc/mktorrent/default.nix
+++ b/pkgs/tools/misc/mktorrent/default.nix
@@ -25,6 +25,6 @@ stdenv.mkDerivation rec {
     homepage = http://mktorrent.sourceforge.net/;
     license = stdenv.lib.licenses.gpl2Plus;
     description = "Command line utility to create BitTorrent metainfo files";
-    maintainers = with stdenv.lib.maintainers; [viric profpatsch];
+    maintainers = with stdenv.lib.maintainers; [viric Profpatsch];
   };
 }
diff --git a/pkgs/tools/misc/mongodb-tools/default.nix b/pkgs/tools/misc/mongodb-tools/default.nix
index 7e24c955a806..a728450d76e5 100644
--- a/pkgs/tools/misc/mongodb-tools/default.nix
+++ b/pkgs/tools/misc/mongodb-tools/default.nix
@@ -3,7 +3,7 @@
 let
   tools = [
     "bsondump" "mongodump" "mongoexport" "mongofiles" "mongoimport"
-    "mongooplog" "mongorestore" "mongostat" "mongotop"
+    "mongoreplay" "mongorestore" "mongostat" "mongotop"
   ];
 in
 
@@ -11,7 +11,7 @@ with stdenv.lib;
 
 buildGoPackage rec {
   name = "mongo-tools-${version}";
-  version = "3.5.13";
+  version = "3.7.2";
   rev = "r${version}";
 
   goPackagePath = "github.com/mongodb/mongo-tools";
@@ -21,17 +21,18 @@ buildGoPackage rec {
     inherit rev;
     owner = "mongodb";
     repo = "mongo-tools";
-    sha256 = "00klm4pyx5k39nn4pmfrpnkqxdhbzm7lprgwxszpirzrarh2g164";
+    sha256 = "1y5hd4qw7422sqkj8vmy4agscvin3ck54r515bjrzn69iw73nhfl";
   };
 
-  goDeps = ./deps.nix;
-
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ openssl_1_0_2 libpcap ];
 
   # Mongodb incorrectly names all of their binaries main
   # Let's work around this with our own installer
   buildPhase = ''
+    # move vendored codes so nixpkgs go builder could find it
+    mv go/src/github.com/mongodb/mongo-tools/vendor/src/* go/src/github.com/mongodb/mongo-tools/vendor/
+
     runHook preBuild
     ${stdenv.lib.concatMapStrings (t: ''
       go build -o "$bin/bin/${t}" -tags ssl -ldflags "-s -w" $goPackagePath/${t}/main
diff --git a/pkgs/tools/misc/mongodb-tools/deps.nix b/pkgs/tools/misc/mongodb-tools/deps.nix
deleted file mode 100644
index 30de006db6f7..000000000000
--- a/pkgs/tools/misc/mongodb-tools/deps.nix
+++ /dev/null
@@ -1,182 +0,0 @@
-[
-  {
-    goPackagePath = "golang.org/x/sys";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/sys";
-      rev = "314a259e304ff91bd6985da2a7149bbf91237993";
-      sha256 = "0vya62c3kmhmqx6awlxx8hc84987xkym9rhs0q28vlhwk9kczdaa";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/crypto";
-    fetch = {
-      type = "git";
-      url = "https://github.com/golang/crypto";
-      rev = "1f22c0103821b9390939b6776727195525381532";
-      sha256 = "1acy12f396sr3lrnbcnym5q72qnlign5bagving41qijzjnc219m";
-    };
-  }
-  {
-    goPackagePath = "github.com/howeyc/gopass";
-    fetch = {
-      type = "git";
-      url = "https://github.com/howeyc/gopass";
-      rev = "bf9dde6d0d2c004a008c27aaee91170c786f6db8";
-      sha256 = "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/mgo.v2";
-    fetch = {
-      type = "git";
-      url = "https://github.com/10gen/mgo";
-      rev = "39b4000d99037e917f3a3b9d2dcab667a9ef284a";
-      sha256 = "1m0xgd3y32g15fhl204g2caarfi5rn41m8pyym0i2gl3jnv5zw99";
-    };
-  }
-  {
-    goPackagePath = "github.com/google/gopacket";
-    fetch = {
-      type = "git";
-      url = "https://github.com/google/gopacket";
-      rev = "93b782132903d1846aab74cb1f62e6138564949f";
-      sha256 = "0l5m5a8dnqbkhphyfq7anj5zv59s74q2l7i6w9r7xwysfiqyq335";
-    };
-  }
-  {
-    goPackagePath = "github.com/patrickmn/go-cache";
-    fetch = {
-      type = "git";
-      url = "https://github.com/patrickmn/go-cache";
-      rev = "1881a9bccb818787f68c52bfba648c6cf34c34fa";
-      sha256 = "1nd0kqijx6mrxb8wlh20bx73mwj0fqzla2sr68y6j6lz3fsy1fw2";
-    };
-  }
-  {
-    goPackagePath = "github.com/spacemonkeygo/openssl";
-    fetch = {
-      type = "git";
-      url = "https://github.com/10gen/openssl";
-      rev = "2692b9f6fa95e72c75f8d9ba76e49c5dfd2cf8e4";
-      sha256 = "16x2mx51977jrqw8d9hqhqmx892v2qf1k5xb01hhfklh58f527k2";
-    };
-  }
-  {
-    goPackagePath = "github.com/jtolds/gls";
-    fetch = {
-      type = "git";
-      url = "https://github.com/jtolds/gls";
-      rev = "8ddce2a84170772b95dd5d576c48d517b22cac63";
-      sha256 = "11rp9wbzkd71640rq0nwmgsddskx3qac8wzqz71ksdb7ixjj5fmj";
-    };
-  }
-  {
-    goPackagePath = "github.com/spacemonkeygo/spacelog";
-    fetch = {
-      type = "git";
-      url = "https://github.com/spacemonkeygo/spacelog";
-      rev = "f936fb050dc6b5fe4a96b485a6f069e8bdc59aeb";
-      sha256 = "00an6zlhjk5l0vk1zjzshhswsd0h4syi48n50hv0fcnbmpxc5hv2";
-    };
-  }
-  {
-    goPackagePath = "gopkg.in/tomb.v2";
-    fetch = {
-      type = "git";
-      url = "https://gopkg.in/tomb.v2";
-      rev = "14b3d72120e8d10ea6e6b7f87f7175734b1faab8";
-      sha256 = "1nza31jvkpka5431c4bdbirvjdy36b1b55sbzljqhqih25jrcjx5";
-    };
-  }
-  {
-    goPackagePath = "github.com/jtolds/gls";
-    fetch = {
-      type = "git";
-      url = "https://github.com/jtolds/gls";
-      rev = "8ddce2a84170772b95dd5d576c48d517b22cac63";
-      sha256 = "11rp9wbzkd71640rq0nwmgsddskx3qac8wzqz71ksdb7ixjj5fmj";
-    };
-  }
-  {
-    goPackagePath = "github.com/smartystreets/assertions";
-    fetch = {
-      type = "git";
-      url = "https://github.com/smartystreets/assertions";
-      rev = "287b4346dc4e71a038c346375a9d572453bc469b";
-      sha256 = "1nw9j9aircra68lbkp5bq4l8ayq4g3fvbb2x8qd2hg0vwgn5yaij";
-    };
-  }
-  {
-    goPackagePath = "github.com/smartystreets/goconvey";
-    fetch = {
-      type = "git";
-      url = "https://github.com/smartystreets/goconvey";
-      rev = "bf58a9a1291224109919756b4dcc469c670cc7e4";
-      sha256 = "1k8k6vvlpl5a19dbrywxjmcia36macjbajx2hb6ci64rdfyf5kz5";
-    };
-  }
-  {
-    goPackagePath = "github.com/jacobsa/oglematchers";
-    fetch = {
-      type = "git";
-      url = "https://github.com/jacobsa/oglematchers";
-      rev = "3ecefc49db07722beca986d9bb71ddd026b133f0";
-      sha256 = "0vrk5sfs1ymkg0gv5n5dn9x0kqiaw8gaapljj8q75mgrr1p5149y";
-    };
-  }
-  {
-    goPackagePath = "github.com/3rf/mongo-lint";
-    fetch = {
-      type = "git";
-      url = "https://github.com/3rf/mongo-lint";
-      rev = "3550fdcf1f43b89aaeabaa4559eaae6dc4407e42";
-      sha256 = "19b60a3i6kzssd15dg57y4bg49sw41idrsjdi8vr4j5lr5d7gviv";
-    };
-  }
-  {
-    goPackagePath = "github.com/mattn/go-runewidth";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mattn/go-runewidth";
-      rev = "d6bea18f789704b5f83375793155289da36a3c7f";
-      sha256 = "1hnigpn7rjbwd1ircxkyx9hvi0xmxr32b2jdy2jzw6b3jmcnz1fs";
-    };
-  }
-  {
-    goPackagePath = "github.com/10gen/escaper";
-    fetch = {
-      type = "git";
-      url = "https://github.com/10gen/escaper";
-      rev = "17fe61c658dcbdcbf246c783f4f7dc97efde3a8b";
-      sha256 = "1iw86lg8ad5gdm46ryf4v431ix834l52lrjvcahq3c4dw1ylnbvl";
-    };
-  }
-  {
-    goPackagePath = "github.com/golang/snappy";
-    fetch = {
-      type = "git";
-      url = "https://github.com/golang/snappy";
-      rev = "d9eb7a3d35ec988b8585d4a0068e462c27d28380";
-      sha256 = "0wynarlr1y8sm9y9l29pm9dgflxriiialpwn01066snzjxnpmbyn";
-    };
-  }
-  {
-    goPackagePath = "github.com/nsf/termbox-go";
-    fetch = {
-      type = "git";
-      url = "https://github.com/nsf/termbox-go";
-      rev = "0723e7c3d0a317dea811f0fbe4d6edd81908c971";
-      sha256 = "1ak35nhlgjpbpnh7v9qvjyfsq52liz3niqfqva76p7a68pblwbr7";
-    };
-  }
-  {
-    goPackagePath = "github.com/jessevdk/go-flags";
-    fetch = {
-      type = "git";
-      url = "https://github.com/jessevdk/go-flags";
-      rev = "97448c91aac742cbca3d020b3e769013a420a06f";
-      sha256 = "0fv3yxvq8m3639a279hq4pf0c52ngqfl5n1vklcfympndrb7zjzj";
-    };
-  }
-]
diff --git a/pkgs/tools/misc/mprime/default.nix b/pkgs/tools/misc/mprime/default.nix
index 3ef039507d4e..556d21ee2fc7 100644
--- a/pkgs/tools/misc/mprime/default.nix
+++ b/pkgs/tools/misc/mprime/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, unzip, pkgconfig, curl }:
+{ stdenv, lib, fetchurl, unzip, curl, hwloc, gmp }:
 
 let
   srcDir =
@@ -14,25 +14,24 @@ let
     else throwSystem;
 in
 
-stdenv.mkDerivation {
-  name = "mprime-28.7";
+stdenv.mkDerivation rec {
+  name = "mprime-${version}";
+  version = "29.4b7";
 
   src = fetchurl {
-    url = http://www.mersenne.org/ftp_root/gimps/p95v287.source.zip;
-    sha256 = "1k3gxhs3g8hfghzpmidhcwpwyayj8r83v8zjai1z4xgsql4jwby1";
+    url = "http://www.mersenne.org/ftp_root/gimps/p95v${lib.replaceStrings ["."] [""] version}.source.zip";
+    sha256 = "0idaqm46m4yis7vl014scx57lpccvjbnyy79gmj8caxghyajws0m";
   };
 
-  unpackCmd = "unzip -d src -q $curSrc";
+  unpackCmd = "unzip -d src -q $curSrc || true";
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ unzip curl ];
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ curl hwloc gmp ];
 
   patches = [ ./makefile.patch ];
 
   buildPhase = ''
     make -C gwnum -f ${gwnum}
-    echo 'override CFLAGS := $(CFLAGS)' $(pkg-config --cflags libcurl) >> ${srcDir}/makefile
-    echo 'override LIBS := $(LIBS)' $(pkg-config --libs libcurl) >> ${srcDir}/makefile
     make -C ${srcDir}
   '';
 
@@ -48,7 +47,7 @@ stdenv.mkDerivation {
       client. It is identical to Prime95 in functionality, except it lacks a
       graphical user interface.
     '';
-    homepage = http://www.mersenne.org/;
+    homepage = "http://www.mersenne.org/";
     # Unfree, because of a license requirement to share prize money if you find
     # a suitable prime. http://www.mersenne.org/legal/#EULA
     license = stdenv.lib.licenses.unfree;
diff --git a/pkgs/tools/misc/mprime/makefile.patch b/pkgs/tools/misc/mprime/makefile.patch
index 7f758af7b7c4..6ed9cf69384d 100644
--- a/pkgs/tools/misc/mprime/makefile.patch
+++ b/pkgs/tools/misc/mprime/makefile.patch
@@ -1,46 +1,41 @@
-diff -ru orig/linux/makefile patched/linux/makefile
---- orig/linux/makefile	2015-08-09 21:06:18.000000000 +0100
-+++ patched/linux/makefile	2016-02-16 16:25:45.988662423 +0000
-@@ -25,8 +25,8 @@
+diff -dur src.old/linux/makefile src.new/linux/makefile
+--- src.old/linux/makefile	2018-01-04 20:49:00.000000000 +0300
++++ src.new/linux/makefile	2018-02-15 12:32:02.913011604 +0300
+@@ -28,8 +28,8 @@
  CPP = g++
  CPPFLAGS = -I.. -I../gwnum -O2 -march=i486 -malign-double
  
 -LFLAGS = -Wl,-M -Wl,-L/usr/local/lib
--LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl
+-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl -lgmp
 +LFLAGS =
-+LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lrt -lstdc++ -ldl
++LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lhwloc -lcurl -lrt -lstdc++ -ldl -lgmp
  
  FACTOROBJ = factor32.o
  LINUXOBJS = prime.o menu.o
-diff -ru orig/linux64/makefile patched/linux64/makefile
---- orig/linux64/makefile	2015-08-09 21:06:20.000000000 +0100
-+++ patched/linux64/makefile	2016-02-16 16:25:57.076531585 +0000
-@@ -13,13 +13,13 @@
- #	LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic $(shell pkg-config --static --libs libcurl) -lstdc++ -Wl,-Bdynamic -ldl
- 
- CC = gcc
--CFLAGS = -I.. -I../gwnum -I/usr/local/include -DX86_64 -O2 
-+CFLAGS = -I.. -I../gwnum -I/usr/local/include -DX86_64 -O2
- 
+diff -dur src.old/linux64/makefile src.new/linux64/makefile
+--- src.old/linux64/makefile	2018-01-04 20:49:00.000000000 +0300
++++ src.new/linux64/makefile	2018-02-15 12:32:28.836286995 +0300
+@@ -26,9 +26,9 @@
  CPP = g++
  CPPFLAGS = -I.. -I../gwnum -DX86_64 -O2
  
 -LFLAGS = -Wl,-M -Wl,-L/usr/local/lib
--LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl
 +LFLAGS =
-+LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lrt -lstdc++ -ldl
+ #LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -lz -lxml2 -ldl -lgmp
+-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl -lgmp
++LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -lhwloc -lcurl -lrt -lstdc++ -ldl -lgmp
  
  FACTOROBJ = factor64.o
  LINUXOBJS = prime.o menu.o
-diff -ru orig/macosx64/makefile patched/macosx64/makefile
---- orig/macosx64/makefile	2015-08-09 21:06:22.000000000 +0100
-+++ patched/macosx64/makefile	2016-02-16 16:19:03.988415925 +0000
-@@ -10,7 +10,7 @@
+diff -dur src.old/macosx64/makefile src.new/macosx64/makefile
+--- src.old/macosx64/makefile	2018-01-04 20:49:02.000000000 +0300
++++ src.new/macosx64/makefile	2018-02-15 12:33:32.401902535 +0300
+@@ -12,7 +12,7 @@
+ CPP = g++
  CPPFLAGS = -I.. -I../gwnum -I../linux -O2 -DX86_64 -DCOMMAND_LINE_MPRIME -m64
  
- LFLAGS = -m64 -Wl,-no_pie
--LIBS   = ../gwnum/amd64/release/gwnum.a -lm -lpthread -lcurl -framework IOKit -framework CoreFoundation -lstdc++
-+LIBS   = ../gwnum/amd64/release/gwnum.a -lm -lpthread -framework IOKit -framework CoreFoundation -lstdc++
+-LFLAGS = -m64 -Wl,-no_pie -L/usr/local/lib
++LFLAGS = -m64 -Wl,-no_pie
+ LIBS   = ../gwnum/amd64/release/gwnum.a -lm -lpthread -lhwloc -lcurl -framework IOKit -framework CoreFoundation -lstdc++ -lgmp
  
  FACTOROBJ = ../prime95/macosx64/factor64.o
- OBJS = prime.o menu.o
diff --git a/pkgs/tools/misc/otfcc/default.nix b/pkgs/tools/misc/otfcc/default.nix
index 8e2ecdcd6bbb..052999033a1e 100644
--- a/pkgs/tools/misc/otfcc/default.nix
+++ b/pkgs/tools/misc/otfcc/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "otfcc-${version}";
-  version = "0.8.6";
+  version = "0.9.6";
 
   src = fetchFromGitHub {
     owner = "caryll";
     repo = "otfcc";
     rev = "v${version}";
-    sha256 = "0yy9awffxxs0cdlf0akld73ndnwmylxvplac4k6j7641m3vk1g8p";
+    sha256 = "1rnjfqqyc6d9nhlh8if9k37wk94mcwz4wf3k239v6idg48nrk10b";
   };
 
   nativeBuildInputs = [ premake5 ninja ];
diff --git a/pkgs/tools/misc/papis/default.nix b/pkgs/tools/misc/papis/default.nix
new file mode 100644
index 000000000000..de69712eb5ee
--- /dev/null
+++ b/pkgs/tools/misc/papis/default.nix
@@ -0,0 +1,44 @@
+{ buildPythonApplication, lib, fetchFromGitHub
+, argcomplete, arxiv2bib, beautifulsoup4, bibtexparser
+, configparser, habanero, papis-python-rofi, pylibgen
+, prompt_toolkit, pyparser, python_magic, pyyaml
+, requests, unidecode, urwid, vobject, tkinter
+, vim
+}:
+
+buildPythonApplication rec {
+  pname = "papis";
+  version = "0.5.2";
+
+  # Missing tests on Pypi
+  src = fetchFromGitHub {
+    owner = "alejandrogallo";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0cw6ajdaknijka3j2bkkkn0bcxqifk825kq0a0rdbbmc6661pgxb";
+  };
+
+  postPatch = "sed -i 's/configparser>=3.0.0/# configparser>=3.0.0/' setup.py";
+
+  propagatedBuildInputs = [
+    argcomplete arxiv2bib beautifulsoup4 bibtexparser
+    configparser habanero papis-python-rofi pylibgen
+    prompt_toolkit pyparser python_magic pyyaml
+    requests unidecode urwid vobject tkinter
+    vim
+  ];
+
+  # Papis tries to create the config folder under $HOME during the tests
+  preCheck = ''
+    mkdir -p check-phase
+    export HOME=$(pwd)/check-phase
+  '';
+
+
+  meta = {
+    description = "Powerful command-line document and bibliography manager";
+    homepage = http://papis.readthedocs.io/en/latest/;
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.nico202 ];
+  };
+}
diff --git a/pkgs/tools/misc/plotinus/default.nix b/pkgs/tools/misc/plotinus/default.nix
new file mode 100644
index 000000000000..41913f966534
--- /dev/null
+++ b/pkgs/tools/misc/plotinus/default.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, fetchFromGitHub
+, gettext
+, libxml2
+, pkgconfig
+, gtk3
+, cmake
+, ninja
+, vala
+, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  name = "plotinus-${version}";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "p-e-w";
+    repo = "plotinus";
+    rev = "v${version}";
+    sha256 = "19k6f6ivg4ab57m62g6fkg85q9sv049snmzq1fyqnqijggwshxfz";
+  };
+
+  nativeBuildInputs = [
+    pkgconfig
+    wrapGAppsHook
+    vala
+    cmake
+    ninja
+    gettext
+    libxml2
+  ];
+  buildInputs = [
+    gtk3
+  ];
+
+  meta = with stdenv.lib; {
+    description = "A searchable command palette in every modern GTK+ application";
+    homepage = https://github.com/p-e-w/plotinus;
+    maintainers = with maintainers; [ samdroid-apps ];
+    platforms = platforms.linux;
+    # No COPYING file, but headers in the source code
+    license = licenses.gpl3;
+  };
+}
diff --git a/pkgs/tools/misc/rename/default.nix b/pkgs/tools/misc/rename/default.nix
new file mode 100644
index 000000000000..e30c2e89349d
--- /dev/null
+++ b/pkgs/tools/misc/rename/default.nix
@@ -0,0 +1,18 @@
+{ stdenv, fetchFromGitHub, buildPerlPackage }:
+
+buildPerlPackage rec {
+  name = "rename-${version}";
+  version = "1.9";
+  src = fetchFromGitHub {
+    owner = "pstray";
+    repo = "rename";
+    rev = "d46f1d0ced25dc5849acb5d5974a3e2e9d97d536";
+    sha256 = "0qahs1cqfaci2hdf1xncrz4k0z5skkfr43apnm3kybs7za33apzw";
+  };
+  meta = with stdenv.lib; {
+    description = "Rename files according to a Perl rewrite expression";
+    homepage = http://search.cpan.org/~pederst/rename-1.9/bin/rename.PL;
+    maintainers = with maintainers; [ mkg ];
+    license = with licenses; [ gpl1Plus ];
+  };
+}
diff --git a/pkgs/tools/misc/roundup/default.nix b/pkgs/tools/misc/roundup/default.nix
new file mode 100644
index 000000000000..e24b1fce06ef
--- /dev/null
+++ b/pkgs/tools/misc/roundup/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, ronn, shocco }:
+
+stdenv.mkDerivation rec {
+  name = "roundup-${version}";
+  version = "0.0.6";
+
+  src = fetchFromGitHub {
+    owner = "bmizerany";
+    repo = "roundup";
+    rev = "v${version}";
+    sha256 = "0nxaqmbv8mdvq9wcaqxk6k5mr31i68jzxf1wxa6pp7xp4prwdc9z";
+  };
+
+  prePatch = ''
+    # Don't change $PATH
+    substituteInPlace configure --replace PATH= NIRVANA=
+    # There are only man pages in sections 1 and 5 \
+    substituteInPlace Makefile --replace "{1..9}" "1 5"
+  '';
+
+  nativeBuildInputs = [ ronn shocco ];
+
+  installTargets = [ "install" "install-man" ];
+
+  preInstall = ''
+    for i in 1 5; do
+      mkdir -p $out/share/man/man$i
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A unit testing tool for running test plans which are written in any POSIX shell";
+    homepage = http://bmizerany.github.io/roundup/;
+    license = licenses.mit;
+    maintainers = with maintainers; [ dotlambda ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/misc/screen/default.nix b/pkgs/tools/misc/screen/default.nix
index 156db640acdf..1753f52ab1b6 100644
--- a/pkgs/tools/misc/screen/default.nix
+++ b/pkgs/tools/misc/screen/default.nix
@@ -16,6 +16,13 @@ stdenv.mkDerivation rec {
     "--enable-colors256"
   ];
 
+  patches = stdenv.lib.optional stdenv.hostPlatform.isMusl
+    (fetchpatch {
+      url = https://gist.githubusercontent.com/yujinakayama/4608863/raw/76b9f89af5e5a2e97d9a0f36aac989fb56cf1447/gistfile1.diff;
+      sha256 = "0f9bf83p8zdxaa1pr75jyf5g8xr3r8kv7cyzzbpraa1q4j15ss1p";
+      stripLen = 1;
+    });
+
   buildInputs = [ ncurses ] ++ stdenv.lib.optional stdenv.isLinux pam
                             ++ stdenv.lib.optional stdenv.isDarwin utmp;
 
diff --git a/pkgs/tools/misc/screenfetch/default.nix b/pkgs/tools/misc/screenfetch/default.nix
index 9ef0c9ebdf7d..a9cd9d75de8e 100644
--- a/pkgs/tools/misc/screenfetch/default.nix
+++ b/pkgs/tools/misc/screenfetch/default.nix
@@ -3,14 +3,30 @@
 , darwin
 }:
 
-stdenv.mkDerivation {
-  name = "screenFetch-2016-10-11";
+let
+  path = lib.makeBinPath ([
+    coreutils gawk gnused findutils
+    gnugrep ncurses bc
+  ] ++ lib.optionals stdenv.isLinux [
+    procps
+    xdpyinfo
+    xprop
+  ] ++ lib.optionals stdenv.isDarwin (with darwin; [
+    adv_cmds
+    DarwinTools
+    system_cmds
+    "/usr" # some commands like defaults is not available to us
+  ]));
+
+in stdenv.mkDerivation rec {
+  name = "screenFetch-${version}";
+  version = "3.8.0";
 
   src = fetchFromGitHub {
-    owner = "KittyKatt";
-    repo = "screenFetch";
-    rev = "89e51f24018c89b3647deb24406a9af3a78bbe99";
-    sha256 = "0i2k261jj2s4sfhav7vbsd362pa0gghw6qhwafhmicmf8hq2a18v";
+    owner  = "KittyKatt";
+    repo   = "screenFetch";
+    rev    = "v${version}";
+    sha256 = "00ibv72cb7cqfpljyzgvajhbp0clqsqliz18nyv83bfy3gkf2qs8";
   };
 
   nativeBuildInputs = [ makeWrapper ];
@@ -18,40 +34,29 @@ stdenv.mkDerivation {
   installPhase = ''
     install -Dm 0755 screenfetch-dev $out/bin/screenfetch
     install -Dm 0644 screenfetch.1 $out/share/man/man1/screenfetch.1
+    install -Dm 0644 -t $out/share/doc/screenfetch CHANGELOG COPYING README.mkdn TODO
 
-    # Fix all of the depedencies of screenfetch
+    # Fix all of the dependencies of screenfetch
     patchShebangs $out/bin/screenfetch
     wrapProgram "$out/bin/screenfetch" \
-      --set PATH ${lib.makeBinPath ([
-        coreutils gawk gnused findutils
-        gnugrep ncurses bc
-      ] ++ lib.optionals stdenv.isLinux [
-        procps
-        xdpyinfo
-        xprop
-      ] ++ lib.optionals stdenv.isDarwin (with darwin; [
-        adv_cmds
-        DarwinTools
-        system_cmds
-        "/usr" # some commands like defaults is not available to us
-      ]))}
+      --prefix PATH : ${path}
   '';
 
   meta = with lib; {
     description = "Fetches system/theme information in terminal for Linux desktop screenshots";
     longDescription = ''
-    screenFetch is a "Bash Screenshot Information Tool". This handy Bash
-    script can be used to generate one of those nifty terminal theme
-    information + ASCII distribution logos you see in everyone's screenshots
-    nowadays. It will auto-detect your distribution and display an ASCII
-    version of that distribution's logo and some valuable information to the
-    right. There are options to specify no ascii art, colors, taking a
-    screenshot upon displaying info, and even customizing the screenshot
-    command! This script is very easy to add to and can easily be extended.
+      screenFetch is a "Bash Screenshot Information Tool". This handy Bash
+      script can be used to generate one of those nifty terminal theme
+      information + ASCII distribution logos you see in everyone's screenshots
+      nowadays. It will auto-detect your distribution and display an ASCII
+      version of that distribution's logo and some valuable information to the
+      right. There are options to specify no ascii art, colors, taking a
+      screenshot upon displaying info, and even customizing the screenshot
+      command! This script is very easy to add to and can easily be extended.
     '';
     license = licenses.gpl3;
-    homepage = http://git.silverirc.com/cgit.cgi/screenfetch-dev.git/;
-    maintainers = with maintainers; [relrod];
+    homepage = https://github.com/KittyKatt/screenFetch;
+    maintainers = with maintainers; [ relrod ];
     platforms = platforms.all;
   };
 }
diff --git a/pkgs/tools/misc/smenu/default.nix b/pkgs/tools/misc/smenu/default.nix
index f1493630a2a5..061a6c58d237 100644
--- a/pkgs/tools/misc/smenu/default.nix
+++ b/pkgs/tools/misc/smenu/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub, ncurses }:
 
 stdenv.mkDerivation rec {
-  version = "v0.9.10";
+  version = "v0.9.11";
   name = "smenu-${version}";
 
   src = fetchFromGitHub {
     owner  = "p-gen";
     repo   = "smenu";
     rev    = version;
-    sha256 = "1fh0s5zhx8ps760w0yxjv682lhahz1j63i0gdwvvr5vnvyx6c40d";
+    sha256 = "1va5gsxniin02casgdrqxvpzccm0vwjiql60qrsvncrq6nm6bz0d";
   };
 
   buildInputs = [ ncurses ];
diff --git a/pkgs/tools/misc/ultrastar-creator/default.nix b/pkgs/tools/misc/ultrastar-creator/default.nix
index 30473059d6d9..435a5850920a 100644
--- a/pkgs/tools/misc/ultrastar-creator/default.nix
+++ b/pkgs/tools/misc/ultrastar-creator/default.nix
@@ -35,6 +35,6 @@ stdenv.mkDerivation rec {
     description = "Ultrastar karaoke song creation tool";
     homepage = https://github.com/UltraStar-Deluxe/UltraStar-Creator;
     license = licenses.gpl2;
-    maintainers = with maintainers; [ profpatsch ];
+    maintainers = with maintainers; [ Profpatsch ];
   };
 }
diff --git a/pkgs/tools/misc/ultrastar-manager/default.nix b/pkgs/tools/misc/ultrastar-manager/default.nix
index af443661b6cd..d9739f7846b7 100644
--- a/pkgs/tools/misc/ultrastar-manager/default.nix
+++ b/pkgs/tools/misc/ultrastar-manager/default.nix
@@ -115,6 +115,6 @@ in stdenv.mkDerivation {
     description = "Ultrastar karaoke song manager";
     homepage = https://github.com/UltraStar-Deluxe/UltraStar-Manager;
     license = licenses.gpl2;
-    maintainers = with maintainers; [ profpatsch ];
+    maintainers = with maintainers; [ Profpatsch ];
   };
 }
diff --git a/pkgs/tools/misc/uudeview/default.nix b/pkgs/tools/misc/uudeview/default.nix
new file mode 100644
index 000000000000..e66580f25ffb
--- /dev/null
+++ b/pkgs/tools/misc/uudeview/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, tcl, tk }:
+
+stdenv.mkDerivation rec {
+  name = "uudeview-0.5.20";
+  src = fetchurl {
+    url = "http://www.fpx.de/fp/Software/UUDeview/download/${name}.tar.gz";
+    sha256 = "0dg4v888fxhmf51vxq1z1gd57fslsidn15jf42pj4817vw6m36p4";
+  };
+
+  buildInputs = [ tcl tk ];
+  hardeningDisable = [ "format" ];
+  configureFlags = [ "--enable-tk=${tk.dev}" "--enable-tcl=${tcl}" ];
+  postPatch = ''
+    substituteInPlace tcl/xdeview --replace "exec uuwish" "exec $out/bin/uuwish"
+  '';
+
+  meta = {
+    description = "The Nice and Friendly Decoder";
+    homepage = http://www.fpx.de/fp/Software/UUDeview/;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = with stdenv.lib.maintainers; [ woffs ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/tools/misc/vdirsyncer/default.nix b/pkgs/tools/misc/vdirsyncer/default.nix
index 382b69722a42..ad5b259eb77a 100644
--- a/pkgs/tools/misc/vdirsyncer/default.nix
+++ b/pkgs/tools/misc/vdirsyncer/default.nix
@@ -6,12 +6,12 @@ let
   pythonPackages = python3Packages;
 in
 pythonPackages.buildPythonApplication rec {
-  version = "0.16.3";
+  version = "0.16.4";
   name = "vdirsyncer-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/v/vdirsyncer/${name}.tar.gz";
-    sha256 = "0dpwbfi97ksijqng191659m8k0v215y8ld95w8gb126m4m96qpzw";
+    sha256 = "03wva48bgv1ad3df6plc9b8xxh6k8bcaxrhlzwh81c9mzn5bspzv";
   };
 
   propagatedBuildInputs = with pythonPackages; [
diff --git a/pkgs/tools/misc/watchexec/default.nix b/pkgs/tools/misc/watchexec/default.nix
new file mode 100644
index 000000000000..2b801bb74a42
--- /dev/null
+++ b/pkgs/tools/misc/watchexec/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, lib, rustPlatform, fetchFromGitHub }:
+
+with rustPlatform;
+
+buildRustPackage rec {
+  name = "watchexec-${version}";
+  version = "1.8.6";
+
+  src = fetchFromGitHub {
+    owner = "mattgreen";
+    repo = "watchexec";
+    rev = "${version}";
+    sha256 = "1jib51dbr6s1iq21inm2xfsjnz1730nyd3af1x977iqivmwdisax";
+  };
+
+  cargoSha256 = "0sm1jvx1y18h7y66ilphsqmkbdxc76xly8y7kxmqwdi4lw54i9vl";
+
+  meta = with stdenv.lib; {
+    description = "Executes commands in response to file modifications";
+    homepage = https://github.com/mattgreen/watchexec;
+    license = with licenses; [ asl20 ];
+    maintainers = [ maintainers.michalrus ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/tools/misc/yle-dl/default.nix b/pkgs/tools/misc/yle-dl/default.nix
index 2967892521ca..303722aac0b8 100644
--- a/pkgs/tools/misc/yle-dl/default.nix
+++ b/pkgs/tools/misc/yle-dl/default.nix
@@ -2,13 +2,13 @@
 
 pythonPackages.buildPythonApplication rec {
   name = "yle-dl-${version}";
-  version = "2.30";
+  version = "2.31";
 
   src = fetchFromGitHub {
     owner = "aajanki";
     repo = "yle-dl";
     rev = version;
-    sha256 = "08qqsg0rmp4xfzmla81f0a4vblqfw3rh90wvxm91vbm6937b4i7i";
+    sha256 = "0k93p9csyjm0w33diwl5s22kzs3g78jl3n9k8nxxpqrybfjl912f";
   };
 
   propagatedBuildInputs = with pythonPackages; [ lxml pyamf pycrypto requests future ffmpeg ];
diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix
index c4595a1a94e1..0386896d97f8 100644
--- a/pkgs/tools/misc/youtube-dl/default.nix
+++ b/pkgs/tools/misc/youtube-dl/default.nix
@@ -16,11 +16,11 @@ with stdenv.lib;
 buildPythonApplication rec {
 
   name = "youtube-dl-${version}";
-  version = "2018.01.27";
+  version = "2018.02.08";
 
   src = fetchurl {
     url = "https://yt-dl.org/downloads/${version}/${name}.tar.gz";
-    sha256 = "14vbm8pr6xdrdbk8j9k4v82rnalbdpk2lcm7n9wj6z6d441ymji9";
+    sha256 = "0iq5mav782gz0gm00rry3v7gdxkkx4y1k0p20pvz32ga4id5k1mg";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/tools/misc/zsh-autoenv/default.nix b/pkgs/tools/misc/zsh-autoenv/default.nix
new file mode 100644
index 000000000000..492b72a176ed
--- /dev/null
+++ b/pkgs/tools/misc/zsh-autoenv/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub, bash }:
+
+stdenv.mkDerivation rec {
+  name = "zsh-autoenv-${version}";
+  version = "2017-12-16";
+
+  src = fetchFromGitHub {
+    owner = "Tarrasch";
+    repo = "zsh-autoenv";
+    rev = "2c8cfbcea8e7286649840d7ec98d7e9d5e1d45a0";
+    sha256 = "004svkfzhc3ab6q2qvwzgj36wvicg5bs8d2gcibx6adq042di7zj";
+  };
+
+  buildPhase = ":";
+
+  installPhase = ''
+    mkdir -p $out/{bin,share}
+    cp -R $src $out/share/zsh-autoenv
+
+    cat <<SCRIPT > $out/bin/zsh-autoenv-share
+    #!${stdenv.shell}
+    # Run this script to find the fzf shared folder where all the shell
+    # integration scripts are living.
+    echo $out/share/zsh-autoenv
+    SCRIPT
+    chmod +x $out/bin/zsh-autoenv-share
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Automatically sources whitelisted .autoenv.zsh files";
+    longDescription = ''
+      zsh-autoenv automatically sources (known/whitelisted)
+      .autoenv.zsh files, typically used in project root directories.
+      It handles "enter" and "leave" events, nesting, and stashing of
+      variables (overwriting and restoring).
+    '';
+    homepage = https://github.com/Tarrasch/zsh-autoenv;
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/tools/networking/acme-client/default.nix b/pkgs/tools/networking/acme-client/default.nix
new file mode 100644
index 000000000000..1e10529082f5
--- /dev/null
+++ b/pkgs/tools/networking/acme-client/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, apple_sdk ? null
+, cacert
+, defaultCaFile ? "${cacert}/etc/ssl/certs/ca-bundle.crt"
+, fetchurl
+, libbsd
+, libressl
+, pkgconfig
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "acme-client-${version}";
+  version = "0.1.16";
+
+  src = fetchurl {
+    url = "https://kristaps.bsd.lv/acme-client/snapshots/acme-client-portable-${version}.tgz";
+    sha256 = "00q05b3b1dfnfp7sr1nbd212n0mqrycl3cr9lbs51m7ncaihbrz9";
+  };
+
+  buildInputs = [ libbsd libressl pkgconfig ]
+    ++ optional stdenv.isDarwin apple_sdk.sdk;
+
+  CFLAGS = "-DDEFAULT_CA_FILE='\"${defaultCaFile}\"'";
+
+  preConfigure = ''
+    export PREFIX="$out"
+  '';
+
+  meta = {
+    homepage = https://kristaps.bsd.lv/acme-client/;
+    description = "Secure ACME/Let's Encrypt client";
+    platforms = platforms.unix;
+    license = licenses.isc;
+    maintainers = with maintainers; [ pmahoney ];
+  };
+}
diff --git a/pkgs/tools/networking/arping/default.nix b/pkgs/tools/networking/arping/default.nix
new file mode 100644
index 000000000000..4358d22142d9
--- /dev/null
+++ b/pkgs/tools/networking/arping/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, libnet, libpcap }:
+
+stdenv.mkDerivation rec {
+  version = "2.19";
+  name = "arping-${version}";
+
+  buildInputs = [ libnet libpcap ];
+
+  src = fetchFromGitHub {
+    owner = "ThomasHabets";
+    repo = "arping";
+    rev = "arping-${version}";
+    sha256 = "10gpil6ic17x8v628vhz9s98rnw1k8ci2xs56i52pr103irirczw";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with stdenv.lib; {
+    description = "Broadcasts a who-has ARP packet on the network and prints answers";
+    homepage = https://github.com/ThomasHabets/arping;
+    license = with licenses; [ gpl2 ];
+    maintainers = [ maintainers.michalrus ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/tools/networking/biosdevname/default.nix b/pkgs/tools/networking/biosdevname/default.nix
index ae36980a60d8..93a98a10daad 100644
--- a/pkgs/tools/networking/biosdevname/default.nix
+++ b/pkgs/tools/networking/biosdevname/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "biosdevname-${version}";
-  version = "0.7.2";
+  version = "0.7.3";
 
   src = fetchFromGitHub {
     owner = "dell";
     repo = "biosdevname";
     rev = "v${version}";
-    sha256 = "183k6f9nayhai27y6nizf0sp9bj1kabykj66hcwdzllhrrh505sd";
+    sha256 = "19wbb79x9h79k55sgd4dylvdbhhrvfaiaknbw9s1wvfmirkxa1dz";
   };
 
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/pkgs/tools/networking/cjdns/default.nix b/pkgs/tools/networking/cjdns/default.nix
index d5819639fa2c..d16e730b5abf 100644
--- a/pkgs/tools/networking/cjdns/default.nix
+++ b/pkgs/tools/networking/cjdns/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchFromGitHub, nodejs, which, python27, utillinux }:
 
-let version = "20"; in
+let version = "20.1"; in
 stdenv.mkDerivation {
   name = "cjdns-"+version;
 
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
     owner = "cjdelisle";
     repo = "cjdns";
     rev = "cjdns-v${version}";
-    sha256 = "0gqcspiz1n0j711vwq807cy456dkcf03r376l04qc92173g2fzrx";
+    sha256 = "033q8av46y0q8vxyqvb4yjh1lz6a17mmk8lhdpwdcqnsws8xjjsw";
   };
 
   buildInputs = [ which python27 nodejs ] ++
diff --git a/pkgs/tools/networking/connman-ncurses/default.nix b/pkgs/tools/networking/connman-ncurses/default.nix
new file mode 100644
index 000000000000..8c4d4fa84865
--- /dev/null
+++ b/pkgs/tools/networking/connman-ncurses/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, dbus, json_c, ncurses, connman }:
+
+stdenv.mkDerivation rec {
+  name = "connman-ncurses-${version}";
+  version = "2015-07-21";
+
+  src = fetchFromGitHub {
+    owner = "eurogiciel-oss";
+    repo = "connman-json-client";
+    rev = "3c34b2ee62d2e188090d20e7ed2fd94bab9c47f2";
+    sha256 = "1831r0776fv481g8kgy1dkl750pzv47835dw11sslq2k6mm6i9p1";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+
+  buildInputs = [ dbus ncurses json_c connman ];
+
+  NIX_CFLAGS_COMPILE = "-Wno-error";
+  
+  installPhase = ''
+    mkdir -p "$out/bin"
+    cp -va connman_ncurses "$out/bin/"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Simple ncurses UI for connman";
+    homepage = https://github.com/eurogiciel-oss/connman-json-client;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.romildo ];
+  };
+}
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix
index 16b22e3f2554..dbe2a6639352 100644
--- a/pkgs/tools/networking/curl/default.nix
+++ b/pkgs/tools/networking/curl/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
   name = "curl-7.58.0";
 
   src = fetchurl {
-    url = "http://curl.haxx.se/download/${name}.tar.bz2";
+    url = "https://curl.haxx.se/download/${name}.tar.bz2";
     sha256 = "0cg7klhf1ksnbw5wvwa802qir877zv4y3dj7swz1xh07g3wq3c0w";
   };
 
diff --git a/pkgs/tools/networking/dhcp/default.nix b/pkgs/tools/networking/dhcp/default.nix
index e7a593ff830c..1812e95dcbb7 100644
--- a/pkgs/tools/networking/dhcp/default.nix
+++ b/pkgs/tools/networking/dhcp/default.nix
@@ -37,6 +37,8 @@ stdenv.mkDerivation rec {
     "--localstatedir=/var"
   ] ++ stdenv.lib.optionals (openldap != null) [ "--with-ldap" "--with-ldapcrypto" ];
 
+  NIX_CFLAGS_COMPILE = [ "-Wno-error=pointer-compare" ];
+
   installFlags = [ "DESTDIR=\${out}" ];
 
   postInstall =
diff --git a/pkgs/tools/networking/http-prompt/default.nix b/pkgs/tools/networking/http-prompt/default.nix
index fd7caf927653..b1f83c8b2161 100644
--- a/pkgs/tools/networking/http-prompt/default.nix
+++ b/pkgs/tools/networking/http-prompt/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub, pythonPackages, httpie }:
 
 pythonPackages.buildPythonApplication rec {
-  version = "0.11.0";
+  version = "0.11.1";
   name = "http-prompt";
 
   src = fetchFromGitHub {
     rev = "v${version}";
     repo = "http-prompt";
     owner = "eliangcs";
-    sha256 = "0arl85880nnyfx8cvpzm6cr8nalhyrkz5zqfr628p487rwqv45ip";
+    sha256 = "0gi76wcn6lxkd74ljpbyhr7ylhq6sm8z7h66dnfmpsw4nhw49178";
   };
 
   propagatedBuildInputs = with pythonPackages; [
diff --git a/pkgs/tools/networking/inetutils/default.nix b/pkgs/tools/networking/inetutils/default.nix
index ad058174cff1..c5ecb5eb6dad 100644
--- a/pkgs/tools/networking/inetutils/default.nix
+++ b/pkgs/tools/networking/inetutils/default.nix
@@ -15,7 +15,13 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ ncurses /* for `talk' */ perl /* for `whois' */ help2man ];
 
-  configureFlags = "--with-ncurses-include-dir=${ncurses.dev}/include";
+  configureFlags = [ "--with-ncurses-include-dir=${ncurses.dev}/include" ]
+  ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ # Musl doesn't define rcmd
+    "--disable-rcp"
+    "--disable-rsh"
+    "--disable-rlogin"
+    "--disable-rexec"
+  ];
 
   # Test fails with "UNIX socket name too long", probably because our
   # $TMPDIR is too long.
@@ -25,7 +31,7 @@ stdenv.mkDerivation rec {
   postInstall = ''
     # XXX: These programs are normally installed setuid but since it
     # fails, they end up being non-executable, hence this hack.
-    chmod +x $out/bin/{ping,ping6,rcp,rlogin,rsh,traceroute}
+    chmod +x $out/bin/{ping,ping6,${stdenv.lib.optionalString (!stdenv.hostPlatform.isMusl) ''rcp,rlogin,rsh,''}traceroute}
   '';
 
   meta = {
diff --git a/pkgs/tools/networking/iperf/3.nix b/pkgs/tools/networking/iperf/3.nix
index d69b52a50014..28b53a8c2477 100644
--- a/pkgs/tools/networking/iperf/3.nix
+++ b/pkgs/tools/networking/iperf/3.nix
@@ -1,15 +1,23 @@
-{ stdenv, fetchurl, openssl }:
+{ stdenv, fetchurl, openssl, fetchpatch }:
 
 stdenv.mkDerivation rec {
-  name = "iperf-3.3";
+  name = "iperf-3.4";
 
   src = fetchurl {
     url = "http://downloads.es.net/pub/iperf/${name}.tar.gz";
-    sha256 = "1n442bjkm1dvzmcj8z1i99yrmba489yz3f5v27ybymhh4mqn4nbg";
+    sha256 = "04ciywjhklzfrnp40675ssnkqxv90ad4v56i8vh8bpsiswr86lki";
   };
 
   buildInputs = [ openssl ];
 
+  patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
+    (fetchpatch {
+      url = "http://git.alpinelinux.org/cgit/aports/plain/main/iperf3/remove-pg-flags.patch";
+      name = "remove-pg-flags.patch";
+      sha256 = "0lnczhass24kgq59drgdipnhjnw4l1cy6gqza7f2ah1qr4q104rm";
+    })
+  ];
+
   postInstall = ''
     ln -s iperf3 $out/bin/iperf
   '';
diff --git a/pkgs/tools/networking/keepalived/default.nix b/pkgs/tools/networking/keepalived/default.nix
index fe8988dc41d9..140ea6860fc3 100644
--- a/pkgs/tools/networking/keepalived/default.nix
+++ b/pkgs/tools/networking/keepalived/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "keepalived-${version}";
-  version = "1.3.6";
+  version = "1.4.1";
 
   src = fetchFromGitHub {
     owner = "acassen";
     repo = "keepalived";
     rev = "v${version}";
-    sha256 = "05088vv510dlflzyg8sh8l8qfscnvxl6n6pw9ycp27zhb6r5cr5y";
+    sha256 = "1d3jnfhj9mpnc27wvgsiz2vr4lnvvccw3v128z16jpyibyv20ph0";
   };
 
   buildInputs = [
diff --git a/pkgs/tools/networking/minio-client/default.nix b/pkgs/tools/networking/minio-client/default.nix
index 303204c9c21e..7538c08249c0 100644
--- a/pkgs/tools/networking/minio-client/default.nix
+++ b/pkgs/tools/networking/minio-client/default.nix
@@ -1,39 +1,28 @@
-{ lib, stdenv, fetchurl, go }:
+{ stdenv, buildGoPackage, fetchFromGitHub }:
 
-stdenv.mkDerivation rec {
-  name = "minio-client-${shortVersion}";
+buildGoPackage rec {
+  name = "minio-client-${version}";
 
-  shortVersion = "20170206";
-  longVersion = "2017-02-06T20-16-19Z";
+  version = "2018-02-09T23-07-36Z";
 
-  src = fetchurl {
-    url = "https://github.com/minio/mc/archive/RELEASE.${lib.replaceStrings [":"] ["-"] longVersion}.tar.gz";
-    sha256 = "0k66kr7x669jvydcxp3rpvg8p9knhmcihpnjiqynhqgrdy16mr1f";
+  src = fetchFromGitHub {
+    owner = "minio";
+    repo = "mc";
+    rev = "RELEASE.${version}";
+    sha256 = "1mzjqcvl8740jkkrsyycwqminnd0vdl1m2mvq8hnywj8hs816bfd";
   };
 
-  buildInputs = [ go ];
+  goPackagePath = "github.com/minio/mc";
 
-  unpackPhase = ''
-    d=$TMPDIR/src/github.com/minio/mc
-    mkdir -p $d
-    tar xf $src -C $d --strip-component 1
-    export GOPATH=$TMPDIR
-    cd $d
-  '';
+  buildFlagsArray = [''-ldflags=
+    -X github.com/minio/mc/cmd.Version=${version}
+  ''];
 
-  buildPhase = ''
-    mkdir -p $out/bin
-    go build -o $out/bin/minio-client \
-      --ldflags "-X github.com/minio/mc/cmd.Version=${longVersion}"
-  '';
-
-  installPhase = "ln -s minio-client $out/bin/mc";
-
-  meta = {
+  meta = with stdenv.lib; {
     homepage = https://github.com/minio/mc;
     description = "A replacement for ls, cp, mkdir, diff and rsync commands for filesystems and object storage";
-    maintainers = [ lib.maintainers.eelco ];
-    platforms = lib.platforms.linux;
-    license = lib.licenses.asl20;
+    maintainers = with maintainers; [ eelco bachp ];
+    platforms = platforms.unix;
+    license = licenses.asl20;
   };
 }
diff --git a/pkgs/tools/networking/ntopng/default.nix b/pkgs/tools/networking/ntopng/default.nix
index d1a90d9d1aad..b307a8f6f131 100644
--- a/pkgs/tools/networking/ntopng/default.nix
+++ b/pkgs/tools/networking/ntopng/default.nix
@@ -53,6 +53,8 @@ stdenv.mkDerivation rec {
     sed 's|LIBS += -lstdc++.6||' -i Makefile
   '';
 
+  NIX_CFLAGS_COMPILE = [ "-fpermissive" ];
+
   meta = with stdenv.lib; {
     description = "High-speed web-based traffic analysis and flow collection tool";
     homepage = http://www.ntop.org/products/ntop/;
diff --git a/pkgs/tools/networking/openntpd/default.nix b/pkgs/tools/networking/openntpd/default.nix
index 7e1c257ec4b6..d63df830d0e6 100644
--- a/pkgs/tools/networking/openntpd/default.nix
+++ b/pkgs/tools/networking/openntpd/default.nix
@@ -12,6 +12,11 @@ stdenv.mkDerivation rec {
     sha256 = "1g6hi03ylhv47sbar3xxgsrar8schqfwn4glckh6m6lni67ndq85";
   };
 
+  prePatch = ''
+    sed -i '20i#include <sys/cdefs.h>' src/ntpd.h
+    sed -i '19i#include <sys/cdefs.h>' src/log.c
+  '';
+
   configureFlags = [
     "--with-privsep-path=${privsepPath}"
     "--with-privsep-user=${privsepUser}"
diff --git a/pkgs/tools/networking/ppp/default.nix b/pkgs/tools/networking/ppp/default.nix
index d07770260ff6..570e85c32815 100644
--- a/pkgs/tools/networking/ppp/default.nix
+++ b/pkgs/tools/networking/ppp/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
         url = "https://anonscm.debian.org/git/collab-maint/pkg-ppp.git/plain/debian/patches/rc_mksid-no-buffer-overflow?h=debian/2.4.7-1%2b4";
         sha256 = "1dk00j7bg9nfgskw39fagnwv1xgsmyv0xnkd6n1v5gy0psw0lvqh";
       })
+      ./musl-fix-headers.patch
     ];
 
   buildInputs = [ libpcap ];
diff --git a/pkgs/tools/networking/ppp/musl-fix-headers.patch b/pkgs/tools/networking/ppp/musl-fix-headers.patch
new file mode 100644
index 000000000000..d24f62896840
--- /dev/null
+++ b/pkgs/tools/networking/ppp/musl-fix-headers.patch
@@ -0,0 +1,137 @@
+diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h
+index b06eda5..dafa36c 100644
+--- a/include/net/ppp_defs.h
++++ b/include/net/ppp_defs.h
+@@ -38,6 +38,8 @@
+ #ifndef _PPP_DEFS_H_
+ #define _PPP_DEFS_H_
+ 
++#include <sys/time.h>
++
+ /*
+  * The basic PPP frame.
+  */
+diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
+index a74c914..7acd2cf 100644
+--- a/pppd/Makefile.linux
++++ b/pppd/Makefile.linux
+@@ -126,7 +126,7 @@ LIBS	+= -lcrypt
+ endif
+ 
+ ifdef USE_LIBUTIL
+-CFLAGS	+= -DHAVE_LOGWTMP=1
++#CFLAGS	+= -DHAVE_LOGWTMP=1
+ LIBS	+= -lutil
+ endif
+ 
+diff --git a/pppd/magic.h b/pppd/magic.h
+index c81213b..305aece 100644
+--- a/pppd/magic.h
++++ b/pppd/magic.h
+@@ -42,6 +42,8 @@
+  * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
+  */
+ 
++#include <sys/cdefs.h>
++
+ void magic_init __P((void));	/* Initialize the magic number generator */
+ u_int32_t magic __P((void));	/* Returns the next magic number */
+ 
+diff --git a/pppd/plugins/rp-pppoe/if.c b/pppd/plugins/rp-pppoe/if.c
+index 91e9a57..9c0fac3 100644
+--- a/pppd/plugins/rp-pppoe/if.c
++++ b/pppd/plugins/rp-pppoe/if.c
+@@ -30,10 +30,6 @@ static char const RCSID[] =
+ #include <linux/if_packet.h>
+ #endif
+ 
+-#ifdef HAVE_NET_ETHERNET_H
+-#include <net/ethernet.h>
+-#endif
+-
+ #ifdef HAVE_ASM_TYPES_H
+ #include <asm/types.h>
+ #endif
+diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c
+index a8c2bb4..ca34d79 100644
+--- a/pppd/plugins/rp-pppoe/plugin.c
++++ b/pppd/plugins/rp-pppoe/plugin.c
+@@ -46,7 +46,6 @@ static char const RCSID[] =
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <signal.h>
+-#include <net/ethernet.h>
+ #include <net/if_arp.h>
+ #include <linux/ppp_defs.h>
+ #include <linux/if_pppox.h>
+diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c
+index 3d3bf4e..b5f82d3 100644
+--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
++++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
+@@ -27,10 +27,6 @@
+ #include <linux/if_packet.h>
+ #endif
+ 
+-#ifdef HAVE_NET_ETHERNET_H
+-#include <net/ethernet.h>
+-#endif
+-
+ #ifdef HAVE_ASM_TYPES_H
+ #include <asm/types.h>
+ #endif
+@@ -55,6 +51,8 @@ void die(int status)
+ 	exit(status);
+ }
+ 
++#define error(x...) fprintf(stderr, x)
++
+ /* Initialize frame types to RFC 2516 values.  Some broken peers apparently
+    use different frame types... sigh... */
+ 
+diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
+index 9ab2eee..4d68147 100644
+--- a/pppd/plugins/rp-pppoe/pppoe.h
++++ b/pppd/plugins/rp-pppoe/pppoe.h
+@@ -86,18 +86,6 @@ typedef unsigned long UINT32_t;
+ 
+ #include <netinet/in.h>
+ 
+-#ifdef HAVE_NETINET_IF_ETHER_H
+-#include <sys/types.h>
+-
+-#ifdef HAVE_SYS_SOCKET_H
+-#include <sys/socket.h>
+-#endif
+-#ifndef HAVE_SYS_DLPI_H
+-#include <netinet/if_ether.h>
+-#endif
+-#endif
+-
+-
+ 
+ /* Ethernet frame types according to RFC 2516 */
+ #define ETH_PPPOE_DISCOVERY 0x8863
+diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
+index 6d71530..86d224e 100644
+--- a/pppd/sys-linux.c
++++ b/pppd/sys-linux.c
+@@ -102,19 +102,11 @@
+ #define MAX_ADDR_LEN 7
+ #endif
+ 
+-#if __GLIBC__ >= 2
+ #include <asm/types.h>		/* glibc 2 conflicts with linux/types.h */
+ #include <net/if.h>
+ #include <net/if_arp.h>
+ #include <net/route.h>
+ #include <netinet/if_ether.h>
+-#else
+-#include <linux/types.h>
+-#include <linux/if.h>
+-#include <linux/if_arp.h>
+-#include <linux/route.h>
+-#include <linux/if_ether.h>
+-#endif
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ 
diff --git a/pkgs/tools/networking/siege/default.nix b/pkgs/tools/networking/siege/default.nix
index 93fc28b48bf2..cac3e3e6361f 100644
--- a/pkgs/tools/networking/siege/default.nix
+++ b/pkgs/tools/networking/siege/default.nix
@@ -12,6 +12,10 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ openssl zlib ];
 
+  prePatch = ''
+    sed -i -e 's/u_int32_t/uint32_t/g' -e '1i#include <stdint.h>' src/hash.c
+  '';
+
   configureFlags = [
     "--with-ssl=${openssl.dev}"
     "--with-zlib=${zlib.dev}"
diff --git a/pkgs/tools/networking/stunnel/default.nix b/pkgs/tools/networking/stunnel/default.nix
index deac37468360..0d328c02d371 100644
--- a/pkgs/tools/networking/stunnel/default.nix
+++ b/pkgs/tools/networking/stunnel/default.nix
@@ -5,8 +5,10 @@ stdenv.mkDerivation rec {
   version = "5.44";
 
   src = fetchurl {
-    url    = "http://www.stunnel.org/downloads/${name}.tar.gz";
-    sha256 = "1692y69wl7j6yjgnrrzclgzb34bxsaxjzl1dfy47vms7pdfk42lr";
+    url    = "https://www.stunnel.org/downloads/${name}.tar.gz";
+    sha256 = "990a325dbb47d77d88772dd02fbbd27d91b1fea3ece76c9ff4461eca93f12299";
+    # please use the contents of "https://www.stunnel.org/downloads/${name}.tar.gz.sha256",
+    # not the output of `nix-prefetch-url`
   };
 
   buildInputs = [ openssl ];
diff --git a/pkgs/tools/networking/tinc/default.nix b/pkgs/tools/networking/tinc/default.nix
index 508816dbfa81..4f6bec9c0084 100644
--- a/pkgs/tools/networking/tinc/default.nix
+++ b/pkgs/tools/networking/tinc/default.nix
@@ -1,12 +1,12 @@
 {stdenv, fetchurl, lzo, openssl, zlib}:
 
 stdenv.mkDerivation rec {
-  version = "1.0.32";
+  version = "1.0.33";
   name = "tinc-${version}";
 
   src = fetchurl {
     url = "http://www.tinc-vpn.org/packages/tinc-${version}.tar.gz";
-    sha256 = "11smq1h6jyp6x2cwrv2zxck9phzdz3svi95pxnvvpd4dzzm4zcjd";
+    sha256 = "1x0hpfz13vn4pl6dcpnls6xq3rfcbdsg90awcfn53ijb8k35svvz";
   };
 
   buildInputs = [ lzo openssl zlib ];
diff --git a/pkgs/tools/networking/tlspool/default.nix b/pkgs/tools/networking/tlspool/default.nix
index acb5a042ffcc..80bac726457b 100644
--- a/pkgs/tools/networking/tlspool/default.nix
+++ b/pkgs/tools/networking/tlspool/default.nix
@@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
   meta = with stdenv.lib; {
     description = "A supercharged TLS daemon that allows for easy, strong and consistent deployment";
     license = licenses.bsd2;
-    homepage = https://www.tlspool.org;
+    homepage = http://www.tlspool.org;
     maintainers = with maintainers; [ leenaars qknight ];
   };
 }
diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix
index 614447cd5ecf..cc2f994d0d54 100644
--- a/pkgs/tools/networking/unbound/default.nix
+++ b/pkgs/tools/networking/unbound/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
 
   installFlags = [ "configfile=\${out}/etc/unbound/unbound.conf" ];
 
-  preFixup = stdenv.lib.optionalString stdenv.isLinux
+  preFixup = stdenv.lib.optionalString (stdenv.isLinux && !stdenv.hostPlatform.isMusl) # XXX: revisit
     # Build libunbound again, but only against nettle instead of openssl.
     # This avoids gnutls.out -> unbound.lib -> openssl.out.
     # There was some problem with this on Darwin; let's not complicate non-Linux.
diff --git a/pkgs/tools/package-management/conda/default.nix b/pkgs/tools/package-management/conda/default.nix
new file mode 100644
index 000000000000..4589cfcec880
--- /dev/null
+++ b/pkgs/tools/package-management/conda/default.nix
@@ -0,0 +1,71 @@
+{ lib
+, stdenv
+, fetchurl
+, runCommand
+, makeWrapper
+, buildFHSUserEnv
+, libselinux
+, xorg
+# Conda installs its packages and environments under this directory
+, installationPath ? "~/.conda"
+# Conda manages most pkgs itself, but expects a few to be on the system.
+, condaDeps ? [ stdenv.cc xorg.libSM xorg.libICE xorg.libXrender libselinux ]
+# Any extra nixpkgs you'd like available in the FHS env for Conda to use
+, extraPkgs ? [ ]
+}:
+
+# How to use this package?
+#
+# First-time setup: this nixpkg downloads the conda installer and provides a FHS
+# env in which it can run. On first use, the user will need to install conda to
+# the installPath using the installer:
+# $ nix-env -iA conda
+# $ conda-shell
+# $ conda-install
+#
+# Under normal usage, simply call `conda-shell` to activate the FHS env,
+# and then use conda commands as normal:
+# $ conda-shell
+# $ conda install spyder
+let
+  version = "4.3.31";
+  src = fetchurl {
+      url = "https://repo.continuum.io/miniconda/Miniconda3-${version}-Linux-x86_64.sh";
+      sha256 = "1rklq81s9v7xz1q0ha99w2sl6kyc5vhk6b21cza0jr3b8cgz0lam";
+  };
+
+  conda = runCommand "conda-install" { buildInputs = [ makeWrapper ]; }
+    ''
+      mkdir -p $out/bin
+      cp ${src} $out/bin/miniconda-installer.sh
+      chmod +x $out/bin/miniconda-installer.sh
+
+      makeWrapper                            \
+        $out/bin/miniconda-installer.sh      \
+        $out/bin/conda-install               \
+        --add-flags "-p ${installationPath}" \
+        --add-flags "-b"
+    '';
+in
+  buildFHSUserEnv {
+    name = "conda-shell";
+    targetPkgs = pkgs: (builtins.concatLists [ [ conda ] condaDeps extraPkgs]);
+    profile = ''
+      # Add conda to PATH
+      export PATH=${installationPath}/bin:$PATH
+      # Paths for gcc if compiling some C sources with pip
+      export NIX_CFLAGS_COMPILE="-I${installationPath}/include"
+      export NIX_CFLAGS_LINK="-L${installationPath}lib"
+      # Some other required environment variables
+      export FONTCONFIG_FILE=/etc/fonts/fonts.conf
+      export QTCOMPOSE=${xorg.libX11}/share/X11/locale
+    '';
+
+    meta = {
+      description = "Conda is a package manager for Python";
+      homepage = https://conda.io/;
+      platforms = lib.platforms.linux;
+      license = lib.licenses.bsd3;
+      maintainers = with lib.maintainers; [ jluttine bhipple ];
+    };
+  }
diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix
index 9f41e00ac0e9..6e73b3378e21 100644
--- a/pkgs/tools/package-management/nix/default.nix
+++ b/pkgs/tools/package-management/nix/default.nix
@@ -1,8 +1,8 @@
 { lib, stdenv, fetchurl, fetchFromGitHub, perl, curl, bzip2, sqlite, openssl ? null, xz
 , pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli
 , autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook5_xsl
-, libseccomp, busybox
-, hostPlatform
+, libseccomp, busybox-sandbox-shell
+, hostPlatform, buildPlatform
 , storeDir ? "/nix/store"
 , stateDir ? "/nix/var"
 , confDir ? "/etc"
@@ -10,17 +10,7 @@
 
 let
 
-  sh = busybox.override {
-    useMusl = true;
-    enableStatic = true;
-    enableMinimal = true;
-    extraConfig = ''
-      CONFIG_ASH y
-      CONFIG_ASH_BUILTIN_ECHO y
-      CONFIG_ASH_BUILTIN_TEST y
-      CONFIG_ASH_OPTIMIZE_FOR_SIZE y
-    '';
-  };
+  sh = busybox-sandbox-shell;
 
   common = { name, suffix ? "", src, fromGit ? false }: stdenv.mkDerivation rec {
     inherit name src;
@@ -34,13 +24,13 @@ let
 
     nativeBuildInputs =
       [ pkgconfig ]
-      ++ lib.optionals (!is20) [ perl ]
+      ++ lib.optionals (!is20) [ curl perl ]
       ++ lib.optionals fromGit [ autoreconfHook autoconf-archive bison flex libxml2 libxslt docbook5 docbook5_xsl ];
 
-    buildInputs = [ curl openssl sqlite xz ]
+    buildInputs = [ curl openssl sqlite xz bzip2 ]
       ++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
       ++ lib.optionals fromGit [ brotli ] # Since 1.12
-      ++ lib.optional stdenv.isLinux libseccomp
+      ++ lib.optional (stdenv.isLinux && !hostPlatform.isRiscV) libseccomp
       ++ lib.optional ((stdenv.isLinux || stdenv.isDarwin) && is20)
           (aws-sdk-cpp.override {
             apis = ["s3"];
@@ -49,15 +39,6 @@ let
 
     propagatedBuildInputs = [ boehmgc ];
 
-    # Note: bzip2 is not passed as a build input, because the unpack phase
-    # would end up using the wrong bzip2 when cross-compiling.
-    # XXX: The right thing would be to reinstate `--with-bzip2' in Nix.
-    postUnpack =
-      '' export CPATH="${bzip2.dev}/include"
-         export LIBRARY_PATH="${bzip2.out}/lib"
-         export CXXFLAGS="-Wno-error=reserved-user-defined-literal"
-      '';
-
     configureFlags =
       [ "--with-store-dir=${storeDir}"
         "--localstatedir=${stateDir}"
@@ -71,40 +52,24 @@ let
         "--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}"
       ] ++ lib.optionals (is20 && stdenv.isLinux) [
         "--with-sandbox-shell=${sh}/bin/busybox"
-      ];
+      ]
+      ++ lib.optional (
+          hostPlatform != buildPlatform && hostPlatform ? nix && hostPlatform.nix ? system
+      ) ''--with-system=${hostPlatform.nix.system}''
+         # RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50
+      ++ lib.optional hostPlatform.isRiscV "--disable-seccomp-sandboxing";
 
     makeFlags = "profiledir=$(out)/etc/profile.d";
 
     installFlags = "sysconfdir=$(out)/etc";
 
-    doInstallCheck = true;
+    doInstallCheck = true; # not cross
 
     # socket path becomes too long otherwise
     preInstallCheck = lib.optional stdenv.isDarwin "export TMPDIR=/tmp";
 
     separateDebugInfo = stdenv.isLinux;
 
-    crossAttrs = {
-      postUnpack =
-        '' export CPATH="${bzip2.crossDrv}/include"
-           export NIX_CROSS_LDFLAGS="-L${bzip2.crossDrv}/lib -rpath-link ${bzip2.crossDrv}/lib $NIX_CROSS_LDFLAGS"
-        '';
-
-      configureFlags =
-        ''
-          --with-store-dir=${storeDir} --localstatedir=${stateDir}
-          --with-dbi=${perlPackages.DBI}/${perl.libPrefix}
-          --with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}
-          --with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}
-          --disable-init-state
-          --enable-gc
-        '' + stdenv.lib.optionalString (
-            hostPlatform ? nix && hostPlatform.nix ? system
-        ) ''--with-system=${hostPlatform.nix.system}'';
-
-      doInstallCheck = false;
-    };
-
     enableParallelBuilding = true;
 
     meta = {
@@ -169,12 +134,12 @@ in rec {
 
   nixUnstable = (lib.lowPrio (common rec {
     name = "nix-2.0${suffix}";
-    suffix = "pre5914_48c192ca";
+    suffix = "pre5968_a6c0b773";
     src = fetchFromGitHub {
       owner = "NixOS";
       repo = "nix";
-      rev = "48c192ca2d5bc65b69d2336c8577258f8eb80cf8";
-      sha256 = "0xfb9dwyzdy31hbi5y9mlia8wsck2lay0f0phbfalgs4y7i3r3r1";
+      rev = "a6c0b773b72d4e30690e01f1f1dcffc28f2d9ea1";
+      sha256 = "0i8wcblcjw3291ba6ki4llw3fgm8ylp9q52kajkyr58dih537346";
     };
     fromGit = true;
   })) // { perl-bindings = perl-bindings { nix = nixUnstable; }; };
diff --git a/pkgs/tools/package-management/nixops/deps.nix b/pkgs/tools/package-management/nixops/deps.nix
new file mode 100644
index 000000000000..7da38f83e7fe
--- /dev/null
+++ b/pkgs/tools/package-management/nixops/deps.nix
@@ -0,0 +1,20 @@
+[
+  {
+    goPackagePath = "github.com/mattn/go-sqlite3";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-sqlite3";
+      rev = "b4142c444a8941d0d92b0b7103a24df9cd815e42";
+      sha256 = "0xq2y4am8dz9w9aaq24s1npg1sn8pf2gn4nki73ylz2fpjwq9vla";
+    };
+  }
+  {
+    goPackagePath = "github.com/miekg/dns";
+    fetch = {
+      type = "git";
+      url = "https://github.com/miekg/dns";
+      rev = "75229eecb7af00b2736e93b779a78429dcb19472";
+      sha256 = "1vsjy07kkyx11iz4qsihhykac3ddq3ywdgv6bwrv407504f7x6wl";
+    };
+  }
+]
diff --git a/pkgs/tools/package-management/nixops/nixops-dns.nix b/pkgs/tools/package-management/nixops/nixops-dns.nix
new file mode 100644
index 000000000000..afb0353e687d
--- /dev/null
+++ b/pkgs/tools/package-management/nixops/nixops-dns.nix
@@ -0,0 +1,26 @@
+{ lib
+, stdenv
+, buildGoPackage
+, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "nixops-dns";
+  version = "1.0";
+
+  goDeps = ./deps.nix;
+  goPackagePath = "github.com/kamilchm/nixops-dns";
+
+  src = fetchFromGitHub {
+    owner = "kamilchm";
+    repo = "nixops-dns";
+    rev = "v${version}";
+    sha256 = "1fyqwk2knrv40zpf71a56bjyaycr3p6fzrqq7gaan056ydy83cai";
+  };
+
+  meta = with lib; {
+    homepage = https://github.com/kamilchm/nixops-dns/;
+    description = "DNS server for resolving NixOps machines";
+    license = licenses.mit;
+    maintainers = with maintainers; [ kamilchm sorki ];
+  };
+}
diff --git a/pkgs/tools/package-management/packagekit/default.nix b/pkgs/tools/package-management/packagekit/default.nix
index 78ef19706d18..4f027560547f 100644
--- a/pkgs/tools/package-management/packagekit/default.nix
+++ b/pkgs/tools/package-management/packagekit/default.nix
@@ -8,13 +8,13 @@
 
 stdenv.mkDerivation rec {
   name = "packagekit-${version}";
-  version = "1.1.7";
+  version = "1.1.8";
 
   src = fetchFromGitHub {
     owner = "hughsie";
     repo = "PackageKit";
     rev = "PACKAGEKIT_${lib.replaceStrings ["."] ["_"] version}";
-    sha256 = "076rrczmyhapj87pxqldsar5pbz4mid6cm9l1n91zh2q403chdkb";
+    sha256 = "0bn9flsjbzlwmlbv2gphqwgzy9sx8ahch28z6dzgak4csbz5wcws";
   };
 
   buildInputs = [ glib polkit systemd python gobjectIntrospection vala_0_38 ]
diff --git a/pkgs/tools/package-management/packagekit/qt.nix b/pkgs/tools/package-management/packagekit/qt.nix
new file mode 100644
index 000000000000..c38ef25f3548
--- /dev/null
+++ b/pkgs/tools/package-management/packagekit/qt.nix
@@ -0,0 +1,24 @@
+{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig
+, qtbase, qttools, packagekit }:
+
+stdenv.mkDerivation rec {
+  name = "packagekit-qt-${version}";
+  version = "1.0.1";
+
+  src = fetchFromGitHub {
+    owner  = "hughsie";
+    repo   = "PackageKit-Qt";
+    rev    = "v${version}";
+    sha256 = "1ls6mn9abpwzw5wjgmslc5h9happj3516y1q67imppczk8g9h2yk";
+  };
+
+  buildInputs = [ packagekit ];
+
+  nativeBuildInputs = [ cmake pkgconfig qttools ];
+
+  enableParallelBuilding = true;
+
+  meta = packagekit.meta // {
+    description = "System to facilitate installing and updating packages - Qt";
+  };
+}
diff --git a/pkgs/tools/package-management/rpm/default.nix b/pkgs/tools/package-management/rpm/default.nix
index 57581091f921..3a56db1e0d3f 100644
--- a/pkgs/tools/package-management/rpm/default.nix
+++ b/pkgs/tools/package-management/rpm/default.nix
@@ -18,7 +18,8 @@ stdenv.mkDerivation rec {
   buildInputs = [ cpio zlib bzip2 file libarchive nspr nss db xz python lua ];
 
   # rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements
-  propagatedBuildInputs = [ popt elfutils nss db bzip2 libarchive libbfd ];
+  propagatedBuildInputs = [ popt nss db bzip2 libarchive libbfd ]
+    ++ stdenv.lib.optional stdenv.isLinux elfutils;
 
   NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss";
 
@@ -59,6 +60,6 @@ stdenv.mkDerivation rec {
     license = licenses.gpl2;
     description = "The RPM Package Manager";
     maintainers = with maintainers; [ copumpkin ];
-    platforms = platforms.linux;
+    platforms = platforms.linux ++ platforms.darwin;
   };
 }
diff --git a/pkgs/tools/security/afl/default.nix b/pkgs/tools/security/afl/default.nix
index 51701590b8e9..1ff0ad6f6b68 100644
--- a/pkgs/tools/security/afl/default.nix
+++ b/pkgs/tools/security/afl/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
 
   # Note: libcgroup isn't needed for building, just for the afl-cgroup
   # script.
-  buildInputs  = [ makeWrapper clang llvm which ];
+  buildInputs  = [ makeWrapper llvm which ];
 
   buildPhase   = ''
     make PREFIX=$out
@@ -53,8 +53,7 @@ stdenv.mkDerivation rec {
     for x in $out/bin/afl-clang-fast $out/bin/afl-clang-fast++; do
       wrapProgram $x \
         --prefix AFL_PATH : "$out/lib/afl" \
-        --prefix AFL_CC   : "${clang}/bin/clang" \
-        --prefix AFL_CXX  : "${clang}/bin/clang++"
+        --run 'export AFL_CC=''${AFL_CC:-${clang}/bin/clang} AFL_CXX=''${AFL_CXX:-${clang}/bin/clang++}'
     done
   '';
 
@@ -76,7 +75,7 @@ stdenv.mkDerivation rec {
     '';
     homepage    = "http://lcamtuf.coredump.cx/afl/";
     license     = stdenv.lib.licenses.asl20;
-    platforms   = stdenv.lib.platforms.linux;
+    platforms   = ["x86_64-linux" "i686-linux"];
     maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/tools/security/eschalot/default.nix b/pkgs/tools/security/eschalot/default.nix
new file mode 100644
index 000000000000..d628a28023a4
--- /dev/null
+++ b/pkgs/tools/security/eschalot/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "eschalot";
+  version = "2018-01-19";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "ReclaimYourPrivacy";
+    repo = pname;
+    rev = "56a967b62631cfd3c7ef68541263dbd54cbbc2c4";
+    sha256 = "1iw1jrydasm9dmgpcdimd8dy9n281ys9krvf3fd3dlymkgsj604d";
+  };
+
+  buildInputs = [ openssl ];
+
+  installPhase = ''
+    install -D -t $out/bin eschalot worgen
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Tor hidden service name generator";
+    homepage = src.meta.homepage;
+    license = licenses.isc;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/pkgs/tools/security/hash_extender/default.nix b/pkgs/tools/security/hash_extender/default.nix
new file mode 100644
index 000000000000..0c5691a1e106
--- /dev/null
+++ b/pkgs/tools/security/hash_extender/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, openssl }:
+
+stdenv.mkDerivation rec {
+  name = "hash_extender-${version}";
+  version = "2017-04-10";
+
+  src = fetchFromGitHub {
+    owner = "iagox86";
+    repo = "hash_extender";
+    rev = "d27581e062dd0b534074e11d7d311f65a6d7af21";
+    sha256 = "1npwbgqaynjh5x39halw43i116v89sxkpa1g1bbvc1lpi8hkhhcb";
+  };
+
+  buildInputs = [ openssl ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp hash_extender $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Tool to automate hash length extension attacks";
+    homepage = https://github.com/iagox86/hash_extender;
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ geistesk ];
+  };
+}
diff --git a/pkgs/tools/security/kbfs/default.nix b/pkgs/tools/security/kbfs/default.nix
index ba024328ba5f..dbd372275bc3 100644
--- a/pkgs/tools/security/kbfs/default.nix
+++ b/pkgs/tools/security/kbfs/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "kbfs-${version}";
-  version = "20171004.40555d";
+  version = "1.0.40";
 
   goPackagePath = "github.com/keybase/kbfs";
   subPackages = [ "kbfsfuse" "kbfsgit/git-remote-keybase" ];
@@ -12,8 +12,8 @@ buildGoPackage rec {
   src = fetchFromGitHub {
     owner = "keybase";
     repo = "kbfs";
-    rev = "40555dbc9c93a05f3a82053860df30e45c7bd779";
-    sha256 = "08wj8fh1ja8kfzvbza5csy9mpfy39lifnzvfrnbj7vyyv88qc3h0";
+    rev = "v${version}";
+    sha256 = "1bgbzk3ykjb6y5sa5i9f6hwcp8b21dndq7iw9m8fdxh4n4mm6n9p";
   };
 
   buildFlags = [ "-tags production" ];
diff --git a/pkgs/tools/security/keybase-gui/default.nix b/pkgs/tools/security/keybase-gui/default.nix
index ce98740e89bd..b0db3eea5b9e 100644
--- a/pkgs/tools/security/keybase-gui/default.nix
+++ b/pkgs/tools/security/keybase-gui/default.nix
@@ -37,10 +37,10 @@ let
 in
 stdenv.mkDerivation rec {
   name = "keybase-gui-${version}";
-  version = "1.0.33-20171003193427.d9ceb86ac";
+  version = "1.0.40-20180127033950.76a4b90c9";
   src = fetchurl {
     url = "https://s3.amazonaws.com/prerelease.keybase.io/linux_binaries/deb/keybase_${version}_amd64.deb";
-    sha256 = "0sqani2fy5jzqmz35md1bdw2vwpx91l87b6s3x9z53halzq7vfy6";
+    sha256 = "1pskmwif5nx32d53kz8vbijv61i50kpjwyy53a37rz5nx3hgj3ar";
   };
   phases = ["unpackPhase" "installPhase" "fixupPhase"];
   unpackPhase = ''
@@ -48,7 +48,8 @@ stdenv.mkDerivation rec {
     tar xf data.tar.xz
   '';
   installPhase = ''
-    mkdir -p $out/{bin,share}
+    mkdir -p $out/bin
+    mv usr/share $out/share
     mv opt/keybase $out/share/
 
     cat > $out/bin/keybase-gui <<EOF
@@ -78,6 +79,9 @@ stdenv.mkDerivation rec {
     exec $out/share/keybase/Keybase "\$@"
     EOF
     chmod +x $out/bin/keybase-gui
+
+    substituteInPlace $out/share/applications/keybase.desktop \
+      --replace run_keybase $out/bin/keybase-gui
   '';
   postFixup = ''
     patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath "${libPath}:\$ORIGIN" "$out/share/keybase/Keybase"
diff --git a/pkgs/tools/security/keybase/default.nix b/pkgs/tools/security/keybase/default.nix
index a0fc788a69e9..c221a46d5f96 100644
--- a/pkgs/tools/security/keybase/default.nix
+++ b/pkgs/tools/security/keybase/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "keybase-${version}";
-  version = "1.0.39";
+  version = "1.0.40";
 
   goPackagePath = "github.com/keybase/client";
   subPackages = [ "go/keybase" ];
@@ -13,7 +13,7 @@ buildGoPackage rec {
     owner  = "keybase";
     repo   = "client";
     rev    = "v${version}";
-    sha256 = "0b64h536xp8r1q7fa23mf1p8ybnh0fz1n468fp56mvh98vmqys5b";
+    sha256 = "05x0h87dinl8zaqikr1sx38bv1n6ymxqp440b384d8y76w66rphi";
   };
 
   buildFlags = [ "-tags production" ];
diff --git a/pkgs/tools/security/nmap/qt.nix b/pkgs/tools/security/nmap/qt.nix
new file mode 100644
index 000000000000..c15d9bf25283
--- /dev/null
+++ b/pkgs/tools/security/nmap/qt.nix
@@ -0,0 +1,53 @@
+{ stdenv, fetchurl, cmake, pkgconfig, makeWrapper
+, dnsutils, nmap
+, qtbase, qtscript, qtwebkit }:
+
+stdenv.mkDerivation rec {
+  name = "nmapsi4-${version}";
+  version = "0.5-alpha1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/nmapsi/${name}.tar.xz";
+    sha256 = "18v9a3l2nmij3gb4flscigxr5c44nphkjfmk07qpyy73fy61mzrs";
+  };
+
+  nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
+
+  buildInputs = [ qtbase qtscript qtwebkit ];
+
+  enableParallelBuilding = true;
+
+  postPatch = ''
+    for f in \
+      src/platform/digmanager.cpp \
+      src/platform/discover.cpp \
+      src/platform/monitor/monitor.cpp \
+      src/platform/nsemanager.cpp ; do
+
+      substituteInPlace $f \
+        --replace '"dig"'   '"${dnsutils}/bin/dig"'\
+        --replace '"nmap"'  '"${nmap}/bin/nmap"' \
+        --replace '"nping"' '"${nmap}/bin/nping"'
+    done
+  '';
+
+  postInstall = ''
+    mv $out/share/applications/kde4/*.desktop $out/share/applications
+    rmdir $out/share/applications/kde4
+
+    for f in $out/share/applications/* ; do
+      substituteInPlace $f \
+        --replace Qt4                   Qt5 \
+        --replace Exec=nmapsi4          Exec=$out/bin/nmapsi4 \
+        --replace "Exec=kdesu nmapsi4" "Exec=kdesu $out/bin/nmapsi4"
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Qt frontend for nmap";
+    homepage    = https://www.nmapsi4.org/;
+    license     = licenses.gpl2;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+}
diff --git a/pkgs/tools/security/rhash/darwin.patch b/pkgs/tools/security/rhash/darwin.patch
deleted file mode 100644
index 76ad8fe9abd9..000000000000
--- a/pkgs/tools/security/rhash/darwin.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/Makefile b/Makefile
-index e40dbc3..e198b93 100644
---- a/Makefile
-+++ b/Makefile
-@@ -17,7 +17,7 @@ ALLCFLAGS = -pipe $(CFLAGS) $(ADDCFLAGS) \
-   -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations
- LDLIBRHASH = -Llibrhash -lrhash
- ALLLDFLAGS = $(LDLIBRHASH) $(LDFLAGS) $(ADDLDFLAGS)
--SHAREDLIB  = librhash/librhash.so.0
-+SHAREDLIB  = librhash/librhash.0.dylib
- SHRDLFLAGS = $(LDFLAGS) $(ADDLDFLAGS)
- HEADERS = calc_sums.h hash_print.h common_func.h hash_update.h file_mask.h file_set.h find_file.h hash_check.h output.h parse_cmdline.h rhash_main.h win_utils.h version.h
- SOURCES = calc_sums.c hash_print.c common_func.c hash_update.c file_mask.c file_set.c find_file.c hash_check.c output.c parse_cmdline.c rhash_main.c win_utils.c
-diff --git a/librhash/Makefile b/librhash/Makefile
-index 2f9bcc9..0c5aaad 100644
---- a/librhash/Makefile
-+++ b/librhash/Makefile
-@@ -28,8 +28,8 @@ PREFIX  = /usr/local
- INCDIR  = $(PREFIX)/include
- LIBDIR  = $(PREFIX)/lib
- LIBRARY = librhash.a
--SONAME  = librhash.so.0
--SOLINK  = librhash.so
-+SONAME  = librhash.0.dylib
-+SOLINK  = librhash.dylib
- TEST_TARGET = test_hashes
- TEST_SHARED = test_shared
- # Set variables according to GNU coding standard
-@@ -182,8 +182,7 @@ test-dll: $(DLLNAME) test_hashes.o
- 
- # shared and static libraries
- $(SONAME): $(SOURCES)
--	sed -n '1s/.*/{ global:/p; s/^RHASH_API.* \([a-z0-9_]\+\)(.*/  \1;/p; $$s/.*/local: *; };/p' $(SO_HEADERS) > exports.sym
--	$(CC) -fpic $(ALLCFLAGS) -shared $(SOURCES) -Wl,--version-script,exports.sym,-soname,$(SONAME) $(LIBLDFLAGS) -o $@
-+	$(CC) -fpic $(ALLCFLAGS) -dynamiclib $(SOURCES) $(LIBLDFLAGS) -Wl,-install_name,$(PREFIX)/lib/$@ -o $@
- 	ln -s $(SONAME) $(SOLINK)
- # use 'nm -Cg --defined-only $@' to view exported symbols
- 
diff --git a/pkgs/tools/security/rhash/default.nix b/pkgs/tools/security/rhash/default.nix
index 68c3edc4cd25..485b34cff88d 100644
--- a/pkgs/tools/security/rhash/default.nix
+++ b/pkgs/tools/security/rhash/default.nix
@@ -1,32 +1,23 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchFromGitHub, which }:
 
 stdenv.mkDerivation rec {
-  version = "1.3.3";
+  version = "2018-02-05";
   name = "rhash-${version}";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/rhash/${name}-src.tar.gz";
-    sha1 = "0981bdc98ba7ef923b1a6cd7fd8bb0374cff632e";
-    sha256 = "0nii6p4m2x8rkaf8r6smgfwb1q4hpf117kkg64yr6gyqgdchnljv";
+  src = fetchFromGitHub {
+    owner = "rhash";
+    repo = "RHash";
+    rev = "cc26d54ff5df0f692907a5e3132a5eeca559ed61";
+    sha256 = "1ldagp931lmxxpyvsb9rrar4iqwmv94m6lfjzkbkshpmk3p5ng7h";
   };
 
-  patches = stdenv.lib.optional stdenv.isDarwin ./darwin.patch;
+  nativeBuildInputs = [ which ];
 
-  installFlags = [ "DESTDIR=$(out)" "PREFIX=/" ];
+  # configure script is not autotools-based, doesn't support these options
+  configurePlatforms = [ ];
 
-  # we build the static library because of two makefile bugs
-  # * .h files installed for static library target only
-  # * .so.0 -> .so link only created in the static library install target
-  buildPhase = ''
-    make lib-shared lib-static build-shared CC=$CC AR=$AR PREFIX=$out
-  '';
-
-  # we don't actually want the static library, so we remove it after it
-  # gets installed
-  installPhase = ''
-    make DESTDIR="$out" PREFIX="/" install-shared install-lib-shared install-lib-static
-    rm $out/lib/librhash.a
-  '';
+  installTargets = [ "install" "install-lib-shared" "install-lib-so-link" ];
+  postInstall = "make -C librhash install-headers";
 
   meta = with stdenv.lib; {
     homepage = http://rhash.anz.ru;
diff --git a/pkgs/tools/security/secp256k1/default.nix b/pkgs/tools/security/secp256k1/default.nix
index 83a23744c2e9..fd03e6bebabc 100644
--- a/pkgs/tools/security/secp256k1/default.nix
+++ b/pkgs/tools/security/secp256k1/default.nix
@@ -20,13 +20,13 @@ stdenv.mkDerivation rec {
 
   # I can't find any version numbers, so we're just using the date of the
   # last commit.
-  version = "2016-11-27";
+  version = "2017-12-18";
 
   src = fetchFromGitHub {
     owner = "bitcoin-core";
     repo = "secp256k1";
-    rev = "2928420c1b8e1feee8c20dff4e3cc41a0de2fc22";
-    sha256 = "1djsr2vrhh88353czlwb8bwlyabf008w1f7xg0fs3q33rf42w5gm";
+    rev = "f54c6c5083307b18224c953cf5870ea7ffce070b";
+    sha256 = "0bxqmimm627g9klalg1vdbspmn52588v4a6cli3p8bn84ibsnzbm";
   };
 
   buildInputs = optionals enableJNI [ jdk ];
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ autoreconfHook ];
 
   configureFlags =
+    [ "--enable-benchmark=no" "--enable-tests=no" "--enable-exhaustive-tests=no" ] ++
     optionals enableECDH [ "--enable-module-ecdh" "--enable-experimental" ] ++
     optionals enableRecovery [ "--enable-module-recovery" ] ++
     optionals enableJNI [ "--enable-jni" ];
diff --git a/pkgs/tools/security/sops/default.nix b/pkgs/tools/security/sops/default.nix
index 79753305c592..26faf2c730c6 100644
--- a/pkgs/tools/security/sops/default.nix
+++ b/pkgs/tools/security/sops/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "sops-${version}";
-  version = "2.0.8";
+  version = "3.0.2";
 
   goPackagePath = "go.mozilla.org/sops";
 
@@ -10,7 +10,7 @@ buildGoPackage rec {
     rev = version;
     owner = "mozilla";
     repo = "sops";
-    sha256 = "0kawnp24i3r981hz6apfwhgp71002vjq7ir54arq0zkssmykms1c";
+    sha256 = "0zszlb35cmw9j9dg1bpcbwxwh094wcfxhas4ns58jp5n79rqwv9i";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/security/spectre-meltdown-checker/default.nix b/pkgs/tools/security/spectre-meltdown-checker/default.nix
index d03c387a7c6c..13bebe10c623 100644
--- a/pkgs/tools/security/spectre-meltdown-checker/default.nix
+++ b/pkgs/tools/security/spectre-meltdown-checker/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "spectre-meltdown-checker-${version}";
-  version = "0.34";
+  version = "0.35";
 
   src = fetchFromGitHub {
     owner = "speed47";
     repo = "spectre-meltdown-checker";
     rev = "v${version}";
-    sha256 = "0jlqxzii883yl5iqmywqqqjlhgswn033566a3vpspycj3sr8zrd2";
+    sha256 = "0pzs6iznrar5zkg92gsh6d0zhdi715zwqcb8hh1aaykx9igjb1xw";
   };
 
   prePatch = ''
diff --git a/pkgs/tools/security/sudo/default.nix b/pkgs/tools/security/sudo/default.nix
index 5192f57582c7..1edd5b60926f 100644
--- a/pkgs/tools/security/sudo/default.nix
+++ b/pkgs/tools/security/sudo/default.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
     "--with-logpath=/var/log/sudo.log"
     "--with-iologdir=/var/log/sudo-io"
     "--with-sendmail=${sendmailPath}"
+    "--enable-tmpfiles.d=no"
   ] ++ stdenv.lib.optional withInsults [
     "--with-insults"
     "--with-all-insults"
diff --git a/pkgs/tools/security/theharvester/default.nix b/pkgs/tools/security/theharvester/default.nix
new file mode 100644
index 000000000000..f1bac7adba10
--- /dev/null
+++ b/pkgs/tools/security/theharvester/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, makeWrapper, python2Packages, fetchFromGitHub, python2 }:
+
+stdenv.mkDerivation rec {
+  pname = "theHarvester";
+  version = "2.7.1";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "laramies";
+    repo = "${pname}";
+    rev = "25553762d2d93a39083593adb08a34d5f5142c60";
+    sha256 = "0gnm598y6paz0knwvdv1cx0w6ngdbbpzkdark3q5vs66yajv24w4";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  # add dependencies
+  propagatedBuildInputs = [ python2Packages.requests ];
+
+  installPhase = ''
+    # create dirs
+    mkdir -p $out/share/${pname} $out/bin
+
+    # move project code
+    mv * $out/share/${pname}/
+
+    # make project runnable
+    chmod +x $out/share/${pname}/theHarvester.py
+    ln -s $out/share/${pname}/theHarvester.py $out/bin
+
+    wrapProgram "$out/bin/theHarvester.py" --prefix PYTHONPATH : $out/share/${pname}:$PYTHONPATH
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Gather E-mails, subdomains and names from different public sources";
+    homepage = "https://github.com/laramies/theHarvester";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ treemo ];
+    license = licenses.gpl2;
+  };
+}
diff --git a/pkgs/tools/system/acpica-tools/default.nix b/pkgs/tools/system/acpica-tools/default.nix
new file mode 100644
index 000000000000..1381f13fd3c5
--- /dev/null
+++ b/pkgs/tools/system/acpica-tools/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, bison, flex }:
+
+stdenv.mkDerivation rec {
+  name = "acpica-tools-${version}";
+  version = "20180209";
+
+  src = fetchurl {
+    url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz";
+    sha256 = "1rpdfwa4vwnvyxdp9ygqjckmabc3s8kyg3jyq4n4f0rhr1zl4zy5";
+  };
+
+  NIX_CFLAGS_COMPILE = "-O3";
+
+  enableParallelBuilding = true;
+
+  buildFlags = [
+    "acpibin"
+    "acpidump"
+    "acpiexec"
+    "acpihelp"
+    "acpinames"
+    "acpixtract"
+  ];
+
+  nativeBuildInputs = [ bison flex ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = with stdenv.lib; {
+    description = "ACPICA Tools";
+    homepage = "https://www.acpica.org/";
+    license = with licenses; [ gpl2 bsd3 ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ tadfisher ];
+  };
+}
diff --git a/pkgs/tools/system/augeas/default.nix b/pkgs/tools/system/augeas/default.nix
index dca6d37d9af3..93ce48644634 100644
--- a/pkgs/tools/system/augeas/default.nix
+++ b/pkgs/tools/system/augeas/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "augeas-${version}";
-  version = "1.10.0";
+  version = "1.10.1";
 
   src = fetchurl {
     url = "http://download.augeas.net/${name}.tar.gz";
-    sha256 = "04q2hr3xj71rdbjdj3jiygi8dbiq1x4szlyavxj1xjiw9jcgd41a";
+    sha256 = "0k9nssn7lk58cl5zv3c8kv2zx9cm2yks3sj7q4fd6qdjz9m2bnsj";
   };
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ readline libxml2 ];
diff --git a/pkgs/tools/system/bfs/default.nix b/pkgs/tools/system/bfs/default.nix
new file mode 100644
index 000000000000..2e4133124c11
--- /dev/null
+++ b/pkgs/tools/system/bfs/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, bash }:
+
+stdenv.mkDerivation rec {
+  name = "bfs-${version}";
+  version = "1.2.1";
+
+  src = fetchFromGitHub {
+    repo = "bfs";
+    owner = "tavianator";
+    rev = version;
+    sha256 = "1dgc31l5d20i0v78c51xga4lr78b5x8dz6yzsvbhlgs0abi0nynx";
+  };
+
+  # Disable fstype test, tries to read /etc/mtab
+  patches = [ ./tests.patch ];
+  postPatch = ''
+    # Patch tests (both shebangs and usage in scripts)
+    for f in $(find -type f -name '*.sh'); do
+      substituteInPlace $f --replace "/bin/bash" "${bash}/bin/bash"
+    done
+  '';
+  doCheck = true;
+
+  makeFlags = [ "PREFIX=$(out)" ];
+  buildFlags = [ "release" ]; # "release" enables compiler optimizations
+
+  meta = with stdenv.lib; {
+    description = "A breadth-first version of the UNIX find command";
+    longDescription = ''
+      bfs is a variant of the UNIX find command that operates breadth-first rather than
+      depth-first. It is otherwise intended to be compatible with many versions of find.
+    '';
+    homepage = https://github.com/tavianator/bfs;
+    license = licenses.bsd0;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ yesbox ];
+  };
+}
diff --git a/pkgs/tools/system/bfs/tests.patch b/pkgs/tools/system/bfs/tests.patch
new file mode 100644
index 000000000000..a30291d7095f
--- /dev/null
+++ b/pkgs/tools/system/bfs/tests.patch
@@ -0,0 +1,10 @@
+--- a/tests.sh
++++ b/tests.sh
+@@ -369,7 +369,6 @@
+     test_printf_nul
+     test_quit_after_print
+     test_quit_before_print
+-    test_fstype
+     test_not
+     test_and
+     test_or
diff --git a/pkgs/tools/system/ddrescue/default.nix b/pkgs/tools/system/ddrescue/default.nix
index e6af7abeda2b..fc42c3b856f6 100644
--- a/pkgs/tools/system/ddrescue/default.nix
+++ b/pkgs/tools/system/ddrescue/default.nix
@@ -6,11 +6,11 @@
 let inherit (stdenv.lib) optionals; in
 
 stdenv.mkDerivation rec {
-  name = "ddrescue-1.22";
+  name = "ddrescue-1.23";
 
   src = fetchurl {
     url = "mirror://gnu/ddrescue/${name}.tar.lz";
-    sha256 = "19qhx9ggkkjl0g3a88g501wmybkj1y4n5lm5kp0km0blh0p7p189";
+    sha256 = "13cd6c0x91zq10vdlyl6r5rib47bmsn5sshmkin3igwj8pa2vbm9";
   };
 
   nativeBuildInputs = [ lzip ];
diff --git a/pkgs/tools/system/efivar/default.nix b/pkgs/tools/system/efivar/default.nix
index 6b062513483d..7f20e8135011 100644
--- a/pkgs/tools/system/efivar/default.nix
+++ b/pkgs/tools/system/efivar/default.nix
@@ -2,27 +2,21 @@
 
 stdenv.mkDerivation rec {
   name = "efivar-${version}";
-  version = "30";
+  version = "34";
 
   src = fetchFromGitHub {
     owner = "rhinstaller";
     repo = "efivar";
     rev = version;
-    sha256 = "1pghj019qr7qpqd9rxfhsr1hm3s0w1hd5cdndpl07vhys8hy4a8a";
+    sha256 = "0ycrdaz0ijkm3xb9fnwzhwi0pdj5c6s636wj4i6lbjbrijbzn4x5";
   };
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ popt ];
 
-  postPatch = ''
-     substituteInPlace src/Makefile --replace "-static" ""
-  '';
-
-  installFlags = [
+  makeFlags = [
+    "prefix=$(out)"
     "libdir=$(out)/lib"
-    "mandir=$(out)/share/man"
-    "includedir=$(out)/include"
-    "bindir=$(out)/bin"
   ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/system/fio/default.nix b/pkgs/tools/system/fio/default.nix
index 89fb5f05ac97..1c98f7126937 100644
--- a/pkgs/tools/system/fio/default.nix
+++ b/pkgs/tools/system/fio/default.nix
@@ -1,8 +1,8 @@
 { stdenv, fetchFromGitHub, libaio, python, zlib }:
 
 let
-  version = "3.3";
-  sha256 = "0ipdpdn6rlsbppqjddyyk8c6rg1dl17d62dwwm0ijybi0m7imy1p";
+  version = "3.4";
+  sha256 = "0img4288ygil36bsgpr4yh06zfbp3mdkf7zbyqjcrjgpr4mai9zf";
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/tools/system/hardlink/default.nix b/pkgs/tools/system/hardlink/default.nix
index ea062115402d..57e3e63ca896 100644
--- a/pkgs/tools/system/hardlink/default.nix
+++ b/pkgs/tools/system/hardlink/default.nix
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
   version = "1.3-4";
 
   src = fetchurl {
-    url = "http://pkgs.fedoraproject.org/cgit/rpms/hardlink.git/snapshot/hardlink-aa6325ac4e8100b8ac7d38c7f0bc2708e69bd855.tar.xz";
+    url = "http://src.fedoraproject.org/cgit/rpms/hardlink.git/snapshot/hardlink-aa6325ac4e8100b8ac7d38c7f0bc2708e69bd855.tar.xz";
     sha256 = "0g4hyrnd9hpykbf06qvvp3s4yyk7flbd95gilkf7r3w9vqiagvs2";
   };
 
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
   meta = with stdenv.lib; {
     description = "Consolidate duplicate files via hardlinks";
     homepage = https://pagure.io/hardlink;
-    repositories.git = http://pkgs.fedoraproject.org/cgit/rpms/hardlink.git;
+    repositories.git = http://src.fedoraproject.org/cgit/rpms/hardlink.git;
     license = licenses.gpl2Plus;
     platforms = platforms.unix;
   };
diff --git a/pkgs/tools/system/htop/default.nix b/pkgs/tools/system/htop/default.nix
index 750ff8e59ef2..992067da50f4 100644
--- a/pkgs/tools/system/htop/default.nix
+++ b/pkgs/tools/system/htop/default.nix
@@ -1,19 +1,24 @@
 { lib, fetchurl, stdenv, ncurses,
-IOKit }:
+IOKit, python }:
 
 stdenv.mkDerivation rec {
   name = "htop-${version}";
-  version = "2.0.2";
+  version = "2.1.0";
 
   src = fetchurl {
-    sha256 = "11zlwadm6dpkrlfvf3z3xll26yyffa7qrxd1w72y1kl0rgffk6qp";
     url = "http://hisham.hm/htop/releases/${version}/${name}.tar.gz";
+    sha256 = "0j07z0xm2gj1vzvbgh4323k4db9mr7drd7gw95mmpqi61ncvwq1j";
   };
 
+  nativeBuildInputs = [ python ];
   buildInputs =
     [ ncurses ] ++
     lib.optionals stdenv.isDarwin [ IOKit ];
 
+  prePatch = ''
+    patchShebangs scripts/MakeHeader.py
+  '';
+
   meta = with stdenv.lib; {
     description = "An interactive process viewer for Linux";
     homepage = https://hisham.hm/htop/;
diff --git a/pkgs/tools/system/pciutils/default.nix b/pkgs/tools/system/pciutils/default.nix
index 1139c49ddf80..3cd00b3394cf 100644
--- a/pkgs/tools/system/pciutils/default.nix
+++ b/pkgs/tools/system/pciutils/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ zlib kmod which ];
 
-  makeFlags = "SHARED=yes PREFIX=\${out}";
+  makeFlags = [ "SHARED=yes" "PREFIX=\${out}" "STRIP=" "HOST=${stdenv.hostPlatform.system}" "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ];
 
   installTargets = "install install-lib";
 
diff --git a/pkgs/tools/system/smartmontools/default.nix b/pkgs/tools/system/smartmontools/default.nix
index 5fa55b275fe1..e5b2d54e585d 100644
--- a/pkgs/tools/system/smartmontools/default.nix
+++ b/pkgs/tools/system/smartmontools/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, autoreconfHook
+{ stdenv, fetchurl, fetchpatch, autoreconfHook
 , IOKit ? null , ApplicationServices ? null }:
 
 let
@@ -20,7 +20,14 @@ in stdenv.mkDerivation rec {
     sha256 = "0m1hllbb78rr6cxkbalmz1gqkl0psgq8rrmv4gwcmz34n07kvx2i";
   };
 
-  patches = [ ./smartmontools.patch ];
+  patches = [ ./smartmontools.patch ]
+    # https://www.smartmontools.org/changeset/4603
+    ++ stdenv.lib.optional stdenv.hostPlatform.isMusl (fetchpatch {
+      name = "musl-canonicalize_file_name.patch";
+      url = "https://www.smartmontools.org/changeset/4603?format=diff&new=4603";
+      sha256 = "06s9pcd95snjkrbfrsjby2lln3lnwjd21bgabmvr4p7fx19b75zp";
+      stripLen = 2;
+    });
   postPatch = "cp -v ${driverdb} drivedb.h";
 
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/pkgs/tools/system/supervise/default.nix b/pkgs/tools/system/supervise/default.nix
index c264b73b5023..81e3a2b8792b 100644
--- a/pkgs/tools/system/supervise/default.nix
+++ b/pkgs/tools/system/supervise/default.nix
@@ -3,11 +3,11 @@
 stdenv.mkDerivation rec {
 
   name = "supervise-${version}";
-  version = "1.2.0";
+  version = "1.4.0";
 
   src = fetchzip {
     url = "https://github.com/catern/supervise/releases/download/v${version}/supervise-${version}.tar.gz";
-    sha256 = "07v3197nf3jbx2w6jxzyk9b8p5qjj9irpr4jvv5lkfbi7s6rav3k";
+    sha256 = "0jk6q2f67pfs18ah040lmsbvbrnjap7w04jjddsfn1j5bcrvs13x";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/text/agrep/default.nix b/pkgs/tools/text/agrep/default.nix
index 5d6eed458c0d..10d3a47cc85e 100644
--- a/pkgs/tools/text/agrep/default.nix
+++ b/pkgs/tools/text/agrep/default.nix
@@ -12,6 +12,10 @@ stdenv.mkDerivation rec {
     sha256 = "14addnwspdf2mxpqyrw8b84bb2257y43g5ccy4ipgrr91fmxq2sk";
   };
 
+  # Related: https://github.com/Wikinaut/agrep/pull/11
+  prePatch = stdenv.lib.optionalString (stdenv.hostPlatform.isMusl || stdenv.isDarwin) ''
+    sed -i '1i#include <sys/stat.h>' checkfil.c newmgrep.c recursiv.c
+  '';
   installPhase = ''
     install -Dm 555 agrep -t "$out/bin"
     install -Dm 444 docs/* -t "$out/doc"
diff --git a/pkgs/tools/text/catdocx/default.nix b/pkgs/tools/text/catdocx/default.nix
new file mode 100644
index 000000000000..adf9d17815b0
--- /dev/null
+++ b/pkgs/tools/text/catdocx/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper, unzip, catdoc }:
+
+stdenv.mkDerivation {
+  name = "catdocx-20170102";
+
+  src = fetchFromGitHub {
+    owner = "jncraton";
+    repo = "catdocx";
+    rev = "04fa0416ec1f116d4996685e219f0856d99767cb";
+    sha256 = "1sxiqhkvdqn300ygfgxdry2dj2cqzjhkzw13c6349gg5vxfypcjh";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir -p $out/libexec $out/bin
+    cp catdocx.sh $out/libexec
+    chmod +x $out/libexec/catdocx.sh
+    wrapProgram $out/libexec/catdocx.sh --prefix PATH : "${lib.makeBinPath [ unzip catdoc ]}"
+    ln -s $out/libexec/catdocx.sh $out/bin/catdocx
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Extracts plain text from docx files";
+    homepage = https://github.com/jncraton/catdocx;
+    license = with licenses; [ bsd3 ];
+    maintainers = [ maintainers.michalrus ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/text/fanficfare/default.nix b/pkgs/tools/text/fanficfare/default.nix
index 37447d0fb2ae..2af9baeb5c51 100644
--- a/pkgs/tools/text/fanficfare/default.nix
+++ b/pkgs/tools/text/fanficfare/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, python27Packages }:
 
 python27Packages.buildPythonApplication rec {
-  version = "2.16.0";
+  version = "2.22.0";
   name = "fanficfare-${version}";
   nameprefix = "";
 
   src = fetchurl {
     url = "https://github.com/JimmXinu/FanFicFare/archive/v${version}.tar.gz";
-    sha256 = "0c31z7w4b3wz5nahsmnfhvp3srprfsqbp3zyngw4cqw3dm17kvvi";
+    sha256 = "1gwr2qk0wff8f69w21ffj6cq8jklqd89vcdhhln6ii1h1kf8k031";
   };
 
   propagatedBuildInputs = with python27Packages; [ beautifulsoup4 chardet html5lib html2text ];
diff --git a/pkgs/tools/text/gnupatch/default.nix b/pkgs/tools/text/gnupatch/default.nix
index dfdb25438cfe..3840811a3e36 100644
--- a/pkgs/tools/text/gnupatch/default.nix
+++ b/pkgs/tools/text/gnupatch/default.nix
@@ -4,11 +4,11 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "patch-2.7.5";
+  name = "patch-2.7.6";
 
   src = fetchurl {
     url = "mirror://gnu/patch/${name}.tar.xz";
-    sha256 = "16d2r9kpivaak948mxzc0bai45mqfw73m113wrkmbffnalv1b5gx";
+    sha256 = "1zfqy4rdcy279vwn2z1kbv19dcfw25d2aqy9nzvdkq5bjzd0nqdc";
   };
 
   buildInputs = stdenv.lib.optional doCheck ed;
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
     "ac_cv_func_strnlen_working=yes"
   ];
 
-  doCheck = true; # not cross;
+  doCheck = hostPlatform.libc != "musl"; # not cross;
 
   meta = {
     description = "GNU Patch, a program to apply differences to files";
diff --git a/pkgs/tools/text/groff/default.nix b/pkgs/tools/text/groff/default.nix
index b11f3cb4b8cd..6d01c42f93d1 100644
--- a/pkgs/tools/text/groff/default.nix
+++ b/pkgs/tools/text/groff/default.nix
@@ -2,6 +2,7 @@
 , ghostscript #for postscript and html output
 , psutils, netpbm #for html output
 , buildPackages
+, autoreconfHook
 }:
 
 stdenv.mkDerivation rec {
@@ -17,6 +18,8 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = false;
 
+  patches = [ ./look-for-ar.patch ];
+
   postPatch = stdenv.lib.optionalString (psutils != null) ''
     substituteInPlace src/preproc/html/pre-html.cpp \
       --replace "psselect" "${psutils}/bin/psselect"
@@ -32,6 +35,7 @@ stdenv.mkDerivation rec {
   '';
 
   buildInputs = [ ghostscript psutils netpbm perl ];
+  nativeBuildInputs = [ autoreconfHook ];
 
   # Builds running without a chroot environment may detect the presence
   # of /usr/X11 in the host system, leading to an impure build of the
@@ -42,6 +46,8 @@ stdenv.mkDerivation rec {
     "--without-x"
   ] ++ stdenv.lib.optionals (ghostscript != null) [
     "--with-gs=${ghostscript}/bin/gs"
+  ] ++ stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "ac_cv_path_PERL=${perl}/bin/perl"
   ];
 
   doCheck = true;
diff --git a/pkgs/tools/text/groff/look-for-ar.patch b/pkgs/tools/text/groff/look-for-ar.patch
new file mode 100644
index 000000000000..3b4d09c260fa
--- /dev/null
+++ b/pkgs/tools/text/groff/look-for-ar.patch
@@ -0,0 +1,39 @@
+commit 988a001f969262089579958827652da00fda096f
+Author: Ben Gamari <ben@smart-cactus.org>
+Date:   Tue Oct 17 16:15:20 2017 -0400
+
+    Look for AR
+
+diff --git a/Makefile.in b/Makefile.in
+index bc156ce..cc02126 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -464,7 +464,7 @@ INSTALL_SCRIPT=@INSTALL_SCRIPT@
+ INSTALL_DATA=@INSTALL_DATA@
+ INSTALL_INFO=@INSTALL_INFO@
+ LN_S=@LN_S@
+-AR=ar
++AR=@AR@
+ ETAGS=etags
+ ETAGSFLAGS=
+ # Flag that tells etags to assume C++.
+diff --git a/configure.ac b/configure.ac
+index c779165..6d53f5e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -45,6 +45,7 @@ AC_PREREQ([2.62])
+ 
+ AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin])
+ AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp])
++AC_CONFIG_MACRO_DIR([m4])
+ 
+ AC_USE_SYSTEM_EXTENSIONS
+ 
+@@ -73,6 +74,7 @@ GROFF_PROG_YACC
+ GROFF_DOC_CHECK
+ GROFF_MAKEINFO
+ AC_PROG_RANLIB
++AC_CHECK_TOOL([AR], [ar], [ar])
+ GROFF_INSTALL_SH
+ GROFF_INSTALL_INFO
+ AC_PROG_INSTALL
diff --git a/pkgs/tools/text/replace/default.nix b/pkgs/tools/text/replace/default.nix
index 2719a4c81915..9242014cdca5 100644
--- a/pkgs/tools/text/replace/default.nix
+++ b/pkgs/tools/text/replace/default.nix
@@ -8,6 +8,8 @@ stdenv.mkDerivation {
     sha256 = "1c2nkxx83vmlh1v3ib6r2xqh121gdb1rharwsimcb2h0xwc558dm";
   };
 
+  outputs = [ "out" "man" ];
+
   makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man";
 
   preBuild = ''
diff --git a/pkgs/tools/text/ripgrep/default.nix b/pkgs/tools/text/ripgrep/default.nix
index 9a93ec2d7674..11355bb6df1d 100644
--- a/pkgs/tools/text/ripgrep/default.nix
+++ b/pkgs/tools/text/ripgrep/default.nix
@@ -1,23 +1,28 @@
-{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper }:
+{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper, asciidoc, docbook_xsl, libxslt  }:
 
-with rustPlatform;
-
-buildRustPackage rec {
+rustPlatform.buildRustPackage rec {
   name = "ripgrep-${version}";
-  version = "0.7.1";
+  version = "0.8.1";
 
   src = fetchFromGitHub {
     owner = "BurntSushi";
     repo = "ripgrep";
     rev = "${version}";
-    sha256 = "0z3f83vhy464k93bc55i9lr6z41163q96if938p9ndhx2q3a20ql";
+    sha256 = "1h7k9ik723qzplwl0a5i0anzdr115wwklfgp0n11p4k2ckh7nygn";
   };
 
-  cargoSha256 = "1d6s01gmyfzb0vdf7flq6nvlapwcgbj0mzcprzyg4nj5gjkvznrn";
+  cargoSha256 = "1gld93dxfm4vyiz1b43smbdhxmyzdk2236ksp8vw1zb1yyzn83nf";
+
+  nativeBuildInputs = [ asciidoc docbook_xsl libxslt ];
 
   preFixup = ''
     mkdir -p "$out/man/man1"
-    cp "$src/doc/rg.1" "$out/man/man1"
+    cp target/release/build/ripgrep-*/out/rg.1 "$out/man/man1/"
+
+    mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
+    cp target/release/build/ripgrep-*/out/rg.bash "$out/share/bash-completion/completions/"
+    cp target/release/build/ripgrep-*/out/rg.fish "$out/share/fish/vendor_completions.d/"
+    cp "$src/complete/_rg" "$out/share/zsh/site-functions/"
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/text/shocco/default.nix b/pkgs/tools/text/shocco/default.nix
new file mode 100644
index 000000000000..97c677a7f701
--- /dev/null
+++ b/pkgs/tools/text/shocco/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub, perlPackages, pythonPackages }:
+
+stdenv.mkDerivation rec {
+  name = "shocco-${version}";
+  version = "1.0";
+
+  src = fetchFromGitHub {
+    owner = "rtomayko";
+    repo = "shocco";
+    rev = version;
+    sha256 = "1nkwcw9fqf4vyrwidqi6by7nrmainkjqkirkz3yxmzk6kzwr38mi";
+  };
+
+  prePatch = ''
+    # Don't change $PATH
+    substituteInPlace configure --replace PATH= NIRVANA=
+  '';
+
+  buildInputs = [ perlPackages.TextMarkdown pythonPackages.pygments ];
+
+  meta = with stdenv.lib; {
+    description = "A quick-and-dirty, literate-programming-style documentation generator for / in POSIX shell";
+    homepage = https://rtomayko.github.io/shocco/;
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/pkgs/tools/typesetting/asciidoctor/default.nix b/pkgs/tools/typesetting/asciidoctor/default.nix
index f494f1911593..02b57ee3a13b 100644
--- a/pkgs/tools/typesetting/asciidoctor/default.nix
+++ b/pkgs/tools/typesetting/asciidoctor/default.nix
@@ -1,12 +1,18 @@
-{ stdenv, lib, bundlerEnv, ruby, curl }:
-
-bundlerEnv {
-  pname = "asciidoctor";
+{ stdenv, lib, bundlerApp, ruby, curl }:
 
+bundlerApp {
   inherit ruby;
-
+  pname = "asciidoctor";
   gemdir = ./.;
 
+  exes = [
+    "asciidoctor"
+    "asciidoctor-bespoke"
+    "asciidoctor-latex"
+    "asciidoctor-pdf"
+    "asciidoctor-safe"
+  ];
+
   meta = with lib; {
     description = "A faster Asciidoc processor written in Ruby";
     homepage = http://asciidoctor.org/;
diff --git a/pkgs/tools/video/flvtool2/default.nix b/pkgs/tools/video/flvtool2/default.nix
index 9a60ebf17be8..dab4bf44a6f9 100644
--- a/pkgs/tools/video/flvtool2/default.nix
+++ b/pkgs/tools/video/flvtool2/default.nix
@@ -1,13 +1,14 @@
-{ buildRubyGem, lib, ruby_2_2 }:
+{ buildRubyGem, lib, ruby }:
 
 buildRubyGem rec {
-  ruby = ruby_2_2;
+  inherit ruby;
   name = "${gemName}-${version}";
   gemName = "flvtool2";
   version = "1.0.6";
   source.sha256 = "0xsla1061pi4ryh3jbvwsbs8qchprchbqjy7652g2g64v37i74qj";
 
   meta = {
+    broken = true; # depends on ruby 2.2
     homepage = https://github.com/unnu/flvtool2;
     description = "A tool to manipulate Macromedia Flash Video files";
     platforms = ruby.meta.platforms;
diff --git a/pkgs/tools/virtualization/awsebcli/default.nix b/pkgs/tools/virtualization/awsebcli/default.nix
index 25752afd995b..f380b62e6a49 100644
--- a/pkgs/tools/virtualization/awsebcli/default.nix
+++ b/pkgs/tools/virtualization/awsebcli/default.nix
@@ -34,16 +34,6 @@ let
           };
         });
 
-      pathspec = super.pathspec.overridePythonAttrs (oldAttrs: rec {
-        version = "0.5.0";
-
-        src = super.fetchPypi {
-          inherit (oldAttrs) pname;
-          inherit version;
-          sha256 = "07yx1gxj9v1iyyiy5fhq2wsmh4qfbrx158wi7jb0nx6lah80ffma";
-        };
-      });
-
       requests = super.requests.overridePythonAttrs (oldAttrs: rec {
         version = "2.9.1";
 
@@ -77,11 +67,11 @@ let
 in with localPython.pkgs; buildPythonApplication rec {
   name = "${pname}-${version}";
   pname = "awsebcli";
-  version = "3.12.1";
+  version = "3.12.3";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "12v3zz69iql4ggiz9x7h27vyq9y9jlm46yczxyg62j89m2iyr5bl";
+    sha256 = "0jj6xhvsrgvc5pm05zbd95zvx36ssywq70j6q1kzcdv1flfzzyp9";
   };
 
   checkInputs = [
diff --git a/pkgs/tools/virtualization/govc/default.nix b/pkgs/tools/virtualization/govc/default.nix
new file mode 100644
index 000000000000..527c47ffc34c
--- /dev/null
+++ b/pkgs/tools/virtualization/govc/default.nix
@@ -0,0 +1,24 @@
+{ lib, fetchFromGitHub, buildGoPackage }:
+  
+buildGoPackage rec {
+  name = "govc-${version}";
+  version = "0.16.0";
+
+  goPackagePath = "github.com/vmware/govmomi";
+
+  subPackages = [ "govc" ];
+
+  src = fetchFromGitHub {
+    rev = "v${version}";
+    owner = "vmware";
+    repo = "govmomi";
+    sha256 = "09fllx7l2hsjrv1jl7g06xngjy0xwn5n5zng6x8dspgsl6kblyqp";
+  };
+
+  meta = {
+    description = "A vSphere CLI built on top of govmomi";
+    homepage = https://github.com/vmware/govmomi/tree/master/govc;
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ nicknovitski ];
+  };
+}