about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lib/deprecated.nix8
-rw-r--r--lib/lists.nix14
-rw-r--r--lib/maintainers.nix4
-rw-r--r--lib/modules.nix2
-rw-r--r--lib/strings.nix4
-rw-r--r--lib/types.nix8
-rwxr-xr-xmaintainers/scripts/update-python-libraries3
-rw-r--r--nixos/modules/misc/ids.nix2
-rw-r--r--nixos/modules/misc/meta.nix2
-rw-r--r--nixos/modules/module-list.nix4
-rw-r--r--nixos/modules/services/audio/mpd.nix9
-rw-r--r--nixos/modules/services/cluster/kubernetes.nix2
-rw-r--r--nixos/modules/services/logging/heartbeat.nix72
-rw-r--r--nixos/modules/services/monitoring/collectd.nix36
-rw-r--r--nixos/modules/services/networking/libreswan.nix2
-rw-r--r--nixos/modules/services/networking/networkmanager.nix2
-rw-r--r--nixos/modules/services/web-servers/lighttpd/collectd.nix58
-rw-r--r--nixos/modules/services/x11/xserver.nix58
-rw-r--r--pkgs/applications/audio/dr14_tmeter/default.nix29
-rw-r--r--pkgs/applications/audio/drumgizmo/default.nix10
-rw-r--r--pkgs/applications/editors/kdevelop5/kdevplatform.nix4
-rw-r--r--pkgs/applications/graphics/guetzli/default.nix29
-rw-r--r--pkgs/applications/graphics/mypaint/default.nix39
-rw-r--r--pkgs/applications/graphics/sxiv/default.nix10
-rw-r--r--pkgs/applications/misc/krename/default.nix5
-rw-r--r--pkgs/applications/misc/noice/default.nix31
-rw-r--r--pkgs/applications/misc/pdfpc/default.nix4
-rw-r--r--pkgs/applications/misc/urlscan/default.nix16
-rw-r--r--pkgs/applications/misc/vifm/default.nix6
-rw-r--r--pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix15
-rw-r--r--pkgs/applications/networking/cluster/terraform/default.nix6
-rw-r--r--pkgs/applications/networking/mailreaders/notmuch/default.nix4
-rw-r--r--pkgs/applications/networking/p2p/ktorrent/default.nix4
-rw-r--r--pkgs/applications/networking/p2p/qbittorrent/default.nix12
-rw-r--r--pkgs/applications/office/skrooge/default.nix7
-rw-r--r--pkgs/applications/version-management/gogs/default.nix4
-rw-r--r--pkgs/applications/video/makemkv/default.nix6
-rw-r--r--pkgs/applications/virtualization/virtualbox/default.nix2
-rw-r--r--pkgs/applications/virtualization/virtualbox/guest-additions/default.nix3
-rw-r--r--pkgs/applications/virtualization/virtualbox/linux-4.12.patch80
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git1
-rw-r--r--pkgs/data/icons/papirus-icon-theme/default.nix28
-rw-r--r--pkgs/desktops/gnome-3/extensions/caffeine/default.nix36
-rw-r--r--pkgs/desktops/gnome-3/extensions/topicons-plus/default.nix26
-rw-r--r--pkgs/development/compilers/gcc/6/darwin-const-correct.patch25
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix9
-rw-r--r--pkgs/development/compilers/haxe/default.nix98
-rw-r--r--pkgs/development/compilers/haxe/hxcpp.nix52
-rw-r--r--pkgs/development/compilers/haxe/setup-hook.sh2
-rw-r--r--pkgs/development/compilers/neko/default.nix6
-rw-r--r--pkgs/development/compilers/wla-dx/default.nix7
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix2
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix8
-rw-r--r--pkgs/development/haskell-modules/hackage-packages.nix963
-rw-r--r--pkgs/development/libraries/kirigami/default.nix4
-rw-r--r--pkgs/development/libraries/libbsd/default.nix4
-rw-r--r--pkgs/development/libraries/libunwind/default.nix4
-rw-r--r--pkgs/development/libraries/libunwind/version-1.2.1.patch13
-rw-r--r--pkgs/development/libraries/openslp/default.nix6
-rw-r--r--pkgs/development/libraries/utf8proc/default.nix4
-rw-r--r--pkgs/development/libraries/wlc/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/csv/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/eliom/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/git-http/default.nix19
-rw-r--r--pkgs/development/ocaml-modules/git-unix/default.nix21
-rw-r--r--pkgs/development/ocaml-modules/inotify/default.nix36
-rw-r--r--pkgs/development/ocaml-modules/lablgl/default.nix1
-rw-r--r--pkgs/development/ocaml-modules/lambda-term/1.6.nix4
-rw-r--r--pkgs/development/ocaml-modules/lambda-term/default.nix17
-rw-r--r--pkgs/development/ocaml-modules/lwt/default.nix34
-rw-r--r--pkgs/development/ocaml-modules/lwt_react/default.nix21
-rw-r--r--pkgs/development/ocaml-modules/ocsigen-server/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/pgocaml/default.nix6
-rw-r--r--pkgs/development/python-modules/channels/default.nix4
-rw-r--r--pkgs/development/python-modules/codecov/default.nix26
-rw-r--r--pkgs/development/python-modules/django_guardian.nix4
-rw-r--r--pkgs/development/python-modules/dogpile.cache/default.nix8
-rw-r--r--pkgs/development/python-modules/jupyter_client/default.nix4
-rw-r--r--pkgs/development/python-modules/markdownsuperscript/default.nix22
-rw-r--r--pkgs/development/tools/analysis/flow/default.nix4
-rw-r--r--pkgs/development/tools/google-app-engine-go-sdk/default.nix6
-rw-r--r--pkgs/development/tools/haskell/tinc/default.nix11
-rw-r--r--pkgs/development/tools/misc/csmith/default.nix48
-rw-r--r--pkgs/development/tools/ocaml/js_of_ocaml/default.nix4
-rw-r--r--pkgs/development/tools/ocaml/utop/default.nix4
-rw-r--r--pkgs/development/tools/yarn/default.nix4
-rw-r--r--pkgs/development/web/mailcatcher/Gemfile2
-rw-r--r--pkgs/development/web/mailcatcher/Gemfile.lock43
-rw-r--r--pkgs/development/web/mailcatcher/default.nix33
-rw-r--r--pkgs/development/web/mailcatcher/gemset.nix106
-rw-r--r--pkgs/games/factorio/default.nix11
-rw-r--r--pkgs/games/uqm/default.nix2
-rw-r--r--pkgs/misc/cups/drivers/splix/default.nix2
-rw-r--r--pkgs/os-specific/linux/iw/default.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/common-config.nix2
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.12.nix19
-rw-r--r--pkgs/os-specific/linux/kmod-debian-aliases/default.nix2
-rw-r--r--pkgs/os-specific/linux/psmisc/default.nix4
-rw-r--r--pkgs/os-specific/linux/zfs/default.nix4
-rw-r--r--pkgs/servers/emby/default.nix4
-rw-r--r--pkgs/servers/mail/postfix/default.nix10
-rw-r--r--pkgs/servers/sql/mariadb/default.nix3
-rw-r--r--pkgs/servers/unifi/default.nix6
-rw-r--r--pkgs/stdenv/booter.nix2
-rwxr-xr-xpkgs/tools/admin/google-cloud-sdk/alpha__init__.py23
-rwxr-xr-xpkgs/tools/admin/google-cloud-sdk/beta__init__.py23
-rw-r--r--pkgs/tools/admin/google-cloud-sdk/default.nix7
-rw-r--r--pkgs/tools/archivers/p7zip/default.nix7
-rw-r--r--pkgs/tools/filesystems/ntfs-3g/default.nix2
-rw-r--r--pkgs/tools/misc/cpuminer/default.nix4
-rw-r--r--pkgs/tools/misc/fsql/default.nix4
-rw-r--r--pkgs/tools/misc/fzf/default.nix1
-rw-r--r--pkgs/tools/misc/partition-manager/default.nix4
-rw-r--r--pkgs/tools/misc/x11idle/default.nix33
-rw-r--r--pkgs/tools/networking/burpsuite/default.nix4
-rw-r--r--pkgs/tools/networking/iperf/3.nix4
-rw-r--r--pkgs/tools/networking/offlineimap/default.nix4
-rw-r--r--pkgs/tools/networking/ucspi-tcp/default.nix1
-rw-r--r--pkgs/tools/networking/ucspi-tcp/remove-setuid.patch15
-rw-r--r--pkgs/tools/security/afl/default.nix4
-rw-r--r--pkgs/tools/text/kdiff3/default.nix4
-rw-r--r--pkgs/top-level/all-packages.nix58
-rw-r--r--pkgs/top-level/haxe-packages.nix120
-rw-r--r--pkgs/top-level/ocaml-packages.nix38
-rw-r--r--pkgs/top-level/perl-packages.nix9
-rw-r--r--pkgs/top-level/python-packages.nix103
126 files changed, 2313 insertions, 660 deletions
diff --git a/lib/deprecated.nix b/lib/deprecated.nix
index 983e8d26892bf..d4e78c39250cf 100644
--- a/lib/deprecated.nix
+++ b/lib/deprecated.nix
@@ -423,4 +423,12 @@ rec {
       else if isInt x then "int"
       else "string";
 
+  /* deprecated:
+
+     For historical reasons, imap has an index starting at 1.
+
+     But for consistency with the rest of the library we want an index
+     starting at zero.
+  */
+  imap = imap1;
 }
diff --git a/lib/lists.nix b/lib/lists.nix
index fd746f4f97b1f..a04b1b278935a 100644
--- a/lib/lists.nix
+++ b/lib/lists.nix
@@ -77,15 +77,21 @@ rec {
   */
   foldl' = builtins.foldl' or foldl;
 
-  /* Map with index
+  /* Map with index starting from 0
 
-     FIXME(zimbatm): why does this start to count at 1?
+     Example:
+       imap0 (i: v: "${v}-${toString i}") ["a" "b"]
+       => [ "a-0" "b-1" ]
+  */
+  imap0 = f: list: genList (n: f n (elemAt list n)) (length list);
+
+  /* Map with index starting from 1
 
      Example:
-       imap (i: v: "${v}-${toString i}") ["a" "b"]
+       imap1 (i: v: "${v}-${toString i}") ["a" "b"]
        => [ "a-1" "b-2" ]
   */
-  imap = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
+  imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
 
   /* Map and concatenate the result.
 
diff --git a/lib/maintainers.nix b/lib/maintainers.nix
index 711695d7faef6..c43096deb2931 100644
--- a/lib/maintainers.nix
+++ b/lib/maintainers.nix
@@ -16,6 +16,7 @@
   acowley = "Anthony Cowley <acowley@gmail.com>";
   adelbertc = "Adelbert Chang <adelbertc@gmail.com>";
   adev = "Adrien Devresse <adev@adev.name>";
+  adisbladis = "Adam Hose <adis@blad.is>";
   Adjective-Object = "Maxwell Huang-Hobbs <mhuan13@gmail.com>";
   adnelson = "Allen Nelson <ithinkican@gmail.com>";
   adolfogc = "Adolfo E. García Castro <adolfo.garcia.cr@gmail.com>";
@@ -267,6 +268,7 @@
   jpierre03 = "Jean-Pierre PRUNARET <nix@prunetwork.fr>";
   jpotier = "Martin Potier <jpo.contributes.to.nixos@marvid.fr>";
   jraygauthier = "Raymond Gauthier <jraygauthier@gmail.com>";
+  jtojnar = "Jan Tojnar <jtojnar@gmail.com>";
   juliendehos = "Julien Dehos <dehos@lisic.univ-littoral.fr>";
   jwiegley = "John Wiegley <johnw@newartisans.com>";
   jwilberding = "Jordan Wilberding <jwilberding@afiniate.com>";
@@ -530,6 +532,7 @@
   steveej = "Stefan Junker <mail@stefanjunker.de>";
   SuprDewd = "Bjarki Ágúst Guðmundsson <suprdewd@gmail.com>";
   swarren83 = "Shawn Warren <shawn.w.warren@gmail.com>";
+  swflint = "Samuel W. Flint <swflint@flintfam.org>";
   swistak35 = "Rafał Łasocha <me@swistak35.com>";
   szczyp = "Szczyp <qb@szczyp.com>";
   sztupi = "Attila Sztupak <attila.sztupak@gmail.com>";
@@ -605,6 +608,7 @@
   z77z = "Marco Maggesi <maggesi@math.unifi.it>";
   zagy = "Christian Zagrodnick <cz@flyingcircus.io>";
   zalakain = "Unai Zalakain <contact@unaizalakain.info>";
+  zarelit = "David Costa <david@zarel.net>";
   zauberpony = "Elmar Athmer <elmar@athmer.org>";
   zef = "Zef Hemel <zef@zef.me>";
   zimbatm = "zimbatm <zimbatm@zimbatm.com>";
diff --git a/lib/modules.nix b/lib/modules.nix
index 91e2eae0595e3..3da689a6bdb00 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -98,7 +98,7 @@ rec {
   /* Close a set of modules under the ‘imports’ relation. */
   closeModules = modules: args:
     let
-      toClosureList = file: parentKey: imap (n: x:
+      toClosureList = file: parentKey: imap1 (n: x:
         if isAttrs x || isFunction x then
           let key = "${parentKey}:anon-${toString n}"; in
           unifyModuleSyntax file key (unpackSubmodule (applyIfFunction key) x args)
diff --git a/lib/strings.nix b/lib/strings.nix
index 1cc633c729dcc..a03694d1b1d72 100644
--- a/lib/strings.nix
+++ b/lib/strings.nix
@@ -33,7 +33,7 @@ rec {
        concatImapStrings (pos: x: "${toString pos}-${x}") ["foo" "bar"]
        => "1-foo2-bar"
   */
-  concatImapStrings = f: list: concatStrings (lib.imap f list);
+  concatImapStrings = f: list: concatStrings (lib.imap1 f list);
 
   /* Place an element between each element of a list
 
@@ -70,7 +70,7 @@ rec {
        concatImapStringsSep "-" (pos: x: toString (x / pos)) [ 6 6 6 ]
        => "6-3-2"
   */
-  concatImapStringsSep = sep: f: list: concatStringsSep sep (lib.imap f list);
+  concatImapStringsSep = sep: f: list: concatStringsSep sep (lib.imap1 f list);
 
   /* Construct a Unix-style search path consisting of each `subDir"
      directory of the given list of packages.
diff --git a/lib/types.nix b/lib/types.nix
index 50aa6d7708528..a7dcd3f1e1c77 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -179,9 +179,9 @@ rec {
       description = "list of ${elemType.description}s";
       check = isList;
       merge = loc: defs:
-        map (x: x.value) (filter (x: x ? value) (concatLists (imap (n: def:
+        map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
           if isList def.value then
-            imap (m: def':
+            imap1 (m: def':
               (mergeDefinitions
                 (loc ++ ["[definition ${toString n}-entry ${toString m}]"])
                 elemType
@@ -220,7 +220,7 @@ rec {
           if isList def.value then
             { inherit (def) file;
               value = listToAttrs (
-                imap (elemIdx: elem:
+                imap1 (elemIdx: elem:
                   { name = elem.name or "unnamed-${toString defIdx}.${toString elemIdx}";
                     value = elem;
                   }) def.value);
@@ -233,7 +233,7 @@ rec {
         name = "loaOf";
         description = "list or attribute set of ${elemType.description}s";
         check = x: isList x || isAttrs x;
-        merge = loc: defs: attrOnly.merge loc (imap convertIfList defs);
+        merge = loc: defs: attrOnly.merge loc (imap1 convertIfList defs);
         getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["<name?>"]);
         getSubModules = elemType.getSubModules;
         substSubModules = m: loaOf (elemType.substSubModules m);
diff --git a/maintainers/scripts/update-python-libraries b/maintainers/scripts/update-python-libraries
index 278c467b0542c..d06dee1509946 100755
--- a/maintainers/scripts/update-python-libraries
+++ b/maintainers/scripts/update-python-libraries
@@ -91,7 +91,8 @@ def _get_latest_version_pypi(package, extension):
         if release['filename'].endswith(extension):
             # TODO: In case of wheel we need to do further checks!
             sha256 = release['digests']['sha256']
-
+    else:
+        sha256 = None
     return version, sha256
 
 
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix
index 22059bb7fbbb4..5ac5764cd7cba 100644
--- a/nixos/modules/misc/ids.nix
+++ b/nixos/modules/misc/ids.nix
@@ -166,7 +166,7 @@
       dnsmasq = 141;
       uhub = 142;
       yandexdisk = 143;
-      collectd = 144;
+      #collectd = 144; #unused
       consul = 145;
       mailpile = 146;
       redmine = 147;
diff --git a/nixos/modules/misc/meta.nix b/nixos/modules/misc/meta.nix
index 6a5738e47ff35..7a1e751394c0a 100644
--- a/nixos/modules/misc/meta.nix
+++ b/nixos/modules/misc/meta.nix
@@ -17,7 +17,7 @@ let
     #   }
     merge = loc: defs:
       zipAttrs
-        (flatten (imap (n: def: imap (m: def':
+        (flatten (imap1 (n: def: imap1 (m: def':
           maintainer.merge (loc ++ ["[${toString n}-${toString m}]"])
             [{ inherit (def) file; value = def'; }]) def.value) defs));
   };
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 59419a5e8c565..1f6b7caba81f9 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -235,16 +235,17 @@
   ./services/hardware/udisks2.nix
   ./services/hardware/upower.nix
   ./services/hardware/thermald.nix
+  ./services/logging/SystemdJournal2Gelf.nix
   ./services/logging/awstats.nix
   ./services/logging/fluentd.nix
   ./services/logging/graylog.nix
+  ./services/logging/heartbeat.nix
   ./services/logging/journalbeat.nix
   ./services/logging/klogd.nix
   ./services/logging/logcheck.nix
   ./services/logging/logrotate.nix
   ./services/logging/logstash.nix
   ./services/logging/rsyslogd.nix
-  ./services/logging/SystemdJournal2Gelf.nix
   ./services/logging/syslog-ng.nix
   ./services/logging/syslogd.nix
   ./services/mail/dovecot.nix
@@ -586,6 +587,7 @@
   ./services/web-servers/fcgiwrap.nix
   ./services/web-servers/jboss/default.nix
   ./services/web-servers/lighttpd/cgit.nix
+  ./services/web-servers/lighttpd/collectd.nix
   ./services/web-servers/lighttpd/default.nix
   ./services/web-servers/lighttpd/gitweb.nix
   ./services/web-servers/lighttpd/inginious.nix
diff --git a/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix
index 56af8fe152e02..11628781bbd87 100644
--- a/nixos/modules/services/audio/mpd.nix
+++ b/nixos/modules/services/audio/mpd.nix
@@ -10,9 +10,11 @@ let
   gid = config.ids.gids.mpd;
   cfg = config.services.mpd;
 
+  playlistDir = "${cfg.dataDir}/playlists";
+
   mpdConf = pkgs.writeText "mpd.conf" ''
     music_directory     "${cfg.musicDirectory}"
-    playlist_directory  "${cfg.dataDir}/playlists"
+    playlist_directory  "${playlistDir}"
     db_file             "${cfg.dbFile}"
     state_file          "${cfg.dataDir}/state"
     sticker_file        "${cfg.dataDir}/sticker.sql"
@@ -126,7 +128,10 @@ in {
       description = "Music Player Daemon";
       wantedBy = [ "multi-user.target" ];
 
-      preStart = "mkdir -p ${cfg.dataDir} && chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}";
+      preStart = ''
+        mkdir -p "${cfg.dataDir}" && chown -R ${cfg.user}:${cfg.group} "${cfg.dataDir}"
+        mkdir -p "${playlistDir}" && chown -R ${cfg.user}:${cfg.group} "${playlistDir}"
+      '';
       serviceConfig = {
         User = "${cfg.user}";
         PermissionsStartOnly = true;
diff --git a/nixos/modules/services/cluster/kubernetes.nix b/nixos/modules/services/cluster/kubernetes.nix
index 68917af5094c8..4c9d9aad0e2dc 100644
--- a/nixos/modules/services/cluster/kubernetes.nix
+++ b/nixos/modules/services/cluster/kubernetes.nix
@@ -44,7 +44,7 @@ let
 
   cniConfig = pkgs.buildEnv {
     name = "kubernetes-cni-config";
-    paths = imap (i: entry:
+    paths = imap1 (i: entry:
       pkgs.writeTextDir "${toString (10+i)}-${entry.type}.conf" (builtins.toJSON entry)
     ) cfg.kubelet.cni.config;
   };
diff --git a/nixos/modules/services/logging/heartbeat.nix b/nixos/modules/services/logging/heartbeat.nix
new file mode 100644
index 0000000000000..b595ac07bf5e7
--- /dev/null
+++ b/nixos/modules/services/logging/heartbeat.nix
@@ -0,0 +1,72 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.services.heartbeat;
+
+  heartbeatYml = pkgs.writeText "heartbeat.yml" ''
+    name: ${cfg.name}
+    tags: ${builtins.toJSON cfg.tags}
+
+    ${cfg.extraConfig}
+  '';
+
+in
+{
+  options = {
+
+    services.heartbeat = {
+
+      enable = mkEnableOption "heartbeat";
+
+      name = mkOption {
+        type = types.str;
+        default = "heartbeat";
+        description = "Name of the beat";
+      };
+
+      tags = mkOption {
+        type = types.listOf types.str;
+        default = [];
+        description = "Tags to place on the shipped log messages";
+      };
+
+      stateDir = mkOption {
+        type = types.str;
+        default = "/var/lib/heartbeat";
+        description = "The state directory. heartbeat's own logs and other data are stored here.";
+      };
+
+      extraConfig = mkOption {
+        type = types.lines;
+        default = ''
+          heartbeat.monitors:
+          - type: http
+            urls: ["http://localhost:9200"]
+            schedule: '@every 10s'
+        '';
+        description = "Any other configuration options you want to add";
+      };
+
+    };
+  };
+
+  config = mkIf cfg.enable {
+
+    systemd.services.heartbeat = with pkgs; {
+      description = "heartbeat log shipper";
+      wantedBy = [ "multi-user.target" ];
+      preStart = ''
+        mkdir -p "${cfg.stateDir}"/{data,logs}
+        chown nobody:nogroup "${cfg.stateDir}"/{data,logs}
+      '';
+      serviceConfig = {
+        User = "nobody";
+        PermissionsStartOnly = true;
+        AmbientCapabilities = "cap_net_raw";
+        ExecStart = "${pkgs.heartbeat}/bin/heartbeat -c \"${heartbeatYml}\" -path.data \"${cfg.stateDir}/data\" -path.logs \"${cfg.stateDir}/logs\"";
+      };
+    };
+  };
+}
diff --git a/nixos/modules/services/monitoring/collectd.nix b/nixos/modules/services/monitoring/collectd.nix
index 79a8a1ff5aed5..dfbac3446e035 100644
--- a/nixos/modules/services/monitoring/collectd.nix
+++ b/nixos/modules/services/monitoring/collectd.nix
@@ -7,7 +7,6 @@ let
 
   conf = pkgs.writeText "collectd.conf" ''
     BaseDir "${cfg.dataDir}"
-    PIDFile "${cfg.pidFile}"
     AutoLoadPlugin ${boolToString cfg.autoLoadPlugin}
     Hostname "${config.networking.hostName}"
 
@@ -26,13 +25,7 @@ let
 
 in {
   options.services.collectd = with types; {
-    enable = mkOption {
-      default = false;
-      description = ''
-        Whether to enable collectd agent.
-      '';
-      type = bool;
-    };
+    enable = mkEnableOption "collectd agent";
 
     package = mkOption {
       default = pkgs.collectd;
@@ -59,14 +52,6 @@ in {
       type = path;
     };
 
-    pidFile = mkOption {
-      default = "/var/run/collectd.pid";
-      description = ''
-        Location of collectd pid file.
-      '';
-      type = path;
-    };
-
     autoLoadPlugin = mkOption {
       default = false;
       description = ''
@@ -100,27 +85,20 @@ in {
       wantedBy = [ "multi-user.target" ];
 
       serviceConfig = {
-        ExecStart = "${cfg.package}/sbin/collectd -C ${conf} -P ${cfg.pidFile}";
-        Type = "forking";
-        PIDFile = cfg.pidFile;
-        User = optional (cfg.user!="root") cfg.user;
+        ExecStart = "${cfg.package}/sbin/collectd -C ${conf} -f";
+        User = cfg.user;
         PermissionsStartOnly = true;
       };
 
       preStart = ''
-        mkdir -p ${cfg.dataDir}
-        chmod 755 ${cfg.dataDir}
-        install -D /dev/null ${cfg.pidFile}
-        if [ "$(id -u)" = 0 ]; then
-          chown -R ${cfg.user} ${cfg.dataDir};
-          chown ${cfg.user} ${cfg.pidFile}
-        fi
+        mkdir -p "${cfg.dataDir}"
+        chmod 755 "${cfg.dataDir}"
+        chown -R ${cfg.user} "${cfg.dataDir}"
       '';
-    }; 
+    };
 
     users.extraUsers = optional (cfg.user == "collectd") {
       name = "collectd";
-      uid = config.ids.uids.collectd;
     };
   };
 }
diff --git a/nixos/modules/services/networking/libreswan.nix b/nixos/modules/services/networking/libreswan.nix
index c87e738d2a239..e7a6c565f4ff1 100644
--- a/nixos/modules/services/networking/libreswan.nix
+++ b/nixos/modules/services/networking/libreswan.nix
@@ -11,7 +11,7 @@ let
 
   trim = chars: str: let
       nonchars = filter (x : !(elem x.value chars))
-                  (imap (i: v: {ind = (sub i 1); value = v;}) (stringToCharacters str));
+                  (imap0 (i: v: {ind = i; value = v;}) (stringToCharacters str));
     in
       if length nonchars == 0 then ""
       else substring (head nonchars).ind (add 1 (sub (last nonchars).ind (head nonchars).ind)) str;
diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix
index 58c93d8e2ac3e..f1b3d298fecb9 100644
--- a/nixos/modules/services/networking/networkmanager.nix
+++ b/nixos/modules/services/networking/networkmanager.nix
@@ -253,7 +253,7 @@ in {
            { source = overrideNameserversScript;
              target = "NetworkManager/dispatcher.d/02overridedns";
            }
-      ++ lib.imap (i: s: {
+      ++ lib.imap1 (i: s: {
         inherit (s) source;
         target = "NetworkManager/dispatcher.d/${dispatcherTypesSubdirMap.${s.type}}03userscript${lib.fixedWidthNumber 4 i}";
       }) cfg.dispatcherScripts;
diff --git a/nixos/modules/services/web-servers/lighttpd/collectd.nix b/nixos/modules/services/web-servers/lighttpd/collectd.nix
new file mode 100644
index 0000000000000..35b5edced68b6
--- /dev/null
+++ b/nixos/modules/services/web-servers/lighttpd/collectd.nix
@@ -0,0 +1,58 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.services.lighttpd.collectd;
+
+  collectionConf = pkgs.writeText "collection.conf" ''
+    datadir: "${config.services.collectd.dataDir}"
+    libdir: "${config.services.collectd.package}/lib/collectd"
+  '';
+
+  defaultCollectionCgi = config.services.collectd.package.overrideDerivation(old: {
+    name = "collection.cgi";
+    configurePhase = "true";
+    buildPhase = "true";
+    installPhase = ''
+      substituteInPlace contrib/collection.cgi --replace '"/etc/collection.conf"' '$ENV{COLLECTION_CONF}'
+      cp contrib/collection.cgi $out
+    '';
+  });
+in
+{
+
+  options.services.lighttpd.collectd = {
+
+    enable = mkEnableOption "collectd subservice accessible at http://yourserver/collectd";
+
+    collectionCgi = mkOption {
+      type = types.path;
+      default = defaultCollectionCgi;
+      description = ''
+        Path to collection.cgi script from (collectd sources)/contrib/collection.cgi
+        This option allows to use a customized version
+      '';
+    };
+  };
+
+  config = mkIf cfg.enable {
+    services.lighttpd.enableModules = [ "mod_cgi" "mod_alias" "mod_setenv" ];
+
+    services.lighttpd.extraConfig = ''
+      $HTTP["url"] =~ "^/collectd" {
+        cgi.assign = (
+          ".cgi" => "${pkgs.perl}/bin/perl"
+        )
+        alias.url = (
+          "/collectd" => "${cfg.collectionCgi}"
+        )
+        setenv.add-environment = (
+          "PERL5LIB" => "${with pkgs; lib.makePerlPath [ perlPackages.CGI perlPackages.HTMLParser perlPackages.URI rrdtool ]}",
+          "COLLECTION_CONF" => "${collectionConf}"
+        )
+      }
+    '';
+  };
+
+}
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 01bab8fccadbe..638509e710be8 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -71,7 +71,7 @@ let
       name = "multihead${toString num}";
       inherit config;
     };
-  in imap mkHead cfg.xrandrHeads;
+  in imap1 mkHead cfg.xrandrHeads;
 
   xrandrDeviceSection = let
     monitors = flip map xrandrHeads (h: ''
@@ -651,25 +651,49 @@ in
     system.extraDependencies = singleton (pkgs.runCommand "xkb-layouts-exist" {
       inherit (cfg) layout xkbDir;
     } ''
-      if sed -n -e ':i /^! \(layout\|variant\) *$/ {
+      # We can use the default IFS here, because the layouts won't contain
+      # spaces or tabs and are ruled out by the sed expression below.
+      availableLayouts="$(
+        sed -n -e ':i /^! \(layout\|variant\) *$/ {
+          # Loop through all of the layouts/variants until we hit another ! at
+          # the start of the line or the line is empty ('t' branches only if
+          # the last substitution was successful, so if the line is empty the
+          # substition will fail).
           :l; n; /^!/bi; s/^ *\([^ ]\+\).*/\1/p; tl
-         }' "$xkbDir/rules/base.lst" | grep -qxF "$layout"
-      then
-        touch "$out"
-        exit 0
-      fi
-
-      cat >&2 <<-EOF
-
-      The selected keyboard layout definition does not exist:
-
-        $layout
+        }' "$xkbDir/rules/base.lst" | sort -u
+      )"
+
+      layoutNotFound() {
+        echo >&2
+        echo "The following layouts and variants are available:" >&2
+        echo >&2
+
+        # While an output width of 80 is more desirable for small terminals, we
+        # really don't know the amount of columns of the terminal from within
+        # the builder. The content in $availableLayouts however is pretty
+        # large, so let's opt for a larger width here, because it will print a
+        # smaller amount of lines on modern KMS/framebuffer terminals and won't
+        # lose information even in smaller terminals (it only will look a bit
+        # ugly).
+        echo "$availableLayouts" | ${pkgs.utillinux}/bin/column -c 150 >&2
+
+        echo >&2
+        echo "However, the keyboard layout definition in" \
+             "\`services.xserver.layout' contains the layout \`$1', which" \
+             "isn't a valid layout or variant." >&2
+        echo >&2
+        exit 1
+      }
 
-      Set \`services.xserver.layout' to the name of an existing keyboard
-      layout (check $xkbDir/rules/base.lst for options).
+      # Again, we don't need to take care of IFS, see the comment for
+      # $availableLayouts.
+      for l in ''${layout//,/ }; do
+        if ! echo "$availableLayouts" | grep -qxF "$l"; then
+          layoutNotFound "$l"
+        fi
+      done
 
-      EOF
-      exit 1
+      touch "$out"
     '');
 
     services.xserver.config =
diff --git a/pkgs/applications/audio/dr14_tmeter/default.nix b/pkgs/applications/audio/dr14_tmeter/default.nix
new file mode 100644
index 0000000000000..3e315e2d1a75f
--- /dev/null
+++ b/pkgs/applications/audio/dr14_tmeter/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, python3Packages, pkgs }:
+
+python3Packages.buildPythonApplication rec {
+  name = "dr14_tmeter-${version}";
+  version = "1.0.16";
+
+  disabled = !python3Packages.isPy3k;
+
+  src = fetchFromGitHub {
+    owner = "simon-r";
+    repo = "dr14_t.meter";
+    rev = "v${version}";
+    sha256 = "1nfsasi7kx0myxkahbd7rz8796mcf5nsadrsjjpx2kgaaw5nkv1m";
+  };
+
+  propagatedBuildInputs = with pkgs; [
+    python3Packages.numpy flac vorbis-tools ffmpeg faad2 lame
+  ];
+
+  # There are no tests
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Compute the DR14 of a given audio file according to the procedure described by the Pleasurize Music Foundation";
+    license = licenses.gpl3Plus;
+    homepage = http://dr14tmeter.sourceforge.net/;
+    maintainers = [ maintainers.adisbladis ];
+  };
+}
diff --git a/pkgs/applications/audio/drumgizmo/default.nix b/pkgs/applications/audio/drumgizmo/default.nix
index a52301c34d7d4..7a2e2a6da45b9 100644
--- a/pkgs/applications/audio/drumgizmo/default.nix
+++ b/pkgs/applications/audio/drumgizmo/default.nix
@@ -1,21 +1,21 @@
-{ stdenv, fetchurl, alsaLib, expat, glib, libjack2, libX11, libpng
+{ stdenv, fetchurl, alsaLib, expat, glib, libjack2, libXext, libX11, libpng
 , libpthreadstubs, libsmf, libsndfile, lv2, pkgconfig, zita-resampler
 }:
 
 stdenv.mkDerivation rec {
-  version = "0.9.12";
+  version = "0.9.14";
   name = "drumgizmo-${version}";
 
   src = fetchurl {
     url = "http://www.drumgizmo.org/releases/${name}/${name}.tar.gz";
-    sha256 = "0kqrss9v3vpznmh4jgi3783wmprr645s3i485jlvdscpysjfkh6z";
+    sha256 = "1q2jghjz0ygaja8dgvxp914if8yyzpa204amdcwb9yyinpxsahz4";
   };
 
   configureFlags = [ "--enable-lv2" ];
 
   buildInputs = [
-    alsaLib expat glib libjack2 libX11 libpng libpthreadstubs libsmf
-    libsndfile lv2 pkgconfig zita-resampler
+    alsaLib expat glib libjack2 libXext libX11 libpng libpthreadstubs
+    libsmf libsndfile lv2 pkgconfig zita-resampler
   ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/editors/kdevelop5/kdevplatform.nix b/pkgs/applications/editors/kdevelop5/kdevplatform.nix
index 3efc1335c075f..b7c0d0cf8554b 100644
--- a/pkgs/applications/editors/kdevelop5/kdevplatform.nix
+++ b/pkgs/applications/editors/kdevelop5/kdevplatform.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, fetchpatch, cmake, gettext, pkgconfig, extra-cmake-modules
-, boost, subversion, apr, aprutil
+, boost, subversion, apr, aprutil, kwindowsystem
 , qtscript, qtwebkit, grantlee, karchive, kconfig, kcoreaddons, kguiaddons, kiconthemes, ki18n
 , kitemmodels, kitemviews, kio, kparts, sonnet, kcmutils, knewstuff, knotifications
 , knotifyconfig, ktexteditor, threadweaver, kdeclarative, libkomparediff2 }:
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake gettext pkgconfig extra-cmake-modules ];
 
   buildInputs = [
-    boost subversion apr aprutil
+    boost subversion apr aprutil kwindowsystem
     qtscript qtwebkit grantlee karchive kconfig kcoreaddons kguiaddons kiconthemes
     ki18n kitemmodels kitemviews kio kparts sonnet kcmutils knewstuff
     knotifications knotifyconfig ktexteditor threadweaver kdeclarative
diff --git a/pkgs/applications/graphics/guetzli/default.nix b/pkgs/applications/graphics/guetzli/default.nix
new file mode 100644
index 0000000000000..c96ddc9879549
--- /dev/null
+++ b/pkgs/applications/graphics/guetzli/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, libpng, fetchFromGitHub, pkgconfig }:
+let
+  version = "1.0.1";
+in
+stdenv.mkDerivation {
+  name = "guetzli-${version}";
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "guetzli";
+    rev = "v${version}";
+    sha256 = "1wy9wfvyradp0aigfv8yijvj0dgb5kpq2yf2xki15f605jc1r5dm";
+  };
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libpng ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install bin/Release/guetzli $out/bin/
+  '';
+
+  meta = {
+    description = "Perceptual JPEG encoder";
+    longDescription = "Guetzli is a JPEG encoder that aims for excellent compression density at high visual quality.";
+    homepage = "https://github.com/google/guetzli";
+    license = stdenv.lib.licenses.asl20;
+    platforms = stdenv.lib.platforms.x86_64;
+    maintainers = [ stdenv.lib.maintainers.seppeljordan ];
+  };
+}
diff --git a/pkgs/applications/graphics/mypaint/default.nix b/pkgs/applications/graphics/mypaint/default.nix
index db5e6e1a7e37c..630834fc9e999 100644
--- a/pkgs/applications/graphics/mypaint/default.nix
+++ b/pkgs/applications/graphics/mypaint/default.nix
@@ -1,41 +1,42 @@
-{ stdenv, fetchurl, gettext, glib, gtk2, hicolor_icon_theme, json_c
-, lcms2, libpng , makeWrapper, pkgconfig, python2Packages
-, scons, swig
-}:
+{ stdenv, fetchFromGitHub, gtk3, intltool, json_c, lcms2, libpng, librsvg,
+  pkgconfig, python2Packages, scons, swig, wrapGAppsHook }:
 
 let
-  inherit (python2Packages) python pygtk numpy;
+  inherit (python2Packages) python pycairo pygobject3 numpy;
 in stdenv.mkDerivation rec {
   name = "mypaint-${version}";
-  version = "1.1.0";
+  version = "1.2.1";
 
-  src = fetchurl {
-    url = "http://download.gna.org/mypaint/${name}.tar.bz2";
-    sha256 = "0f7848hr65h909c0jkcx616flc0r4qh53g3kd1cgs2nr1pjmf3bq";
+  src = fetchFromGitHub {
+    owner = "mypaint";
+    repo = "mypaint";
+    rev = "bcf5a28d38bbd586cc9d4cee223f849fa303864f";
+    sha256 = "1zwx7n629vz1jcrqjqmw6vl6sxdf81fq6a5jzqiga8167gg8s9pf";
+    fetchSubmodules = true;
   };
 
-  buildInputs = [
-    gettext glib gtk2 json_c lcms2 libpng makeWrapper pkgconfig pygtk
-    python scons swig
-  ];
+  nativeBuildInputs = [ intltool pkgconfig scons swig wrapGAppsHook ];
 
-  propagatedBuildInputs = [ hicolor_icon_theme numpy ];
+  buildInputs = [ gtk3 json_c lcms2 libpng librsvg pycairo pygobject3 python ];
+
+  propagatedBuildInputs = [ numpy ];
 
   buildPhase = "scons prefix=$out";
 
   installPhase = ''
     scons prefix=$out install
     sed -i -e 's|/usr/bin/env python2.7|${python}/bin/python|' $out/bin/mypaint
-    wrapProgram $out/bin/mypaint \
-      --prefix PYTHONPATH : $PYTHONPATH \
-      --prefix XDG_DATA_DIRS ":" "${hicolor_icon_theme}/share"
+  '';
+
+  preFixup = ''
+    gappsWrapperArgs+=(--prefix PYTHONPATH : $PYTHONPATH)
   '';
 
   meta = with stdenv.lib; {
     description = "A graphics application for digital painters";
-    homepage = http://mypaint.intilinux.com;
+    homepage = http://mypaint.org/;
     license = licenses.gpl2Plus;
     platforms = platforms.linux;
-    maintainers = [ maintainers.goibhniu ];
+    maintainers = with maintainers; [ goibhniu jtojnar ];
   };
 }
diff --git a/pkgs/applications/graphics/sxiv/default.nix b/pkgs/applications/graphics/sxiv/default.nix
index e2d5357f814b3..843352b279133 100644
--- a/pkgs/applications/graphics/sxiv/default.nix
+++ b/pkgs/applications/graphics/sxiv/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchFromGitHub, libX11, imlib2, giflib, libexif }:
+{ stdenv, fetchFromGitHub, libX11, imlib2, giflib, libexif, conf ? null }:
+
+with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "sxiv-${version}";
@@ -16,12 +18,16 @@ stdenv.mkDerivation rec {
       --replace /usr/local $out
   '';
 
+  configFile = optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
+  preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
+
   buildInputs = [ libX11 imlib2 giflib libexif ];
+
   meta = {
     description = "Simple X Image Viewer";
     homepage = "https://github.com/muennich/sxiv";
     license = stdenv.lib.licenses.gpl2Plus;
     platforms = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
+    maintainers = with maintainers; [ jfrankenau fuuzetsu ];
   };
 }
diff --git a/pkgs/applications/misc/krename/default.nix b/pkgs/applications/misc/krename/default.nix
index 22cd14c195252..e686ec94a4a34 100644
--- a/pkgs/applications/misc/krename/default.nix
+++ b/pkgs/applications/misc/krename/default.nix
@@ -1,7 +1,8 @@
 {
   mkDerivation, fetchFromGitHub, lib,
   extra-cmake-modules, kdoctools, wrapGAppsHook,
-  kconfig, kinit, kjsembed, taglib, exiv2, podofo
+  kconfig, kinit, kjsembed, taglib, exiv2, podofo,
+  kcrash
 }:
 
 let
@@ -26,5 +27,5 @@ in mkDerivation rec {
 
   buildInputs = [ taglib exiv2 podofo ];
   nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ];
-  propagatedBuildInputs = [ kconfig kinit kjsembed ];
+  propagatedBuildInputs = [ kconfig kcrash kinit kjsembed ];
 }
diff --git a/pkgs/applications/misc/noice/default.nix b/pkgs/applications/misc/noice/default.nix
new file mode 100644
index 0000000000000..bcf2edd8f2f6a
--- /dev/null
+++ b/pkgs/applications/misc/noice/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchgit, ncurses, conf ? null }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "noice-${version}";
+  version = "0.6";
+
+  src = fetchgit {
+    url = "git://git.2f30.org/noice.git";
+    rev = "refs/tags/v${version}";
+    sha256 = "03rwglcy47fh6rb630vws10m95bxpcfv47nxrlws2li2ljam8prw";
+  };
+
+  configFile = optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
+  preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
+
+  buildInputs = [ ncurses ];
+
+  buildFlags = [ "LDLIBS=-lncurses" ];
+
+  installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
+
+  meta = {
+    description = "Small ncurses-based file browser";
+    homepage = https://git.2f30.org/noice/;
+    license = licenses.bsd2;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jfrankenau ];
+  };
+}
diff --git a/pkgs/applications/misc/pdfpc/default.nix b/pkgs/applications/misc/pdfpc/default.nix
index 3c42e8d8fcc0c..8e0fc6137210e 100644
--- a/pkgs/applications/misc/pdfpc/default.nix
+++ b/pkgs/applications/misc/pdfpc/default.nix
@@ -4,13 +4,13 @@
 stdenv.mkDerivation rec {
   name = "${product}-${version}";
   product = "pdfpc";
-  version = "4.0.6";
+  version = "4.0.7";
 
   src = fetchFromGitHub {
     repo = "pdfpc";
     owner = "pdfpc";
     rev = "v${version}";
-    sha256 = "05cfx45i0xnwvclrbwlmqsjj2sk1galk62dc0mrkhr6293mbp1mx";
+    sha256 = "00qfmmk8h762p53z46g976z7j4fbxyi16w5axzsv1ymvdq95ds8c";
   };
 
   nativeBuildInputs = [ cmake pkgconfig vala ];
diff --git a/pkgs/applications/misc/urlscan/default.nix b/pkgs/applications/misc/urlscan/default.nix
index dc9cb3189d5bf..7c4def952104a 100644
--- a/pkgs/applications/misc/urlscan/default.nix
+++ b/pkgs/applications/misc/urlscan/default.nix
@@ -1,25 +1,21 @@
-{ stdenv, buildPythonPackage, fetchFromGitHub, urwid, pythonOlder }:
+{ stdenv, python3Packages, fetchFromGitHub }:
 
-buildPythonPackage rec {
+python3Packages.buildPythonApplication rec {
   name = "urlscan-${version}";
-  version = "0.8.3";
+  version = "0.8.6";
 
   src = fetchFromGitHub {
     owner = "firecat53";
     repo = "urlscan";
     rev = version;
-    # (equivalent but less nice(?): rev = "00333f6d03bf3151c9884ec778715fc605f58cc5")
-    sha256 = "0l40anfznam4d3q0q0jp2wwfrvfypz9ppbpjyzjdrhb3r2nizb0y";
+    sha256 = "1v26fni64n0lbv37m35plh2bsrvhpb4ibgmg2mv05qfc3df721s5";
   };
 
-  propagatedBuildInputs = [ urwid ];
-
-  # FIXME doesn't work with 2.7; others than 2.7 and 3.5 were not tested (yet)
-  disabled = !pythonOlder "3.5";
+  propagatedBuildInputs = [ python3Packages.urwid ];
 
   meta = with stdenv.lib; {
     description = "Mutt and terminal url selector (similar to urlview)";
     license = licenses.gpl2;
-    maintainers = [ maintainers.dpaetzel ];
+    maintainers = with maintainers; [ dpaetzel jfrankenau ];
   };
 }
diff --git a/pkgs/applications/misc/vifm/default.nix b/pkgs/applications/misc/vifm/default.nix
index 00e1d10df10ee..f0f5e8e228895 100644
--- a/pkgs/applications/misc/vifm/default.nix
+++ b/pkgs/applications/misc/vifm/default.nix
@@ -6,11 +6,11 @@
 
 stdenv.mkDerivation rec {
   name = "vifm-${version}";
-  version = "0.8.2";
+  version = "0.9";
 
   src = fetchurl {
-    url = "mirror://sourceforge/project/vifm/vifm/${name}.tar.bz2";
-    sha256 = "07r15kq7kjl3a41sd11ncpsii866xxps4f90zh3lv8jqcrv6silb";
+    url = "https://github.com/vifm/vifm/releases/download/v${version}/vifm-${version}.tar.bz2";
+    sha256 = "1zd72vcgir3g9rhs2iyca13qf5fc0b1f22y20f5gy92c3sfwj45b";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
index 09ca83b5acd94..419f24cfb0ce2 100644
--- a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
+++ b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
@@ -81,7 +81,7 @@ let
   fteLibPath = makeLibraryPath [ stdenv.cc.cc gmp ];
 
   # Upstream source
-  version = "7.0.1";
+  version = "7.0.2";
 
   lang = "en-US";
 
@@ -91,7 +91,7 @@ let
         "https://github.com/TheTorProject/gettorbrowser/releases/download/v${version}/tor-browser-linux64-${version}_${lang}.tar.xz"
         "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz"
       ];
-      sha256 = "1zmczf1bpbd85zcrs5qw91d1xmplikbna5xs053jnjl6pbbq1fs9";
+      sha256 = "0xdw8mvyxz9vaxikzsj4ygzp36m4jfhvhqfiyaiiywpf39rqpkqr";
     };
 
     "i686-linux" = fetchurl {
@@ -99,7 +99,7 @@ let
         "https://github.com/TheTorProject/gettorbrowser/releases/download/v${version}/tor-browser-linux32-${version}_${lang}.tar.xz"
         "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux32-${version}_${lang}.tar.xz"
       ];
-      sha256 = "0mdlgmqkryg0i55jgf3x1nnjni0x45g1xcjwsfacsck3m70v4flq";
+      sha256 = "0m522i8zih5sj18dyzk9im7gmpmrbf96657v38m3pxn4ci38b83z";
     };
   };
 in
@@ -190,6 +190,12 @@ stdenv.mkDerivation rec {
 
     // Stop obnoxious first-run redirection.
     lockPref("noscript.firstRunRedirection", false);
+
+    // Insist on using IPC for communicating with Tor
+    //
+    // Defaults to creating $TBB_HOME/TorBrowser/Data/Tor/{socks,control}.socket
+    lockPref("extensions.torlauncher.control_port_use_ipc", true);
+    lockPref("extensions.torlauncher.socks_port_use_ipc", true);
     EOF
 
     # Hard-code path to TBB fonts; see also FONTCONFIG_FILE in
@@ -233,6 +239,9 @@ stdenv.mkDerivation rec {
     # Initialize the Tor data directory.
     mkdir -p "\$HOME/TorBrowser/Data/Tor"
 
+    # TBB will fail if ownership is too permissive
+    chmod 0700 "\$HOME/TorBrowser/Data/Tor"
+
     # Initialize the browser profile state.  Note that the only data
     # copied from the Store payload is the initial bookmark file, which is
     # never updated once created.  All other files under user's profile
diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix
index d22b5c9a88342..4ecf63427648e 100644
--- a/pkgs/applications/networking/cluster/terraform/default.nix
+++ b/pkgs/applications/networking/cluster/terraform/default.nix
@@ -48,9 +48,9 @@ in {
     sha256 = "0ibgpcpvz0bmn3cw60nzsabsrxrbmmym1hv7fx6zmjxiwd68w5gb";
   };
 
-  terraform_0_9_10 = generic {
-    version = "0.9.10";
-    sha256 = "0sg8czfn4hh7cf7zcdqwkygsvm9p47f5bi6kbl37bx9rn6bi5m6s";
+  terraform_0_9_11 = generic {
+    version = "0.9.11";
+    sha256 = "045zcpd4g9c52ynhgh3213p422ahds63mzhmd2iwcmj88g8i1w6x";
     doCheck = true;
   };
 }
diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix
index 7c48075704e3e..c53383b954e72 100644
--- a/pkgs/applications/networking/mailreaders/notmuch/default.nix
+++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix
@@ -10,7 +10,7 @@
 }:
 
 stdenv.mkDerivation rec {
-  version = "0.23.5";
+  version = "0.24.2";
   name = "notmuch-${version}";
 
   passthru = {
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://notmuchmail.org/releases/${name}.tar.gz";
-    sha256 = "0ry2k9sdwd1vw8cf6svch8wk98523s07mwxvsf7b8kghqnrr89n6";
+    sha256 = "0lfchvapk11qazdgsxj42igp9mpp83zbd0h1jj6r3ifmhikajxma";
   };
 
   buildInputs = [
diff --git a/pkgs/applications/networking/p2p/ktorrent/default.nix b/pkgs/applications/networking/p2p/ktorrent/default.nix
index 73cd26b2a6e84..77c7cf321cbdf 100644
--- a/pkgs/applications/networking/p2p/ktorrent/default.nix
+++ b/pkgs/applications/networking/p2p/ktorrent/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, cmake
 , extra-cmake-modules, qtbase, qtscript
 , ki18n, kio, knotifications, knotifyconfig, kdoctools, kross, kcmutils, kdelibs4support
-, libktorrent, boost, taglib
+, libktorrent, boost, taglib, libgcrypt, kplotting
 }:
 
 stdenv.mkDerivation rec {
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
   buildInputs =
     [ cmake qtbase qtscript
       ki18n kio knotifications knotifyconfig kross kcmutils kdelibs4support
-      libktorrent taglib
+      libktorrent taglib libgcrypt kplotting
     ];
 
   enableParallelBuilding = true;
diff --git a/pkgs/applications/networking/p2p/qbittorrent/default.nix b/pkgs/applications/networking/p2p/qbittorrent/default.nix
index 4db6c9dc16bb9..c848f13b0d983 100644
--- a/pkgs/applications/networking/p2p/qbittorrent/default.nix
+++ b/pkgs/applications/networking/p2p/qbittorrent/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, which
-, boost, libtorrentRasterbar, qmake, qtbase, qttools
+, boost, libtorrentRasterbar, qtbase, qttools
 , debugSupport ? false # Debugging
 , guiSupport ? true, dbus_libs ? null # GUI (disable to run headless)
 , webuiSupport ? true # WebUI
@@ -10,14 +10,14 @@ assert guiSupport -> (dbus_libs != null);
 with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "qbittorrent-${version}";
-  version = "3.3.12";
+  version = "3.3.13";
 
   src = fetchurl {
     url = "mirror://sourceforge/qbittorrent/${name}.tar.xz";
-    sha256 = "0vs626khavhqqnq2hrwrxyc8ihbngharcf1fd37nwccvy13qqljn";
+    sha256 = "13a6rv4f4xgbjh6nai7fnqb04rh7i2kjpp7y2z5j1wyy4x8pncc4";
   };
 
-  nativeBuildInputs = [ pkgconfig which qmake ];
+  nativeBuildInputs = [ pkgconfig which ];
 
   buildInputs = [ boost libtorrentRasterbar qtbase qttools ]
     ++ optional guiSupport dbus_libs;
@@ -34,9 +34,9 @@ stdenv.mkDerivation rec {
   ] ++ optional debugSupport "--enable-debug";
 
   # The lrelease binary is named lrelease instead of lrelease-qt4
-  patches = [ ./fix-lrelease.patch];
+  patches = [ ./fix-lrelease.patch ];
 
-  # https://github.com/qbittorrent/qBittorrent/issues/1992 
+  # https://github.com/qbittorrent/qBittorrent/issues/1992
   enableParallelBuilding = false;
 
   meta = {
diff --git a/pkgs/applications/office/skrooge/default.nix b/pkgs/applications/office/skrooge/default.nix
index c8b8c8c9ca43f..0a53d5f8c2295 100644
--- a/pkgs/applications/office/skrooge/default.nix
+++ b/pkgs/applications/office/skrooge/default.nix
@@ -1,8 +1,9 @@
 { mkDerivation, lib, fetchurl,
   cmake, extra-cmake-modules, qtwebkit, qtscript, grantlee,
   kxmlgui, kwallet, kparts, kdoctools, kjobwidgets, kdesignerplugin,
-  kiconthemes, knewstuff, sqlcipher, qca-qt5, kdelibs4support, kactivities,
-  knotifyconfig, krunner, libofx, shared_mime_info }:
+  kiconthemes, knewstuff, sqlcipher, qca-qt5, kactivities, karchive,
+  kguiaddons, knotifyconfig, krunner, kwindowsystem, libofx, shared_mime_info
+}:
 
 mkDerivation rec {
   name = "skrooge-${version}";
@@ -17,7 +18,7 @@ mkDerivation rec {
 
   buildInputs = [ qtwebkit qtscript grantlee kxmlgui kwallet kparts kdoctools
     kjobwidgets kdesignerplugin kiconthemes knewstuff sqlcipher qca-qt5
-    kdelibs4support kactivities knotifyconfig krunner libofx
+    kactivities karchive kguiaddons knotifyconfig krunner kwindowsystem libofx
   ];
 
   meta = with lib; {
diff --git a/pkgs/applications/version-management/gogs/default.nix b/pkgs/applications/version-management/gogs/default.nix
index 7d1e3710ac074..c8af3fe63f92e 100644
--- a/pkgs/applications/version-management/gogs/default.nix
+++ b/pkgs/applications/version-management/gogs/default.nix
@@ -26,7 +26,9 @@ buildGoPackage rec {
 
   outputs = [ "bin" "out" "data" ];
 
-  postInstall = ''
+  postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
+    install_name_tool -delete_rpath $out/lib $bin/bin/gogs
+  '' + ''
     mkdir $data
     cp -R $src/{public,templates} $data
 
diff --git a/pkgs/applications/video/makemkv/default.nix b/pkgs/applications/video/makemkv/default.nix
index bb9054404982a..1559535f342b3 100644
--- a/pkgs/applications/video/makemkv/default.nix
+++ b/pkgs/applications/video/makemkv/default.nix
@@ -4,17 +4,17 @@
 
 stdenv.mkDerivation rec {
   name = "makemkv-${ver}";
-  ver = "1.10.5";
+  ver = "1.10.6";
   builder = ./builder.sh;
 
   src_bin = fetchurl {
     url = "http://www.makemkv.com/download/makemkv-bin-${ver}.tar.gz";
-    sha256 = "00jym62yga4m146lbz6dwdy6rgrwbc0kgmpcarri0prdwjsb8l6x";
+    sha256 = "99d68e4e0166c9a4e2dce6638e19cbe312b5981f6e1811ed0987578ceefac3e3";
   };
 
   src_oss = fetchurl {
     url = "http://www.makemkv.com/download/makemkv-oss-${ver}.tar.gz";
-    sha256 = "0kanj0mh09sn5wlc4jl5ykbhdq1kpwjhmh1ck990dhkxb2m3rvaa";
+    sha256 = "ab028ba05364f2d899b76e6a7392c9ef555379de2ef4732e1de27c23fd78d235";
   };
 
   buildInputs = [openssl qt4 mesa zlib pkgconfig libav];
diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix
index 73ba76676b988..6675068bda972 100644
--- a/pkgs/applications/virtualization/virtualbox/default.nix
+++ b/pkgs/applications/virtualization/virtualbox/default.nix
@@ -88,7 +88,7 @@ in stdenv.mkDerivation {
   '';
 
   patches = optional enableHardening ./hardened.patch
-    ++ [ ./qtx11extras.patch ];
+    ++ [ ./qtx11extras.patch ./linux-4.12.patch ];
 
   postPatch = ''
     sed -i -e 's|/sbin/ifconfig|${nettools}/bin/ifconfig|' \
diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix
index 3c9f28f4f2d56..8865022c23e47 100644
--- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix
+++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix
@@ -62,6 +62,9 @@ stdenv.mkDerivation {
     for i in *
     do
         cd $i
+        # Files within the guest additions ISO are using DOS line endings
+        sed -re '/^(@@|---|\+\+\+)/!s/$/\r/' ${../linux-4.12.patch} \
+          | patch -d vboxguest -p4
         find . -type f | xargs sed 's/depmod -a/true/' -i
         make
         cd ..
diff --git a/pkgs/applications/virtualization/virtualbox/linux-4.12.patch b/pkgs/applications/virtualization/virtualbox/linux-4.12.patch
new file mode 100644
index 0000000000000..7157365466f98
--- /dev/null
+++ b/pkgs/applications/virtualization/virtualbox/linux-4.12.patch
@@ -0,0 +1,80 @@
+commit 47fee9325e3b5feed0dbc4ba9e2de77c6d55e3bb
+Author: vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>
+Date:   Wed May 17 09:42:23 2017 +0000
+
+    Runtime/r0drv: Linux 4.12 5-level page table adaptions
+    
+    
+    git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@66927 cfe28804-0f27-0410-a406-dd0f0b0b656f
+
+diff --git a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
+index 28dc33f963..41ed058860 100644
+--- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
++++ b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
+@@ -902,6 +902,9 @@ static struct page *rtR0MemObjLinuxVirtToPage(void *pv)
+     union
+     {
+         pgd_t       Global;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++        p4d_t       Four;
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
+         pud_t       Upper;
+ #endif
+@@ -917,12 +920,26 @@ static struct page *rtR0MemObjLinuxVirtToPage(void *pv)
+     u.Global = *pgd_offset(current->active_mm, ulAddr);
+     if (RT_UNLIKELY(pgd_none(u.Global)))
+         return NULL;
+-
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++    u.Four  = *p4d_offset(&u.Global, ulAddr);
++    if (RT_UNLIKELY(p4d_none(u.Four)))
++        return NULL;
++    if (p4d_large(u.Four))
++    {
++        pPage = p4d_page(u.Four);
++        AssertReturn(pPage, NULL);
++        pfn   = page_to_pfn(pPage);      /* doing the safe way... */
++        AssertCompile(P4D_SHIFT - PAGE_SHIFT < 31);
++        pfn  += (ulAddr >> PAGE_SHIFT) & ((UINT32_C(1) << (P4D_SHIFT - PAGE_SHIFT)) - 1);
++        return pfn_to_page(pfn);
++    }
++    u.Upper = *pud_offset(&u.Four, ulAddr);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
+     u.Upper = *pud_offset(&u.Global, ulAddr);
++#endif
+     if (RT_UNLIKELY(pud_none(u.Upper)))
+         return NULL;
+-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
+     if (pud_large(u.Upper))
+     {
+         pPage = pud_page(u.Upper);
+@@ -931,8 +948,8 @@ static struct page *rtR0MemObjLinuxVirtToPage(void *pv)
+         pfn += (ulAddr >> PAGE_SHIFT) & ((UINT32_C(1) << (PUD_SHIFT - PAGE_SHIFT)) - 1);
+         return pfn_to_page(pfn);
+     }
+-# endif
+-
++#endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
+     u.Middle = *pmd_offset(&u.Upper, ulAddr);
+ #else  /* < 2.6.11 */
+     u.Middle = *pmd_offset(&u.Global, ulAddr);
+diff --git a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+index 5afdee9e71..20aab0817f 100644
+--- a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
++++ b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+@@ -159,6 +159,11 @@
+ # include <asm/tlbflush.h>
+ #endif
+ 
++/* for set_pages_x() */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
++# include <asm/set_memory.h>
++#endif
++
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
+ # include <asm/smap.h>
+ #else
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index 9e4f346f7a525..fa66a1f55406e 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -47,6 +47,7 @@ Options:
       --leave-dotGit  Keep the .git directories.
       --fetch-submodules Fetch submodules.
       --builder       Clone as fetchgit does, but url, rev, and out option are mandatory.
+      --quiet         Only print the final json summary.
 "
     exit 1
 }
diff --git a/pkgs/data/icons/papirus-icon-theme/default.nix b/pkgs/data/icons/papirus-icon-theme/default.nix
new file mode 100644
index 0000000000000..70bf0186f1cc9
--- /dev/null
+++ b/pkgs/data/icons/papirus-icon-theme/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "papirus-icon-theme-${version}";
+  version = "20170616";
+
+  src = fetchFromGitHub {
+    owner = "PapirusDevelopmentTeam";
+    repo = "papirus-icon-theme";
+    rev = "${version}";
+    sha256 = "008nkmxp3f9qqljif3v9ns3a8mflzffv2mm5zgjng9pmdl5x70j4";
+  };
+
+  dontBuild = true;
+
+  installPhase = ''
+     install -dm 755 $out/share/icons
+     cp -dr Papirus{,-Dark,-Light} $out/share/icons/
+     cp -dr ePapirus $out/share/icons/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Papirus icon theme for Linux";
+    homepage = "https://github.com/PapirusDevelopmentTeam/papirus-icon-theme";
+    license = licenses.lgpl3;
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/desktops/gnome-3/extensions/caffeine/default.nix b/pkgs/desktops/gnome-3/extensions/caffeine/default.nix
new file mode 100644
index 0000000000000..d556c5e55ca4b
--- /dev/null
+++ b/pkgs/desktops/gnome-3/extensions/caffeine/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, glib, gettext, bash }:
+
+stdenv.mkDerivation rec {
+  name = "gnome-shell-extension-caffeine-${version}";
+  version = "unstable-2017-06-21";
+
+  src = fetchFromGitHub {
+    owner = "eonpatapon";
+    repo = "gnome-shell-extension-caffeine";
+    rev = "ce0d0d4d3a9fed4b35b82cf59609a00502862271";
+    sha256 = "01gf9c8nhhm78iakqf30900y6lywxks1pm5h2cs0jvp8d3ygd7sd";
+  };
+
+  uuid = "caffeine@patapon.info";
+
+  nativeBuildInputs = [
+    glib gettext
+  ];
+
+  buildPhase = ''
+    ${bash}/bin/bash ./update-locale.sh
+    ${glib.dev}/bin/glib-compile-schemas --strict --targetdir=caffeine@patapon.info/schemas/ caffeine@patapon.info/schemas
+  '';
+
+  installPhase = ''
+    mkdir -p $out/share/gnome-shell/extensions
+    cp -r ${uuid} $out/share/gnome-shell/extensions
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Fill the cup to inhibit auto suspend and screensaver";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ eperuffo ];
+    homepage = https://github.com/eonpatapon/gnome-shell-extension-caffeine;
+  };
+}
diff --git a/pkgs/desktops/gnome-3/extensions/topicons-plus/default.nix b/pkgs/desktops/gnome-3/extensions/topicons-plus/default.nix
new file mode 100644
index 0000000000000..4612c35ad2500
--- /dev/null
+++ b/pkgs/desktops/gnome-3/extensions/topicons-plus/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, glib, gettext, bash }:
+
+stdenv.mkDerivation rec {
+  name = "gnome-shell-extension-topicons-plus-${version}";
+  version = "v20";
+
+  src = fetchFromGitHub {
+    owner = "phocean";
+    repo = "TopIcons-plus";
+    rev = "01535328bd43ecb3f2c71376de6fc8d1d8a88577";
+    sha256 = "0pwpg72ihgj2jl9pg63y0hibdsl27srr3mab881w0gh17vwyixzi";
+  };
+
+  buildInputs = [ glib ];
+
+  nativeBuildInputs = [ gettext ];
+
+  makeFlags = [ "INSTALL_PATH=$(out)/share/gnome-shell/extensions" ];
+
+  meta = with stdenv.lib; {
+    description = "Brings all icons back to the top panel, so that it's easier to keep track of apps running in the backround";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ eperuffo ];
+    homepage = https://github.com/phocean/TopIcons-plus;
+  };
+}
diff --git a/pkgs/development/compilers/gcc/6/darwin-const-correct.patch b/pkgs/development/compilers/gcc/6/darwin-const-correct.patch
deleted file mode 100644
index a9b9b85acab29..0000000000000
--- a/pkgs/development/compilers/gcc/6/darwin-const-correct.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 5972cd58bde3bc8bacfe994e5b127c411241f255 Mon Sep 17 00:00:00 2001
-From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 3 Jan 2017 05:36:40 +0000
-Subject: [PATCH] 	* config/darwin-driver.c (darwin_driver_init):
- Const-correctness 	fixes for first_period and second_period variables.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244010 138bc75d-0d04-0410-961f-82ee72b054a4
----
-diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c
-index 0c4f0cd..e3ed79d 100644
---- a/gcc/config/darwin-driver.c
-+++ b/gcc/config/darwin-driver.c
-@@ -299,10 +299,10 @@ darwin_driver_init (unsigned int *decoded_options_count,
-   if (vers_string != NULL)
-     {
-       char *asm_major = NULL;
--      char *first_period = strchr(vers_string, '.');
-+      const char *first_period = strchr(vers_string, '.');
-       if (first_period != NULL)
- 	{
--	  char *second_period = strchr(first_period+1, '.');
-+	  const char *second_period = strchr(first_period+1, '.');
- 	  if (second_period  != NULL)
- 	    asm_major = xstrndup (vers_string, second_period-vers_string);
- 	  else
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index c439703fa8e46..b091fd1ae370e 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -58,7 +58,7 @@ assert langGo -> langCC;
 with stdenv.lib;
 with builtins;
 
-let version = "6.3.0";
+let version = "6.4.0";
 
     # Whether building a cross-compiler for GNU/Hurd.
     crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
@@ -72,8 +72,7 @@ let version = "6.3.0";
       # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
       # target libraries and tools.
       ++ optional langAda ../gnat-cflags.patch
-      ++ optional langFortran ../gfortran-driving.patch
-      ++ optional hostPlatform.isDarwin ./darwin-const-correct.patch; # Kill this after 6.3.0
+      ++ optional langFortran ../gfortran-driving.patch;
 
     javaEcj = fetchurl {
       # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
@@ -213,8 +212,8 @@ stdenv.mkDerivation ({
   builder = ../builder.sh;
 
   src = fetchurl {
-    url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
-    sha256 = "17xjz30jb65hcf714vn9gcxvrrji8j20xm7n33qg1ywhyzryfsph";
+    url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz";
+    sha256 = "1m0lr7938lw5d773dkvwld90hjlcq2282517d1gwvrfzmwgg42w5";
   };
 
   inherit patches;
diff --git a/pkgs/development/compilers/haxe/default.nix b/pkgs/development/compilers/haxe/default.nix
index 684c6d25daadb..ca41545eb451e 100644
--- a/pkgs/development/compilers/haxe/default.nix
+++ b/pkgs/development/compilers/haxe/default.nix
@@ -1,40 +1,82 @@
-{ stdenv, fetchgit, ocaml, zlib, pcre, neko, camlp4 }:
+{ stdenv, fetchgit, bash, coreutils, ocaml, zlib, pcre, neko, camlp4 }:
 
-stdenv.mkDerivation {
-  name = "haxe-3.4.2";
+let
+  generic = { version, sha256, prePatch }:
+    stdenv.mkDerivation rec {
+      name = "haxe-${version}";
 
-  buildInputs = [ocaml zlib pcre neko camlp4];
+      buildInputs = [ocaml zlib pcre neko camlp4];
 
-  src = fetchgit {
-    url = "https://github.com/HaxeFoundation/haxe.git";
-    sha256 = "1m5fp183agqv8h3ynhxw4kndkpq2d6arysmirv3zl3vz5crmpwqd";
-    fetchSubmodules = true;
+      src = fetchgit {
+        url = https://github.com/HaxeFoundation/haxe.git;
+        inherit sha256;
+        fetchSubmodules = true;
+        rev = "refs/tags/${version}";
+      };
 
-    # Tag 3.4.2
-    rev = "890f8c70cf23ce6f9fe0fdd0ee514a9699433ca7";
-  };
+      inherit prePatch;
+
+      buildFlags = [ "all" "tools" ];
 
-  prePatch = ''
-    sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' src/main.ml
-  '';
+      installPhase = ''
+        install -vd "$out/bin" "$out/lib/haxe/std"
+        cp -vr haxe haxelib std "$out/lib/haxe"
 
-  buildFlags = [ "all" "tools" ];
+        # make wrappers which provide a temporary HAXELIB_PATH with symlinks to multiple repositories HAXELIB_PATH may point to
+        for name in haxe haxelib; do
+        cat > $out/bin/$name <<EOF
+        #!{bash}/bin/bash
 
-  installPhase = ''
-    install -vd "$out/bin" "$out/lib/haxe/std"
-    install -vt "$out/bin" haxe haxelib
-    cp -vr std "$out/lib/haxe"
-  '';
+        if [[ "\$HAXELIB_PATH" =~ : ]]; then
+          NEW_HAXELIB_PATH="\$(${coreutils}/bin/mktemp -d)"
 
-  setupHook = ./setup-hook.sh;
+          IFS=':' read -ra libs <<< "\$HAXELIB_PATH"
+          for libdir in "\''${libs[@]}"; do
+            for lib in "\$libdir"/*; do
+              if [ ! -e "\$NEW_HAXELIB_PATH/\$(${coreutils}/bin/basename "\$lib")" ]; then
+                ${coreutils}/bin/ln -s "--target-directory=\$NEW_HAXELIB_PATH" "\$lib"
+              fi
+            done
+          done
+          export HAXELIB_PATH="\$NEW_HAXELIB_PATH"
+          $out/lib/haxe/$name "\$@"
+          rm -rf "\$NEW_HAXELIB_PATH"
+        else
+          exec $out/lib/haxe/$name "\$@"
+        fi
+        EOF
+        chmod +x $out/bin/$name
+        done
+      '';
 
-  dontStrip = true;
+      setupHook = ./setup-hook.sh;
 
-  meta = with stdenv.lib; {
-    description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
-    homepage = https://haxe.org;
-    license = with licenses; [ gpl2 bsd2 /*?*/ ];  # -> docs/license.txt
-    maintainers = [ maintainers.marcweber ];
-    platforms = platforms.linux ++ platforms.darwin;
+      dontStrip = true;
+
+      meta = with stdenv.lib; {
+        description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
+        homepage = https://haxe.org;
+        license = with licenses; [ gpl2 bsd2 /*?*/ ];  # -> docs/license.txt
+        maintainers = [ maintainers.marcweber ];
+        platforms = platforms.linux ++ platforms.darwin;
+      };
+    };
+in {
+  # this old version is required to compile some libraries
+  haxe_3_2 = generic {
+    version = "3.2.1";
+    sha256 = "1x9ay5a2llq46fww3k07jxx8h1vfpyxb522snc6702a050ki5vz3";
+    prePatch = ''
+      sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' main.ml
+      sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/tools/haxelib/Main.hx
+    '';
+  };
+  haxe_3_4 = generic {
+    version = "3.4.2";
+    sha256 = "1m5fp183agqv8h3ynhxw4kndkpq2d6arysmirv3zl3vz5crmpwqd";
+    prePatch = ''
+      sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' src/main.ml
+      sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/haxelib/client/Main.hx
+    '';
   };
 }
diff --git a/pkgs/development/compilers/haxe/hxcpp.nix b/pkgs/development/compilers/haxe/hxcpp.nix
deleted file mode 100644
index 56b43fc128eff..0000000000000
--- a/pkgs/development/compilers/haxe/hxcpp.nix
+++ /dev/null
@@ -1,52 +0,0 @@
-{ stdenv, fetchzip, haxe, neko, pcre, sqlite, zlib }:
-
-stdenv.mkDerivation rec {
-  name = "hxcpp-3.2.27";
-
-  src = let
-    zipFile = stdenv.lib.replaceChars ["."] [","] name;
-  in fetchzip {
-    inherit name;
-    url = "http://lib.haxe.org/files/3.0/${zipFile}.zip";
-    sha256 = "1hw4kr1f8q7f4fkzis7kvkm7h1cxhv6cf5v1iq7rvxs2fxiys7fr";
-  };
-
-  NIX_LDFLAGS = "-lpcre -lz -lsqlite3";
-
-  outputs = [ "out" "lib" ];
-
-  patchPhase = ''
-    rm -rf bin lib project/thirdparty project/libs/sqlite/sqlite3.[ch]
-    find . -name '*.n' -delete
-    sed -i -re '/(PCRE|ZLIB)_DIR|\<sqlite3\.c\>/d' project/Build.xml
-    sed -i -e 's/mFromFile = "@";/mFromFile = "";/' tools/hxcpp/Linker.hx
-    sed -i -e '/dll_ext/s,HX_CSTRING("./"),HX_CSTRING("'"$lib"'/"),' \
-      src/hx/Lib.cpp
-  '';
-
-  buildInputs = [ haxe neko pcre sqlite zlib ];
-
-  targetArch = "linux-m${if stdenv.is64bit then "64" else "32"}";
-
-  buildPhase = ''
-    haxe -neko project/build.n -cp tools/build -main Build
-    haxe -neko run.n -cp tools/run -main RunMain
-    haxe -neko hxcpp.n -cp tools/hxcpp -main BuildTool
-    (cd project && neko build.n "ndll-$targetArch")
-  '';
-
-  installPhase = ''
-    for i in bin/Linux*/*.dso; do
-      install -vD "$i" "$lib/$(basename "$i")"
-    done
-    find *.n toolchain/*.xml build-tool/BuildCommon.xml src include \
-      -type f -exec install -vD -m 0644 {} "$out/lib/haxe/hxcpp/{}" \;
-  '';
-
-  meta = {
-    homepage = "http://lib.haxe.org/p/hxcpp";
-    description = "Runtime support library for the Haxe C++ backend";
-    license = stdenv.lib.licenses.bsd2;
-    platforms = stdenv.lib.platforms.linux;
-  };
-}
diff --git a/pkgs/development/compilers/haxe/setup-hook.sh b/pkgs/development/compilers/haxe/setup-hook.sh
index a29e04a989b60..21cc0206859f6 100644
--- a/pkgs/development/compilers/haxe/setup-hook.sh
+++ b/pkgs/development/compilers/haxe/setup-hook.sh
@@ -1,5 +1,7 @@
 addHaxeLibPath() {
+  if [ ! -d "$1/lib/haxe/std" ]; then
     addToSearchPath HAXELIB_PATH "$1/lib/haxe"
+  fi
 }
 
 envHooks+=(addHaxeLibPath)
diff --git a/pkgs/development/compilers/neko/default.nix b/pkgs/development/compilers/neko/default.nix
index 493748d369b7d..e90f3af704dfe 100644
--- a/pkgs/development/compilers/neko/default.nix
+++ b/pkgs/development/compilers/neko/default.nix
@@ -24,6 +24,12 @@ stdenv.mkDerivation rec {
           + "fe87462d9c7a6ee27e28f5be5e4fc0ac87b34574.patch";
       sha256 = "1jbmq6j32vg3qv20dbh82cp54886lgrh7gkcqins8a2y4l4dl3sc";
     })
+    # https://github.com/HaxeFoundation/neko/pull/165
+    (fetchpatch {
+      url = "https://github.com/HaxeFoundation/neko/commit/"
+          + "c6d9c6d796200990b3b6a53a4dc716c9192398e6.patch";
+      sha256 = "1pq0qhhb9gbhc3zbgylwp0amhwsz0q0ggpj6v2xgv0hfy7d63rcd";
+    })
   ];
 
   buildInputs =
diff --git a/pkgs/development/compilers/wla-dx/default.nix b/pkgs/development/compilers/wla-dx/default.nix
index 13a48aaaa30c7..2ea2faa3e09e9 100644
--- a/pkgs/development/compilers/wla-dx/default.nix
+++ b/pkgs/development/compilers/wla-dx/default.nix
@@ -1,13 +1,14 @@
 {stdenv, fetchFromGitHub, cmake}:
 
 stdenv.mkDerivation rec {
-  name = "wla-dx-git-2016-02-27";
+  version = "2017-06-05";
+  name = "wla-dx-git-${version}";
 
   src = fetchFromGitHub {
     owner = "vhelin";
     repo = "wla-dx";
-    rev = "8189fe8d5620584ea16563875ff3c5430527c86a";
-    sha256 = "02zgkcyfx7y8j6jvyi12lm29fydnd7m3rxv6g2psv23fyzmpkkir";
+    rev = "ae6843f9711cbc2fa6dd8c200877b40bd2bcad7f";
+    sha256 = "09c2kz12ld97ad41j6r8r65jknllrak1x8r43fgr26x7hdlxz5c6";
   };
 
   hardeningDisable = [ "format" ];
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index abf477189f071..230016d78c8cf 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -670,7 +670,7 @@ self: super: {
   haste-compiler      = markBroken (self.callPackage ../tools/haskell/haste/haste-compiler.nix { inherit overrideCabal; super-haste-compiler = super.haste-compiler; });
 
   # tinc is a new build driver a la Stack that's not yet available from Hackage.
-  tinc = self.callPackage ../tools/haskell/tinc {};
+  tinc = self.callPackage ../tools/haskell/tinc { inherit (pkgs) cabal-install cabal2nix; };
 
   # Tools that use gtk2hs-buildtools now depend on them in a custom-setup stanza
   cairo = addBuildTool super.cairo self.gtk2hs-buildtools;
diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix
index 35cd857b6620d..e4d0e00a3266f 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix
@@ -59,4 +59,12 @@ self: super: {
   # https://github.com/nominolo/ghc-syb/issues/20
   ghc-syb-utils = dontCheck super.ghc-syb-utils;
 
+  # Older, LTS-8-based versions don't compile.
+  vector = super.vector_0_12_0_1;
+  primitive = self.primitive_0_6_2_0;
+  syb = self.syb_0_7;
+
+  # Work around overly restrictive constraints on the version of 'base'.
+  doctest = doJailbreak super.doctest;
+
 }
diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index f75d435cddc2e..af123de565475 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -17950,8 +17950,8 @@ self: {
      }:
      mkDerivation {
        pname = "VKHS";
-       version = "1.9";
-       sha256 = "0vfspcsm2fgpqwbwli5a4ca8lsh50j8m9x2v4ccs6zd8svcimg3q";
+       version = "1.9.1";
+       sha256 = "1jhllxylsclshs027vinx5p3rql3964dy4p37q916g4g58ml83j6";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -20602,8 +20602,8 @@ self: {
        pname = "active";
        version = "0.2.0.13";
        sha256 = "1yw029rh0gb63bhwwjynbv173mny14is4cyjkrlvzvxwb0fi96jx";
-       revision = "1";
-       editedCabalFile = "15z0n337bglkn1a3hx2gvh64jx311nmsa4vijynmwp2hq11rgvm6";
+       revision = "2";
+       editedCabalFile = "1ml42hbvfhqzpdi1y5q6dqp4wq6zqb30f15r34n9ip9iv44qjwwf";
        libraryHaskellDepends = [
          base lens linear semigroupoids semigroups vector
        ];
@@ -26741,7 +26741,7 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "arithmoi_0_5_0_0" = callPackage
+  "arithmoi_0_5_0_1" = callPackage
     ({ mkDerivation, array, base, containers, criterion, exact-pi
      , ghc-prim, integer-gmp, integer-logarithms, mtl, QuickCheck
      , random, smallcheck, tasty, tasty-hunit, tasty-quickcheck
@@ -26749,8 +26749,8 @@ self: {
      }:
      mkDerivation {
        pname = "arithmoi";
-       version = "0.5.0.0";
-       sha256 = "0gja9x6y2nprlg5d2wjycjvxgc7bb4p6y8d4fg3dxxzzwgqgrrab";
+       version = "0.5.0.1";
+       sha256 = "1hny1xnkwi0ahzdw4d1pfskdi416wl6k6p4pfzqssj79bhlpp6vg";
        configureFlags = [ "-f-llvm" ];
        libraryHaskellDepends = [
          array base containers exact-pi ghc-prim integer-gmp
@@ -26823,12 +26823,12 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {inherit (pkgs) arpack;};
 
-  "array_0_5_1_1" = callPackage
+  "array_0_5_2_0" = callPackage
     ({ mkDerivation, base }:
      mkDerivation {
        pname = "array";
-       version = "0.5.1.1";
-       sha256 = "08r2rq4blvc737mrg3xhlwiw13jmsz5dlf2fd0ghb9cdaxc6kjc9";
+       version = "0.5.2.0";
+       sha256 = "12v83s2imxb3p2crnlzrpjh0nk6lpysw9bdk9yahs6f37csa5jaj";
        libraryHaskellDepends = [ base ];
        description = "Mutable and immutable arrays";
        license = stdenv.lib.licenses.bsd3;
@@ -27727,6 +27727,30 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "async-refresh-tokens_0_2_0_0" = callPackage
+    ({ mkDerivation, async-refresh, base, bytestring, criterion
+     , formatting, HUnit, lifted-async, microlens, microlens-th
+     , monad-control, monad-logger, safe-exceptions, stm, test-framework
+     , test-framework-hunit, text
+     }:
+     mkDerivation {
+       pname = "async-refresh-tokens";
+       version = "0.2.0.0";
+       sha256 = "1inpl44hmk4g5y0p09wdg85k921174zz5f5kn0z69b13gfrhncw6";
+       libraryHaskellDepends = [
+         async-refresh base bytestring formatting lifted-async microlens
+         microlens-th monad-control monad-logger safe-exceptions stm text
+       ];
+       testHaskellDepends = [
+         base criterion HUnit monad-logger stm test-framework
+         test-framework-hunit
+       ];
+       homepage = "https://github.com/mtesseract/async-refresh-tokens#readme";
+       description = "Package implementing core logic for refreshing of expiring access tokens";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "async-timer" = callPackage
     ({ mkDerivation, base, containers, criterion, HUnit, lifted-async
      , lifted-base, monad-control, safe-exceptions, test-framework
@@ -33533,37 +33557,45 @@ self: {
 
   "bitcoin-payment-channel" = callPackage
     ({ mkDerivation, aeson, base, base16-bytestring, base64-bytestring
-     , bytestring, cereal, criterion, deepseq, errors, haskoin-core
-     , hexstring, hspec, monad-time, mtl, QuickCheck, random, rbpcp-api
-     , scientific, semigroups, string-conversions, tagged
-     , test-framework, test-framework-quickcheck2, text, tf-random, time
+     , blockchain-restful-address-index-api, bytestring, cereal
+     , criterion, data-default-class, deepseq, either, errors
+     , haskoin-core, hexstring, hspec, hspec-discover, monad-time, mtl
+     , QuickCheck, random, rbpcp-api, scientific, semigroups
+     , string-conversions, tagged, test-framework
+     , test-framework-quickcheck2, text, tf-random, time, transformers
      }:
      mkDerivation {
        pname = "bitcoin-payment-channel";
-       version = "1.0.1.0";
-       sha256 = "18hg95jgmjpmpak2rspb0l5602j112gya9ydv9xm2gpx13wc88xp";
+       version = "1.2.0.0";
+       sha256 = "022wkygx76557cqkw0rvkmv3111n6hiyk3vwym3ampbkr2dv998f";
        libraryHaskellDepends = [
-         aeson base base16-bytestring bytestring cereal deepseq errors
-         haskoin-core hexstring hspec monad-time QuickCheck rbpcp-api
+         aeson base base16-bytestring blockchain-restful-address-index-api
+         bytestring cereal data-default-class deepseq either errors
+         haskoin-core hexstring hspec monad-time mtl QuickCheck rbpcp-api
          scientific semigroups string-conversions tagged text time
+         transformers
        ];
        testHaskellDepends = [
-         aeson base base16-bytestring base64-bytestring bytestring cereal
-         deepseq errors haskoin-core hexstring hspec monad-time mtl
-         QuickCheck random rbpcp-api scientific semigroups
-         string-conversions tagged test-framework test-framework-quickcheck2
-         text tf-random time
+         aeson base base16-bytestring base64-bytestring
+         blockchain-restful-address-index-api bytestring cereal
+         data-default-class deepseq either errors haskoin-core hexstring
+         hspec hspec-discover monad-time mtl QuickCheck random rbpcp-api
+         scientific semigroups string-conversions tagged test-framework
+         test-framework-quickcheck2 text tf-random time transformers
        ];
        benchmarkHaskellDepends = [
-         aeson base base16-bytestring bytestring cereal criterion deepseq
-         errors haskoin-core hexstring hspec monad-time QuickCheck rbpcp-api
-         scientific semigroups string-conversions tagged text time
+         aeson base base16-bytestring blockchain-restful-address-index-api
+         bytestring cereal criterion data-default-class deepseq either
+         errors haskoin-core hexstring hspec monad-time mtl QuickCheck
+         rbpcp-api scientific semigroups string-conversions tagged text time
+         transformers
        ];
        homepage = "https://github.com/runeksvendsen/bitcoin-payment-channel";
        description = "Instant, two-party Bitcoin payments";
        license = "unknown";
        hydraPlatforms = stdenv.lib.platforms.none;
-     }) {};
+       broken = true;
+     }) {blockchain-restful-address-index-api = null;};
 
   "bitcoin-rpc" = callPackage
     ({ mkDerivation, aeson, attoparsec, base, bytestring, cereal
@@ -34667,20 +34699,21 @@ self: {
   "blockchain" = callPackage
     ({ mkDerivation, aeson, async, base, byteable, bytestring
      , cryptonite, deepseq, either, errors, hashable, hspec, memory, mtl
-     , QuickCheck, text, time, transformers, unordered-containers
+     , QuickCheck, quickcheck-instances, text, time, transformers
+     , unordered-containers
      }:
      mkDerivation {
        pname = "blockchain";
-       version = "0.0.2";
-       sha256 = "1abd2p587p3kvg3zyn3qmlhk0lw42cs18f7msgkcz07r2k99r047";
+       version = "0.0.3";
+       sha256 = "0hyyg4gpp8wijisvh176pjkjzrvb3v8v0gaws7j6cpirkpjgi895";
        libraryHaskellDepends = [
          aeson base byteable bytestring cryptonite either errors hashable
          memory mtl text time transformers unordered-containers
        ];
        testHaskellDepends = [
          aeson async base byteable bytestring cryptonite deepseq either
-         errors hashable hspec memory mtl QuickCheck text time transformers
-         unordered-containers
+         errors hashable hspec memory mtl QuickCheck quickcheck-instances
+         text time transformers unordered-containers
        ];
        homepage = "https://github.com/TGOlson/blockchain";
        description = "Generic blockchain implementation";
@@ -35397,8 +35430,8 @@ self: {
      }:
      mkDerivation {
        pname = "boomange";
-       version = "0.1.3.2";
-       sha256 = "0sc003xcqv8qdfjrn2mil81f3dspwjzdg9jj0mnffrws66mkw38a";
+       version = "0.1.3.3";
+       sha256 = "0am2b5f6a47khka31mxynl9j2fisa6zyfk3ca8yna02hdkw3rlf6";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -38264,34 +38297,37 @@ self: {
 
   "cabal2nix" = callPackage
     ({ mkDerivation, aeson, ansi-wl-pprint, base, bytestring, Cabal
-     , containers, deepseq, directory, distribution-nixpkgs, doctest
-     , filepath, hackage-db, language-nix, lens, monad-par
-     , monad-par-extras, mtl, optparse-applicative, pretty, process, SHA
-     , split, text, time, transformers, utf8-string, yaml
+     , cabal-doctest, containers, deepseq, directory
+     , distribution-nixpkgs, doctest, filepath, hackage-db, hopenssl
+     , language-nix, lens, monad-par, monad-par-extras, mtl
+     , optparse-applicative, pretty, process, split, text, time
+     , transformers, utf8-string, yaml
      }:
      mkDerivation {
        pname = "cabal2nix";
-       version = "2.2.1";
-       sha256 = "1hw3x3dk1gc2am3w1cxxsb1rdz976vc35zrjabdlx52ncb2lmfx7";
+       version = "2.3.1";
+       sha256 = "0xi4mj8gyb2k9a43dp49wc84sbxpv9sfa8cmzfp0mkak0alwqahj";
        isLibrary = true;
        isExecutable = true;
+       setupHaskellDepends = [ base Cabal cabal-doctest ];
        libraryHaskellDepends = [
          aeson ansi-wl-pprint base bytestring Cabal containers deepseq
-         directory distribution-nixpkgs filepath hackage-db language-nix
-         lens optparse-applicative pretty process SHA split text
+         directory distribution-nixpkgs filepath hackage-db hopenssl
+         language-nix lens optparse-applicative pretty process split text
          transformers yaml
        ];
        executableHaskellDepends = [
          aeson ansi-wl-pprint base bytestring Cabal containers deepseq
-         directory distribution-nixpkgs filepath hackage-db language-nix
-         lens monad-par monad-par-extras mtl optparse-applicative pretty
-         process SHA split text time transformers utf8-string yaml
+         directory distribution-nixpkgs filepath hackage-db hopenssl
+         language-nix lens monad-par monad-par-extras mtl
+         optparse-applicative pretty process split text time transformers
+         utf8-string yaml
        ];
        testHaskellDepends = [
          aeson ansi-wl-pprint base bytestring Cabal containers deepseq
-         directory distribution-nixpkgs doctest filepath hackage-db
-         language-nix lens optparse-applicative pretty process SHA split
-         text transformers yaml
+         directory distribution-nixpkgs doctest filepath hackage-db hopenssl
+         language-nix lens optparse-applicative pretty process split text
+         transformers yaml
        ];
        homepage = "https://github.com/nixos/cabal2nix#readme";
        description = "Convert Cabal files into Nix build instructions";
@@ -41032,36 +41068,27 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "chart-unit_0_3_1" = callPackage
-    ({ mkDerivation, ad, base, colour, containers, data-default
-     , diagrams, diagrams-core, diagrams-lib, diagrams-svg, foldl
-     , formatting, HUnit, lens, linear, ListLike, mwc-probability
-     , mwc-random, numhask, numhask-range, primitive, protolude
-     , QuickCheck, reflection, smallcheck, SVGFonts, tasty, tasty-hspec
-     , tasty-hunit, tasty-quickcheck, tasty-smallcheck, tdigest, text
+  "chart-unit_0_3_2" = callPackage
+    ({ mkDerivation, ad, base, colour, diagrams-lib, diagrams-svg
+     , foldl, formatting, lens, linear, mwc-probability, mwc-random
+     , numhask, numhask-range, primitive, protolude, reflection, tasty
+     , tasty-hspec, tdigest, text
      }:
      mkDerivation {
        pname = "chart-unit";
-       version = "0.3.1";
-       sha256 = "0z7f604y08d8bki6fjx5fz2b1c9lrhalxdjlx1wmhlxz320dpm2w";
+       version = "0.3.2";
+       sha256 = "06yilm8ldkf59vxycydfhn990x6lmykgma2nwc87mxnqc6820a22";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
-         base colour containers data-default diagrams diagrams-core
-         diagrams-lib diagrams-svg foldl formatting lens linear numhask
-         numhask-range protolude QuickCheck SVGFonts text
+         base colour diagrams-lib diagrams-svg foldl formatting lens linear
+         numhask numhask-range text
        ];
        executableHaskellDepends = [
-         ad base containers diagrams diagrams-core diagrams-lib diagrams-svg
-         foldl formatting lens linear ListLike mwc-probability mwc-random
-         numhask numhask-range primitive protolude reflection SVGFonts
-         tdigest text
-       ];
-       testHaskellDepends = [
-         base data-default diagrams-lib HUnit numhask numhask-range
-         protolude QuickCheck smallcheck tasty tasty-hspec tasty-hunit
-         tasty-quickcheck tasty-smallcheck
+         ad base foldl mwc-probability mwc-random numhask primitive
+         protolude reflection tdigest text
        ];
+       testHaskellDepends = [ base numhask tasty tasty-hspec ];
        homepage = "https://github.com/tonyday567/chart-unit";
        description = "A set of native haskell charts";
        license = stdenv.lib.licenses.bsd3;
@@ -45889,8 +45916,8 @@ self: {
      }:
      mkDerivation {
        pname = "concurrent-machines";
-       version = "0.3.0";
-       sha256 = "1lha3bk98cdd3bsy5kbl92hp3f35x3q1p135j37r9xw9ix4kivy5";
+       version = "0.3.1";
+       sha256 = "0n04gnnv323fk1h9mp8krqbl2v6ljjv1vzw5df38cxvj2xd64y94";
        libraryHaskellDepends = [
          async base containers lifted-async machines monad-control
          semigroups time transformers transformers-base
@@ -49470,6 +49497,26 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "crypt-sha512" = callPackage
+    ({ mkDerivation, attoparsec, base, bytestring, cryptohash-sha512
+     , quickcheck-instances, tasty, tasty-hunit, tasty-quickcheck
+     }:
+     mkDerivation {
+       pname = "crypt-sha512";
+       version = "0";
+       sha256 = "1wsma9frdrn39i506zydlzlk1ir6jh1pidqfjms8rwqjpx965gn2";
+       libraryHaskellDepends = [
+         attoparsec base bytestring cryptohash-sha512
+       ];
+       testHaskellDepends = [
+         base bytestring quickcheck-instances tasty tasty-hunit
+         tasty-quickcheck
+       ];
+       homepage = "https://github.com/phadej/crypt-sha512";
+       description = "Pure Haskell implelementation for GNU SHA512 crypt algorithm";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "crypto-api" = callPackage
     ({ mkDerivation, base, bytestring, cereal, entropy, tagged
      , transformers
@@ -52178,8 +52225,8 @@ self: {
     ({ mkDerivation, base, containers, ghc-prim, hspec, lens, tagged }:
      mkDerivation {
        pname = "data-diverse";
-       version = "0.3.0.0";
-       sha256 = "1h6i10qixy0603xamal2v54knznjmza081hg410a2s97cigclay8";
+       version = "0.4.0.0";
+       sha256 = "0jqyn4jwdvzijqwrb5j0052h95vxdwgixfb5a7cgwa574yipks09";
        libraryHaskellDepends = [ base containers ghc-prim lens tagged ];
        testHaskellDepends = [ base hspec lens tagged ];
        homepage = "https://github.com/louispan/data-diverse#readme";
@@ -55921,6 +55968,34 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "diagrams-contrib_1_4_1" = callPackage
+    ({ mkDerivation, base, circle-packing, colour, containers
+     , cubicbezier, data-default, data-default-class, diagrams-core
+     , diagrams-lib, diagrams-solve, force-layout, hashable, HUnit, lens
+     , linear, mfsolve, MonadRandom, monoid-extras, mtl, mtl-compat
+     , parsec, QuickCheck, random, semigroups, split, test-framework
+     , test-framework-hunit, test-framework-quickcheck2, text
+     }:
+     mkDerivation {
+       pname = "diagrams-contrib";
+       version = "1.4.1";
+       sha256 = "1apbgicaq7qaij42hwh5aiy67si2fjd0m4lah1hw4vz0cqfxxs2v";
+       libraryHaskellDepends = [
+         base circle-packing colour containers cubicbezier data-default
+         data-default-class diagrams-core diagrams-lib diagrams-solve
+         force-layout hashable lens linear mfsolve MonadRandom monoid-extras
+         mtl mtl-compat parsec random semigroups split text
+       ];
+       testHaskellDepends = [
+         base containers diagrams-lib HUnit QuickCheck test-framework
+         test-framework-hunit test-framework-quickcheck2
+       ];
+       homepage = "http://projects.haskell.org/diagrams/";
+       description = "Collection of user contributions to diagrams EDSL";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "diagrams-core" = callPackage
     ({ mkDerivation, adjunctions, base, containers, distributive
      , dual-tree, lens, linear, monoid-extras, mtl, profunctors
@@ -56054,8 +56129,8 @@ self: {
        pname = "diagrams-lib";
        version = "1.4.1.2";
        sha256 = "0w16cljv9jcvn46hd19qvw1bfvxijlak286nap9qbvyavq2qhvjb";
-       revision = "2";
-       editedCabalFile = "0na2aqk7aw2f1nq62r1zwmv3f5h9yx61b0b5qxmsazgyvqjgc3z3";
+       revision = "3";
+       editedCabalFile = "14ni87kwmjhbphcihiivvz0nxga355263q36wvbyvvjmxvbdj98n";
        libraryHaskellDepends = [
          active adjunctions array base bytestring cereal colour containers
          data-default-class diagrams-core diagrams-solve directory
@@ -56243,6 +56318,24 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "diagrams-solve_0_1_1" = callPackage
+    ({ mkDerivation, base, deepseq, tasty, tasty-hunit
+     , tasty-quickcheck
+     }:
+     mkDerivation {
+       pname = "diagrams-solve";
+       version = "0.1.1";
+       sha256 = "17agchqkmj14b17sw50kzxq4hm056g5d8yy0wnqn5w8h1d0my7x4";
+       libraryHaskellDepends = [ base ];
+       testHaskellDepends = [
+         base deepseq tasty tasty-hunit tasty-quickcheck
+       ];
+       homepage = "http://projects.haskell.org/diagrams";
+       description = "Pure Haskell solver routines used by diagrams";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "diagrams-svg" = callPackage
     ({ mkDerivation, base, base64-bytestring, bytestring, colour
      , containers, diagrams-core, diagrams-lib, filepath, hashable
@@ -56956,8 +57049,8 @@ self: {
     ({ mkDerivation, base, Cabal, ghc-prim, QuickCheck }:
      mkDerivation {
        pname = "dimensions";
-       version = "0.1.0.0";
-       sha256 = "0162ki2vw1k3wza7b4zfp4ya4lb3cdzp0vdr0k8d8k5b3w107p26";
+       version = "0.3.0.0";
+       sha256 = "00932v3j629ik2n4flq74zcxvvqxgsl88sifyn2ppdwvp535cmhm";
        libraryHaskellDepends = [ base ghc-prim ];
        testHaskellDepends = [ base Cabal QuickCheck ];
        homepage = "https://github.com/achirkin/easytensor#readme";
@@ -57188,6 +57281,24 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "direct-sqlite_2_3_20" = callPackage
+    ({ mkDerivation, base, base16-bytestring, bytestring, directory
+     , HUnit, temporary, text
+     }:
+     mkDerivation {
+       pname = "direct-sqlite";
+       version = "2.3.20";
+       sha256 = "0wdjmqfs968319nl6ikmrrjqajfcb48k11hmmljwg81n1sbdydbf";
+       libraryHaskellDepends = [ base bytestring text ];
+       testHaskellDepends = [
+         base base16-bytestring bytestring directory HUnit temporary text
+       ];
+       homepage = "https://github.com/IreneKnapp/direct-sqlite";
+       description = "Low-level binding to SQLite3. Includes UTF8 and BLOB support.";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "directed-cubical" = callPackage
     ({ mkDerivation, base, bytestring, containers, deepseq, hashable
      , parallel, QuickCheck, unordered-containers, vector
@@ -59976,6 +60087,25 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "dual-tree_0_2_1" = callPackage
+    ({ mkDerivation, base, monoid-extras, newtype-generics, QuickCheck
+     , semigroups, testing-feat
+     }:
+     mkDerivation {
+       pname = "dual-tree";
+       version = "0.2.1";
+       sha256 = "06azc2lwli9aw81a23g82yxiann2qjc3bk7cdyh9kiwimdyj8r94";
+       libraryHaskellDepends = [
+         base monoid-extras newtype-generics semigroups
+       ];
+       testHaskellDepends = [
+         base monoid-extras QuickCheck semigroups testing-feat
+       ];
+       description = "Rose trees with cached and accumulating monoidal annotations";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "duckling" = callPackage
     ({ mkDerivation, aeson, array, attoparsec, base, bytestring
      , containers, deepseq, dependent-sum, directory, extra, filepath
@@ -60702,13 +60832,13 @@ self: {
      }:
      mkDerivation {
        pname = "easytensor";
-       version = "0.2.0.0";
-       sha256 = "1z5myc51q96pbwaryf6pvjvfqq9l2d0cwnhpxpxn3bkcj6jr9yf8";
+       version = "0.3.0.0";
+       sha256 = "1a6y6lrnc82354jqfrns4bb3pwhiwnidfcgfwzg38wsdmpq5rhg9";
        libraryHaskellDepends = [ base dimensions ghc-prim ];
        testHaskellDepends = [ base Cabal dimensions QuickCheck ];
        benchmarkHaskellDepends = [ base dimensions time ];
        homepage = "https://github.com/achirkin/easytensor#readme";
-       description = "Initial project template from stack";
+       description = "Pure, type-indexed haskell vector, matrix, and tensor library";
        license = stdenv.lib.licenses.mit;
        hydraPlatforms = [ "x86_64-darwin" "x86_64-linux" ];
      }) {};
@@ -61808,6 +61938,19 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "eliminators" = callPackage
+    ({ mkDerivation, base, hspec, singletons }:
+     mkDerivation {
+       pname = "eliminators";
+       version = "0.1";
+       sha256 = "0amd3gwnxhdbpg9afv2zs4c3lhc9s7ri66cpdp4x7vmp5xx6yi3n";
+       libraryHaskellDepends = [ base singletons ];
+       testHaskellDepends = [ base hspec singletons ];
+       homepage = "https://github.com/RyanGlScott/eliminators";
+       description = "Dependently typed elimination functions using singletons";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "elision" = callPackage
     ({ mkDerivation, base, profunctors }:
      mkDerivation {
@@ -67348,6 +67491,25 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "file-templates" = callPackage
+    ({ mkDerivation, attoparsec, base, bytestring, directory, filepath
+     , foundation, transformers, unordered-containers
+     }:
+     mkDerivation {
+       pname = "file-templates";
+       version = "1.1.0.0";
+       sha256 = "0vh83vpcfz5yringls1w8ydl3xr5jawgnzyvj8nn28m1qgwaz29v";
+       isLibrary = false;
+       isExecutable = true;
+       executableHaskellDepends = [
+         attoparsec base bytestring directory filepath foundation
+         transformers unordered-containers
+       ];
+       homepage = "https://github.com/anfelor/file-templates#readme";
+       description = "Use templates for files and directories";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "filecache" = callPackage
     ({ mkDerivation, base, directory, exceptions, hashable, hinotify
      , lens, mtl, stm, strict-base-types, temporary
@@ -67474,6 +67636,23 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "fileplow" = callPackage
+    ({ mkDerivation, base, binary-search, bytestring, hspec, mtl
+     , QuickCheck, temporary, vector
+     }:
+     mkDerivation {
+       pname = "fileplow";
+       version = "0.1.0.0";
+       sha256 = "017f3f3w69fvlhdagivb5xp72vwzmimcjd94zw9l9ylp5jv7vp4x";
+       libraryHaskellDepends = [ base binary-search bytestring vector ];
+       testHaskellDepends = [
+         base bytestring hspec mtl QuickCheck temporary
+       ];
+       homepage = "https://github.com/agrafix/fileplow#readme";
+       description = "Library to process and search large files or a collection of files";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "filestore" = callPackage
     ({ mkDerivation, base, bytestring, containers, Diff, directory
      , filepath, HUnit, mtl, old-locale, parsec, process, split, time
@@ -68838,8 +69017,8 @@ self: {
      }:
      mkDerivation {
        pname = "fltkhs";
-       version = "0.5.3.2";
-       sha256 = "0m29qcajhbzkl577xyzly82m9jrd446gzpxgg7sswvaki1wa6yv0";
+       version = "0.5.3.3";
+       sha256 = "0rl6zwamkwdjnlmn2rr0mh16idci5xqgr70qsvqarj34h1ax2idb";
        isLibrary = true;
        isExecutable = true;
        setupHaskellDepends = [ base Cabal directory filepath ];
@@ -72260,6 +72439,24 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "gen-passwd" = callPackage
+    ({ mkDerivation, base, bytestring, optparse-applicative, random
+     , vector
+     }:
+     mkDerivation {
+       pname = "gen-passwd";
+       version = "1.1.0.0";
+       sha256 = "16ql67p4knkwas4kfa1mikqqxq6kvzcnrbza5y7kk3gi0haiaj1s";
+       isLibrary = false;
+       isExecutable = true;
+       executableHaskellDepends = [
+         base bytestring optparse-applicative random vector
+       ];
+       homepage = "https://github.com/anfelor/gen-passwd#readme";
+       description = "Create wordlist-based passwords easily";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "gencheck" = callPackage
     ({ mkDerivation, base, combinat, containers, ieee754, memoize
      , random, template-haskell, transformers
@@ -75631,26 +75828,26 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "ginger_0_5_2_1" = callPackage
+  "ginger_0_5_3_0" = callPackage
     ({ mkDerivation, aeson, base, bytestring, data-default, filepath
      , http-types, mtl, parsec, safe, scientific, tasty, tasty-hunit
      , tasty-quickcheck, text, time, transformers, unordered-containers
-     , utf8-string, vector, wryte
+     , utf8-string, vector
      }:
      mkDerivation {
        pname = "ginger";
-       version = "0.5.2.1";
-       sha256 = "1axazqa84hbgrrswdmxkl5wc8kdfana9f6wzj5m83zn8pmjsixvk";
+       version = "0.5.3.0";
+       sha256 = "049ys725scrrkxc2q4wx085hbzdnjpm1jd9wqraqg5fa23vpfy34";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
          aeson base bytestring data-default filepath http-types mtl parsec
          safe scientific text time transformers unordered-containers
-         utf8-string vector wryte
+         utf8-string vector
        ];
        executableHaskellDepends = [
          aeson base bytestring data-default text transformers
-         unordered-containers wryte
+         unordered-containers
        ];
        testHaskellDepends = [
          aeson base bytestring data-default mtl tasty tasty-hunit
@@ -77583,8 +77780,8 @@ self: {
      }:
      mkDerivation {
        pname = "glue-common";
-       version = "0.4.9";
-       sha256 = "15cxrm7bnc4p6ayykpba6rgzb27d3rhd0cw437x6id5a0daxr0sc";
+       version = "0.5";
+       sha256 = "0wza8cmschfh6kk21wm2bz12ly3in7kf0cv6jma0a78fiphdwg2q";
        libraryHaskellDepends = [
          base hashable lifted-base monad-control text time transformers
          transformers-base unordered-containers
@@ -77607,8 +77804,8 @@ self: {
      }:
      mkDerivation {
        pname = "glue-core";
-       version = "0.4.9";
-       sha256 = "035x4fx4c1168gqmrgc60xyzz670pa9v7qi0qfp91vkl5xwa5i2n";
+       version = "0.5";
+       sha256 = "0x89h04j8z58nd1cx6rxn0hgjgb24kdzgl21m2xrlj7h1fp9fwfi";
        libraryHaskellDepends = [
          base glue-common hashable lifted-base monad-control text time
          transformers transformers-base unordered-containers
@@ -77631,8 +77828,8 @@ self: {
      }:
      mkDerivation {
        pname = "glue-ekg";
-       version = "0.4.9";
-       sha256 = "0gr0887dz3527xbcdrf70ww0z7mqh63733ia0d7vqgmsmj95fg1p";
+       version = "0.5";
+       sha256 = "0ckbmjizfclpdyzrc85l9hh79yl82rmbkim5gq543qnppi1pn4h6";
        libraryHaskellDepends = [
          base ekg-core glue-common hashable lifted-base monad-control text
          time transformers transformers-base unordered-containers
@@ -77654,8 +77851,8 @@ self: {
      }:
      mkDerivation {
        pname = "glue-example";
-       version = "0.4.9";
-       sha256 = "0z4pkdrzdjs6xkx8wi314jadhiyyf1nqmd2jwh3h3c422l951sib";
+       version = "0.5";
+       sha256 = "10nw8bzxbcghyy9xyb69ka3a3w66fysczhhgrshy462ihpw8p8bw";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -89233,14 +89430,14 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "haskell-tools-ast_0_7_0_0" = callPackage
+  "haskell-tools-ast_0_8_0_0" = callPackage
     ({ mkDerivation, base, ghc, mtl, references, template-haskell
      , uniplate
      }:
      mkDerivation {
        pname = "haskell-tools-ast";
-       version = "0.7.0.0";
-       sha256 = "063r92xzykhh3sr3zx161md2p98qzbsxs741ajs606bi2za52fyv";
+       version = "0.8.0.0";
+       sha256 = "15d588xnmghq116g4bg0jv10z5xzs54ln4da58dzm0d8241bmcd0";
        libraryHaskellDepends = [
          base ghc mtl references template-haskell uniplate
        ];
@@ -89323,18 +89520,18 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "haskell-tools-backend-ghc_0_7_0_0" = callPackage
-    ({ mkDerivation, base, bytestring, containers, ghc
+  "haskell-tools-backend-ghc_0_8_0_0" = callPackage
+    ({ mkDerivation, base, bytestring, containers, ghc, ghc-boot-th
      , haskell-tools-ast, mtl, references, safe, split, template-haskell
      , transformers, uniplate
      }:
      mkDerivation {
        pname = "haskell-tools-backend-ghc";
-       version = "0.7.0.0";
-       sha256 = "09f0g0wzfl6979hbcz8qyyf0wwzk88rm83dw7h84by07nglfpxzg";
+       version = "0.8.0.0";
+       sha256 = "076kb9hcjina0d5dcwslbxhkja3p2m2fyxs88ywyqlciry2wdw2n";
        libraryHaskellDepends = [
-         base bytestring containers ghc haskell-tools-ast mtl references
-         safe split template-haskell transformers uniplate
+         base bytestring containers ghc ghc-boot-th haskell-tools-ast mtl
+         references safe split template-haskell transformers uniplate
        ];
        homepage = "https://github.com/nboldi/haskell-tools";
        description = "Creating the Haskell-Tools AST from GHC's representations";
@@ -89372,7 +89569,7 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "haskell-tools-cli_0_7_0_0" = callPackage
+  "haskell-tools-cli_0_8_0_0" = callPackage
     ({ mkDerivation, aeson, base, bytestring, containers, criterion
      , directory, filepath, ghc, ghc-paths, haskell-tools-ast
      , haskell-tools-prettyprint, haskell-tools-refactor, knob, mtl
@@ -89380,8 +89577,8 @@ self: {
      }:
      mkDerivation {
        pname = "haskell-tools-cli";
-       version = "0.7.0.0";
-       sha256 = "1mnghaccwlyk4rc443ixgz760pdlfp1klj9zmhhin8gyldyh97zn";
+       version = "0.8.0.0";
+       sha256 = "02f5fhb20wb49gchqx8mjc6khdlc3g6lfawxl3v0xr8fargyyiz5";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -89430,7 +89627,7 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "haskell-tools-daemon_0_7_0_0" = callPackage
+  "haskell-tools-daemon_0_8_0_0" = callPackage
     ({ mkDerivation, aeson, base, bytestring, containers, Diff
      , directory, filepath, ghc, ghc-paths, haskell-tools-ast
      , haskell-tools-prettyprint, haskell-tools-refactor, HUnit, mtl
@@ -89438,8 +89635,8 @@ self: {
      }:
      mkDerivation {
        pname = "haskell-tools-daemon";
-       version = "0.7.0.0";
-       sha256 = "09sccrmdczqdh4qwby79sy31asrhn7jmp7hrrzq59gp02f4v0rzw";
+       version = "0.8.0.0";
+       sha256 = "0fd9pxyxsfy09ks21nsk6khx97mb73kvjk6hg3wc8qcffxng9m69";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -89480,15 +89677,15 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "haskell-tools-debug_0_7_0_0" = callPackage
+  "haskell-tools-debug_0_8_0_0" = callPackage
     ({ mkDerivation, base, filepath, ghc, ghc-paths, haskell-tools-ast
      , haskell-tools-backend-ghc, haskell-tools-prettyprint
      , haskell-tools-refactor, references, template-haskell
      }:
      mkDerivation {
        pname = "haskell-tools-debug";
-       version = "0.7.0.0";
-       sha256 = "1iqlr6zhya3gcmlhkhfbrqh9wirhsrkpn1qr6zxab1a3yx9q895i";
+       version = "0.8.0.0";
+       sha256 = "0j9gd562kmmanqx9kbs1kks68pksnxgf55rghl8ip3j8a3h93smy";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -89534,7 +89731,7 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "haskell-tools-demo_0_7_0_2" = callPackage
+  "haskell-tools-demo_0_8_0_0" = callPackage
     ({ mkDerivation, aeson, base, bytestring, containers, directory
      , filepath, ghc, ghc-paths, haskell-tools-ast
      , haskell-tools-backend-ghc, haskell-tools-prettyprint
@@ -89544,8 +89741,8 @@ self: {
      }:
      mkDerivation {
        pname = "haskell-tools-demo";
-       version = "0.7.0.2";
-       sha256 = "0r8fb1mzf2j92n6xjkxd5kxqi6l9h0haf07l3p8fazqysxdsr1pj";
+       version = "0.8.0.0";
+       sha256 = "14l8zwzi4nzx1ddq2sbazr5faf0y241ppx9df5q9n0v24aclmxd6";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -89582,14 +89779,14 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "haskell-tools-prettyprint_0_7_0_0" = callPackage
+  "haskell-tools-prettyprint_0_8_0_0" = callPackage
     ({ mkDerivation, base, containers, ghc, haskell-tools-ast, mtl
      , references, split, text, uniplate
      }:
      mkDerivation {
        pname = "haskell-tools-prettyprint";
-       version = "0.7.0.0";
-       sha256 = "0d5ar53qkxyirs1q0p0nxzg9qy8mzsrj615ad1bfqz4lx1i0amsc";
+       version = "0.8.0.0";
+       sha256 = "19bx0fzgvin78iilw32klmjr0z0c9cw1x0xx1nj8mbi44c5rcb64";
        libraryHaskellDepends = [
          base containers ghc haskell-tools-ast mtl references split text
          uniplate
@@ -89631,7 +89828,7 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "haskell-tools-refactor_0_7_0_0" = callPackage
+  "haskell-tools-refactor_0_8_0_0" = callPackage
     ({ mkDerivation, base, Cabal, containers, directory, either
      , filepath, ghc, ghc-paths, haskell-tools-ast
      , haskell-tools-backend-ghc, haskell-tools-prettyprint
@@ -89641,8 +89838,8 @@ self: {
      }:
      mkDerivation {
        pname = "haskell-tools-refactor";
-       version = "0.7.0.0";
-       sha256 = "0nivbkndwwkx32y1dzyqrpbmx8fasnxgq7c3hm7bs7plj4qsb096";
+       version = "0.8.0.0";
+       sha256 = "1k9mq164v7nm83dykdgmzxfdqmyk5p35lgzvnmw9mh43rrnnw8vd";
        libraryHaskellDepends = [
          base Cabal containers directory filepath ghc ghc-paths
          haskell-tools-ast haskell-tools-backend-ghc
@@ -89685,15 +89882,15 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "haskell-tools-rewrite_0_7_0_0" = callPackage
+  "haskell-tools-rewrite_0_8_0_0" = callPackage
     ({ mkDerivation, base, containers, directory, filepath, ghc
      , haskell-tools-ast, haskell-tools-prettyprint, mtl, references
      , tasty, tasty-hunit
      }:
      mkDerivation {
        pname = "haskell-tools-rewrite";
-       version = "0.7.0.0";
-       sha256 = "00gl4f711whfcrfv3i17ilwcj63w5zwq3p8njw8h4wcd06q0f28p";
+       version = "0.8.0.0";
+       sha256 = "076dc91swh42rs80ijbjrbzab1m9vjdzvy7z9r7znmrhy951ck5c";
        libraryHaskellDepends = [
          base containers ghc haskell-tools-ast haskell-tools-prettyprint mtl
          references
@@ -95130,8 +95327,8 @@ self: {
      }:
      mkDerivation {
        pname = "highlight";
-       version = "1.0.0.0";
-       sha256 = "1gr4aj0w605hx2mrgzicb1nwimxyxpj2jid7ca6qpwnbxvnj7ryi";
+       version = "1.0.0.1";
+       sha256 = "0xklv4fnhi4dbz33hzw7l4ng5ap1jfhn4qmkshl2k6gn2pkyaikx";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -96373,8 +96570,8 @@ self: {
     ({ mkDerivation, base, hledger-lib, text, time }:
      mkDerivation {
        pname = "hledger-diff";
-       version = "0.2.0.8";
-       sha256 = "0yvl102c1jzml2rl1jpb75x9v48v14s8gz63wc2bkm5bjm5f94g6";
+       version = "0.2.0.9";
+       sha256 = "0ajjiz6jvm45j472f0ypxk33hc47rg0zs9ylkcrkvvk9992x7lnq";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [ base hledger-lib text time ];
@@ -96394,6 +96591,8 @@ self: {
        pname = "hledger-iadd";
        version = "1.2.2";
        sha256 = "1d12fjqyrj0wy8iq096h8mq2v76j8ihc2d8j1xc5qckw2g29539a";
+       revision = "2";
+       editedCabalFile = "0yhc50km7jfhdynvyvqyqi2jwpy554kwz1l9fsvklf2scfv4c3k5";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -96439,8 +96638,8 @@ self: {
      }:
      mkDerivation {
        pname = "hledger-irr";
-       version = "0.1.1.10";
-       sha256 = "1m5dfgrs943cqm3ix7iadgyv3j4vlp65s86sas03ll390zvny44q";
+       version = "0.1.1.11";
+       sha256 = "1rxpv70xfr7z8yn65dcac1a7l4mb2p1z30ld4bw75gr34lkirb1y";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -98509,8 +98708,8 @@ self: {
      }:
      mkDerivation {
        pname = "hops";
-       version = "0.7.1";
-       sha256 = "04hgpvk7lrp1iqw02yjawnh2mvxjnp21h3cd36yzy4hw74am33sp";
+       version = "0.7.2";
+       sha256 = "16a1ygxv4isw5wiq5dhjn4xdlr67zy1ngn61mwilgwkvwj0cjxc3";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -101588,6 +101787,21 @@ self: {
        license = stdenv.lib.licenses.isc;
      }) {};
 
+  "hsinstall_1_6" = callPackage
+    ({ mkDerivation, base, directory, filepath }:
+     mkDerivation {
+       pname = "hsinstall";
+       version = "1.6";
+       sha256 = "04f86mk2304q9kz37hr18b9jcz66wk04z747xzpxbnnwig390406";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [ base directory filepath ];
+       executableHaskellDepends = [ base directory filepath ];
+       description = "Install Haskell software";
+       license = stdenv.lib.licenses.isc;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "hskeleton" = callPackage
     ({ mkDerivation, base, Cabal }:
      mkDerivation {
@@ -122775,8 +122989,8 @@ self: {
      }:
      mkDerivation {
        pname = "llvm-pretty-bc-parser";
-       version = "0.3.2.0";
-       sha256 = "0h0lxp2aavljps08afqa22sl9b73fi02nv91k9x44qy2na2pk2hr";
+       version = "0.4.0.0";
+       sha256 = "0mj4k4a8xap5gsw7zrnlg6ms65nb1cfmllxq24h7gvd7s9qs9cp8";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -124188,19 +124402,20 @@ self: {
      }) {};
 
   "loup" = callPackage
-    ({ mkDerivation, aeson, amazonka, amazonka-swf, base, bytestring
-     , conduit, lifted-async, lifted-base, optparse-generic, preamble
-     , shakers, time, turtle, unordered-containers, uuid, yaml
+    ({ mkDerivation, aeson, amazonka, amazonka-swf, base, basic-prelude
+     , bytestring, conduit, lifted-async, lifted-base, optparse-generic
+     , preamble, shakers, time, turtle, unordered-containers, uuid, yaml
      }:
      mkDerivation {
        pname = "loup";
-       version = "0.0.9";
-       sha256 = "059alaci5rqlagm7hgkk6nl9i11ynjkn2rz70haklbw6di2l9niw";
+       version = "0.0.10";
+       sha256 = "0j65vx9cpn0q1zhcz4wsk86wnqlmr2m8dkqgzy2scm7chfd2hbhv";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
-         aeson amazonka amazonka-swf base bytestring conduit lifted-async
-         lifted-base preamble time turtle unordered-containers uuid yaml
+         aeson amazonka amazonka-swf base basic-prelude bytestring conduit
+         lifted-async lifted-base preamble time turtle unordered-containers
+         uuid yaml
        ];
        executableHaskellDepends = [ base optparse-generic shakers ];
        homepage = "https://github.com/swift-nav/loup";
@@ -129743,8 +129958,8 @@ self: {
      }:
      mkDerivation {
        pname = "miso";
-       version = "0.1.0.4";
-       sha256 = "12q0jg51rlc1jsqwshxp55v1ddsb9zapq0lz9f300cyd9xg5rcvg";
+       version = "0.1.1.0";
+       sha256 = "16ww5nbjdkjlwsr3dapv3px12dvi9dxbmz9z62n3hfpz5c4v5864";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -139525,23 +139740,6 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "ombra" = callPackage
-    ({ mkDerivation, base, Boolean, gl, hashable, hashtables
-     , transformers, unordered-containers, vector-space
-     }:
-     mkDerivation {
-       pname = "ombra";
-       version = "0.3.1.0";
-       sha256 = "0nzi7pb3m0sp4s0w5k06285xx85fpgfnc464xb431ac7ppinwq1q";
-       libraryHaskellDepends = [
-         base Boolean gl hashable hashtables transformers
-         unordered-containers vector-space
-       ];
-       homepage = "https://github.com/ziocroc/Ombra";
-       description = "Render engine";
-       license = stdenv.lib.licenses.bsd3;
-     }) {};
-
   "omega" = callPackage
     ({ mkDerivation, array, base, containers, directory, filepath
      , pretty, time
@@ -140132,6 +140330,24 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "openexr-write" = callPackage
+    ({ mkDerivation, base, binary, bytestring, data-binary-ieee754
+     , deepseq, directory, hspec, split, vector, vector-split, zlib
+     }:
+     mkDerivation {
+       pname = "openexr-write";
+       version = "0.1.0.1";
+       sha256 = "0f45jgj08fmrj30f167xldapm5lqma4yy95y9mjx6appb7cg5qvd";
+       libraryHaskellDepends = [
+         base binary bytestring data-binary-ieee754 deepseq split vector
+         vector-split zlib
+       ];
+       testHaskellDepends = [ base bytestring directory hspec vector ];
+       homepage = "https://github.com/pavolzetor/openexr-write#readme";
+       description = "Library for writing images in OpenEXR HDR file format";
+       license = stdenv.lib.licenses.gpl3;
+     }) {};
+
   "openflow" = callPackage
     ({ mkDerivation, aeson, base, bimap, binary, bytestring, containers
      , deepseq-generics, hashable, network
@@ -141596,8 +141812,8 @@ self: {
      }:
      mkDerivation {
        pname = "overload";
-       version = "0.1.0.3";
-       sha256 = "1mx49xzhqsmlb9njplxy9rs19mpahxbcskisp0ds1ihiyf51qzfm";
+       version = "0.1.0.4";
+       sha256 = "16sry2c4wrly3y3k47gry53klxf4kvbym6fybb8f7z9hqffx18a9";
        libraryHaskellDepends = [
          base simple-effects template-haskell th-expand-syns
        ];
@@ -143987,15 +144203,15 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "path_0_6_0" = callPackage
+  "path_0_6_1" = callPackage
     ({ mkDerivation, aeson, base, bytestring, deepseq, exceptions
      , filepath, genvalidity, genvalidity-property, hashable, hspec, mtl
      , QuickCheck, template-haskell, validity
      }:
      mkDerivation {
        pname = "path";
-       version = "0.6.0";
-       sha256 = "107jkd0wz40njxbdmgvc51q6bjqz71wl0bi0sprjhvgm2bn64x2x";
+       version = "0.6.1";
+       sha256 = "0nayla4k1gb821k8y5b9miflv1bi8f0czf9rqr044nrr2dddi2sb";
        libraryHaskellDepends = [
          aeson base deepseq exceptions filepath hashable template-haskell
        ];
@@ -149028,6 +149244,8 @@ self: {
        pname = "polyvariadic";
        version = "0.3.0.0";
        sha256 = "13q6sq56gkn6gfjl9mblhjkkfk5bgi86l1x2x9yirfjms4x8445z";
+       revision = "1";
+       editedCabalFile = "0xnj571ccbpwnra5nzlvsj9qfj79aiq2cphwl8454jpl17cjnir2";
        libraryHaskellDepends = [ base containers ];
        homepage = "https://github.com/fgaz/polyvariadic";
        description = "Creation and application of polyvariadic functions";
@@ -150533,8 +150751,8 @@ self: {
      }:
      mkDerivation {
        pname = "preamble";
-       version = "0.0.40";
-       sha256 = "0g7l11nqslyqhcrm5l5k2yigd4d8gjaysm5kc6n2mm7n8c3cw1b2";
+       version = "0.0.44";
+       sha256 = "03x71m1sgq5l70xkmlvi8v3805xa39fbg9py54sqfdyk2rg56zyy";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -152347,6 +152565,32 @@ self: {
        license = stdenv.lib.licenses.asl20;
      }) {};
 
+  "prometheus-client_0_2_0" = callPackage
+    ({ mkDerivation, atomic-primops, base, bytestring, clock
+     , containers, criterion, doctest, hspec, mtl, QuickCheck, random
+     , random-shuffle, stm, transformers, utf8-string
+     }:
+     mkDerivation {
+       pname = "prometheus-client";
+       version = "0.2.0";
+       sha256 = "15iqacx6gygd5xp17i1c7sd0mvndqfxqvjjs17hndxiqjgxvlr1z";
+       libraryHaskellDepends = [
+         atomic-primops base bytestring clock containers mtl stm
+         transformers utf8-string
+       ];
+       testHaskellDepends = [
+         atomic-primops base bytestring clock containers doctest hspec mtl
+         QuickCheck random-shuffle stm transformers utf8-string
+       ];
+       benchmarkHaskellDepends = [
+         base bytestring criterion random utf8-string
+       ];
+       homepage = "https://github.com/fimad/prometheus-haskell";
+       description = "Haskell client library for http://prometheus.io.";
+       license = stdenv.lib.licenses.asl20;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "prometheus-metrics-ghc" = callPackage
     ({ mkDerivation, base, doctest, prometheus-client, utf8-string }:
      mkDerivation {
@@ -152360,6 +152604,20 @@ self: {
        license = stdenv.lib.licenses.asl20;
      }) {};
 
+  "prometheus-metrics-ghc_0_2_0" = callPackage
+    ({ mkDerivation, base, doctest, prometheus-client, utf8-string }:
+     mkDerivation {
+       pname = "prometheus-metrics-ghc";
+       version = "0.2.0";
+       sha256 = "0j3lk2khnqbf9l3lri4n7fn0riinwakp911l05h2qywjcj0v5vm0";
+       libraryHaskellDepends = [ base prometheus-client utf8-string ];
+       testHaskellDepends = [ base doctest prometheus-client ];
+       homepage = "https://github.com/fimad/prometheus-haskell";
+       description = "Metrics exposing GHC runtime information for use with prometheus-client";
+       license = stdenv.lib.licenses.asl20;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "promise" = callPackage
     ({ mkDerivation, async, base }:
      mkDerivation {
@@ -153059,6 +153317,30 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "psqueues_0_2_3_0" = callPackage
+    ({ mkDerivation, array, base, containers, criterion, deepseq
+     , fingertree-psqueue, ghc-prim, hashable, HUnit, mtl, PSQueue
+     , QuickCheck, random, tagged, test-framework, test-framework-hunit
+     , test-framework-quickcheck2, unordered-containers
+     }:
+     mkDerivation {
+       pname = "psqueues";
+       version = "0.2.3.0";
+       sha256 = "19s36xkbpa8466y56bgcmrqxz7aq1fysliyvw79k2a76bpg9bv95";
+       libraryHaskellDepends = [ base deepseq ghc-prim hashable ];
+       testHaskellDepends = [
+         array base deepseq ghc-prim hashable HUnit QuickCheck tagged
+         test-framework test-framework-hunit test-framework-quickcheck2
+       ];
+       benchmarkHaskellDepends = [
+         base containers criterion deepseq fingertree-psqueue ghc-prim
+         hashable mtl PSQueue random unordered-containers
+       ];
+       description = "Pure priority search queues";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "pstemmer" = callPackage
     ({ mkDerivation, base, text }:
      mkDerivation {
@@ -163804,6 +164086,23 @@ self: {
        license = stdenv.lib.licenses.publicDomain;
      }) {};
 
+  "safecopy-migrate" = callPackage
+    ({ mkDerivation, base, base-prelude, cereal, containers, extra
+     , haskell-src-meta, microlens, safecopy, template-haskell, uniplate
+     }:
+     mkDerivation {
+       pname = "safecopy-migrate";
+       version = "0.1.0.0";
+       sha256 = "1bs41w8zkgsidns68xv4finsnwici6wrfc6xiy9vk0la96i4wcv5";
+       libraryHaskellDepends = [
+         base base-prelude cereal containers extra haskell-src-meta
+         microlens safecopy template-haskell uniplate
+       ];
+       homepage = "http://github.com/aelve/safecopy-migrate";
+       description = "Making SafeCopy migrations easier";
+       license = stdenv.lib.licenses.publicDomain;
+     }) {};
+
   "safecopy-store" = callPackage
     ({ mkDerivation, array, base, bytestring, containers, lens
      , lens-action, old-time, QuickCheck, quickcheck-instances, store
@@ -164505,15 +164804,15 @@ self: {
   "sbp" = callPackage
     ({ mkDerivation, aeson, array, base, base64-bytestring
      , basic-prelude, binary, binary-conduit, bytestring, conduit
-     , conduit-combinators, conduit-extra, criterion
-     , data-binary-ieee754, lens, monad-loops, QuickCheck, resourcet
-     , tasty, tasty-hunit, tasty-quickcheck, template-haskell, text
-     , unordered-containers, yaml
+     , conduit-combinators, conduit-extra, data-binary-ieee754, lens
+     , monad-loops, QuickCheck, resourcet, tasty, tasty-hunit
+     , tasty-quickcheck, template-haskell, text, unordered-containers
+     , yaml
      }:
      mkDerivation {
        pname = "sbp";
-       version = "2.2.6";
-       sha256 = "0b26wd3mnpx4yx9q4nyacl43wisqjrck4b8lzykyzdn0fg7xlscc";
+       version = "2.2.7";
+       sha256 = "1dd0m01dbjfjjrv79lnm853ldqkjsmv490a66912v58p51c7qvni";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -164529,10 +164828,6 @@ self: {
          aeson base base64-bytestring basic-prelude bytestring QuickCheck
          tasty tasty-hunit tasty-quickcheck
        ];
-       benchmarkHaskellDepends = [
-         aeson base base64-bytestring basic-prelude binary bytestring
-         criterion
-       ];
        homepage = "https://github.com/swift-nav/libsbp";
        description = "SwiftNav's SBP Library";
        license = stdenv.lib.licenses.lgpl3;
@@ -165159,6 +165454,8 @@ self: {
        pname = "scientific";
        version = "0.3.4.15";
        sha256 = "1gsmpn3563k90nrai0jdjfvkxjjaxs7bxxsfbdpmw4xvbp2lmp9n";
+       revision = "2";
+       editedCabalFile = "1pxj3l4rm04l8rllv15sabspkw5nqhkhf38dsd2cyvr1n6669dd9";
        libraryHaskellDepends = [
          base binary bytestring containers deepseq ghc-prim hashable
          integer-gmp integer-logarithms text vector
@@ -169982,8 +170279,8 @@ self: {
     ({ mkDerivation, base, basic-prelude, directory, shake }:
      mkDerivation {
        pname = "shakers";
-       version = "0.0.24";
-       sha256 = "1wrn28r4w8zxay119n4lsxx2yg0n42rv2msn1px2p76k86bz03w4";
+       version = "0.0.25";
+       sha256 = "0svgrvp054vs00hx5pcdlmpc375c4r926nla4fgk1jax6ghbaw72";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [ base basic-prelude directory shake ];
@@ -170556,8 +170853,8 @@ self: {
      }:
      mkDerivation {
        pname = "shine";
-       version = "0.2.0.1";
-       sha256 = "07d990gkvgd804a6k85n0m8cxss6855gsgg7d52r341l1l706aca";
+       version = "0.2.0.2";
+       sha256 = "0r0rl65rkcdg8c8lzli87nfad8bk4xypiqvb2qs68fhhzwx1zfg2";
        libraryHaskellDepends = [
          base ghcjs-dom ghcjs-prim keycode mtl time transformers
        ];
@@ -172146,6 +172443,16 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "singnal" = callPackage
+    ({ mkDerivation, base }:
+     mkDerivation {
+       pname = "singnal";
+       version = "0.1.0.0";
+       sha256 = "099akvb0j6a7hh4g5pm8i8hy8pmsc6i33jg957zsbnbh72s0ck3d";
+       libraryHaskellDepends = [ base ];
+       license = stdenv.lib.licenses.agpl3;
+     }) {};
+
   "sink" = callPackage
     ({ mkDerivation, base }:
      mkDerivation {
@@ -172794,8 +173101,8 @@ self: {
      }:
      mkDerivation {
        pname = "sloane";
-       version = "5.0.0";
-       sha256 = "0v97lc5pvkx8q0ll1zkmc5n79p03nja9pn0bmdk5s0z6k2zl1p8d";
+       version = "5.0.1";
+       sha256 = "14ffww6vfyv32nr1i17x8c8nc3y583yhza2dy6g6cfphcjw0zwf2";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -175275,8 +175582,8 @@ self: {
      }:
      mkDerivation {
        pname = "solr";
-       version = "0.4.2";
-       sha256 = "07y7k4ilhmwy7h288djmsm9rmm2sb9zmwf7cy8fv4h0yk25wwzia";
+       version = "0.4.3";
+       sha256 = "00hq4gykcimwxa9zy3bmr4k4pxm13ryvfyq95yh4q28gy41wglk0";
        libraryHaskellDepends = [
          attoparsec-data base base-prelude bytestring
          bytestring-tree-builder case-insensitive contravariant http-client
@@ -176839,6 +177146,28 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "sqlite-simple_0_4_14_0" = callPackage
+    ({ mkDerivation, attoparsec, base, base16-bytestring, blaze-builder
+     , blaze-textual, bytestring, containers, direct-sqlite, HUnit, Only
+     , text, time, transformers
+     }:
+     mkDerivation {
+       pname = "sqlite-simple";
+       version = "0.4.14.0";
+       sha256 = "0zx4fdv6larfyj6m1d4livb5cqdx10yi06yd6px2n0wnxcmvdyj9";
+       libraryHaskellDepends = [
+         attoparsec base blaze-builder blaze-textual bytestring containers
+         direct-sqlite Only text time transformers
+       ];
+       testHaskellDepends = [
+         base base16-bytestring bytestring direct-sqlite HUnit text time
+       ];
+       homepage = "http://github.com/nurpax/sqlite-simple";
+       description = "Mid-Level SQLite client library";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "sqlite-simple-errors" = callPackage
     ({ mkDerivation, base, mtl, parsec, sqlite-simple, text }:
      mkDerivation {
@@ -177714,6 +178043,26 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "stackage-query_0_1_1" = callPackage
+    ({ mkDerivation, base, Cabal, containers, directory, filepath
+     , optparse-applicative, process, stackage-types, text, yaml
+     }:
+     mkDerivation {
+       pname = "stackage-query";
+       version = "0.1.1";
+       sha256 = "0prwl42pn3k4yy2439bjsq2m5429xybxwivx1x5ws4k4chvl81fp";
+       isLibrary = false;
+       isExecutable = true;
+       executableHaskellDepends = [
+         base Cabal containers directory filepath optparse-applicative
+         process stackage-types text yaml
+       ];
+       homepage = "https://github.com/juhp/stackage-query";
+       description = "Stackage package query";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "stackage-sandbox" = callPackage
     ({ mkDerivation, attoparsec, base, bytestring, conduit-combinators
      , conduit-extra, directory, filepath, optparse-applicative, process
@@ -179603,6 +179952,27 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "streaming-concurrency" = callPackage
+    ({ mkDerivation, base, bytestring, exceptions, hspec, lifted-async
+     , monad-control, QuickCheck, quickcheck-instances, stm, streaming
+     , streaming-bytestring, streaming-with, transformers-base
+     }:
+     mkDerivation {
+       pname = "streaming-concurrency";
+       version = "0.1.0.0";
+       sha256 = "1g2p928mvkwwdy0xbm8c6ph2cdqswj1gpi0zq6ln1bl4f3xd98rz";
+       libraryHaskellDepends = [
+         base bytestring exceptions lifted-async monad-control stm streaming
+         streaming-bytestring streaming-with transformers-base
+       ];
+       testHaskellDepends = [
+         base bytestring hspec QuickCheck quickcheck-instances streaming
+         streaming-bytestring
+       ];
+       description = "Concurrency support for the streaming ecosystem";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
   "streaming-conduit" = callPackage
     ({ mkDerivation, base, bytestring, conduit, hspec, streaming
      , streaming-bytestring, transformers
@@ -181234,14 +181604,14 @@ self: {
 
   "superrecord" = callPackage
     ({ mkDerivation, aeson, base, bookkeeper, constraints, criterion
-     , deepseq, ghc-prim, hspec, labels, primitive, text
+     , deepseq, ghc-prim, hspec, labels, mtl, text
      }:
      mkDerivation {
        pname = "superrecord";
-       version = "0.1.1.0";
-       sha256 = "04fmccpfx3lyms8xmya1yidjj9ahhyikr3ilfr3x9m59sc47vhd0";
+       version = "0.2.0.0";
+       sha256 = "0gjmh3mk5pkfqmq145h8zy9hc0vb18prhjqzv948qmihb1ixdaci";
        libraryHaskellDepends = [
-         aeson base constraints deepseq ghc-prim primitive text
+         aeson base constraints deepseq ghc-prim mtl text
        ];
        testHaskellDepends = [ aeson base hspec ];
        benchmarkHaskellDepends = [
@@ -181696,6 +182066,27 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "syfco" = callPackage
+    ({ mkDerivation, array, base, containers, convertible, directory
+     , mtl, parsec, transformers
+     }:
+     mkDerivation {
+       pname = "syfco";
+       version = "1.1.0.0";
+       sha256 = "076094ygbcwriqjmajs0xyr7zqf86b5nikfm9k0ax7hla75x9b5m";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         array base containers convertible directory mtl parsec transformers
+       ];
+       executableHaskellDepends = [
+         array base containers convertible directory mtl parsec transformers
+       ];
+       homepage = "https://github.com/reactive-systems/syfco";
+       description = "Synthesis Format Conversion Tool / Library";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
   "sylvia" = callPackage
     ({ mkDerivation, base, cairo, comonad-transformers, data-default
      , data-lens, data-lens-template, gtk, optparse-applicative, parsec
@@ -181751,16 +182142,16 @@ self: {
      }) {};
 
   "symantic" = callPackage
-    ({ mkDerivation, base, containers, ghc-prim, mono-traversable
+    ({ mkDerivation, base, containers, mono-traversable
      , symantic-document, symantic-grammar, text, transformers
      }:
      mkDerivation {
        pname = "symantic";
-       version = "6.0.0.20170623";
-       sha256 = "0g4gfy8hjdwg95hr2jka2b3jvhb5dy27m71sb8kidbk954si8fhy";
+       version = "6.3.0.20170703";
+       sha256 = "14r9jdn7pgcajdjgzgxkcn2p394wljlhfsmy6ajp9i18crhinj9y";
        libraryHaskellDepends = [
-         base containers ghc-prim mono-traversable symantic-document
-         symantic-grammar text transformers
+         base containers mono-traversable symantic-document symantic-grammar
+         text transformers
        ];
        description = "Library for Typed Tagless-Final Higher-Order Composable DSL";
        license = stdenv.lib.licenses.gpl3;
@@ -181783,8 +182174,8 @@ self: {
      }:
      mkDerivation {
        pname = "symantic-grammar";
-       version = "0.0.0.20170623";
-       sha256 = "0ds1r71n96kjsr60l5jlv4kb56v7pplrwp93bzni6hiddfm6g917";
+       version = "0.1.0.20170703";
+       sha256 = "09anbgpkh3l8mgzz0nwl65054az0026wl65vi7qmy79ncl2823yd";
        libraryHaskellDepends = [ base text ];
        testHaskellDepends = [
          base megaparsec tasty tasty-hunit text transformers
@@ -181800,8 +182191,8 @@ self: {
      }:
      mkDerivation {
        pname = "symantic-lib";
-       version = "0.0.2.20170623";
-       sha256 = "10wj4p8dj2qb3qk73gkikfazq5szg8yrhjwdhj37xks7hvsfqgsv";
+       version = "0.0.2.20170703";
+       sha256 = "0ar1ikm42a0apy222y6ii7mjd7fr7n2kpyycyhfznc902jknxk2w";
        libraryHaskellDepends = [
          base containers ghc-prim monad-classes mono-traversable symantic
          symantic-grammar text transformers
@@ -182561,6 +182952,23 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "system-linux-proc" = callPackage
+    ({ mkDerivation, attoparsec, base, bytestring, containers, errors
+     , hedgehog, text
+     }:
+     mkDerivation {
+       pname = "system-linux-proc";
+       version = "0.1.0.0";
+       sha256 = "0ij75jdkb7nan98yk6i1dznwqvw20x23krgasix33scf1yyk30ps";
+       libraryHaskellDepends = [
+         attoparsec base bytestring containers errors text
+       ];
+       testHaskellDepends = [ base hedgehog ];
+       homepage = "https://github.com/erikd/system-linux-proc";
+       description = "A library for accessing the /proc filesystem in Linux";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "system-locale" = callPackage
     ({ mkDerivation, attoparsec, base, hspec, process, text, time }:
      mkDerivation {
@@ -185815,8 +186223,8 @@ self: {
      }:
      mkDerivation {
        pname = "test-framework-sandbox";
-       version = "0.1.0";
-       sha256 = "0bfj0l189dh52dipdnxcqllk2h6g4dwcwcw5pll2my3n7r78pn7v";
+       version = "0.1.1";
+       sha256 = "0q84ijm712zn1l20hih53j4axmhzaib1gxn11w0h7pnhybc04klx";
        libraryHaskellDepends = [
          ansi-terminal base lifted-base mtl temporary test-framework
          test-sandbox transformers
@@ -185948,8 +186356,8 @@ self: {
      }:
      mkDerivation {
        pname = "test-sandbox";
-       version = "0.1.6";
-       sha256 = "08j8xa28fwmgh07ixml53w95jfrgmv5p4lb8wjv48x5pphz5x3dn";
+       version = "0.1.7";
+       sha256 = "0myrz0zs1i1360cb9dzffybakglm96kb9zjk6m8rdkdwklm94a8c";
        libraryHaskellDepends = [
          base bytestring cereal containers data-default directory filepath
          lifted-base monad-control monad-loops mtl network process random
@@ -188190,17 +188598,17 @@ self: {
      }) {};
 
   "threepenny-editors" = callPackage
-    ({ mkDerivation, base, data-default, generics-sop, profunctors
-     , threepenny-gui
+    ({ mkDerivation, base, casing, data-default, generics-sop
+     , profunctors, threepenny-gui
      }:
      mkDerivation {
        pname = "threepenny-editors";
-       version = "0.2.0.13";
-       sha256 = "159zqxcnlvn03hqyy3d1gxd7hmr2ky11x7sa3n67m5xl2in3qrjb";
+       version = "0.2.0.14";
+       sha256 = "1gw1pp2ylf3g8ijbsm7zfqmfba47hcwncnmdykzid7hb34c7zaw8";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
-         base data-default generics-sop profunctors threepenny-gui
+         base casing data-default generics-sop profunctors threepenny-gui
        ];
        homepage = "https://github.com/pepeiborra/threepenny-editors";
        description = "Composable algebraic editors";
@@ -189921,6 +190329,19 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "tls-session-manager" = callPackage
+    ({ mkDerivation, auto-update, base, clock, psqueues, time, tls }:
+     mkDerivation {
+       pname = "tls-session-manager";
+       version = "0.0.0.0";
+       sha256 = "04bci0pcky2sc3d0nb5nc2hg03k0gg04iy5rhcr7698ig02x8wvn";
+       libraryHaskellDepends = [
+         auto-update base clock psqueues time tls
+       ];
+       description = "In-memory TLS session manager";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "tmapchan" = callPackage
     ({ mkDerivation, base, containers, hashable, stm
      , unordered-containers
@@ -194842,15 +195263,15 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "unicode-transforms_0_3_0" = callPackage
+  "unicode-transforms_0_3_1" = callPackage
     ({ mkDerivation, base, bitarray, bytestring, criterion, deepseq
      , filepath, getopt-generics, optparse-applicative, path, path-io
      , QuickCheck, split, text
      }:
      mkDerivation {
        pname = "unicode-transforms";
-       version = "0.3.0";
-       sha256 = "0iajm8shb0p6kgcly8n8hzww3f993wdyz4546dl8yn8rinnmxhid";
+       version = "0.3.1";
+       sha256 = "03n9s1pqgq9gl3q6xydwjlsvwq4al6khwd8lr137941263zxx0di";
        libraryHaskellDepends = [ base bitarray bytestring text ];
        testHaskellDepends = [
          base deepseq getopt-generics QuickCheck split text
@@ -195604,6 +196025,19 @@ self: {
        license = "GPL";
      }) {};
 
+  "unmed2" = callPackage
+    ({ mkDerivation, base, storable-endian, utility-ht }:
+     mkDerivation {
+       pname = "unmed2";
+       version = "0.0";
+       sha256 = "1pmp720nhs8blwpjjfhn123miyb31nzn0s3af3ifxrr6s4rapsdg";
+       isLibrary = false;
+       isExecutable = true;
+       executableHaskellDepends = [ base storable-endian utility-ht ];
+       description = "Extract useful information from Amiga MED files";
+       license = stdenv.lib.licenses.gpl3;
+     }) {};
+
   "unordered-containers" = callPackage
     ({ mkDerivation, base, bytestring, ChasingBottoms, containers
      , criterion, deepseq, deepseq-generics, hashable, hashmap, HUnit
@@ -200852,6 +201286,43 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "warp_3_2_13" = callPackage
+    ({ mkDerivation, array, async, auto-update, base, blaze-builder
+     , bytestring, bytestring-builder, case-insensitive, containers
+     , criterion, directory, doctest, ghc-prim, hashable, hspec, HTTP
+     , http-date, http-types, http2, HUnit, iproute, lifted-base
+     , network, process, QuickCheck, silently, simple-sendfile, stm
+     , streaming-commons, text, time, transformers, unix, unix-compat
+     , vault, wai, word8
+     }:
+     mkDerivation {
+       pname = "warp";
+       version = "3.2.13";
+       sha256 = "0964l8xcbdqnrz0mnk0b732n66i7q8grwzzax96mqbh15ps5nfcj";
+       libraryHaskellDepends = [
+         array async auto-update base blaze-builder bytestring
+         bytestring-builder case-insensitive containers ghc-prim hashable
+         http-date http-types http2 iproute network simple-sendfile stm
+         streaming-commons text unix unix-compat vault wai word8
+       ];
+       testHaskellDepends = [
+         array async auto-update base blaze-builder bytestring
+         bytestring-builder case-insensitive containers directory doctest
+         ghc-prim hashable hspec HTTP http-date http-types http2 HUnit
+         iproute lifted-base network process QuickCheck silently
+         simple-sendfile stm streaming-commons text time transformers unix
+         unix-compat vault wai word8
+       ];
+       benchmarkHaskellDepends = [
+         auto-update base bytestring containers criterion hashable http-date
+         http-types network unix unix-compat
+       ];
+       homepage = "http://github.com/yesodweb/wai";
+       description = "A fast, light-weight web server for WAI applications";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "warp-dynamic" = callPackage
     ({ mkDerivation, base, data-default, dyre, http-types, wai, warp }:
      mkDerivation {
@@ -200909,6 +201380,24 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "warp-tls_3_2_4" = callPackage
+    ({ mkDerivation, base, bytestring, cryptonite, data-default-class
+     , network, streaming-commons, tls, tls-session-manager, wai, warp
+     }:
+     mkDerivation {
+       pname = "warp-tls";
+       version = "3.2.4";
+       sha256 = "05vfjlgi574nnydfmfpyp3q6mf389iyj9mv94djnm8d1izasml85";
+       libraryHaskellDepends = [
+         base bytestring cryptonite data-default-class network
+         streaming-commons tls tls-session-manager wai warp
+       ];
+       homepage = "http://github.com/yesodweb/wai";
+       description = "HTTP over TLS support for Warp via the TLS package";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "warp-tls-uid" = callPackage
     ({ mkDerivation, base, bytestring, certificate, conduit
      , crypto-random, network, network-conduit, pem, tls, tls-extra
@@ -201317,6 +201806,8 @@ self: {
        pname = "web-routes";
        version = "0.27.11";
        sha256 = "1n4cvqbbnjhliy9080fff7nfn9x073vnp8vj7mh0ja4ii96lsqj5";
+       revision = "1";
+       editedCabalFile = "1kq9x2s1z2l9ldsbmzl29b4xbpv1w3ls98ca76d8d4dnwg5va14a";
        libraryHaskellDepends = [
          base blaze-builder bytestring exceptions ghc-prim http-types mtl
          parsec split text utf8-string
@@ -201327,6 +201818,28 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "web-routes_0_27_12" = callPackage
+    ({ mkDerivation, base, blaze-builder, bytestring, exceptions
+     , ghc-prim, hspec, http-types, HUnit, mtl, parsec, QuickCheck
+     , split, text, utf8-string
+     }:
+     mkDerivation {
+       pname = "web-routes";
+       version = "0.27.12";
+       sha256 = "0c0wqr3f79gx26pfknvv4zka8g8fkfxw5fqb0qpq8zv0mv5rflba";
+       revision = "1";
+       editedCabalFile = "1pdp6x3q5423m99n24nhwlqmi0xyz0dhz02v2m8n4nkbg33lrv1q";
+       libraryHaskellDepends = [
+         base blaze-builder bytestring exceptions ghc-prim http-types mtl
+         parsec split text utf8-string
+       ];
+       testHaskellDepends = [ base hspec HUnit QuickCheck text ];
+       homepage = "http://www.happstack.com/docs/crashcourse/index.html#web-routes";
+       description = "portable, type-safe URL routing";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "web-routes-boomerang" = callPackage
     ({ mkDerivation, base, boomerang, mtl, parsec, text, web-routes }:
      mkDerivation {
@@ -203019,8 +203532,8 @@ self: {
      }:
      mkDerivation {
        pname = "wolf";
-       version = "0.3.19";
-       sha256 = "1bgwcklmxygc7f44nrcckdccdwg7f1y4s1qhfzn33ji1dkkhdp8m";
+       version = "0.3.21";
+       sha256 = "0gqiqqmm72fhkdax8p27mhpsl2f91zkqaj6xlwdhmbljfhb8ilhp";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -209456,6 +209969,28 @@ self: {
        license = stdenv.lib.licenses.gpl2;
      }) {};
 
+  "yi-rope_0_9" = callPackage
+    ({ mkDerivation, base, binary, bytestring, charsetdetect-ae
+     , criterion, data-default, deepseq, fingertree, hspec, QuickCheck
+     , quickcheck-instances, text, text-icu
+     }:
+     mkDerivation {
+       pname = "yi-rope";
+       version = "0.9";
+       sha256 = "0j9g96dgjy30zzygbrimcq6g6dz978xgk53j12kdn710ilklkhs6";
+       libraryHaskellDepends = [
+         base binary bytestring charsetdetect-ae data-default deepseq
+         fingertree text text-icu
+       ];
+       testHaskellDepends = [
+         base hspec QuickCheck quickcheck-instances text
+       ];
+       benchmarkHaskellDepends = [ base criterion deepseq text ];
+       description = "A rope data structure used by Yi";
+       license = stdenv.lib.licenses.gpl2;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "yi-snippet" = callPackage
     ({ mkDerivation, base, binary, containers, data-default, free
      , microlens-platform, mtl, tasty-hunit, tasty-th, text, vector
diff --git a/pkgs/development/libraries/kirigami/default.nix b/pkgs/development/libraries/kirigami/default.nix
index e24ad8196ee35..1127f3e197df5 100644
--- a/pkgs/development/libraries/kirigami/default.nix
+++ b/pkgs/development/libraries/kirigami/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, cmake, extra-cmake-modules, pkgconfig
-, plasma-framework, qtbase
+, plasma-framework, qtbase, qttranslations
 , qtquickcontrols ? null
 , qtquickcontrols2 ? null }:
 
@@ -15,7 +15,7 @@ let
       inherit sha256;
     };
 
-    buildInputs = [ plasma-framework qtbase qtqc ];
+    buildInputs = [ plasma-framework qtbase qtqc qttranslations ];
 
     nativeBuildInputs = [ cmake pkgconfig extra-cmake-modules ];
 
diff --git a/pkgs/development/libraries/libbsd/default.nix b/pkgs/development/libraries/libbsd/default.nix
index a1a61e3366849..792a29eb1fb25 100644
--- a/pkgs/development/libraries/libbsd/default.nix
+++ b/pkgs/development/libraries/libbsd/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "libbsd-${version}";
-  version = "0.8.4";
+  version = "0.8.5";
 
   src = fetchurl {
     url = "http://libbsd.freedesktop.org/releases/${name}.tar.xz";
-    sha256 = "1cya8bv976ijv5yy1ix3pzbnmp9k2qqpgw3dx98k2w0m55jg2yi1";
+    sha256 = "0a2vq0xdhs3yyj91b0612f19fakg7a9xlqy2f993128kyhjd0ivn";
   };
 
   # darwin changes configure.ac which means we need to regenerate
diff --git a/pkgs/development/libraries/libunwind/default.nix b/pkgs/development/libraries/libunwind/default.nix
index 474b917515071..8565bc75ff9fb 100644
--- a/pkgs/development/libraries/libunwind/default.nix
+++ b/pkgs/development/libraries/libunwind/default.nix
@@ -9,6 +9,10 @@ stdenv.mkDerivation rec {
     sha256 = "1jsslwkilwrsj959dc8b479qildawz67r8m4lzxm7glcwa8cngiz";
   };
 
+  patches = [
+    ./version-1.2.1.patch
+  ];
+
   nativeBuildInputs = [ autoreconfHook ];
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/libunwind/version-1.2.1.patch b/pkgs/development/libraries/libunwind/version-1.2.1.patch
new file mode 100644
index 0000000000000..63202937084c1
--- /dev/null
+++ b/pkgs/development/libraries/libunwind/version-1.2.1.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index a254bbe..fe0247b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,6 +1,6 @@
+ define(pkg_major, 1)
+-define(pkg_minor, 2.1)
+-define(pkg_extra, )
++define(pkg_minor, 2)
++define(pkg_extra, 1)
+ define(pkg_maintainer, libunwind-devel@nongnu.org)
+ define(mkvers, $1.$2$3)
+ dnl Process this file with autoconf to produce a configure script.
diff --git a/pkgs/development/libraries/openslp/default.nix b/pkgs/development/libraries/openslp/default.nix
index 80a77e72275fd..864e2dc708577 100644
--- a/pkgs/development/libraries/openslp/default.nix
+++ b/pkgs/development/libraries/openslp/default.nix
@@ -11,13 +11,13 @@ stdenv.mkDerivation {
   patches = [
     (fetchpatch {
       name = "openslp-2.0.0-null-pointer-deref.patch";
-      url = "https://svnweb.mageia.org/packages/cauldron/openslp/current/SOURCES/openslp-2.0.0-null-pointer-deref.patch?revision=1019712&view=co";
+      url = "https://src.fedoraproject.org/cgit/rpms/openslp.git/plain/openslp-2.0.0-null-pointer-deref.patch";
       sha256 = "186f3rj3z2lf5h1lpbhqk0szj2a9far1p3mjqg6422f29yjfnz6a";
     })
     (fetchpatch {
       name = "openslp-2.0.0-CVE-2016-7567.patch";
-      url = "https://svnweb.mageia.org/packages/cauldron/openslp/current/SOURCES/openslp-2.0.0-CVE-2016-7567.patch?revision=1057233&view=co";
-      sha256 = "1zrgql91vjjl2v7brlibc8jqndnjz9fclqbdn0b6fklkpwznprny";
+      url = "https://src.fedoraproject.org/cgit/rpms/openslp.git/plain/openslp-2.0.0-cve-2016-7567.patch";
+      sha256 = "0zp61axx93b7nrbsyhn2x4dnw7n9y6g4rys21hyqxk4khrnc2yr9";
     })
   ];
 
diff --git a/pkgs/development/libraries/utf8proc/default.nix b/pkgs/development/libraries/utf8proc/default.nix
index 6cef26d3aadad..4a40806c4eb16 100644
--- a/pkgs/development/libraries/utf8proc/default.nix
+++ b/pkgs/development/libraries/utf8proc/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "utf8proc-${version}";
-  version = "2.0.2";
+  version = "2.1.0";
 
   src = fetchurl {
     url = "https://github.com/JuliaLang/utf8proc/archive/v${version}.tar.gz";
-    sha256 = "140vib1m6n5kwzkw1n9fbsi5gl6xymbd7yndwqx1sj15aakak776";
+    sha256 = "0q1jhdkk4f9b0zb8s2ql3sba3br5nvjsmbsaybmgj064k9hwbk15";
   };
 
   makeFlags = [ "prefix=$(out)" ];
diff --git a/pkgs/development/libraries/wlc/default.nix b/pkgs/development/libraries/wlc/default.nix
index cd13fa8dbb4a8..832600fed8748 100644
--- a/pkgs/development/libraries/wlc/default.nix
+++ b/pkgs/development/libraries/wlc/default.nix
@@ -6,12 +6,12 @@
 
 stdenv.mkDerivation rec {
   name = "wlc-${version}";
-  version = "0.0.8";
+  version = "0.0.9";
 
   src = fetchgit {
     url = "https://github.com/Cloudef/wlc";
     rev = "refs/tags/v${version}";
-    sha256 = "1lkxbqnxfmbk9j9k8wq2fl5z0a9ihzalad3x1pp8w2riz41j3by6";
+    sha256 = "1r6jf64gs7n9a8129wsc0mdwhcv44p8k87kg0714rhx3g2w22asg";
     fetchSubmodules = true;
    };
 
diff --git a/pkgs/development/ocaml-modules/csv/default.nix b/pkgs/development/ocaml-modules/csv/default.nix
index 95199f16dcc29..4bb8f8ace9c05 100644
--- a/pkgs/development/ocaml-modules/csv/default.nix
+++ b/pkgs/development/ocaml-modules/csv/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation {
 
-  name = "ocaml-csv-1.4.2";
+  name = "ocaml-csv-1.5";
 
   src = fetchzip {
-    url = https://github.com/Chris00/ocaml-csv/releases/download/1.4.2/csv-1.4.2.tar.gz;
-    sha256 = "05s8py2qr3889c72g1q07r15pzch3j66xdphxi2sd93h5lvnpi4j";
+    url = https://github.com/Chris00/ocaml-csv/releases/download/1.5/csv-1.5.tar.gz;
+    sha256 = "1ca7jgg58j24pccs5fshis726s06fdcjshnwza5kwxpjgdbvc63g";
   };
 
   buildInputs = [ ocaml findlib ocamlbuild ];
diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix
index d21bd5977ee53..63e256b60958f 100644
--- a/pkgs/development/ocaml-modules/eliom/default.nix
+++ b/pkgs/development/ocaml-modules/eliom/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, which, ocsigen_server, ocsigen_deriving, ocaml,
-  js_of_ocaml, ocaml_react, ocaml_lwt, calendar, cryptokit, tyxml,
+  js_of_ocaml, ocaml_react, lwt, calendar, cryptokit, tyxml,
   ipaddr, ocamlnet, ocaml_ssl, ocaml_pcre, ocaml_optcomp,
   reactivedata, opam, ppx_tools, ppx_deriving, findlib
 , ocamlbuild
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec
 
   buildInputs = [ ocaml which findlib ocamlbuild ocaml_optcomp opam ppx_tools ];
 
-  propagatedBuildInputs = [ ocaml_lwt reactivedata tyxml ipaddr ocsigen_server ppx_deriving
+  propagatedBuildInputs = [ lwt reactivedata tyxml ipaddr ocsigen_server ppx_deriving
                             ocsigen_deriving js_of_ocaml
                             calendar cryptokit ocamlnet ocaml_react ocaml_ssl ocaml_pcre ];
 
diff --git a/pkgs/development/ocaml-modules/git-http/default.nix b/pkgs/development/ocaml-modules/git-http/default.nix
new file mode 100644
index 0000000000000..7df47b093b350
--- /dev/null
+++ b/pkgs/development/ocaml-modules/git-http/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, ocaml, findlib, jbuilder, git, cohttp }:
+
+stdenv.mkDerivation rec {
+	name = "ocaml${ocaml.version}-git-http-${version}";
+	inherit (git) version src;
+
+	buildInputs = [ ocaml findlib jbuilder ];
+
+	propagatedBuildInputs = [ git cohttp ];
+
+	buildPhase = "jbuilder build -p git-http";
+
+	inherit (jbuilder) installPhase;
+
+	meta = {
+		description = "Client implementation of the “Smart” HTTP Git protocol in pure OCaml";
+		inherit (git.meta) homepage license maintainers platforms;
+	};
+}
diff --git a/pkgs/development/ocaml-modules/git-unix/default.nix b/pkgs/development/ocaml-modules/git-unix/default.nix
new file mode 100644
index 0000000000000..1fd4fd926492e
--- /dev/null
+++ b/pkgs/development/ocaml-modules/git-unix/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, ocaml, findlib, jbuilder, git-http
+, ocaml_lwt, tls, conduit, magic-mime, cmdliner, mtime
+}:
+
+stdenv.mkDerivation rec {
+	name = "ocaml${ocaml.version}-git-unix-${version}";
+	inherit (git-http) version src;
+
+	buildInputs = [ ocaml findlib jbuilder cmdliner mtime ];
+
+	propagatedBuildInputs = [ conduit git-http magic-mime ocaml_lwt tls ];
+
+	buildPhase = "jbuilder build -p git-unix";
+
+	inherit (jbuilder) installPhase;
+
+	meta = {
+		description = "Unix backend for the Git protocol(s)";
+		inherit (git-http.meta) homepage license maintainers platforms;
+	};
+}
diff --git a/pkgs/development/ocaml-modules/inotify/default.nix b/pkgs/development/ocaml-modules/inotify/default.nix
new file mode 100644
index 0000000000000..e299307752124
--- /dev/null
+++ b/pkgs/development/ocaml-modules/inotify/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild
+, ocaml_lwt # optional lwt support
+, doCheck ? stdenv.lib.versionAtLeast ocaml.version "4.03"
+, ounit, fileutils # only for tests
+}:
+
+stdenv.mkDerivation rec {
+	version = "2.3";
+	name = "ocaml${ocaml.version}-inotify-${version}";
+
+	src = fetchFromGitHub {
+		owner = "whitequark";
+		repo = "ocaml-inotify";
+		rev = "v${version}";
+		sha256 = "1s6vmqpx19hxzsi30jvp3h7p56rqnxfhfddpcls4nz8sqca1cz5y";
+	};
+
+	buildInputs = [ ocaml findlib ocamlbuild ocaml_lwt ]
+	++ stdenv.lib.optionals doCheck [ ounit fileutils ];
+
+	configureFlags = [ "--enable-lwt"
+	  (stdenv.lib.optionalString doCheck "--enable-tests") ];
+
+	inherit doCheck;
+	checkTarget = "test";
+
+	createFindlibDestdir = true;
+
+	meta = {
+		description = "Bindings for Linux’s filesystem monitoring interface, inotify";
+		license = stdenv.lib.licenses.lgpl21;
+		maintainers = [ stdenv.lib.maintainers.vbgl ];
+		inherit (src.meta) homepage;
+		platforms = stdenv.lib.platforms.linux;
+	};
+}
diff --git a/pkgs/development/ocaml-modules/lablgl/default.nix b/pkgs/development/ocaml-modules/lablgl/default.nix
index c59f15c57ad65..f54df0c17d408 100644
--- a/pkgs/development/ocaml-modules/lablgl/default.nix
+++ b/pkgs/development/ocaml-modules/lablgl/default.nix
@@ -40,5 +40,6 @@ stdenv.mkDerivation rec {
     description = "OpenGL bindings for ocaml";
     license = licenses.gpl2;
     maintainers = with maintainers; [ pSub vbgl ];
+    broken = stdenv.isDarwin;
   };
 }
diff --git a/pkgs/development/ocaml-modules/lambda-term/1.6.nix b/pkgs/development/ocaml-modules/lambda-term/1.6.nix
index 4638748160a2c..f8e79d566d44f 100644
--- a/pkgs/development/ocaml-modules/lambda-term/1.6.nix
+++ b/pkgs/development/ocaml-modules/lambda-term/1.6.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libev, ocaml, findlib, ocamlbuild, ocaml_lwt, ocaml_react, zed, camlp4 }:
+{ stdenv, fetchurl, libev, ocaml, findlib, ocamlbuild, lwt, ocaml_react, zed, camlp4 }:
 
 stdenv.mkDerivation rec {
   version = "1.6";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "1rhfixdgpylxznf6sa9wr31wb4pjzpfn5mxhxqpbchmpl2afwa09";
   };
 
-  buildInputs = [ libev ocaml findlib ocamlbuild ocaml_lwt ocaml_react ];
+  buildInputs = [ libev ocaml findlib ocamlbuild lwt ocaml_react ];
 
   propagatedBuildInputs = [ camlp4 zed ];
 
diff --git a/pkgs/development/ocaml-modules/lambda-term/default.nix b/pkgs/development/ocaml-modules/lambda-term/default.nix
index 86e4ebccbae60..86d03896ab162 100644
--- a/pkgs/development/ocaml-modules/lambda-term/default.nix
+++ b/pkgs/development/ocaml-modules/lambda-term/default.nix
@@ -1,21 +1,24 @@
-{ stdenv, buildOcaml, fetchurl, libev, ocaml, findlib, ocamlbuild, ocaml_lwt, ocaml_react, zed }:
+{ stdenv, buildOcaml, fetchurl, libev, ocaml, findlib, jbuilder, opam, zed, lwt_react }:
 
-assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01";
+assert stdenv.lib.versionAtLeast ocaml.version "4.02";
 
 buildOcaml rec {
-  version = "1.10";
+  version = "1.11";
   name = "lambda-term";
 
   src = fetchurl {
     url = "https://github.com/diml/lambda-term/archive/${version}.tar.gz";
-    sha256 = "1kwpsqds51xmy3z3ddkam92hkl7arlzy9awhzsq62ysxcl91fb8m";
+    sha256 = "10lx1jqgmmfwwlv64di4a8nia9l53v7179z70n9fx6aq5l7r8nba";
   };
 
-  buildInputs = [ libev ocaml findlib ocamlbuild ocaml_react ];
+  buildInputs = [ libev ocaml findlib jbuilder opam ];
 
-  propagatedBuildInputs = [ zed ocaml_lwt ];
+  propagatedBuildInputs = [ zed lwt_react ];
 
-  createFindlibDestdir = true;
+  installPhase = ''
+    ${jbuilder.installPhase}
+    mv $out/lib/ocaml/${ocaml.version}/site-lib/{stubslibs,lambda-term}/dlllambda_term_stubs.so
+  '';
 
   hasSharedObjects = true;
 
diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix
index d450a877517e1..fc721dc4c9a3e 100644
--- a/pkgs/development/ocaml-modules/lwt/default.nix
+++ b/pkgs/development/ocaml-modules/lwt/default.nix
@@ -2,36 +2,42 @@
 , ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, glib
 , ppx_tools, result, cppo
 , ppxSupport ? stdenv.lib.versionAtLeast ocaml.version "4.02"
+, version ? if stdenv.lib.versionAtLeast ocaml.version "4.02" then "2.7.1" else "2.6.0"
 }:
 
-let param =
-  if stdenv.lib.versionAtLeast ocaml.version "4.02"
-  then {
-    version = "2.7.1";
-    sha256 = "0w7f59havrl2fsnvs84lm7wlqpsrldg80gy5afpnpr21zkw22g8w";
-  } else {
-    version = "2.6.0";
-    sha256 = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w";
-  };
-in
+if !stdenv.lib.versionAtLeast ocaml.version "4"
+then throw "lwt is not available for OCaml ${ocaml.version}"
+else
+
+let sha256 = {
+  "3.0.0" = "0wwhnl9hppixcsdisinj1wmffx0nv6hkpm01z9qvkngkrazi3i88";
+  "2.7.1" = "0w7f59havrl2fsnvs84lm7wlqpsrldg80gy5afpnpr21zkw22g8w";
+  "2.6.0" = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w";
+}."${version}"; in
+
+let optionals = stdenv.lib.optionals (!stdenv.lib.versionAtLeast version "3"); in
 
 buildOcaml rec {
   name = "lwt";
-  inherit (param) version;
+  inherit version;
 
   src = fetchzip {
     url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
-    inherit (param) sha256;
+    inherit sha256;
   };
 
   buildInputs = [ ocaml_oasis pkgconfig which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 cppo ]
   ++ stdenv.lib.optional ppxSupport ppx_tools;
 
-  propagatedBuildInputs = [ result ocaml_react ocaml_ssl libev ];
+  propagatedBuildInputs = [ result ]
+  ++ optionals [ ocaml_react ocaml_ssl ]
+  ++ [ libev ];
 
   configureScript = "ocaml setup.ml -configure";
   prefixKey = "--prefix ";
-  configureFlags = [ "--enable-glib" "--enable-ssl" "--enable-react" "--enable-camlp4" ]
+  configureFlags =
+  optionals [ "--enable-glib" "--enable-ssl" "--enable-react" ]
+  ++ [ "--enable-camlp4" ]
   ++ [ (if ppxSupport then "--enable-ppx" else "--disable-ppx") ];
 
   createFindlibDestdir = true;
diff --git a/pkgs/development/ocaml-modules/lwt_react/default.nix b/pkgs/development/ocaml-modules/lwt_react/default.nix
new file mode 100644
index 0000000000000..022a60dcc66f6
--- /dev/null
+++ b/pkgs/development/ocaml-modules/lwt_react/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, lwt, ocaml_react }:
+
+stdenv.mkDerivation rec {
+	version = "1.0.1";
+	name = "ocaml${ocaml.version}-lwt_react-${version}";
+	src = fetchzip {
+		url = https://github.com/ocsigen/lwt/releases/download/3.0.0/lwt_react-1.0.1.tar.gz;
+		sha256 = "1bbz7brvdskf4angzn3q2s2s6qdnx7x8m8syayysh23gwv4c7v31";
+	};
+
+	buildInputs = [ ocaml findlib ocamlbuild ];
+
+	propagatedBuildInputs = [ lwt ocaml_react ];
+
+	createFindlibDestdir = true;
+
+	meta = {
+		description = "Helpers for using React with Lwt";
+		inherit (lwt.meta) homepage license maintainers platforms;
+	};
+}
diff --git a/pkgs/development/ocaml-modules/ocsigen-server/default.nix b/pkgs/development/ocaml-modules/ocsigen-server/default.nix
index 8685097750b91..1d283e5e55ea0 100644
--- a/pkgs/development/ocaml-modules/ocsigen-server/default.nix
+++ b/pkgs/development/ocaml-modules/ocsigen-server/default.nix
@@ -1,5 +1,5 @@
 {stdenv, fetchurl, ocaml, findlib, which, ocaml_react, ocaml_ssl,
-ocaml_lwt, ocamlnet, ocaml_pcre, cryptokit, tyxml, ipaddr, zlib,
+lwt, ocamlnet, ocaml_pcre, cryptokit, tyxml, ipaddr, zlib,
 libev, openssl, ocaml_sqlite3, tree, uutf, makeWrapper, camlp4
 , pgocaml
 }:
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
     sha256 = "1v44qv2ixd7i1qinyhlzzqiffawsdl7xhhh6ysd7lf93kh46d5sy";
   };
 
-  buildInputs = [ocaml which findlib ocaml_react ocaml_ssl ocaml_lwt
+  buildInputs = [ocaml which findlib ocaml_react ocaml_ssl lwt
   ocamlnet ocaml_pcre cryptokit tyxml ipaddr zlib libev openssl
   ocaml_sqlite3 tree uutf makeWrapper camlp4 pgocaml ];
 
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
   ''
   rm -rf $out/var/run
   wrapProgram $out/bin/ocsigenserver \
-    --prefix CAML_LD_LIBRARY_PATH : "${mkpath ocaml_ssl "ssl"}:${mkpath ocaml_lwt "lwt"}:${mkpath ocamlnet "netsys"}:${mkpath ocamlnet "netstring"}:${mkpath ocaml_pcre "pcre"}:${mkpath cryptokit "cryptokit"}:${mkpath ocaml_sqlite3 "sqlite3"}"
+    --prefix CAML_LD_LIBRARY_PATH : "${mkpath ocaml_ssl "ssl"}:${mkpath lwt "lwt"}:${mkpath ocamlnet "netsys"}:${mkpath ocamlnet "netstring"}:${mkpath ocaml_pcre "pcre"}:${mkpath cryptokit "cryptokit"}:${mkpath ocaml_sqlite3 "sqlite3"}"
   '';
 
   dontPatchShebangs = true;
diff --git a/pkgs/development/ocaml-modules/pgocaml/default.nix b/pkgs/development/ocaml-modules/pgocaml/default.nix
index a8b3ed1586250..f4d1ef829bb46 100644
--- a/pkgs/development/ocaml-modules/pgocaml/default.nix
+++ b/pkgs/development/ocaml-modules/pgocaml/default.nix
@@ -1,4 +1,8 @@
-{ stdenv, fetchurl, buildOcaml, calendar, csv, re }:
+{ stdenv, fetchurl, buildOcaml, ocaml, calendar, csv, re }:
+
+if !stdenv.lib.versionAtLeast ocaml.version "4"
+then throw "pgocaml is not available for OCaml ${ocaml.version}"
+else
 
 buildOcaml {
   name = "pgocaml";
diff --git a/pkgs/development/python-modules/channels/default.nix b/pkgs/development/python-modules/channels/default.nix
index 0a445b4c6510d..4dfe83f6758b6 100644
--- a/pkgs/development/python-modules/channels/default.nix
+++ b/pkgs/development/python-modules/channels/default.nix
@@ -4,11 +4,11 @@
 buildPythonPackage rec {
   pname = "channels";
   name = "${pname}-${version}";
-  version = "1.1.5";
+  version = "1.1.6";
 
   src = fetchurl {
     url = "mirror://pypi/c/channels/${name}.tar.gz";
-    sha256 = "a9005bcb6104d26a7f93d9cf012bcf6765a0ff444a449ac68d6e1f16721f8ed3";
+    sha256 = "44ab9a1f610ecc9ac25d5f90e7a44f49b18de28a05a26fe34e935af257f1eefe";
   };
 
   # Files are missing in the distribution
diff --git a/pkgs/development/python-modules/codecov/default.nix b/pkgs/development/python-modules/codecov/default.nix
new file mode 100644
index 0000000000000..93620098446a2
--- /dev/null
+++ b/pkgs/development/python-modules/codecov/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, buildPythonPackage, fetchPypi, requests, coverage, unittest2 }:
+
+buildPythonPackage rec {
+  pname = "codecov";
+  version = "2.0.9";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "037h4dcl8xshlq3rj8409p11rpgnyqrhlhfq8j34s94nm0n1h76v";
+  };
+
+  buildInputs = [ unittest2 ]; # Tests only
+
+  propagatedBuildInputs = [ requests coverage ];
+
+  postPatch = ''
+    sed -i 's/, "argparse"//' setup.py
+  '';
+
+  meta = {
+    description = "Python report uploader for Codecov";
+    homepage = https://codecov.io/;
+    license = stdenv.lib.licenses.asl20;
+  };
+}
diff --git a/pkgs/development/python-modules/django_guardian.nix b/pkgs/development/python-modules/django_guardian.nix
index b6df932e65856..e83076674e8a1 100644
--- a/pkgs/development/python-modules/django_guardian.nix
+++ b/pkgs/development/python-modules/django_guardian.nix
@@ -5,11 +5,11 @@
 buildPythonPackage rec {
   pname = "django-guardian";
   name = "${pname}-${version}";
-  version = "1.4.8";
+  version = "1.4.9";
 
   src = fetchurl {
     url = "mirror://pypi/d/django-guardian/${name}.tar.gz";
-    sha256 = "039mfx47c05vl6vlld0ahyq37z7m5g68vqc38pj8iic5ysr98drm";
+    sha256 = "c3c0ab257c9d94ce154b9ee32994e3cff8b350c384040705514e14a9fb7c8191";
   };
 
   buildInputs = [ pytest pytestrunner pytest-django django_environ mock setuptools_scm ];
diff --git a/pkgs/development/python-modules/dogpile.cache/default.nix b/pkgs/development/python-modules/dogpile.cache/default.nix
index c04da07115643..424be07aa616a 100644
--- a/pkgs/development/python-modules/dogpile.cache/default.nix
+++ b/pkgs/development/python-modules/dogpile.cache/default.nix
@@ -4,18 +4,20 @@
 
 buildPythonPackage rec {
   pname = "dogpile.cache";
-  version = "0.6.3";
+  version = "0.6.4";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "e9747f5e31f8dea1b80d6204358885f943f69e53574d88005438ca3651c44553";
+    sha256 = "a73aa3049cd88d7ec57a1c2e8946abdf4f14188d429c1023943fcc55c4568da1";
   };
 
   # Disable concurrency tests that often fail,
   # probably some kind of timing issue.
-  prePatch = ''
+  postPatch = ''
     rm tests/test_lock.py
+    # Failing tests. https://bitbucket.org/zzzeek/dogpile.cache/issues/116
+    rm tests/cache/test_memcached_backend.py
   '';
 
   buildInputs = [ pytest pytestcov mock Mako ];
diff --git a/pkgs/development/python-modules/jupyter_client/default.nix b/pkgs/development/python-modules/jupyter_client/default.nix
index a45a4a84a3a08..3782d313df89e 100644
--- a/pkgs/development/python-modules/jupyter_client/default.nix
+++ b/pkgs/development/python-modules/jupyter_client/default.nix
@@ -12,12 +12,12 @@
 
 buildPythonPackage rec {
   pname = "jupyter_client";
-  version = "5.0.1";
+  version = "5.1.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1fe573880b5ca4469ed0bece098f4b910c373d349e12525e1ea3566f5a14536b";
+    sha256 = "08756b021765c97bc5665390700a4255c2df31666ead8bff116b368d09912aba";
   };
 
   buildInputs = [ nose ];
diff --git a/pkgs/development/python-modules/markdownsuperscript/default.nix b/pkgs/development/python-modules/markdownsuperscript/default.nix
new file mode 100644
index 0000000000000..2e05ee621e2aa
--- /dev/null
+++ b/pkgs/development/python-modules/markdownsuperscript/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, buildPythonPackage, fetchPypi, markdown }:
+
+buildPythonPackage rec {
+  pname = "MarkdownSuperscript";
+  version = "2.0.0";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1dsx21h9hkx098d5azpw81dcz23rrgzrwlymwv7jri348q26p748";
+  };
+
+  propagatedBuildInputs = [ markdown ];
+
+  doCheck = false; # See https://github.com/NixOS/nixpkgs/pull/26985
+
+  meta = {
+    description = "An extension to the Python Markdown package enabling superscript text";
+    homepage = https://github.com/jambonrose/markdown_superscript_extension;
+    license = stdenv.lib.licenses.bsd2;
+  };
+}
diff --git a/pkgs/development/tools/analysis/flow/default.nix b/pkgs/development/tools/analysis/flow/default.nix
index 9987996c95deb..e5f9fa26938c4 100644
--- a/pkgs/development/tools/analysis/flow/default.nix
+++ b/pkgs/development/tools/analysis/flow/default.nix
@@ -3,14 +3,14 @@
 with lib;
 
 stdenv.mkDerivation rec {
-  version = "0.48.0";
+  version = "0.49.1";
   name = "flow-${version}";
 
   src = fetchFromGitHub {
     owner = "facebook";
     repo = "flow";
     rev = "v${version}";
-    sha256 = "13f9z4jg1v34jpaswa8kvbxkfp7flabv616vyqfvy9hafgfyisff";
+    sha256 = "1fjqdyl72srla7ysjg0694ym5d3f2rdl5gfq8r9ay4v15jcb5dg6";
   };
 
   installPhase = ''
diff --git a/pkgs/development/tools/google-app-engine-go-sdk/default.nix b/pkgs/development/tools/google-app-engine-go-sdk/default.nix
index 27ad4c996ce85..e6f36b6e32eb2 100644
--- a/pkgs/development/tools/google-app-engine-go-sdk/default.nix
+++ b/pkgs/development/tools/google-app-engine-go-sdk/default.nix
@@ -4,17 +4,17 @@ with python27Packages;
 
 stdenv.mkDerivation rec {
   name = "google-app-engine-go-sdk-${version}";
-  version = "1.9.53";
+  version = "1.9.55";
   src =
     if stdenv.system == "x86_64-linux" then
       fetchzip {
         url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-${version}.zip";
-        sha256 = "04lfwf7ad7gi8xn891lz87b7pr2gyycgpaq96i0cgckrj2awayz2";
+        sha256 = "1gwrmqs69h3wbx6z0a7shdr8gn1qiwrkvh3pg6mi7dybwmd1x61h";
       }
     else
       fetchzip {
         url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_darwin_amd64-${version}.zip";
-        sha256 = "18hgl4wz3rhaklkwaxl8gm70h7l8k225f86da682kafawrr8zhv4";
+        sha256 = "0b8r2fqg9m285ifz0jahd4wasv7cq61nr6p1k664w021r5y5lbvr";
       };
 
   buildInputs = [python27 makeWrapper];
diff --git a/pkgs/development/tools/haskell/tinc/default.nix b/pkgs/development/tools/haskell/tinc/default.nix
index 9c4b1f6314884..db779ecbb0f98 100644
--- a/pkgs/development/tools/haskell/tinc/default.nix
+++ b/pkgs/development/tools/haskell/tinc/default.nix
@@ -3,16 +3,16 @@
 , hpack, hspec, HUnit, language-dot, mockery, parsec, process
 , QuickCheck, safe, stdenv, temporary, time, transformers, unix
 , unix-compat, with-location, yaml, fetchFromGitHub
-, ghc, cabal2nix, cabal-install, makeWrapper
+, cabal2nix, cabal-install, makeWrapper
 }:
 mkDerivation {
   pname = "tinc";
-  version = "20170228";
+  version = "20170624";
   src = fetchFromGitHub {
     owner = "sol";
     repo = "tinc";
-    rev = "e829926a043a68a8a4dc551485c4d666837474af";
-    sha256 = "1zdp1mqp3jn2faw0d3jlcbrkp4azgl5ahhq5pxdn24gyq70zkchc";
+    rev = "70881515693fd83d381fe045ae76d5257774f5e3";
+    sha256 = "0c6sx3vbcnq69dhqhpi01a4p4qss24rwxiz6jmw65rj73adhj4mw";
   };
   isLibrary = false;
   isExecutable = true;
@@ -30,13 +30,12 @@ mkDerivation {
   postInstall = ''
     source ${makeWrapper}/nix-support/setup-hook
     wrapProgram $out/bin/tinc \
-      --prefix PATH : '${ghc}/bin' \
       --prefix PATH : '${cabal2nix}/bin' \
       --prefix PATH : '${cabal-install}/bin'
   '';
   description = "A dependency manager for Haskell";
   homepage = "https://github.com/sol/tinc#readme";
   license = stdenv.lib.licenses.mit;
-  hydraPlatforms = stdenv.lib.platforms.none;
+  hydraPlatforms = [ "x86_64-linux" ];
   maintainers = [ stdenv.lib.maintainers.robbinch ];
 }
diff --git a/pkgs/development/tools/misc/csmith/default.nix b/pkgs/development/tools/misc/csmith/default.nix
new file mode 100644
index 0000000000000..20d149f3efe0d
--- /dev/null
+++ b/pkgs/development/tools/misc/csmith/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchurl, m4, makeWrapper, libbsd, perl, SysCPU }:
+
+stdenv.mkDerivation rec {
+  name = "csmith-${version}";
+  version = "2.3.0";
+
+  src = fetchurl {
+    url = "http://embed.cs.utah.edu/csmith/${name}.tar.gz";
+    sha256 = "1mb5zgixsyf86slggs756k8a5ddmj980md3ic9sa1y75xl5cqizj";
+  };
+
+  nativeBuildInputs = [ m4 makeWrapper ];
+  buildInputs = [ libbsd perl SysCPU ];
+
+  postInstall = ''
+    substituteInPlace $out/bin/compiler_test.pl \
+      --replace '$CSMITH_HOME/runtime' $out/include/${name} \
+      --replace ' ''${CSMITH_HOME}/runtime' " $out/include/${name}" \
+      --replace '$CSMITH_HOME/src/csmith' $out/bin/csmith
+
+    substituteInPlace $out/bin/launchn.pl \
+      --replace '../compiler_test.pl' $out/bin/compiler_test.pl \
+      --replace '../$CONFIG_FILE' '$CONFIG_FILE'
+
+    wrapProgram $out/bin/launchn.pl --prefix PERL5LIB : "$PERL5LIB" $out/bin/launchn.pl
+
+    mkdir -p $out/share/csmith
+    mv $out/bin/compiler_test.in $out/share/csmith/
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "A random generator of C programs";
+    homepage = "https://embed.cs.utah.edu/csmith";
+    # Officially, the license is this: https://github.com/csmith-project/csmith/blob/master/COPYING
+    license = licenses.bsd2;
+    longDescription = ''
+      Csmith is a tool that can generate random C programs that statically and
+      dynamically conform to the C99 standard. It is useful for stress-testing
+      compilers, static analyzers, and other tools that process C code.
+      Csmith has found bugs in every tool that it has tested, and has been used
+      to find and report more than 400 previously unknown compiler bugs.
+    '';
+    maintainers = [ maintainers.dtzWill ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
index ab2ef4d9c5e60..23556a0edbded 100644
--- a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
+++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving, ppx_deriving, camlp4, ocamlbuild
+{ stdenv, fetchurl, ocaml, findlib, lwt, menhir, ocsigen_deriving, ppx_deriving, camlp4, ocamlbuild
 , cmdliner, tyxml, reactivedata, cppo, which, base64, uchar, yojson
 }:
 
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
   buildInputs = [ ocaml findlib menhir ocsigen_deriving ocamlbuild
                  cmdliner reactivedata cppo which base64 ]
   ++ stdenv.lib.optionals (stdenv.lib.versionAtLeast ocaml.version "4.02") [ yojson tyxml ];
-  propagatedBuildInputs = [ ocaml_lwt camlp4 ppx_deriving ]
+  propagatedBuildInputs = [ lwt camlp4 ppx_deriving ]
   ++ stdenv.lib.optional (version == "2.8.4") uchar;
 
   patches = [ ./Makefile.conf.diff ];
diff --git a/pkgs/development/tools/ocaml/utop/default.nix b/pkgs/development/tools/ocaml/utop/default.nix
index 9e394751761ac..0f73f4c54afca 100644
--- a/pkgs/development/tools/ocaml/utop/default.nix
+++ b/pkgs/development/tools/ocaml/utop/default.nix
@@ -2,6 +2,10 @@
 , lambdaTerm, ocaml_lwt, camomile, zed, cppo, ppx_tools, makeWrapper
 }:
 
+if !stdenv.lib.versionAtLeast ocaml.version "4.02"
+then throw "utop is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation rec {
   version = "1.19.3";
   name = "utop-${version}";
diff --git a/pkgs/development/tools/yarn/default.nix b/pkgs/development/tools/yarn/default.nix
index 376018c45a46a..8b6f751d3aa1f 100644
--- a/pkgs/development/tools/yarn/default.nix
+++ b/pkgs/development/tools/yarn/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "yarn-${version}";
-  version = "0.24.6";
+  version = "0.27.5";
 
   src = fetchzip {
     url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz";
-    sha256 = "1dxshqmz0im1a09p0x8zx1clkmkgjg3pg1gyl95fzzn6jai3nnrb";
+    sha256 = "0djjbdbwzlhdh6aww6awfl63nz72kj109kjxvmwk25x8dkvw795a";
   };
 
   buildInputs = [makeWrapper nodejs];
diff --git a/pkgs/development/web/mailcatcher/Gemfile b/pkgs/development/web/mailcatcher/Gemfile
new file mode 100644
index 0000000000000..8cc16fad7e560
--- /dev/null
+++ b/pkgs/development/web/mailcatcher/Gemfile
@@ -0,0 +1,2 @@
+source 'https://rubygems.org'
+gem 'mailcatcher'
diff --git a/pkgs/development/web/mailcatcher/Gemfile.lock b/pkgs/development/web/mailcatcher/Gemfile.lock
new file mode 100644
index 0000000000000..9a4969c11676b
--- /dev/null
+++ b/pkgs/development/web/mailcatcher/Gemfile.lock
@@ -0,0 +1,43 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    daemons (1.2.4)
+    eventmachine (1.0.9.1)
+    mail (2.6.6)
+      mime-types (>= 1.16, < 4)
+    mailcatcher (0.6.5)
+      eventmachine (= 1.0.9.1)
+      mail (~> 2.3)
+      rack (~> 1.5)
+      sinatra (~> 1.2)
+      skinny (~> 0.2.3)
+      sqlite3 (~> 1.3)
+      thin (~> 1.5.0)
+    mime-types (3.1)
+      mime-types-data (~> 3.2015)
+    mime-types-data (3.2016.0521)
+    rack (1.6.8)
+    rack-protection (1.5.3)
+      rack
+    sinatra (1.4.8)
+      rack (~> 1.5)
+      rack-protection (~> 1.4)
+      tilt (>= 1.3, < 3)
+    skinny (0.2.4)
+      eventmachine (~> 1.0.0)
+      thin (>= 1.5, < 1.7)
+    sqlite3 (1.3.13)
+    thin (1.5.1)
+      daemons (>= 1.0.9)
+      eventmachine (>= 0.12.6)
+      rack (>= 1.0.0)
+    tilt (2.0.7)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  mailcatcher
+
+BUNDLED WITH
+   1.14.4
diff --git a/pkgs/development/web/mailcatcher/default.nix b/pkgs/development/web/mailcatcher/default.nix
new file mode 100644
index 0000000000000..49c5c4d81af1d
--- /dev/null
+++ b/pkgs/development/web/mailcatcher/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, bundlerEnv, ruby, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name = "mailcatcher-${version}";
+
+  version = (import ./gemset.nix).mailcatcher.version;
+
+  env = bundlerEnv {
+    name = "${name}-gems";
+
+    inherit ruby;
+
+    gemdir = ./.;
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  unpackPhase = ":";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    makeWrapper ${env}/bin/mailcatcher $out/bin/mailcatcher
+    makeWrapper ${env}/bin/catchmail $out/bin/catchmail
+  '';
+
+  meta = with stdenv.lib; {
+    description = "SMTP server and web interface to locally test outbound emails";
+    homepage    = https://mailcatcher.me/;
+    license     = licenses.mit;
+    maintainers = [ maintainers.zarelit ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/pkgs/development/web/mailcatcher/gemset.nix b/pkgs/development/web/mailcatcher/gemset.nix
new file mode 100644
index 0000000000000..d9e95454a500f
--- /dev/null
+++ b/pkgs/development/web/mailcatcher/gemset.nix
@@ -0,0 +1,106 @@
+{
+  daemons = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1bmb4qrd95b5gl3ym5j3q6mf090209f4vkczggn49n56w6s6zldz";
+      type = "gem";
+    };
+    version = "1.2.4";
+  };
+  eventmachine = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "17jr1caa3ggg696dd02g2zqzdjqj9x9q2nl7va82l36f7c5v6k4z";
+      type = "gem";
+    };
+    version = "1.0.9.1";
+  };
+  mail = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9";
+      type = "gem";
+    };
+    version = "2.6.6";
+  };
+  mailcatcher = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0h6gk8n18i5f651f244al1hscjzl27fpma4vqw0qhszqqpd5p3bx";
+      type = "gem";
+    };
+    version = "0.6.5";
+  };
+  mime-types = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m";
+      type = "gem";
+    };
+    version = "3.1";
+  };
+  mime-types-data = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm";
+      type = "gem";
+    };
+    version = "3.2016.0521";
+  };
+  rack = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "19m7aixb2ri7p1n0iqaqx8ldi97xdhvbxijbyrrcdcl6fv5prqza";
+      type = "gem";
+    };
+    version = "1.6.8";
+  };
+  rack-protection = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0cvb21zz7p9wy23wdav63z5qzfn4nialik22yqp6gihkgfqqrh5r";
+      type = "gem";
+    };
+    version = "1.5.3";
+  };
+  sinatra = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0byxzl7rx3ki0xd7aiv1x8mbah7hzd8f81l65nq8857kmgzj1jqq";
+      type = "gem";
+    };
+    version = "1.4.8";
+  };
+  skinny = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9";
+      type = "gem";
+    };
+    version = "0.2.4";
+  };
+  sqlite3 = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "01ifzp8nwzqppda419c9wcvr8n82ysmisrs0hph9pdmv1lpa4f5i";
+      type = "gem";
+    };
+    version = "1.3.13";
+  };
+  thin = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0hrq9m3hb6pm8yrqshhg0gafkphdpvwcqmr7k722kgdisp3w91ga";
+      type = "gem";
+    };
+    version = "1.5.1";
+  };
+  tilt = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1is1ayw5049z8pd7slsk870bddyy5g2imp4z78lnvl8qsl8l0s7b";
+      type = "gem";
+    };
+    version = "2.0.7";
+  };
+}
\ No newline at end of file
diff --git a/pkgs/games/factorio/default.nix b/pkgs/games/factorio/default.nix
index 861a44fea8c5a..1d52cf845d910 100644
--- a/pkgs/games/factorio/default.nix
+++ b/pkgs/games/factorio/default.nix
@@ -10,7 +10,7 @@ assert releaseType == "alpha" || releaseType == "headless" || releaseType == "de
 
 with stdenv.lib;
 let
-  version = if releaseType != "demo" then "0.15.16" else "0.14.23";
+  version = if releaseType != "demo" then "0.15.26" else "0.15.25";
 
   arch = if stdenv.system == "x86_64-linux" then {
     inUrl = "linux64";
@@ -23,13 +23,12 @@ let
   authenticatedFetch = callPackage ./fetch.nix { inherit username password; };
 
   fetch = rec {
-    extension = if releaseType != "demo" then "tar.xz" else "tar.gz";
     url = "https://www.factorio.com/get-download/${version}/${releaseType}/${arch.inUrl}";
-    name = "factorio_${releaseType}_${arch.inTar}-${version}.${extension}";
+    name = "factorio_${releaseType}_${arch.inTar}-${version}.tar.xz";
     x64 = {
-      headless =           fetchurl { inherit name url; sha256 = "0ig0nrvqllb9294qn2ci5j5s31ycsjn23bp6hc633xqkgfmklmic"; };
-      alpha    = authenticatedFetch { inherit name url; sha256 = "0bf0z6fi0cpbq487hz4sz8ljapchzhld01sj767wsldakjfkm9g9"; };
-      demo     =           fetchurl { inherit name url; sha256 = "10a2lwmspqviwgymn3zhjgpiynsa6dplgnikdirma5sl2hhcfb6s"; };
+      headless =           fetchurl { inherit name url; sha256 = "1nblfff1m5wgp177l508y94n61lga3palhzw4frp2vd98sdp7gqk"; };
+      alpha    = authenticatedFetch { inherit name url; sha256 = "0g7k58h15q4n9wxf96rx72w340xpdbj8k1faaxixrfrfx8bnmsls"; };
+      demo     =           fetchurl { inherit name url; sha256 = "1qz6g8mf221ic663zk92l6rs77ggfydaw2d8g2s7wy0j9097qbsl"; };
     };
     i386 = {
       headless = abort "Factorio 32-bit headless binaries are not available for download.";
diff --git a/pkgs/games/uqm/default.nix b/pkgs/games/uqm/default.nix
index d6bcb787d60c0..d1416b0685a7d 100644
--- a/pkgs/games/uqm/default.nix
+++ b/pkgs/games/uqm/default.nix
@@ -18,7 +18,7 @@ let
     inherit stdenv requireFile writeText fetchurl haskellPackages;
   };
 
-  remixPacks = imap (num: sha256: fetchurl rec {
+  remixPacks = imap1 (num: sha256: fetchurl rec {
     name = "uqm-remix-disc${toString num}.uqm";
     url = "mirror://sourceforge/sc2/${name}";
     inherit sha256;
diff --git a/pkgs/misc/cups/drivers/splix/default.nix b/pkgs/misc/cups/drivers/splix/default.nix
index 8c253af736f92..2cdaca8d7832d 100644
--- a/pkgs/misc/cups/drivers/splix/default.nix
+++ b/pkgs/misc/cups/drivers/splix/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
   };
 
   preBuild = ''
-    makeFlags="V=1 CUPSFILTER=$out/lib/cups/filter CUPSPPD=$out/share/cups/model"
+    makeFlags="V=1 DISABLE_JBIG=1 CUPSFILTER=$out/lib/cups/filter CUPSPPD=$out/share/cups/model"
   '';
 
   buildInputs = [cups zlib];
diff --git a/pkgs/os-specific/linux/iw/default.nix b/pkgs/os-specific/linux/iw/default.nix
index 53aa15ec62e6a..2a6294e3b5b92 100644
--- a/pkgs/os-specific/linux/iw/default.nix
+++ b/pkgs/os-specific/linux/iw/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl, libnl, pkgconfig}:
 
 stdenv.mkDerivation rec {
-  name = "iw-4.3";
+  name = "iw-4.9";
 
   src = fetchurl {
     url = "https://www.kernel.org/pub/software/network/iw/${name}.tar.xz";
-    sha256 = "085jyvrxzarvn5jl0fk618jjxy50nqx7ifngszc4jxk6a4ddibd6";
+    sha256 = "1klpvv98bnx1zm6aqalnri2vd7w80scmdaxr2qnblb6mz82whk1j";
   };
 
   buildInputs = [ libnl pkgconfig ];
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index c46ee1b9331b9..912fb8dcee49e 100644
--- a/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/pkgs/os-specific/linux/kernel/common-config.nix
@@ -499,7 +499,7 @@ with stdenv.lib;
     KVM_APIC_ARCHITECTURE y
   ''}
   KVM_ASYNC_PF y
-  ${optionalString (versionAtLeast version "4.0") ''
+  ${optionalString ((versionAtLeast version "4.0") && (versionOlder version "4.12")) ''
     KVM_COMPAT? y
   ''}
   ${optionalString (versionOlder version "4.12") ''
diff --git a/pkgs/os-specific/linux/kernel/linux-4.12.nix b/pkgs/os-specific/linux/kernel/linux-4.12.nix
new file mode 100644
index 0000000000000..d4861e1de5552
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/linux-4.12.nix
@@ -0,0 +1,19 @@
+{ stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
+
+import ./generic.nix (args // rec {
+  version = "4.12";
+  modDirVersion = "4.12.0";
+  extraMeta.branch = "4.12";
+
+  src = fetchurl {
+    url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
+    sha256 = "1asq73lq0f81qwv21agcrpc3694fs14sja26q48y936hskn3np54";
+  };
+
+  kernelPatches = args.kernelPatches;
+
+  features.iwlwifi = true;
+  features.efiBootStub = true;
+  features.needsCifsUtils = true;
+  features.netfilterRPFilter = true;
+} // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kmod-debian-aliases/default.nix b/pkgs/os-specific/linux/kmod-debian-aliases/default.nix
index eac3fb9200154..a7b6561239d00 100644
--- a/pkgs/os-specific/linux/kmod-debian-aliases/default.nix
+++ b/pkgs/os-specific/linux/kmod-debian-aliases/default.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
   version = "22-1.1";
 
   src = fetchurl {
-    url = "mirror://debian/pool/main/k/kmod/kmod_${version}.debian.tar.xz";
+    url = "http://snapshot.debian.org/archive/debian/20160404T220610Z/pool/main/k/kmod/kmod_${version}.debian.tar.xz";
     sha256 = "0daap2n4bvjqcnksaayy6csmdb1px4r02w3xp36bcp6w3lbnqamh";
   };
 
diff --git a/pkgs/os-specific/linux/psmisc/default.nix b/pkgs/os-specific/linux/psmisc/default.nix
index 7209c44ff3c13..edc7220d65861 100644
--- a/pkgs/os-specific/linux/psmisc/default.nix
+++ b/pkgs/os-specific/linux/psmisc/default.nix
@@ -3,11 +3,11 @@
 assert stdenv.isLinux;
 
 stdenv.mkDerivation rec {
-  name = "psmisc-23.0";
+  name = "psmisc-23.1";
 
   src = fetchurl {
     url = "mirror://sourceforge/psmisc/${name}.tar.xz";
-    sha256 = "0k7hafh9388s3hh9j943jy1qk9g1c43j02nyk0xis0ngbs632lvm";
+    sha256 = "0c5s94hqpwfmyswx2f96gifa6wdbpxxpkyxcrlzbxpvmrxsd911f";
   };
 
   buildInputs = [ncurses];
diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix
index 8a6d727a6964b..50f4e6f2b4103 100644
--- a/pkgs/os-specific/linux/zfs/default.nix
+++ b/pkgs/os-specific/linux/zfs/default.nix
@@ -123,7 +123,7 @@ in
     # to be adapted
     zfsStable = common {
       # comment/uncomment if breaking kernel versions are known
-      incompatibleKernelVersion = "4.12";
+      incompatibleKernelVersion = null;
 
       version = "0.6.5.10";
 
@@ -139,7 +139,7 @@ in
     };
     zfsUnstable = common {
       # comment/uncomment if breaking kernel versions are known
-      incompatibleKernelVersion = null;
+      incompatibleKernelVersion = "4.12";
 
       version = "0.7.0-rc4";
 
diff --git a/pkgs/servers/emby/default.nix b/pkgs/servers/emby/default.nix
index 24e6def856db8..7e4c69e3862d2 100644
--- a/pkgs/servers/emby/default.nix
+++ b/pkgs/servers/emby/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "emby-${version}";
-  version = "3.2.20.0";
+  version = "3.2.22.0";
 
   src = fetchurl {
     url = "https://github.com/MediaBrowser/Emby/releases/download/${version}/Emby.Mono.zip";
-    sha256 = "0n5b40vl0dg2pd0j7rzbck62cji6ws91jgsh8r1maig9p00xmwv7";
+    sha256 = "0vc9391q1mi16k05yl5lqs2cmsgcid339pbqm9fyqzm33fk7d73r";
   };
 
   buildInputs = with pkgs; [
diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix
index 9c72aa018989d..bfdea71c5d784 100644
--- a/pkgs/servers/mail/postfix/default.nix
+++ b/pkgs/servers/mail/postfix/default.nix
@@ -3,6 +3,7 @@
 , withPgSQL ? false, postgresql
 , withMySQL ? false, libmysql
 , withSQLite ? false, sqlite
+, withLDAP ? false, openldap
 }:
 
 let
@@ -11,12 +12,14 @@ let
     "-DHAS_DB_BYPASS_MAKEDEFS_CHECK"
    ] ++ lib.optional withPgSQL "-DHAS_PGSQL"
      ++ lib.optionals withMySQL [ "-DHAS_MYSQL" "-I${lib.getDev libmysql}/include/mysql" ]
-     ++ lib.optional withSQLite "-DHAS_SQLITE");
+     ++ lib.optional withSQLite "-DHAS_SQLITE"
+     ++ lib.optional withLDAP "-DHAS_LDAP");
    auxlibs = lib.concatStringsSep " " ([
      "-ldb" "-lnsl" "-lresolv" "-lsasl2" "-lcrypto" "-lssl"
    ] ++ lib.optional withPgSQL "-lpq"
      ++ lib.optional withMySQL "-lmysqlclient"
-     ++ lib.optional withSQLite "-lsqlite3");
+     ++ lib.optional withSQLite "-lsqlite3"
+     ++ lib.optional withLDAP "-lldap");
 
 in stdenv.mkDerivation rec {
 
@@ -32,7 +35,8 @@ in stdenv.mkDerivation rec {
   buildInputs = [ makeWrapper gnused db openssl cyrus_sasl icu pcre ]
                 ++ lib.optional withPgSQL postgresql
                 ++ lib.optional withMySQL libmysql
-                ++ lib.optional withSQLite sqlite;
+                ++ lib.optional withSQLite sqlite
+                ++ lib.optional withLDAP openldap;
 
   hardeningDisable = [ "format" ];
   hardeningEnable = [ "pie" ];
diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix
index 4f64afe3d92b5..1356915c1facb 100644
--- a/pkgs/servers/sql/mariadb/default.nix
+++ b/pkgs/servers/sql/mariadb/default.nix
@@ -18,8 +18,9 @@ common = rec { # attributes common to both builds
   version = "10.1.21";
 
   src = fetchurl {
-    url    = "https://downloads.mariadb.org/interstitial/mariadb-${version}/source/mariadb-${version}.tar.gz";
+    url    = "https://downloads.mariadb.org/f/mariadb-${version}/source/mariadb-${version}.tar.gz/from/http%3A//ftp.hosteurope.de/mirror/archive.mariadb.org/?serve";
     sha256 = "144lcm5awcf0k6a7saqfr4p2kg8r5wbdhdm4cmn2m8hyg1an70as";
+    name   = "mariadb-${version}.tar.gz";
   };
 
   prePatch = ''
diff --git a/pkgs/servers/unifi/default.nix b/pkgs/servers/unifi/default.nix
index 2ce0ba1d5f5ca..7237bbdcd9684 100644
--- a/pkgs/servers/unifi/default.nix
+++ b/pkgs/servers/unifi/default.nix
@@ -6,11 +6,11 @@
 
 stdenv.mkDerivation rec {
   name = "unifi-controller-${version}";
-  version = "5.5.11";
+  version = "5.5.19";
 
   src = fetchurl {
-    url = "https://www.ubnt.com/downloads/unifi/5.5.11-5107276ec2/unifi_sysvinit_all.deb";
-    sha256 = "1jsixz7g7h7fdwb512flcwk0vblrsxpg4i9jdz7r72bkmvnxk7mm";
+    url = "https://www.ubnt.com/downloads/unifi/${version}/unifi_sysvinit_all.deb";
+    sha256 = "0bsfq48xjp230ir8pm9wpa5p4dh88zfy51lbi2xwpr454371ixcl";
   };
 
   buildInputs = [ dpkg ];
diff --git a/pkgs/stdenv/booter.nix b/pkgs/stdenv/booter.nix
index d459deb6ab543..a1055708f995a 100644
--- a/pkgs/stdenv/booter.nix
+++ b/pkgs/stdenv/booter.nix
@@ -73,7 +73,7 @@ stageFuns: let
   # Take the list and disallow custom overrides in all but the final stage,
   # and allow it in the final flag. Only defaults this boolean field if it
   # isn't already set.
-  withAllowCustomOverrides = lib.lists.imap
+  withAllowCustomOverrides = lib.lists.imap1
     (index: stageFun: prevStage:
       # So true by default for only the first element because one
       # 1-indexing. Since we reverse the list, this means this is true
diff --git a/pkgs/tools/admin/google-cloud-sdk/alpha__init__.py b/pkgs/tools/admin/google-cloud-sdk/alpha__init__.py
new file mode 100755
index 0000000000000..d120969d8fb8c
--- /dev/null
+++ b/pkgs/tools/admin/google-cloud-sdk/alpha__init__.py
@@ -0,0 +1,23 @@
+# Copyright 2013 Google Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Auth for the Google Cloud SDK.
+"""
+
+from googlecloudsdk.calliope import base
+
+
+@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
+class Alpha(base.Group):
+  """Alpha versions of gcloud commands."""
diff --git a/pkgs/tools/admin/google-cloud-sdk/beta__init__.py b/pkgs/tools/admin/google-cloud-sdk/beta__init__.py
new file mode 100755
index 0000000000000..bb52c5a0bc4a2
--- /dev/null
+++ b/pkgs/tools/admin/google-cloud-sdk/beta__init__.py
@@ -0,0 +1,23 @@
+# Copyright 2013 Google Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Auth for the Google Cloud SDK.
+"""
+
+from googlecloudsdk.calliope import base
+
+
+@base.ReleaseTracks(base.ReleaseTrack.BETA)
+class Beta(base.Group):
+  """Beta versions of gcloud commands."""
diff --git a/pkgs/tools/admin/google-cloud-sdk/default.nix b/pkgs/tools/admin/google-cloud-sdk/default.nix
index d13bcecb99331..26e63283f8da8 100644
--- a/pkgs/tools/admin/google-cloud-sdk/default.nix
+++ b/pkgs/tools/admin/google-cloud-sdk/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
         sha256 = "7aa6094d1f9c87f4c2c4a6bdad6a1113aac5e72ea673e659d9acbb059dfd037e";
       };
 
+
   buildInputs = [python27 makeWrapper];
 
   phases = [ "installPhase" "fixupPhase" ];
@@ -34,6 +35,12 @@ stdenv.mkDerivation rec {
     mkdir -p "$out"
     tar -xzf "$src" -C "$out" google-cloud-sdk
 
+    mkdir $out/google-cloud-sdk/lib/surface/alpha
+    cp ${./alpha__init__.py} $out/google-cloud-sdk/lib/surface/alpha/__init__.py
+
+    mkdir $out/google-cloud-sdk/lib/surface/beta
+    cp ${./beta__init__.py} $out/google-cloud-sdk/lib/surface/beta/__init__.py
+
     # create wrappers with correct env
     for program in gcloud bq gsutil git-credential-gcloud.sh; do
         programPath="$out/google-cloud-sdk/bin/$program"
diff --git a/pkgs/tools/archivers/p7zip/default.nix b/pkgs/tools/archivers/p7zip/default.nix
index 8e9db09147ed1..3550b7d7de369 100644
--- a/pkgs/tools/archivers/p7zip/default.nix
+++ b/pkgs/tools/archivers/p7zip/default.nix
@@ -10,9 +10,10 @@ stdenv.mkDerivation rec {
   };
 
   patches = [
-    (fetchpatch {
-      url = "https://sources.debian.net/data/main/p/p7zip/16.02+dfsg-2/debian/patches/12-CVE-2016-9296.patch";
-      sha256 = "1i7099h27gmb9dv0lb7jnqfm504gs1c3129r6kvi94yb2gzrzk41";
+    (fetchpatch rec {
+      name = "CVE-2016-9296.patch";
+      url = "https://src.fedoraproject.org/cgit/rpms/p7zip.git/plain/${name}?id=4b3973f6a5d";
+      sha256 = "09wbkzai46bwm8zmplsz0m4jck3qn7snr68i9p1gsih300zidj0m";
     })
   ];
 
diff --git a/pkgs/tools/filesystems/ntfs-3g/default.nix b/pkgs/tools/filesystems/ntfs-3g/default.nix
index a96612c280417..0cf439c9fe950 100644
--- a/pkgs/tools/filesystems/ntfs-3g/default.nix
+++ b/pkgs/tools/filesystems/ntfs-3g/default.nix
@@ -2,7 +2,7 @@
 , crypto ? false, libgcrypt, gnutls, pkgconfig}:
 
 stdenv.mkDerivation rec {
-  pname = "ntfs-3g";
+  pname = "ntfs3g";
   version = "2017.3.23";
   name = "${pname}-${version}";
 
diff --git a/pkgs/tools/misc/cpuminer/default.nix b/pkgs/tools/misc/cpuminer/default.nix
index 375aa999e3b96..b4abb3097b983 100644
--- a/pkgs/tools/misc/cpuminer/default.nix
+++ b/pkgs/tools/misc/cpuminer/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "cpuminer-${version}";
-  version = "2.4.5";
+  version = "2.5.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/cpuminer/pooler-${name}.tar.gz";
-    sha256 = "130ab6vcbm9azl9w8n97fzjnjbakm0k2n3wc1bcgy5y5c8s0220h";
+    sha256 = "1xalrfrk5hvh1jh9kbqhib2an82ypd46vl9glaxhz3rbjld7c5pa";
   };
 
   patchPhase = if stdenv.cc.isClang then "${perl}/bin/perl ./nomacro.pl" else null;
diff --git a/pkgs/tools/misc/fsql/default.nix b/pkgs/tools/misc/fsql/default.nix
index e3a9297c4abf3..32deb0c230670 100644
--- a/pkgs/tools/misc/fsql/default.nix
+++ b/pkgs/tools/misc/fsql/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "fsql-${version}";
-  version = "0.2.1";
+  version = "0.3.1";
 
   goPackagePath = "github.com/kshvmdn/fsql";
 
@@ -10,7 +10,7 @@ buildGoPackage rec {
     owner = "kshvmdn";
     repo = "fsql";
     rev = "v${version}";
-    sha256 = "1izcfxm77hjj8z7a2nk9bbwbz4wc2yqzs2ir8v3k822m1hvgwb9a";
+    sha256 = "1accpxryk4744ydfrqc3la5k376ji11yr84n66dz5cx0f3n71vmz";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/misc/fzf/default.nix b/pkgs/tools/misc/fzf/default.nix
index 55f36b5e44629..9d40077e0d68a 100644
--- a/pkgs/tools/misc/fzf/default.nix
+++ b/pkgs/tools/misc/fzf/default.nix
@@ -39,6 +39,7 @@ buildGoPackage rec {
     cp -r $src/man/man1 $man/share/man
     mkdir -p $out/share/vim-plugins
     ln -s $out/share/go/src/github.com/junegunn/fzf $out/share/vim-plugins/${name}
+    cp -R $src/shell $out/share/shell
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/misc/partition-manager/default.nix b/pkgs/tools/misc/partition-manager/default.nix
index 52183a3fff353..af5a45902bb48 100644
--- a/pkgs/tools/misc/partition-manager/default.nix
+++ b/pkgs/tools/misc/partition-manager/default.nix
@@ -1,7 +1,7 @@
 { mkDerivation, fetchurl, lib
 , extra-cmake-modules, kdoctools, wrapGAppsHook
 , kconfig, kinit, kpmcore
-, eject, libatasmart }:
+, kcrash, eject, libatasmart }:
 
 let
   pname = "partitionmanager";
@@ -22,5 +22,5 @@ in mkDerivation rec {
   nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ];
   # refer to kpmcore for the use of eject
   buildInputs = [ eject libatasmart ];
-  propagatedBuildInputs = [ kconfig kinit kpmcore ];
+  propagatedBuildInputs = [ kconfig kcrash kinit kpmcore ];
 }
diff --git a/pkgs/tools/misc/x11idle/default.nix b/pkgs/tools/misc/x11idle/default.nix
new file mode 100644
index 0000000000000..5876cfb6b74a2
--- /dev/null
+++ b/pkgs/tools/misc/x11idle/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, xlibs, fetchgit, libXScrnSaver, libX11 }:
+
+stdenv.mkDerivation {
+  name = "x11idle-unstable-2017-07-01";
+
+  src = fetchgit {
+    url = "git://orgmode.org/org-mode.git";
+    rev = "fbd865941f3105f689f78bf053bb3b353b9b8a23";
+    sha256 = "0ma3m48f4s38xln0gl1ww9i5x28ij0ipxc94kx5h2931zy7lqzvz";
+  };
+
+  buildInputs = [ libXScrnSaver libX11 ];
+
+  unpackPhase = ":";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    gcc -lXss -lX11 $src/contrib/scripts/x11idle.c -o $out/bin/x11idle
+  '';
+
+  meta = with stdenv.lib; {
+    description = ''
+      Compute consecutive idle time for current X11 session with millisecond resolution
+    '';
+    longDescription = ''
+      Idle time passes when the user does not act, i.e. when the user doesn't move the mouse or use the keyboard.
+    '';
+    homepage = "http://orgmode.org/";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.swflint ];
+  };
+}
diff --git a/pkgs/tools/networking/burpsuite/default.nix b/pkgs/tools/networking/burpsuite/default.nix
index 6f7e4ba4b6951..976285eeee71d 100644
--- a/pkgs/tools/networking/burpsuite/default.nix
+++ b/pkgs/tools/networking/burpsuite/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, jre }:
 
 let
-  version = "1.7.06";
+  version = "1.7.23";
   jar = fetchurl {
     name = "burpsuite.jar";
     url = "https://portswigger.net/Burp/Releases/Download?productId=100&version=${version}&type=Jar";
-    sha256 = "13x3x0la2jmm7zr66mvczzlmsy1parfibnl9s4iwi1nls4ikv7kl";
+    sha256 = "1y83qisn9pkn88vphpli7h8nacv8jv3sq0h04zbri25nfkgvl4an";
   };
   launcher = ''
     #!${stdenv.shell}
diff --git a/pkgs/tools/networking/iperf/3.nix b/pkgs/tools/networking/iperf/3.nix
index 0d1e3194bd876..a86e3e04530d5 100644
--- a/pkgs/tools/networking/iperf/3.nix
+++ b/pkgs/tools/networking/iperf/3.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "iperf-3.1.7";
+  name = "iperf-3.2";
 
   src = fetchurl {
     url = "http://downloads.es.net/pub/iperf/${name}.tar.gz";
-    sha256 = "0kvk8d0a3dcxc8fisyprbn01y8akxj4sx8ld5dh508p9dx077vx4";
+    sha256 = "07cwrl9q5pmfjlh6ilpk7hm25lpkcaf917zhpmfq918lhrpv61zj";
   };
 
   postInstall = ''
diff --git a/pkgs/tools/networking/offlineimap/default.nix b/pkgs/tools/networking/offlineimap/default.nix
index 70a4bc87b97f5..ae0318faaa713 100644
--- a/pkgs/tools/networking/offlineimap/default.nix
+++ b/pkgs/tools/networking/offlineimap/default.nix
@@ -2,7 +2,7 @@
   asciidoc, libxml2, libxslt, docbook_xml_xslt }:
 
 pythonPackages.buildPythonApplication rec {
-  version = "7.1.0";
+  version = "7.1.1";
   name = "offlineimap-${version}";
   namePrefix = "";
 
@@ -10,7 +10,7 @@ pythonPackages.buildPythonApplication rec {
     owner = "OfflineIMAP";
     repo = "offlineimap";
     rev = "v${version}";
-    sha256 = "10hxzp2hwkarvmwhw9mxbp9wkbclxwm6n0d7i4xs8r1s94yiffb3";
+    sha256 = "12fv6fzi3cb0hkvs4h5vj2i440d85wzjjyjl90zvyxvlfy0pmljl";
   };
 
   postPatch = ''
diff --git a/pkgs/tools/networking/ucspi-tcp/default.nix b/pkgs/tools/networking/ucspi-tcp/default.nix
index 0bcd35b21ef95..fc46c6a15bc51 100644
--- a/pkgs/tools/networking/ucspi-tcp/default.nix
+++ b/pkgs/tools/networking/ucspi-tcp/default.nix
@@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
       url = "http://ftp.de.debian.org/debian/pool/main/u/ucspi-tcp/ucspi-tcp_0.88-3.diff.gz";
       sha256 = "0mzmhz8hjkrs0khmkzs5i0s1kgmgaqz07h493bd5jj5fm5njxln6";
     })
+    ./remove-setuid.patch
   ];
 
   # Apply Debian patches
diff --git a/pkgs/tools/networking/ucspi-tcp/remove-setuid.patch b/pkgs/tools/networking/ucspi-tcp/remove-setuid.patch
new file mode 100644
index 0000000000000..dd69332080463
--- /dev/null
+++ b/pkgs/tools/networking/ucspi-tcp/remove-setuid.patch
@@ -0,0 +1,15 @@
+diff --git a/hier.c b/hier.c
+index 5663ada..1d73b84 100644
+--- a/hier.c
++++ b/hier.c
+@@ -2,8 +2,8 @@
+ 
+ void hier()
+ {
+-  h(auto_home,-1,-1,02755);
+-  d(auto_home,"bin",-1,-1,02755);
++  h(auto_home,-1,-1,0755);
++  d(auto_home,"bin",-1,-1,0755);
+ 
+   c(auto_home,"bin","tcpserver",-1,-1,0755);
+   c(auto_home,"bin","tcprules",-1,-1,0755);
diff --git a/pkgs/tools/security/afl/default.nix b/pkgs/tools/security/afl/default.nix
index 1d6307f807c52..92fd6cd1be03e 100644
--- a/pkgs/tools/security/afl/default.nix
+++ b/pkgs/tools/security/afl/default.nix
@@ -9,11 +9,11 @@ let
 in
 stdenv.mkDerivation rec {
   name    = "afl-${version}";
-  version = "2.43b";
+  version = "2.44b";
 
   src = fetchurl {
     url    = "http://lcamtuf.coredump.cx/afl/releases/${name}.tgz";
-    sha256 = "1jv2y9b53k3p8hngm78ikakhcf4vv3yyz6ip17jhg5gsis29gdwx";
+    sha256 = "0wvx4ibr5hhav9mld1gncdvfzb4iky85gam3x8a43ispjddyya6m";
   };
 
   # Note: libcgroup isn't needed for building, just for the afl-cgroup
diff --git a/pkgs/tools/text/kdiff3/default.nix b/pkgs/tools/text/kdiff3/default.nix
index e1a2f157085fd..38362333caddd 100644
--- a/pkgs/tools/text/kdiff3/default.nix
+++ b/pkgs/tools/text/kdiff3/default.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation, lib, fetchgit, fetchpatch,
   extra-cmake-modules, kdoctools, wrapGAppsHook,
-  kconfig, kinit, kparts
+  kcrash, kconfig, kinit, kparts
 }:
 
 mkDerivation rec {
@@ -32,7 +32,7 @@ mkDerivation rec {
 
   nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ];
 
-  propagatedBuildInputs = [ kconfig kinit kparts ];
+  propagatedBuildInputs = [ kconfig kcrash kinit kparts ];
 
   meta = with lib; {
     homepage = http://kdiff3.sourceforge.net/;
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index cd27aa51cd27f..209520097f04d 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -763,7 +763,6 @@ with pkgs;
     isLibrary = false;
     enableSharedExecutables = false;
     executableToolDepends = [ makeWrapper ];
-    doCheck = stdenv.is64bit;  # https://github.com/NixOS/cabal2nix/issues/272
     postInstall = ''
       exe=$out/libexec/${drv.pname}-${drv.version}/${drv.pname}
       install -D $out/bin/${drv.pname} $exe
@@ -2732,6 +2731,8 @@ with pkgs;
 
   kzipmix = callPackage_i686 ../tools/compression/kzipmix { };
 
+  mailcatcher = callPackage ../development/web/mailcatcher { };
+
   makebootfat = callPackage ../tools/misc/makebootfat { };
 
   matrix-synapse = callPackage ../servers/matrix-synapse { };
@@ -3321,6 +3322,8 @@ with pkgs;
 
   ngrok = callPackage ../tools/networking/ngrok { };
 
+  noice = callPackage ../applications/misc/noice { };
+
   noip = callPackage ../tools/networking/noip { };
 
   nomad = callPackage ../applications/networking/cluster/nomad { };
@@ -4528,6 +4531,8 @@ with pkgs;
 
   uriparser = callPackage ../development/libraries/uriparser {};
 
+  urlscan = callPackage ../applications/misc/urlscan { };
+
   urlview = callPackage ../applications/misc/urlview {};
 
   usbmuxd = callPackage ../tools/misc/usbmuxd {};
@@ -5471,9 +5476,10 @@ with pkgs;
   psc-package = haskell.lib.justStaticExecutables
     (haskellPackages.callPackage ../development/compilers/purescript/psc-package { });
 
-  inherit (ocamlPackages) haxe;
-
-  hxcpp = callPackage ../development/compilers/haxe/hxcpp.nix { };
+  inherit (ocamlPackages.haxe) haxe_3_2 haxe_3_4;
+  haxe = haxe_3_4;
+  haxePackages = recurseIntoAttrs (callPackage ./haxe-packages.nix { });
+  inherit (haxePackages) hxcpp;
 
   hhvm = callPackage ../development/compilers/hhvm {
     boost = boost160;
@@ -6662,6 +6668,13 @@ with pkgs;
 
   cscope = callPackage ../development/tools/misc/cscope { };
 
+  csmith = callPackage ../development/tools/misc/csmith {
+    inherit (perlPackages) perl SysCPU;
+    # Workaround optional dependency on libbsd that's
+    # currently broken on Darwin.
+    libbsd = if stdenv.isDarwin then null else libbsd;
+  };
+
   csslint = callPackage ../development/web/csslint { };
 
   libcxx = llvmPackages.libcxx;
@@ -11981,6 +11994,22 @@ with pkgs;
       ];
   };
 
+  linux_4_12 = callPackage ../os-specific/linux/kernel/linux-4.12.nix {
+    kernelPatches =
+      [ kernelPatches.bridge_stp_helper
+        kernelPatches.p9_fixes
+        # See pkgs/os-specific/linux/kernel/cpu-cgroup-v2-patches/README.md
+        # when adding a new linux version
+        kernelPatches.cpu-cgroup-v2."4.11"
+        kernelPatches.modinst_arg_list_too_long
+      ]
+      ++ lib.optionals ((platform.kernelArch or null) == "mips")
+      [ kernelPatches.mips_fpureg_emu
+        kernelPatches.mips_fpu_sigill
+        kernelPatches.mips_ext3_n32
+      ];
+  };
+
   linux_testing = callPackage ../os-specific/linux/kernel/linux-testing.nix {
     kernelPatches = [
       kernelPatches.bridge_stp_helper
@@ -12151,7 +12180,7 @@ with pkgs;
   linux = linuxPackages.kernel;
 
   # Update this when adding the newest kernel major version!
-  linuxPackages_latest = linuxPackages_4_11;
+  linuxPackages_latest = linuxPackages_4_12;
   linux_latest = linuxPackages_latest.kernel;
 
   # Build the kernel modules for the some of the kernels.
@@ -12162,6 +12191,7 @@ with pkgs;
   linuxPackages_4_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_4);
   linuxPackages_4_9 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_9);
   linuxPackages_4_11 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_11);
+  linuxPackages_4_12 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_12);
   # Don't forget to update linuxPackages_latest!
 
   # Intentionally lacks recurseIntoAttrs, as -rc kernels will quite likely break out-of-tree modules and cause failed Hydra builds.
@@ -12177,7 +12207,7 @@ with pkgs;
   linuxPackages_latest_xen_dom0 = recurseIntoAttrs (linuxPackagesFor (pkgs.linux_latest.override { features.xen_dom0=true; }));
 
   # Hardened linux
-  linux_hardened = let linux = pkgs.linux_4_11; in linux.override {
+  linux_hardened = let linux = pkgs.linuxPackages_latest.kernel; in linux.override {
     extraConfig = import ../os-specific/linux/kernel/hardened-config.nix {
       inherit stdenv;
       inherit (linux) version;
@@ -12938,6 +12968,8 @@ with pkgs;
 
   paper-icon-theme = callPackage ../data/icons/paper-icon-theme { };
 
+  papirus-icon-theme = callPackage ../data/icons/papirus-icon-theme { };
+
   pecita = callPackage ../data/fonts/pecita {};
 
   paratype-pt-mono = callPackage ../data/fonts/paratype-pt/mono.nix {};
@@ -13217,7 +13249,7 @@ with pkgs;
   audio-recorder = callPackage ../applications/audio/audio-recorder { };
 
   autotrace = callPackage ../applications/graphics/autotrace {};
-  
+
   milkytracker = callPackage ../applications/audio/milkytracker { };
 
   schismtracker = callPackage ../applications/audio/schismtracker { };
@@ -13624,6 +13656,8 @@ with pkgs;
 
   doodle = callPackage ../applications/search/doodle { };
 
+  dr14_tmeter = callPackage ../applications/audio/dr14_tmeter { };
+
   draftsight = callPackage ../applications/graphics/draftsight { };
 
   droopy = callPackage ../applications/networking/droopy {
@@ -17564,7 +17598,9 @@ with pkgs;
   gnome3 = gnome3_22;
 
   gnomeExtensions = {
+    caffeine = callPackage ../desktops/gnome-3/extensions/caffeine { };
     dash-to-dock = callPackage ../desktops/gnome-3/extensions/dash-to-dock { };
+    topicons-plus = callPackage ../desktops/gnome-3/extensions/topicons-plus { };
   };
 
   hsetroot = callPackage ../tools/X11/hsetroot { };
@@ -18441,6 +18477,8 @@ with pkgs;
 
   greybird = callPackage ../misc/themes/greybird { };
 
+  guetzli = callPackage ../applications/graphics/guetzli { };
+
   gxemul = callPackage ../misc/emulators/gxemul { };
 
   hatari = callPackage ../misc/emulators/hatari { };
@@ -18697,10 +18735,10 @@ with pkgs;
   inherit (callPackage ../applications/networking/cluster/terraform {})
     terraform_0_8_5
     terraform_0_8_8
-    terraform_0_9_10;
+    terraform_0_9_11;
 
   terraform_0_8 = terraform_0_8_8;
-  terraform_0_9 = terraform_0_9_10;
+  terraform_0_9 = terraform_0_9_11;
   terraform = terraform_0_9;
 
   terraform-inventory = callPackage ../applications/networking/cluster/terraform-inventory {};
@@ -18876,6 +18914,8 @@ with pkgs;
     wxGTK = wxGTK30;
   };
 
+  x11idle = callPackage ../tools/misc/x11idle {};
+
   x2x = callPackage ../tools/X11/x2x { };
 
   xboxdrv = callPackage ../misc/drivers/xboxdrv { };
diff --git a/pkgs/top-level/haxe-packages.nix b/pkgs/top-level/haxe-packages.nix
new file mode 100644
index 0000000000000..5a85dc3433bad
--- /dev/null
+++ b/pkgs/top-level/haxe-packages.nix
@@ -0,0 +1,120 @@
+{ stdenv, fetchzip, fetchFromGitHub, newScope, haxe, neko, nodejs, wine, php, python3, jdk, mono, haskellPackages, fetchpatch }:
+
+let
+  self = haxePackages;
+  callPackage = newScope self;
+  haxePackages = with self; {
+
+    withCommas = stdenv.lib.replaceChars ["."] [","];
+
+    # simulate "haxelib dev $libname ."
+    simulateHaxelibDev = libname: ''
+      devrepo=$(mktemp -d)
+      mkdir -p "$devrepo/${withCommas libname}"
+      echo $(pwd) > "$devrepo/${withCommas libname}/.dev"
+      export HAXELIB_PATH="$HAXELIB_PATH:$devrepo"
+    '';
+
+    installLibHaxe = { libname, version, files ? "*" }: ''
+      mkdir -p "$out/lib/haxe/${withCommas libname}/${withCommas version}"
+      echo -n "${version}" > $out/lib/haxe/${withCommas libname}/.current
+      cp -dpR ${files} "$out/lib/haxe/${withCommas libname}/${withCommas version}/"
+    '';
+
+    buildHaxeLib = {
+      libname,
+      version,
+      sha256,
+      meta,
+      ...
+    } @ attrs:
+      stdenv.mkDerivation (attrs // {
+        name = "${libname}-${version}";
+
+        buildInputs = (attrs.buildInputs or []) ++ [ haxe neko ]; # for setup-hook.sh to work
+        src = fetchzip rec {
+          name = "${libname}-${version}";
+          url = "http://lib.haxe.org/files/3.0/${withCommas name}.zip";
+          inherit sha256;
+          stripRoot = false;
+        };
+
+        installPhase = attrs.installPhase or ''
+          runHook preInstall
+          (
+            if [ $(ls $src | wc -l) == 1 ]; then
+              cd $src/* || cd $src
+            else
+              cd $src
+            fi
+            ${installLibHaxe { inherit libname version; }}
+          )
+          runHook postInstall
+        '';
+
+        meta = {
+          homepage = "http://lib.haxe.org/p/${libname}";
+          license = stdenv.lib.licenses.bsd2;
+          platforms = stdenv.lib.platforms.all;
+          description = throw "please write meta.description";
+        } // attrs.meta;
+      });
+
+    hxcpp = buildHaxeLib rec {
+      libname = "hxcpp";
+      version = "3.4.64";
+      sha256 = "04gyjm6wqmsm0ifcfkxmq1yv8xrfzys3z5ajqnvvjrnks807mw8q";
+      postFixup = ''
+        for f in $out/lib/haxe/${withCommas libname}/${withCommas version}/{,project/libs/nekoapi/}bin/Linux{,64}/*; do
+          chmod +w "$f"
+          patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker)   "$f" || true
+          patchelf --set-rpath ${ stdenv.lib.makeLibraryPath [ stdenv.cc.cc ] }  "$f" || true
+        done
+      '';
+      meta.description = "Runtime support library for the Haxe C++ backend";
+    };
+
+    hxjava = buildHaxeLib {
+      libname = "hxjava";
+      version = "3.2.0";
+      sha256 = "1vgd7qvsdxlscl3wmrrfi5ipldmr4xlsiwnj46jz7n6izff5261z";
+      meta.description = "Support library for the Java backend of the Haxe compiler";
+      propagatedBuildInputs = [ jdk ];
+    };
+
+    hxcs = buildHaxeLib {
+      libname = "hxcs";
+      version = "3.4.0";
+      sha256 = "0f5vgp2kqnpsbbkn2wdxmjf7xkl0qhk9lgl9kb8d5wdy89nac6q6";
+      meta.description = "Support library for the C# backend of the Haxe compiler";
+      propagatedBuildInputs = [ mono ];
+    };
+
+    hxnodejs_4 = buildHaxeLib {
+      libname = "hxnodejs";
+      version = "4.0.9";
+      sha256 = "0b7ck48nsxs88sy4fhhr0x1bc8h2ja732zzgdaqzxnh3nir0bajm";
+      meta.description = "Extern definitions for node.js 4.x";
+    };
+
+    hxnodejs_6 = let
+      libname = "hxnodejs";
+      version = "6.9.0";
+    in stdenv.mkDerivation rec {
+      name = "${libname}-${version}";
+      src = fetchFromGitHub {
+        owner = "HaxeFoundation";
+        repo = "hxnodejs";
+        rev = "cf80c6a";
+        sha256 = "0mdiacr5b2m8jrlgyd2d3vp1fha69lcfb67x4ix7l7zfi8g460gs";
+      };
+      installPhase = installLibHaxe { inherit libname version; };
+      meta = {
+        homepage = "http://lib.haxe.org/p/${libname}";
+        license = stdenv.lib.licenses.bsd2;
+        platforms = stdenv.lib.platforms.all;
+        description = "Extern definitions for node.js 6.9";
+      };
+    };
+  };
+in self
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 1b2e23916ef26..1c61161081706 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -129,7 +129,7 @@ let
     cmdliner_1_0 = callPackage ../development/ocaml-modules/cmdliner/1.0.nix { };
 
     cohttp_p4 = callPackage ../development/ocaml-modules/cohttp/0.19.3.nix {
-      lwt = ocaml_lwt;
+      lwt = lwt2;
     };
 
     cohttp =
@@ -138,7 +138,7 @@ let
       else cohttp_p4;
 
     conduit_p4 = callPackage ../development/ocaml-modules/conduit/0.10.0.nix {
-       lwt = ocaml_lwt;
+       lwt = lwt2;
     };
 
     conduit =
@@ -182,7 +182,7 @@ let
 
     eff = callPackage ../development/interpreters/eff { };
 
-    eliom = callPackage ../development/ocaml-modules/eliom { };
+    eliom = callPackage ../development/ocaml-modules/eliom { lwt = lwt2; };
 
     enumerate = callPackage ../development/ocaml-modules/enumerate { };
 
@@ -226,6 +226,8 @@ let
 
     higlo = callPackage ../development/ocaml-modules/higlo { };
 
+    inotify = callPackage ../development/ocaml-modules/inotify { };
+
     io-page = callPackage ../development/ocaml-modules/io-page { };
 
     ipaddr_p4 = callPackage ../development/ocaml-modules/ipaddr/2.6.1.nix { };
@@ -249,6 +251,10 @@ let
 
     git = callPackage ../development/ocaml-modules/git { };
 
+    git-http = callPackage ../development/ocaml-modules/git-http { };
+
+    git-unix = callPackage ../development/ocaml-modules/git-unix { };
+
     gmetadom = callPackage ../development/ocaml-modules/gmetadom { };
 
     gtktop = callPackage ../development/ocaml-modules/gtktop { };
@@ -262,7 +268,7 @@ let
       pcre = ocaml_pcre;
     };
 
-    js_of_ocaml = callPackage ../development/tools/ocaml/js_of_ocaml { };
+    js_of_ocaml = callPackage ../development/tools/ocaml/js_of_ocaml { lwt = lwt2; };
 
     jsonm = callPackage ../development/ocaml-modules/jsonm { };
 
@@ -284,9 +290,9 @@ let
       gtkmathview = callPackage ../development/libraries/gtkmathview { };
     };
 
-    lambdaTerm-1_6 = callPackage ../development/ocaml-modules/lambda-term/1.6.nix { };
+    lambdaTerm-1_6 = callPackage ../development/ocaml-modules/lambda-term/1.6.nix { lwt = lwt2; };
     lambdaTerm =
-      if lib.versionOlder "4.01" ocaml.version
+      if lib.versionOlder "4.02" ocaml.version
       then callPackage ../development/ocaml-modules/lambda-term { }
       else lambdaTerm-1_6;
 
@@ -298,13 +304,27 @@ let
       lwt = ocaml_lwt;
     };
 
+    lwt2 = callPackage ../development/ocaml-modules/lwt { };
+
+    lwt3 = if lib.versionOlder "4.02" ocaml.version
+      then callPackage ../development/ocaml-modules/lwt {
+        version = "3.0.0";
+      }
+      else throw "lwt3 is not available for OCaml ${ocaml.version}";
+
+    ocaml_lwt = if lib.versionOlder "4.02" ocaml.version then lwt3 else lwt2;
+
+    lwt_react = callPackage ../development/ocaml-modules/lwt_react {
+      lwt = lwt3;
+    };
+
     macaque = callPackage ../development/ocaml-modules/macaque { };
 
     magic-mime = callPackage ../development/ocaml-modules/magic-mime { };
 
     magick = callPackage ../development/ocaml-modules/magick { };
 
-    markup = callPackage ../development/ocaml-modules/markup { lwt = ocaml_lwt; };
+    markup = callPackage ../development/ocaml-modules/markup { lwt = lwt2; };
 
     menhir = callPackage ../development/ocaml-modules/menhir { };
 
@@ -368,8 +388,6 @@ let
 
     ocamlify = callPackage ../development/tools/ocaml/ocamlify { };
 
-    ocaml_lwt = callPackage ../development/ocaml-modules/lwt { };
-
     ocaml-migrate-parsetree = callPackage ../development/ocaml-modules/ocaml-migrate-parsetree { };
 
     ocamlmod = callPackage ../development/tools/ocaml/ocamlmod { };
@@ -417,7 +435,7 @@ let
 
     ocplib-simplex = callPackage ../development/ocaml-modules/ocplib-simplex { };
 
-    ocsigen_server = callPackage ../development/ocaml-modules/ocsigen-server { };
+    ocsigen_server = callPackage ../development/ocaml-modules/ocsigen-server { lwt = lwt2; };
 
     ocsigen-start = callPackage ../development/ocaml-modules/ocsigen-start { };
 
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index fa4caa25a54bc..558f51948b832 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -12622,6 +12622,15 @@ let self = _self // overrides; _self = with self; {
     };
   };
 
+  SysCPU = buildPerlPackage rec {
+    name = "Sys-CPU-0.61";
+    src = fetchurl {
+      url = "mirror://cpan/authors/id/M/MZ/MZSANFORD/${name}.tar.gz";
+      sha256 = "1r6976bs86j7zp51m5vh42xlyah951jgdlkimv202413kjvqc2i5";
+    };
+    buildInputs = stdenv.lib.optional stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.Carbon;
+  };
+
   SysHostnameLong = buildPerlPackage rec {
     name = "Sys-Hostname-Long-1.4";
     src = fetchurl {
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 5be1a91e71125..232f0693ab908 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -3809,6 +3809,8 @@ in {
     };
   };
 
+  codecov = callPackage ../development/python-modules/codecov {};
+
   cogapp = buildPythonPackage rec {
     version = "2.3";
     name    = "cogapp-${version}";
@@ -4825,7 +4827,7 @@ in {
       url = "mirror://pypi/p/${pname}/${name}.tar.gz";
       sha256 = "1mycn5cc9cp4fb0i2vzgkkk6d0glnkbilggwb4i99i09vr0vg5cd";
     };
-    buildInputs = with self; [ pyramid_mako nose django_1_9 jinja2 tornado pyramid Mako ];
+    buildInputs = with self; [ pyramid_mako nose django jinja2 tornado pyramid Mako ];
     propagatedBuildInputs = with self; [ six ];
     patchPhase = ''
       sed -i 's/1.4.99/1.99/' setup.py
@@ -7060,6 +7062,18 @@ in {
     };
   };
 
+  google-compute-engine = buildPythonPackage rec {
+    version = "2.3.0";
+    name    = "google-compute-engine-${version}";
+
+    src = pkgs.fetchurl {
+      url    = "mirror://pypi/g/google-compute-engine/google-compute-engine-${version}.tar.gz";
+      sha256 = "1pjj95b3l61h8xz5kjfcgnql066cr8bq5wl480a6dxd2inw8mynf";
+    };
+
+    propagatedBuildInputs = with self; [ boto ];
+  };
+
   googlecl = buildPythonPackage rec {
     version = "0.9.14";
     name    = "googlecl-${version}";
@@ -9820,34 +9834,13 @@ in {
     gdal = self.gdal;
   };
 
+  # TODO: Django 1.10 will be maintained until the end of the year. Therefore,
+  # it will be dropped before 17.09.
+  # https://github.com/NixOS/nixpkgs/issues/25375#issuecomment-298522597
   django_1_10 = callPackage ../development/python-modules/django/1_10.nix {
     gdal = self.gdal;
   };
 
-  django_1_9 = buildPythonPackage rec {
-    name = "Django-${version}";
-    version = "1.9.13";
-    disabled = pythonOlder "2.7";
-
-    src = pkgs.fetchurl {
-      url = "http://www.djangoproject.com/m/releases/1.9/${name}.tar.gz";
-      sha256 = "079zspfsvfnv9wf6qvg8xmz1m23d0723p2nqyk8gfqb012jxn1y0";
-    };
-
-    # patch only $out/bin to avoid problems with starter templates (see #3134)
-    postFixup = ''
-      wrapPythonProgramsIn $out/bin "$out $pythonPath"
-    '';
-
-    # too complicated to setup
-    doCheck = false;
-
-    meta = {
-      description = "A high-level Python Web framework";
-      homepage = https://www.djangoproject.com/;
-    };
-  };
-
   django_1_8 = buildPythonPackage rec {
     name = "Django-${version}";
     version = "1.8.18";
@@ -9872,32 +9865,6 @@ in {
     };
   };
 
-  django_1_6 = buildPythonPackage rec {
-    name = "Django-${version}";
-    version = "1.6.11.5";
-
-    # Support to python-3.4 and higher was introduced in django_1_7
-    disabled = !(isPy26 || isPy27 || isPy33);
-
-    src = pkgs.fetchurl {
-      url = "https://downloads.reviewboard.org/releases/Django/1.6/Django-${version}.tar.gz";
-      sha256 = "0yj0fw3iql031z8l5ik1fb25sk3l5bw2vc63bbyg5rz2k3znl4il";
-    };
-
-    # too complicated to setup
-    doCheck = false;
-
-    # patch only $out/bin to avoid problems with starter templates (see #3134)
-    postFixup = ''
-      wrapPythonProgramsIn $out/bin "$out $pythonPath"
-    '';
-
-    meta = {
-      description = "A high-level Python Web framework";
-      homepage = https://www.djangoproject.com/;
-    };
-  };
-
   django_appconf = buildPythonPackage rec {
     name = "django-appconf-${version}";
     version = "1.0.1";
@@ -9995,7 +9962,7 @@ in {
       sha256 = "1qbcx54hq8iy3n2n6cki3bka1m9rp39np4hqddrm9knc954fb7nv";
     };
 
-    propagatedBuildInputs = with self; [ django_1_6 ];
+    propagatedBuildInputs = with self; [ django ];
 
     meta = {
       description = "A database schema evolution tool for the Django web framework";
@@ -10033,7 +10000,7 @@ in {
       url = "mirror://pypi/d/django-tagging/${name}.tar.gz";
       sha256 = "03zlbq13rydfh28wh0jk3x3cjk9x6jjmqnx1i3ngjmfwbxf8x6j1";
     };
-    propagatedBuildInputs = with self; [ django_1_6 ];
+    propagatedBuildInputs = with self; [ django ];
   });
 
   django_classytags = buildPythonPackage rec {
@@ -10235,7 +10202,7 @@ in {
       sha256 = "1y49fa8jj7x9qjj5wzhns3zxwj0s73sggvkrv660cqw5qb7d8hha";
     };
 
-    propagatedBuildInputs = with self; [ django_1_6 futures ];
+    propagatedBuildInputs = with self; [ django futures ];
 
     meta = with stdenv.lib; {
       description = "Pipeline is an asset packaging library for Django";
@@ -10253,7 +10220,10 @@ in {
   });
 
 
-  djblets = buildPythonPackage rec {
+  djblets = if (versionOlder self.django.version "1.6.11") ||
+               (versionAtLeast self.django.version "1.9")
+            then throw "djblets only suported for Django<1.8.999,>=1.6.11"
+            else buildPythonPackage rec {
     name = "Djblets-0.9";
 
     src = pkgs.fetchurl {
@@ -10262,7 +10232,7 @@ in {
     };
 
     propagatedBuildInputs = with self; [
-      django_1_6 feedparser django_pipeline_1_3 pillowfight pytz ];
+      django feedparser django_pipeline_1_3 pillowfight pytz ];
 
     meta = {
       description = "A collection of useful extensions for Django";
@@ -13451,6 +13421,8 @@ in {
     };
   };
 
+  markdownsuperscript = callPackage ../development/python-modules/markdownsuperscript {};
+
   markdown-macros = buildPythonPackage rec {
     name = "markdown-macros-${version}";
     version = "0.1.2";
@@ -13484,7 +13456,10 @@ in {
     };
   };
 
-  mathics = buildPythonPackage rec {
+  mathics = if (versionOlder self.django.version "1.8") ||
+               (versionAtLeast self.django.version "1.9")
+            then throw "mathics only supports django-1.8.x"
+            else buildPythonPackage rec {
     name = "mathics-${version}";
     version = "0.9";
     src = pkgs.fetchFromGitHub {
@@ -13510,7 +13485,7 @@ in {
     propagatedBuildInputs = with self; [
       cython
       sympy
-      django_1_8
+      django
       ply
       mpmath
       dateutil
@@ -13648,7 +13623,7 @@ in {
 
     buildInputs = with self; [ pyflakes pep8 ];
     propagatedBuildInputs = with self; [
-      django_1_6 filebrowser_safe grappelli_safe bleach tzlocal beautifulsoup4
+      django filebrowser_safe grappelli_safe bleach tzlocal beautifulsoup4
       requests requests_oauthlib future pillow
     ];
 
@@ -21282,7 +21257,7 @@ in {
 
     buildInputs = with self; [ coverage mock nose geopy ];
     propagatedBuildInputs = with self; [
-      django_1_6 dateutil_1_5 whoosh pysolr elasticsearch
+      django dateutil_1_5 whoosh pysolr elasticsearch
     ];
 
     patchPhase = ''
@@ -21367,7 +21342,7 @@ in {
     '';
 
     propagatedBuildInputs = with self;
-      [ django_1_6 recaptcha_client pytz memcached dateutil_1_5 paramiko flup
+      [ django recaptcha_client pytz memcached dateutil_1_5 paramiko flup
         pygments djblets django_evolution pycrypto pysvn pillow
         psycopg2 django-haystack python_mimeparse markdown django-multiselectfield
       ];
@@ -27173,7 +27148,7 @@ EOF
       sha256 = "1c0kclbv8shv9nvjx19wqm4asia58s3qmd9fapchc6y9fjpjax6q";
     };
 
-    propagatedBuildInputs = with self; [ django_1_6 django_tagging_0_3 whisper pycairo ldap memcached pytz ];
+    propagatedBuildInputs = with self; [ django django_tagging_0_3 whisper pycairo ldap memcached pytz ];
 
     postInstall = ''
       wrapProgram $out/bin/run-graphite-devel-server.py \
@@ -28557,7 +28532,7 @@ EOF
     disabled = isPyPy;
     # Wants to set up Django
     doCheck = false;
-    propagatedBuildInputs = with self; [ django_1_9 smartypants jinja2 ];
+    propagatedBuildInputs = with self; [ django smartypants jinja2 ];
     meta = {
       description = "Filters to enhance web typography, including support for Django & Jinja templates";
       homepage = "https://github.com/mintchaos/typogrify";
@@ -30345,8 +30320,6 @@ EOF
 
   uranium = callPackage ../development/python-modules/uranium { };
 
-  urlscan = callPackage ../applications/misc/urlscan { };
-
   vine = buildPythonPackage rec {
     name = "vine-${version}";
     version = "1.1.3";