summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/cross-compilation.xml153
-rw-r--r--doc/manual.xml1
-rw-r--r--doc/old/cross.txt12
-rw-r--r--doc/stdenv.xml92
-rw-r--r--lib/licenses.nix5
-rw-r--r--lib/maintainers.nix4
-rw-r--r--nixos/doc/manual/installation/installing.xml5
-rw-r--r--nixos/doc/manual/release-notes/rl-1703.xml22
-rw-r--r--nixos/modules/i18n/input-method/ibus.nix2
-rw-r--r--nixos/modules/misc/ids.nix3
-rw-r--r--nixos/modules/misc/locate.nix94
-rw-r--r--nixos/modules/module-list.nix5
-rw-r--r--nixos/modules/profiles/installation-device.nix14
-rw-r--r--nixos/modules/programs/environment.nix3
-rw-r--r--nixos/modules/programs/man.nix1
-rw-r--r--nixos/modules/rename.nix5
-rw-r--r--nixos/modules/security/acme.nix2
-rw-r--r--nixos/modules/services/games/factorio.nix87
-rw-r--r--nixos/modules/services/logging/journalbeat.nix76
-rw-r--r--nixos/modules/services/logging/logstash.nix14
-rw-r--r--nixos/modules/services/misc/apache-kafka.nix2
-rw-r--r--nixos/modules/services/monitoring/vnstat.nix43
-rw-r--r--nixos/modules/services/network-filesystems/tahoe.nix2
-rw-r--r--nixos/modules/services/networking/dnscrypt-wrapper.nix187
-rw-r--r--nixos/modules/services/networking/firewall.nix20
-rw-r--r--nixos/modules/services/networking/flannel.nix2
-rw-r--r--nixos/modules/services/networking/kresd.nix119
-rw-r--r--nixos/modules/services/networking/networkmanager.nix5
-rw-r--r--nixos/modules/services/networking/pdns-recursor.nix168
-rw-r--r--nixos/modules/services/networking/smokeping.nix2
-rw-r--r--nixos/modules/services/web-servers/nginx/default.nix40
-rw-r--r--nixos/modules/services/web-servers/nginx/vhost-options.nix9
-rw-r--r--nixos/modules/services/x11/desktop-managers/kde5.nix5
-rw-r--r--nixos/release.nix1
-rw-r--r--nixos/tests/bittorrent.nix2
-rw-r--r--nixos/tests/installer.nix4
-rw-r--r--nixos/tests/nat.nix46
-rw-r--r--pkgs/applications/audio/quodlibet/default.nix2
-rw-r--r--pkgs/applications/editors/atom/default.nix4
-rw-r--r--pkgs/applications/editors/emacs-modes/melpa-generated.nix1165
-rw-r--r--pkgs/applications/editors/emacs-modes/melpa-stable-generated.nix431
-rw-r--r--pkgs/applications/editors/emacs-modes/org-generated.nix12
-rw-r--r--pkgs/applications/editors/idea/default.nix32
-rw-r--r--pkgs/applications/gis/qgis/default.nix7
-rw-r--r--pkgs/applications/misc/cbatticon/default.nix4
-rw-r--r--pkgs/applications/misc/electrum/default.nix4
-rw-r--r--pkgs/applications/misc/exercism/default.nix2
-rw-r--r--pkgs/applications/misc/pcmanfm/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/firefox-bin/sources.nix752
-rw-r--r--pkgs/applications/networking/browsers/firefox/default.nix8
-rw-r--r--pkgs/applications/networking/browsers/firefox/wrapper.nix3
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix37
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/gmtk/default.nix16
-rw-r--r--pkgs/applications/networking/cluster/kubernetes/default.nix1
-rw-r--r--pkgs/applications/networking/cluster/terragrunt/default.nix4
-rw-r--r--pkgs/applications/networking/dropbox/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/viber/default.nix12
-rw-r--r--pkgs/applications/networking/irc/hexchat/default.nix20
-rw-r--r--pkgs/applications/networking/sniffers/wireshark/default.nix4
-rw-r--r--pkgs/applications/networking/syncthing/default.nix9
-rw-r--r--pkgs/applications/office/homebank/default.nix4
-rw-r--r--pkgs/applications/science/logic/coq/8.4.nix1
-rw-r--r--pkgs/applications/science/logic/coq/8.6.nix88
-rw-r--r--pkgs/applications/science/logic/coq/default.nix (renamed from pkgs/applications/science/logic/coq/8.5.nix)35
-rw-r--r--pkgs/applications/version-management/cvs/CVE-2012-0804.patch16
-rw-r--r--pkgs/applications/version-management/cvs/default.nix5
-rw-r--r--pkgs/applications/version-management/gitlab-workhorse/default.nix4
-rw-r--r--pkgs/applications/version-management/gitlab/Gemfile48
-rw-r--r--pkgs/applications/version-management/gitlab/Gemfile.lock61
-rw-r--r--pkgs/applications/version-management/gitlab/default.nix4
-rw-r--r--pkgs/applications/version-management/gitlab/gemset.nix86
-rw-r--r--pkgs/applications/video/clipgrab/default.nix4
-rw-r--r--pkgs/applications/video/mkvtoolnix/default.nix13
-rw-r--r--pkgs/applications/video/streamlink/default.nix4
-rw-r--r--pkgs/applications/virtualization/docker/default.nix3
-rw-r--r--pkgs/applications/virtualization/lkl/default.nix3
-rw-r--r--pkgs/applications/virtualization/rkt/default.nix4
-rw-r--r--pkgs/applications/window-managers/i3/status.nix4
-rw-r--r--pkgs/applications/window-managers/jwm/default.nix4
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix3
-rw-r--r--pkgs/build-support/fetchbower/default.nix3
-rw-r--r--pkgs/data/fonts/gentium/default.nix2
-rw-r--r--pkgs/data/fonts/overpass/default.nix16
-rw-r--r--pkgs/data/fonts/paratype-pt/sans.nix2
-rw-r--r--pkgs/data/fonts/roboto/default.nix4
-rw-r--r--pkgs/desktops/enlightenment/terminology.nix6
-rw-r--r--pkgs/desktops/lumina/default.nix4
-rw-r--r--pkgs/desktops/xfce/panel-plugins/xfce4-whiskermenu-plugin.nix4
-rw-r--r--pkgs/development/compilers/aspectj/default.nix6
-rw-r--r--pkgs/development/compilers/crystal/default.nix10
-rw-r--r--pkgs/development/compilers/ghc/8.0.2.nix7
-rw-r--r--pkgs/development/compilers/ghc/head.nix7
-rw-r--r--pkgs/development/compilers/go/1.4.nix23
-rw-r--r--pkgs/development/compilers/go/1.6.nix2
-rw-r--r--pkgs/development/compilers/jikes/default.nix2
-rw-r--r--pkgs/development/compilers/meta-environment/meta-build-env/default.nix2
-rw-r--r--pkgs/development/compilers/ocaml/4.04.nix6
-rw-r--r--pkgs/development/compilers/ocaml/generic.nix4
-rw-r--r--pkgs/development/compilers/zulu/default.nix67
-rw-r--r--pkgs/development/coq-modules/mathcomp/default.nix45
-rw-r--r--pkgs/development/coq-modules/mathcomp/generic.nix4
-rw-r--r--pkgs/development/coq-modules/ssreflect/default.nix45
-rw-r--r--pkgs/development/coq-modules/ssreflect/generic.nix2
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix74
-rw-r--r--pkgs/development/haskell-modules/generic-builder.nix6
-rw-r--r--pkgs/development/haskell-modules/hackage-packages.nix1056
-rw-r--r--pkgs/development/interpreters/php/default.nix15
-rw-r--r--pkgs/development/libraries/cil-aterm/cil-aterm-1.3.6.patch600
-rw-r--r--pkgs/development/libraries/cil-aterm/default.nix13
-rw-r--r--pkgs/development/libraries/fdk-aac/default.nix4
-rw-r--r--pkgs/development/libraries/ffmpeg/2.8.nix4
-rw-r--r--pkgs/development/libraries/freealut/default.nix9
-rw-r--r--pkgs/development/libraries/gd/default.nix4
-rw-r--r--pkgs/development/libraries/gtkmozembed-sharp/builder.sh11
-rw-r--r--pkgs/development/libraries/gtkmozembed-sharp/default.nix21
-rw-r--r--pkgs/development/libraries/hunspell/dictionaries.nix230
-rw-r--r--pkgs/development/libraries/java/jjtraveler/default.nix14
-rw-r--r--pkgs/development/libraries/java/lucene/default.nix10
-rw-r--r--pkgs/development/libraries/java/mockobjects/default.nix2
-rw-r--r--pkgs/development/libraries/libav/default.nix4
-rw-r--r--pkgs/development/libraries/libfm/default.nix8
-rw-r--r--pkgs/development/libraries/libjpeg/62.nix33
-rw-r--r--pkgs/development/libraries/liburcu/default.nix2
-rw-r--r--pkgs/development/libraries/nss/85_security_load.patch64
-rw-r--r--pkgs/development/libraries/nss/default.nix18
-rw-r--r--pkgs/development/libraries/nss/nss-3.21-gentoo-fixups.patch243
-rw-r--r--pkgs/development/libraries/opencv/3.x.nix157
-rw-r--r--pkgs/development/libraries/openssl/default.nix18
-rw-r--r--pkgs/development/libraries/postgis/default.nix8
-rw-r--r--pkgs/development/libraries/sqlite/default.nix6
-rw-r--r--pkgs/development/libraries/t1lib/default.nix1
-rw-r--r--pkgs/development/mobile/titaniumenv/build-app.nix2
-rw-r--r--pkgs/development/mobile/titaniumenv/default.nix5
-rw-r--r--pkgs/development/mobile/titaniumenv/examples/default.nix6
-rw-r--r--pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix4
-rw-r--r--pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix2
-rw-r--r--pkgs/development/mobile/titaniumenv/titaniumsdk-6.0.nix39
-rw-r--r--pkgs/development/mobile/xcodeenv/build-app.nix10
-rw-r--r--pkgs/development/mobile/xcodeenv/default.nix2
-rw-r--r--pkgs/development/mobile/xcodeenv/simulate-app.nix5
-rw-r--r--pkgs/development/mobile/xcodeenv/xcodewrapper.nix2
-rw-r--r--pkgs/development/ocaml-modules/apron/default.nix24
-rw-r--r--pkgs/development/ocaml-modules/mlgmpidl/default.nix36
-rw-r--r--pkgs/development/ocaml-modules/mtime/default.nix29
-rw-r--r--pkgs/development/ocaml-modules/ocsigen-deriving/default.nix8
-rw-r--r--pkgs/development/ocaml-modules/optcomp/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ppx_tools/default.nix20
-rw-r--r--pkgs/development/ocaml-modules/spacetime_lib/default.nix27
-rw-r--r--pkgs/development/python-modules/django_guardian.nix26
-rw-r--r--pkgs/development/python-modules/pytest/2_7.nix28
-rw-r--r--pkgs/development/python-modules/pytest/2_8.nix28
-rw-r--r--pkgs/development/python-modules/pytest/2_9.nix28
-rw-r--r--pkgs/development/python-modules/pytest/default.nix24
-rw-r--r--pkgs/development/python-modules/pytestdjango.nix21
-rw-r--r--pkgs/development/tools/ammonite/default.nix6
-rw-r--r--pkgs/development/tools/analysis/frama-c/default.nix17
-rw-r--r--pkgs/development/tools/analysis/frama-c/dynamic.diff12
-rw-r--r--pkgs/development/tools/apktool/default.nix21
-rw-r--r--pkgs/development/tools/build-managers/drake/Gemfile2
-rw-r--r--pkgs/development/tools/build-managers/drake/Gemfile.lock15
-rw-r--r--pkgs/development/tools/build-managers/drake/default.nix18
-rw-r--r--pkgs/development/tools/build-managers/drake/gemset.nix18
-rw-r--r--pkgs/development/tools/build-managers/gup/build.nix30
-rwxr-xr-xpkgs/development/tools/build-managers/gup/build.nix.gup6
-rw-r--r--pkgs/development/tools/build-managers/gup/default.nix26
-rw-r--r--pkgs/development/tools/build-managers/gup/src.json17
-rw-r--r--pkgs/development/tools/continuous-integration/gitlab-runner/default.nix8
-rw-r--r--pkgs/development/tools/guile/g-wrap/default.nix5
-rw-r--r--pkgs/development/tools/java/jclasslib/default.nix2
-rw-r--r--pkgs/development/tools/misc/gdb/default.nix4
-rw-r--r--pkgs/development/tools/msgpack-tools/default.nix23
-rw-r--r--pkgs/development/tools/ocaml/camlidl/default.nix1
-rw-r--r--pkgs/development/tools/ocaml/camlp4/default.nix3
-rw-r--r--pkgs/development/tools/ocaml/js_of_ocaml/default.nix4
-rw-r--r--pkgs/development/tools/parsing/antlr/default.nix24
-rw-r--r--pkgs/development/tools/rtags/default.nix11
-rw-r--r--pkgs/development/tools/vagrant/default.nix3
-rw-r--r--pkgs/development/tools/valadoc/default.nix6
-rw-r--r--pkgs/games/factorio/default.nix8
-rw-r--r--pkgs/games/minetest/default.nix6
-rw-r--r--pkgs/games/super-tux-kart/default.nix52
-rw-r--r--pkgs/games/warsow/default.nix1
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/default.nix4
-rw-r--r--pkgs/os-specific/darwin/ghc-standalone-archive/default.nix14
-rw-r--r--pkgs/os-specific/darwin/ios-cross/default.nix2
-rw-r--r--pkgs/os-specific/darwin/khd/default.nix42
-rw-r--r--pkgs/os-specific/darwin/khd/org.nixos.khd.plist33
-rw-r--r--pkgs/os-specific/darwin/kwm/default.nix34
-rw-r--r--pkgs/os-specific/darwin/kwm/org.nixos.kwm.plist26
-rw-r--r--pkgs/os-specific/gnu/default.nix21
-rw-r--r--pkgs/os-specific/linux/eventstat/default.nix4
-rw-r--r--pkgs/os-specific/linux/fnotifystat/default.nix4
-rw-r--r--pkgs/os-specific/linux/forkstat/default.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.10.nix1
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.12.nix1
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.18.nix1
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.1.nix1
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.4.nix5
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.9.nix1
-rw-r--r--pkgs/os-specific/linux/kernel/linux-chromiumos-3.14.nix1
-rw-r--r--pkgs/os-specific/linux/kernel/linux-chromiumos-3.18.nix3
-rw-r--r--pkgs/os-specific/linux/kernel/linux-grsecurity.nix5
-rw-r--r--pkgs/os-specific/linux/kernel/linux-mptcp.nix1
-rw-r--r--pkgs/os-specific/linux/kernel/linux-rpi.nix1
-rw-r--r--pkgs/os-specific/linux/kernel/linux-testing.nix1
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix14
-rw-r--r--pkgs/os-specific/linux/libnl/default.nix6
-rw-r--r--pkgs/os-specific/linux/nftables/default.nix5
-rw-r--r--pkgs/os-specific/linux/powerstat/default.nix4
-rw-r--r--pkgs/os-specific/linux/smemstat/default.nix7
-rw-r--r--pkgs/servers/caddy/default.nix4
-rw-r--r--pkgs/servers/caddy/deps.nix61
-rw-r--r--pkgs/servers/dns/knot-dns/default.nix7
-rw-r--r--pkgs/servers/dns/knot-resolver/default.nix70
-rw-r--r--pkgs/servers/dns/pdns-recursor/default.nix38
-rw-r--r--pkgs/servers/freeradius/default.nix22
-rw-r--r--pkgs/servers/http/nginx/mainline.nix4
-rw-r--r--pkgs/servers/monitoring/munin/default.nix12
-rw-r--r--pkgs/servers/monitoring/nagios/plugins/official-2.x.nix8
-rw-r--r--pkgs/servers/monitoring/riemann/default.nix14
-rw-r--r--pkgs/servers/monitoring/telegraf/default.nix4
-rw-r--r--pkgs/servers/monitoring/telegraf/deps-1.2.0.nix (renamed from pkgs/servers/monitoring/telegraf/deps-1.1.2.nix)26
-rw-r--r--pkgs/servers/search/groonga/default.nix36
-rw-r--r--pkgs/servers/sql/mariadb/default.nix5
-rw-r--r--pkgs/servers/squid/4.nix36
-rw-r--r--pkgs/shells/tcsh/avoid-gcc5-wrong-optimisation.patch28
-rw-r--r--pkgs/shells/tcsh/default.nix18
-rw-r--r--pkgs/shells/tcsh/tcsh.glibc-2.24.patch21
-rw-r--r--pkgs/stdenv/adapters.nix116
-rw-r--r--pkgs/stdenv/booter.nix15
-rw-r--r--pkgs/stdenv/cross/default.nix27
-rw-r--r--pkgs/stdenv/custom/default.nix9
-rw-r--r--pkgs/stdenv/darwin/default.nix17
-rw-r--r--pkgs/stdenv/default.nix4
-rw-r--r--pkgs/stdenv/freebsd/default.nix8
-rw-r--r--pkgs/stdenv/generic/default.nix14
-rw-r--r--pkgs/stdenv/linux/default.nix32
-rw-r--r--pkgs/stdenv/linux/make-bootstrap-tools-cross.nix58
-rw-r--r--pkgs/stdenv/native/default.nix13
-rw-r--r--pkgs/stdenv/nix/default.nix4
-rw-r--r--pkgs/tools/X11/xchainkeys/default.nix4
-rw-r--r--pkgs/tools/audio/pasystray/default.nix9
-rw-r--r--pkgs/tools/filesystems/hubicfuse/default.nix13
-rw-r--r--pkgs/tools/misc/bandwidth/default.nix3
-rw-r--r--pkgs/tools/misc/coreutils/default.nix187
-rw-r--r--pkgs/tools/misc/fluentd/Gemfile9
-rw-r--r--pkgs/tools/misc/fluentd/Gemfile.lock130
-rw-r--r--pkgs/tools/misc/fluentd/gemset.nix319
-rw-r--r--pkgs/tools/misc/grub/trusted.nix2
-rw-r--r--pkgs/tools/misc/mlocate/default.nix7
-rw-r--r--pkgs/tools/misc/neofetch/default.nix33
-rw-r--r--pkgs/tools/misc/riemann-c-client/default.nix12
-rw-r--r--pkgs/tools/misc/svtplay-dl/default.nix4
-rw-r--r--pkgs/tools/misc/youtube-dl/default.nix4
-rw-r--r--pkgs/tools/networking/aiccu/default.nix4
-rw-r--r--pkgs/tools/networking/aria2/default.nix4
-rw-r--r--pkgs/tools/networking/biosdevname/default.nix20
-rw-r--r--pkgs/tools/networking/chrony/default.nix15
-rw-r--r--pkgs/tools/networking/curl/default.nix4
-rw-r--r--pkgs/tools/networking/curl/issue-1174.patch34
-rw-r--r--pkgs/tools/networking/dnscrypt-proxy/default.nix12
-rw-r--r--pkgs/tools/networking/p2p/tahoe-lafs/default.nix6
-rw-r--r--pkgs/tools/networking/ppp/default.nix5
-rw-r--r--pkgs/tools/networking/stunnel/default.nix4
-rw-r--r--pkgs/tools/package-management/dpkg/default.nix4
-rw-r--r--pkgs/tools/package-management/nix-update-source/default.nix29
-rw-r--r--pkgs/tools/security/fcrackzip/default.nix26
-rw-r--r--pkgs/tools/security/fcrackzip/fcrackzip_forkexec.patch105
-rw-r--r--pkgs/tools/security/gnupg/21.nix4
-rw-r--r--pkgs/tools/security/tor/default.nix6
-rw-r--r--pkgs/tools/security/tor/torbrowser.nix8
-rw-r--r--pkgs/tools/system/journalbeat/default.nix34
-rw-r--r--pkgs/tools/system/netdata/default.nix4
-rw-r--r--pkgs/tools/typesetting/tex/tetex/default.nix8
-rw-r--r--pkgs/top-level/all-packages.nix210
-rw-r--r--pkgs/top-level/default.nix19
-rw-r--r--pkgs/top-level/haskell-packages.nix4
-rw-r--r--pkgs/top-level/ocaml-packages.nix12
-rw-r--r--pkgs/top-level/perl-packages.nix14
-rw-r--r--pkgs/top-level/python-packages.nix149
-rw-r--r--pkgs/top-level/release-cross.nix86
-rw-r--r--pkgs/top-level/release.nix9
-rw-r--r--pkgs/top-level/splice.nix81
-rw-r--r--pkgs/top-level/stage.nix86
284 files changed, 6301 insertions, 4245 deletions
diff --git a/doc/cross-compilation.xml b/doc/cross-compilation.xml
new file mode 100644
index 000000000000..e93d1a98f7fd
--- /dev/null
+++ b/doc/cross-compilation.xml
@@ -0,0 +1,153 @@
+<chapter xmlns="http://docbook.org/ns/docbook"
+         xmlns:xlink="http://www.w3.org/1999/xlink"
+         xml:id="chap-cross">
+
+<title>Cross-compilation</title>
+
+<section xml:id="sec-cross-intro">
+  <title>Introduction</title>
+  <para>
+    "Cross-compilation" means compiling a program on one machine for another type of machine.
+    For example, a typical use of cross compilation is to compile programs for embedded devices.
+    These devices often don't have the computing power and memory to compile their own programs.
+    One might think that cross-compilation is a fairly niche concern, but there are advantages to being rigorous about distinguishing build-time vs run-time environments even when one is developing and deploying on the same machine.
+    Nixpkgs is increasingly adopting this opinion in that packages should be written with cross-compilation in mind, and nixpkgs should evaluate in a similar way (by minimizing cross-compilation-specific special cases) whether or not one is cross-compiling.
+  </para>
+
+  <para>
+    This chapter will be organized in three parts.
+    First, it will describe the basics of how to package software in a way that supports cross-compilation.
+    Second, it will describe how to use Nixpkgs when cross-compiling.
+    Third, it will describe the internal infrastructure supporting cross-compilation.
+  </para>
+</section>
+
+<!--============================================================-->
+
+<section xml:id="sec-cross-packaging">
+  <title>Packing in a cross-friendly manner</title>
+
+  <section>
+    <title>Platform parameters</title>
+    <para>
+      The three GNU Autoconf platforms, <wordasword>build</wordasword>, <wordasword>host</wordasword>, and <wordasword>cross</wordasword>, are historically the result of much confusion.
+      <link xlink:href="https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html" /> clears this up somewhat but there is more to be said.
+      An important advice to get out the way is, unless you are packaging a compiler or other build tool, just worry about the build and host platforms.
+      Dealing with just two platforms usually better matches people's preconceptions, and in this case is completely correct.
+    </para>
+    <para>
+      In Nixpkgs, these three platforms are defined as attribute sets under the names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>, and <literal>targetPlatform</literal>.
+      All are guaranteed to contain at least a <varname>platform</varname> field, which contains detailed information on the platform.
+      All three are always defined at the top level, so one can get at them just like a dependency in a function that is imported with <literal>callPackage</literal>:
+      <programlisting>{ stdenv, buildPlatform, hostPlatform, fooDep, barDep, .. }: ...</programlisting>
+    </para>
+    <warning><para>
+      These platforms should all have the same structure in all scenarios, but that is currently not the case.
+      When not cross-compiling, they will each contain a <literal>system</literal> field with a short 2-part, hyphen-separated summering string name for the platform.
+      But, when when cross compiling, <literal>hostPlatform</literal> and <literal>targetPlatform</literal> may instead contain <literal>config</literal> with a fuller 3- or 4-part string in the manner of LLVM.
+      We should have all 3 platforms always contain both, and maybe give <literal>config</literal> a better name while we are at it.
+    </para></warning>
+    <variablelist>
+      <varlistentry>
+        <term><varname>buildPlatform</varname></term>
+        <listitem><para>
+          The "build platform" is the platform on which a package is built.
+          Once someone has a built package, or pre-built binary package, the build platform should not matter and be safe to ignore.
+        </para></listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><varname>hostPlatform</varname></term>
+        <listitem><para>
+          The "host platform" is the platform on which a package is run.
+          This is the simplest platform to understand, but also the one with the worst name.
+        </para></listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><varname>targetPlatform</varname></term>
+        <listitem>
+          <para>
+            The "target platform" is black sheep.
+            The other two intrinsically apply to all compiled software—or any build process with a notion of "build-time" followed by "run-time".
+            The target platform only applies to programming tools, and even then only is a good for for some of them.
+            Briefly, GCC, Binutils, GHC, and certain other tools are written in such a way such that a single build can only compiler code for a single platform.
+            Thus, when building them, one must think ahead about what platforms they wish to use the tool to produce machine code for, and build binaries for each.
+          </para>
+          <para>
+            There is no fundamental need to think about the target ahead of time like this.
+            LLVM, for example, was designed from the beginning with cross-compilation in mind, and so a normal LLVM binary will support every architecture that LLVM supports.
+            If the tool supports modular or pluggable backends, one might imagine specifying a <emphasis>set</emphasis> of target platforms / backends one wishes to support, rather than a single one.
+          </para>
+          <para>
+            The biggest reason for mess, if there is one, is that many compilers have the bad habit a build process that builds the compiler and standard library/runtime together.
+            Then the specifying target platform is essential, because it determines the host platform of the standard library/runtime.
+            Nixpkgs tries to avoid this where possible too, but still, because the concept of a target platform is so ingrained now in Autoconf and other tools, it is best to support it as is.
+            Tools like LLVM that don't need up-front target platforms can safely ignore it like normal packages, and it will do no harm.
+          </para>
+          </listitem>
+      </varlistentry>
+    </variablelist>
+    <note><para>
+      If you dig around nixpkgs, you may notice there is also <varname>stdenv.cross</varname>.
+      This field defined as <varname>hostPlatform</varname> when the host and build platforms differ, but otherwise not defined at all.
+      This field is obsolete and will soon disappear—please do not use it.
+    </para></note>
+  </section>
+
+  <section>
+    <title>Specifying Dependencies</title>
+    <para>
+      As mentioned in the introduction to this chapter, one can think about a build time vs run time distinction whether cross-compiling or not.
+      In the case of cross-compilation, this corresponds with whether a derivation running on the native or foreign platform is produced.
+      An interesting thing to think about is how this corresponds with the three Autoconf platforms.
+      In the run-time case, the depending and depended-on package simply have matching build, host, and target platforms.
+      But in the build-time case, one can imagine "sliding" the platforms one over.
+      The depended-on package's host and target platforms (respectively) become the depending package's build and host platforms.
+      This is the most important guiding principle behind cross-compilation with Nixpkgs, and will be called the <wordasword>sliding window principle</wordasword>.
+      In this manner, given the 3 platforms for one package, we can determine the three platforms for all its transitive dependencies.
+    </para>
+    <note><para>
+      The depending package's target platform is unconstrained by the sliding window principle, which makes sense in that one can in principle build cross compilers targeting arbitrary platforms.
+    </para></note>
+    <warning><para>
+      From the above, one would surmise that if a package is being built with a <literal>(build, host, target)</literal> platform triple of <literal>(foo, bar, bar)</literal>, then its build-time dependencies would have a triple of <literal>(foo, foo, bar)</literal>, and <emphasis>those packages'</emphasis> build-time dependencies would have triple of <literal>(foo, foo, foo)</literal>.
+      In other words, it should take two "rounds" of following build-time dependency edges before one reaches a fixed point where, by the sliding window principle, the platform triple no longer changes.
+      Unfortunately, at the moment, we do <emphasis>not</emphasis> implement this correctly, and after only one round of following build-time dependencies is the fixed point reached, with target incorrectly kept different than the others.
+    </para></warning>
+    <para>
+      How does this work in practice? Nixpkgs is now structured so that build-time dependencies are taken from from <varname>buildPackages</varname>, whereas run-time dependencies are taken from the top level attribute set.
+      For example, <varname>buildPackages.gcc</varname> should be used at build time, while <varname>gcc</varname> should be used at run time.
+      Now, for most of Nixpkgs's history, there was no <varname>buildPackages</varname>, and most packages have not been refactored to use it explicitly.
+      Instead, one can use the four attributes used for specifying dependencies as documented in <link linkend="ssec-stdenv-attributes" />.
+      We "splice" together the run-time and build-time package sets with <varname>callPackage</varname>, and then <varname>mkDerivation</varname> for each of four attributes pulls the right derivation out.
+      This splicing can be skipped when not cross compiling as the package sets are the same, but is a bit slow for cross compiling.
+      Because of this, a best-of-both-worlds solution is in the works with no splicing or explicit access of <varname>buildPackages</varname> needed.
+      For now, feel free to use either method.
+    </para>
+  </section>
+
+</section>
+
+<!--============================================================-->
+
+<section xml:id="sec-cross-usage">
+  <title>Cross-building packages</title>
+  <para>
+    To be written.
+    This is basically unchanged so see the old wiki for now.
+  </para>
+</section>
+
+<!--============================================================-->
+
+<section xml:id="sec-cross-infra">
+  <title>Cross-compilation infrastructure</title>
+  <para>To be written.</para>
+  <note><para>
+    If one explores nixpkgs, they will see derivations with names like <literal>gccCross</literal>.
+    Such <literal>*Cross</literal> derivations is a holdover from before we properly distinguished between the host and target platforms
+    —the derivation with "Cross" in the name covered the <literal>build = host != target</literal> case, while the other covered the <literal>host = target</literal>, with build platform the same or not based on whether one was using its <literal>.nativeDrv</literal> or <literal>.crossDrv</literal>.
+    This ugliness will disappear soon.
+  </para></note>
+</section>
+
+</chapter>
diff --git a/doc/manual.xml b/doc/manual.xml
index 1c0dac6e4df7..75bd21557fd1 100644
--- a/doc/manual.xml
+++ b/doc/manual.xml
@@ -13,6 +13,7 @@
   <xi:include href="quick-start.xml" />
   <xi:include href="stdenv.xml" />
   <xi:include href="multiple-output.xml" />
+  <xi:include href="cross-compilation.xml" />
   <xi:include href="configuration.xml" />
   <xi:include href="functions.xml" />
   <xi:include href="meta.xml" />
diff --git a/doc/old/cross.txt b/doc/old/cross.txt
index 82a69f6f3792..73103ea0c6d9 100644
--- a/doc/old/cross.txt
+++ b/doc/old/cross.txt
@@ -61,7 +61,7 @@ stdenv.mkDerivation {
   builder = ./builder.sh;
   src = fetchurl {
     url = http://ftp.nluug.nl/gnu/binutils/binutils-2.16.1.tar.bz2;
-    md5 = "6a9d529efb285071dad10e1f3d2b2967";
+    sha256 = "1ian3kwh2vg6hr3ymrv48s04gijs539vzrq62xr76bxbhbwnz2np";
   };
   inherit noSysDirs;
   configureFlags = "--target=arm-linux";
@@ -81,11 +81,11 @@ Step 2: build kernel headers for the target architecture
 assert stdenv.system == "i686-linux";
 
 stdenv.mkDerivation {
-  name = "linux-headers-2.6.13.4-arm";
+  name = "linux-headers-2.6.13.1-arm";
   builder = ./builder.sh;
   src = fetchurl {
-    url = http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.13.4.tar.bz2;
-    md5 = "94768d7eef90a9d8174639b2a7d3f58d";
+    url = http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.13.1.tar.bz2;
+    sha256 = "12qxmc827fjhaz53kjy7vyrzsaqcg78amiqsb3qm20z26w705lma";
   };
 }
 ---
@@ -152,9 +152,7 @@ stdenv.mkDerivation {
   builder = ./builder.sh;
   src = fetchurl {
     url = ftp://ftp.nluug.nl/pub/gnu/gcc/gcc-4.0.2/gcc-core-4.0.2.tar.bz2;
-    md5 = "f7781398ada62ba255486673e6274b26";
-    #url = ftp://ftp.nluug.nl/pub/gnu/gcc/gcc-4.0.2/gcc-4.0.2.tar.bz2;
-    #md5 = "a659b8388cac9db2b13e056e574ceeb0";
+    sha256 = "02fxh0asflm8825w23l2jq1wvs7hbnam0jayrivg7zdv2ifnc0rc";
   };
   # !!! apply only if noSysDirs is set
   patches = [./no-sys-dirs.patch ./gcc-inhibit.patch];
diff --git a/doc/stdenv.xml b/doc/stdenv.xml
index 44a0e4601fc1..6ec5c9f2814f 100644
--- a/doc/stdenv.xml
+++ b/doc/stdenv.xml
@@ -194,33 +194,52 @@ genericBuild
     tools.</para></listitem>
   </varlistentry>
 
+</variablelist>
+
+<variablelist>
+  <title>Variables specifying dependencies</title>
+
+  <varlistentry>
+    <term><varname>nativeBuildInputs</varname></term>
+    <listitem><para>
+      A list of dependencies used by the new derivation at <emphasis>build</emphasis>-time.
+      I.e. these dependencies should not make it into the package's runtime-closure, though this is currently not checked.
+      For each dependency <replaceable>dir</replaceable>, the directory <filename><replaceable>dir</replaceable>/bin</filename>, if it exists, is added to the <envar>PATH</envar> environment variable.
+      Other environment variables are also set up via a pluggable mechanism.
+      For instance, if <varname>buildInputs</varname> contains Perl, then the <filename>lib/site_perl</filename> subdirectory of each input is added to the <envar>PERL5LIB</envar> environment variable.
+      See <xref linkend="ssec-setup-hooks"/> for details.
+    </para></listitem>
+  </varlistentry>
+
   <varlistentry>
     <term><varname>buildInputs</varname></term>
-    <listitem><para>A list of dependencies used by
-    <literal>stdenv</literal> to set up the environment for the build.
-    For each dependency <replaceable>dir</replaceable>, the directory
-    <filename><replaceable>dir</replaceable>/bin</filename>, if it
-    exists, is added to the <envar>PATH</envar> environment variable.
-    Other environment variables are also set up via a pluggable
-    mechanism.  For instance, if <varname>buildInputs</varname>
-    contains Perl, then the <filename>lib/site_perl</filename>
-    subdirectory of each input is added to the <envar>PERL5LIB</envar>
-    environment variable.  See <xref linkend="ssec-setup-hooks"/> for
-    details.</para></listitem>
-  </varlistentry>
-  
+    <listitem><para>
+      A list of dependencies used by the new derivation at <emphasis>run</emphasis>-time.
+      Currently, the build-time environment is modified in the exact same way as with <varname>nativeBuildInputs</varname>.
+      This is problematic in that when cross-compiling, foreign executables can clobber native ones on the <envar>PATH</envar>.
+      Even more confusing is static-linking.
+      A statically-linked library should be listed here because ultimately that generated machine code will be used at run-time, even though a derivation containing the object files or static archives will only be used at build-time.
+      A less confusing solution to this would be nice.
+    </para></listitem>
+  </varlistentry>
+
+
+  <varlistentry>
+    <term><varname>propagatedNativeBuildInputs</varname></term>
+    <listitem><para>
+      Like <varname>nativeBuildInputs</varname>, but these dependencies are <emphasis>propagated</emphasis>:
+      that is, the dependencies listed here are added to the <varname>nativeBuildInputs</varname> of any package that uses <emphasis>this</emphasis> package as a dependency.
+      So if package Y has <literal>propagatedBuildInputs = [X]</literal>, and package Z has <literal>buildInputs = [Y]</literal>, then package X will appear in Z’s build environment automatically.
+    </para></listitem>
+  </varlistentry>
+
   <varlistentry>
     <term><varname>propagatedBuildInputs</varname></term>
-    <listitem><para>Like <varname>buildInputs</varname>, but these
-    dependencies are <emphasis>propagated</emphasis>: that is, the
-    dependencies listed here are added to the
-    <varname>buildInputs</varname> of any package that uses
-    <emphasis>this</emphasis> package as a dependency.  So if package
-    Y has <literal>propagatedBuildInputs = [X]</literal>, and package
-    Z has <literal>buildInputs = [Y]</literal>, then package X will
-    appear in Z’s build environment automatically.</para></listitem>
+    <listitem><para>
+      Like <varname>buildInputs</varname>, but propagated just like <varname>propagatedNativeBuildInputs</varname>.
+      This inherits <varname>buildInputs</varname>'s flaws of clobbering native executables when cross-compiling and being confusing for static linking.
+    </para></listitem>
   </varlistentry>
-  
 
 </variablelist>
 
@@ -322,7 +341,7 @@ executed and in what order:
       $preInstallPhases installPhase fixupPhase $preDistPhases
       distPhase $postPhases</literal>.
       </para>
-      
+
       <para>Usually, if you just want to add a few phases, it’s more
       convenient to set one of the variables below (such as
       <varname>preInstallPhases</varname>), as you then don’t specify
@@ -706,7 +725,7 @@ makeFlagsArray=(CFLAGS="-O0 -g" LDFLAGS="-lfoo -lbar")
 </variablelist>
 
 
-<para> 
+<para>
 You can set flags for <command>make</command> through the
 <varname>makeFlags</varname> variable.</para>
 
@@ -773,7 +792,7 @@ doCheck = true;</programlisting>
 
 </variablelist>
 
-  
+
 </section>
 
 
@@ -840,12 +859,12 @@ install phase.  The default <function>fixupPhase</function> does the
 following:
 
 <itemizedlist>
-      
+
   <listitem><para>It moves the <filename>man/</filename>,
   <filename>doc/</filename> and <filename>info/</filename>
   subdirectories of <envar>$out</envar> to
   <filename>share/</filename>.</para></listitem>
-      
+
   <listitem><para>It strips libraries and executables of debug
   information.</para></listitem>
 
@@ -1091,13 +1110,13 @@ functions.</para>
 
 <variablelist>
 
-  
+
   <varlistentry xml:id='fun-substitute'>
     <term><function>substitute</function>
     <replaceable>infile</replaceable>
     <replaceable>outfile</replaceable>
     <replaceable>subs</replaceable></term>
-    
+
     <listitem>
       <para>Performs string substitution on the contents of
       <replaceable>infile</replaceable>, writing the result to
@@ -1125,7 +1144,7 @@ functions.</para>
             <literal>@<replaceable>...</replaceable>@</literal> in the
             template as placeholders.</para></listitem>
           </varlistentry>
-          
+
           <varlistentry>
             <term><option>--subst-var-by</option>
             <replaceable>varName</replaceable>
@@ -1134,7 +1153,7 @@ functions.</para>
             <literal>@<replaceable>varName</replaceable>@</literal> by
             the string <replaceable>s</replaceable>.</para></listitem>
           </varlistentry>
-          
+
         </variablelist>
 
       </para>
@@ -1162,7 +1181,7 @@ substitute ./foo.in ./foo.out \
 
     </listitem>
   </varlistentry>
-  
+
 
   <varlistentry xml:id='fun-substituteInPlace'>
     <term><function>substituteInPlace</function>
@@ -1173,7 +1192,7 @@ substitute ./foo.in ./foo.out \
     <replaceable>file</replaceable>.</para></listitem>
   </varlistentry>
 
-  
+
   <varlistentry xml:id='fun-substituteAll'>
     <term><function>substituteAll</function>
     <replaceable>infile</replaceable>
@@ -1233,7 +1252,7 @@ echo @foo@
     <listitem><para>Strips the directory and hash part of a store
     path, outputting the name part to <literal>stdout</literal>.
     For example:
-    
+
 <programlisting>
 # prints coreutils-8.24
 stripHash "/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
@@ -1241,7 +1260,7 @@ stripHash "/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
 
     If you wish to store the result in another variable, then the
     following idiom may be useful:
-    
+
 <programlisting>
 name="/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
 someVar=$(stripHash $name)
@@ -1250,7 +1269,7 @@ someVar=$(stripHash $name)
     </para></listitem>
   </varlistentry>
 
-  
+
 </variablelist>
 
 </section>
@@ -1607,4 +1626,3 @@ Arch Wiki</link>.
 </section>
 
 </chapter>
-
diff --git a/lib/licenses.nix b/lib/licenses.nix
index e5784ce22022..90c1cc177cb3 100644
--- a/lib/licenses.nix
+++ b/lib/licenses.nix
@@ -191,6 +191,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
     free = false;
   };
 
+  eupl11 = spdx {
+    spdxId = "EUPL-1.1";
+    fullname = "European Union Public License 1.1";
+  };
+
   fdl12 = spdx {
     spdxId = "GFDL-1.2";
     fullName = "GNU Free Documentation License v1.2";
diff --git a/lib/maintainers.nix b/lib/maintainers.nix
index 58c8fc0f1d83..cd9ced5832fc 100644
--- a/lib/maintainers.nix
+++ b/lib/maintainers.nix
@@ -27,6 +27,7 @@
   akaWolf = "Artjom Vejsel <akawolf0@gmail.com>";
   akc = "Anders Claesson <akc@akc.is>";
   algorith = "Dries Van Daele <dries_van_daele@telenet.be>";
+  alibabzo = "Alistair Bill <alistair.bill@gmail.com>";
   all = "Nix Committers <nix-commits@lists.science.uu.nl>";
   ambrop72 = "Ambroz Bizjak <ambrop7@gmail.com>";
   amiddelk = "Arie Middelkoop <amiddelk@gmail.com>";
@@ -226,6 +227,7 @@
   joko = "Ioannis Koutras <ioannis.koutras@gmail.com>";
   jonafato = "Jon Banafato <jon@jonafato.com>";
   jpbernardy = "Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>";
+  jpierre03 = "Jean-Pierre PRUNARET <nix@prunetwork.fr>";
   jraygauthier = "Raymond Gauthier <jraygauthier@gmail.com>";
   juliendehos = "Julien Dehos <dehos@lisic.univ-littoral.fr>";
   jwiegley = "John Wiegley <johnw@newartisans.com>";
@@ -289,6 +291,7 @@
   mbbx6spp = "Susan Potter <me@susanpotter.net>";
   mbe = "Brandon Edens <brandonedens@gmail.com>";
   mboes = "Mathieu Boespflug <mboes@tweag.net>";
+  mbrgm = "Marius Bergmann <marius@yeai.de>";
   mcmtroffaes = "Matthias C. M. Troffaes <matthias.troffaes@gmail.com>";
   mdaiter = "Matthew S. Daiter <mdaiter8121@gmail.com>";
   meditans = "Carlo Nucera <meditans@gmail.com>";
@@ -374,6 +377,7 @@
   pmahoney = "Patrick Mahoney <pat@polycrystal.org>";
   pmiddend = "Philipp Middendorf <pmidden@secure.mailbox.org>";
   polyrod = "Maurizio Di Pietro <dc1mdp@gmail.com>";
+  pradeepchhetri = "Pradeep Chhetri <pradeep.chhetri89@gmail.com>";
   prikhi = "Pavan Rikhi <pavan.rikhi@gmail.com>";
   primeos = "Michael Weiss <dev.primeos@gmail.com>";
   profpatsch = "Profpatsch <mail@profpatsch.de>";
diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml
index 04a186a1bca6..8c37643c08f5 100644
--- a/nixos/doc/manual/installation/installing.xml
+++ b/nixos/doc/manual/installation/installing.xml
@@ -37,6 +37,11 @@
   first disable network-manager with
   <command>systemctl stop network-manager</command>.</para></listitem>
 
+  <listitem><para>If you would like to continue the installation from a different
+  machine you need to activate the SSH daemon via <literal>systemctl start sshd</literal>.
+  In order to be able to login you also need to set a password for
+  <literal>root</literal> using <literal>passwd</literal>.</para></listitem>
+
   <listitem><para>The NixOS installer doesn’t do any partitioning or
   formatting yet, so you need to do that yourself.  Use the following
   commands:
diff --git a/nixos/doc/manual/release-notes/rl-1703.xml b/nixos/doc/manual/release-notes/rl-1703.xml
index 6be2cd3af7f8..177010e2a322 100644
--- a/nixos/doc/manual/release-notes/rl-1703.xml
+++ b/nixos/doc/manual/release-notes/rl-1703.xml
@@ -32,6 +32,15 @@ following incompatible changes:</para>
 <itemizedlist>
   <listitem>
     <para>
+      Cross compilation has been rewritten. See the nixpkgs manual for
+      details. The most obvious breaking change is that derivations absent a
+      <literal>.nativeDrv</literal> or <literal>.crossDrv</literal> are now
+      cross by default, not native.
+    </para>
+  </listitem>
+
+  <listitem>
+    <para>
       <literal>stdenv.overrides</literal> is now expected to take <literal>self</literal>
       and <literal>super</literal> arguments. See <literal>lib.trivial.extends</literal>
       for what those parameters represent.
@@ -124,6 +133,19 @@ following incompatible changes:</para>
 
     </para>
   </listitem>
+
+  <listitem>
+    <para>
+      Autoloading connection tracking helpers is now disabled by default.
+      This default was also changed in the Linux kernel and is considered
+      insecure if not configured properly in your firewall. If you need
+      connection tracking helpers (i.e. for active FTP) please enable
+      <literal>networking.firewall.autoLoadConntrackHelpers</literal> and
+      tune <literal>networking.firewall.connectionTrackingModules</literal>
+      to suit your needs.
+    </para>
+  </listitem>
+
 </itemizedlist>
 
 
diff --git a/nixos/modules/i18n/input-method/ibus.nix b/nixos/modules/i18n/input-method/ibus.nix
index 3eaf9e2ab370..a5bbe6bcb559 100644
--- a/nixos/modules/i18n/input-method/ibus.nix
+++ b/nixos/modules/i18n/input-method/ibus.nix
@@ -44,7 +44,7 @@ in
       panel = mkOption {
         type = with types; nullOr path;
         default = null;
-        example = literalExample "${pkgs.kde5.plasma-desktop}/lib/libexec/kimpanel-ibus-panel";
+        example = literalExample "''${pkgs.kde5.plasma-desktop}/lib/libexec/kimpanel-ibus-panel";
         description = "Replace the IBus panel with another panel.";
       };
     };
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix
index 5058d41bf753..2005f2518ba0 100644
--- a/nixos/modules/misc/ids.nix
+++ b/nixos/modules/misc/ids.nix
@@ -284,6 +284,8 @@
       glance = 266;
       couchpotato = 267;
       gogs = 268;
+      pdns-recursor = 269;
+      kresd = 270;
 
       # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
 
@@ -538,6 +540,7 @@
       glance = 266;
       couchpotato = 267;
       gogs = 268;
+      kresd = 270;
 
       # When adding a gid, make sure it doesn't match an existing
       # uid. Users and groups with the same name should have equal
diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix
index 3cb5bb1a351a..a9c84f6db243 100644
--- a/nixos/modules/misc/locate.nix
+++ b/nixos/modules/misc/locate.nix
@@ -4,10 +4,12 @@ with lib;
 
 let
   cfg = config.services.locate;
+  isMLocate = hasPrefix "mlocate" cfg.locate.name;
+  isFindutils = hasPrefix "findutils" cfg.locate.name;
 in {
-  options.services.locate = {
+  options.services.locate = with types; {
     enable = mkOption {
-      type = types.bool;
+      type = bool;
       default = false;
       description = ''
         If enabled, NixOS will periodically update the database of
@@ -16,8 +18,9 @@ in {
     };
 
     locate = mkOption {
-      type = types.package;
+      type = package;
       default = pkgs.findutils;
+      defaultText = "pkgs.findutils";
       example = "pkgs.mlocate";
       description = ''
         The locate implementation to use
@@ -25,7 +28,7 @@ in {
     };
 
     interval = mkOption {
-      type = types.str;
+      type = str;
       default = "02:15";
       example = "hourly";
       description = ''
@@ -38,11 +41,8 @@ in {
       '';
     };
 
-    # This is no longer supported, but we keep it to give a better warning below
-    period = mkOption { visible = false; };
-
     extraFlags = mkOption {
-      type = types.listOf types.str;
+      type = listOf str;
       default = [ ];
       description = ''
         Extra flags to pass to <command>updatedb</command>.
@@ -50,7 +50,7 @@ in {
     };
 
     output = mkOption {
-      type = types.path;
+      type = path;
       default = "/var/cache/locatedb";
       description = ''
         The database file to build.
@@ -58,7 +58,7 @@ in {
     };
 
     localuser = mkOption {
-      type = types.str;
+      type = nullOr str;
       default = "nobody";
       description = ''
         The user to search non-network directories as, using
@@ -66,31 +66,81 @@ in {
       '';
     };
 
-    includeStore = mkOption {
-      type = types.bool;
+    pruneFS = mkOption {
+      type = listOf str;
+      default = ["afs" "anon_inodefs" "auto" "autofs" "bdev" "binfmt" "binfmt_misc" "cgroup" "cifs" "coda" "configfs" "cramfs" "cpuset" "debugfs" "devfs" "devpts" "devtmpfs" "ecryptfs" "eventpollfs" "exofs" "futexfs" "ftpfs" "fuse" "fusectl" "gfs" "gfs2" "hostfs" "hugetlbfs" "inotifyfs" "iso9660" "jffs2" "lustre" "misc" "mqueue" "ncpfs" "nnpfs" "ocfs" "ocfs2" "pipefs" "proc" "ramfs" "rpc_pipefs" "securityfs" "selinuxfs" "sfs" "shfs" "smbfs" "sockfs" "spufs" "nfs" "NFS" "nfs4" "nfsd" "sshfs" "subfs" "supermount" "sysfs" "tmpfs" "ubifs" "udf" "usbfs" "vboxsf" "vperfctrfs" ];
+      description = ''
+        Which filesystem types to exclude from indexing
+      '';
+    };
+
+    prunePaths = mkOption {
+      type = listOf path;
+      default = ["/tmp" "/var/tmp" "/var/cache" "/var/lock" "/var/run" "/var/spool" "/nix/store"];
+      description = ''
+        Which paths to exclude from indexing
+      '';
+    };
+
+    pruneNames = mkOption {
+      type = listOf str;
+      default = [];
+      description = ''
+        Directory components which should exclude paths containing them from indexing
+      '';
+    };
+
+    pruneBindMounts = mkOption {
+      type = bool;
       default = false;
       description = ''
-        Whether to include <filename>/nix/store</filename> in the locate database.
+        Whether not to index bind mounts
       '';
     };
+    
   };
 
-  config = {
-    warnings =
-      let opt = options.services.locate.period; in
-      optional opt.isDefined "The ‘services.locate.period’ option in ${showFiles opt.files} has been removed; please replace it with ‘services.locate.interval’, using the systemd.time(7) calendar event format.";
+  config = mkIf cfg.enable {
+    users.extraGroups = mkIf isMLocate { mlocate = {}; };
+
+    security.setuidOwners = mkIf isMLocate
+      [ { group = "mlocate";
+          owner = "root";
+          permissions = "u+rx,g+x,o+x";
+          setgid = true;
+          setuid = false;
+          program = "locate";
+        }
+      ];
+
+    nixpkgs.config = { locate.dbfile = cfg.output; };
+
+    environment.systemPackages = [ cfg.locate ];
+
+    environment.variables = mkIf (!isMLocate)
+      { LOCATE_PATH = cfg.output;
+      };
 
+    warnings = optional (isMLocate && cfg.localuser != null) "mlocate does not support searching as user other than root"
+            ++ optional (isFindutils && cfg.pruneNames != []) "findutils locate does not support pruning by directory component"
+            ++ optional (isFindutils && cfg.pruneBindMounts) "findutils locate does not support skipping bind mounts";
+  
     systemd.services.update-locatedb =
       { description = "Update Locate Database";
-        path  = [ pkgs.su ];
+        path = mkIf (!isMLocate) [ pkgs.su ];
         script =
           ''
-            mkdir -m 0755 -p $(dirname ${toString cfg.output})
+            install -m ${if isMLocate then "0750" else "0755"} -o root -g ${if isMLocate then "mlocate" else "root"} -d $(dirname ${cfg.output})
             exec ${cfg.locate}/bin/updatedb \
-              --localuser=${cfg.localuser} \
-              ${optionalString (!cfg.includeStore) "--prunepaths='/nix/store'"} \
+              ${optionalString (cfg.localuser != null) ''--localuser=${cfg.localuser}''} \
               --output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags}
           '';
+        environment = {
+          PRUNEFS = concatStringsSep " " cfg.pruneFS;
+          PRUNEPATHS = concatStringsSep " " cfg.prunePaths;
+          PRUNENAMES = concatStringsSep " " cfg.pruneNames;
+          PRUNE_BIND_MOUNTS = if cfg.pruneBindMounts then "yes" else "no";
+        };
         serviceConfig.Nice = 19;
         serviceConfig.IOSchedulingClass = "idle";
         serviceConfig.PrivateTmp = "yes";
@@ -100,7 +150,7 @@ in {
         serviceConfig.ReadWriteDirectories = dirOf cfg.output;
       };
 
-    systemd.timers.update-locatedb = mkIf cfg.enable
+    systemd.timers.update-locatedb =
       { description = "Update timer for locate database";
         partOf      = [ "update-locatedb.service" ];
         wantedBy    = [ "timers.target" ];
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index e99e344b932d..9100f5b27a04 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -212,6 +212,7 @@
   ./services/logging/awstats.nix
   ./services/logging/fluentd.nix
   ./services/logging/graylog.nix
+  ./services/logging/journalbeat.nix
   ./services/logging/klogd.nix
   ./services/logging/logcheck.nix
   ./services/logging/logrotate.nix
@@ -332,6 +333,7 @@
   ./services/monitoring/telegraf.nix
   ./services/monitoring/ups.nix
   ./services/monitoring/uptime.nix
+  ./services/monitoring/vnstat.nix
   ./services/monitoring/zabbix-agent.nix
   ./services/monitoring/zabbix-server.nix
   ./services/network-filesystems/cachefilesd.nix
@@ -370,6 +372,7 @@
   ./services/networking/dhcpd.nix
   ./services/networking/dnschain.nix
   ./services/networking/dnscrypt-proxy.nix
+  ./services/networking/dnscrypt-wrapper.nix
   ./services/networking/dnsmasq.nix
   ./services/networking/ejabberd.nix
   ./services/networking/fan.nix
@@ -396,6 +399,7 @@
   ./services/networking/iodine.nix
   ./services/networking/ircd-hybrid/default.nix
   ./services/networking/kippo.nix
+  ./services/networking/kresd.nix
   ./services/networking/lambdabot.nix
   ./services/networking/libreswan.nix
   ./services/networking/logmein-hamachi.nix
@@ -426,6 +430,7 @@
   ./services/networking/pdnsd.nix
   ./services/networking/polipo.nix
   ./services/networking/powerdns.nix
+  ./services/networking/pdns-recursor.nix
   ./services/networking/pptpd.nix
   ./services/networking/prayer.nix
   ./services/networking/privoxy.nix
diff --git a/nixos/modules/profiles/installation-device.nix b/nixos/modules/profiles/installation-device.nix
index b2973d88b157..a24fa75e01db 100644
--- a/nixos/modules/profiles/installation-device.nix
+++ b/nixos/modules/profiles/installation-device.nix
@@ -45,8 +45,13 @@ with lib;
             "Type `systemctl start display-manager' to\nstart the graphical user interface."}
       '';
 
-    # Allow sshd to be started manually through "start sshd".
-    services.openssh.enable = true;
+    # Allow sshd to be started manually through "systemctl start sshd".
+    services.openssh = {
+      enable = true;
+      # Allow password login to the installation, if the user sets a password via "passwd"
+      # It is safe as root doesn't have a password by default and SSH is disabled by default
+      permitRootLogin = "yes";
+    };
     systemd.services.sshd.wantedBy = mkOverride 50 [];
 
     # Enable wpa_supplicant, but don't start it by default.
@@ -66,9 +71,8 @@ with lib;
     boot.kernel.sysctl."vm.overcommit_memory" = "1";
 
     # To speed up installation a little bit, include the complete
-    # stdenv in the Nix store on the CD.  Archive::Cpio is needed for
-    # the initrd builder.
-    system.extraDependencies = [ pkgs.stdenv pkgs.busybox pkgs.perlPackages.ArchiveCpio ];
+    # stdenv in the Nix store on the CD.
+    system.extraDependencies = with pkgs; [ stdenv stdenvNoCC busybox ];
 
     # Show all debug messages from the kernel but don't log refused packets
     # because we have the firewall enabled. This makes installs from the
diff --git a/nixos/modules/programs/environment.nix b/nixos/modules/programs/environment.nix
index a35b5cc9513e..a1615c920c02 100644
--- a/nixos/modules/programs/environment.nix
+++ b/nixos/modules/programs/environment.nix
@@ -17,8 +17,7 @@ in
   config = {
 
     environment.variables =
-      { LOCATE_PATH = "/var/cache/locatedb";
-        NIXPKGS_CONFIG = "/etc/nix/nixpkgs-config.nix";
+      { NIXPKGS_CONFIG = "/etc/nix/nixpkgs-config.nix";
         PAGER = mkDefault "less -R";
         EDITOR = mkDefault "nano";
       };
diff --git a/nixos/modules/programs/man.nix b/nixos/modules/programs/man.nix
index e59ffd6f936d..5b20a38d8856 100644
--- a/nixos/modules/programs/man.nix
+++ b/nixos/modules/programs/man.nix
@@ -11,6 +11,7 @@ with lib;
       default = true;
       description = ''
         Whether to enable manual pages and the <command>man</command> command.
+        This also includes "man" outputs of all <literal>systemPackages</literal>.
       '';
     };
 
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index ad1ba86980d5..4e7f62fc8f5c 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -18,6 +18,7 @@ with lib;
     (mkRenamedOptionModule [ "services" "elasticsearch" "host" ] [ "services" "elasticsearch" "listenAddress" ])
     (mkRenamedOptionModule [ "services" "graphite" "api" "host" ] [ "services" "graphite" "api" "listenAddress" ])
     (mkRenamedOptionModule [ "services" "graphite" "web" "host" ] [ "services" "graphite" "web" "listenAddress" ])
+    (mkRenamedOptionModule [ "services" "logstash" "address" ] [ "services" "logstash" "listenAddress" ])
     (mkRenamedOptionModule [ "services" "kibana" "host" ] [ "services" "kibana" "listenAddress" ])
     (mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ])
     (mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ])
@@ -167,6 +168,10 @@ with lib;
     # dhcpd
     (mkRenamedOptionModule [ "services" "dhcpd" ] [ "services" "dhcpd4" ])
 
+    # locate
+    (mkRenamedOptionModule [ "services" "locate" "period" ] [ "services" "locate" "interval" ])
+    (mkRemovedOptionModule [ "services" "locate" "includeStore" ] "Use services.locate.prunePaths" )
+
     # Options that are obsolete and have no replacement.
     (mkRemovedOptionModule [ "boot" "initrd" "luks" "enable" ] "")
     (mkRemovedOptionModule [ "programs" "bash" "enable" ] "")
diff --git a/nixos/modules/security/acme.nix b/nixos/modules/security/acme.nix
index 726e54711410..4e7c966a463a 100644
--- a/nixos/modules/security/acme.nix
+++ b/nixos/modules/security/acme.nix
@@ -284,6 +284,8 @@ in
             OnCalendar = cfg.renewInterval;
             Unit = "acme-${cert}.service";
             Persistent = "yes";
+            AccuracySec = "5m";
+            RandomizedDelaySec = "1h";
           };
         })
       );
diff --git a/nixos/modules/services/games/factorio.nix b/nixos/modules/services/games/factorio.nix
index 0369752997a7..e7f070d08773 100644
--- a/nixos/modules/services/games/factorio.nix
+++ b/nixos/modules/services/games/factorio.nix
@@ -14,6 +14,31 @@ let
     read-data=${factorio}/share/factorio/data
     write-data=${stateDir}
   '';
+  serverSettings = {
+    name = cfg.game-name;
+    description = cfg.description;
+    visibility = {
+      public = cfg.public;
+      lan = cfg.lan;
+    };
+    username = cfg.username;
+    password = cfg.password;
+    token = cfg.token;
+    game_password = cfg.game-password;
+    require_user_verification = true;
+    max_upload_in_kilobytes_per_second = 0;
+    minimum_latency_in_ticks = 0;
+    ignore_player_limit_for_returning_players = false;
+    allow_commands = "admins-only";
+    autosave_interval = cfg.autosave-interval;
+    autosave_slots = 5;
+    afk_autokick_interval = 0;
+    auto_pause = true;
+    only_admins_can_pause_the_game = true;
+    autosave_only_on_server = true;
+    admins = [];
+  };
+  serverSettingsFile = pkgs.writeText "server-settings.json" (builtins.toJSON (filterAttrsRecursive (n: v: v != null) serverSettings));
   modDir = pkgs.factorio-mkModDirDrv cfg.mods;
 in
 {
@@ -67,12 +92,68 @@ in
           derivations via nixos-channel. Until then, this is for experts only.
         '';
       };
+      game-name = mkOption {
+        type = types.nullOr types.string;
+        default = "Factorio Game";
+        description = ''
+          Name of the game as it will appear in the game listing.
+        '';
+      };
+      description = mkOption {
+        type = types.nullOr types.string;
+        default = "";
+        description = ''
+          Description of the game that will appear in the listing.
+        '';
+      };
+      public = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Game will be published on the official Factorio matching server.
+        '';
+      };
+      lan = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Game will be broadcast on LAN.
+        '';
+      };
+      username = mkOption {
+        type = types.nullOr types.string;
+        default = null;
+        description = ''
+          Your factorio.com login credentials. Required for games with visibility public.
+        '';
+      };
+      password = mkOption {
+        type = types.nullOr types.string;
+        default = null;
+        description = ''
+          Your factorio.com login credentials. Required for games with visibility public.
+        '';
+      };
+      token = mkOption {
+        type = types.nullOr types.string;
+        default = null;
+        description = ''
+          Authentication token. May be used instead of 'password' above.
+        '';
+      };
+      game-password = mkOption {
+        type = types.nullOr types.string;
+        default = null;
+        description = ''
+          Game password.
+        '';
+      };
       autosave-interval = mkOption {
         type = types.nullOr types.int;
         default = null;
-        example = 2;
+        example = 10;
         description = ''
-          The time, in minutes, between autosaves.
+          Autosave interval in minutes.
         '';
       };
     };
@@ -120,8 +201,8 @@ in
           "--config=${cfg.configFile}"
           "--port=${toString cfg.port}"
           "--start-server=${mkSavePath cfg.saveName}"
+          "--server-settings=${serverSettingsFile}"
           (optionalString (cfg.mods != []) "--mod-directory=${modDir}")
-          (optionalString (cfg.autosave-interval != null) "--autosave-interval ${toString cfg.autosave-interval}")
         ];
       };
     };
diff --git a/nixos/modules/services/logging/journalbeat.nix b/nixos/modules/services/logging/journalbeat.nix
new file mode 100644
index 000000000000..8186a3b02c37
--- /dev/null
+++ b/nixos/modules/services/logging/journalbeat.nix
@@ -0,0 +1,76 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.services.journalbeat;
+
+  journalbeatYml = pkgs.writeText "journalbeat.yml" ''
+    name: ${cfg.name}
+    tags: ${builtins.toJSON cfg.tags}
+
+    journalbeat.cursor_state_file: ${cfg.stateDir}/cursor-state
+
+    ${cfg.extraConfig}
+  '';
+
+in
+{
+  options = {
+
+    services.journalbeat = {
+
+      enable = mkEnableOption "journalbeat";
+
+      name = mkOption {
+        type = types.str;
+        default = "journalbeat";
+        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/journalbeat";
+        description = "The state directory. Journalbeat's own logs and other data are stored here.";
+      };
+
+      extraConfig = mkOption {
+        type = types.lines;
+        default = ''
+          journalbeat:
+            seek_position: cursor
+            cursor_seek_fallback: tail
+            write_cursor_state: true
+            cursor_flush_period: 5s
+            clean_field_names: true
+            convert_to_numbers: false
+            move_metadata_to_field: journal
+            default_type: journal
+        '';
+        description = "Any other configuration options you want to add";
+      };
+
+    };
+  };
+
+  config = mkIf cfg.enable {
+
+    systemd.services.journalbeat = with pkgs; {
+      description = "Journalbeat log shipper";
+      wantedBy = [ "multi-user.target" ];
+      preStart = ''
+        mkdir -p ${cfg.stateDir}/data
+        mkdir -p ${cfg.stateDir}/logs
+      '';
+      serviceConfig = {
+        ExecStart = "${pkgs.journalbeat}/bin/journalbeat -c ${journalbeatYml} -path.data ${cfg.stateDir}/data -path.logs ${cfg.stateDir}/logs";
+      };
+    };
+  };
+}
diff --git a/nixos/modules/services/logging/logstash.nix b/nixos/modules/services/logging/logstash.nix
index 62f6e187ea07..c9477b9e3ab0 100644
--- a/nixos/modules/services/logging/logstash.nix
+++ b/nixos/modules/services/logging/logstash.nix
@@ -63,7 +63,7 @@ in
         description = "Enable the logstash web interface.";
       };
 
-      address = mkOption {
+      listenAddress = mkOption {
         type = types.str;
         default = "0.0.0.0";
         description = "Address on which to start webserver.";
@@ -77,7 +77,7 @@ in
 
       inputConfig = mkOption {
         type = types.lines;
-        default = ''stdin { type => "example" }'';
+        default = ''generator { }'';
         description = "Logstash input configuration.";
         example = ''
           # Read from journal
@@ -90,7 +90,7 @@ in
 
       filterConfig = mkOption {
         type = types.lines;
-        default = ''noop {}'';
+        default = "";
         description = "logstash filter configuration.";
         example = ''
           if [type] == "syslog" {
@@ -108,11 +108,11 @@ in
 
       outputConfig = mkOption {
         type = types.lines;
-        default = ''stdout { debug => true debug_format => "json"}'';
+        default = ''stdout { codec => rubydebug }'';
         description = "Logstash output configuration.";
         example = ''
-          redis { host => "localhost" data_type => "list" key => "logstash" codec => json }
-          elasticsearch { embedded => true }
+          redis { host => ["localhost"] data_type => "list" key => "logstash" codec => json }
+          elasticsearch { }
         '';
       };
 
@@ -147,7 +147,7 @@ in
               ${cfg.outputConfig}
             }
           ''} " +
-          ops cfg.enableWeb "-- web -a ${cfg.address} -p ${cfg.port}";
+          ops cfg.enableWeb "-- web -a ${cfg.listenAddress} -p ${cfg.port}";
       };
     };
   };
diff --git a/nixos/modules/services/misc/apache-kafka.nix b/nixos/modules/services/misc/apache-kafka.nix
index c856d3294c01..cff053396885 100644
--- a/nixos/modules/services/misc/apache-kafka.nix
+++ b/nixos/modules/services/misc/apache-kafka.nix
@@ -38,7 +38,7 @@ in {
 
     brokerId = mkOption {
       description = "Broker ID.";
-      default = 0;
+      default = -1;
       type = types.int;
     };
 
diff --git a/nixos/modules/services/monitoring/vnstat.nix b/nixos/modules/services/monitoring/vnstat.nix
new file mode 100644
index 000000000000..f6be7c7fd34a
--- /dev/null
+++ b/nixos/modules/services/monitoring/vnstat.nix
@@ -0,0 +1,43 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.services.vnstat;
+in {
+  options.services.vnstat = {
+    enable = mkOption {
+      type = types.bool;
+      default = false;
+      description = ''
+        Whether to enable update of network usage statistics via vnstatd.
+      '';
+    };
+  };
+
+  config = mkIf cfg.enable {
+    users.extraUsers.vnstatd = {
+      isSystemUser = true;
+      description = "vnstat daemon user";
+      home = "/var/lib/vnstat";
+      createHome = true;
+    };
+
+    systemd.services.vnstat = {
+      description = "vnStat network traffic monitor";
+      path = [ pkgs.coreutils ];
+      after = [ "network.target" ];
+      wantedBy = [ "multi-user.target" ];
+      unitConfig.documentation = "man:vnstatd(1) man:vnstat(1) man:vnstat.conf(5)";
+      preStart = "chmod 755 /var/lib/vnstat";
+      serviceConfig = {
+        ExecStart = "${pkgs.vnstat}/bin/vnstatd -n";
+        ExecReload = "kill -HUP $MAINPID";
+        ProtectHome = true;
+        PrivateDevices = true;
+        PrivateTmp = true;
+        User = "vnstatd";
+      };
+    };
+  };
+}
diff --git a/nixos/modules/services/network-filesystems/tahoe.nix b/nixos/modules/services/network-filesystems/tahoe.nix
index ab9eac3829fb..f63f641d00be 100644
--- a/nixos/modules/services/network-filesystems/tahoe.nix
+++ b/nixos/modules/services/network-filesystems/tahoe.nix
@@ -343,7 +343,7 @@ in
             preStart = ''
               if [ \! -d ${nodedir} ]; then
                 mkdir -p /var/db/tahoe-lafs
-                tahoe create-node ${nodedir}
+                tahoe create-node --hostname=localhost ${nodedir}
               fi
 
               # Tahoe has created a predefined tahoe.cfg which we must now
diff --git a/nixos/modules/services/networking/dnscrypt-wrapper.nix b/nixos/modules/services/networking/dnscrypt-wrapper.nix
new file mode 100644
index 000000000000..85fac660d52e
--- /dev/null
+++ b/nixos/modules/services/networking/dnscrypt-wrapper.nix
@@ -0,0 +1,187 @@
+{ config, lib, pkgs, ... }:
+with lib;
+
+let
+  cfg     = config.services.dnscrypt-wrapper;
+  dataDir = "/var/lib/dnscrypt-wrapper";
+
+  daemonArgs = with cfg; [
+    "--listen-address=${address}:${toString port}"
+    "--resolver-address=${upstream.address}:${toString upstream.port}"
+    "--provider-name=${providerName}"
+    "--provider-publickey-file=public.key"
+    "--provider-secretkey-file=secret.key"
+    "--provider-cert-file=${providerName}.crt"
+    "--crypt-secretkey-file=${providerName}.key"
+  ];
+
+  genKeys = ''
+    # generates time-limited keypairs
+    keyGen() {
+      dnscrypt-wrapper --gen-crypt-keypair \
+        --crypt-secretkey-file=${cfg.providerName}.key
+
+      dnscrypt-wrapper --gen-cert-file \
+        --crypt-secretkey-file=${cfg.providerName}.key \
+        --provider-cert-file=${cfg.providerName}.crt \
+        --provider-publickey-file=public.key \
+        --provider-secretkey-file=secret.key \
+        --cert-file-expire-days=${toString cfg.keys.expiration}
+    }
+
+    cd ${dataDir}
+
+    # generate provider keypair (first run only)
+    if [ ! -f public.key ] || [ ! -f secret.key ]; then
+      dnscrypt-wrapper --gen-provider-keypair
+    fi
+
+    # generate new keys for rotation
+    if [ ! -f ${cfg.providerName}.key ] || [ ! -f ${cfg.providerName}.crt ]; then
+      keyGen
+    fi
+  '';
+
+  rotateKeys = ''
+    # check if keys are not expired
+    keyValid() {
+      fingerprint=$(dnscrypt-wrapper --show-provider-publickey-fingerprint | awk '{print $(NF)}')
+      dnscrypt-proxy --test=${toString (cfg.keys.checkInterval + 1)} \
+        --resolver-address=127.0.0.1:${toString cfg.port} \
+        --provider-name=${cfg.providerName} \
+        --provider-key=$fingerprint
+    }
+
+    cd ${dataDir}
+
+    # archive old keys and restart the service
+    if ! keyValid; then
+      mkdir -p oldkeys
+      mv ${cfg.providerName}.key oldkeys/${cfg.providerName}-$(date +%F-%T).key
+      mv ${cfg.providerName}.crt oldkeys/${cfg.providerName}-$(date +%F-%T).crt
+      systemctl restart dnscrypt-wrapper
+    fi
+  '';
+
+in {
+
+
+  ###### interface
+
+  options.services.dnscrypt-wrapper = {
+    enable = mkEnableOption "DNSCrypt wrapper";
+
+    address = mkOption {
+      type = types.str;
+      default = "127.0.0.1";
+      description = ''
+        The DNSCrypt wrapper will bind to this IP address.
+      '';
+    };
+
+    port = mkOption {
+      type = types.int;
+      default = 5353;
+      description = ''
+        The DNSCrypt wrapper will listen for DNS queries on this port.
+      '';
+    };
+
+    providerName = mkOption {
+      type = types.str;
+      default = "2.dnscrypt-cert.${config.networking.hostName}";
+      example = "2.dnscrypt-cert.myresolver";
+      description = ''
+        The name that will be given to this DNSCrypt resolver.
+        Note: the resolver name must start with <literal>2.dnscrypt-cert.</literal>.
+      '';
+    };
+
+    upstream.address = mkOption {
+      type = types.str;
+      default = "127.0.0.1";
+      description = ''
+        The IP address of the upstream DNS server DNSCrypt will "wrap".
+      '';
+    };
+
+    upstream.port = mkOption {
+      type = types.int;
+      default = 53;
+      description = ''
+        The port of the upstream DNS server DNSCrypt will "wrap".
+      '';
+    };
+
+    keys.expiration = mkOption {
+      type = types.int;
+      default = 30;
+      description = ''
+        The duration (in days) of the time-limited secret key.
+        This will be automatically rotated before expiration.
+      '';
+    };
+
+    keys.checkInterval = mkOption {
+      type = types.int;
+      default = 1440;
+      description = ''
+        The time interval (in minutes) between key expiration checks.
+      '';
+    };
+
+  };
+
+
+  ###### implementation
+
+  config = mkIf cfg.enable {
+
+    users.users.dnscrypt-wrapper = {
+      description = "dnscrypt-wrapper daemon user";
+      home = "${dataDir}";
+      createHome = true;
+    };
+    users.groups.dnscrypt-wrapper = { };
+
+
+    systemd.services.dnscrypt-wrapper = {
+      description = "dnscrypt-wrapper daemon";
+      after    = [ "network.target" ];
+      wantedBy = [ "multi-user.target" ];
+      path     = [ pkgs.dnscrypt-wrapper ];
+
+      serviceConfig = {
+        User = "dnscrypt-wrapper";
+        WorkingDirectory = dataDir;
+        Restart   = "on-failure";
+        ExecStart = "${pkgs.dnscrypt-wrapper}/bin/dnscrypt-wrapper ${toString daemonArgs}";
+      };
+
+      preStart = genKeys;
+    };
+
+
+    systemd.services.dnscrypt-wrapper-rotate = {
+      after    = [ "network.target" ];
+      requires = [ "dnscrypt-wrapper.service" ];
+      description = "Rotates DNSCrypt wrapper keys if soon to expire";
+
+      path   = with pkgs; [ dnscrypt-wrapper dnscrypt-proxy gawk ];
+      script = rotateKeys;
+    };
+
+
+    systemd.timers.dnscrypt-wrapper-rotate = {
+      description = "Periodically check DNSCrypt wrapper keys for expiration";
+      wantedBy = [ "multi-user.target" ];
+
+      timerConfig = {
+        Unit = "dnscrypt-wrapper-rotate.service";
+        OnBootSec = "1min";
+        OnUnitActiveSec = cfg.keys.checkInterval * 60;
+      };
+    };
+
+  };
+}
diff --git a/nixos/modules/services/networking/firewall.nix b/nixos/modules/services/networking/firewall.nix
index c251b52e03fd..34b731ad35c9 100644
--- a/nixos/modules/services/networking/firewall.nix
+++ b/nixos/modules/services/networking/firewall.nix
@@ -41,7 +41,6 @@ let
   kernelPackages = config.boot.kernelPackages;
 
   kernelHasRPFilter = kernelPackages.kernel.features.netfilterRPFilter or false;
-  kernelCanDisableHelpers = kernelPackages.kernel.features.canDisableNetfilterConntrackHelpers or false;
 
   helpers =
     ''
@@ -426,7 +425,7 @@ in
 
     networking.firewall.connectionTrackingModules = mkOption {
       type = types.listOf types.str;
-      default = [ "ftp" ];
+      default = [ ];
       example = [ "ftp" "irc" "sane" "sip" "tftp" "amanda" "h323" "netbios_sn" "pptp" "snmp" ];
       description =
         ''
@@ -435,9 +434,11 @@ in
 
           As helpers can pose as a security risk, it is advised to
           set this to an empty list and disable the setting
-          networking.firewall.autoLoadConntrackHelpers
+          networking.firewall.autoLoadConntrackHelpers unless you
+          know what you are doing. Connection tracking is disabled
+          by default.
 
-          Loading of helpers is recommended to be done through the new
+          Loading of helpers is recommended to be done through the
           CT target.  More info:
           https://home.regit.org/netfilter-en/secure-use-of-helpers/
         '';
@@ -445,7 +446,7 @@ in
 
     networking.firewall.autoLoadConntrackHelpers = mkOption {
       type = types.bool;
-      default = true;
+      default = false;
       description =
         ''
           Whether to auto-load connection-tracking helpers.
@@ -505,15 +506,14 @@ in
 
     environment.systemPackages = [ pkgs.iptables ] ++ cfg.extraPackages;
 
-    boot.kernelModules = map (x: "nf_conntrack_${x}") cfg.connectionTrackingModules;
-    boot.extraModprobeConfig = optionalString (!cfg.autoLoadConntrackHelpers) ''
-      options nf_conntrack nf_conntrack_helper=0
+    boot.kernelModules = (optional cfg.autoLoadConntrackHelpers "nf_conntrack")
+      ++ map (x: "nf_conntrack_${x}") cfg.connectionTrackingModules;
+    boot.extraModprobeConfig = optionalString cfg.autoLoadConntrackHelpers ''
+      options nf_conntrack nf_conntrack_helper=1
     '';
 
     assertions = [ { assertion = (cfg.checkReversePath != false) || kernelHasRPFilter;
                      message = "This kernel does not support rpfilter"; }
-                   { assertion = cfg.autoLoadConntrackHelpers || kernelCanDisableHelpers;
-                     message = "This kernel does not support disabling conntrack helpers"; }
                  ];
 
     systemd.services.firewall = {
diff --git a/nixos/modules/services/networking/flannel.nix b/nixos/modules/services/networking/flannel.nix
index ca47a18bc1f6..b93e28e34efd 100644
--- a/nixos/modules/services/networking/flannel.nix
+++ b/nixos/modules/services/networking/flannel.nix
@@ -149,6 +149,6 @@ in {
       serviceConfig.ExecStart = "${cfg.package}/bin/flannel";
     };
 
-    services.etcd.enable = mkDefault cfg.etcd.endpoints == ["http://127.0.0.1:2379"];
+    services.etcd.enable = mkDefault (cfg.etcd.endpoints == ["http://127.0.0.1:2379"]);
   };
 }
diff --git a/nixos/modules/services/networking/kresd.nix b/nixos/modules/services/networking/kresd.nix
new file mode 100644
index 000000000000..18e2ab9aebf1
--- /dev/null
+++ b/nixos/modules/services/networking/kresd.nix
@@ -0,0 +1,119 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+  cfg = config.services.kresd;
+  package = pkgs.knot-resolver;
+
+  configFile = pkgs.writeText "kresd.conf" cfg.extraConfig;
+in
+
+{
+  meta.maintainers = [ maintainers.vcunat /* upstream developer */ ];
+
+  ###### interface
+  options.services.kresd = {
+    enable = mkOption {
+      type = types.bool;
+      default = false;
+      description = ''
+        Whether to enable knot-resolver domain name server.
+        DNSSEC validation is turned on by default.
+        You can run <literal>sudo nc -U /run/kresd/control</literal>
+        and give commands interactively to kresd.
+      '';
+    };
+    extraConfig = mkOption {
+      type = types.lines;
+      default = "";
+      description = ''
+        Extra lines to be added verbatim to the generated configuration file.
+      '';
+    };
+    cacheDir = mkOption {
+      type = types.path;
+      default = "/var/cache/kresd";
+      description = ''
+        Directory for caches.  They are intended to survive reboots.
+      '';
+    };
+    interfaces = mkOption {
+      type = with types; listOf str;
+      default = [ "::1" "127.0.0.1" ];
+      description = ''
+        What addresses the server should listen on.
+      '';
+    };
+    # TODO: perhaps options for more common stuff like cache size or forwarding
+  };
+
+  ###### implementation
+  config = mkIf cfg.enable {
+    environment.etc."kresd.conf".source = configFile; # not required
+
+    users.extraUsers = singleton
+      { name = "kresd";
+        uid = config.ids.uids.kresd;
+        group = "kresd";
+        description = "Knot-resolver daemon user";
+      };
+    users.extraGroups = singleton
+      { name = "kresd";
+        gid = config.ids.gids.kresd;
+      };
+
+    systemd.sockets.kresd = rec {
+      wantedBy = [ "sockets.target" ];
+      before = wantedBy;
+      listenStreams = map
+        # Syntax depends on being IPv6 or IPv4.
+        (iface: if elem ":" (stringToCharacters iface) then "[${iface}]:53" else "${iface}:53")
+        cfg.interfaces;
+      socketConfig.ListenDatagram = listenStreams;
+    };
+
+    systemd.sockets.kresd-control = rec {
+      wantedBy = [ "sockets.target" ];
+      before = wantedBy;
+      partOf = [ "kresd.socket" ];
+      listenStreams = [ "/run/kresd/control" ];
+      socketConfig = {
+        FileDescriptorName = "control";
+        Service = "kresd.service";
+        SocketMode = "0660"; # only root user/group may connect
+      };
+    };
+
+    # Create the cacheDir; tmpfiles don't work on nixos-rebuild switch.
+    systemd.services.kresd-cachedir = {
+      serviceConfig.Type = "oneshot";
+      script = ''
+        if [ ! -d '${cfg.cacheDir}' ]; then
+          mkdir -p '${cfg.cacheDir}'
+          chown kresd:kresd '${cfg.cacheDir}'
+        fi
+      '';
+    };
+
+    systemd.services.kresd = {
+      description = "Knot-resolver daemon";
+
+      serviceConfig = {
+        User = "kresd";
+        Type = "notify";
+        WorkingDirectory = cfg.cacheDir;
+      };
+
+      script = ''
+        exec '${package}/bin/kresd' --config '${configFile}' \
+          -k '${cfg.cacheDir}/root.key'
+      '';
+
+      after = [ "kresd-cachedir.service" ];
+      requires = [ "kresd.socket" "kresd-cachedir.service" ];
+      wantedBy = [ "sockets.target" ];
+    };
+  };
+}
diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix
index 8f353979d3fc..c11d4434c206 100644
--- a/nixos/modules/services/networking/networkmanager.nix
+++ b/nixos/modules/services/networking/networkmanager.nix
@@ -174,7 +174,7 @@ in {
 
     assertions = [{
       assertion = config.networking.wireless.enable == false;
-      message = "You can not use networking.networkmanager with services.networking.wireless";
+      message = "You can not use networking.networkmanager with networking.wireless";
     }];
 
     boot.kernelModules = [ "ppp_mppe" ]; # Needed for most (all?) PPTP VPN connections.
@@ -239,7 +239,8 @@ in {
     # Turn off NixOS' network management
     networking = {
       useDHCP = false;
-      wireless.enable = false;
+      # use mkDefault to trigger the assertion about the conflict above
+      wireless.enable = lib.mkDefault false;
     };
 
     powerManagement.resumeCommands = ''
diff --git a/nixos/modules/services/networking/pdns-recursor.nix b/nixos/modules/services/networking/pdns-recursor.nix
new file mode 100644
index 000000000000..26be72d2a61e
--- /dev/null
+++ b/nixos/modules/services/networking/pdns-recursor.nix
@@ -0,0 +1,168 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  dataDir  = "/var/lib/pdns-recursor";
+  username = "pdns-recursor";
+
+  cfg   = config.services.pdns-recursor;
+  zones = mapAttrsToList (zone: uri: "${zone}.=${uri}") cfg.forwardZones;
+
+  configFile = pkgs.writeText "recursor.conf" ''
+    local-address=${cfg.dns.address}
+    local-port=${toString cfg.dns.port}
+    allow-from=${concatStringsSep "," cfg.dns.allowFrom}
+
+    webserver-address=${cfg.api.address}
+    webserver-port=${toString cfg.api.port}
+    webserver-allow-from=${concatStringsSep "," cfg.api.allowFrom}
+
+    forward-zones=${concatStringsSep "," zones}
+    export-etc-hosts=${if cfg.exportHosts then "yes" else "no"}
+    dnssec=${cfg.dnssecValidation}
+    serve-rfc1918=${if cfg.serveRFC1918 then "yes" else "no"}
+
+    ${cfg.extraConfig}
+  '';
+
+in {
+  options.services.pdns-recursor = {
+    enable = mkEnableOption "PowerDNS Recursor, a recursive DNS server";
+
+    dns.address = mkOption {
+      type = types.str;
+      default = "0.0.0.0";
+      description = ''
+        IP address Recursor DNS server will bind to.
+      '';
+    };
+
+    dns.port = mkOption {
+      type = types.int;
+      default = 53;
+      description = ''
+        Port number Recursor DNS server will bind to.
+      '';
+    };
+
+    dns.allowFrom = mkOption {
+      type = types.listOf types.str;
+      default = [ "10.0.0.0/8" "172.16.0.0/12" "192.168.0.0/16" ];
+      example = [ "0.0.0.0/0" ];
+      description = ''
+        IP address ranges of clients allowed to make DNS queries.
+      '';
+    };
+
+    api.address = mkOption {
+      type = types.str;
+      default = "0.0.0.0";
+      description = ''
+        IP address Recursor REST API server will bind to.
+      '';
+    };
+
+    api.port = mkOption {
+      type = types.int;
+      default = 8082;
+      description = ''
+        Port number Recursor REST API server will bind to.
+      '';
+    };
+
+    api.allowFrom = mkOption {
+      type = types.listOf types.str;
+      default = [ "0.0.0.0/0" ];
+      description = ''
+        IP address ranges of clients allowed to make API requests.
+      '';
+    };
+
+    exportHosts = mkOption {
+      type = types.bool;
+      default = false;
+      description = ''
+       Whether to export names and IP addresses defined in /etc/hosts.
+      '';
+    };
+
+    forwardZones = mkOption {
+      type = types.attrs;
+      example = { eth = "127.0.0.1:5353"; };
+      default = {};
+      description = ''
+        DNS zones to be forwarded to other servers.
+      '';
+    };
+
+    dnssecValidation = mkOption {
+      type = types.enum ["off" "process-no-validate" "process" "log-fail" "validate"];
+      default = "validate";
+      description = ''
+        Controls the level of DNSSEC processing done by the PowerDNS Recursor.
+        See https://doc.powerdns.com/md/recursor/dnssec/ for a detailed explanation.
+      '';
+    };
+
+    serveRFC1918 = mkOption {
+      type = types.bool;
+      default = true;
+      description = ''
+        Whether to directly resolve the RFC1918 reverse-mapping domains:
+        <literal>10.in-addr.arpa</literal>,
+        <literal>168.192.in-addr.arpa</literal>,
+        <literal>16-31.172.in-addr.arpa</literal>
+        This saves load on the AS112 servers.
+      '';
+    };
+
+    extraConfig = mkOption {
+      type = types.lines;
+      default = "";
+      description = ''
+        Extra options to be appended to the configuration file.
+      '';
+    };
+  };
+
+  config = mkIf cfg.enable {
+
+    users.extraUsers."${username}" = {
+      home = dataDir;
+      createHome = true;
+      uid = config.ids.uids.pdns-recursor;
+      description = "PowerDNS Recursor daemon user";
+    };
+
+    systemd.services.pdns-recursor = {
+      unitConfig.Documentation = "man:pdns_recursor(1) man:rec_control(1)";
+      description = "PowerDNS recursive server";
+      wantedBy = [ "multi-user.target" ];
+      after    = [ "network.target" ];
+
+      serviceConfig = {
+        User = username;
+        Restart    ="on-failure";
+        RestartSec = "5";
+        PrivateTmp = true;
+        PrivateDevices = true;
+        AmbientCapabilities = "cap_net_bind_service";
+        ExecStart = ''${pkgs.pdns-recursor}/bin/pdns_recursor \
+          --config-dir=${dataDir} \
+          --socket-dir=${dataDir} \
+          --disable-syslog
+        '';
+      };
+
+      preStart = ''
+        # Link configuration file into recursor home directory
+        configPath=${dataDir}/recursor.conf
+        if [ "$(realpath $configPath)" != "${configFile}" ]; then
+          rm -f $configPath
+          ln -s ${configFile} $configPath
+        fi
+      '';
+    };
+  };
+}
diff --git a/nixos/modules/services/networking/smokeping.nix b/nixos/modules/services/networking/smokeping.nix
index 04312c39062f..6648ada0c0de 100644
--- a/nixos/modules/services/networking/smokeping.nix
+++ b/nixos/modules/services/networking/smokeping.nix
@@ -273,7 +273,7 @@ in
         message = "services.smokeping: sendmail and Mailhost cannot both be enabled.";
       }
     ];
-    security.setuidPrograms = [ "fping" ];
+    security.setuidPrograms = [ "fping" "fping6" ];
     environment.systemPackages = [ pkgs.fping ];
     users.extraUsers = singleton {
       name = cfg.user;
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index 68a672c42c90..c9eacdd85dcd 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -5,7 +5,11 @@ with lib;
 let
   cfg = config.services.nginx;
   virtualHosts = mapAttrs (vhostName: vhostConfig:
-    vhostConfig // (optionalAttrs vhostConfig.enableACME {
+    vhostConfig // {
+      serverName = if vhostConfig.serverName != null
+        then vhostConfig.serverName
+        else vhostName;
+    } // (optionalAttrs vhostConfig.enableACME {
       sslCertificate = "/var/lib/acme/${vhostName}/fullchain.pem";
       sslCertificateKey = "/var/lib/acme/${vhostName}/key.pem";
     })
@@ -112,8 +116,9 @@ let
     ${cfg.appendConfig}
   '';
 
-  vhosts = concatStringsSep "\n" (mapAttrsToList (serverName: vhost:
+  vhosts = concatStringsSep "\n" (mapAttrsToList (vhostName: vhost:
       let
+        serverName = vhost.serverName;
         ssl = vhost.enableSSL || vhost.forceSSL;
         port = if vhost.port != null then vhost.port else (if ssl then 443 else 80);
         listenString = toString port + optionalString ssl " ssl http2"
@@ -161,7 +166,7 @@ let
             ssl_certificate_key ${vhost.sslCertificateKey};
           ''}
 
-          ${optionalString (vhost.basicAuth != {}) (mkBasicAuth serverName vhost.basicAuth)}
+          ${optionalString (vhost.basicAuth != {}) (mkBasicAuth vhostName vhost.basicAuth)}
 
           ${mkLocations vhost.locations}
 
@@ -178,8 +183,8 @@ let
       ${config.extraConfig}
     }
   '') locations);
-  mkBasicAuth = serverName: authDef: let
-    htpasswdFile = pkgs.writeText "${serverName}.htpasswd" (
+  mkBasicAuth = vhostName: authDef: let
+    htpasswdFile = pkgs.writeText "${vhostName}.htpasswd" (
       concatStringsSep "\n" (mapAttrsToList (user: password: ''
         ${user}:{PLAIN}${password}
       '') authDef)
@@ -393,17 +398,20 @@ in
     };
 
     security.acme.certs = filterAttrs (n: v: v != {}) (
-      mapAttrs (vhostName: vhostConfig:
-        optionalAttrs vhostConfig.enableACME {
-          user = cfg.user;
-          group = cfg.group;
-          webroot = vhostConfig.acmeRoot;
-          extraDomains = genAttrs vhostConfig.serverAliases (alias: null);
-          postRun = ''
-            systemctl reload nginx
-          '';
-        }
-      ) virtualHosts
+      let
+        vhostsConfigs = mapAttrsToList (vhostName: vhostConfig: vhostConfig) virtualHosts;
+        acmeEnabledVhosts = filter (vhostConfig: vhostConfig.enableACME) vhostsConfigs;
+        acmePairs = map (vhostConfig: { name = vhostConfig.serverName; value = {
+            user = cfg.user;
+            group = cfg.group;
+            webroot = vhostConfig.acmeRoot;
+            extraDomains = genAttrs vhostConfig.serverAliases (alias: null);
+            postRun = ''
+              systemctl reload nginx
+            '';
+          }; }) acmeEnabledVhosts;
+      in
+        listToAttrs acmePairs
     );
 
     users.extraUsers = optionalAttrs (cfg.user == "nginx") (singleton
diff --git a/nixos/modules/services/web-servers/nginx/vhost-options.nix b/nixos/modules/services/web-servers/nginx/vhost-options.nix
index dcebbc9229fc..c0ea645b3dfe 100644
--- a/nixos/modules/services/web-servers/nginx/vhost-options.nix
+++ b/nixos/modules/services/web-servers/nginx/vhost-options.nix
@@ -8,6 +8,15 @@
 with lib;
 {
   options = {
+    serverName = mkOption {
+      type = types.nullOr types.str;
+      default = null;
+      description = ''
+        Name of this virtual host. Defaults to attribute name in virtualHosts.
+      '';
+      example = "example.org";
+    };
+
     serverAliases = mkOption {
       type = types.listOf types.str;
       default = [];
diff --git a/nixos/modules/services/x11/desktop-managers/kde5.nix b/nixos/modules/services/x11/desktop-managers/kde5.nix
index ee4ec0fc819f..8f081a1e9d2a 100644
--- a/nixos/modules/services/x11/desktop-managers/kde5.nix
+++ b/nixos/modules/services/x11/desktop-managers/kde5.nix
@@ -249,6 +249,11 @@ in
 
       security.pam.services.kde = { allowNullPassword = true; };
 
+      # use kimpanel as the default IBus panel
+      i18n.inputMethod.ibus.panel =
+        lib.mkDefault
+        "${pkgs.kde5.plasma-desktop}/lib/libexec/kimpanel-ibus-panel";
+
     })
   ];
 
diff --git a/nixos/release.nix b/nixos/release.nix
index dfa9b67654fb..2d78a4db9736 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -273,6 +273,7 @@ in rec {
   tests.mysql = callTest tests/mysql.nix {};
   tests.mysqlReplication = callTest tests/mysql-replication.nix {};
   tests.nat.firewall = callTest tests/nat.nix { withFirewall = true; };
+  tests.nat.firewall-conntrack = callTest tests/nat.nix { withFirewall = true; withConntrackHelpers = true; };
   tests.nat.standalone = callTest tests/nat.nix { withFirewall = false; };
   tests.networking.networkd = callSubTests tests/networking.nix { networkd = true; };
   tests.networking.scripted = callSubTests tests/networking.nix { networkd = false; };
diff --git a/nixos/tests/bittorrent.nix b/nixos/tests/bittorrent.nix
index 5aded554f4e8..3a718a798315 100644
--- a/nixos/tests/bittorrent.nix
+++ b/nixos/tests/bittorrent.nix
@@ -11,7 +11,7 @@ import ./make-test.nix ({ pkgs, ... }:
 let
 
   # Some random file to serve.
-  file = pkgs.nixUnstable.src;
+  file = pkgs.hello.src;
 
   miniupnpdConf = nodes: pkgs.writeText "miniupnpd.conf"
     ''
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix
index 1df2c651f9bc..35dd00fe630f 100644
--- a/nixos/tests/installer.nix
+++ b/nixos/tests/installer.nix
@@ -115,8 +115,8 @@ let
 
       # Did the swap device get activated?
       # uncomment once https://bugs.freedesktop.org/show_bug.cgi?id=86930 is resolved
-      #$machine->waitForUnit("swap.target");
-      $machine->waitUntilSucceeds("cat /proc/swaps | grep -q /dev");
+      $machine->waitForUnit("swap.target");
+      $machine->succeed("cat /proc/swaps | grep -q /dev");
 
       # Check whether the channel works.
       $machine->succeed("nix-env -iA nixos.procps >&2");
diff --git a/nixos/tests/nat.nix b/nixos/tests/nat.nix
index 4fbf64462682..74e20bff8d81 100644
--- a/nixos/tests/nat.nix
+++ b/nixos/tests/nat.nix
@@ -3,34 +3,47 @@
 # client on the inside network, a server on the outside network, and a
 # router connected to both that performs Network Address Translation
 # for the client.
-import ./make-test.nix ({ pkgs, withFirewall, ... }:
+import ./make-test.nix ({ pkgs, lib, withFirewall, withConntrackHelpers ? false, ... }:
   let
     unit = if withFirewall then "firewall" else "nat";
   in
   {
-    name = "nat${if withFirewall then "WithFirewall" else "Standalone"}";
-  meta = with pkgs.stdenv.lib.maintainers; {
+    name = "nat" + (if withFirewall then "WithFirewall" else "Standalone")
+                 + (lib.optionalString withConntrackHelpers "withConntrackHelpers");
+    meta = with pkgs.stdenv.lib.maintainers; {
       maintainers = [ eelco chaoflow rob wkennington ];
     };
 
     nodes =
       { client =
           { config, pkgs, nodes, ... }:
-          { virtualisation.vlans = [ 1 ];
-            networking.firewall.allowPing = true;
-            networking.defaultGateway =
-              (pkgs.lib.head nodes.router.config.networking.interfaces.eth2.ip4).address;
-          };
+          lib.mkMerge [
+            { virtualisation.vlans = [ 1 ];
+              networking.firewall.allowPing = true;
+              networking.defaultGateway =
+                (pkgs.lib.head nodes.router.config.networking.interfaces.eth2.ip4).address;
+            }
+            (lib.optionalAttrs withConntrackHelpers {
+              networking.firewall.connectionTrackingModules = [ "ftp" ];
+              networking.firewall.autoLoadConntrackHelpers = true;
+            })
+          ];
 
         router =
           { config, pkgs, ... }:
-          { virtualisation.vlans = [ 2 1 ];
-            networking.firewall.enable = withFirewall;
-            networking.firewall.allowPing = true;
-            networking.nat.enable = true;
-            networking.nat.internalIPs = [ "192.168.1.0/24" ];
-            networking.nat.externalInterface = "eth1";
-          };
+          lib.mkMerge [
+            { virtualisation.vlans = [ 2 1 ];
+              networking.firewall.enable = withFirewall;
+              networking.firewall.allowPing = true;
+              networking.nat.enable = true;
+              networking.nat.internalIPs = [ "192.168.1.0/24" ];
+              networking.nat.externalInterface = "eth1";
+            }
+            (lib.optionalAttrs withConntrackHelpers {
+              networking.firewall.connectionTrackingModules = [ "ftp" ];
+              networking.firewall.autoLoadConntrackHelpers = true;
+            })
+          ];
 
         server =
           { config, pkgs, ... }:
@@ -66,7 +79,8 @@ import ./make-test.nix ({ pkgs, withFirewall, ... }:
         $client->succeed("curl -v ftp://server/foo.txt >&2");
 
         # Test whether active FTP works.
-        $client->succeed("curl -v -P - ftp://server/foo.txt >&2");
+        $client->${if withConntrackHelpers then "succeed" else "fail"}(
+          "curl -v -P - ftp://server/foo.txt >&2");
 
         # Test ICMP.
         $client->succeed("ping -c 1 router >&2");
diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix
index dd3a0b4a1c6d..0546f9a0ad2e 100644
--- a/pkgs/applications/audio/quodlibet/default.nix
+++ b/pkgs/applications/audio/quodlibet/default.nix
@@ -12,7 +12,7 @@ let
   inherit (python2Packages) buildPythonApplication python mutagen pygtk pygobject2 dbus-python;
 in buildPythonApplication {
   # call the package quodlibet and just quodlibet
-  name = "quodlibet${stdenv.lib.optionalString withGstPlugins "-with-gst-plugins"}-${version}";
+  name = "quodlibet${stdenv.lib.optionalString (!withGstPlugins) "-without-gst-plugins"}-${version}";
 
   # XXX, tests fail
   doCheck = false;
diff --git a/pkgs/applications/editors/atom/default.nix b/pkgs/applications/editors/atom/default.nix
index 8a0a5d0e0b2f..3acb64559fdc 100644
--- a/pkgs/applications/editors/atom/default.nix
+++ b/pkgs/applications/editors/atom/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "atom-${version}";
-  version = "1.13.0";
+  version = "1.13.1";
 
   src = fetchurl {
     url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
-    sha256 = "17k4v5hibaq4zi86y1sjx09hqng4sm3lr024v2mjnhj65m2nhjb8";
+    sha256 = "0nkd0nrnnmln5fjs1c97dligzqp744j4y6lqanfbs9vrxms6mnq3";
     name = "${name}.deb";
   };
 
diff --git a/pkgs/applications/editors/emacs-modes/melpa-generated.nix b/pkgs/applications/editors/emacs-modes/melpa-generated.nix
index 4920dfa3f534..598143ab15c0 100644
--- a/pkgs/applications/editors/emacs-modes/melpa-generated.nix
+++ b/pkgs/applications/editors/emacs-modes/melpa-generated.nix
@@ -85,12 +85,12 @@
     aa-edit-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, navi2ch }:
     melpaBuild {
         pname = "aa-edit-mode";
-        version = "20160227.2217";
+        version = "20170118.1920";
         src = fetchFromGitHub {
           owner = "zonuexe";
           repo = "aa-edit-mode";
-          rev = "573cbd75fc8f866088bf4780d9d7132c0689cef5";
-          sha256 = "0d7q0fhcw4cvy9140hwxp8zdh0g37zhfsq6kmsdngxdx7lw3wryi";
+          rev = "1dd801225b7ad3c23ad09698f5e77f0df7012a65";
+          sha256 = "17kxpyfprdyj96c4ivv8bxwyls69cgh2r3gwrgj6bwinbiszh9rr";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/20d00f782f2db87264c7fb1aac7455e44b8b24e7/recipes/aa-edit-mode";
@@ -737,8 +737,8 @@
         src = fetchFromGitHub {
           owner = "xcwen";
           repo = "ac-php";
-          rev = "cb15be9d7a7c6aa2aa20188069b07521bfe3cb5f";
-          sha256 = "02fvdkz7a3ql4r1vap2yl3m3cb29f9psk4qy4qp1kqrxbcmcrafm";
+          rev = "a347cda40cfd8924e86fdb597d8f2b5129697645";
+          sha256 = "02njmfl7hmdpn1wxx50vfvai5w9gkmmajydccfz4r937knr0gibq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ac283f1b65c3ba6278e9d3236e5a19734e42b123/recipes/ac-php";
@@ -754,12 +754,12 @@
     ac-php-core = callPackage ({ dash, emacs, f, fetchFromGitHub, fetchurl, lib, melpaBuild, php-mode, popup, s, xcscope }:
     melpaBuild {
         pname = "ac-php-core";
-        version = "20170110.2036";
+        version = "20170124.1452";
         src = fetchFromGitHub {
           owner = "xcwen";
           repo = "ac-php";
-          rev = "cb15be9d7a7c6aa2aa20188069b07521bfe3cb5f";
-          sha256 = "02fvdkz7a3ql4r1vap2yl3m3cb29f9psk4qy4qp1kqrxbcmcrafm";
+          rev = "a347cda40cfd8924e86fdb597d8f2b5129697645";
+          sha256 = "02njmfl7hmdpn1wxx50vfvai5w9gkmmajydccfz4r937knr0gibq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ac283f1b65c3ba6278e9d3236e5a19734e42b123/recipes/ac-php-core";
@@ -856,22 +856,22 @@
           license = lib.licenses.free;
         };
       }) {};
-    ace-flyspell = callPackage ({ ace-jump-mode, fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    ace-flyspell = callPackage ({ avy, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "ace-flyspell";
-        version = "20150523.1115";
+        version = "20170124.1245";
         src = fetchFromGitHub {
           owner = "cute-jumper";
           repo = "ace-flyspell";
-          rev = "76c255d91c86b57a07cc7660450e37107d73505f";
-          sha256 = "1msj0dbzfan0jax5wh5rmv4l7cp5zhrp5wy5k1n9s7xdgz2dprzj";
+          rev = "044d38fb8eb390ef1f51cf92cfe5c4ffd103044c";
+          sha256 = "0yy7g2903v78a8pavhxi8c7vqbmifn2sjk84zhw5aygihp3d6vf0";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/1ea85eca9cf2df3f8c06709dfb44b339b8bdbc6c/recipes/ace-flyspell";
           sha256 = "0f24qrpcvyg7h6ylyggn4zrbydci537iigshac1d8yywsr0j47gd";
           name = "ace-flyspell";
         };
-        packageRequires = [ ace-jump-mode ];
+        packageRequires = [ avy ];
         meta = {
           homepage = "https://melpa.org/#/ace-flyspell";
           license = lib.licenses.free;
@@ -1423,12 +1423,12 @@
     alchemist = callPackage ({ company, dash, elixir-mode, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, pkg-info }:
     melpaBuild {
         pname = "alchemist";
-        version = "20170104.2226";
+        version = "20170118.142";
         src = fetchFromGitHub {
           owner = "tonini";
           repo = "alchemist.el";
-          rev = "b23c0c3578869b3b242a948e8a0d453fd6c437bf";
-          sha256 = "02hakng87j9bcrvd310byrr8y01pa5yq5dgxjrwa9mlyb32l5rag";
+          rev = "20a0c043b5df66ee1f731e1ffe53d5697915b626";
+          sha256 = "1szmjcim9mmzm45f7pb39gr0kf3y7x0kdhgvvbl9fbdzrphn02mx";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/6616dc61d17c5bd89bc4d226baab24a1f8e49b3e/recipes/alchemist";
@@ -1444,12 +1444,12 @@
     alda-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "alda-mode";
-        version = "20161213.1359";
+        version = "20170124.956";
         src = fetchFromGitHub {
           owner = "jgkamat";
           repo = "alda-mode";
-          rev = "86729cd7cac5f86766ebdc76a43e35f261a9e078";
-          sha256 = "0cyvq7asv08bp8kjr641m50dwi326kwb6p67vd4h302liac64br6";
+          rev = "9921298b36de4ed621d370beb0633b322a3b83e4";
+          sha256 = "011i3pfgjs9f181l7gp6yfw8z6pdrgw3rv4i8zq8yc7hrm721ffg";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/2612c494a2b6bd43ffbbaef88ce9ee6327779158/recipes/alda-mode";
@@ -2081,11 +2081,11 @@
     anything = callPackage ({ fetchgit, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "anything";
-        version = "20161207.238";
+        version = "20170123.1543";
         src = fetchgit {
           url = "http://repo.or.cz/r/anything-config.git";
-          rev = "43e88980a29618dc03f96ce38b67b2a7caadd9d9";
-          sha256 = "0dcaqss1b3myn8b4xfpyhnp9h2xniainayflhhgdk88y7vbfx0j7";
+          rev = "5a3f76a4fdd3a42b26e7d41d3a9738c86bf63b85";
+          sha256 = "17yd7r8l3q57w2p156ly8068z247fva14k555fypnc5a884rdafw";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/e1700e86cb35617178f5d7c61c88718ac7849f9b/recipes/anything";
@@ -2471,12 +2471,12 @@
     apropospriate-theme = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "apropospriate-theme";
-        version = "20170106.1329";
+        version = "20170120.1254";
         src = fetchFromGitHub {
           owner = "waymondo";
           repo = "apropospriate-theme";
-          rev = "c1088e51a0e678930bf147c46faa9c9ec59a6035";
-          sha256 = "0l2wdvipwf4m1834zbsnlldjlign9m93hh9lkkkbg99jfkppnzkl";
+          rev = "9b4a0058a41ac7849c3d4e9cbe05a79e80b3fee1";
+          sha256 = "0xaq9ssvc5ysc18cjcm07plhf0b02rwwzfm82s4cakh8zffm2rnd";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/1da33013f15825ab656260ce7453b8127e0286f4/recipes/apropospriate-theme";
@@ -2801,12 +2801,12 @@
     atom-one-dark-theme = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "atom-one-dark-theme";
-        version = "20170113.743";
+        version = "20170117.1905";
         src = fetchFromGitHub {
           owner = "jonathanchu";
           repo = "atom-one-dark-theme";
-          rev = "ab59b076afe892a0dafe56f943533dafb4594369";
-          sha256 = "05k4x5gg0gga2nks0jnk0c4vwv383irm60q1b2z45yqykj9cn1f9";
+          rev = "44903ab7c349ef225499d642f249b6dfef5c5161";
+          sha256 = "0cjp2p018xsj3sx46adrlsc3zksph4hgkn2gdqb3w8illgzp9nyp";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/3ba1c4625c9603372746a6c2edb69d65f0ef79f5/recipes/atom-one-dark-theme";
@@ -2948,12 +2948,12 @@
     auth-password-store = callPackage ({ cl-lib ? null, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, password-store, seq }:
     melpaBuild {
         pname = "auth-password-store";
-        version = "20161021.2302";
+        version = "20170123.107";
         src = fetchFromGitHub {
           owner = "DamienCassou";
           repo = "auth-password-store";
-          rev = "5ca6a838489c1175de3df7af025751559eb13cb3";
-          sha256 = "10y6grxwp8sw24fv8i9f50lc83qcdxnkw2bm1v983fw6di4i3a8w";
+          rev = "cfd9cecb319c8fb547a62c732a5c1a106049c200";
+          sha256 = "14cxchnp3sxnps03iycifvjx0w5lsxfnz6qsxgkxnis300lmnkym";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/0f4d2a28373ba93da5b280ebf40c5a3fa758ea11/recipes/auth-password-store";
@@ -4179,12 +4179,12 @@
     base16-theme = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "base16-theme";
-        version = "20161227.1040";
+        version = "20170124.1103";
         src = fetchFromGitHub {
           owner = "belak";
           repo = "base16-emacs";
-          rev = "82e8fff5c22acbfeb1c77ea9442aada938b41d19";
-          sha256 = "1k1lm0hlp771vayv0laah2q67751ykc3gkv94s6axj02n8rs2zdv";
+          rev = "b50e90a39344402d169b8fdd5d18cc43fb16a256";
+          sha256 = "13b9ccm7yw95zc8v8sri762fgqdp2hp107nj5b40yv90g3y4fwby";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/30862f6be74882cfb57fb031f7318d3fd15551e3/recipes/base16-theme";
@@ -5322,7 +5322,7 @@
       }) {};
     bookmark-plus = callPackage ({ fetchurl, lib, melpaBuild }: melpaBuild {
         pname = "bookmark-plus";
-        version = "20170113.1310";
+        version = "20170123.921";
         src = fetchurl {
           url = "https://www.emacswiki.org/emacs/download/bookmark+.el";
           sha256 = "02akakw7zfjx8bjb3sjlf8rhbh1xzx00h3dz7cp84f7jy9xak5v1";
@@ -5648,6 +5648,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    bshell = callPackage ({ buffer-manage, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    melpaBuild {
+        pname = "bshell";
+        version = "20170116.1117";
+        src = fetchFromGitHub {
+          owner = "plandes";
+          repo = "bshell";
+          rev = "0abd93439895851c1ad3037b0df7443e577ed1ba";
+          sha256 = "1frs3m44m4jjl3rxkahkyss2gnijpdpsbqvx0vwbl637gcap1slw";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/cf0ed51304f752af3e1f56caf2856d1521d782a4/recipes/bshell";
+          sha256 = "1ds8xvh74i6wqswjp8i30knr74l4gbalkb2jil8qjb9wp9l1gw9z";
+          name = "bshell";
+        };
+        packageRequires = [ buffer-manage emacs ];
+        meta = {
+          homepage = "https://melpa.org/#/bshell";
+          license = lib.licenses.free;
+        };
+      }) {};
     btc-ticker = callPackage ({ fetchFromGitHub, fetchurl, json ? null, lib, melpaBuild, request }:
     melpaBuild {
         pname = "btc-ticker";
@@ -6319,12 +6340,12 @@
     cal-china-x = callPackage ({ cl-lib ? null, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "cal-china-x";
-        version = "20160102.124";
+        version = "20170122.1100";
         src = fetchFromGitHub {
           owner = "xwl";
           repo = "cal-china-x";
-          rev = "5014bc0bf086c1326feedf9a3717c748f51264b0";
-          sha256 = "03hi0ggq81nm1kd0mcf8fwnya4axzd80vfdjdbhgpxbkvnxldzpv";
+          rev = "2e9f8e17969a32268fa1c69b500d28590338a98e";
+          sha256 = "1qqy0phjxqc8nw7aijlnfqybqicnl559skgiag5syvgnfh4965f0";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/c1098d34012fa72f8c8c30d5f0f495fdbe1d3d65/recipes/cal-china-x";
@@ -6485,12 +6506,12 @@
     cargo = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, rust-mode }:
     melpaBuild {
         pname = "cargo";
-        version = "20170107.651";
+        version = "20170124.1149";
         src = fetchFromGitHub {
           owner = "kwrooijen";
           repo = "cargo.el";
-          rev = "670b34d9bf4207680b0783c2a0ea8b1c8f914e58";
-          sha256 = "1slj9gkxknm56k16x827021b1q6384px8pja5xia524b0809hyqg";
+          rev = "d17c66ac4eb9b226df23b0dbe12eec976d93093d";
+          sha256 = "1fmplh1r6xs7md5x7fwvfw6fkkblcbnfzh5j4adqci9j42cgcnfx";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/e997b356b009b3d2ab467fe49b79d728a8cfe24b/recipes/cargo";
@@ -6720,8 +6741,8 @@
         src = fetchFromGitHub {
           owner = "cdominik";
           repo = "cdlatex";
-          rev = "b7183c2200392b6d85fca69390f4a65fac7a7b19";
-          sha256 = "1jj9vmhc4s3ych08bjm1c2xwi81z1p20rj7bvxrgvb5aga2ghi9d";
+          rev = "ff534912b93fc2c7a6b191b1c8d6d699a46bbb01";
+          sha256 = "1pvlq98qll44g1ag8w5rkbppk1b8l8inkwn5qzrlsjr8pngyhljz";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/193956c26050e15ddd7fb6579a053262d1de1e30/recipes/cdlatex";
@@ -6886,8 +6907,8 @@
         src = fetchFromGitHub {
           owner = "cfengine";
           repo = "core";
-          rev = "d31c2ffc3171030c04eddbf50bcac7be27db9c77";
-          sha256 = "1skhqpyx3qgrlby92qb1p2qarzagj6hc91ph818wb8id2z26k71i";
+          rev = "f234413322b67688ded1073a9649a292178f1ac2";
+          sha256 = "0wv5y3q4iypi9fwvkqmmv8xmlj2227rm6zyhaiq8hcphn0g1r04m";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/c737839aeda583e61257ad40157e24df7f918b0f/recipes/cfengine-code-style";
@@ -6926,7 +6947,7 @@
         version = "20160801.615";
         src = fetchsvn {
           url = "http://beta.visl.sdu.dk/svn/visl/tools/vislcg3/trunk/emacs";
-          rev = "11945";
+          rev = "11953";
           sha256 = "1wbk9aslvcmwj3n28appdhl3p2m6jgrpb5cijij8fk0szzxi1hrl";
         };
         recipeFile = fetchurl {
@@ -7048,12 +7069,12 @@
     cheatsheet = callPackage ({ cl-lib ? null, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "cheatsheet";
-        version = "20170114.2251";
+        version = "20170124.330";
         src = fetchFromGitHub {
           owner = "darksmile";
           repo = "cheatsheet";
-          rev = "00f8f3cdf6131d1eafe1107e5c82ef69661e1318";
-          sha256 = "0ba2j3g12mf1rckbpfcpb0j0fv7wwxln8jcw7mn8a05c5pcikjp6";
+          rev = "5648341515ed1565aeb89c2dfdb63aa852ac8d08";
+          sha256 = "16m7h5bbsaqlsdn27f1ljaqdmxxfnn1pc6dq6k5ggp8h9hwkpb4k";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/0d2cd657fcadb2dd3fd12864fe94a3465f8c9bd7/recipes/cheatsheet";
@@ -7507,12 +7528,12 @@
     cider = callPackage ({ clojure-mode, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, pkg-info, queue, seq, spinner }:
     melpaBuild {
         pname = "cider";
-        version = "20170112.26";
+        version = "20170122.2028";
         src = fetchFromGitHub {
           owner = "clojure-emacs";
           repo = "cider";
-          rev = "460a1dc948ea8994eb8b379d132448d26cf7572c";
-          sha256 = "0j9f6gi8zhws12vcwzng2a4bg4hdyvqsb08ha70as7xm9ym8vv6p";
+          rev = "240c6ed236d98c7e27b8c85bd1fdb9e845882e8b";
+          sha256 = "1kvph9f19m1hvkr27bc3n1fm5nwpwfl6kiz08l673pp0qxvgj965";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/55a937aed818dbe41530037da315f705205f189b/recipes/cider";
@@ -7780,11 +7801,11 @@
     clang-format = callPackage ({ cl-lib ? null, fetchsvn, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "clang-format";
-        version = "20161004.253";
+        version = "20170120.137";
         src = fetchsvn {
           url = "http://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format";
-          rev = "292208";
-          sha256 = "0li360592lv9hw3a73lva1bjj5qx518ky0yy1sqsb0mw1y7l5rip";
+          rev = "293003";
+          sha256 = "1w7jd9qz2qd75jp1r44ynp9bj85cv5wzpqqhpi5rllyxh1i8g6cl";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/69e56114948419a27f06204f6fe5326cc250ae28/recipes/clang-format";
@@ -7905,12 +7926,12 @@
     cliphist = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild, popup }:
     melpaBuild {
         pname = "cliphist";
-        version = "20170116.1431";
+        version = "20170117.1437";
         src = fetchFromGitHub {
           owner = "redguardtoo";
           repo = "cliphist";
-          rev = "72a8a92f69b280c347afe2f8b5f5eb57606a9aec";
-          sha256 = "0arilk9msbrx4kwg6nk0faw1yi2ss225wdlz6ycdgqc1531h6jkm";
+          rev = "8aaee153e0561625c35a8c178e57385c2ec92731";
+          sha256 = "0swsvzz20szfcgfaarga9apla1kl0ph0lrpk0ccl6mcf93zbnvby";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/82d86dae4ad8efc8ef342883c164c56e43079171/recipes/cliphist";
@@ -7989,12 +8010,12 @@
     clj-refactor = callPackage ({ cider, clojure-mode, dash, edn, emacs, fetchFromGitHub, fetchurl, hydra, inflections, lib, melpaBuild, multiple-cursors, paredit, s, yasnippet }:
     melpaBuild {
         pname = "clj-refactor";
-        version = "20170114.1148";
+        version = "20170124.624";
         src = fetchFromGitHub {
           owner = "clojure-emacs";
           repo = "clj-refactor.el";
-          rev = "7941d906d603a650d836e3a2ba25554772adb236";
-          sha256 = "0gjmhwx4ibyr7fm2lssah9xbqfwm0174w5zv2hm27v37a8ncvzhv";
+          rev = "735df406401c735de3448f8879a2b328571f73d2";
+          sha256 = "089yfn6r9nlmbvsqbr9gkxg2b6903d1k9qim4jlcki4hip4xqkc2";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/3a2db268e55d10f7d1d5a5f02d35b2c27b12b78e/recipes/clj-refactor";
@@ -8169,12 +8190,12 @@
     clojure-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "clojure-mode";
-        version = "20161221.523";
+        version = "20170120.2239";
         src = fetchFromGitHub {
           owner = "clojure-emacs";
           repo = "clojure-mode";
-          rev = "423c9e4ee43212c42e22b15fff4aa52c050ca90d";
-          sha256 = "09ik49nb40p082ykf2giszbxzlsc5m1zgsmfkq1j571qkn0cdzc9";
+          rev = "0113aa969e09e31d65717d4a9c16c934c77dcb9b";
+          sha256 = "1dcj6brfw7fcjn86ibl5sk1q5qij8zmrfr7776nczwh9i7986l4a";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/5e3cd2e6ee52692dc7b2a04245137130a9f521c7/recipes/clojure-mode";
@@ -8194,8 +8215,8 @@
         src = fetchFromGitHub {
           owner = "clojure-emacs";
           repo = "clojure-mode";
-          rev = "423c9e4ee43212c42e22b15fff4aa52c050ca90d";
-          sha256 = "09ik49nb40p082ykf2giszbxzlsc5m1zgsmfkq1j571qkn0cdzc9";
+          rev = "0113aa969e09e31d65717d4a9c16c934c77dcb9b";
+          sha256 = "1dcj6brfw7fcjn86ibl5sk1q5qij8zmrfr7776nczwh9i7986l4a";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/5e3cd2e6ee52692dc7b2a04245137130a9f521c7/recipes/clojure-mode-extra-font-locking";
@@ -8379,12 +8400,12 @@
     cmake-font-lock = callPackage ({ cmake-mode, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "cmake-font-lock";
-        version = "20150828.1327";
+        version = "20170117.1225";
         src = fetchFromGitHub {
           owner = "Lindydancer";
           repo = "cmake-font-lock";
-          rev = "982b753e0228bb5189e3bf2283afad9197d93c37";
-          sha256 = "030kg3m546gcm6cf1k928ld51znsfrzhlpm005dvqap3gkcrg4sf";
+          rev = "8be491b4b13338078e524e2fe6213c93e18a101e";
+          sha256 = "0h96c670gki6csqfrhlnjxkpzx0m92l6pcsdhx93l3qbh23imcmm";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/383a7f191c10916ad40284fba94f967765ffeb7e/recipes/cmake-font-lock";
@@ -8425,8 +8446,8 @@
         src = fetchFromGitHub {
           owner = "Kitware";
           repo = "CMake";
-          rev = "020cba316bb3a4d33da5108ab10d2c06b4712427";
-          sha256 = "1c2hsy6b6b7vwg7fdjliz3f0yy7j7f8cj3627w5alhp5k6r6mnv1";
+          rev = "3270f763b28195de83c8b762dba5fb366b714b30";
+          sha256 = "1gjdidsgg73hciipnirnr6lp5xrx1kb72qkmx4hksvlfq4f6c9kh";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/598723893ae4bc2e60f527a072efe6ed9d4e2488/recipes/cmake-mode";
@@ -9498,12 +9519,12 @@
     company-erlang = callPackage ({ company, emacs, fetchFromGitHub, fetchurl, ivy-erlang-complete, lib, melpaBuild }:
     melpaBuild {
         pname = "company-erlang";
-        version = "20170107.115";
+        version = "20170122.2138";
         src = fetchFromGitHub {
           owner = "s-kostyaev";
           repo = "company-erlang";
-          rev = "70f65acb5912b27284ae2ff55d72e4687b862432";
-          sha256 = "0dpkm6fh1qw8nz75n3na4hbvw9ggxn9dq9p9qmb7pdbcc78nsi44";
+          rev = "bc0524a16f17b66c7397690e4ca0e004f09ea6c5";
+          sha256 = "04wm3i65fpzln7sdcny88hfjfm0n7wy44ffsr3697x4l95d0bnyh";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ca96ed0b5d6f8aea4de56ddeaa003b9c81d96219/recipes/company-erlang";
@@ -9817,8 +9838,8 @@
         src = fetchFromGitHub {
           owner = "xcwen";
           repo = "ac-php";
-          rev = "cb15be9d7a7c6aa2aa20188069b07521bfe3cb5f";
-          sha256 = "02fvdkz7a3ql4r1vap2yl3m3cb29f9psk4qy4qp1kqrxbcmcrafm";
+          rev = "a347cda40cfd8924e86fdb597d8f2b5129697645";
+          sha256 = "02njmfl7hmdpn1wxx50vfvai5w9gkmmajydccfz4r937knr0gibq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ac283f1b65c3ba6278e9d3236e5a19734e42b123/recipes/company-php";
@@ -9876,12 +9897,12 @@
     company-quickhelp = callPackage ({ company, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, pos-tip }:
     melpaBuild {
         pname = "company-quickhelp";
-        version = "20161113.1226";
+        version = "20170119.2217";
         src = fetchFromGitHub {
           owner = "expez";
           repo = "company-quickhelp";
-          rev = "41014e9018cc6f42741ce85383852930e6411f2e";
-          sha256 = "00svfw08g44byzx23zb0kla6y6z05m6qlxzl0q32kkgkqvdhzb17";
+          rev = "e204a80b5231486145902df4abd063b8c9d20376";
+          sha256 = "1ijzsa1l1ispd0zc0bzbcrvwcf3i4siqbvccnpdpr6i32sd3kwsq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/022cc4fee54bb0194822947c70058145e2980b94/recipes/company-quickhelp";
@@ -9945,12 +9966,12 @@
     company-shell = callPackage ({ cl-lib ? null, company, dash, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "company-shell";
-        version = "20161002.505";
+        version = "20161128.953";
         src = fetchFromGitHub {
           owner = "Alexander-Miller";
           repo = "company-shell";
-          rev = "63d3cbdf8b2f88cfb2607bc064ef8059b93a75a1";
-          sha256 = "11d49spfvx9y1skksjhgirhjxp7i17xcd5xp3a0k59jzb0zhyyqh";
+          rev = "a4a7b9ed6b81e4c9f9cb04f63b386fd76d952f11";
+          sha256 = "00bgxd66pwchpy1lnv43izgr6gk4c9nh02jab6laf5jk8s9xs2h7";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/bbaa05d158f3806b9f79a2c826763166dbee56ca/recipes/company-shell";
@@ -9963,22 +9984,30 @@
           license = lib.licenses.free;
         };
       }) {};
-    company-sourcekit = callPackage ({ company, dash, dash-functional, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, sourcekit }:
+    company-sourcekit = callPackage ({ company, dash, dash-functional, deferred, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, request-deferred, sourcekit }:
     melpaBuild {
         pname = "company-sourcekit";
-        version = "20170115.1551";
+        version = "20170122.636";
         src = fetchFromGitHub {
           owner = "nathankot";
           repo = "company-sourcekit";
-          rev = "a28ac4811fac929686aca6aa6976845c02d6efd3";
-          sha256 = "09vv6bhiahazjwzg5083b23z3xz5f4b3d4jra61m5xffkmjnbs9s";
+          rev = "3286a0dceea6f68b155dd4608db3ccf555f00938";
+          sha256 = "0xxwy5nahaafk5w3ybr1g898fiz6r7hjwr445z64v5pg862r8lkl";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/45969cd5cd936ea61fbef4722843b0b0092d7b72/recipes/company-sourcekit";
           sha256 = "0hr5j1ginf43h4qf3fvsh3z53z0c7w5a9lhrvdwmlzj396qhqmzs";
           name = "company-sourcekit";
         };
-        packageRequires = [ company dash dash-functional emacs sourcekit ];
+        packageRequires = [
+          company
+          dash
+          dash-functional
+          deferred
+          emacs
+          request-deferred
+          sourcekit
+        ];
         meta = {
           homepage = "https://melpa.org/#/company-sourcekit";
           license = lib.licenses.free;
@@ -10448,12 +10477,12 @@
     counsel = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, swiper }:
     melpaBuild {
         pname = "counsel";
-        version = "20170104.737";
+        version = "20170119.859";
         src = fetchFromGitHub {
           owner = "abo-abo";
           repo = "swiper";
-          rev = "ee91a2511797c9293d3b0efa444bb98414d5aca5";
-          sha256 = "0mrv0z62k0pk8k0ik9kazl86bn8x4568ny5m8skimvi2gwxb08w6";
+          rev = "75f9cebc6a44cc5aff51f403bae4774736ea52bd";
+          sha256 = "09xdlgwl40cb9kf622nnadh0g14g78p78yqmxfgy1wm3vbp0id99";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/06c50f32b8d603db0d70e77907e36862cd66b811/recipes/counsel";
@@ -11136,12 +11165,12 @@
     ctags-update = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "ctags-update";
-        version = "20170111.2150";
+        version = "20170120.2313";
         src = fetchFromGitHub {
           owner = "jixiuf";
           repo = "ctags-update";
-          rev = "b0b5f88bb8a617871692429cf099c4203eff610c";
-          sha256 = "0wdxqkhflwnaic3ydr8an23z2cwsm1sj3di2qj5svs84y0nvyw7s";
+          rev = "9c58084395bd5c62c3fe500cd56d62bfc1dcee51";
+          sha256 = "0cgq31ivhhr32pz17yfy7sja81bhxjh7fn502fa8mc9c3msgflwn";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/e5d0c347ff8cf6e0ade80853775fd6b84f387fa5/recipes/ctags-update";
@@ -11203,8 +11232,8 @@
         src = fetchFromGitHub {
           owner = "mortberg";
           repo = "cubicaltt";
-          rev = "87c067150e955e3f2b0864e2ec9929fa3289ff28";
-          sha256 = "13xrln4fqdq3siz8p2vilwwma1p0fnk7rxxd89v0pc7zw1nl8yrr";
+          rev = "9ae218e0beefd3cc2c617cf6b66ac9faba1a8af7";
+          sha256 = "08d09wgi7j8qihqsxyl2lgvwcsi7gwl8kbz3c36yc0gb656m7blr";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/1be42b49c206fc4f0df6fb50fed80b3d9b76710b/recipes/cubicaltt";
@@ -11467,8 +11496,8 @@
         src = fetchFromGitHub {
           owner = "cython";
           repo = "cython";
-          rev = "d02cc4c5d831da27cd871cbb3feaf8bea72ec0c0";
-          sha256 = "055wjr2kgvqji9ifwjchi8m4f095sq8df3vfxcv2n6ifgdwlmzkf";
+          rev = "d92a718a26c9354fbf35f31a17de5c069865a447";
+          sha256 = "0qxkxwkkx4343mmy38dh3cbxvi4vk3cv1b8ralvh6h7jas09qnzq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/be9bfabe3f79153cb859efc7c3051db244a63879/recipes/cython-mode";
@@ -11589,12 +11618,12 @@
     dante = callPackage ({ dash, emacs, fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild }:
     melpaBuild {
         pname = "dante";
-        version = "20170103.420";
+        version = "20170119.1319";
         src = fetchFromGitHub {
           owner = "jyp";
           repo = "dante";
-          rev = "04da558e4d693ab320c1aea62160c2a4e2152326";
-          sha256 = "1rmai7ysacaaqw7s56s18zg2aqiv0iys9m0z584ymczvszgvjl6v";
+          rev = "1220ad91d78abc57e191215d5985729f14c66c84";
+          sha256 = "05ms8j4vm2qghq0w7w6vw9v74xb8i04fqzm35ndhp0fq1phrh47h";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/5afa8226077cbda4b76f52734cf8e0b745ab88e8/recipes/dante";
@@ -13726,12 +13755,12 @@
     dix = callPackage ({ cl-lib ? null, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "dix";
-        version = "20170109.331";
+        version = "20170123.523";
         src = fetchFromGitHub {
           owner = "unhammer";
           repo = "dix";
-          rev = "f9dd686922cf89dc7859c793be84969a2529a14b";
-          sha256 = "02cayawahsa59mkr0f4rhsm9lnpyv8qpx59w3040xmhf8dx95378";
+          rev = "86880826a0cc878e2e5d50bc835eed5c8e2f001a";
+          sha256 = "00qyzpqdw4im7c4bqqpiayv4kr9iqlm6mhsziazjvrjsvvi0p9ij";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/149eeba213b82aa0bcda1073aaf1aa02c2593f91/recipes/dix";
@@ -13751,8 +13780,8 @@
         src = fetchFromGitHub {
           owner = "unhammer";
           repo = "dix";
-          rev = "f9dd686922cf89dc7859c793be84969a2529a14b";
-          sha256 = "02cayawahsa59mkr0f4rhsm9lnpyv8qpx59w3040xmhf8dx95378";
+          rev = "86880826a0cc878e2e5d50bc835eed5c8e2f001a";
+          sha256 = "00qyzpqdw4im7c4bqqpiayv4kr9iqlm6mhsziazjvrjsvvi0p9ij";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/d9dcceb57231bf2082154cab394064a59d84d3a5/recipes/dix-evil";
@@ -14644,7 +14673,7 @@
         version = "20130120.1257";
         src = fetchsvn {
           url = "http://svn.apache.org/repos/asf/subversion/trunk/contrib/client-side/emacs/";
-          rev = "1779173";
+          rev = "1780132";
           sha256 = "016dxpzm1zba8rag7czynlk58hys4xab4mz1nkry5bfihknpzcrq";
         };
         recipeFile = fetchurl {
@@ -14808,11 +14837,11 @@
     dyalog-mode = callPackage ({ cl-lib ? null, fetchhg, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "dyalog-mode";
-        version = "20161231.1437";
+        version = "20170117.550";
         src = fetchhg {
           url = "https://bitbucket.com/harsman/dyalog-mode";
-          rev = "4004050a9771";
-          sha256 = "0p7g7sfkdr473gpj2xdgg5fb5d336w2ddvx44i1d6575p6rcs5w6";
+          rev = "9ae0c786e1e7";
+          sha256 = "1a498jkj15vhf2x4an6raghjf9fszrkw0zl617m8pibcn3yrnv62";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/5b7972602399f9df9139cff177e38653bb0f43ed/recipes/dyalog-mode";
@@ -15248,12 +15277,12 @@
     ebib = callPackage ({ dash, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, parsebib, seq }:
     melpaBuild {
         pname = "ebib";
-        version = "20170112.443";
+        version = "20170118.1625";
         src = fetchFromGitHub {
           owner = "joostkremers";
           repo = "ebib";
-          rev = "4c2581ad17a636909e7ed0f46bd813cd6d9c45d3";
-          sha256 = "1ic55fml4ll7pvakcf32ahps4za8mf4q10jgdyi8xj5bccvi3n3r";
+          rev = "d415b91c91581ff39364384fec35c219cb89d43a";
+          sha256 = "13283ymm4av2gk7zj2rsppg6sk0lixy9g4lic4arrm8b5yb0vcsd";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/4e39cd8e8b4f61c04fa967def6a653bb22f45f5b/recipes/ebib";
@@ -15518,12 +15547,12 @@
     ede-php-autoload = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "ede-php-autoload";
-        version = "20161119.419";
+        version = "20170123.1113";
         src = fetchFromGitHub {
           owner = "stevenremot";
           repo = "ede-php-autoload";
-          rev = "c6896c648fbc90f4d083f511353d6b165836d0e8";
-          sha256 = "0dfx0qiyd23jhxi0y1n4s1pk9906b91qnp25xbyiqdacs54l6d8a";
+          rev = "141de1002c289e9852d34b6f603126fd21fcaf83";
+          sha256 = "1d4a1502lsz48r183iqw3xn06jd32n01dydvi2rgzydj5kf0lyka";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/8ee9f7fd9cbc3397cd9af34b08b75c3d9d8bc551/recipes/ede-php-autoload";
@@ -15945,12 +15974,12 @@
     ein = callPackage ({ cl-generic, fetchFromGitHub, fetchurl, lib, melpaBuild, request, websocket }:
     melpaBuild {
         pname = "ein";
-        version = "20170111.542";
+        version = "20170119.927";
         src = fetchFromGitHub {
           owner = "millejoh";
           repo = "emacs-ipython-notebook";
-          rev = "e226b30139e283bf5c3bbf7419b9383c72237c88";
-          sha256 = "04szmzri65qagy7af4rrq43idmy5qpl9lqvwq708rzsv8mkqpkqr";
+          rev = "3412470b61998613f0a2c724d6be6aa4604cb14e";
+          sha256 = "12qm5x6kkaxgsf7y9i8zwak14bn33w2s4sla1hjpzs0mjhds5x8q";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/215e163755fe391ce1f049622e7b9bf9a8aea95a/recipes/ein";
@@ -16008,12 +16037,12 @@
     ejc-sql = callPackage ({ auto-complete, cider, clomacs, dash, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, spinner }:
     melpaBuild {
         pname = "ejc-sql";
-        version = "20170103.1427";
+        version = "20170120.901";
         src = fetchFromGitHub {
           owner = "kostafey";
           repo = "ejc-sql";
-          rev = "dffc4f16a0bbaf2a767961297df4570423479117";
-          sha256 = "198cii3nk0cmqciyhs0gjlhn6gnsslbry36hm9zp7r3kzk8hsc6g";
+          rev = "a7515139b396bffe9c329b6b69c8d0658ef4a564";
+          sha256 = "19mqi20gyxmadlycizg6wpzxf7jbvsfnnisazf11m9nf5bc97avb";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/8f2cd74717269ef7f10362077a91546723a72104/recipes/ejc-sql";
@@ -16131,6 +16160,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    el-patch = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    melpaBuild {
+        pname = "el-patch";
+        version = "20170123.1735";
+        src = fetchFromGitHub {
+          owner = "raxod502";
+          repo = "el-patch";
+          rev = "6dc16442ef309b04624c0cc0c64bf22c3d03d903";
+          sha256 = "1zrngnc3rnwjr6hl16ilcy99sia702qawsv4b4n4vp5ybqqjcrnm";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/2f4f57e0edbae35597aa4a7744d22d2f971d5de5/recipes/el-patch";
+          sha256 = "1imijmsni8c8fxjrzprnanf94c1pma3h5w9p75c4y99l8l3xmj7g";
+          name = "el-patch";
+        };
+        packageRequires = [ emacs ];
+        meta = {
+          homepage = "https://melpa.org/#/el-patch";
+          license = lib.licenses.free;
+        };
+      }) {};
     el-pocket = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, web }:
     melpaBuild {
         pname = "el-pocket";
@@ -16335,22 +16385,22 @@
           license = lib.licenses.free;
         };
       }) {};
-    eldoc-overlay-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    eldoc-overlay-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, inline-docs, lib, melpaBuild }:
     melpaBuild {
         pname = "eldoc-overlay-mode";
-        version = "20170114.2125";
+        version = "20170123.6";
         src = fetchFromGitHub {
           owner = "stardiviner";
           repo = "eldoc-overlay-mode";
-          rev = "794c2b959611d1352cdda9e930f2ddd866b4118a";
-          sha256 = "04lndhm1jb0kvv0npr5wmgj8v18537fgp62c6m4gzgcjyfxihmr7";
+          rev = "a0f25710b6a1614ce93c71c7947108c09b587c48";
+          sha256 = "065sihf0dvi7g37zvf5drigkakydapyvpxdibcdzhcxx2p9bqszi";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/de4d7c143f24d34eed093cfcdf481e98a6d2f839/recipes/eldoc-overlay-mode";
           sha256 = "158w2ffayqlcbgka3894p3zbq45kw9mijf421yzf55y1f1ipzqqs";
           name = "eldoc-overlay-mode";
         };
-        packageRequires = [ emacs ];
+        packageRequires = [ emacs inline-docs ];
         meta = {
           homepage = "https://melpa.org/#/eldoc-overlay-mode";
           license = lib.licenses.free;
@@ -18042,12 +18092,12 @@
     ensime = callPackage ({ company, dash, fetchFromGitHub, fetchurl, lib, melpaBuild, popup, s, sbt-mode, scala-mode, yasnippet }:
     melpaBuild {
         pname = "ensime";
-        version = "20161227.301";
+        version = "20170121.1214";
         src = fetchFromGitHub {
           owner = "ensime";
           repo = "ensime-emacs";
-          rev = "42598cab15985e6fc5e95989b0c73e2259cdadf5";
-          sha256 = "1k8nfxfd4y3r1y293r6sqlk4wq59rdvpbhsdvr3j0mx0a9yzdxdm";
+          rev = "524d11e490094fa03d5c3a9dcdf0efa81f3d05c2";
+          sha256 = "11br1hy1f4z9x674argdqb8sz1g0q9wzvi5hjh248w3v7lmvjzyh";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/502faab70af713f50dd8952be4f7a5131075e78e/recipes/ensime";
@@ -18683,8 +18733,8 @@
         src = fetchFromGitHub {
           owner = "erlang";
           repo = "otp";
-          rev = "eadc98327e3fb173d80a92e6ae2e7d7e85f92d67";
-          sha256 = "1bn43p122ld3269klzcpfwacswnlpj2hdz9kx6n5691zv0w3qi5b";
+          rev = "7400b93124572af795c8d7356e22e3bf1f1f2a09";
+          sha256 = "1c494xrn26j0m9wx69pb1zqdhv4mnwjffp42y0irxf061jy3z1jp";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/d9cd526f43981e0826af59cdc4bb702f644781d9/recipes/erlang";
@@ -19032,12 +19082,12 @@
     eshell-fringe-status = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "eshell-fringe-status";
-        version = "20160224.416";
+        version = "20170117.1516";
         src = fetchFromGitHub {
           owner = "ryuslash";
           repo = "eshell-fringe-status";
-          rev = "573bc2d48b7d24bb4bf7575e3d438525a6f3cd46";
-          sha256 = "10c31a1ypa6yd957r1jiasx0ql2z9ykbn31l51y1xwrp00mq3yls";
+          rev = "adc6997c68e39c0d52a2af1b2fd5cf2057783797";
+          sha256 = "1cwn4cvjjd4l5kk7s6cxzafjmdv3s7k78i73fvscmsnpwx9p2wj0";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/9efd9fefab5d449b9f70d9f548aadfea52d66bc0/recipes/eshell-fringe-status";
@@ -19242,12 +19292,12 @@
     ess = callPackage ({ fetchFromGitHub, fetchurl, julia-mode, lib, melpaBuild }:
     melpaBuild {
         pname = "ess";
-        version = "20170116.214";
+        version = "20170118.232";
         src = fetchFromGitHub {
           owner = "emacs-ess";
           repo = "ESS";
-          rev = "8ba2d5c5a5d9abb5fa907e2e27e6ccb9a130158e";
-          sha256 = "12kx8wbr4wzvrlcbk48qbpfp4pdfsxxgx19qvl127c91ajbxksxa";
+          rev = "b67756eb72fc813196e1b1915eeaa36d3ef95ecc";
+          sha256 = "1rwvp4gqr0nd81k7125hfgk60m7b2cjwg2ilwfg1ym85cqlqp8l3";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/12997b9e2407d782b3d2fcd2843f7c8b22442c0a/recipes/ess";
@@ -19611,18 +19661,19 @@
           license = lib.licenses.free;
         };
       }) {};
-    evil = callPackage ({ fetchhg, fetchurl, goto-chg, lib, melpaBuild, undo-tree }:
+    evil = callPackage ({ fetchFromGitHub, fetchurl, goto-chg, lib, melpaBuild, undo-tree }:
     melpaBuild {
         pname = "evil";
         version = "20160825.1343";
-        src = fetchhg {
-          url = "https://bitbucket.com/lyro/evil";
-          rev = "f2648b841f9b";
-          sha256 = "0gv8b6adaypw3d2brx0lh41yyi3kdf1klahx7kap36a7m652nan6";
+        src = fetchFromGitHub {
+          owner = "emacs-evil";
+          repo = "evil";
+          rev = "16eb854e18d1ec79b00a0a49c1f60aed710b303b";
+          sha256 = "1n5bm2264fgx9a462yl9nw0rm742x40b0c8w7c21dc8rz4r76a9z";
         };
         recipeFile = fetchurl {
-          url = "https://raw.githubusercontent.com/milkypostman/melpa/5b7972602399f9df9139cff177e38653bb0f43ed/recipes/evil";
-          sha256 = "09qrhy7l229w0qk3ba1i2xg4vqz8525v8scrbm031lqp30jp54hc";
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/514964d788f250e1e7893142bc094c63131bc6a5/recipes/evil";
+          sha256 = "044k9p32y4cys3zwdfanr1zddgkxz16ahqspfz7vfszyw8yml1jb";
           name = "evil";
         };
         packageRequires = [ goto-chg undo-tree ];
@@ -19634,12 +19685,12 @@
     evil-anzu = callPackage ({ anzu, evil, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "evil-anzu";
-        version = "20150124.1609";
+        version = "20170123.2318";
         src = fetchFromGitHub {
           owner = "syohex";
           repo = "emacs-evil-anzu";
-          rev = "183e42a7e4a47b1aa4dcc69e1cca87b48ffc6c5c";
-          sha256 = "0fqz1545hyz6p76vgjlg09mqhfwhi8swrlkwx8q8i5vl2r14s9px";
+          rev = "9bca6ca14d865e7e005bc02a28a09b4ae74facc9";
+          sha256 = "1y0jiglcazxnvggs5ljys2iizljsihlgr46svbbwgf45ibdrw392";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/06b0609b56016d938b28d56d9eeb6305116b38af/recipes/evil-anzu";
@@ -20138,12 +20189,12 @@
     evil-matchit = callPackage ({ evil, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "evil-matchit";
-        version = "20161130.454";
+        version = "20170119.125";
         src = fetchFromGitHub {
           owner = "redguardtoo";
           repo = "evil-matchit";
-          rev = "e9f77f7d6a14434a8ca3280d721b96c0984fa7eb";
-          sha256 = "11mhgw0xa8kn73svgvzpmvvnkj2ja4mxs030vlzkh4scvlfa98dl";
+          rev = "277623d8be7bd6ade8f301b9397b88575a0d01b9";
+          sha256 = "0bkc90ix8nivqkjkgb6iaq1a0g8dcp91im119dx98l6lxga57qli";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/aeab4a998bffbc784e8fb23927d348540baf9951/recipes/evil-matchit";
@@ -20516,12 +20567,12 @@
     evil-surround = callPackage ({ evil, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "evil-surround";
-        version = "20170115.1604";
+        version = "20170124.1110";
         src = fetchFromGitHub {
           owner = "timcharper";
           repo = "evil-surround";
-          rev = "27dc66d5d8ee64917bf5077a4d408f41099622ed";
-          sha256 = "1s0ffrk1avn008ns6qvj4mnjb476bvgsg74b22piq3s3fl8yycr4";
+          rev = "7a0358ce3eb9ed01744170fa8a1e12d98f8b8839";
+          sha256 = "1smv7sqhm1l2bi9fmispnlmjssidblwkmiiycj1n3ag54q27z031";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/da8b46729f3bd9aa74c4f0ee2a9dc60804aa661c/recipes/evil-surround";
@@ -20894,12 +20945,12 @@
     expand-region = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "expand-region";
-        version = "20161122.50";
+        version = "20170122.2241";
         src = fetchFromGitHub {
           owner = "magnars";
           repo = "expand-region.el";
-          rev = "6dd45d90a59178191e71c10c438f89b495a6c4aa";
-          sha256 = "1ac62z6a7xpj0ayc9v1is7avil6r5s8rlwx39ys922qw5y281q2w";
+          rev = "c75dab7bf0f9bb392ceafb10de16deee87467fa6";
+          sha256 = "0bhwv92wqccz8y5xm6gj71ryci8cpsnm8z8vmdj8lsf6ki8vz512";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/cae2ac3513e371a256be0f1a7468e38e686c2487/recipes/expand-region";
@@ -21078,6 +21129,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    eziam-theme = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    melpaBuild {
+        pname = "eziam-theme";
+        version = "20170124.340";
+        src = fetchFromGitHub {
+          owner = "thblt";
+          repo = "eziam-theme-emacs";
+          rev = "e30ce488c6e2f9899af584bf637f436fc3fa4ec2";
+          sha256 = "1nqdnzn5qc6i5bnnd0raxilnpggfgmskz120nhs7y5j0zhipvrgk";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/4e0411583bd4fdbe425eb07de98851136fa1eeb0/recipes/eziam-theme";
+          sha256 = "0iz3r4r54ai8y4qhnix291ra7qfmk8dbr06f52pgmz3gzin1cqpb";
+          name = "eziam-theme";
+        };
+        packageRequires = [];
+        meta = {
+          homepage = "https://melpa.org/#/eziam-theme";
+          license = lib.licenses.free;
+        };
+      }) {};
     f = callPackage ({ dash, fetchFromGitHub, fetchurl, lib, melpaBuild, s }:
     melpaBuild {
         pname = "f";
@@ -22441,12 +22513,12 @@
     flycheck = callPackage ({ dash, emacs, fetchFromGitHub, fetchurl, let-alist, lib, melpaBuild, pkg-info, seq }:
     melpaBuild {
         pname = "flycheck";
-        version = "20170112.1646";
+        version = "20170117.1430";
         src = fetchFromGitHub {
           owner = "flycheck";
           repo = "flycheck";
-          rev = "d0b058ecbfbf7f1d130aa46580cb77ac67a1fc9d";
-          sha256 = "17x8na9wbclznr4rvvznpljizx6vaw4a8cvpk45c2mijwbh1bz2d";
+          rev = "13fba48c63d4823a19ef5782df8ad3b0e50ecae2";
+          sha256 = "0l5p1ih3a5d2g7hwz2yr0adxdvhrvm9174whihqnagbb8lxfvvyq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/649f9c3576e81409ae396606798035173cc6669f/recipes/flycheck";
@@ -22942,27 +23014,6 @@
           license = lib.licenses.free;
         };
       }) {};
-    flycheck-google-cpplint = callPackage ({ fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild }:
-    melpaBuild {
-        pname = "flycheck-google-cpplint";
-        version = "20140806.925";
-        src = fetchFromGitHub {
-          owner = "flycheck";
-          repo = "flycheck-google-cpplint";
-          rev = "1d8a090861572258ab704915263feeb3a436c3d2";
-          sha256 = "0l6sg83f6z8x2alnblpv03rj442sbnkkkcbf8i0agjmx3713a5yx";
-        };
-        recipeFile = fetchurl {
-          url = "https://raw.githubusercontent.com/milkypostman/melpa/b12055ef47479de776e9a1d59a0c4d2422e824cf/recipes/flycheck-google-cpplint";
-          sha256 = "0llrvg6mhcsj5aascsndhbv99122zj32agxk1w6s8xn8ksk2i90b";
-          name = "flycheck-google-cpplint";
-        };
-        packageRequires = [ flycheck ];
-        meta = {
-          homepage = "https://melpa.org/#/flycheck-google-cpplint";
-          license = lib.licenses.free;
-        };
-      }) {};
     flycheck-haskell = callPackage ({ dash, emacs, fetchFromGitHub, fetchurl, flycheck, haskell-mode, let-alist, lib, melpaBuild, seq }:
     melpaBuild {
         pname = "flycheck-haskell";
@@ -23026,6 +23077,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    flycheck-kotlin = callPackage ({ fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild }:
+    melpaBuild {
+        pname = "flycheck-kotlin";
+        version = "20170122.337";
+        src = fetchFromGitHub {
+          owner = "whirm";
+          repo = "flycheck-kotlin";
+          rev = "cbb9fbf70dbe8efcc3971b3606ee95c97469b1fe";
+          sha256 = "0bxjx7xcpscv6vv4yxll8hh43aabv2dnrvkymb47jm3yvjr9cs1c";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/f158727cc8892aadba0a613dd08e65e2fc791b48/recipes/flycheck-kotlin";
+          sha256 = "0vh4f3ap1ciddf2fvfnjz668d6spyx49xs2wfp1hrzxn5yqpnra5";
+          name = "flycheck-kotlin";
+        };
+        packageRequires = [ flycheck ];
+        meta = {
+          homepage = "https://melpa.org/#/flycheck-kotlin";
+          license = lib.licenses.free;
+        };
+      }) {};
     flycheck-ledger = callPackage ({ fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild }:
     melpaBuild {
         pname = "flycheck-ledger";
@@ -23092,12 +23164,12 @@
     flycheck-mix = callPackage ({ elixir-mode, fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild }:
     melpaBuild {
         pname = "flycheck-mix";
-        version = "20160803.140";
+        version = "20170118.630";
         src = fetchFromGitHub {
           owner = "tomekowal";
           repo = "flycheck-mix";
-          rev = "c4e018c5a24e45c0ddc678547e73d5448dbde18b";
-          sha256 = "0yz053xzs2vq0d2cxmizwsqx8l3mf4g6afg11qb297m3b081s6a7";
+          rev = "76684d4b5987925b98b254aab656f8bf8198ab88";
+          sha256 = "130ddx83h88krd64kss4z59lfrmdi3433r95939kqsqfmhzvgx0k";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/fd2a4d71b7f4c0082b687a23fd367d55186625a9/recipes/flycheck-mix";
@@ -25063,12 +25135,12 @@
     fstar-mode = callPackage ({ dash, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "fstar-mode";
-        version = "20170112.1727";
+        version = "20170124.521";
         src = fetchFromGitHub {
           owner = "FStarLang";
           repo = "fstar-mode.el";
-          rev = "3a9be64827bbed8e34d38803b5c44d8d4f6cd688";
-          sha256 = "0manmkd66355g1fw2q1q96ispd0vxf842i8dcr6g592abrz5lhi7";
+          rev = "323271293e82cd03440a8bb6d11077c1c3f5b44b";
+          sha256 = "1rxpnlda4r3gc4bb8390a4gscqhxgvbp2gk27l7qyavn0jfxmq0h";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/e1198ee309675c391c479ce39efcdca23f548d2a/recipes/fstar-mode";
@@ -25087,8 +25159,8 @@
         version = "20170107.626";
         src = fetchgit {
           url = "git://factorcode.org/git/factor.git";
-          rev = "0701902122308f376dab4f2a4371600ddc05ae3e";
-          sha256 = "0ahjhr7bmmpkvqxmr0m8c3agaiffqg8p6h5xnbjv93ar6ajk2pz9";
+          rev = "1613bdfed2a35f97a49cb2a46dc100ececf8803e";
+          sha256 = "02zlc9fcf2kb0k5c7v7s9nj2hnfjcmc1zk91i8l61fnn9ywmi076";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/0c3633c23baa472560a489fc663a0302f082bcef/recipes/fuel";
@@ -25287,12 +25359,12 @@
     fxrd-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild, s }:
     melpaBuild {
         pname = "fxrd-mode";
-        version = "20160503.1345";
+        version = "20170124.1428";
         src = fetchFromGitHub {
           owner = "msherry";
           repo = "fxrd-mode";
-          rev = "a7f31eed83e889279681ba9d872f88bf86969011";
-          sha256 = "1m8zgwcfl0i3yizx01ikxjhhqm1nj74q35fs3d32z9fkk5h21m2d";
+          rev = "f53240c92f80760fbfb2e0dcf2e68064145cec33";
+          sha256 = "0yx4p081960zwgjlw9yiq4jkc7czfvwbsc8z20pg394lx9nkrgr5";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/796eb6b2126ec616c0de6af6abb7598900557c12/recipes/fxrd-mode";
@@ -25350,12 +25422,12 @@
     gams-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "gams-mode";
-        version = "20170108.35";
+        version = "20170121.203";
         src = fetchFromGitHub {
           owner = "ShiroTakeda";
           repo = "gams-mode";
-          rev = "ce7014cb298f01ff96f52cba38fc7714daa7d5a6";
-          sha256 = "1cz4sn325fy87xs6zs5xg6l9vsq06hsf4aksn87vg4mdnkj53xym";
+          rev = "e8100f9694c1b85c12ed57d89f7efe408b9f933f";
+          sha256 = "14d6iiy2dk93ani1d3vm57nsd3pn170fk8brs5v7jpf1sqszjihw";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/c895a716636b00c2a158d33aab18f664a8601833/recipes/gams-mode";
@@ -25432,12 +25504,12 @@
     geben = callPackage ({ cl-lib ? null, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "geben";
-        version = "20170103.448";
+        version = "20170119.400";
         src = fetchFromGitHub {
           owner = "ahungry";
           repo = "geben";
-          rev = "b6379dd479f28b2ace418e2cc57d30559f634036";
-          sha256 = "0x97xqk9xs6h1h3jqwkwi7q32j4pzw0rygsqmgb3n80l7zja6114";
+          rev = "006e101f458a218891606e7b43bb69aa9fb2d4e1";
+          sha256 = "0vc09k1mndd904yjijqpf38i06jkxwhrrhrq6lv75s66a3v2r52p";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/6f8648609e160f7dcefe4a963e8b00475f2fff78/recipes/geben";
@@ -25516,12 +25588,12 @@
     general = callPackage ({ cl-lib ? null, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "general";
-        version = "20161203.1641";
+        version = "20170117.1707";
         src = fetchFromGitHub {
           owner = "noctuid";
           repo = "general.el";
-          rev = "11f21c9c53091bc538652f1448e75557ad526b9c";
-          sha256 = "0pyyvab0l5xbkm4w9sc34g68vz56qsy8fkhj5nh00rigwi9pcsla";
+          rev = "a685d573e5b03ef1199a6e9425b9e292ac38753c";
+          sha256 = "00pnz8hjw07p302fxh4x3xhz1wzkwcqcidnkq19429dv5hkp01pi";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/d86383b443622d78f6d8ff7b8ac74c8d72879d26/recipes/general";
@@ -25688,8 +25760,8 @@
         src = fetchFromGitHub {
           owner = "DanielG";
           repo = "ghc-mod";
-          rev = "e20bb704f61776926ce1d7d3852b54b76dd43644";
-          sha256 = "085ym61ll1ixk7lp3kxcp7aryf6ih9nqkx1nbm93i5asb4h8v996";
+          rev = "084688bb357d42e2459fdd381da2fea17ffc96ea";
+          sha256 = "1n3rcmrv7mbi5h0s0b527kx358k7wl2s0rgnrvavbv392jf08890";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/7fabdb05de9b8ec18a3a566f99688b50443b6b44/recipes/ghc";
@@ -25894,12 +25966,12 @@
     git-annex = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "git-annex";
-        version = "20160215.1111";
+        version = "20170120.931";
         src = fetchFromGitHub {
           owner = "jwiegley";
           repo = "git-annex-el";
-          rev = "e61ef24f22c74dff4b64235191414c98d60aa11a";
-          sha256 = "0d2blcnyqd1br7zhwprdxpx2jphjhsb4jgaw9dr4gvv0xdb2sr87";
+          rev = "d574b9d9e264167245e49bb96b000988a83af259";
+          sha256 = "0c1hqff1g1ahaqalfdp09g7qk852bj83dcwd94q3wwmnsy1mf493";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/9c91e16bb9e92db9dc9be6a7af3944c3290d2f14/recipes/git-annex";
@@ -25982,8 +26054,8 @@
         src = fetchFromGitHub {
           owner = "magit";
           repo = "magit";
-          rev = "875f913b8edfdd85dfdaba9403a9d5ae2b952afc";
-          sha256 = "04cdbv8xqhbzqx1lzcm0n2s80b25mp9s6izzflv88qzpcc0z6wv2";
+          rev = "85db4aeebd2c66604c031c91d3f6bf4ce72f3449";
+          sha256 = "19b5fgwnb4m9v285jwdc72m9zgphkb3hassx4ks3zg6yij7g98hq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/cec5af50ae7634cc566adfbfdf0f95c3e2951c0c/recipes/git-commit";
@@ -26251,12 +26323,12 @@
     gitattributes-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "gitattributes-mode";
-        version = "20160319.302";
+        version = "20170118.1613";
         src = fetchFromGitHub {
           owner = "magit";
           repo = "git-modes";
-          rev = "9da8cac8ea6cc07626565b5ede9aedae133b4d6a";
-          sha256 = "0jzl1bpnf8rsjwcp8aiwsi8bbs1fd2sp5mzzydvi7hzjvyahvyd0";
+          rev = "af4ff3222f38daa0d352afdf3d20741b4fab2e79";
+          sha256 = "0nn5mj29airjacckzxkh4q12wnk2pq6mp1wlzxzxdwijmkk52dbr";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/4b4e2ddd2a80875afc0fc654052e6cbff2f3777f/recipes/gitattributes-mode";
@@ -26297,8 +26369,8 @@
         src = fetchFromGitHub {
           owner = "magit";
           repo = "git-modes";
-          rev = "9da8cac8ea6cc07626565b5ede9aedae133b4d6a";
-          sha256 = "0jzl1bpnf8rsjwcp8aiwsi8bbs1fd2sp5mzzydvi7hzjvyahvyd0";
+          rev = "af4ff3222f38daa0d352afdf3d20741b4fab2e79";
+          sha256 = "0nn5mj29airjacckzxkh4q12wnk2pq6mp1wlzxzxdwijmkk52dbr";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/44a37f59b87f59a587f6681e7aadfabf137c98d7/recipes/gitconfig-mode";
@@ -26423,8 +26495,8 @@
         src = fetchFromGitHub {
           owner = "jakoblind";
           repo = "github-pullrequest";
-          rev = "9ccdeea36b2cb78f0bd2907cb45d1ab287a6af90";
-          sha256 = "12j81h095rsfqbways4hm9wdr91wwc31b8hr1my55m91r204b9r4";
+          rev = "6ae5c38b0fc15b638b5ba4490112d9822ce5e267";
+          sha256 = "1yr7v2wdrvwb1slks83bbh857qq1n207rdk48y8qwlcxbk4ygdr6";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/3dca88ef598d676661abea79cdbc41bad6dd28be/recipes/github-pullrequest";
@@ -26486,8 +26558,8 @@
         src = fetchFromGitHub {
           owner = "magit";
           repo = "git-modes";
-          rev = "9da8cac8ea6cc07626565b5ede9aedae133b4d6a";
-          sha256 = "0jzl1bpnf8rsjwcp8aiwsi8bbs1fd2sp5mzzydvi7hzjvyahvyd0";
+          rev = "af4ff3222f38daa0d352afdf3d20741b4fab2e79";
+          sha256 = "0nn5mj29airjacckzxkh4q12wnk2pq6mp1wlzxzxdwijmkk52dbr";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/44a37f59b87f59a587f6681e7aadfabf137c98d7/recipes/gitignore-mode";
@@ -26503,12 +26575,12 @@
     gitlab = callPackage ({ dash, fetchFromGitHub, fetchurl, lib, melpaBuild, pkg-info, request, s }:
     melpaBuild {
         pname = "gitlab";
-        version = "20161013.604";
+        version = "20170120.22";
         src = fetchFromGitHub {
           owner = "nlamirault";
           repo = "emacs-gitlab";
-          rev = "2efdc9bc2f572fceb11199cecdd04aae03df3cb0";
-          sha256 = "0pxmmgsrn5d2jmak3plwb6h15h2d4sbwk49q6gdniglcf9nagckq";
+          rev = "9b14a972093b12e3a5d210370592e71df7f0d1e1";
+          sha256 = "03bb6jw0f6l1wi1bl8ynb0k5rnk2rfnrhzc2qp5anmlxzy3qglc8";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/1d012991188956f6e06c37d504b0d06ab31487b9/recipes/gitlab";
@@ -26549,8 +26621,8 @@
         src = fetchFromGitHub {
           owner = "xuchunyang";
           repo = "gitter.el";
-          rev = "6e92491ddb7079f868ffcc07d69bc82ef35d7d2b";
-          sha256 = "16hnw8bcbbnwzw9mbb98icri7q7zl39b60r9gn5gr3bxaarbh9dl";
+          rev = "3ff1c72ee85be4e3b648b4c52b0638129f3cf7a6";
+          sha256 = "19vd81pdjjbmiq3md1052x1lf43c8q9pfpq2b8lrdpz6qaphk6f6";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/b8076c3b4d60e4c505bb6f4e426ecc4f69d74684/recipes/gitter";
@@ -26734,12 +26806,12 @@
     gnu-apl-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "gnu-apl-mode";
-        version = "20170111.804";
+        version = "20170123.248";
         src = fetchFromGitHub {
           owner = "lokedhs";
           repo = "gnu-apl-mode";
-          rev = "40c591698f04a9f1563a6ff969d3ea3acea43abb";
-          sha256 = "0ns8vp4vi225q9vd2alvw9yihdvbnmcm5rr5w31hi9d0b6figqfs";
+          rev = "ffa5fec15971ccec0b19f759c9191cac9ee851eb";
+          sha256 = "0hlzdvm7d0r9jh4cv9ff1wdjyfffr2417kkq0mlbv0bvqczwdd8b";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/369a55301bba0c4f7ce27f6e141944a523beaa0f/recipes/gnu-apl-mode";
@@ -27109,12 +27181,12 @@
     go-impl = callPackage ({ emacs, fetchFromGitHub, fetchurl, go-mode, lib, melpaBuild }:
     melpaBuild {
         pname = "go-impl";
-        version = "20161225.1819";
+        version = "20170124.801";
         src = fetchFromGitHub {
           owner = "syohex";
           repo = "emacs-go-impl";
-          rev = "5d2037e16cf354abffba68fb9ea86790e0be5eb3";
-          sha256 = "1b1628z1rlb2varxk3svwm13s5x6db0503q4d0yb3kk7hk38wpm8";
+          rev = "e5f8fd794282db7dfe5f740efd0764a5b5207035";
+          sha256 = "0l7bh1a6vr3v2ii2v94b0ddqzj4wpg9jh8rf69zmablzv6ggcg4z";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/aa1a0845cc1a6970018b397d13394aaa8147e5d0/recipes/go-impl";
@@ -27740,8 +27812,8 @@
         src = fetchFromGitHub {
           owner = "vmware";
           repo = "govmomi";
-          rev = "733acc9e4cb9ce9e867734f298fdfc89ab05f771";
-          sha256 = "0jna5a3w8nr819q3rwcagbin75dk9drgyy04z5b3m8k2rpxyikwm";
+          rev = "ba9e3f4422c2b82e0ce601ff43be4f419f06ac9a";
+          sha256 = "07ajraqpkd9v5g2h84dqq6xa5384hywagwivl6b64bxjf3a3pp3l";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/92d6391318021c63b06fe39b0ca38f667bb45ae9/recipes/govc";
@@ -27904,12 +27976,12 @@
     grandshell-theme = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "grandshell-theme";
-        version = "20160922.640";
+        version = "20170118.2148";
         src = fetchFromGitHub {
           owner = "steckerhalter";
           repo = "grandshell-theme";
-          rev = "14ec10937720bc91bb2f5e1c1e2c124d8a43a9d6";
-          sha256 = "03990wbrc56sm4qzc2nsjj3q96vx1ipjivdhqfy8s6sy9r1msa86";
+          rev = "c0884bfe0b2df8d6279cabd5ef6c521aaf7c0897";
+          sha256 = "1cn3i4kp5pjiaq96svam3xn1s33lpysnzk77vq25wp65vz9jpbcg";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/5b04b0024f5a0367e2998d35ca88c2613a8e3470/recipes/grandshell-theme";
@@ -28393,12 +28465,12 @@
     guix = callPackage ({ bui, dash, emacs, fetchFromGitHub, fetchurl, geiser, lib, magit-popup, melpaBuild }:
     melpaBuild {
         pname = "guix";
-        version = "20170114.133";
+        version = "20170119.311";
         src = fetchFromGitHub {
           owner = "alezost";
           repo = "guix.el";
-          rev = "2794ab96de95fae8aad12c33ff1726d5348cae7b";
-          sha256 = "0cj5mlshh76m3fmnzxjyrq8kw0y22qvcd9wjqwkg392jw9s5kaqc";
+          rev = "9cb08e77e840495786860ece37006d302ee79926";
+          sha256 = "1z6cafmzfz8rlpwi9wgcvjb5wsq7ikdhr8jn4ykdkbqfkk1fp33f";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/b3d8c73e8a946b8265487a0825d615d80aa3337d/recipes/guix";
@@ -29123,12 +29195,12 @@
     helm = callPackage ({ async, emacs, fetchFromGitHub, fetchurl, helm-core, lib, melpaBuild, popup }:
     melpaBuild {
         pname = "helm";
-        version = "20170116.2331";
+        version = "20170123.2253";
         src = fetchFromGitHub {
           owner = "emacs-helm";
           repo = "helm";
-          rev = "bc2bfb3017f327a5307e7c46be27d1b614b3e90d";
-          sha256 = "1jfdbbzv6prxkiz9hxvyjfgdbzb9yzf8g71nny0xcfm76r18vrwi";
+          rev = "6363905a78f101dd214d00bd9c0ca09d5b600d3e";
+          sha256 = "1dvaypwxgkp98i5g95m1nzvj9wzr2w8gxdpibpalj05i9lrhi73i";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/7e8bccffdf69479892d76b9336a4bec3f35e919d/recipes/helm";
@@ -29333,12 +29405,12 @@
     helm-bibtex = callPackage ({ biblio, cl-lib ? null, dash, f, fetchFromGitHub, fetchurl, helm, lib, melpaBuild, parsebib, s }:
     melpaBuild {
         pname = "helm-bibtex";
-        version = "20170103.1125";
+        version = "20170124.940";
         src = fetchFromGitHub {
           owner = "tmalsburg";
           repo = "helm-bibtex";
-          rev = "8735714d6be62187538ffd9187e8aee87b49b969";
-          sha256 = "19sqp3789a9w0nm48rb2yjj5bhllpilrvbljp8h8nsv3nlf5dz84";
+          rev = "6a6cef0668b86c88e629a817e1d13c4be45ad62a";
+          sha256 = "0wsh8b0m094di1bxm2vdnrdqhix1a1wcd5nj2crra678d70ad9g9";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/f4118a7721435240cf8489daa4dd39369208855b/recipes/helm-bibtex";
@@ -29522,12 +29594,12 @@
     helm-cider = callPackage ({ cider, emacs, fetchFromGitHub, fetchurl, helm-core, lib, melpaBuild, seq }:
     melpaBuild {
         pname = "helm-cider";
-        version = "20170115.1740";
+        version = "20170120.1913";
         src = fetchFromGitHub {
           owner = "clojure-emacs";
           repo = "helm-cider";
-          rev = "d678f1346331f12bdb6fe95536608fb3e94b2f70";
-          sha256 = "0gmi23yx8l85923y0arm7v0v9zgspbp6gkb8a8jmnl5z2akqpzgh";
+          rev = "a24ef274e382c1a158a76eae2570f1f007031cb8";
+          sha256 = "062abfb4sfpcc6fx3nrf3j0bisglrhyrg7rxwhhcqm9jhalksmdl";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/31d3cd618f2ac88860d0b11335ff81b6e2973982/recipes/helm-cider";
@@ -29690,12 +29762,12 @@
     helm-core = callPackage ({ async, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "helm-core";
-        version = "20170116.2331";
+        version = "20170122.250";
         src = fetchFromGitHub {
           owner = "emacs-helm";
           repo = "helm";
-          rev = "bc2bfb3017f327a5307e7c46be27d1b614b3e90d";
-          sha256 = "1jfdbbzv6prxkiz9hxvyjfgdbzb9yzf8g71nny0xcfm76r18vrwi";
+          rev = "6363905a78f101dd214d00bd9c0ca09d5b600d3e";
+          sha256 = "1dvaypwxgkp98i5g95m1nzvj9wzr2w8gxdpibpalj05i9lrhi73i";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ef7a700c5665e6d72cb4cecf7fb5a2dd43ef9bf7/recipes/helm-core";
@@ -30303,8 +30375,8 @@
         src = fetchFromGitHub {
           owner = "nlamirault";
           repo = "emacs-gitlab";
-          rev = "2efdc9bc2f572fceb11199cecdd04aae03df3cb0";
-          sha256 = "0pxmmgsrn5d2jmak3plwb6h15h2d4sbwk49q6gdniglcf9nagckq";
+          rev = "9b14a972093b12e3a5d210370592e71df7f0d1e1";
+          sha256 = "03bb6jw0f6l1wi1bl8ynb0k5rnk2rfnrhzc2qp5anmlxzy3qglc8";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/1d012991188956f6e06c37d504b0d06ab31487b9/recipes/helm-gitlab";
@@ -32552,8 +32624,8 @@
         src = fetchFromGitHub {
           owner = "chrisdone";
           repo = "hindent";
-          rev = "19e73ed76974f7c6a75c277e7e99e09f26d3ad66";
-          sha256 = "0q22iay0n4asqm378s4fcb7vdsyfhddls1ij6v1m4mhsjq7a6inw";
+          rev = "2b0b236ab55d1ef629e458882666ca01b7c84ef5";
+          sha256 = "17bxdskaqxy6dfcg7nhc1wjwrw4qdmaix64avdkb4lkcsn5n9myv";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/dbae71a47446095f768be35e689025aed57f462f/recipes/hindent";
@@ -33665,7 +33737,7 @@
       }) {};
     icicles = callPackage ({ fetchurl, lib, melpaBuild }: melpaBuild {
         pname = "icicles";
-        version = "20170115.1431";
+        version = "20170118.2321";
         src = fetchurl {
           url = "https://www.emacswiki.org/emacs/download/icicles.el";
           sha256 = "072pxihvwpj6zkzrgw8bq9z71mcx5f6xsjr95bm42xqh4ag2qq0x";
@@ -35331,8 +35403,8 @@
         src = fetchFromGitHub {
           owner = "commercialhaskell";
           repo = "intero";
-          rev = "5b727f41e70aaf1d9d4dad7d4e7c4bafe122bec1";
-          sha256 = "1z712b1kgmkhwcchagb8sdlcxv3ji7f8jfkig09z49af7hvg4g7v";
+          rev = "6e7c3df37be8275590e0e2442631d4fa25cae7c8";
+          sha256 = "061x79zr6wgd18a81bh7k554j7cds6z24w2l11i65gj5s3ir4a11";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/1b56ca344ad944e03b669a9974e9b734b5b445bb/recipes/intero";
@@ -35889,8 +35961,8 @@
         src = fetchFromGitHub {
           owner = "abo-abo";
           repo = "swiper";
-          rev = "ee91a2511797c9293d3b0efa444bb98414d5aca5";
-          sha256 = "0mrv0z62k0pk8k0ik9kazl86bn8x4568ny5m8skimvi2gwxb08w6";
+          rev = "75f9cebc6a44cc5aff51f403bae4774736ea52bd";
+          sha256 = "09xdlgwl40cb9kf622nnadh0g14g78p78yqmxfgy1wm3vbp0id99";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/06c24112a5e17c423a4d92607356b25eb90a9a7b/recipes/ivy";
@@ -35906,12 +35978,12 @@
     ivy-bibtex = callPackage ({ biblio, cl-lib ? null, dash, f, fetchFromGitHub, fetchurl, lib, melpaBuild, parsebib, s, swiper }:
     melpaBuild {
         pname = "ivy-bibtex";
-        version = "20170103.1125";
+        version = "20170124.940";
         src = fetchFromGitHub {
           owner = "tmalsburg";
           repo = "helm-bibtex";
-          rev = "8735714d6be62187538ffd9187e8aee87b49b969";
-          sha256 = "19sqp3789a9w0nm48rb2yjj5bhllpilrvbljp8h8nsv3nlf5dz84";
+          rev = "6a6cef0668b86c88e629a817e1d13c4be45ad62a";
+          sha256 = "0wsh8b0m094di1bxm2vdnrdqhix1a1wcd5nj2crra678d70ad9g9";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/c23c09225c57a9b9abe0a0a770a9184ae2e58f7c/recipes/ivy-bibtex";
@@ -35927,12 +35999,12 @@
     ivy-erlang-complete = callPackage ({ async, counsel, emacs, erlang, fetchFromGitHub, fetchurl, ivy, lib, melpaBuild }:
     melpaBuild {
         pname = "ivy-erlang-complete";
-        version = "20170113.247";
+        version = "20170122.2137";
         src = fetchFromGitHub {
           owner = "s-kostyaev";
           repo = "ivy-erlang-complete";
-          rev = "65d80ff0052be9aa65e9a1cd8f6b1f5fb112ee36";
-          sha256 = "05qjpv95xrhwpg1g0znsp33a8827w4p7vl6iflrrmi15kij5imb4";
+          rev = "914dfbeb2d9ccaed2e830637ecc814ac1da2f82f";
+          sha256 = "0a5fmqkasy87vq9x95qavqszmb9jalsi8ihgxx120rbrzfib28ys";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ac1b9e350d3f066e4e56202ebb443134d5fc3669/recipes/ivy-erlang-complete";
@@ -35952,8 +36024,8 @@
         src = fetchFromGitHub {
           owner = "nlamirault";
           repo = "emacs-gitlab";
-          rev = "2efdc9bc2f572fceb11199cecdd04aae03df3cb0";
-          sha256 = "0pxmmgsrn5d2jmak3plwb6h15h2d4sbwk49q6gdniglcf9nagckq";
+          rev = "9b14a972093b12e3a5d210370592e71df7f0d1e1";
+          sha256 = "03bb6jw0f6l1wi1bl8ynb0k5rnk2rfnrhzc2qp5anmlxzy3qglc8";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/35d4d4f22e4c567954287b2a1cabcb595497095a/recipes/ivy-gitlab";
@@ -35973,8 +36045,8 @@
         src = fetchFromGitHub {
           owner = "abo-abo";
           repo = "swiper";
-          rev = "ee91a2511797c9293d3b0efa444bb98414d5aca5";
-          sha256 = "0mrv0z62k0pk8k0ik9kazl86bn8x4568ny5m8skimvi2gwxb08w6";
+          rev = "75f9cebc6a44cc5aff51f403bae4774736ea52bd";
+          sha256 = "09xdlgwl40cb9kf622nnadh0g14g78p78yqmxfgy1wm3vbp0id99";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/06c24112a5e17c423a4d92607356b25eb90a9a7b/recipes/ivy-hydra";
@@ -36576,12 +36648,12 @@
     jdee = callPackage ({ dash, emacs, fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild, memoize }:
     melpaBuild {
         pname = "jdee";
-        version = "20170109.1138";
+        version = "20170122.800";
         src = fetchFromGitHub {
           owner = "jdee-emacs";
           repo = "jdee";
-          rev = "5ac4f497f8226acc23dd9c266c958fb82f6816b4";
-          sha256 = "17l07r0wf5gj77lln6bmi1c4fg4igf2qnrla2s9piyrqffa4jgrv";
+          rev = "09d0d4981fe340e7608cd2e1af3d7e72a87edb92";
+          sha256 = "01c9w0qfx5yvbfj3yz2xys8w9gy3nnp5iqhcqnkb2y76syn6w4qk";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/a6d2c98f3bf2075e33d95c7befe205df802e798d/recipes/jdee";
@@ -36601,8 +36673,8 @@
         src = fetchFromGitHub {
           owner = "tkf";
           repo = "emacs-jedi";
-          rev = "b6972af030416c57de6d045761d0ad6bccfdf07b";
-          sha256 = "07011v1qx70saqffj0698sdi3v996v105jvf7h7lc0ddlddgk05w";
+          rev = "de1f5597b600c0cb7661b5f451da2af4cb722571";
+          sha256 = "120l9zfh432ffj5n6q4x16msvnqwcazkaxib2n19k4pdyvpd1gbp";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/bded1840a39fbf1e014c01276eb2f9c5a4fc218f/recipes/jedi";
@@ -36618,12 +36690,12 @@
     jedi-core = callPackage ({ cl-lib ? null, emacs, epc, fetchFromGitHub, fetchurl, lib, melpaBuild, python-environment }:
     melpaBuild {
         pname = "jedi-core";
-        version = "20160709.722";
+        version = "20170121.610";
         src = fetchFromGitHub {
           owner = "tkf";
           repo = "emacs-jedi";
-          rev = "b6972af030416c57de6d045761d0ad6bccfdf07b";
-          sha256 = "07011v1qx70saqffj0698sdi3v996v105jvf7h7lc0ddlddgk05w";
+          rev = "de1f5597b600c0cb7661b5f451da2af4cb722571";
+          sha256 = "120l9zfh432ffj5n6q4x16msvnqwcazkaxib2n19k4pdyvpd1gbp";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/bded1840a39fbf1e014c01276eb2f9c5a4fc218f/recipes/jedi-core";
@@ -36993,12 +37065,12 @@
     js-format = callPackage ({ emacs, fetchFromGitHub, fetchurl, js2-mode, lib, melpaBuild }:
     melpaBuild {
         pname = "js-format";
-        version = "20161220.1427";
+        version = "20170118.1702";
         src = fetchFromGitHub {
           owner = "futurist";
           repo = "js-format.el";
-          rev = "1fb87a5b21cdc2dc4e29245d14d82e81a5983393";
-          sha256 = "0cwxyfqiwl19gvx0smcdy8immvyj0rnsrxsqy2pch1s6m5sz4wxd";
+          rev = "544bda9be72b74ec2d442543ba60cff727d96669";
+          sha256 = "18wr2z2w2fqgy51f5m5izrnywarxn6w4qs04lsgbwlsc6ahpwwpf";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/0d6deaa93f7deaba9f5f36f1963522b6dc5c673a/recipes/js-format";
@@ -37826,12 +37898,12 @@
     keychain-environment = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "keychain-environment";
-        version = "20160424.446";
+        version = "20170118.626";
         src = fetchFromGitHub {
           owner = "tarsius";
           repo = "keychain-environment";
-          rev = "1ca091f72ad1d1a7620552289ae43484d853e968";
-          sha256 = "0xgm80dbg45bs3k8psd3pv49z1xbvzm156xs55gmxdzbgxbzpazr";
+          rev = "7c08e8c4c3ea4d6eaee12d710a56793771f837c5";
+          sha256 = "1mnqa69f584qzb62nn01bb4nz08gi7ra8b6xr0x7aphfqzk86kzy";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/4382c9e7e8dee2cafea9ee49965d0952ca359dd5/recipes/keychain-environment";
@@ -38124,8 +38196,8 @@
         src = fetchFromGitHub {
           owner = "kivy";
           repo = "kivy";
-          rev = "80f1f82759d5e4f2537da7620e2c0d3ea88aa7da";
-          sha256 = "0bk7ixm4dvblmal8xi0n061xqb13ipdgxpl9gx7aihzi18429i8n";
+          rev = "a9d5d75609524597142b62a35640ecf8f2766d9b";
+          sha256 = "07w2azv3yyxs32b7d2cgwschqw47nvz83hjhhzmi6rvl9yr8ia4d";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/688e2a114073958c413e56e1d117d48db9d16fb8/recipes/kivy-mode";
@@ -38641,12 +38713,12 @@
     latex-unicode-math-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "latex-unicode-math-mode";
-        version = "20161201.835";
+        version = "20170123.1016";
         src = fetchFromGitHub {
           owner = "Christoph-D";
           repo = "latex-unicode-math-mode";
-          rev = "3b82347291edcb32e4062b0048c367a3079b3e8c";
-          sha256 = "1xylfg8xpyb2m0qnysf58cl05ibbg4drhgq7msiiql2qrdzvpx9f";
+          rev = "e8931e68214ca94e6a04080ebc629693d5881884";
+          sha256 = "049lpqnyjz0x2dp7rzk9gwbf5s28s33vxxk5lfhax6kaizlxkaq8";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/9c021dfad8928c1a352e0ef5526eefa6c0a9cb37/recipes/latex-unicode-math-mode";
@@ -38809,12 +38881,12 @@
     ledger-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "ledger-mode";
-        version = "20161231.914";
+        version = "20170124.439";
         src = fetchFromGitHub {
           owner = "ledger";
           repo = "ledger-mode";
-          rev = "a2ce924c4447daa92228d5904e5c31555d27fbf7";
-          sha256 = "0j9ppsxn9q3h4lh9ak3r1n8jpg5x0zs2az016jiw2q3h6n6sw564";
+          rev = "ce483998b9df81d72e2d28b241b4285f1042fd3d";
+          sha256 = "17cy23a8gbvipa62405izplj2w1f794dxmwspxpmn4g44xfazlhk";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/851eca11911b337f809d030785dc2608c8a47424/recipes/ledger-mode";
@@ -39058,12 +39130,12 @@
     lfe-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "lfe-mode";
-        version = "20170111.1330";
+        version = "20170121.454";
         src = fetchFromGitHub {
           owner = "rvirding";
           repo = "lfe";
-          rev = "0d412fc713efb893c7f44f1bd8dd66eb01693f30";
-          sha256 = "1hsr21fzd3kkavznjcgd9jv6galkx3aky73fs91plr5l7gdvqz38";
+          rev = "ec0ad79e17920ce28e32e2beb9fea872bf80762c";
+          sha256 = "047qnnwh46zmj7flkv53wdrq53cil76v0i6hx71xpyiykzm1dnq9";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/c44bdb00707c9ef90160e0a44f7148b480635132/recipes/lfe-mode";
@@ -39375,12 +39447,12 @@
     lispy = callPackage ({ ace-window, emacs, fetchFromGitHub, fetchurl, hydra, iedit, lib, melpaBuild, swiper, zoutline }:
     melpaBuild {
         pname = "lispy";
-        version = "20170112.236";
+        version = "20170124.218";
         src = fetchFromGitHub {
           owner = "abo-abo";
           repo = "lispy";
-          rev = "f66433837a4ccabcfc7f05d74d7ee8217691d943";
-          sha256 = "154kwk1h1grcjbimaglsir5i5j72bak1lxw69bjm5d5yf3qg60p5";
+          rev = "6e64df1bc9f8d74c052bdf49c6971679170aaebe";
+          sha256 = "02fgi9rajsgyjxlmhkl6xi5zidcrrabb1llkjbr9b7qmlaqxhhcg";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/e23c062ff32d7aeae486c01e29c56a74727dcf1d/recipes/lispy";
@@ -39417,12 +39489,12 @@
     lispyville = callPackage ({ cl-lib ? null, emacs, evil, fetchFromGitHub, fetchurl, lib, lispy, melpaBuild }:
     melpaBuild {
         pname = "lispyville";
-        version = "20170116.1335";
+        version = "20170120.2353";
         src = fetchFromGitHub {
           owner = "noctuid";
           repo = "lispyville";
-          rev = "c951f65a2300d884eff7afdd941fea275550c9fe";
-          sha256 = "0hhllm6b0gkllpbfkc6ifcax1vmfplll9vbrfa8wqi0lghmy4npm";
+          rev = "8b6e97c906e87203c8034bfda35aa95f2fc02109";
+          sha256 = "16r4p4fh2i41ai0bsppdhyk1w6sb1l8hjbs0apv20f4jssv36hjs";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/b5d96d3603dc328467fcce29d3ac1b0a02833d51/recipes/lispyville";
@@ -39688,12 +39760,12 @@
     live-py-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "live-py-mode";
-        version = "20170116.1607";
+        version = "20170119.2209";
         src = fetchFromGitHub {
           owner = "donkirkby";
           repo = "live-py-plugin";
-          rev = "f702dd8475b48526d1701b11776800388f6d8c70";
-          sha256 = "0zdxz5zyy8xgrsbl3kpnzxifgbr670qnrq02sbc208al9jn8blk9";
+          rev = "884d6b38b41f0ea6749361aab773d950cb6b8d27";
+          sha256 = "1g2bv9kaxlpfd3rxh67rp2gs0vcj1k49fhxs4ikqw5a1yfnnpcaq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/c7615237e80b46b5c50cb51a3ed5b07d92566fb7/recipes/live-py-mode";
@@ -39775,8 +39847,8 @@
         version = "20150910.644";
         src = fetchgit {
           url = "http://llvm.org/git/llvm";
-          rev = "fca725c1928670ccc48510f431d96f19751dbc1b";
-          sha256 = "1ag3h8jcrfdbhs1zil6xra5abngkl35yw6av769x0vp6wldxklrv";
+          rev = "d367f44048534bdb4d2d976c088bbad9fb125c0a";
+          sha256 = "1sbi3h6g5p5fc3ly3kyvwsrlzszr38vj54ikqpvqsp022757rf9i";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/05b7a689463c1dd4d3d00b992b9863d10e93112d/recipes/llvm-mode";
@@ -40145,12 +40217,12 @@
     lsp-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "lsp-mode";
-        version = "20170106.1709";
+        version = "20170118.2007";
         src = fetchFromGitHub {
           owner = "vibhavp";
           repo = "emacs-lsp";
-          rev = "d117f2d8d5b23688e0d32372a2c2d03e7bcd44c5";
-          sha256 = "0g13hslwl9303k69mg4l5yrga4fsjbm0phvqr0kjycsq2zfipa2r";
+          rev = "de6e3615b0c0775bd9739aeb98ce629e59f77695";
+          sha256 = "1bfspb3iwr6py6v8k3h5qc84bhgp1w80zvgn3kvkm27mlh6qpbv9";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/b192c90c96e24ccb464ac56e624a2fd527bc5cc9/recipes/lsp-mode";
@@ -40171,7 +40243,7 @@
           owner = "immerrr";
           repo = "lua-mode";
           rev = "d7596990cdd197d3db682c4b2ca5410a4b522574";
-          sha256 = "1sid1k2vv3bawsirz11apslhx7f5dfva4gwcv7q7p3b0zxlyw1f1";
+          sha256 = "06i2p0b5pcv9c4b6blxxh5sn7fgzglpl2bw2i27vyrh1szapq8mb";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ca7bf43ef8893bf04e9658390e306ef69e80a156/recipes/lua-mode";
@@ -40415,12 +40487,12 @@
     magit = callPackage ({ async, dash, emacs, fetchFromGitHub, fetchurl, git-commit, lib, magit-popup, melpaBuild, with-editor }:
     melpaBuild {
         pname = "magit";
-        version = "20170114.1211";
+        version = "20170119.1803";
         src = fetchFromGitHub {
           owner = "magit";
           repo = "magit";
-          rev = "875f913b8edfdd85dfdaba9403a9d5ae2b952afc";
-          sha256 = "04cdbv8xqhbzqx1lzcm0n2s80b25mp9s6izzflv88qzpcc0z6wv2";
+          rev = "85db4aeebd2c66604c031c91d3f6bf4ce72f3449";
+          sha256 = "19b5fgwnb4m9v285jwdc72m9zgphkb3hassx4ks3zg6yij7g98hq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/68bb049b7c4424345f5c1aea82e950a5e47e9e47/recipes/magit";
@@ -40466,14 +40538,14 @@
         pname = "magit-filenotify";
         version = "20151116.1540";
         src = fetchFromGitHub {
-          owner = "magit";
+          owner = "emacsorphanage";
           repo = "magit-filenotify";
           rev = "c0865b3c41af20b6cd89de23d3b0beb54c8401a4";
           sha256 = "0nkxxhxkhy314jv1l3hza84vigl8q7fc8hjjvrx58gfgsfgifx6r";
         };
         recipeFile = fetchurl {
-          url = "https://raw.githubusercontent.com/milkypostman/melpa/c6c87a11492f6b6e5159a2a3dc1fe7d9efcc0cde/recipes/magit-filenotify";
-          sha256 = "00a77czdi24n3zkx6jwaj2asablzpxq16iqd8s84kkqxcfiiahn7";
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/41aeebef8ed914fb378fef13ba47572accee332c/recipes/magit-filenotify";
+          sha256 = "0bbw6ay3csbc5zc6wa9p9nxpbxl3k35xz9jwqlw8mgz2b1xq083d";
           name = "magit-filenotify";
         };
         packageRequires = [ emacs magit ];
@@ -40594,8 +40666,8 @@
         src = fetchFromGitHub {
           owner = "magit";
           repo = "magit";
-          rev = "875f913b8edfdd85dfdaba9403a9d5ae2b952afc";
-          sha256 = "04cdbv8xqhbzqx1lzcm0n2s80b25mp9s6izzflv88qzpcc0z6wv2";
+          rev = "85db4aeebd2c66604c031c91d3f6bf4ce72f3449";
+          sha256 = "19b5fgwnb4m9v285jwdc72m9zgphkb3hassx4ks3zg6yij7g98hq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/cec5af50ae7634cc566adfbfdf0f95c3e2951c0c/recipes/magit-popup";
@@ -40653,12 +40725,12 @@
     magit-svn = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, magit, melpaBuild }:
     melpaBuild {
         pname = "magit-svn";
-        version = "20151219.547";
+        version = "20170118.925";
         src = fetchFromGitHub {
           owner = "magit";
           repo = "magit-svn";
-          rev = "63a47732cc112d24db26052ffad93895319b60cf";
-          sha256 = "1g2isa8n2j8kk0c5iwx8qai8k14sazwkc3dwhcpchm3zs0bfpdm3";
+          rev = "d9e61effc55480694014e5422e8f74f0f17a757a";
+          sha256 = "128ra3habdqk1rsnmy87m0aw2pqi033dqmmjmgsmfblnfvi987p9";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/cec5af50ae7634cc566adfbfdf0f95c3e2951c0c/recipes/magit-svn";
@@ -41031,12 +41103,12 @@
     mandoku = callPackage ({ fetchFromGitHub, fetchurl, git, github-clone, lib, magit, melpaBuild, org }:
     melpaBuild {
         pname = "mandoku";
-        version = "20170115.2357";
+        version = "20170122.2132";
         src = fetchFromGitHub {
           owner = "mandoku";
           repo = "mandoku";
-          rev = "c58481b5dacc62dcc53a9886e032ccaf4a41a627";
-          sha256 = "023kpmj01ixpb2yfsfxym7zvbldhj8486ndanma0srzf1p9lmqq6";
+          rev = "12e55ba09155470c43ebb073f2594425949d2745";
+          sha256 = "16p9j5dymilmn2qmg9cp0ns28ywfckd72xy9v7bxp8jd0dxj8nwk";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/1aac4ae2c908de2c44624fb22a3f5ccf0b7a4912/recipes/mandoku";
@@ -41540,12 +41612,12 @@
     maxframe = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "maxframe";
-        version = "20161213.1734";
+        version = "20170120.905";
         src = fetchFromGitHub {
           owner = "rmm5t";
           repo = "maxframe.el";
-          rev = "50dc78c7b33959c10d5f6da00c338d4611467c36";
-          sha256 = "1qz3q63g0zh5xhsxcqm37swcdpliii15cqfbbvm0jjyd9kfysblw";
+          rev = "13bda6dd9f1d96aa4b9dd9957a26cefd399a7772";
+          sha256 = "0kh8yk1py9zg62zfl289hszhq3kl3mqmjk6z5vqkw3mcik4lm69g";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/7944652cb7a7bf45f16e86ea379a104d31861e76/recipes/maxframe";
@@ -41639,6 +41711,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    mbsync = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    melpaBuild {
+        pname = "mbsync";
+        version = "20170118.448";
+        src = fetchFromGitHub {
+          owner = "dimitri";
+          repo = "mbsync-el";
+          rev = "874b6dd2debabf5dd5516db7f976634157bb7eec";
+          sha256 = "1i068rw9kg9z8pbja4qhh6cqn3ysbgf79cl31c2pvdz3p6fgaks6";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/3ef6ffa53bb0ce2ba796555e39f59534fc134aa5/recipes/mbsync";
+          sha256 = "1q5g76mspi24zwbs7h4m8bmkhab4drskha4d9b516w1f1cyg6hb6";
+          name = "mbsync";
+        };
+        packageRequires = [];
+        meta = {
+          homepage = "https://melpa.org/#/mbsync";
+          license = lib.licenses.free;
+        };
+      }) {};
     mc-extras = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild, multiple-cursors }:
     melpaBuild {
         pname = "mc-extras";
@@ -41726,12 +41819,12 @@
     meghanada = callPackage ({ cl-lib ? null, company, emacs, fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild, yasnippet }:
     melpaBuild {
         pname = "meghanada";
-        version = "20170104.2224";
+        version = "20170124.1559";
         src = fetchFromGitHub {
           owner = "mopemope";
           repo = "meghanada-emacs";
-          rev = "fe384624b5e382b331ff80bc74a17becb5b01c7c";
-          sha256 = "1l2wqjdmsh77vcxfmm8437z7rlx1avdk2bvq8w1wmps32gi52lhg";
+          rev = "04112dc5db30a98d2ec1dae41d8c6ed1c7aff0be";
+          sha256 = "0f14b1h6zv0v8hn99bqmidndh36mrsckmcirrrffm591ksf4l0zd";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/4c75c69b2f00be9a93144f632738272c1e375785/recipes/meghanada";
@@ -43086,6 +43179,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    morganey-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    melpaBuild {
+        pname = "morganey-mode";
+        version = "20170118.134";
+        src = fetchFromGitHub {
+          owner = "morganey-lang";
+          repo = "morganey-mode";
+          rev = "5cf3870432a2aeb69d373abe63b3be1f325f6d21";
+          sha256 = "04xv4v2n03axjlpm9pg3j4zjapqjb7is3anx6laa90zbw3z2iv9z";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/6d6e3fdf5ab0b51605bbeb203b9fccb6db6ef6e9/recipes/morganey-mode";
+          sha256 = "10lmbf21kh0jy567jzx1lam2hqyqygdvnngvxd97nk6pd32hy8s8";
+          name = "morganey-mode";
+        };
+        packageRequires = [ emacs ];
+        meta = {
+          homepage = "https://melpa.org/#/morganey-mode";
+          license = lib.licenses.free;
+        };
+      }) {};
     morlock = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "morlock";
@@ -43276,8 +43390,8 @@
         src = fetchFromGitHub {
           owner = "retroj";
           repo = "mowedline";
-          rev = "ad7622969366e40401af877db75940ae23b5e4fc";
-          sha256 = "0d2xabp9dkzixn7kqsxpapjcy846wgsh27l468pl2ar6pxnwwc86";
+          rev = "67ca629b4bc3063ea19a7fccc693432a4eb10021";
+          sha256 = "0i06ms5m7qhv2m1mmgzqh73j9wz3nxygz65p6vsnicxas09w70rd";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/86f7df6b8df3398ef476c0ed31722b03f16b2fec/recipes/mowedline";
@@ -43503,12 +43617,12 @@
     mtg-deck-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "mtg-deck-mode";
-        version = "20161113.1359";
+        version = "20170121.1322";
         src = fetchFromGitHub {
           owner = "mattiasb";
           repo = "mtg-deck-mode";
-          rev = "14d117dce8e082eb26007abd01f0e4af3ce3b698";
-          sha256 = "03lff20d10s5nzh6jddf8q31lm3c20zflwbklnbsrydm2w5j6d16";
+          rev = "80c2a0b61c4fc2d7a5f7e6d1ecbe882b2033a879";
+          sha256 = "02x6pmzsg4rczc146d2lvh6jwr857hqq0m44f7017h2wmvhhb9xr";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/425fa66cffe7bfda71de4ff2b49e951456bdeae1/recipes/mtg-deck-mode";
@@ -43566,12 +43680,12 @@
     mu4e-maildirs-extension = callPackage ({ dash, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "mu4e-maildirs-extension";
-        version = "20170110.519";
+        version = "20170118.150";
         src = fetchFromGitHub {
           owner = "agpchil";
           repo = "mu4e-maildirs-extension";
-          rev = "c8c22773d13450ed1a49ca05d02a285d479a9e45";
-          sha256 = "1jc16dvvgg9x17gckljd013d8rjjbr5992mrrhcnpdn5qvj145i8";
+          rev = "5a929e2e37cc48a81f61997ec74abbe6e5f8660c";
+          sha256 = "051a5ba04ajyl6vvaysshvvdjmrh3rsm2vb0gcy9jm8rf6rcxbv1";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/3b20c61c62309f27895f7427f681266e393ef867/recipes/mu4e-maildirs-extension";
@@ -43671,8 +43785,8 @@
         version = "20161204.223";
         src = fetchhg {
           url = "https://bitbucket.com/ellisvelo/multi-project";
-          rev = "a6fd748acd9b";
-          sha256 = "0j6lq5sxrn5yvxja5ag0q01bic6r6hbnfr7010ahc3bwl78yslc3";
+          rev = "8c1ef1ca48e0";
+          sha256 = "1xfix5184gach3w89c5xcp9ww9cfblm7syx9ibwp5a2pjicw5vql";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/5b7972602399f9df9139cff177e38653bb0f43ed/recipes/multi-project";
@@ -44620,16 +44734,16 @@
     ncl-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "ncl-mode";
-        version = "20160925.2200";
+        version = "20170121.231";
         src = fetchFromGitHub {
           owner = "yyr";
           repo = "ncl-mode";
-          rev = "8841c2234a6425c4aaccddbf7567828681627dd0";
-          sha256 = "1nngh564ggyb2qg8lgblls22ygfpj9dn7l6v50s7df3hy7zhkqhz";
+          rev = "cfabbbf5e49a856c9b4cb32408f28ef4378731b5";
+          sha256 = "1rq0snv7qxkh1l09ail3mjs2jjrxixryxy6z91maabj7qfp1yrqi";
         };
         recipeFile = fetchurl {
-          url = "https://raw.githubusercontent.com/milkypostman/melpa/00cc4705650157621bb0135cc512d57178496100/recipes/ncl-mode";
-          sha256 = "0hmd606xgapzbc79px9l1q6pphrhdzip495yprvg20xsdpmjlfw9";
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/2eea3936b8a3a7546450d1d7399e0f86d855fefd/recipes/ncl-mode";
+          sha256 = "1niy0w24q6q6j7s0l9fcaqai7zz2gg1qlk2s9sxb8j79jc41y47k";
           name = "ncl-mode";
         };
         packageRequires = [ emacs ];
@@ -44666,8 +44780,8 @@
         src = fetchFromGitHub {
           owner = "rsdn";
           repo = "nemerle";
-          rev = "95a09d97fdc86a570a9276a05fe42dc3c90dcbc5";
-          sha256 = "1lydpljxf0air78qrc04x9g71ixmh5g5q6ln77acnivq9gn3xha5";
+          rev = "ccf1483da01d77185f3df63c6d41be59b9bc6f20";
+          sha256 = "02znwh2qg4a31ljg8h9yd8nlk3qmdq5q0vr2c2zfrcrx3z7njamb";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/8477d0cf950efcfd9a85618a5ca48bff590b22d7/recipes/nemerle";
@@ -44960,8 +45074,8 @@
         src = fetchFromGitHub {
           owner = "martine";
           repo = "ninja";
-          rev = "9e71431e6f8323be8ced8997409cfe7a389c6583";
-          sha256 = "0lnahkq47x9w8gi89bm91mjvap4dvwpn88pjysmp4ciw04v2h8s2";
+          rev = "2993752dd617ada5218836dd6545fb06690e238b";
+          sha256 = "0lwh4jb3q7gdchapd83lg6zj9gpmff6fvlny4vfhp7q95xd7nz36";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/aed2f32a02cb38c49163d90b1b503362e2e4a480/recipes/ninja-mode";
@@ -45002,8 +45116,8 @@
         src = fetchFromGitHub {
           owner = "NixOS";
           repo = "nix";
-          rev = "c0d55f918379f46b87e43457745895439a85555c";
-          sha256 = "05kmk92f7zzincs84z6zphmwsli6jhb81hha1ili9xibqpg5983w";
+          rev = "4e6a2fbc561f3e692a5644b3816a205ba769f39e";
+          sha256 = "1z0jsckzskx9jgshilfhf0ybqx9lkk61r0ww2hk7pqxd2bhd4caq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/f2b542189cfde5b9b1ebee4625684949b6704ded/recipes/nix-mode";
@@ -45124,12 +45238,12 @@
     no-littering = callPackage ({ cl-lib ? null, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "no-littering";
-        version = "20161223.607";
+        version = "20170122.357";
         src = fetchFromGitHub {
           owner = "tarsius";
           repo = "no-littering";
-          rev = "e7d3ebbd12f176707e63766a7a19bcaa08e01331";
-          sha256 = "0y8wvagn4yf7fwvwzqcrx46wigmvyl25fa94kzvkanjl04zid3i1";
+          rev = "e161c328d248f861bb56991492182f20e60b6b41";
+          sha256 = "0ka7gbiarhc1r8rynxq2vf0k5p4044bm1jc92ca1hav34mqfg2xp";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/cf5d2152c91b7c5c38181b551db3287981657ce3/recipes/no-littering";
@@ -45939,8 +46053,8 @@
         src = fetchFromGitHub {
           owner = "lompik";
           repo = "ob-nim";
-          rev = "71131f184994e0a81ed291fc3faf1a29dae8c5f3";
-          sha256 = "011z8scb6pmhkm6qzpdqich4h4pxpac58zirddbrnal3nf37kmqh";
+          rev = "050b165817e62067b0d686d96e25bc12fb9c7d84";
+          sha256 = "18v4f23rxbl76ldzxmga1dlkammdy87aslk2p6x9l5gjr9w1xz3a";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/7263ebadeabe36359c14ffb36deda2bc75f2ca61/recipes/ob-nim";
@@ -46355,12 +46469,12 @@
     ocp-indent = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "ocp-indent";
-        version = "20170105.122";
+        version = "20160613.938";
         src = fetchFromGitHub {
           owner = "OCamlPro";
           repo = "ocp-indent";
-          rev = "4bd1a2a4df1757dfc13e19b29b74e21a9b074f99";
-          sha256 = "07ng57g25nik345p9cnjrxf7mpcfi3wqqbmk2i4yxyd4cai8hp1f";
+          rev = "4849905f909aaec03508612a092cfdf520e24984";
+          sha256 = "0p05vx17xk9591afx80pms5v16vl7kyn28sxdgzsifcjv6k8pnv7";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/e1af061328b15360ed25a232cc6b8fbce4a7b098/recipes/ocp-indent";
@@ -46802,12 +46916,12 @@
     open-in-msvs = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "open-in-msvs";
-        version = "20160928.1103";
+        version = "20170123.1428";
         src = fetchFromGitHub {
           owner = "evgeny-panasyuk";
           repo = "open-in-msvs.el";
-          rev = "488c4adb3ad89676472507dae89b1687e43a07df";
-          sha256 = "0s6qc7hn6q89nqyra633hvpx4gfas5dwrcjg7ykc306xh72ywnm3";
+          rev = "e0d071c83188ad5db8f3297d6ce784b4ed554a04";
+          sha256 = "0aiccdcll5zjy11fandd9bvld8p8srmhrh3waqc33yp4x8pjkjpd";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/09a462fac31a7ceda4ee84a8550ff1db6d11140f/recipes/open-in-msvs";
@@ -47159,14 +47273,14 @@
         pname = "org-bullets";
         version = "20140918.1137";
         src = fetchFromGitHub {
-          owner = "sabof";
+          owner = "emacsorphanage";
           repo = "org-bullets";
           rev = "b70ac2ec805bcb626a6e39ea696354577c681b36";
           sha256 = "10nr4sjffnqbllv6gmak6pviyynrb7pi5nvrq331h5alm3xcpq0w";
         };
         recipeFile = fetchurl {
-          url = "https://raw.githubusercontent.com/milkypostman/melpa/3ab2169c45aae7fb3373bf5df087d9b626167ce8/recipes/org-bullets";
-          sha256 = "1kxhlabaqi1g6pz215afp65d9cp324s8mvabjh7q1h7ari32an75";
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/fe60fc3c60d87b5fd7aa24e858c79753d5f7d2f6/recipes/org-bullets";
+          sha256 = "0yrfgd6r71rng3qipp3y9i5mpm6510k4xsfgyidcn25v27fysk3v";
           name = "org-bullets";
         };
         packageRequires = [];
@@ -47765,12 +47879,12 @@
     org-jira = callPackage ({ cl-lib ? null, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, request }:
     melpaBuild {
         pname = "org-jira";
-        version = "20170111.2044";
+        version = "20170117.2024";
         src = fetchFromGitHub {
           owner = "ahungry";
           repo = "org-jira";
-          rev = "af4115f4e8b4e77de5642fb28ce6d5e0d7cb0b70";
-          sha256 = "1g775f9gpl0nqq3vn6h9cnjazimn9bjwk31dc7fdylz3nf7f3h03";
+          rev = "8d3a36c68a948676cfc0512c68200fb2e9456508";
+          sha256 = "0pp05wxbn627y1yapya2phda2s3ddgcblvqyzv5i6q231slc3c69";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/730a585e5c9216a2428a134c09abcc20bc7c631d/recipes/org-jira";
@@ -47852,8 +47966,8 @@
         version = "20140107.519";
         src = fetchgit {
           url = "git://orgmode.org/org-mode.git";
-          rev = "4d0609f8af0db7248fa5f8eb2b69ee02665e8cbd";
-          sha256 = "1kv13imxw6k4mv8hi2ns80p78zc0r8y91mcv01nvpzvh28qnkwa2";
+          rev = "2348d1834351b57d5ff9bbdb2c74c3e69ed60cfb";
+          sha256 = "1pg47pg3rb4rcf94wj1hgznswc10x5zm8qr47bxw196c4m1imjkb";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ee69e5e7b1617a29919d5fcece92414212fdf963/recipes/org-mac-iCal";
@@ -47872,8 +47986,8 @@
         version = "20170105.1723";
         src = fetchgit {
           url = "git://orgmode.org/org-mode.git";
-          rev = "4d0609f8af0db7248fa5f8eb2b69ee02665e8cbd";
-          sha256 = "1kv13imxw6k4mv8hi2ns80p78zc0r8y91mcv01nvpzvh28qnkwa2";
+          rev = "2348d1834351b57d5ff9bbdb2c74c3e69ed60cfb";
+          sha256 = "1pg47pg3rb4rcf94wj1hgznswc10x5zm8qr47bxw196c4m1imjkb";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/b86c666ee9b0620390a250dddd42b17cbec2409f/recipes/org-mac-link";
@@ -48024,11 +48138,11 @@
     org-password-manager = callPackage ({ fetchgit, fetchurl, lib, melpaBuild, org, s }:
     melpaBuild {
         pname = "org-password-manager";
-        version = "20161226.1624";
+        version = "20170124.549";
         src = fetchgit {
           url = "https://git.leafac.com/org-password-manager";
-          rev = "b4c8de24950d9c13e90277359d078d2dc2b01063";
-          sha256 = "0azk28ib6ch3anav7xlw41lqx5lfcqwg85sai4jk6gb9qgnibv5v";
+          rev = "ec862fa9680aa37b18a7e937e84472a5bdd94635";
+          sha256 = "1ia7sjnd6z6x2m2cbf17md2adbsbnfg30z8aalb991avv9bj9lm2";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/02ef86ffe6923921cc1246e51ad8db87faa00ecb/recipes/org-password-manager";
@@ -48239,12 +48353,12 @@
     org-ref = callPackage ({ dash, emacs, f, fetchFromGitHub, fetchurl, helm, helm-bibtex, hydra, ivy, key-chord, lib, melpaBuild, s }:
     melpaBuild {
         pname = "org-ref";
-        version = "20170107.1308";
+        version = "20170120.630";
         src = fetchFromGitHub {
           owner = "jkitchin";
           repo = "org-ref";
-          rev = "31e2e9cd247a4613bcdf45703473a6345b281ee5";
-          sha256 = "15lr7v5p1n46m3lfh84fwydkbxj9x11vd81x6i5adgj68msh0pcg";
+          rev = "b94f812ad63cc3e3a12e2cd94aeba7bf959531c4";
+          sha256 = "0d2ckbw4qv5vpglhh1bcm866y8ngv7idbchhlch809gvcc2imjns";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/550e4dcef2f74fbd96474561c1cb6c4fd80091fe/recipes/org-ref";
@@ -48781,12 +48895,12 @@
     orgit = callPackage ({ dash, emacs, fetchFromGitHub, fetchurl, lib, magit, melpaBuild, org }:
     melpaBuild {
         pname = "orgit";
-        version = "20161105.857";
+        version = "20170118.1647";
         src = fetchFromGitHub {
           owner = "magit";
           repo = "orgit";
-          rev = "adcfef22dc9bfa6503513d0a937bf4b32ad7ab94";
-          sha256 = "0f3lqw2b9xr0278s7502sa2hkyhml45j8jpssaicyliz2k1kiyzv";
+          rev = "cbce5871fe267fef725631b0b7365952c35ae401";
+          sha256 = "00iwp3bajr9hxs55rj3ka5bymhp5icsq8m44z514sb8h54fwapb7";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/73b5f7c44c90540e4cbdc003d9881f0ac22cc7bc/recipes/orgit";
@@ -49352,8 +49466,8 @@
         src = fetchFromGitHub {
           owner = "jkitchin";
           repo = "scimax";
-          rev = "0e9fa4ba5fc454e2312f8b3a6eb86cb63d3ff7ec";
-          sha256 = "12qp9s9h56230882dfqz5006f5mjkxxvsp87y8n1jyx4vs10rk4i";
+          rev = "94713fe129cd723f26b066158ac0e061be77d22e";
+          sha256 = "1gqvw2130725sdg1g6binpqb5m73klrczniwkj3dfyd65mcynxy7";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/222ccf4480395bda8c582ad5faf8c7902a69370e/recipes/ox-clip";
@@ -50080,12 +50194,12 @@
     palimpsest = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "palimpsest";
-        version = "20161029.400";
+        version = "20170119.1232";
         src = fetchFromGitHub {
           owner = "danielsz";
           repo = "Palimpsest";
-          rev = "7f5f43080155c53099f3174cb09684d77924d771";
-          sha256 = "1z2acbmxsxfcw5d39zdzhg6l3r24m22nrfrp18j52d4i2jqawjfa";
+          rev = "e6d5944393c260ceb724462c84046cc62c9ae916";
+          sha256 = "0vw3lv02rf8f9vm379zff4l85psjwxsrvba4xcpdkqi1w4rbsnxr";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/14f6d011a0314637a2f4c1b00efa4912e67b7fa4/recipes/palimpsest";
@@ -50811,12 +50925,12 @@
     pcmpl-git = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "pcmpl-git";
-        version = "20160110.2255";
+        version = "20170120.1659";
         src = fetchFromGitHub {
           owner = "leoliu";
           repo = "pcmpl-git-el";
-          rev = "1f866246e14756792e66643d89e2e2e0ec8e2635";
-          sha256 = "0pspxgicc0mkypp94r0jydmkjr3ngv8y4w1xpj93kp79hnvyls0a";
+          rev = "9472ac70baeda025ef7becd1cf141d72aec93f32";
+          sha256 = "17y3rdp7fgyg4i9hwyzgpv1d19i5c6rqdf1gm5bdm2csk12vfg9n";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/6a51c16bed8d0a2fecad0ae9580d58cd44cc8930/recipes/pcmpl-git";
@@ -50958,12 +51072,12 @@
     pdf-tools = callPackage ({ emacs, fetchFromGitHub, fetchurl, let-alist, lib, melpaBuild, tablist }:
     melpaBuild {
         pname = "pdf-tools";
-        version = "20161207.521";
+        version = "20170119.1442";
         src = fetchFromGitHub {
           owner = "politza";
           repo = "pdf-tools";
-          rev = "3ecbbaf1606d23fb1abbefb6d359f47aaf153f84";
-          sha256 = "1jn118f3mdz7wb1a58myahj4ir29rwxbfx1595gjcxkkpw0cyw11";
+          rev = "9dafe31ce233eb549f402ccd7abed495c81ab152";
+          sha256 = "1kwnac2v0pr3iirq7bhbzb61z3pficybv23i6bcsrxjp3vfahpfx";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/8e3d53913f4e8a618e125fa9c1efb3787fbf002d/recipes/pdf-tools";
@@ -51230,12 +51344,12 @@
     persp-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "persp-mode";
-        version = "20170115.651";
+        version = "20170123.1056";
         src = fetchFromGitHub {
           owner = "Bad-ptr";
           repo = "persp-mode.el";
-          rev = "06d56333d738c57fa543e47e7eb1c4962bd14344";
-          sha256 = "0khzfh7qqfqpmjqb0kaz3s5kpf1a8inxln5awap5xh2z6fv6wysy";
+          rev = "70290b60fd20850c728a63d763037fac69fd1874";
+          sha256 = "1dw17m0dczry3chyw3yks33jqzr7zgccx3xdjv0lziwfxdnwkaji";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/caad63d14f770f07d09b6174b7b40c5ab06a1083/recipes/persp-mode";
@@ -51293,12 +51407,12 @@
     perspeen = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, powerline }:
     melpaBuild {
         pname = "perspeen";
-        version = "20170117.417";
+        version = "20170121.1844";
         src = fetchFromGitHub {
           owner = "seudut";
           repo = "perspeen";
-          rev = "057f145f88fdfc021c574b7c263269e381494f4b";
-          sha256 = "1a5cjvc21ga2j2y7rxcfxwkc0x9v5mrwla9prm021q4sg07gvld7";
+          rev = "beff7fd743b0fcbc1091e1e9d28688e52962225e";
+          sha256 = "0csa5cqbzj3kggl10bf6mcq4v3nq9y282hlk68p6qbz79injg7bv";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/19bead132fbc4c179bfe8720c28424028c9c1323/recipes/perspeen";
@@ -53704,6 +53818,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    promise = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    melpaBuild {
+        pname = "promise";
+        version = "20170118.431";
+        src = fetchFromGitHub {
+          owner = "chuntaro";
+          repo = "emacs-promise";
+          rev = "250cb722bbcc06358be57c4e26b08a2416e7612f";
+          sha256 = "0jv9761fw0p06sb853r19cp87s4cyyfbb3r5abhk8j466nvw49f4";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/3eaf5ac668008759677b9cc6f11406abd573012a/recipes/promise";
+          sha256 = "1y1v3ikcmh9yp5fdwagcjg755bgkyqk714lb6s1hb2606m3ia03s";
+          name = "promise";
+        };
+        packageRequires = [ emacs ];
+        meta = {
+          homepage = "https://melpa.org/#/promise";
+          license = lib.licenses.free;
+        };
+      }) {};
     prompt-text = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "prompt-text";
@@ -53816,8 +53951,8 @@
         src = fetchFromGitHub {
           owner = "google";
           repo = "protobuf";
-          rev = "c9cd6acd71e928164db10602b9d0837216ee367e";
-          sha256 = "0rm2476gvsqsyhblw0bwa4qacpdckp6r44d2qrznysdq9086lyjj";
+          rev = "0aa5af3e68940325a1c4ef9a8cacb3d072ba4baa";
+          sha256 = "03wk1hqm7xzxq20a8klc630219sja6z26lzgzhcf6af1s1cn9x8p";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/b4e7f5f641251e17add561991d3bcf1fde23467b/recipes/protobuf-mode";
@@ -53833,12 +53968,12 @@
     psc-ide = callPackage ({ cl-lib ? null, company, dash, dash-functional, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, s }:
     melpaBuild {
         pname = "psc-ide";
-        version = "20161220.553";
+        version = "20170122.333";
         src = fetchFromGitHub {
           owner = "epost";
           repo = "psc-ide-emacs";
-          rev = "5a1cce36241cd0ec3781d748d6ef151e685079a3";
-          sha256 = "191gvvliarvvkcjw54ajjfshv6n29sk5m0dj3h8j5zw5ndnlw6cj";
+          rev = "5224da8df475fbd374ebc0e0690cee4a53a42477";
+          sha256 = "01xjmqb2mc4q1pf9gc9jf7gasn46b5ny5jg0w4mkl9llh2p3p8fw";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/8189f4e7d6742d72fb22acf61a9d7eb0bffb2d93/recipes/psc-ide";
@@ -54043,12 +54178,12 @@
     puppet-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, pkg-info }:
     melpaBuild {
         pname = "puppet-mode";
-        version = "20161204.713";
+        version = "20170120.1813";
         src = fetchFromGitHub {
           owner = "voxpupuli";
           repo = "puppet-mode";
-          rev = "bfa9512bcaa91cc2068d280d646d7a794da82905";
-          sha256 = "09jfb9xldpcg7z9hh7yka1pcrm008h6sx209lhnwmg2qn5dj4rsb";
+          rev = "3df623f41134c260d591c1fde1a82e99a09cd527";
+          sha256 = "02glqgs484zg5izrvd8r7iai2glwy4qsqv2y4chq6d5i1f2fdrp2";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/1de94f0ab39ab18dfd0b050e337f502d894fb3ad/recipes/puppet-mode";
@@ -54151,8 +54286,8 @@
         version = "20160718.857";
         src = fetchgit {
           url = "https://git.flintfam.org/swf-projects/emacs-pushover.git";
-          rev = "0d821fc23818918bf136e47449bce53d4e51e404";
-          sha256 = "0v0dkhymh81z1wcd3nm5vrs5scz9466brr8xng0254bi3yn0yi57";
+          rev = "c43f149eaef832f6af399723a5a59424aa093aaa";
+          sha256 = "0vrx8m7jcxavbfsyh35mf289vfyal0yrfl6h2m2yfx81whbinb5j";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/2e12638554a13ef49ab24da08fe20ed2a53dbd11/recipes/pushover";
@@ -54168,12 +54303,12 @@
     px = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "px";
-        version = "20141006.548";
+        version = "20170123.851";
         src = fetchFromGitHub {
           owner = "aaptel";
           repo = "preview-latex";
-          rev = "c698a650997a1d5b06b92acc8f30d620342e1f37";
-          sha256 = "10g4imxgpv7a0j40qkx7xf2qnyz80ypd0mv0lf47n9dwln5byln3";
+          rev = "446f2c4670ae5a0e62393871190423333c531660";
+          sha256 = "02rr4akm93c42zvlm5l1q8q7wipa051bcfv6h52p6fksw18ablha";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/326fc9b057a5016248ac36ca166e9a38f13babf6/recipes/px";
@@ -54500,22 +54635,22 @@
           license = lib.licenses.free;
         };
       }) {};
-    pyimport = callPackage ({ dash, fetchFromGitHub, fetchurl, lib, melpaBuild, s }:
+    pyimport = callPackage ({ dash, fetchFromGitHub, fetchurl, lib, melpaBuild, s, shut-up }:
     melpaBuild {
         pname = "pyimport";
-        version = "20170117.402";
+        version = "20170120.307";
         src = fetchFromGitHub {
           owner = "Wilfred";
           repo = "pyimport";
-          rev = "e2f6d2cf5a6772a8de698e67768ae2f82a43419e";
-          sha256 = "0lkkycflmkzziwr90njx8d68903m1bpb71awlb23dslw92qvl3fj";
+          rev = "60725d1632562789374808f6c1496e76ae751fcd";
+          sha256 = "1ldj79sg8ps1n7wzymyhsdh3gfrrm48dhpb08ihi3ng126qdikxs";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/71bc39b06cee37814960ef31c6a2056261b802fb/recipes/pyimport";
           sha256 = "1qwigplawknykw1kbm5babyyknzn43ddhbdpahvzh4wy3kycn6n8";
           name = "pyimport";
         };
-        packageRequires = [ dash s ];
+        packageRequires = [ dash s shut-up ];
         meta = {
           homepage = "https://melpa.org/#/pyimport";
           license = lib.licenses.free;
@@ -54549,8 +54684,8 @@
         src = fetchFromGitHub {
           owner = "PyCQA";
           repo = "pylint";
-          rev = "da1da56853380a5a387ad287f4398402b14ef123";
-          sha256 = "1rvflbiz6ick1v2v6fw3f227rgs5fvhxaxyhvri0lv5n6ixljk8l";
+          rev = "5b1b24a4b40f2a885cca2c4550d326fe40839600";
+          sha256 = "0jy0avk7x7r8ljjiyv5hbsamjsnl7vkr6w5ksbyf2nfgb7f3fjlq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/a073c91d6f4d31b82f6bfee785044c4e3ae96d3f/recipes/pylint";
@@ -54692,12 +54827,12 @@
     python-mode = callPackage ({ fetchFromGitLab, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "python-mode";
-        version = "20170117.130";
+        version = "20170117.455";
         src = fetchFromGitLab {
           owner = "python-mode-devs";
           repo = "python-mode";
-          rev = "d20b482c2c10f086174c6bf7d5aa86867d9a9b8a";
-          sha256 = "01jhzrm4w4lpslivkc1d9f00qmnnrfai5agl7pv6fjfhd7njwzg1";
+          rev = "49353d3d4b53470fa0493c13e5e33c77edb0f66d";
+          sha256 = "1w0b35789jhasqyz5g0fsp61mjikhbbjdripiwaam377b7k0w1bq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/82861e1ab114451af5e1106d53195afd3605448a/recipes/python-mode";
@@ -54881,12 +55016,12 @@
     quasi-monochrome-theme = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "quasi-monochrome-theme";
-        version = "20160913.638";
+        version = "20170124.136";
         src = fetchFromGitHub {
           owner = "lbolla";
           repo = "emacs-quasi-monochrome";
-          rev = "75c515a30a77aa4661e41d67e5bba13f422bdf60";
-          sha256 = "1932vjindz0mkfizbs1d19af9p78kl9cd05isjbd5sjwzs420bd9";
+          rev = "7d3afe41c2696ee25e3e4bcce987af1f589208d6";
+          sha256 = "0bn1yzxzj6r1k3xcp45l04flq4avzlh0sbjfyiw4nglfhliyvwcf";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/a9c8498e4bcca19c4c24b2fd0db035c3da477e2a/recipes/quasi-monochrome-theme";
@@ -55175,12 +55310,12 @@
     railscasts-reloaded-theme = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "railscasts-reloaded-theme";
-        version = "20161115.2210";
+        version = "20170120.434";
         src = fetchFromGitHub {
           owner = "thegeorgeous";
           repo = "railscasts-reloaded-theme";
-          rev = "cce0e4ae6527e84e2ae3deb8b3c7770dda225853";
-          sha256 = "1li86qpbjg8sm9q4sl8cffc0fni6mwx8180x8zlmsxdnhqic5nvd";
+          rev = "9ff7a3223213637c77622a695f98b9b0ac0ff91a";
+          sha256 = "08yg5g6d9a971zq71mxci3228mayr6k7s1b0b78nx55qmkzh6409";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/9817851bd06cbae30fb8f429401f1bbc0dc7be09/recipes/railscasts-reloaded-theme";
@@ -56598,12 +56733,12 @@
     request = callPackage ({ cl-lib ? null, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "request";
-        version = "20170113.423";
+        version = "20170120.414";
         src = fetchFromGitHub {
           owner = "tkf";
           repo = "emacs-request";
-          rev = "e2b031a4e7655ce7513b8e7d7f83c024cb2a9f35";
-          sha256 = "0r6wf3h7rwjid818aqrvf2r6dwq02mwn3y4lj7lrkl7vyf5g3va5";
+          rev = "2d9b4cd49a4b0196f23ce07dc0a4af7b0b724d3b";
+          sha256 = "060mz0jzpyd741pi9ynk7pmfz85gkkjbk7jngc8h4ksj27pi3ia2";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/8d113615dde757a60ce91e156f0714a1394c4bfc/recipes/request";
@@ -56623,8 +56758,8 @@
         src = fetchFromGitHub {
           owner = "tkf";
           repo = "emacs-request";
-          rev = "e2b031a4e7655ce7513b8e7d7f83c024cb2a9f35";
-          sha256 = "0r6wf3h7rwjid818aqrvf2r6dwq02mwn3y4lj7lrkl7vyf5g3va5";
+          rev = "2d9b4cd49a4b0196f23ce07dc0a4af7b0b724d3b";
+          sha256 = "060mz0jzpyd741pi9ynk7pmfz85gkkjbk7jngc8h4ksj27pi3ia2";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/8d113615dde757a60ce91e156f0714a1394c4bfc/recipes/request-deferred";
@@ -56946,22 +57081,22 @@
           license = lib.licenses.free;
         };
       }) {};
-    rg = callPackage ({ cl-lib ? null, fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    rg = callPackage ({ cl-lib ? null, fetchFromGitHub, fetchurl, lib, melpaBuild, s }:
     melpaBuild {
         pname = "rg";
-        version = "20170115.45";
+        version = "20170121.945";
         src = fetchFromGitHub {
           owner = "dajva";
           repo = "rg.el";
-          rev = "96114ceeea83db703f41bed18f03d87e217c1c67";
-          sha256 = "00k9lyzy11igk0j1raq3qgymfc872rf85fj42244lpmbnij4hgjd";
+          rev = "be8a125addb795a8f695c1064a4e0a90549ba4bf";
+          sha256 = "019h11faj6fzz54gpilxcqbl78wx9vfpqmwn31y5syjmjp9d3fxx";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/9ce1f721867383a841957370946f283f996fa76f/recipes/rg";
           sha256 = "0i78qvqdznh1z3b0mnzihv07j8b9r86dc1lsa1qlzacv6a2i9sbm";
           name = "rg";
         };
-        packageRequires = [ cl-lib ];
+        packageRequires = [ cl-lib s ];
         meta = {
           homepage = "https://melpa.org/#/rg";
           license = lib.licenses.free;
@@ -57348,12 +57483,12 @@
     rtags = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "rtags";
-        version = "20170111.2258";
+        version = "20170121.2345";
         src = fetchFromGitHub {
           owner = "Andersbakken";
           repo = "rtags";
-          rev = "6e60bce8ae998e61c9cea6ceff3564a73a9efe73";
-          sha256 = "1y9m1dh946qzpad2fp2dlyjsaj9hqhwf8gvg8zffxvchd5clhnls";
+          rev = "14e5d3acf3f5c50fb81ed0fc0b69d290263c3c97";
+          sha256 = "1ryyf9kpv6rmsz1j4d1mlsgp10yj1cinxp6xd8qc558a2v4mnar4";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ac3b84fe84a7f57d09f1a303d8947ef19aaf02fb/recipes/rtags";
@@ -57387,22 +57522,22 @@
           license = lib.licenses.free;
         };
       }) {};
-    rubocop = callPackage ({ dash, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    rubocop = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "rubocop";
-        version = "20161015.1200";
+        version = "20170123.906";
         src = fetchFromGitHub {
           owner = "bbatsov";
           repo = "rubocop-emacs";
-          rev = "42198901d3bc0a3170b403dc194203f7c07bdb13";
-          sha256 = "0vwnn087h0fgr5wr2c4qa3lwzprd2hyip5vkix7hr79linp2qnzl";
+          rev = "d4dad3209f05288bdbe3a31f47794047b87fa424";
+          sha256 = "1w1mbp04sqsa4jl8ix05i8af9095zbblcjxkhgmj4x57s8yfsiap";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/00f2cf3e8e28bce5c26c86aba54390ffff48d7da/recipes/rubocop";
           sha256 = "114azl0fasmnq0fxxyiif3363mpg8qz3ynx91in5acqzh902fa3q";
           name = "rubocop";
         };
-        packageRequires = [ dash emacs ];
+        packageRequires = [ emacs ];
         meta = {
           homepage = "https://melpa.org/#/rubocop";
           license = lib.licenses.free;
@@ -57414,7 +57549,7 @@
         version = "20161115.2259";
         src = fetchsvn {
           url = "http://svn.ruby-lang.org/repos/ruby/trunk/misc/";
-          rev = "57357";
+          rev = "57415";
           sha256 = "0n4gnpms3vyvnag3sa034yisfcfy5gnwl2l46krfwy6qjm1nyzhf";
         };
         recipeFile = fetchurl {
@@ -57494,7 +57629,7 @@
         version = "20150424.752";
         src = fetchsvn {
           url = "http://svn.ruby-lang.org/repos/ruby/trunk/misc/";
-          rev = "57357";
+          rev = "57415";
           sha256 = "0n4gnpms3vyvnag3sa034yisfcfy5gnwl2l46krfwy6qjm1nyzhf";
         };
         recipeFile = fetchurl {
@@ -57742,12 +57877,12 @@
     rust-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "rust-mode";
-        version = "20170107.451";
+        version = "20170117.824";
         src = fetchFromGitHub {
           owner = "rust-lang";
           repo = "rust-mode";
-          rev = "c091852fbda25c62095513753b44d3fcaf8eb340";
-          sha256 = "09m20csdn5f33cixq1wzi0682d85ld9rvi408s64h4bzkrgfn6h8";
+          rev = "0de149a9ad04f652cd7a59a9ef67be8a7d86ba76";
+          sha256 = "0cj12mz47k20d2lrnwr81ijbs42wjpdzmw646yghvazdrq23b12h";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/8f6e5d990d699d571dccbdeb13327b33389bb113/recipes/rust-mode";
@@ -58124,8 +58259,8 @@
         src = fetchFromGitHub {
           owner = "openscad";
           repo = "openscad";
-          rev = "acb5331a94091b13ee9f9caec926d57386eded65";
-          sha256 = "1jbcxd5ws9prlzglpxdfv3f22ncmb2b596l3zxym5z645521bcar";
+          rev = "53bc30ca76b4650373df80953fe81ffdc58eaf90";
+          sha256 = "1xbbfizd5i3fd05q7paxp383i53ahgny7yc32zrp8wjnmxzk1lsp";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/2d27782b9ac8474fbd4f51535351207c9c84984c/recipes/scad-mode";
@@ -58162,12 +58297,12 @@
     scala-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "scala-mode";
-        version = "20161222.900";
+        version = "20170118.558";
         src = fetchFromGitHub {
           owner = "ensime";
           repo = "emacs-scala-mode";
-          rev = "9b8db623b13fcb0aad9271d1fae73e1257dda13c";
-          sha256 = "0q41dqlhp0cds16inmh7jrvhqrnjsdiv2in6pq3f0srhwms81ff3";
+          rev = "7e6300231143133252e6ed1f3d5c86ea4e625e33";
+          sha256 = "081bw6gkrww7bqi7pwj4sifmqscr5sbpl3zl1rw86npv5fpyjq9j";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/564aa1637485192a97803af46b3a1f8e0d042c9a/recipes/scala-mode";
@@ -59509,12 +59644,12 @@
     shm = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "shm";
-        version = "20170102.531";
+        version = "20170119.135";
         src = fetchFromGitHub {
           owner = "chrisdone";
           repo = "structured-haskell-mode";
-          rev = "993ff90454389401e606ee3d4ad1548c5e6508f1";
-          sha256 = "1bvzi12z2rlc7p4n731dbmw68719yfy585f8g6xr0dsj5x20gh11";
+          rev = "65910d24db7eb85890cce76baca419efc7d8fb5a";
+          sha256 = "1cn2kh5ccp09mg6y743vh2y9m96m0zbnh9w5infl9nj9xbidza72";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/68a2fddb7e000487f022b3827a7de9808ae73e2a/recipes/shm";
@@ -59713,12 +59848,12 @@
     sicp = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "sicp";
-        version = "20161219.542";
+        version = "20170124.1650";
         src = fetchFromGitHub {
           owner = "webframp";
           repo = "sicp-info";
-          rev = "d2abe9ef3c4630511bca320161752d1d4babdbef";
-          sha256 = "089mnsaqdr2bcmnrwkrvd0hyq2j0fdnh4ap393m5xnj2riyszdjf";
+          rev = "935da01b7aa782a1a7f9fd17b5512132b197da8c";
+          sha256 = "0mgbhf5cp7z6yd5kl5x4whlc6nfm2lqq6khxcmilrbgv4was55sj";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/4e39cd8e8b4f61c04fa967def6a653bb22f45f5b/recipes/sicp";
@@ -60110,12 +60245,12 @@
     skewer-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, js2-mode, lib, melpaBuild, simple-httpd }:
     melpaBuild {
         pname = "skewer-mode";
-        version = "20161205.419";
+        version = "20170122.938";
         src = fetchFromGitHub {
           owner = "skeeto";
           repo = "skewer-mode";
-          rev = "3417b6f306dfcddde17b86f29a336b76420cce89";
-          sha256 = "05bz5bsj3vkfjp1wh477fzjlkv5hbhr4anfxlx2a1r7wimmlrmbd";
+          rev = "18a90f401451f8ca0486bdaf45647ac3ccebc0ac";
+          sha256 = "1y25c3mq5fzlsjjj98p75jxynk1aaj72vp1zi6jrr2g8hay1yi31";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/10fba4f7935c78c4fc5eee7dbb161173dea884ba/recipes/skewer-mode";
@@ -60194,12 +60329,12 @@
     slack = callPackage ({ alert, circe, emojify, fetchFromGitHub, fetchurl, lib, melpaBuild, oauth2, request, websocket }:
     melpaBuild {
         pname = "slack";
-        version = "20170111.732";
+        version = "20170124.1831";
         src = fetchFromGitHub {
           owner = "yuya373";
           repo = "emacs-slack";
-          rev = "1b5c7e82e3ee9c1cd4b23498d7516503cdb7d18a";
-          sha256 = "0x7lc5l2mmr3c8jj37hb9gyyd0r682fx8rmyqi73yaq01bpqswnk";
+          rev = "dde1abb46558fc47a642853ac352985e9f7f7026";
+          sha256 = "1znscxiff64r9091vy8z18q53b4m73ghbf23hwhqv66wrp7g4bd5";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/f0258cc41de809b67811a5dde3d475c429df0695/recipes/slack";
@@ -60257,12 +60392,12 @@
     slime = callPackage ({ cl-lib ? null, fetchFromGitHub, fetchurl, lib, macrostep, melpaBuild }:
     melpaBuild {
         pname = "slime";
-        version = "20161109.640";
+        version = "20170122.245";
         src = fetchFromGitHub {
           owner = "slime";
           repo = "slime";
-          rev = "786c032a95cc78d3e294abe1b12e09880381efe2";
-          sha256 = "1sv3x7q5b8ablzv0wf7g8sg4vk4gjggylfh0zigx9bpxk0dvj5jj";
+          rev = "38416762c68dfa793f8e4f7c686137ab99b0a18f";
+          sha256 = "0gjlhbvw2kfhqn01v60apjmp948pmzfmaancdb93ibs6z4dxfpz1";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/14c60acbfde13d5e9256cea83d4d0d33e037d4b9/recipes/slime";
@@ -61670,8 +61805,8 @@
         src = fetchFromGitHub {
           owner = "nathankot";
           repo = "company-sourcekit";
-          rev = "a28ac4811fac929686aca6aa6976845c02d6efd3";
-          sha256 = "09vv6bhiahazjwzg5083b23z3xz5f4b3d4jra61m5xffkmjnbs9s";
+          rev = "3286a0dceea6f68b155dd4608db3ccf555f00938";
+          sha256 = "0xxwy5nahaafk5w3ybr1g898fiz6r7hjwr445z64v5pg862r8lkl";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/45969cd5cd936ea61fbef4722843b0b0092d7b72/recipes/sourcekit";
@@ -63699,8 +63834,8 @@
         src = fetchFromGitHub {
           owner = "abo-abo";
           repo = "swiper";
-          rev = "ee91a2511797c9293d3b0efa444bb98414d5aca5";
-          sha256 = "0mrv0z62k0pk8k0ik9kazl86bn8x4568ny5m8skimvi2gwxb08w6";
+          rev = "75f9cebc6a44cc5aff51f403bae4774736ea52bd";
+          sha256 = "09xdlgwl40cb9kf622nnadh0g14g78p78yqmxfgy1wm3vbp0id99";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/e64cad81615ef3ec34fab1f438b0c55134833c97/recipes/swiper";
@@ -64132,12 +64267,12 @@
     systemd = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "systemd";
-        version = "20161231.2103";
+        version = "20170122.1745";
         src = fetchFromGitHub {
           owner = "holomorph";
           repo = "systemd-mode";
-          rev = "b561c6bce9828e67c986903c24fb524451a02e64";
-          sha256 = "19jkiiyaxqyxqzmgg2n0hcp7az23jhkajsr5n7ha48mh690n2ga1";
+          rev = "bd94a2cb97ba66f06f564679eecdacb9c3c7456f";
+          sha256 = "1l83j79phd2q8m3bmyl7fglijymppjmffpmmqvmvv72cn103rlgf";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ca810e512c357d1d0130aeeb9b46b38c595e3351/recipes/systemd";
@@ -64425,12 +64560,12 @@
     tao-theme = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "tao-theme";
-        version = "20170116.2155";
+        version = "20170121.111";
         src = fetchFromGitHub {
           owner = "11111000000";
           repo = "tao-theme-emacs";
-          rev = "69b816277c334c8f4ec7da8f283d52df951d5584";
-          sha256 = "0fz59291wwrm5jdrq3qzkbihh2wvypp23hxcy24d0pp3nmav5g0a";
+          rev = "228fd8573f526141e502609ac1b7c34ab97a68d1";
+          sha256 = "0nw8akvhkhw8hs9hrg4081bdyp8h3kz39y8nzp62r9m46sza0fn0";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/94b70f11655944080507744fd06464607727ecef/recipes/tao-theme";
@@ -64870,8 +65005,8 @@
         src = fetchFromGitHub {
           owner = "ternjs";
           repo = "tern";
-          rev = "2489fd3177a670ad6fdb864d0abf6e79355b2b7a";
-          sha256 = "0m4bj93i42705hqnjzd6b1ahh2ibbg05wxggnxanmqssfv7hmq18";
+          rev = "4a88712c7fedfc63f079ae389f247dcd0349d960";
+          sha256 = "1vnpwkcf17i6akx2wgwj9g6spvdih3xp56gf8705bkfknisykxrz";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/eaecd67af24050c72c5df73c3a12e717f95d5059/recipes/tern";
@@ -64891,8 +65026,8 @@
         src = fetchFromGitHub {
           owner = "ternjs";
           repo = "tern";
-          rev = "2489fd3177a670ad6fdb864d0abf6e79355b2b7a";
-          sha256 = "0m4bj93i42705hqnjzd6b1ahh2ibbg05wxggnxanmqssfv7hmq18";
+          rev = "4a88712c7fedfc63f079ae389f247dcd0349d960";
+          sha256 = "1vnpwkcf17i6akx2wgwj9g6spvdih3xp56gf8705bkfknisykxrz";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/eaecd67af24050c72c5df73c3a12e717f95d5059/recipes/tern-auto-complete";
@@ -65342,8 +65477,8 @@
         src = fetchFromGitHub {
           owner = "apache";
           repo = "thrift";
-          rev = "5f723cd53980f395a92c438790a127cbd5699d90";
-          sha256 = "1zf3ddyz8579kcwrbhb09nn5r0wxjwmafmrnrwljlch0kxwp79nl";
+          rev = "b62247e0ea23139a9922a1de965357907319e937";
+          sha256 = "0fcdwvjfhbyy5vm9f1q1c9g63zvpdmxgl94f459rgbvlxr2qhq1f";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/857ab7e3a5c290265d88ebacb9685b3faee586e5/recipes/thrift";
@@ -65399,12 +65534,12 @@
     tide = callPackage ({ cl-lib ? null, dash, fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild, typescript-mode }:
     melpaBuild {
         pname = "tide";
-        version = "20170107.1619";
+        version = "20170119.122";
         src = fetchFromGitHub {
           owner = "ananthakumaran";
           repo = "tide";
-          rev = "026af0842856bcc6dba26272feb1c9bec557de9d";
-          sha256 = "0315lr5xs2ncw6k8d24ms0jk4k83x9jrzvn7534ciny7jjkll6fq";
+          rev = "bd89d93d9803319ba86eff0173821deb978ae2ac";
+          sha256 = "1a736r1igq66hn6ig4l7c5xaxcyk2kxvj26laphakk1xg8j5x52k";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/a21e063011ebbb03ac70bdcf0a379f9e383bdfab/recipes/tide";
@@ -66539,12 +66674,12 @@
     tuareg = callPackage ({ caml, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "tuareg";
-        version = "20170109.1459";
+        version = "20170124.551";
         src = fetchFromGitHub {
           owner = "ocaml";
           repo = "tuareg";
-          rev = "5d53d1cc0478356602dc3d8a838445de9aa2a84a";
-          sha256 = "0qj4racbh4fwsbgm08phbgcam2m348rcli950nd27sn7vza8vcy4";
+          rev = "96b6ed94b1cbf4c4dd61abc928ea95f6645abfe1";
+          sha256 = "0v95za3d2xnk34lkqkkzbllwc1bc3hgza3dh84np5cfbgn7davsq";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/01fb6435a1dfeebdf4e7fa3f4f5928bc75526809/recipes/tuareg";
@@ -67923,12 +68058,12 @@
     vcl-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "vcl-mode";
-        version = "20160613.746";
+        version = "20170119.1251";
         src = fetchFromGitHub {
           owner = "ssm";
           repo = "vcl-mode";
-          rev = "5c3d4bff510c3eaf08fe30e9bac99be9ec0a97bf";
-          sha256 = "1478marxzl3kq79ssnfzjv5yxcqipkmckls1h65vm8mf5f86svgf";
+          rev = "3d86c1352a7370d558d25f4c8f7be744e7d27332";
+          sha256 = "1zp59p8pw65qy7s9y17a52y1pm35hajdfn3p1kfm1y3vmfxf9x3a";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/bcbe3892fd20e624117de534ca92ba3fba1669a1/recipes/vcl-mode";
@@ -68986,12 +69121,12 @@
     web-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "web-mode";
-        version = "20170114.906";
+        version = "20170118.1211";
         src = fetchFromGitHub {
           owner = "fxbois";
           repo = "web-mode";
-          rev = "3e74b741abf8d3113a67ab6b48fba7fdd404e712";
-          sha256 = "0lagq9gzm8wrypks2zc5qjz1pqjhhlg4dxji9c1zdji5kq3bhqz5";
+          rev = "5c626c98128724482336a1352e1e2af89d17a0c3";
+          sha256 = "0yzriypf19s1x9rqrvbal5986d3prhd72nh81w1fhvszci2nn2kd";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/6f0565555eaa356141422c5175d6cca4e9eb5c00/recipes/web-mode";
@@ -69939,12 +70074,12 @@
     with-editor = callPackage ({ async, dash, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "with-editor";
-        version = "20161231.826";
+        version = "20170111.609";
         src = fetchFromGitHub {
           owner = "magit";
           repo = "with-editor";
-          rev = "2248a63f6eb6e7720881b508639d9a00d2db9ea0";
-          sha256 = "0g5ch1a5myrmazxcbbak01q4k3x8yp3kbn73d2h26j2jmsqvdy1n";
+          rev = "8ae3c7aed92842f5988671c1b3350c65c58857e0";
+          sha256 = "1jy5jxkr99a9qp7abmncaphp0xd3y6m3fflvj3fq1wp33i3f7cfn";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/8c52c840dc35f3fd17ec660e113ddbb53aa99076/recipes/with-editor";
@@ -70002,12 +70137,12 @@
     wolfram = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "wolfram";
-        version = "20161017.127";
+        version = "20170122.2356";
         src = fetchFromGitHub {
           owner = "hsjunnesson";
           repo = "wolfram.el";
-          rev = "c66e9daa644856e02990f6a775e7b54f4e969e18";
-          sha256 = "1iswap3aqj0ykd2d62xfb4fgp5r1arkgln6fzl2b4dji399b2xyy";
+          rev = "6b5dceae3fd6cdb4d7562510deeafa02c93c010b";
+          sha256 = "1ijyjw2793i7n00i30ma8lw4fzi9w63m6k0xgjx6j78r5y7pfj2g";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/785b5b1ec73e6376f2f2bb405707a1078398fa3a/recipes/wolfram";
@@ -70485,12 +70620,12 @@
     xah-find = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "xah-find";
-        version = "20161221.1705";
+        version = "20170124.1342";
         src = fetchFromGitHub {
           owner = "xahlee";
           repo = "xah-find";
-          rev = "27fabf6ef557007ba93b667d0a79823420a0144f";
-          sha256 = "0pli4p1q43hk2zy9lgm324njm82jwmpldhbvdiv4f6zbkv44xrhr";
+          rev = "0bd47dc9b570a1526cd3e387280280f20f6a5602";
+          sha256 = "1nl8xgkcvnpp4iwcxvvdr3fb6kz5zjxdvkk6ldnybrcypg0xndsg";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/1d94ffd9c3380cd56770f253e43d566a95083e37/recipes/xah-find";
@@ -70506,12 +70641,12 @@
     xah-fly-keys = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "xah-fly-keys";
-        version = "20170116.2003";
+        version = "20170122.1730";
         src = fetchFromGitHub {
           owner = "xahlee";
           repo = "xah-fly-keys";
-          rev = "9c8d51eb4441351c71854612eb990246ff23b8b5";
-          sha256 = "11l2jhn82r6aavc4wkcn0w5f2g2hilaz3a3v2fv70gd1x7spw0w7";
+          rev = "268681a0964f1b54908cac52b65a4209923dbf32";
+          sha256 = "14dkx2x2wk5fhdjyr8f3lsnknpm086scncbd6r1vsk6d6k7d9qyf";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/fc1683be70d1388efa3ce00adc40510e595aef2b/recipes/xah-fly-keys";
@@ -71262,12 +71397,12 @@
     yankpad = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "yankpad";
-        version = "20170116.1451";
+        version = "20170124.1014";
         src = fetchFromGitHub {
           owner = "Kungsgeten";
           repo = "yankpad";
-          rev = "ff1064bbc4189f93433c3eebb9d0dde72a27e6c6";
-          sha256 = "1spriw8c4qv7c349p8m29j5x6b72ysbpffcc444rdd9s1yypizzf";
+          rev = "d2ea6920a2444f1ce6f53947640446b8e16f84b7";
+          sha256 = "1lw2d25rwszk35bi3gm3bg0cb30b8c2bf3p32b89shnsmwylw52m";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/e64746d10f9e0158621a7c4dc41dc2eca6ad573c/recipes/yankpad";
@@ -71406,12 +71541,12 @@
     yasnippet = callPackage ({ cl-lib ? null, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "yasnippet";
-        version = "20161221.1953";
+        version = "20170108.1830";
         src = fetchFromGitHub {
           owner = "joaotavora";
           repo = "yasnippet";
-          rev = "48cd7163b2475bbbea166cd0d02b4bf588f1435f";
-          sha256 = "1y5bip792p76lx2hx0z459jyvx7f7y8sncd7q8rcfd581vlsyc04";
+          rev = "0041efedf9f06bfe427d36547f7c4a73ab7405ba";
+          sha256 = "12fkjy6i004vmc0vsxiyd3iwvlkqv2v5b0hypzkzwcjkxq426m88";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/5d1927dc3351d3522de1baccdc4ce200ba52bd6e/recipes/yasnippet";
@@ -71447,11 +71582,11 @@
       }) {};
     yatex = callPackage ({ fetchhg, fetchurl, lib, melpaBuild }: melpaBuild {
         pname = "yatex";
-        version = "20170105.615";
+        version = "20170117.1449";
         src = fetchhg {
           url = "https://www.yatex.org/hgrepos/yatex/";
-          rev = "59459111e042";
-          sha256 = "072aminyiw7pwm74sq3xqqyd1f2l2ilcwg98r094xjvw4fz3yjq5";
+          rev = "8871fe9f563b";
+          sha256 = "0bfhf0fhx8znq7xsqwms3n178qpxds93wcznj26k3ypqgwkkcx5x";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/04867a574773e8794335a2664d4f5e8b243f3ec9/recipes/yatex";
diff --git a/pkgs/applications/editors/emacs-modes/melpa-stable-generated.nix b/pkgs/applications/editors/emacs-modes/melpa-stable-generated.nix
index 9d945859ffea..125b53b2e084 100644
--- a/pkgs/applications/editors/emacs-modes/melpa-stable-generated.nix
+++ b/pkgs/applications/editors/emacs-modes/melpa-stable-generated.nix
@@ -20,6 +20,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    aa-edit-mode = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, navi2ch }:
+    melpaBuild {
+        pname = "aa-edit-mode";
+        version = "0.0.2";
+        src = fetchFromGitHub {
+          owner = "zonuexe";
+          repo = "aa-edit-mode";
+          rev = "2e56f3b627f0f19fbfce4968180b4d736f7afb5d";
+          sha256 = "1rh9n97z1vi7w60qzam5vc025wwm346fgzym2zs1cm7ykyfh3mgd";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/20d00f782f2db87264c7fb1aac7455e44b8b24e7/recipes/aa-edit-mode";
+          sha256 = "00b99ik04xx4b2a1cm1z8dl42hjnb5r32qypjyyx8924n1dhxzgn";
+          name = "aa-edit-mode";
+        };
+        packageRequires = [ emacs navi2ch ];
+        meta = {
+          homepage = "https://melpa.org/#/aa-edit-mode";
+          license = lib.licenses.free;
+        };
+      }) {};
     abc-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "abc-mode";
@@ -587,22 +608,22 @@
           license = lib.licenses.free;
         };
       }) {};
-    ace-flyspell = callPackage ({ ace-jump-mode, fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    ace-flyspell = callPackage ({ avy, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "ace-flyspell";
-        version = "0.1.2";
+        version = "0.1.3";
         src = fetchFromGitHub {
           owner = "cute-jumper";
           repo = "ace-flyspell";
-          rev = "a850fa913b3d1bab4c00bacee41da934929cef52";
-          sha256 = "1pzh5l8dybrrmglj55nbff6065pxlbx14501p3a1qx1wvf24g1sv";
+          rev = "044d38fb8eb390ef1f51cf92cfe5c4ffd103044c";
+          sha256 = "0yy7g2903v78a8pavhxi8c7vqbmifn2sjk84zhw5aygihp3d6vf0";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/1ea85eca9cf2df3f8c06709dfb44b339b8bdbc6c/recipes/ace-flyspell";
           sha256 = "0f24qrpcvyg7h6ylyggn4zrbydci537iigshac1d8yywsr0j47gd";
           name = "ace-flyspell";
         };
-        packageRequires = [ ace-jump-mode ];
+        packageRequires = [ avy ];
         meta = {
           homepage = "https://melpa.org/#/ace-flyspell";
           license = lib.licenses.free;
@@ -2263,12 +2284,12 @@
     base16-theme = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "base16-theme";
-        version = "1.2";
+        version = "2.0";
         src = fetchFromGitHub {
           owner = "belak";
           repo = "base16-emacs";
-          rev = "97359d48a00b30776c5416ea90735d8302687677";
-          sha256 = "0f0gg5kfzgii0rf75gh48wnwimkc88xzwbifkwdf745jhzkyqn6s";
+          rev = "b50e90a39344402d169b8fdd5d18cc43fb16a256";
+          sha256 = "13b9ccm7yw95zc8v8sri762fgqdp2hp107nj5b40yv90g3y4fwby";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/30862f6be74882cfb57fb031f7318d3fd15551e3/recipes/base16-theme";
@@ -2764,6 +2785,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    bshell = callPackage ({ buffer-manage, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    melpaBuild {
+        pname = "bshell";
+        version = "0.1";
+        src = fetchFromGitHub {
+          owner = "plandes";
+          repo = "bshell";
+          rev = "0abd93439895851c1ad3037b0df7443e577ed1ba";
+          sha256 = "1frs3m44m4jjl3rxkahkyss2gnijpdpsbqvx0vwbl637gcap1slw";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/cf0ed51304f752af3e1f56caf2856d1521d782a4/recipes/bshell";
+          sha256 = "1ds8xvh74i6wqswjp8i30knr74l4gbalkb2jil8qjb9wp9l1gw9z";
+          name = "bshell";
+        };
+        packageRequires = [ buffer-manage emacs ];
+        meta = {
+          homepage = "https://melpa.org/#/bshell";
+          license = lib.licenses.free;
+        };
+      }) {};
     buffer-flip = callPackage ({ fetchFromGitHub, fetchurl, key-chord, lib, melpaBuild }:
     melpaBuild {
         pname = "buffer-flip";
@@ -3796,12 +3838,12 @@
     cliphist = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild, popup }:
     melpaBuild {
         pname = "cliphist";
-        version = "0.5.1";
+        version = "0.5.2";
         src = fetchFromGitHub {
           owner = "redguardtoo";
           repo = "cliphist";
-          rev = "72a8a92f69b280c347afe2f8b5f5eb57606a9aec";
-          sha256 = "0arilk9msbrx4kwg6nk0faw1yi2ss225wdlz6ycdgqc1531h6jkm";
+          rev = "8aaee153e0561625c35a8c178e57385c2ec92731";
+          sha256 = "0swsvzz20szfcgfaarga9apla1kl0ph0lrpk0ccl6mcf93zbnvby";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/82d86dae4ad8efc8ef342883c164c56e43079171/recipes/cliphist";
@@ -4542,12 +4584,12 @@
     company-erlang = callPackage ({ company, emacs, fetchFromGitHub, fetchurl, ivy-erlang-complete, lib, melpaBuild }:
     melpaBuild {
         pname = "company-erlang";
-        version = "0.1";
+        version = "0.1.1";
         src = fetchFromGitHub {
           owner = "s-kostyaev";
           repo = "company-erlang";
-          rev = "3296baf45e354171acfddf33071b0f5af64371b5";
-          sha256 = "00r0rr2c11b8mpis7a64dj6bzpm2jm17lpqmrhjjnc66zpq1vq8y";
+          rev = "bc0524a16f17b66c7397690e4ca0e004f09ea6c5";
+          sha256 = "04wm3i65fpzln7sdcny88hfjfm0n7wy44ffsr3697x4l95d0bnyh";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ca96ed0b5d6f8aea4de56ddeaa003b9c81d96219/recipes/company-erlang";
@@ -6561,12 +6603,12 @@
     dix = callPackage ({ cl-lib ? null, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "dix";
-        version = "0.3.4";
+        version = "0.3.5";
         src = fetchFromGitHub {
           owner = "unhammer";
           repo = "dix";
-          rev = "f9dd686922cf89dc7859c793be84969a2529a14b";
-          sha256 = "02cayawahsa59mkr0f4rhsm9lnpyv8qpx59w3040xmhf8dx95378";
+          rev = "86880826a0cc878e2e5d50bc835eed5c8e2f001a";
+          sha256 = "00qyzpqdw4im7c4bqqpiayv4kr9iqlm6mhsziazjvrjsvvi0p9ij";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/149eeba213b82aa0bcda1073aaf1aa02c2593f91/recipes/dix";
@@ -6582,12 +6624,12 @@
     dix-evil = callPackage ({ dix, evil, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "dix-evil";
-        version = "0.3.4";
+        version = "0.3.5";
         src = fetchFromGitHub {
           owner = "unhammer";
           repo = "dix";
-          rev = "f9dd686922cf89dc7859c793be84969a2529a14b";
-          sha256 = "02cayawahsa59mkr0f4rhsm9lnpyv8qpx59w3040xmhf8dx95378";
+          rev = "86880826a0cc878e2e5d50bc835eed5c8e2f001a";
+          sha256 = "00qyzpqdw4im7c4bqqpiayv4kr9iqlm6mhsziazjvrjsvvi0p9ij";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/d9dcceb57231bf2082154cab394064a59d84d3a5/recipes/dix-evil";
@@ -6908,8 +6950,8 @@
         version = "0.7";
         src = fetchhg {
           url = "https://bitbucket.com/harsman/dyalog-mode";
-          rev = "4004050a9771";
-          sha256 = "0p7g7sfkdr473gpj2xdgg5fb5d336w2ddvx44i1d6575p6rcs5w6";
+          rev = "9ae0c786e1e7";
+          sha256 = "1a498jkj15vhf2x4an6raghjf9fszrkw0zl617m8pibcn3yrnv62";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/5b7972602399f9df9139cff177e38653bb0f43ed/recipes/dyalog-mode";
@@ -7198,12 +7240,12 @@
     ebib = callPackage ({ dash, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, parsebib, seq }:
     melpaBuild {
         pname = "ebib";
-        version = "2.10";
+        version = "2.10.1";
         src = fetchFromGitHub {
           owner = "joostkremers";
           repo = "ebib";
-          rev = "4c2581ad17a636909e7ed0f46bd813cd6d9c45d3";
-          sha256 = "1ic55fml4ll7pvakcf32ahps4za8mf4q10jgdyi8xj5bccvi3n3r";
+          rev = "d415b91c91581ff39364384fec35c219cb89d43a";
+          sha256 = "13283ymm4av2gk7zj2rsppg6sk0lixy9g4lic4arrm8b5yb0vcsd";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/4e39cd8e8b4f61c04fa967def6a653bb22f45f5b/recipes/ebib";
@@ -7532,12 +7574,12 @@
     ein = callPackage ({ cl-generic, fetchFromGitHub, fetchurl, lib, melpaBuild, request, websocket }:
     melpaBuild {
         pname = "ein";
-        version = "0.12.0";
+        version = "0.12.1";
         src = fetchFromGitHub {
           owner = "millejoh";
           repo = "emacs-ipython-notebook";
-          rev = "8e3764044c9bd44fbdab4e870c2fc9a36ce02449";
-          sha256 = "0f5k9bx632xjwj3l03vs0k48xvxq4nbi71039fcjqs0bchg814nj";
+          rev = "b52ccbd46dee2a1ece1dd6bd9be1224c323262ca";
+          sha256 = "1qdznl8z0s2hy3hhls9ccr516wai11qh663630hc0zwv4gwlwp64";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/215e163755fe391ce1f049622e7b9bf9a8aea95a/recipes/ein";
@@ -7676,6 +7718,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    el-patch = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    melpaBuild {
+        pname = "el-patch";
+        version = "1.0";
+        src = fetchFromGitHub {
+          owner = "raxod502";
+          repo = "el-patch";
+          rev = "4775dfb0957605308985ce2d2cf73550704137ae";
+          sha256 = "0xdb3l9184lmsabq9ajm7xj47pcg1rn743f24j7vp8r93ac21x5x";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/2f4f57e0edbae35597aa4a7744d22d2f971d5de5/recipes/el-patch";
+          sha256 = "1imijmsni8c8fxjrzprnanf94c1pma3h5w9p75c4y99l8l3xmj7g";
+          name = "el-patch";
+        };
+        packageRequires = [ emacs ];
+        meta = {
+          homepage = "https://melpa.org/#/el-patch";
+          license = lib.licenses.free;
+        };
+      }) {};
     el-spice = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild, thingatpt-plus }:
     melpaBuild {
         pname = "el-spice";
@@ -9481,26 +9544,6 @@
           license = lib.licenses.free;
         };
       }) {};
-    evil = callPackage ({ fetchhg, fetchurl, goto-chg, lib, melpaBuild, undo-tree }:
-    melpaBuild {
-        pname = "evil";
-        version = "1.2.12";
-        src = fetchhg {
-          url = "https://bitbucket.com/lyro/evil";
-          rev = "f2648b841f9b";
-          sha256 = "0gv8b6adaypw3d2brx0lh41yyi3kdf1klahx7kap36a7m652nan6";
-        };
-        recipeFile = fetchurl {
-          url = "https://raw.githubusercontent.com/milkypostman/melpa/5b7972602399f9df9139cff177e38653bb0f43ed/recipes/evil";
-          sha256 = "09qrhy7l229w0qk3ba1i2xg4vqz8525v8scrbm031lqp30jp54hc";
-          name = "evil";
-        };
-        packageRequires = [ goto-chg undo-tree ];
-        meta = {
-          homepage = "https://melpa.org/#/evil";
-          license = lib.licenses.free;
-        };
-      }) {};
     evil-anzu = callPackage ({ anzu, evil, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "evil-anzu";
@@ -9984,6 +10027,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    evil-surround = callPackage ({ evil, fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    melpaBuild {
+        pname = "evil-surround";
+        version = "1.0.0";
+        src = fetchFromGitHub {
+          owner = "timcharper";
+          repo = "evil-surround";
+          rev = "7a0358ce3eb9ed01744170fa8a1e12d98f8b8839";
+          sha256 = "1smv7sqhm1l2bi9fmispnlmjssidblwkmiiycj1n3ag54q27z031";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/da8b46729f3bd9aa74c4f0ee2a9dc60804aa661c/recipes/evil-surround";
+          sha256 = "1bcjxw0yrk2bqj5ihl5r2c4id0m9wbnj7fpd0wwmw9444xvwp8ag";
+          name = "evil-surround";
+        };
+        packageRequires = [ evil ];
+        meta = {
+          homepage = "https://melpa.org/#/evil-surround";
+          license = lib.licenses.free;
+        };
+      }) {};
     evil-text-object-python = callPackage ({ emacs, evil, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "evil-text-object-python";
@@ -10236,6 +10300,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    eziam-theme = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    melpaBuild {
+        pname = "eziam-theme";
+        version = "0.1.1";
+        src = fetchFromGitHub {
+          owner = "thblt";
+          repo = "eziam-theme-emacs";
+          rev = "794ff00f27c31c7b43b7dc62da6295cd9db36ad4";
+          sha256 = "0j94k3bhynhrigk127b40ljqcdqsqa5gix5ds3b0hb38wfcq8byk";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/4e0411583bd4fdbe425eb07de98851136fa1eeb0/recipes/eziam-theme";
+          sha256 = "0iz3r4r54ai8y4qhnix291ra7qfmk8dbr06f52pgmz3gzin1cqpb";
+          name = "eziam-theme";
+        };
+        packageRequires = [];
+        meta = {
+          homepage = "https://melpa.org/#/eziam-theme";
+          license = lib.licenses.free;
+        };
+      }) {};
     f = callPackage ({ dash, fetchFromGitHub, fetchurl, lib, melpaBuild, s }:
     melpaBuild {
         pname = "f";
@@ -11020,6 +11105,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    flycheck-kotlin = callPackage ({ fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild }:
+    melpaBuild {
+        pname = "flycheck-kotlin";
+        version = "0.3";
+        src = fetchFromGitHub {
+          owner = "whirm";
+          repo = "flycheck-kotlin";
+          rev = "cbb9fbf70dbe8efcc3971b3606ee95c97469b1fe";
+          sha256 = "0bxjx7xcpscv6vv4yxll8hh43aabv2dnrvkymb47jm3yvjr9cs1c";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/f158727cc8892aadba0a613dd08e65e2fc791b48/recipes/flycheck-kotlin";
+          sha256 = "0vh4f3ap1ciddf2fvfnjz668d6spyx49xs2wfp1hrzxn5yqpnra5";
+          name = "flycheck-kotlin";
+        };
+        packageRequires = [ flycheck ];
+        meta = {
+          homepage = "https://melpa.org/#/flycheck-kotlin";
+          license = lib.licenses.free;
+        };
+      }) {};
     flycheck-ledger = callPackage ({ fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild }:
     melpaBuild {
         pname = "flycheck-ledger";
@@ -12247,12 +12353,12 @@
     fxrd-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild, s }:
     melpaBuild {
         pname = "fxrd-mode";
-        version = "0.6";
+        version = "0.7";
         src = fetchFromGitHub {
           owner = "msherry";
           repo = "fxrd-mode";
-          rev = "eac0b26a2c16197f6b03f7301e6e7858aca9f91e";
-          sha256 = "0vfh4azibv71mj86bgl4rfbm96pw9l95r87mwhzx42j36rxffl73";
+          rev = "f53240c92f80760fbfb2e0dcf2e68064145cec33";
+          sha256 = "0yx4p081960zwgjlw9yiq4jkc7czfvwbsc8z20pg394lx9nkrgr5";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/796eb6b2126ec616c0de6af6abb7598900557c12/recipes/fxrd-mode";
@@ -12622,6 +12728,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    git-annex = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    melpaBuild {
+        pname = "git-annex";
+        version = "1.1";
+        src = fetchFromGitHub {
+          owner = "jwiegley";
+          repo = "git-annex-el";
+          rev = "7d41775a1709b5754a7779e9f64f15d336ea5c8c";
+          sha256 = "0fm62lm29wp1ljgyi6pqqkzwzps53cjjbj5j3y0c2013ry7va6c5";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/9c91e16bb9e92db9dc9be6a7af3944c3290d2f14/recipes/git-annex";
+          sha256 = "0194y24vq1w6m2cjgqgx9dqp99cq8y9licyry2zxa5brbrsxi94l";
+          name = "git-annex";
+        };
+        packageRequires = [];
+        meta = {
+          homepage = "https://melpa.org/#/git-annex";
+          license = lib.licenses.free;
+        };
+      }) {};
     git-auto-commit-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "git-auto-commit-mode";
@@ -12898,12 +13025,12 @@
     gitattributes-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "gitattributes-mode";
-        version = "1.2.2";
+        version = "1.2.4";
         src = fetchFromGitHub {
           owner = "magit";
           repo = "git-modes";
-          rev = "7ccc5de55fc370c328d7ec08de559e351b1ac94c";
-          sha256 = "0ksqfr0l415ynhxpqpcb84bk2bapvczwnpikp45kmfqq91p61xfc";
+          rev = "af4ff3222f38daa0d352afdf3d20741b4fab2e79";
+          sha256 = "0nn5mj29airjacckzxkh4q12wnk2pq6mp1wlzxzxdwijmkk52dbr";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/4b4e2ddd2a80875afc0fc654052e6cbff2f3777f/recipes/gitattributes-mode";
@@ -12940,12 +13067,12 @@
     gitconfig-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "gitconfig-mode";
-        version = "1.2.2";
+        version = "1.2.4";
         src = fetchFromGitHub {
           owner = "magit";
           repo = "git-modes";
-          rev = "7ccc5de55fc370c328d7ec08de559e351b1ac94c";
-          sha256 = "0ksqfr0l415ynhxpqpcb84bk2bapvczwnpikp45kmfqq91p61xfc";
+          rev = "af4ff3222f38daa0d352afdf3d20741b4fab2e79";
+          sha256 = "0nn5mj29airjacckzxkh4q12wnk2pq6mp1wlzxzxdwijmkk52dbr";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/44a37f59b87f59a587f6681e7aadfabf137c98d7/recipes/gitconfig-mode";
@@ -13045,12 +13172,12 @@
     gitignore-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "gitignore-mode";
-        version = "1.2.2";
+        version = "1.2.4";
         src = fetchFromGitHub {
           owner = "magit";
           repo = "git-modes";
-          rev = "7ccc5de55fc370c328d7ec08de559e351b1ac94c";
-          sha256 = "0ksqfr0l415ynhxpqpcb84bk2bapvczwnpikp45kmfqq91p61xfc";
+          rev = "af4ff3222f38daa0d352afdf3d20741b4fab2e79";
+          sha256 = "0nn5mj29airjacckzxkh4q12wnk2pq6mp1wlzxzxdwijmkk52dbr";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/44a37f59b87f59a587f6681e7aadfabf137c98d7/recipes/gitignore-mode";
@@ -14544,12 +14671,12 @@
     helm = callPackage ({ async, emacs, fetchFromGitHub, fetchurl, helm-core, lib, melpaBuild, popup }:
     melpaBuild {
         pname = "helm";
-        version = "2.4.0";
+        version = "2.5.0";
         src = fetchFromGitHub {
           owner = "emacs-helm";
           repo = "helm";
-          rev = "a1bc339cbdaad200cb947e1e6264e9013322b434";
-          sha256 = "1pjp629xwya55ld6hkys4gmgn0mvnd7qzpzz1qraaympsnymrh3w";
+          rev = "bbdf2c18edc75478e2c7e8ee39b5c30dbb7bf42e";
+          sha256 = "1qqyrqhsy7xacckg5faj45pvs0vpg242sp2073i5grvgb3l9lvqj";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/7e8bccffdf69479892d76b9336a4bec3f35e919d/recipes/helm";
@@ -14751,6 +14878,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    helm-cider = callPackage ({ cider, emacs, fetchFromGitHub, fetchurl, helm-core, lib, melpaBuild, seq }:
+    melpaBuild {
+        pname = "helm-cider";
+        version = "0.3.0";
+        src = fetchFromGitHub {
+          owner = "clojure-emacs";
+          repo = "helm-cider";
+          rev = "a24ef274e382c1a158a76eae2570f1f007031cb8";
+          sha256 = "062abfb4sfpcc6fx3nrf3j0bisglrhyrg7rxwhhcqm9jhalksmdl";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/31d3cd618f2ac88860d0b11335ff81b6e2973982/recipes/helm-cider";
+          sha256 = "1fvpq1xi3xhd8w1yasac87incv1w4av5a8vn0birw8pc7a6bxv4w";
+          name = "helm-cider";
+        };
+        packageRequires = [ cider emacs helm-core seq ];
+        meta = {
+          homepage = "https://melpa.org/#/helm-cider";
+          license = lib.licenses.free;
+        };
+      }) {};
     helm-circe = callPackage ({ circe, cl-lib ? null, emacs, fetchFromGitHub, fetchurl, helm, lib, melpaBuild }:
     melpaBuild {
         pname = "helm-circe";
@@ -14796,12 +14944,12 @@
     helm-core = callPackage ({ async, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "helm-core";
-        version = "2.4.0";
+        version = "2.5.0";
         src = fetchFromGitHub {
           owner = "emacs-helm";
           repo = "helm";
-          rev = "a1bc339cbdaad200cb947e1e6264e9013322b434";
-          sha256 = "1pjp629xwya55ld6hkys4gmgn0mvnd7qzpzz1qraaympsnymrh3w";
+          rev = "bbdf2c18edc75478e2c7e8ee39b5c30dbb7bf42e";
+          sha256 = "1qqyrqhsy7xacckg5faj45pvs0vpg242sp2073i5grvgb3l9lvqj";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ef7a700c5665e6d72cb4cecf7fb5a2dd43ef9bf7/recipes/helm-core";
@@ -17672,12 +17820,12 @@
     ivy-erlang-complete = callPackage ({ async, counsel, emacs, erlang, fetchFromGitHub, fetchurl, ivy, lib, melpaBuild }:
     melpaBuild {
         pname = "ivy-erlang-complete";
-        version = "0.1.2";
+        version = "0.1.3";
         src = fetchFromGitHub {
           owner = "s-kostyaev";
           repo = "ivy-erlang-complete";
-          rev = "65d80ff0052be9aa65e9a1cd8f6b1f5fb112ee36";
-          sha256 = "05qjpv95xrhwpg1g0znsp33a8827w4p7vl6iflrrmi15kij5imb4";
+          rev = "914dfbeb2d9ccaed2e830637ecc814ac1da2f82f";
+          sha256 = "0a5fmqkasy87vq9x95qavqszmb9jalsi8ihgxx120rbrzfib28ys";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/ac1b9e350d3f066e4e56202ebb443134d5fc3669/recipes/ivy-erlang-complete";
@@ -18531,12 +18679,12 @@
     keychain-environment = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "keychain-environment";
-        version = "2.3.0";
+        version = "2.4.0";
         src = fetchFromGitHub {
           owner = "tarsius";
           repo = "keychain-environment";
-          rev = "1ca091f72ad1d1a7620552289ae43484d853e968";
-          sha256 = "0xgm80dbg45bs3k8psd3pv49z1xbvzm156xs55gmxdzbgxbzpazr";
+          rev = "7c08e8c4c3ea4d6eaee12d710a56793771f837c5";
+          sha256 = "1mnqa69f584qzb62nn01bb4nz08gi7ra8b6xr0x7aphfqzk86kzy";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/4382c9e7e8dee2cafea9ee49965d0952ca359dd5/recipes/keychain-environment";
@@ -19681,14 +19829,14 @@
         pname = "magit-filenotify";
         version = "0.1";
         src = fetchFromGitHub {
-          owner = "magit";
+          owner = "emacsorphanage";
           repo = "magit-filenotify";
           rev = "575c4321f61fb8f25e4779f9ffd4514ac086ae96";
           sha256 = "1vn6x53kpwv3zf2b5xjswyz6v853r8b9dg88qhwd2h480hrx6kal";
         };
         recipeFile = fetchurl {
-          url = "https://raw.githubusercontent.com/milkypostman/melpa/c6c87a11492f6b6e5159a2a3dc1fe7d9efcc0cde/recipes/magit-filenotify";
-          sha256 = "00a77czdi24n3zkx6jwaj2asablzpxq16iqd8s84kkqxcfiiahn7";
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/41aeebef8ed914fb378fef13ba47572accee332c/recipes/magit-filenotify";
+          sha256 = "0bbw6ay3csbc5zc6wa9p9nxpbxl3k35xz9jwqlw8mgz2b1xq083d";
           name = "magit-filenotify";
         };
         packageRequires = [ emacs magit ];
@@ -19847,12 +19995,12 @@
     magit-svn = callPackage ({ emacs, fetchFromGitHub, fetchurl, lib, magit, melpaBuild }:
     melpaBuild {
         pname = "magit-svn";
-        version = "2.1.2";
+        version = "2.2.0";
         src = fetchFromGitHub {
           owner = "magit";
           repo = "magit-svn";
-          rev = "63a47732cc112d24db26052ffad93895319b60cf";
-          sha256 = "1g2isa8n2j8kk0c5iwx8qai8k14sazwkc3dwhcpchm3zs0bfpdm3";
+          rev = "d9e61effc55480694014e5422e8f74f0f17a757a";
+          sha256 = "128ra3habdqk1rsnmy87m0aw2pqi033dqmmjmgsmfblnfvi987p9";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/cec5af50ae7634cc566adfbfdf0f95c3e2951c0c/recipes/magit-svn";
@@ -20393,12 +20541,12 @@
     meghanada = callPackage ({ cl-lib ? null, company, emacs, fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild, yasnippet }:
     melpaBuild {
         pname = "meghanada";
-        version = "0.2.4";
+        version = "0.4.0";
         src = fetchFromGitHub {
           owner = "mopemope";
           repo = "meghanada-emacs";
-          rev = "86820f22cd1ebf4c2f8cae5b64bc8ff3964ea221";
-          sha256 = "0nn6p5r760hb3ffrv4lb3ny75np6ps0gscp1a20sdsfrz6fbv6dg";
+          rev = "04112dc5db30a98d2ec1dae41d8c6ed1c7aff0be";
+          sha256 = "0f14b1h6zv0v8hn99bqmidndh36mrsckmcirrrffm591ksf4l0zd";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/4c75c69b2f00be9a93144f632738272c1e375785/recipes/meghanada";
@@ -21618,8 +21766,8 @@
           sha256 = "1m3llm87qgd7sr6ci22nd835vdg0qprs5m9lqcx74k689jl89cni";
         };
         recipeFile = fetchurl {
-          url = "https://raw.githubusercontent.com/milkypostman/melpa/00cc4705650157621bb0135cc512d57178496100/recipes/ncl-mode";
-          sha256 = "0hmd606xgapzbc79px9l1q6pphrhdzip495yprvg20xsdpmjlfw9";
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/2eea3936b8a3a7546450d1d7399e0f86d855fefd/recipes/ncl-mode";
+          sha256 = "1niy0w24q6q6j7s0l9fcaqai7zz2gg1qlk2s9sxb8j79jc41y47k";
           name = "ncl-mode";
         };
         packageRequires = [ emacs ];
@@ -21820,12 +21968,12 @@
     no-littering = callPackage ({ cl-lib ? null, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "no-littering";
-        version = "0.5.2";
+        version = "0.5.3";
         src = fetchFromGitHub {
           owner = "tarsius";
           repo = "no-littering";
-          rev = "e7d3ebbd12f176707e63766a7a19bcaa08e01331";
-          sha256 = "0y8wvagn4yf7fwvwzqcrx46wigmvyl25fa94kzvkanjl04zid3i1";
+          rev = "e161c328d248f861bb56991492182f20e60b6b41";
+          sha256 = "0ka7gbiarhc1r8rynxq2vf0k5p4044bm1jc92ca1hav34mqfg2xp";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/cf5d2152c91b7c5c38181b551db3287981657ce3/recipes/no-littering";
@@ -22620,6 +22768,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    org-alert = callPackage ({ alert, dash, fetchFromGitHub, fetchurl, lib, melpaBuild, s }:
+    melpaBuild {
+        pname = "org-alert";
+        version = "0.1.0";
+        src = fetchFromGitHub {
+          owner = "groksteve";
+          repo = "org-alert";
+          rev = "685c18aa5ce994360c7f9e8bbf49590c412187ac";
+          sha256 = "0gkv2sfl9nb64qqh5xhgq68r9kfmsny3vpcmnzk2mqjcb9nh657s";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/2976b7f9271bc46679a5774ff5f388b81a9f0cf8/recipes/org-alert";
+          sha256 = "0n5a24iv8cj395xr0gfgi0hs237dd98zm2fws05k47vy3ygni152";
+          name = "org-alert";
+        };
+        packageRequires = [ alert dash s ];
+        meta = {
+          homepage = "https://melpa.org/#/org-alert";
+          license = lib.licenses.free;
+        };
+      }) {};
     org-autolist = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "org-autolist";
@@ -22709,14 +22878,14 @@
         pname = "org-bullets";
         version = "0.2.4";
         src = fetchFromGitHub {
-          owner = "sabof";
+          owner = "emacsorphanage";
           repo = "org-bullets";
           rev = "b70ac2ec805bcb626a6e39ea696354577c681b36";
           sha256 = "10nr4sjffnqbllv6gmak6pviyynrb7pi5nvrq331h5alm3xcpq0w";
         };
         recipeFile = fetchurl {
-          url = "https://raw.githubusercontent.com/milkypostman/melpa/3ab2169c45aae7fb3373bf5df087d9b626167ce8/recipes/org-bullets";
-          sha256 = "1kxhlabaqi1g6pz215afp65d9cp324s8mvabjh7q1h7ari32an75";
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/fe60fc3c60d87b5fd7aa24e858c79753d5f7d2f6/recipes/org-bullets";
+          sha256 = "0yrfgd6r71rng3qipp3y9i5mpm6510k4xsfgyidcn25v27fysk3v";
           name = "org-bullets";
         };
         packageRequires = [];
@@ -23562,12 +23731,12 @@
     orgit = callPackage ({ dash, emacs, fetchFromGitHub, fetchurl, lib, magit, melpaBuild, org }:
     melpaBuild {
         pname = "orgit";
-        version = "1.2.0";
+        version = "1.3.0";
         src = fetchFromGitHub {
           owner = "magit";
           repo = "orgit";
-          rev = "adcfef22dc9bfa6503513d0a937bf4b32ad7ab94";
-          sha256 = "0f3lqw2b9xr0278s7502sa2hkyhml45j8jpssaicyliz2k1kiyzv";
+          rev = "cbce5871fe267fef725631b0b7365952c35ae401";
+          sha256 = "00iwp3bajr9hxs55rj3ka5bymhp5icsq8m44z514sb8h54fwapb7";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/73b5f7c44c90540e4cbdc003d9881f0ac22cc7bc/recipes/orgit";
@@ -25865,12 +26034,12 @@
     protobuf-mode = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "protobuf-mode";
-        version = "3.1.0";
+        version = "3.2.0pre2";
         src = fetchFromGitHub {
           owner = "google";
           repo = "protobuf";
-          rev = "a428e42072765993ff674fda72863c9f1aa2d268";
-          sha256 = "0qlvpsmqgh9nw0k4zrxlxf75pafi3p0ahz99v6761b903y8qyv4i";
+          rev = "6eeb5c7d0fc84c9c5d562ae54b3bdc088ec62129";
+          sha256 = "15mb2ybam1pnyig60zlspw0cn9wl5iwywp35fx67qvg9nadln11d";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/b4e7f5f641251e17add561991d3bcf1fde23467b/recipes/protobuf-mode";
@@ -26369,12 +26538,12 @@
     quasi-monochrome-theme = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "quasi-monochrome-theme";
-        version = "1.0";
+        version = "1.1";
         src = fetchFromGitHub {
           owner = "lbolla";
           repo = "emacs-quasi-monochrome";
-          rev = "e329a8d55b22151e29df1f81552a4361f85aeafa";
-          sha256 = "0lfmdlb626b3gbmlvacwn84vpqam6gk9lp29wk0hcraw69vaw1v8";
+          rev = "7d3afe41c2696ee25e3e4bcce987af1f589208d6";
+          sha256 = "0bn1yzxzj6r1k3xcp45l04flq4avzlh0sbjfyiw4nglfhliyvwcf";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/a9c8498e4bcca19c4c24b2fd0db035c3da477e2a/recipes/quasi-monochrome-theme";
@@ -26453,12 +26622,12 @@
     railscasts-reloaded-theme = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "railscasts-reloaded-theme";
-        version = "1.2.0";
+        version = "1.3.0";
         src = fetchFromGitHub {
           owner = "thegeorgeous";
           repo = "railscasts-reloaded-theme";
-          rev = "cce0e4ae6527e84e2ae3deb8b3c7770dda225853";
-          sha256 = "1li86qpbjg8sm9q4sl8cffc0fni6mwx8180x8zlmsxdnhqic5nvd";
+          rev = "de3fea4fdd32db6cbea124dfeb2fa4f213d79063";
+          sha256 = "1kl3wn35pcyslggy5wxm81bjjsj3smzjsf54iy4y844iyf4mgp5j";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/9817851bd06cbae30fb8f429401f1bbc0dc7be09/recipes/railscasts-reloaded-theme";
@@ -27248,6 +27417,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    rg = callPackage ({ cl-lib ? null, fetchFromGitHub, fetchurl, lib, melpaBuild, s }:
+    melpaBuild {
+        pname = "rg";
+        version = "1.0.0";
+        src = fetchFromGitHub {
+          owner = "dajva";
+          repo = "rg.el";
+          rev = "f1af862ba50b344d2f039f18fe83e32b6f0829a9";
+          sha256 = "18i5rspwx48xik8yaw0znsfqarwab7nra6wiiznjkpzm0cgh4av1";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/9ce1f721867383a841957370946f283f996fa76f/recipes/rg";
+          sha256 = "0i78qvqdznh1z3b0mnzihv07j8b9r86dc1lsa1qlzacv6a2i9sbm";
+          name = "rg";
+        };
+        packageRequires = [ cl-lib s ];
+        meta = {
+          homepage = "https://melpa.org/#/rg";
+          license = lib.licenses.free;
+        };
+      }) {};
     rich-minority = callPackage ({ cl-lib ? null, fetchFromGitHub, fetchurl, lib, melpaBuild }:
     melpaBuild {
         pname = "rich-minority";
@@ -27885,8 +28075,8 @@
         src = fetchFromGitHub {
           owner = "ensime";
           repo = "emacs-scala-mode";
-          rev = "9b8db623b13fcb0aad9271d1fae73e1257dda13c";
-          sha256 = "0q41dqlhp0cds16inmh7jrvhqrnjsdiv2in6pq3f0srhwms81ff3";
+          rev = "7e6300231143133252e6ed1f3d5c86ea4e625e33";
+          sha256 = "081bw6gkrww7bqi7pwj4sifmqscr5sbpl3zl1rw86npv5fpyjq9j";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/564aa1637485192a97803af46b3a1f8e0d042c9a/recipes/scala-mode";
@@ -31001,22 +31191,22 @@
           license = lib.licenses.free;
         };
       }) {};
-    tide = callPackage ({ cl-lib ? null, dash, emacs, fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild, typescript-mode }:
+    tide = callPackage ({ cl-lib ? null, dash, fetchFromGitHub, fetchurl, flycheck, lib, melpaBuild, typescript-mode }:
     melpaBuild {
         pname = "tide";
-        version = "2.0.2";
+        version = "2.1.5";
         src = fetchFromGitHub {
           owner = "ananthakumaran";
           repo = "tide";
-          rev = "170bce9067a6467f190418284377559a9f43c667";
-          sha256 = "0b23d9bi1i00v9ffrdi5ag0q2i149ai1p88klpgl2j9kvdif0zmg";
+          rev = "bd89d93d9803319ba86eff0173821deb978ae2ac";
+          sha256 = "1a736r1igq66hn6ig4l7c5xaxcyk2kxvj26laphakk1xg8j5x52k";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/a21e063011ebbb03ac70bdcf0a379f9e383bdfab/recipes/tide";
           sha256 = "1z2xr25s23sz6nrzzw2xg1l2j8jvjhxi53qh7nvxmmq6n6jjpwg1";
           name = "tide";
         };
-        packageRequires = [ cl-lib dash emacs flycheck typescript-mode ];
+        packageRequires = [ cl-lib dash flycheck typescript-mode ];
         meta = {
           homepage = "https://melpa.org/#/tide";
           license = lib.licenses.free;
@@ -32895,6 +33085,27 @@
           license = lib.licenses.free;
         };
       }) {};
+    wolfram = callPackage ({ fetchFromGitHub, fetchurl, lib, melpaBuild }:
+    melpaBuild {
+        pname = "wolfram";
+        version = "1.1.1";
+        src = fetchFromGitHub {
+          owner = "hsjunnesson";
+          repo = "wolfram.el";
+          rev = "6b5dceae3fd6cdb4d7562510deeafa02c93c010b";
+          sha256 = "1ijyjw2793i7n00i30ma8lw4fzi9w63m6k0xgjx6j78r5y7pfj2g";
+        };
+        recipeFile = fetchurl {
+          url = "https://raw.githubusercontent.com/milkypostman/melpa/785b5b1ec73e6376f2f2bb405707a1078398fa3a/recipes/wolfram";
+          sha256 = "02xp1916v9rydh0586jkx71v256qdg63f87s3m0agc2znnrni9h4";
+          name = "wolfram";
+        };
+        packageRequires = [];
+        meta = {
+          homepage = "https://melpa.org/#/wolfram";
+          license = lib.licenses.free;
+        };
+      }) {};
     wonderland = callPackage ({ dash, dash-functional, emacs, fetchFromGitHub, fetchurl, lib, melpaBuild, multi }:
     melpaBuild {
         pname = "wonderland";
@@ -33446,8 +33657,8 @@
         version = "1.78";
         src = fetchhg {
           url = "https://www.yatex.org/hgrepos/yatex/";
-          rev = "c2c547e147c7";
-          sha256 = "1khsvzg7ma98ijpj21xmdlnp18wwxf2n9jr2y1xia4a6qgkmlchb";
+          rev = "8871fe9f563b";
+          sha256 = "0bfhf0fhx8znq7xsqwms3n178qpxds93wcznj26k3ypqgwkkcx5x";
         };
         recipeFile = fetchurl {
           url = "https://raw.githubusercontent.com/milkypostman/melpa/04867a574773e8794335a2664d4f5e8b243f3ec9/recipes/yatex";
diff --git a/pkgs/applications/editors/emacs-modes/org-generated.nix b/pkgs/applications/editors/emacs-modes/org-generated.nix
index 8de489549b85..d5bccbbc6428 100644
--- a/pkgs/applications/editors/emacs-modes/org-generated.nix
+++ b/pkgs/applications/editors/emacs-modes/org-generated.nix
@@ -1,10 +1,10 @@
 { callPackage }: {
     org = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
         pname = "org";
-        version = "20161224";
+        version = "20170124";
         src = fetchurl {
-          url = "http://orgmode.org/elpa/org-20161224.tar";
-          sha256 = "15fnc65k5mn5ssl53z4f9nlkz5m8a59zkaripcapdcq87ys5imqm";
+          url = "http://orgmode.org/elpa/org-20170124.tar";
+          sha256 = "0zlqb31fkwv74wszfz914agnprnh6jlr60v9dw62y9jyivaxg99k";
         };
         packageRequires = [];
         meta = {
@@ -14,10 +14,10 @@
       }) {};
     org-plus-contrib = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
         pname = "org-plus-contrib";
-        version = "20161224";
+        version = "20170124";
         src = fetchurl {
-          url = "http://orgmode.org/elpa/org-plus-contrib-20161224.tar";
-          sha256 = "1pj3h5qllhcqyqvm2kln7056m34k5flipvslnn1rvsk4iwwjlv1a";
+          url = "http://orgmode.org/elpa/org-plus-contrib-20170124.tar";
+          sha256 = "1vgiw9xbh7zcr7gywb021h46idm0k69ifgkmwb9f9wb4snar4yq8";
         };
         packageRequires = [];
         meta = {
diff --git a/pkgs/applications/editors/idea/default.nix b/pkgs/applications/editors/idea/default.nix
index 204fd60d2bc3..12ca97e12c57 100644
--- a/pkgs/applications/editors/idea/default.nix
+++ b/pkgs/applications/editors/idea/default.nix
@@ -136,12 +136,12 @@ in
 {
   clion = buildClion rec {
     name = "clion-${version}";
-    version = "2016.3";
+    version = "2016.3.2";
     description  = "C/C++ IDE. New. Intelligent. Cross-platform";
     license = stdenv.lib.licenses.unfree;
     src = fetchurl {
       url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz";
-      sha256 = "16nszamr0bxg8aghyrg4wzxbp9158kjzhr957ljpbipz0rlixf31";
+      sha256 = "0ygnj3yszgd1si1qgx7m4n7smm583l5pww8xhx8n86mvz7ywdhbn";
     };
     wmClass = "jetbrains-clion";
   };
@@ -172,12 +172,12 @@ in
 
   idea-community = buildIdea rec {
     name = "idea-community-${version}";
-    version = "2016.3.2";
+    version = "2016.3.3";
     description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
     license = stdenv.lib.licenses.asl20;
     src = fetchurl {
       url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
-      sha256 = "0ngign34gq7i121ss2s9wfziy3vkv1jb79pw8nf1qp7rb15xn4vc";
+      sha256 = "1v9rzfj84fyz3m3b6bh45jns8wcil9n8f8mfha0x8m8534r6w368";
     };
     wmClass = "jetbrains-idea-ce";
   };
@@ -208,24 +208,24 @@ in
 
   idea-ultimate = buildIdea rec {
     name = "idea-ultimate-${version}";
-    version = "2016.3.2";
+    version = "2016.3.3";
     description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
     license = stdenv.lib.licenses.unfree;
     src = fetchurl {
       url = "https://download.jetbrains.com/idea/ideaIU-${version}.tar.gz";
-      sha256 = "13pd95zad29c3i9qpwhjii601ixb4dgcld0kxk3liq4zmnv6wqxa";
+      sha256 = "1bwy86rm0mifizmhkm9wxwc4nrrizk2zp4zl5ycxh6zdiad1r1wm";
     };
     wmClass = "jetbrains-idea";
   };
 
   ruby-mine = buildRubyMine rec {
     name = "ruby-mine-${version}";
-    version = "2016.2.5";
+    version = "2016.3.1";
     description = "The Most Intelligent Ruby and Rails IDE";
     license = stdenv.lib.licenses.unfree;
     src = fetchurl {
       url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
-      sha256 = "1rncnm5dvhpfb7l5p2k0hs4yqzp8n1c4rvz9vldlf5k7mvwggp7p";
+      sha256 = "10d1ba6qpizhz4d7fz0ya565pdvkgcmsdgs7b8dv98s9hxfjsldy";
     };
     wmClass = "jetbrains-rubymine";
   };
@@ -256,36 +256,36 @@ in
 
   pycharm-community = buildPycharm rec {
     name = "pycharm-community-${version}";
-    version = "2016.3";
+    version = "2016.3.2";
     description = "PyCharm Community Edition";
     license = stdenv.lib.licenses.asl20;
     src = fetchurl {
       url = "https://download.jetbrains.com/python/${name}.tar.gz";
-      sha256 = "1pi822ihzy58jszdy7y2pyni6pki9ih8s9xdbwlbwg9vck1iqprs";
+      sha256 = "0fag5ng9n953mnf3gmxpac1icnb1qz6dybhqwjbr13qij8v2s2g1";
     };
     wmClass = "jetbrains-pycharm-ce";
   };
 
   pycharm-professional = buildPycharm rec {
     name = "pycharm-professional-${version}";
-    version = "2016.3";
+    version = "2016.3.2";
     description = "PyCharm Professional Edition";
     license = stdenv.lib.licenses.unfree;
     src = fetchurl {
       url = "https://download.jetbrains.com/python/${name}.tar.gz";
-      sha256 = "1b4ib77wzg0y12si8zqrfwbhv4kvmy9nm5dsrdr3k7f89dqg3279";
+      sha256 = "1nylq0fyvix68l4dp9852dak58dbiamjphx2hin087cadaji6r63";
     };
     wmClass = "jetbrains-pycharm";
   };
 
   phpstorm = buildPhpStorm rec {
     name = "phpstorm-${version}";
-    version = "2016.3";
+    version = "2016.3.2";
     description = "Professional IDE for Web and PHP developers";
     license = stdenv.lib.licenses.unfree;
     src = fetchurl {
       url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
-      sha256 = "0hzjhwij2x3b5fqwyd69h24ld13bpc2bf9wdcd1jy758waf0d91y";
+      sha256 = "05ylhpn1mijjphcmv6ay3123xp72yypw19430dgr8101zpsnifa5";
     };
     wmClass = "jetbrains-phpstorm";
   };
@@ -304,12 +304,12 @@ in
 
   webstorm = buildWebStorm rec {
     name = "webstorm-${version}";
-    version = "2016.3.1";
+    version = "2016.3.2";
     description = "Professional IDE for Web and JavaScript development";
     license = stdenv.lib.licenses.unfree;
     src = fetchurl {
       url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
-      sha256 = "10za4d6w9yns7kclbviizslq2y7zas9rkmvs3xwrfw1rdw2b69af";
+      sha256 = "1h3kjvd10j48n9ch2ldqjsizq5n8gkm0vrrvznayc1bz2kjvhavn";
     };
     wmClass = "jetbrains-webstorm";
   };
diff --git a/pkgs/applications/gis/qgis/default.nix b/pkgs/applications/gis/qgis/default.nix
index 680cf921ce26..a4d0d21ef40d 100644
--- a/pkgs/applications/gis/qgis/default.nix
+++ b/pkgs/applications/gis/qgis/default.nix
@@ -5,7 +5,7 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "qgis-2.16.2";
+  name = "qgis-2.18.3";
 
   buildInputs = [ gdal qt4 flex openssl bison proj geos xlibsWrapper sqlite gsl qwt qscintilla
     fcgi libspatialindex libspatialite postgresql qjson qca2 txt2tags ] ++
@@ -14,8 +14,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake makeWrapper ];
 
-  # fatal error: ui_qgsdelimitedtextsourceselectbase.h: No such file or directory
-  #enableParallelBuilding = true;
+  enableParallelBuilding = true;
 
   # To handle the lack of 'local' RPATH; required, as they call one of
   # their built binaries requiring their libs, in the build process.
@@ -25,7 +24,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://qgis.org/downloads/${name}.tar.bz2";
-    sha256 = "0dll8klz0qfba4c1y7mp9k4y4azlay0sypvryicggllk1hna4w0n";
+    sha256 = "155kz7fizhkmgc4lsmk1cph1zar03pdd8pjpmv81yyx1z0i4ygvl";
   };
 
   cmakeFlags = stdenv.lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}";
diff --git a/pkgs/applications/misc/cbatticon/default.nix b/pkgs/applications/misc/cbatticon/default.nix
index d072c5d6a49c..efe2b2863ace 100644
--- a/pkgs/applications/misc/cbatticon/default.nix
+++ b/pkgs/applications/misc/cbatticon/default.nix
@@ -3,13 +3,13 @@
 stdenv.mkDerivation rec {
 
   name = "cbatticon-${version}";
-  version = "1.6.4";
+  version = "1.6.5";
 
   src = fetchFromGitHub {
     owner = "valr";
     repo = "cbatticon";
     rev = version;
-    sha256 = "0m3bj408mbini97kq0cdf048lnfkdn7bd8ikbfijd7dwfdzv27i5";
+    sha256 = "1j7gbmmygvbrawqn1bbaf47lb600lylslzqbvfwlhifmi7qnm6ca";
   };
 
   makeFlags = "PREFIX=$(out)";
diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix
index e0d426e99b62..28b5f02e813a 100644
--- a/pkgs/applications/misc/electrum/default.nix
+++ b/pkgs/applications/misc/electrum/default.nix
@@ -2,11 +2,11 @@
 
 python2Packages.buildPythonApplication rec {
   name = "electrum-${version}";
-  version = "2.7.12";
+  version = "2.7.18";
 
   src = fetchurl {
     url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz";
-    sha256 = "0vxdfl208if7mdsnva1jg37bnay2dsz3ww157aqwcv1j6512fi1n";
+    sha256 = "1l9krc7hqhqrm5bwp999bpykkcq4958qwvx8v0l5mxcxw8k7fkab";
   };
 
   propagatedBuildInputs = with python2Packages; [
diff --git a/pkgs/applications/misc/exercism/default.nix b/pkgs/applications/misc/exercism/default.nix
index 6ccae9d53601..962d8f8b31f3 100644
--- a/pkgs/applications/misc/exercism/default.nix
+++ b/pkgs/applications/misc/exercism/default.nix
@@ -18,6 +18,6 @@ buildGoPackage rec {
    homepage    = http://exercism.io/cli;
    license     = licenses.mit;
    maintainers = [ maintainers.rbasso ];
-   platforms   = platforms.linux;
+   platforms   = platforms.unix;
   };
 }
diff --git a/pkgs/applications/misc/pcmanfm/default.nix b/pkgs/applications/misc/pcmanfm/default.nix
index e6d96b099fad..aceeae87d085 100644
--- a/pkgs/applications/misc/pcmanfm/default.nix
+++ b/pkgs/applications/misc/pcmanfm/default.nix
@@ -1,10 +1,10 @@
 { stdenv, fetchurl, glib, gtk2, intltool, libfm, libX11, pango, pkgconfig }:
 
 stdenv.mkDerivation rec {
-  name = "pcmanfm-1.2.4";
+  name = "pcmanfm-1.2.5";
   src = fetchurl {
     url = "mirror://sourceforge/pcmanfm/${name}.tar.xz";
-    sha256 = "04z3vd9si24yi4c8calqncdpb9b6mbj4cs4f3fs86i6j05gvpk9q";
+    sha256 = "0rxdh0dfzc84l85c54blq42gczygq8adhr3l9hqzy1dp530cm1hc";
   };
 
   buildInputs = [ glib gtk2 intltool libfm libX11 pango pkgconfig ];
diff --git a/pkgs/applications/networking/browsers/firefox-bin/sources.nix b/pkgs/applications/networking/browsers/firefox-bin/sources.nix
index 8e424ea80b0a..da057f0e237b 100644
--- a/pkgs/applications/networking/browsers/firefox-bin/sources.nix
+++ b/pkgs/applications/networking/browsers/firefox-bin/sources.nix
@@ -1,915 +1,925 @@
 {
-  version = "50.1.0";
+  version = "51.0";
   sources = [
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ach/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ach/firefox-51.0.tar.bz2";
       locale = "ach";
       arch = "linux-x86_64";
-      sha512 = "fb941dda8a38f2e8474b4c1b235b4d3b2364a3e4b70f929cb40a6bc96a8859a830b072a0b3bb03bf7d551bec6eb0c46e41a93f7ebf4fb73a21949b824ab09084";
+      sha512 = "28041c7cb96e90ba3c9fbe689b000f56e144543b83f1280da785f70a299b229c72638f206425049ecefdec5f33c66fbc588a2032c392e637428fa03cc5cd9fd5";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/af/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/af/firefox-51.0.tar.bz2";
       locale = "af";
       arch = "linux-x86_64";
-      sha512 = "9ca21be569db94f528dd74ae269e9a0929f9a73b399ad619066c45f38fdd04b511fd8126bcbdca7ad0d6aeb7ec82d597287ef168c04fe1c7a47d9dd4fec3674c";
+      sha512 = "73196f42a1932782a7ae682c461a1c0f443b7369c4c9d74e4f45af73db5d0ae6926dc8055cdabc68ee63dc669e8846b5a529bbc16759b0160119ee750eace1c9";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/an/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/an/firefox-51.0.tar.bz2";
       locale = "an";
       arch = "linux-x86_64";
-      sha512 = "1899bd8140e847c6458b23bb0652bcfbc3cc1a6a9520ea10546d6b2f6719715f18ef5e79af07b68fe2cb5f50bb7f7c85376f17081478990a7ba907c45a31cc95";
+      sha512 = "eee39ff92c9354b4d6fcbf801e899f123053a6509e9cb857ff25e76e198d8c71d2c8979b7bab8393ab130a3518f564d1ca5e2d528432168f2e679f5cc3b0755e";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ar/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ar/firefox-51.0.tar.bz2";
       locale = "ar";
       arch = "linux-x86_64";
-      sha512 = "d3c5e6c263ed1a0cbd535279d03a446ed6e59471c7949d381265056e7dc6bcb7df4abbdc13601b7b681185f66219676a6662e217510a13136d89dbdd6f8460a2";
+      sha512 = "cfcf6ad7e8aa2350207ccb26840757765ab702ab414eb6c657a58cc5ff8422089fcc6544149278d627cc397cc5797c42a44f0bc18fdc2a961379e58cbeabdb9c";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/as/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/as/firefox-51.0.tar.bz2";
       locale = "as";
       arch = "linux-x86_64";
-      sha512 = "3b0112c8830fd9e90301efaff5d8414cc3edac9382947520ab1c283ebc4dd897ccc3102d12d35eee60fefbdd13329a02f056375fced5bf45a51895a7abeb48b6";
+      sha512 = "7e2b8862528b7a58ee598f56069f6c685cb23aee23f5aa708b4a3fd8c6164dabc5b3cdec418aa2280fbf3948980b5cb9bb6980ef39ed9c96568ad791bcf7873b";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ast/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ast/firefox-51.0.tar.bz2";
       locale = "ast";
       arch = "linux-x86_64";
-      sha512 = "b036544990cc08fc0588730780fefe9bda82fa1ffe53b0d7cc0cce60f5fbaba261fbeb6117ecc4b18985751572a5c08f8cc30e9b35291841694a180e0d5e75c5";
+      sha512 = "ef636ef3f1b6a258dd01e1df91b6beba0d8fea6ce3ce09b62e6702fb145bf670a91df0faf23604d066f44e4bfef11c89e34951cc9993bee7be6ddda966f10f22";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/az/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/az/firefox-51.0.tar.bz2";
       locale = "az";
       arch = "linux-x86_64";
-      sha512 = "4beacaf3cf371bf7226095916f3e0c8f4941e32dc2ee6b25368cee6569dd102131cff4fef53f9ce88706172e838dc0a916bc741ae22bbf3eabe293fde3350e67";
+      sha512 = "0527b6c09d9cf6d785a17d3bf7934374f8d9f8470bf7aea884040bcf1faa29c1038640840dff6bfdba8786796d42d41b5acafc724e11af9cc654377d7dab7b3b";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/be/firefox-50.1.0.tar.bz2";
-      locale = "be";
-      arch = "linux-x86_64";
-      sha512 = "e249554f4ed1f1434b3c0b51736c9739817f39db8afd70cf60a7e3ce5a78dc6a23ae903b991f342bdb93b4324c5c5309bec4e84313beb5af94d887249619fa79";
-    }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/bg/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/bg/firefox-51.0.tar.bz2";
       locale = "bg";
       arch = "linux-x86_64";
-      sha512 = "cc4ecea41635b921a652684d7bf10f2e200aacb0c18e50a95f0412c049db26042c0cfbf6d40fabd3db5aedd7ffdca4633827b5f17a27b56766b372420536b593";
+      sha512 = "91d97992a0382b36c051e6b82f41121464df8ab9a24addf22c402a660b0340babb3a03ba5ae2144fdae6fd89b7960c542d382a116d303c1b660e8c58b22dae38";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/bn-BD/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/bn-BD/firefox-51.0.tar.bz2";
       locale = "bn-BD";
       arch = "linux-x86_64";
-      sha512 = "75483d1f7a5bf3fe54de817222f78aecd4621cd1a53c330cda74348ca6569bfe3bac6b60d628abe4632c0e68b9a9e6f0c24b69bb3ac09e52023ee352190d1cf3";
+      sha512 = "0264a2989ce61684eaaeb68f9a55f0498c58e621e39c89d3b6b54d17e95b8034d00730858a13bba685fcd24bcbdc9751abd10aa0a4bc528fe7a215c578c4f20f";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/bn-IN/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/bn-IN/firefox-51.0.tar.bz2";
       locale = "bn-IN";
       arch = "linux-x86_64";
-      sha512 = "5b378bc2874cc2fd0f3c739048c894670ed7dfb6e0f37e7de324261c5ed62bc75e62a26a1b2b4392858d86bf2314534841eb8676aeb0bd0e4ce6c23432b4b4a8";
+      sha512 = "f7023475fe832243845d5200fe0ed14fca9be37f6dad21075eee0b40361b5b30e0859a5878063099975ccd06e89ba431c277243f48b8d21357066f9fe73c4c97";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/br/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/br/firefox-51.0.tar.bz2";
       locale = "br";
       arch = "linux-x86_64";
-      sha512 = "eb33bf820530e267a5b5c322951563cf66c886bd71f30d6aa8cc43a2a9b16b6e58d207648b68fb1f2c0d1fd645aba6292c6d8674a3fef7c23f3d2ef706973ab9";
+      sha512 = "824810456fd3d4c0b705d8adcbd6a87aa03373f24a6282011c010e88c1bfb19854695c8989f62f432004c7f84bb517f3849454f06748a7f9c73b99035e64637a";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/bs/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/bs/firefox-51.0.tar.bz2";
       locale = "bs";
       arch = "linux-x86_64";
-      sha512 = "aaa4221204b3f736e31fee50c30e73a919066f8cd1f25bf4fc42532edd0a87c557a10f11e275e8b8d2396fe876b8859760d952a311caf0bdfd967e813144b86b";
+      sha512 = "d71a70756807065b64ef25f359913d292b92220e3e6a76018478c592f10f31bdfe393fc8067243274d17a51bb7d37cf2f2c80dff05d00eeff9b5c4360b8204e2";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ca/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ca/firefox-51.0.tar.bz2";
       locale = "ca";
       arch = "linux-x86_64";
-      sha512 = "e98b08fb0cd937375fd7473617fd234659fdd08d1299f0792efb9757b356447c479335bea765b0fad902d3b055569fe491a30b73d3f1c3d32c76c3cd1e621ab8";
+      sha512 = "0bac177c381cb9a40e5d58280e29ed7a143ee3c9f49c35444066c14191ba14fa45214ffd830a8ca7e7f01f8a029f93cbc5bf2c703f8fed8761abd2a800153697";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/cak/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/cak/firefox-51.0.tar.bz2";
       locale = "cak";
       arch = "linux-x86_64";
-      sha512 = "e8a5ec70d52574929edfe93064f03d254e894a790093b2ae86d3f34376db646366a6970d06eaf3f3fe5cfdc89a8f11d0c289061f41d66d7602c0a841cf589428";
+      sha512 = "106ae220caec8528c8251a4dcd785a7ed11621968b35964b1e5a5c5eac6dda8540b63fef2c4a74b6f33a2ce32c7e34ce8d5cde18b4951969b2a7dfc1b11a27bf";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/cs/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/cs/firefox-51.0.tar.bz2";
       locale = "cs";
       arch = "linux-x86_64";
-      sha512 = "3b5e7ea9571eb8ec0f66ca9d062405e3efa874cfa6d39bc455a14f1f25ce1923b276272deda191ddec085d52042ca8cb633e89a8e908ecc428b0d8c3877b08cc";
+      sha512 = "c42915c13ccb30025d29582ff10b52f69681e44c835a049cc4d3ccd2d554da9f02d9286e2f49f1b14879474c18391dea539cd407e4aa8daf2586df42ef242415";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/cy/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/cy/firefox-51.0.tar.bz2";
       locale = "cy";
       arch = "linux-x86_64";
-      sha512 = "78b0e26cdff7f123c6ed3721066ad7f5e9f55d0aee5d1c87c12927ae87fadb8f3e1021193134a83fe5c23c62c68cd9536151999c1ed66a885e12a4dcb4b12fb0";
+      sha512 = "6fc312a3e0303a95e0e00d1e22d9c347decb3764e568dddf871ca87becece14fd5d2ad3d064ef03855b3c498237ce68377c1c8bb6881fd897b7a041637e95023";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/da/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/da/firefox-51.0.tar.bz2";
       locale = "da";
       arch = "linux-x86_64";
-      sha512 = "de0f78b0d69c292c482edde52f728df7c3d865f31b8b9633d4ca5a66b4fc5f272402a0715baf5efcf14eba683f8ff633c172a5a198906991ff1735db128816b3";
+      sha512 = "0bb5b30f76fb68e27ec653e627874e9d3828ae419d968b0582197d5db2cf0454c466feae4cc884daa2e2cf4e47b77da76ff2f9e554f5a25f0dff743d7b14d2ae";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/de/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/de/firefox-51.0.tar.bz2";
       locale = "de";
       arch = "linux-x86_64";
-      sha512 = "f95e36a8393d233409b1c3ae6b56b08fbc44d4603bc932cbdd1897650d1528f57cade92b1b1cf3717191c95db54380ba3c11fbb46b25c14a514e0a00fa5b2a3a";
+      sha512 = "631774f6e95d0e0c9177c0cab012b9b9618b1cdc69489accf4dc535db19b6b64f388e510a5adb5a6bb06fbe0a2f2518747eda2a2361dc4d444db9302bee67256";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/dsb/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/dsb/firefox-51.0.tar.bz2";
       locale = "dsb";
       arch = "linux-x86_64";
-      sha512 = "a06f9172490ac731f06701fb7f8414438c1e520bbe5669e8dae54697dc9cc3aa03837ee8f84dd1b69751a4e8d82b34f88ef3c43a37ad9fe6e0c8b1afd18956d1";
+      sha512 = "ba2fb7fb575df8f873ad4a6f7d2ca9c3f5ba150e2754d5f7c8fca637cc8c71198b8ed400d9654b1ee9348c6a39d7e9f501f7e56d9cc6b4cf0c962257c200bb66";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/el/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/el/firefox-51.0.tar.bz2";
       locale = "el";
       arch = "linux-x86_64";
-      sha512 = "78e4a2fc29487347eea47069e022f13482925ce15f37918455a96eb68fed50152ef6a9a93773c4acb680957eded79c0b20883d86f87ac28895d61d777dc07cdd";
+      sha512 = "4256085411d80fe590fb678b186be0a5422502b8260ffccc3f0e01486b4a463d23821c50b2c92e7dbeca26a3a8473f4a4972c6c752c3f4997ec38d69f959d950";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/en-GB/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/en-GB/firefox-51.0.tar.bz2";
       locale = "en-GB";
       arch = "linux-x86_64";
-      sha512 = "53deaf16fefcb954b34ce8577d0ff40d2d497c591765a16c7befa6ded348eb997e1523e873775a52a74e47c41ff06cbad3c612722036b6dce538d768d1659886";
+      sha512 = "cc9ded644135ad6362ef711cb96b84fbb57033775009182106d3681492cfc9df366408ac03f2494c217e46b368075f5f81642f3de17d2ca936867ebc7e03afab";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/en-US/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/en-US/firefox-51.0.tar.bz2";
       locale = "en-US";
       arch = "linux-x86_64";
-      sha512 = "f81b63d9737c672958674096a69c941351caa335d481dbe39ebbe051153f0680f2d3ab4832267eb27ede36b8ce8242e43374ebb49d5cd3a0c44a813efa8c7a22";
+      sha512 = "b585f100d3b9728dd3d1922f12385cf4ffd025ef5ab72a9b0a84e6cc6d4a77bff48bb184f7de63e1d5ac40296a301c2be9607fc502539b89320463c310ac89fa";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/en-ZA/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/en-ZA/firefox-51.0.tar.bz2";
       locale = "en-ZA";
       arch = "linux-x86_64";
-      sha512 = "6e1247ccce230fd044f0fbc64deb345b7d82cd347595fee084b8ccedaf31071b992b988346a8bfc5e5af8a2706a47b7e4ce2681e67a11098eefb7895a73bcdd0";
+      sha512 = "5435a360bca5dd865d4f1dc51f6d93eed6bf71abbb6c63d416934283878c7b0d05c212e60c1269c58d54438f9b3219b6599a2d95e80fc915f1f627a3b95d3635";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/eo/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/eo/firefox-51.0.tar.bz2";
       locale = "eo";
       arch = "linux-x86_64";
-      sha512 = "c27c51252c8312f4280dcedb94906296c52c96c26dcfa21fa392c80b0d1277b8d7507daca312c69192cfd6fa70273f66a3319788bc3ae8b8e835af365f3e8fbc";
+      sha512 = "d5ac355f4e9e08dcd0782e7bef428e6606711673353b5159b1fa153f32dc9c4df53bfdcdbd74aa8e9420c7b8a13d8013778c4bf31b59b4913d1447f901cab25e";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/es-AR/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/es-AR/firefox-51.0.tar.bz2";
       locale = "es-AR";
       arch = "linux-x86_64";
-      sha512 = "ece5c060bbc1809a5609dffbc477ad215245eef1e341232d2516859f1f15959d117e2728605ac57bc94fd6ff6a5b85a892275552ac0b006783d4a1d0f02fa26b";
+      sha512 = "1a173345039821ccb0bab091433523a6eb3c485b7f5083bf41d830576d63cc983d354c473971e174af0de724791be31b57f1de371a8386957c5dd3319b25b0ce";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/es-CL/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/es-CL/firefox-51.0.tar.bz2";
       locale = "es-CL";
       arch = "linux-x86_64";
-      sha512 = "2df20afb64fa6d25678bb6dd91f7c042c754aa241af4e3f728d54526edc342b4e6e591d8586e9cfbcde5baeb932e092c00feabe5e3eff1f00e5065a80f0fd097";
+      sha512 = "9c43565a6bf05ed30a8a79b12ca5d88c30c98bb96949e32c688be9b994bcf9f1ac3a2c670ba8afbbb25c19e2921b046278542068e1918b3ff59ac3b0ad5596ae";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/es-ES/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/es-ES/firefox-51.0.tar.bz2";
       locale = "es-ES";
       arch = "linux-x86_64";
-      sha512 = "5b9af2b2664caeaa574ca92d4a63cd0a86a70278f63596e6a7fef0cab3fa4dd22d1c00408e067080979d9b9017f2edd9a3e1e22b3a75710017ef94bb1ba82bb4";
+      sha512 = "6bcf1b218f940a2c0ab6fc9f899d63555e49e45907dce4026312a767708662032c5c6f8b9958d30ae4adc97d037018407d91cf69c4993a8865ef92f3e8cdab2f";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/es-MX/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/es-MX/firefox-51.0.tar.bz2";
       locale = "es-MX";
       arch = "linux-x86_64";
-      sha512 = "610462c6841615e2241a3edde60333fe3ada9897dc7ec8bfeb1771025a5f9aa0acf9fded1459938c70c7fb478f659817606a133af4b38019a3dfcc7fd3b3f9dd";
+      sha512 = "1092239baa8016968dd8daeb69f6891f12ddc572bd1010c3800d07598a1a7596ebf8d68d1e6d3de4db33f4dd003a463d9ffe69c3a841c65ceaf44133c5eb74e8";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/et/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/et/firefox-51.0.tar.bz2";
       locale = "et";
       arch = "linux-x86_64";
-      sha512 = "2fa4a1683102849ef33c7a149b7628a3c783ee2466d733b328fb8ea4e1ba96917b128a00ad9a8fb75cec181b0208635667bc16d959b28ac1a4af7c96af10e07a";
+      sha512 = "4fb536071e23f2f55674fe790f3dc567c2edabb529c0d3b52b07aa02d9898f3b2d7c7cb694bf22a8e0f921c62d4f33b1ddfc6ee9bdafa42a9405e497677628df";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/eu/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/eu/firefox-51.0.tar.bz2";
       locale = "eu";
       arch = "linux-x86_64";
-      sha512 = "0b53f26346f16dc06478bad62a0191fb2c9c9fdf2864e0d5332540eaa81a4c22b0492128df5c8d7eea9d122482986b3f97837538436730b4ddfcd1c02098d1ed";
+      sha512 = "cafe7b1ce89402c961d90c5f28e14ac05884da13236766b04c444f61b3fe259e5bde9460c31bbdad2192b5e1712b13578a165a49a08879fc251d0e6b3c96cc19";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/fa/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/fa/firefox-51.0.tar.bz2";
       locale = "fa";
       arch = "linux-x86_64";
-      sha512 = "6e6d92624e89214a4110bfdfa181e46847759bb0735e18ca0fcd4b9e333b40b91f8ca48e271b3d1ff4fadc05cfce9824435dbc429f56dfecb6d98e48ea0a31ca";
+      sha512 = "25b2834300a3b48e9cea461dc3b2c5513e81c6b428a96ca7c89e022cfeb4435cad0ec1fbb22806be0adf971c728ff2152e7ba097e0189ace7e15d083670fcee5";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ff/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ff/firefox-51.0.tar.bz2";
       locale = "ff";
       arch = "linux-x86_64";
-      sha512 = "59865504f50aa5e5aa2bfafa1159623dd54b91e3cbcc0cd76ae84e8da063e6db11e2594b9448e5ee75fdd15188c5ba9daf335eafa13601ad942e8f6f4d2bca26";
+      sha512 = "c4eb46a438a5174de003c9ec24cbe9de02c3ca66b485e74fb09f1e6cc2c558d4b45df58fb8fb5b97fdce9e3ea4c473d7568f5d197a2e5ba0c27317204a76cf78";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/fi/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/fi/firefox-51.0.tar.bz2";
       locale = "fi";
       arch = "linux-x86_64";
-      sha512 = "6e07761ce3aa5e42bf887ff13a35619e3e20209b94ed890b505c1f0fd79712a2daeab53ea344378c18f6f05c4673e1f146e8f6a44d325ba387ea6967188357cd";
+      sha512 = "5bc78cebb1414049625da3e3f9f1b33ed8efdc01d4a0b29d2b5c7c69c8b7b4639fcca89f5d75f434c28e3235613094f1e51d35a0bfb9943ebc1993360f8a517b";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/fr/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/fr/firefox-51.0.tar.bz2";
       locale = "fr";
       arch = "linux-x86_64";
-      sha512 = "0abd50bc0a7d5a79b98900cbeff95827c46dc53163ee6cc9220f234049ec43c09bbb8a283c54a1a41387be8d0ac761fd9e215d37ad234a0bdd088b07e339757b";
+      sha512 = "aeba94f928e6632db44e181e3d6aa8b53943f59effa5cccd2bab5b7141c17c6362adbbfe5a28f0e4318adee9d488c336591cd602a55656b966f57312e20798be";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/fy-NL/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/fy-NL/firefox-51.0.tar.bz2";
       locale = "fy-NL";
       arch = "linux-x86_64";
-      sha512 = "2a272b160a2cde4d27f3f3da7a1d6600f4b78af11ecfcfdb3f3596d6a4a1f56b19cec7fee1066afea050b951e1eb7f3245dae28b0a91ac4110010c122609dd58";
+      sha512 = "952b0cb604cc8f3ca39bda118c543aeb1a7dd25d266439c56bed600e136864251ffb866915cf8d92cb8437cac0d9e1d6ec0a8468e89eb0c6df192ad21fb8aaab";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ga-IE/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ga-IE/firefox-51.0.tar.bz2";
       locale = "ga-IE";
       arch = "linux-x86_64";
-      sha512 = "730f2c608d9770e2e4c154d6f1ec223290018d2412a1a6103245a71ef17876cf304acbb16e11915cb2e3564c08099a9207839dc8caeb0553cfdcbb869f6cb09c";
+      sha512 = "dcffd355c1d911a00cdd3ebaeae98e6fa5346934a6ef5b1f66c7698bc188878ab75686ae07d0cc885535bc674ab55931a03a60247431da53bed921ad4ef44edc";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/gd/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/gd/firefox-51.0.tar.bz2";
       locale = "gd";
       arch = "linux-x86_64";
-      sha512 = "cde56f2453d780a9d0debcc012e9a139d61c1d78fcb2a4a7823982321fd65ffe6b538fbaa7a0e5dd69db6f1f3139e5386bd6e02ca5c065510a936fe35583872b";
+      sha512 = "50104f1ba8ebe3505488030de273b04b83568ade8d777fa5dbc75d4b74433f194b16d8e963ea56686563b6aed129cdf64d8db9bad34c68295c5457b3b66812c3";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/gl/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/gl/firefox-51.0.tar.bz2";
       locale = "gl";
       arch = "linux-x86_64";
-      sha512 = "161ee7b027f64698c30bc5147599853c4fa6b8f8629d33e4f11380cf4431835489e834cc3a7b42a676d9da6d6231e1e1bdc5f81f410ccf8f55f33c5ec3e07b32";
+      sha512 = "61436f89c5353e06c29b5aac6ba1ad1ceeab1f580a40643d6afc5f27801b1d67c9f5343bc2e3bc911547389d6b7ce81d75faf9c7882436562fff4fbcf379d057";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/gn/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/gn/firefox-51.0.tar.bz2";
       locale = "gn";
       arch = "linux-x86_64";
-      sha512 = "b4637e7727bc726acf3c1aff2c199fef896eb98f95a04b5b899b9800d0fa2cc6b23ae0c7b5a5acb591e49b03dcab22ef73840f129d9e82dc49e5636234fa570e";
+      sha512 = "14c0b3f085f3bceebd6a75e96efd71d6c8f5e50485f2d7b6b18fca42ded88f5f3b8b90afafda388e7b41cbe39ea2410fae37cbdf8ef0a32d8204ddb7ffee8b6c";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/gu-IN/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/gu-IN/firefox-51.0.tar.bz2";
       locale = "gu-IN";
       arch = "linux-x86_64";
-      sha512 = "b8028122a8132110fb951175d51d07c685c212cc56128788c75bd0c0d21452752e4fd03e6345d80806c8babffeed04f7cdc89b1b338f7d56e539b847c0da7f72";
+      sha512 = "abc5baa41ac6e41813c43838e94b68a63f83058cdf37d25bd315bfdcd27a2a294c91205ec0ce13e7b28508e0ca982bbb6ef3384007d8f857935139e8546b40a9";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/he/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/he/firefox-51.0.tar.bz2";
       locale = "he";
       arch = "linux-x86_64";
-      sha512 = "57adfc574ca5160ca5f95f98c76542109dacef231ad8cbcd4c75467bb599e922d6590cb3214f4e4946a947b36e6130b25f12cf4c641b2ca91a36aab5e8489426";
+      sha512 = "ca90c15c7100b40262879fbf12df5ddb440d4808d94679fa6cd32b9579582721b707843d4c65b4593414e139a7f360b437741c627c3b6e1b238994203a2580b9";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/hi-IN/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/hi-IN/firefox-51.0.tar.bz2";
       locale = "hi-IN";
       arch = "linux-x86_64";
-      sha512 = "3a71226d56c373663401d144388d5c74e583ae34b4d05bb444703426991162392e338f11e993707a83943c0fe85b8a5192099b932afa03b9d3ff6a17903b1271";
+      sha512 = "a27ca89b01034d75719f0e736d82e8240e24cb5ac4e9a21829e72cf8ffaebbfcc6a8906ff1db93f392380481f160e748deda23685b12bcc647d7a6f68e764bfc";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/hr/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/hr/firefox-51.0.tar.bz2";
       locale = "hr";
       arch = "linux-x86_64";
-      sha512 = "f919ce865004a64bcfd834475917ba24c1bfe0bf573e578984199085c073abcfce38b4e838d684f4cdf5bbc2408f84758df9f81345da6e0824f290ad311dc6c3";
+      sha512 = "fb91245060ff025230c3cfa45d15cb96974462642be3f86be44af108da966439575907f8a1b8665311ec599115a3dd66a4fbe09d4ac3f6c09a85bad64d7b2982";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/hsb/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/hsb/firefox-51.0.tar.bz2";
       locale = "hsb";
       arch = "linux-x86_64";
-      sha512 = "4641225b3dcf328dfbe12af68698a4504d0882c1029a36aa617f57ddf11e0edd9cd10add1d887d2154a59e6fa60bb8b13bc185529df166c72195200ef94a5dd4";
+      sha512 = "d649432eccc384e4c83e292649008ffc87f82b41584d91d37f7c9ef4189039b4ef32f9209428051475671fe79961c2f142a6f44a1ab7d371e17a0bf34a58cce9";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/hu/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/hu/firefox-51.0.tar.bz2";
       locale = "hu";
       arch = "linux-x86_64";
-      sha512 = "1f34d1d52d28413a46d5f9efa8d8067c41ec5af861f9fca49a5b59f03e6e325455883a2ee4f9c5e3629d7a61a3f1106f24b4bf4f9a75e6659cad4ec511024ce7";
+      sha512 = "a07e3b8c9b6fc306e068ab6311df45d9cad475561993fa8c576942a3c94ba5677b291d7fb1c390a2b48b2a5c199e25053bfef556d6361fa482a13e17204c7f4e";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/hy-AM/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/hy-AM/firefox-51.0.tar.bz2";
       locale = "hy-AM";
       arch = "linux-x86_64";
-      sha512 = "926a0a1e036303c53fb0a5c65ec2a0285d562c86eb7396f84fa5926a3b9e67ea7872af6d8d436322ca5a939d1626adad80230abfecdeefd51d5cb3b27e16cd5e";
+      sha512 = "246fe80d9e73aec2744534b16e211083277b40cb6fd894e1cbaeee9f94dbafdacf912069917945260208f2446f080c6c90daa91ef07b3485538b5cdfb26ea1d9";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/id/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/id/firefox-51.0.tar.bz2";
       locale = "id";
       arch = "linux-x86_64";
-      sha512 = "f3389014409d143a35c66d57974a77d1d811c3ff9d47f6f13b7c40c0f24154d42bb7e4908589de21b3430d44a108f3765792f7573c78e510292d824f96cc77e4";
+      sha512 = "79cb7fbccd0e6cc199c44a8da8a80fc91a195409145cba768edb02e07f11dfbac15774a67d6a088ed8569e46038b629e998185fa52e5d749d33ad1c91468c3e2";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/is/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/is/firefox-51.0.tar.bz2";
       locale = "is";
       arch = "linux-x86_64";
-      sha512 = "58f320b32ba9a83a6a8a4f4d108c3bd87a4879da7205dfae59b24a3550e0bb90917b431b15a18e38da0d702ee8f2c8756179ea07082ff6e0aeae9f51a3820246";
+      sha512 = "dc63ebf359f00a0ae47988e3ae868a92c79ee35de2e426aa9a15ae3fd3adc35cedbe957ac08e6a3af84ae0be9ead2d405ecf034c698626ef402e6eb01a519bac";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/it/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/it/firefox-51.0.tar.bz2";
       locale = "it";
       arch = "linux-x86_64";
-      sha512 = "60acfa5b847b5390fb5b733f4a35a0a9c426c4126c53f517eae3e6fea3c6c7c88092063ae0d5d3be05a1dfbab32a1e392aff7f18c6566f827cdc6d21b0e22c7f";
+      sha512 = "34a7a1e39c4d03bd43d5613091b71e1c817fbbb235f801171220f43b71c3be258958e0aaa860ba241c1bd27e2c7d473310cf32e14b02ae4e757029d4f51d7214";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ja/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ja/firefox-51.0.tar.bz2";
       locale = "ja";
       arch = "linux-x86_64";
-      sha512 = "3d668102a2f56547b49add2dacbfa1a8ac285007d47585325002cf4250465dae809b50ff1d1d13dcd3f05ce6afaf76b607a696004e60d33caf52d2d531297550";
+      sha512 = "a5b90e23a17e7c8582223e66565c44e9564575ece1df0a749db021405137c3b1593f6ca70c42bdaa97cc83e69d6799d84d3d3d1520f82ba236dd7c99190c0b0e";
+    }
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ka/firefox-51.0.tar.bz2";
+      locale = "ka";
+      arch = "linux-x86_64";
+      sha512 = "ae8f709eb4222ab67111ca596bdb466f92826cbddfa42cf5134b75773f40d6d7aeb8d384c8defc5469b569f21f4e6e8f2208b01f1e0e33d2b9cbe79f06527e4c";
+    }
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/kab/firefox-51.0.tar.bz2";
+      locale = "kab";
+      arch = "linux-x86_64";
+      sha512 = "5090ad81a159dbddd37bba2c36dab62d5cc306c09d3df08562f625a43eb19c8c9456eed19290134ede37e882b2ee7be9b3ada037ce348827273ce05ae49977ed";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/kk/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/kk/firefox-51.0.tar.bz2";
       locale = "kk";
       arch = "linux-x86_64";
-      sha512 = "c35217a07255fcac9bdbfb52777bae3609c22984733297722c62b8391350fe2d68bea20b542d6d2d7f55fc18aa662da226bf83a62e0017c315b92eb460021cac";
+      sha512 = "01b58e772c65b233cb51dc9ff43d98c64727b02cd5293882271a25625728d9d1b2f61429ce157ac4e7eee17460722201f6d7b6fa6013d25385c76067136d963c";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/km/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/km/firefox-51.0.tar.bz2";
       locale = "km";
       arch = "linux-x86_64";
-      sha512 = "fab7429671c3b866ddb7fd0d25101a4a83c6a1ee3822a57517b9c6288e35f6a4339f5a42d93f865a9c6ddf1a9bb5e2e23d8458b39acc34bc2701d68522feef03";
+      sha512 = "e54cc5c2516a79e4981addb237571593af0bd052ca8fc7ed5c7919524ff8ea73b2ff8857d9e6627ff3de5819722c13c3abf633759e9770cad1e04a2fbf28e1f9";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/kn/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/kn/firefox-51.0.tar.bz2";
       locale = "kn";
       arch = "linux-x86_64";
-      sha512 = "2ea7a6094ad8f9b8179028820d79d003f5c04e9bd223fd2df19c7b5daa08ba631176775e9586c7507291aa34fc1c39510bd8851b1fd9a7a08c1786f689949839";
+      sha512 = "79c827a477cf369c57fb51708d1d889637ade4b4ced1d60f8cb57c2b69519ef2b3ca8730657691953e7c3d660f4e97a2fd5f0ee212430ed9be4e2d9c90339b0e";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ko/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ko/firefox-51.0.tar.bz2";
       locale = "ko";
       arch = "linux-x86_64";
-      sha512 = "701a0873b860c62d18ab778d1b0e5c3719cd3e6b49ca37083983f9e3f988d54ebcb2ff27138d7a5e76c940f64f445f96143b0f836af4b9611999b3f49670b8c9";
+      sha512 = "66fe892eab193087be04ceef0a73fb5af5cc153b6218480a20f7ad32da45845a4d5e6a3f9ed130c6c8d2fd0de704c87093a9739233da444848b32b34f0d41445";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/lij/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/lij/firefox-51.0.tar.bz2";
       locale = "lij";
       arch = "linux-x86_64";
-      sha512 = "b394da463400ebbcb77cda8ed102f42eca419e896f0b95432e565f126e9e20aee0d9790888c691b9f7291322a3f49d44a58349f611ffc159d514a5a68f7013f4";
+      sha512 = "ae85fbb36573e547bc35ce92fa82d8fd8359a38dc218811ade333d0ba7d02da17ac45490edc4b1ecfb59b6dd0eae31fe9e21c8154ae443f36b52c46e9bf66c29";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/lt/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/lt/firefox-51.0.tar.bz2";
       locale = "lt";
       arch = "linux-x86_64";
-      sha512 = "55ac32604ec630d2540a7cd2d2a46c4161650f1a3607c2e45ee8006e6bbec0039dd4927ef28c9efd70961f7f5c4d9d6fdc83dd60b670aaaff26c31594c25c813";
+      sha512 = "c9f9bdc80d2e4963c2e4416cc7387a4b5f1b95d5135870ff38d6be6bb01042647ff0df5061a91260dbf48b7a43bcad79d6b974e9e4df67bb0c55541027a9ef8f";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/lv/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/lv/firefox-51.0.tar.bz2";
       locale = "lv";
       arch = "linux-x86_64";
-      sha512 = "df012ca9e5026661622b1d0a1230399e970809f2d8f9a3d81a9b05d438e7f20c706cbf739a229b82296db15bf8bda89c266051c56c7786a673e38600bfd81164";
+      sha512 = "5cac54d12457684cb5cd2ea03647f5bca8c75221837e4e241a4d86d25a99c3464f8f10f8489dc8afeadb4c47f8a2e0a73e78533362c488aca0987a61f75d040f";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/mai/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/mai/firefox-51.0.tar.bz2";
       locale = "mai";
       arch = "linux-x86_64";
-      sha512 = "df74e2c1465b74602ba834cedbc3e07671a813d5979e6a0d85c32e504e01136a05f4915253f785f0b03fa98a4c284d066ff2101737f40490bfe9e30165b712e0";
+      sha512 = "274de5a51b2fe6696f3eb9372c7adeecf2e43b7c9e9a88c84cbe91c5cccd2a843d141cf89a816af3e1fc53e097da9902ca835608a3098a0b3c72bbc3cb0fe8e2";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/mk/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/mk/firefox-51.0.tar.bz2";
       locale = "mk";
       arch = "linux-x86_64";
-      sha512 = "68d80303625c9bf86bc2b86a38d9a41643416bea77445630b10a4219d725a9800fbd973e683c7dad46941fa089df6bcf1d07ba5fcf2c3739eede865eed038a97";
+      sha512 = "91f1b9336aaaab24aea8837c96214cf79c0be4e7e81ce4342751ab38cadb1f1fe294fee53bc3132fca971bb192eadd5e206069001d80391cfd35b00cd334c69d";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ml/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ml/firefox-51.0.tar.bz2";
       locale = "ml";
       arch = "linux-x86_64";
-      sha512 = "bd1168a7b3e17edc28dbc051fb2951d134c85637b0e0bfa2ac2542211498a8018f8c8a74584d2ebfc24336dc803ec04bfdb11d5975f261f8ad92cdda6dbc1067";
+      sha512 = "d48e26a22a81ff4655732f099aecc1c003d0930a1a73859ee13db4e866181e7aebc77d7fd816dab7c5574b0810089476682ef128c2fcfcc04750160a1e19b856";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/mr/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/mr/firefox-51.0.tar.bz2";
       locale = "mr";
       arch = "linux-x86_64";
-      sha512 = "d62ab5e147d55ef1b02b4b4fa5b10986f4a8db2c6154d519f4704a6ad4eee99235219b5d825571c8e08128ecac84c1ec0dc19d124c83d608b4afb4606786e474";
+      sha512 = "bf8a614300090c4a24a37dcbf0d6b69cc114f346fd9a4b729f9de54be7a15440a49c46aac3a1b6b1321825d1e617bdd7cb2b1f48eb25bf9c6610d7040a1cef72";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ms/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ms/firefox-51.0.tar.bz2";
       locale = "ms";
       arch = "linux-x86_64";
-      sha512 = "e254c8a787f2dda76cc2929665b261437d35351d6725af6d1dbdcca514638800d199827edc8cfeafd927d4f0f758cd246ac47b9cef3011aa68fb0baaaa17c882";
+      sha512 = "8a75fd728889a5164d1e610241f558f083e3dbb107592cb26cd6c230b44f52d8d9b3859fca04c1172f128bd7d809171f170fb81118d0e8eb4c64e6e939e68d30";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/nb-NO/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/nb-NO/firefox-51.0.tar.bz2";
       locale = "nb-NO";
       arch = "linux-x86_64";
-      sha512 = "b9e53d23338b7d825e0eebce3764862abacaceb5bb40f66c3d0d67a3fffc2c1f60c168385537bb042bdc45d77453977ca3c95660cbe3a27c7c87b68d047ea782";
+      sha512 = "48b5e8bad93c5d6d7307dbbd790bdc9b5dd3e52a7b7f4f52d4598ccfe3fef97d36eed763394a7cb594682c1fbc8acb9e0cdab52f445ecc6f957bbb1cdfffb8ac";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/nl/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/nl/firefox-51.0.tar.bz2";
       locale = "nl";
       arch = "linux-x86_64";
-      sha512 = "0c8de38bdb5ee3636a7a633c57e9e3445374514014221086b9db106247ca08111c987aca889a416997ed6678cae81d1414636d0fc9ff4e490444041b53cb54d9";
+      sha512 = "bd964b338ae332b5db9b9c5a2bc4bda320eb7824bddc4b6df87a05987b7f82fd8ead21e190d1b6bdf4daad17896612554272170d0e00c88ba94d7f03ac45a33c";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/nn-NO/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/nn-NO/firefox-51.0.tar.bz2";
       locale = "nn-NO";
       arch = "linux-x86_64";
-      sha512 = "4617abaa89c7caaf9481aca13e61629619b1b4a889a2ed652434c8c01d5b8ad9ad96de167f9d3687d303a8aca49492d7b6d7712f9497ae017200962cb229f855";
+      sha512 = "4e534e4590727582273ee97e3889ecd7354a02210678a33fb80403438718eac6a8c213bb158f36eac438b85821c49f4a2fb32a79601ea12573382fed28ef7a24";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/or/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/or/firefox-51.0.tar.bz2";
       locale = "or";
       arch = "linux-x86_64";
-      sha512 = "27df7d794fa1693fb79aae60ec72004cdc3fffa9eeb0662e71aeb639e46b6a4c740e08227e5e334e6c0167aab95de6310f3142bcbd3eef089dedd5eeedd29f8e";
+      sha512 = "92c182fe90312ad1f603cda7989b0e48be790c2f6cedb6e184fe85cba1d8e06b2fae309af86691676c305709fb08553c8ff0b32021b427184419aaf45e396eeb";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/pa-IN/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/pa-IN/firefox-51.0.tar.bz2";
       locale = "pa-IN";
       arch = "linux-x86_64";
-      sha512 = "33101ba56588e23bb5cbd66bf8fd90e66e2fa382f4fa6b3b5d9fc6a1372957ff4e01a7a01b697ee694c589573c9a5f1e605f205bb17ac63c5b5faf8545879376";
+      sha512 = "8ae2a4d0b8488cde54668b8b49895b67da9f43dbd9524b503fbb552baffb0714518bffc1d3f9bb94c7e00386ff5d2431a4fcb1cb0268ccd65b7d69057ba65bbe";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/pl/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/pl/firefox-51.0.tar.bz2";
       locale = "pl";
       arch = "linux-x86_64";
-      sha512 = "373d3355e980a3dbed1cdf8099ba31e370b270402181e61f6e1a829c2f2d9b7b73a9ebbe074e59f21ac3f934898c9c23adb0a5c09c7637fb6c67c3093bd46fbd";
+      sha512 = "26380ab557d16082ed012dbe781a168484825ac86396ef811ef043296c45569c89e38065708770633d603d5f4fee7e2637db00a2bc1820d8dcbf081cc39dd673";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/pt-BR/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/pt-BR/firefox-51.0.tar.bz2";
       locale = "pt-BR";
       arch = "linux-x86_64";
-      sha512 = "ccd935e398095d3b79e2a86b8181e1aa1988fa6a1e12c879d50457756b62ab3dea3087e8de77c7cd98dead6b0078598d22ead36285559af041254bdb454eafad";
+      sha512 = "50761924143f0b619d47f93df04ef38d7cb689230d5b1dbc1385211f3f2a808816a73a70a75c4bb05b2ab8bf1ee0c1905c396338d12b1b9588830e19a1ed1e3d";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/pt-PT/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/pt-PT/firefox-51.0.tar.bz2";
       locale = "pt-PT";
       arch = "linux-x86_64";
-      sha512 = "a8adaa40a2fa564663173641b3dc3d5642c8c3909a8c14904213c9e1cf9bdb4f03dbd44412bed023b02e6eae63bf56fcadfef0907a168879121811bffb9b9ac4";
+      sha512 = "fc4b858423b8d0d4c5ca93951548487070bc4f398c993ee88e5d51c82ec808468d49f32f80a9754d459844a208183af4774d69214bee3253b53b2aa64e29d08d";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/rm/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/rm/firefox-51.0.tar.bz2";
       locale = "rm";
       arch = "linux-x86_64";
-      sha512 = "ce37bb7d969c0fc31c2bfed7ac143e5a6d7d8035a748c5b3eb9a23dc62917ed9ad9b028a9db0b5dca156eb99cb36c763eee39ca893e5a314233e5bf4ec4dbfee";
+      sha512 = "8680c7739422ac11f1f5728a5822376096de49c01005b25906513ed9eff262a5a038f4d69e2fb3d049b7106c9e1dca5c307ebdefd07ae59b11a3cafe13174481";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ro/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ro/firefox-51.0.tar.bz2";
       locale = "ro";
       arch = "linux-x86_64";
-      sha512 = "339120884b8add14d36fdb3fc3ca1355074b0f8a0a87577d1616c392230342c7361859126edfd959e11ebabc6b86c496b440acea679c61e07df59e7e298c47ae";
+      sha512 = "2d5c66437d2edabd40570d2ff22b146ec3583b7c40bfb8846ccee1b2570f876ec62dd6e3d01d3df59ba5828c910cc812c0c4f3c9ab1f872a19bccabd2f69e450";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ru/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ru/firefox-51.0.tar.bz2";
       locale = "ru";
       arch = "linux-x86_64";
-      sha512 = "59ade7f2ef86f412fa376e4fa6a9d7e72cbfabc10e687c7c0bb7e4b4bc2324d7e97e86075c1d7e12480b9f1dd8bffb5e4723f4183882976cd35c4ccf6f2b4726";
+      sha512 = "4ccab70b429afd51f14e398181a08549426c1c73d58b3610ed36a93675ac34f72526f01a1fa3b0d1d6a9d3e9c42503759de73877c5e70bd53a0812da2eca3bdf";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/si/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/si/firefox-51.0.tar.bz2";
       locale = "si";
       arch = "linux-x86_64";
-      sha512 = "4a74944879e40876515e03b1dc2261998bfa2264e074874f886a979de5b48e453c7cbd9a020e8854089b77ca5b5182fe13c685b33991e81c7c533246f87825e4";
+      sha512 = "113d34f2819b4a315764128a4dfdd83c521df2c91bf2bd7b264771b6d475a1a051396d5f6382d60d6f521513c265248f54041e9fe45f0f40a6cae81393cdc77b";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/sk/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/sk/firefox-51.0.tar.bz2";
       locale = "sk";
       arch = "linux-x86_64";
-      sha512 = "b1440e76e19ef3ed6786f9a40330881bff498c7ab20030189c3eaed293e1ffdf991172251da1ac5d512da4897f2a46f3e0921436d86d9178d96387e33e82708c";
+      sha512 = "d6ff2bdd96f3a3f3f14d45bfb28b08a4db48db3be570c19a79ce226f243366e698aeca1b1682ad216c5e0f9d0edc6c2116ff01c6bd13394325e922d8afd3b98f";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/sl/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/sl/firefox-51.0.tar.bz2";
       locale = "sl";
       arch = "linux-x86_64";
-      sha512 = "abd4e6da09005698655e2fb2bb749be35f8b9e8302ba1068e20d27e158c4ae57a0f1cb277a87a2229e4e815cd9d4656ab32cdf0614c01deab572e6c8749d4fb2";
+      sha512 = "296fd1291590fa677ac0208f8d555586b5377a575845d6d7e066f46b541e523166b4be4ea10c69cf4fc043abe2c73a34d1dc670582b49dbb15588edd17d15ee3";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/son/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/son/firefox-51.0.tar.bz2";
       locale = "son";
       arch = "linux-x86_64";
-      sha512 = "17d0444a559c7a5331b93bd314003d84f853fba791efc2df6867becabab9fb7d02bba964d208f44f31af1dfb292cfcbd4de7b48454a7e83668bec26139be40b4";
+      sha512 = "fd3462198ac73d24db0e17a8bd427d3798adeb6af82a775655265e91bdec90e53c49a7317ad98609f24a77ca540cd5864bbce2283e0a82c64d0107dc2a6cb7a5";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/sq/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/sq/firefox-51.0.tar.bz2";
       locale = "sq";
       arch = "linux-x86_64";
-      sha512 = "c416060454550ff04086aba74173500a41c4e592246eb524e682f082a75173a6752e982993df3ca096c176c0a75ed5f26a22414df5e794a042dbeb2a0de22413";
+      sha512 = "a8428c4061730e089621551006e28c7caa6381e43c443e40a03a91fd5bce72ed608b5e49a309597547913767e147efc4d7be37e645f6372bace1b445cdda76b5";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/sr/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/sr/firefox-51.0.tar.bz2";
       locale = "sr";
       arch = "linux-x86_64";
-      sha512 = "f615964e4d87b74dadb841993b3c62d6d683a66ff6ed1634311f58e9c7dc522ed9f2a271a043f7ebaff37f3c1a563d862d7abf22af1015d720979f7459e2ceaa";
+      sha512 = "2f946bede46671690652c44dda2df106d0f56c4af7a40f61c827b7a7c2126abe3082843eede2fba251efc62c2466cfc42cc7ecc63cd63062ccc2d052ceed21a1";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/sv-SE/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/sv-SE/firefox-51.0.tar.bz2";
       locale = "sv-SE";
       arch = "linux-x86_64";
-      sha512 = "4aab1caa825e685923c7c3a32ecf664e2e8cfc2389f48980f51eddaf696cd9056afd944a950dc60987adbfe977d22fab4c994c3aebe1d14c7514369f6898aa7b";
+      sha512 = "a9c9d6246ce4a3af9277fe8ef8d9a8f3b4f7ee459c525e6b5e93a6ecface87db56ba01a3e1407c9a638f78fef0684a27328fd00e2ab4bb43e56f28db0e333cd4";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/ta/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/ta/firefox-51.0.tar.bz2";
       locale = "ta";
       arch = "linux-x86_64";
-      sha512 = "6e556f182e0652b79c338fb0d7bfc9da9eee5ef5c68115e748013404ba4409dbf743b03f8722b36ace38a8732924bb426e7a7af5059256ae1f0065096e68a661";
+      sha512 = "02f45309ab4f2995ed2404c8cc596d111dffc54d391c028960f4c181e409cecf4117dc1ae8aee900f7ac72c29109d7bfa5bca228d35a1b5907e25fc748aafbeb";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/te/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/te/firefox-51.0.tar.bz2";
       locale = "te";
       arch = "linux-x86_64";
-      sha512 = "ff201a9e66645e148ec740921a7bb1d1b9ffd4b6200d98d06be0f235e829c6a355be0615341f899b433836fc2f2976223a6e46c4f5172590b5254a26f4998959";
+      sha512 = "897448ac3dbf5ae75319feac7c32845cb2c8c60138df429f0171ae71b0346ff71efe005f3a6792087104cfabe6843a9f7e5406c26de2eefe325d4ef6ec172021";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/th/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/th/firefox-51.0.tar.bz2";
       locale = "th";
       arch = "linux-x86_64";
-      sha512 = "0e9d0c10f21d3d41825194a3afe21cf4281cbf5825839f908d58821d40358ded4226b5dbe7a094b95aa087769de6179331a19a2fe780b4ee56c74ce137a33ac4";
+      sha512 = "262176b096a9025681f8b3f191ad46d8f0b83f9ec9abe9c34b5da4fea57ec2720545957041e3ff1c1044b470411b158d96785315bbe7d2c8bb29cb00c54facbf";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/tr/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/tr/firefox-51.0.tar.bz2";
       locale = "tr";
       arch = "linux-x86_64";
-      sha512 = "299f07161a3439902110d8929b5ffdc332562b956d25999235b3e212241d95ce94646ba3542d7138c6ac5bbbe274c614d2f49aca8a674d252b240265397fa48b";
+      sha512 = "40e948f12456caa572bd78e5bf8d089428432653cf5bfab0ba23dc120f1cc36f370f745f1965ab0687f41f7617da78f75aa4429f51e5b650c7bf979f600ac5f4";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/uk/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/uk/firefox-51.0.tar.bz2";
       locale = "uk";
       arch = "linux-x86_64";
-      sha512 = "f108296c0aee994d558cc422403f45c994d2878b69180d3cf526abe4f5b29d8dc59ed9c58f72a0d21d2550a4d32869b96ae43a1ed251e885bc7abc47b22c3894";
+      sha512 = "b82936161c27b5bafdaf340cb26c49c14bf9b3ac39e1831efcfd51b968ff4bfc953f8aed99ea6aa1b23b1a73129d221f0ec5c55de41dc81c405a531a4dce0934";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/uz/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/uz/firefox-51.0.tar.bz2";
       locale = "uz";
       arch = "linux-x86_64";
-      sha512 = "293e4d99572a22dc053cdc8f5ac40338eadcbd622ee1d47c2bab9914ee1d2507e89a8b4340a12d64c0c4b37f4ec312bcf94921184402852c2a7cb114da93983f";
+      sha512 = "b096c35ee124320ec625d3481015715570d56d6b6b4490c818dd40856bae4aea21c066c18bbe2cdd267d92716d8ed05e9cfdd34e12ebf4517d2b835e76a2c8a3";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/vi/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/vi/firefox-51.0.tar.bz2";
       locale = "vi";
       arch = "linux-x86_64";
-      sha512 = "24355d25ecae3e5f18a0f3c7b87dcec8c18077292329a7ea38e5e9411c38812f394656d79f3fa653a70770ae136b3f5fbd1644a7657f448dfa78f8e795de5afb";
+      sha512 = "9802425d5866ec036c542545e9bce34fb0e0f80b9b6146bb36a5999a02787095c3e786b9b7e1173f992c054caf8716295bd6084f411553df35586bf725c375db";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/xh/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/xh/firefox-51.0.tar.bz2";
       locale = "xh";
       arch = "linux-x86_64";
-      sha512 = "0c917bc8cf0a5b66f85cf1511d3fb0b2f4c4bfaa10883d277e6d4bf399b4b359d8ec39c4fcdd6dd23ba3645047318eace530527796b4be58058cb15de69853f4";
+      sha512 = "afba6b174855327a08d404b555a41982f6ef9f42d1067be40b5cae2ba5b62d232faa70936e02e7a313938b5fbd9acd3fb2af5cbc51128c47f2d2630f052a0741";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/zh-CN/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/zh-CN/firefox-51.0.tar.bz2";
       locale = "zh-CN";
       arch = "linux-x86_64";
-      sha512 = "ceb0d7404aa7d8295920e99ccc77e2da7db6101af92d29dfc3c1f2cb4689b582542d154cbc749ad3b7a744f545ccc39e479db4fbe2c7d18c98bf3bf412eccc46";
+      sha512 = "fd952a6e825784b19179e2214755659c31c1be15ad8f42bfe4fe4905b57b5aaad7df9a0c0e9500ce75eff3f12743bc309dff10f9fd72a5849948e91c4d3f58de";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-x86_64/zh-TW/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/zh-TW/firefox-51.0.tar.bz2";
       locale = "zh-TW";
       arch = "linux-x86_64";
-      sha512 = "e942d5d6b8891d062b452f1a083de2849cc69ac45801aee0b5c413a786ce9d67555d94416d65fb6bb6e4b74cf11ae75a1036dfc661b50fda10b95febd86a80a2";
+      sha512 = "8b9c643ac91fcf01e6708a3ebabc735de5dbdeb8897a9d57560d69c04746e2a9b9902ae356416435010bd4f3e5241140b0a27162afafd5ee5c097f41dd34cfc7";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ach/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ach/firefox-51.0.tar.bz2";
       locale = "ach";
       arch = "linux-i686";
-      sha512 = "7546a3fb1cd0e06c9f6916c668cedcfa4671bc15a7ece8ed3ad8ebd1bce5c6ac84e2e024d7e2149844f1797d66374bb2c8769e67d1c4af941eb626c610c433f2";
+      sha512 = "cfbfa3136edb8786e6a573b4af9aab3250b3eda10c4a9bcade7e489e3bf0cf4761339e811397d938b46ab5cb708531fb036bfe379f54c4857e31b91f003584be";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/af/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/af/firefox-51.0.tar.bz2";
       locale = "af";
       arch = "linux-i686";
-      sha512 = "a6981413d7974e2ca13ffce9fc65c0f69242d6c6bfaa6253fb13fd8fc7e62059df718b4722a7a879dc8e352fd94dcf74db41765dbafc277e8debdd7e35a1242c";
+      sha512 = "15e9023b2434c037bc7f0871d97c0371a78ac5ca4981b30f7f9b95202ca299f3b23b07d711c1d33bf3f9d58969816bb2b06c77488ecf9812e79ad2158b9d102c";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/an/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/an/firefox-51.0.tar.bz2";
       locale = "an";
       arch = "linux-i686";
-      sha512 = "e123cd3a8c9c8657f09d198b7f113b84192174b021dd816b82ee4497e307794bda1399e5425456c2d990788340a58831cd261a4c5c67e5b0ea3daa3d0ac65f65";
+      sha512 = "6aa27e98598b8aa89c5f4b09bcbd86722e0ce3fd54d428814ccde7630a1a34cf593550cdd201d0d4dab53c3f185ae82ff2edae9b10f63d0773c494f8b89be931";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ar/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ar/firefox-51.0.tar.bz2";
       locale = "ar";
       arch = "linux-i686";
-      sha512 = "618b9c24d37f4b82b1e51a5ceb5b2d3981c764f906e7959eb346adc5c974e464d4a691e50acdad7f9e0cfa5855afb6157e8ab600d22266a31fa444db9b7886da";
+      sha512 = "1a4ef1198431566aeda1ead37c7af435834ffe60530e078463c7ec239a1b9cd8cde76216f90920628b7db12459deb25b9b56907de9f29444fe3c70ee02d76624";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/as/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/as/firefox-51.0.tar.bz2";
       locale = "as";
       arch = "linux-i686";
-      sha512 = "93e53546ca9fc554decc0c1d6590b5b84a433ab392abf9fff9712d4432bfd47a1cc57439fc65ae9be91da6d38dd462fbb81fdd7304424e42d08eeb600d298eab";
+      sha512 = "028353834513d8b693f1bc053dafb4cf31f038b3c2a58c48454b5990bfc235712ba5c64da0390a9ede4a046167b5ddb5aa24cb86be5ed8272dd7dc5fce7eabe6";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ast/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ast/firefox-51.0.tar.bz2";
       locale = "ast";
       arch = "linux-i686";
-      sha512 = "e1115994008db11f3c69679372a3f07b6edde23dca20733b7f06a5b0c63dad2a264c02e9f94dc74976efbb3961155216111522c3f1ebca91929ae356f8218c87";
+      sha512 = "be3338ad2a7b86bb3424984860009f9035888e86dabdbf5beb47f3020504c888d5aead0b7f818c00b373a33a73fea48d0d4d9ac549009f37a897f76121bba667";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/az/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/az/firefox-51.0.tar.bz2";
       locale = "az";
       arch = "linux-i686";
-      sha512 = "93be21a2a79d2f4cb2fb5132856837b1ac8d44c699faf623d076b95b5e61126ea540bcabbf57e2752b49cc7b5116f3345a2a78cd07104d873afc2e2127f64224";
+      sha512 = "c775af957145fa138761bdf0d5c8e76b59a0c496a46e9bac708fad7b70741b337e2d639bbab9536504bb20bf8e889fe516d129ccc301df6a405ef73c6d5d39a4";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/be/firefox-50.1.0.tar.bz2";
-      locale = "be";
-      arch = "linux-i686";
-      sha512 = "ca41cbbe732e8e754cdb0c832ca7820d5320a8106bbb3e5d753f4a7f6eb30045b81cd84191f868076e0edca68e35b344d63ececa45eabff7102fe82c1ca19e61";
-    }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/bg/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/bg/firefox-51.0.tar.bz2";
       locale = "bg";
       arch = "linux-i686";
-      sha512 = "4e0a3ff42a8502e07afca92ff98ae675213527e68c3907b177e53a580e0391c075a41ba4e5b87c27558f86b28c1abe2dcae191334c737d37bdbbfb25c33d0024";
+      sha512 = "2e38d0de9d284514803afe24e697ad4491bb27b386c0a0d032db5e175d3b7d2dc1a3f29a874c9b9661951817761588491578025adf675545a7e3c1f1396d5efa";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/bn-BD/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/bn-BD/firefox-51.0.tar.bz2";
       locale = "bn-BD";
       arch = "linux-i686";
-      sha512 = "602cffffa7ebf0f53f3e466d3aa5d8f203698db16089e83c893092e9a0841a9a8ec6a46aa5df1e2fec020cd8a7345e4fe86fc20797ad65bcca56bb2f391390ef";
+      sha512 = "cba31a0dada3915105ef0a000040040f10cdb1908402fa41065266575db5ee7996a49e373f289524216b7e2d3b65fbaf1ba201bf73d1d5a6b844df9e5b305ed6";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/bn-IN/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/bn-IN/firefox-51.0.tar.bz2";
       locale = "bn-IN";
       arch = "linux-i686";
-      sha512 = "2f7ab4b093b8be7dfdbdcf2faad88eb99e8b0e19ebc17efba44d46a332754fcf16e9317398e88c8eea73680ac85f08d2f0a99768fad160d79102e8e1fd6fb8f2";
+      sha512 = "127b84f3e3dacd303f9341ae90239a1077039fffbda642c619c1225fd13687f4e5068a111b84b02afb61b36a4fc8fa09c8ff9979eea263c41e8115108148d599";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/br/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/br/firefox-51.0.tar.bz2";
       locale = "br";
       arch = "linux-i686";
-      sha512 = "abc0fb371ae3144fcb3a5130b13c376169d8a3c3051493fb5fece9a4682757c42bf4717b6494d4220daebc3f1560397f1263706e2a3871d7ee5c0135cdfbe1a5";
+      sha512 = "65dfbc7ec3c54000ffff66bc28191fdec7e29df43e6856c81a999adc1d8bf17c645204064932548b47822e779125ed171ab8d22c02ade3a64ce2327d3b4bdd94";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/bs/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/bs/firefox-51.0.tar.bz2";
       locale = "bs";
       arch = "linux-i686";
-      sha512 = "f62657ff653edae873269a4113a93dadbbb36920e9e30ff04407d28f755bc04e35223031a60018e69cd4c3b891511109b66e7baa83656b0ac37ef5e334f3a89b";
+      sha512 = "ed542247e77146515d5a808d745769cd0f76f950ec6029e2a7673d2fe520e2d7540921f5e8c9c6c7681d2cb08f63e742272c3f4daf55c6ef0d8e46195ae597af";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ca/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ca/firefox-51.0.tar.bz2";
       locale = "ca";
       arch = "linux-i686";
-      sha512 = "bcc4184d882075eb2ea875c7493ca4f276796672a029ab161b4f2168e879b46a6fef454e04e53531a32ed5bf82178d8d2ef15f9e43679625e4f7632e7cf51f32";
+      sha512 = "0cfb11b0d869b0466d477ac99e4dc65ee60f0d2d08a8af307c2c149e2d10bd8df17b16024947872d5b4513ed5b0188716dd5d23132429a180209d187b62732f5";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/cak/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/cak/firefox-51.0.tar.bz2";
       locale = "cak";
       arch = "linux-i686";
-      sha512 = "88448d8c17235e318628bed05d607f30ab9db4e05f181a36e39c02f2df840a10990a534d5d5f8e16fdaeecfbf3e51bc7cd9f45b8a84b3447132bb57a87c4e2d3";
+      sha512 = "92b08671ddd98e4ee1158dd0fbbd0ce0d45794732f34a3ad43f8698ed2085fd4e1b5124da3ad47fb1ed01ea372655a3d04b82200b8af5cc0ad997c61dc2dd855";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/cs/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/cs/firefox-51.0.tar.bz2";
       locale = "cs";
       arch = "linux-i686";
-      sha512 = "acb9fe18d8a5fe97cdeeea24e8a6e56895a3be16c6a5f2099a69c32768e2f76a2c0fd081d3759a2c87d002ea5021dcc5f806195d3bed06e8514c383ee8bf998f";
+      sha512 = "f5bef965360f84821f3b39990c6dcddc12f52851f1d33cc8d72d8772e770ced14784a1e29667b7047f3c9bb9510086eec2f16d2a4401c2b0cafc6b1275c00b28";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/cy/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/cy/firefox-51.0.tar.bz2";
       locale = "cy";
       arch = "linux-i686";
-      sha512 = "89119e29496981f8ebc85d512e5d58d8bd3678cc8ea4c90e544bde60881cf5f768b4060d710f8ba4d61dfbd7299a4437f5e7aab1140a03cd498af18c480e0b4b";
+      sha512 = "d6bae2da5f69e95ae8e751653d66917571279f44810666553bb7dde4cd41af954c0002276afe7d28dceb83210877bc19db48d7fb7498cefa256e609201e89db0";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/da/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/da/firefox-51.0.tar.bz2";
       locale = "da";
       arch = "linux-i686";
-      sha512 = "285363c04cb6506400077f36867a65372fae80ca6b3fbed88be219c3814d3f38a650c78f36014ae205ba9e5167b5291353c799b918c8e2bca6f23374094db209";
+      sha512 = "bb705294c74406eb7dd50dc6a9b70acc7db297e1bf4c4087523a5f6ce653c0e98fac64f0b9bc34442c8cb8d2da3e5077c06b72495a83ffb0a1c5dac04cc3ec36";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/de/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/de/firefox-51.0.tar.bz2";
       locale = "de";
       arch = "linux-i686";
-      sha512 = "ea470ab934f49ff79b8cb04809f5605edb70d3ea9bc997c01802f09e3fbc8d045bb322b97b729916b6371b047f3b4ac14b25dca8e8befea401362c2024a2fa13";
+      sha512 = "c77daf84ee3bf5f3d04039f897c603cfb5d067f6da1dc767d2df6a29a7ea479ec69814d9e7e83be94285970b69ff700e972d526b5fe029258a3adf592688c1a4";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/dsb/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/dsb/firefox-51.0.tar.bz2";
       locale = "dsb";
       arch = "linux-i686";
-      sha512 = "74bb1ab27970819fd9a368ac5f9a14add5378d9a7c39707e12146ae8082f39593ea53b5dd730708764515b0177d7ddb675b04a8a75f259303d30f281b44527cd";
+      sha512 = "c95d409c97e65e4ae8ff5a57c1e626b638096801c04eb70b3d0f737f7ea66c0572327760db4595ab05025b727df8be233df3bf79e9e79504df2b7b26423af8c7";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/el/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/el/firefox-51.0.tar.bz2";
       locale = "el";
       arch = "linux-i686";
-      sha512 = "3d3eb83a16c94eaa0bcb8627239b74c0a261189b67b917d4e2fa9ac538ea353a998b691350797470ab8ab4a5effc65a35a36e4b3d372895bd691c63d439a4c9f";
+      sha512 = "0008bf61cbaf9f79318ba48ed34e5d63e26cfe8876e7faef410e5953b8eccef9ef2380a8796d0fbea326a6ed8d4c1ca4c437db46a5b8981d7c05788d054bff58";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/en-GB/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/en-GB/firefox-51.0.tar.bz2";
       locale = "en-GB";
       arch = "linux-i686";
-      sha512 = "23a75b31d461ebb0a3960c6235b6c77471f3687e76f154c8d1fc8cce40ba571a9699e19a5310faa55c52b243e6fd88ec76ccbcb93dfa8b3521493805ca852d57";
+      sha512 = "7069ae86235e354b0485c7a2764915138dd030496340fd4717b37c47ac109e452a41c13450e7c1520d698f0e2aa036919516a6473a1ee5c3f6e14fb45441b7e6";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/en-US/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/en-US/firefox-51.0.tar.bz2";
       locale = "en-US";
       arch = "linux-i686";
-      sha512 = "b1667f7c235b3fdbd3a2c3ee6ddd7976b4142983393b0b8e0443896cd0929d7a43ca484ba5922340410fa3c4868f555a4ab581c9664281a31b912c1922a1dce5";
+      sha512 = "509ce17388209ea19197ec42bee61b4cb9e31d80a829de3e7f751f7cfad9da5d6ec4827ca47499e40662a1eeaa4c74726ab687440a99f9c0fc81415916aadf33";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/en-ZA/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/en-ZA/firefox-51.0.tar.bz2";
       locale = "en-ZA";
       arch = "linux-i686";
-      sha512 = "78238141da05b61b797440a04973187bbfb4d3cff7830385e163e8ccaa603368910be89ee7f2f4e65a47a6917835dff8f840a77a507c3ff0242baaf1b7cfb4f4";
+      sha512 = "30598fca931008beb5f7d01f1ba24f61192f2b2cc9e8cc073f7ab3318b4b5c82ba4abd9324a46126ab9fa7adc7d207947d63eee8211aecf7cb5d5d360dc7284c";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/eo/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/eo/firefox-51.0.tar.bz2";
       locale = "eo";
       arch = "linux-i686";
-      sha512 = "af424d87210909ad480823d56f20327b0e7879bb0ce7ab43994870a69e6e91b3181e480dcc2610064f276ccfccb71badca135f3d8e00ff16947c220dfe67ee82";
+      sha512 = "c887c7819cc2115a637f5454249061ee8a1b9733a11c70f0ef0e0ee0445c4bd072cd553f39dd830fc841f9893906a721b1288b1d7edea1ec437161ec5db1892b";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/es-AR/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/es-AR/firefox-51.0.tar.bz2";
       locale = "es-AR";
       arch = "linux-i686";
-      sha512 = "cca38288b4ef6de4c7469cdcbd7cc29715993ca69c39febb877691b2368182a0efbb0111b45bb5a7ddf47b7c70f20638bc6dc7d6fcd46f8d8127d36bc29da3e3";
+      sha512 = "3167d335115b1861debebb96fd9b190c959fe6d89c085e0c792bb33243cfb7fe80d82a1360a72041d5df422342b3abb4c97779bac85da1caad3e6ad1330af3e8";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/es-CL/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/es-CL/firefox-51.0.tar.bz2";
       locale = "es-CL";
       arch = "linux-i686";
-      sha512 = "104a3fa6bdf86e0e70c54bfdd8c0d388a8e91a9bae0ef973fc043247907295cc5f53c44f414fe8cd6e2f17a02eae14e366fa8c11ccbb45df2055813b17fd7712";
+      sha512 = "1c6cdd5f526b342b234a007d3861c54326edfcea40b06ee691c1bd3d0d9f49c9b426e98286a85736f67d1b328dedbcb27a80610cee63d95ab1eefccce166e723";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/es-ES/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/es-ES/firefox-51.0.tar.bz2";
       locale = "es-ES";
       arch = "linux-i686";
-      sha512 = "be847e51e78991ac739bc32fb29cc0cc166f12f02b5ada4d4656d3447379eb9cd10f80391433607fb63e971d54a48591d60baa5cb963421f1934033e08525d7a";
+      sha512 = "d9ce835f0125063d0be546b9507a9ab00c84ddcc1a83f7a4a4428ec26e3ce5a308845884a6488212b5abe8901300e976068269db03de45a6bb3b684ba9a6186f";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/es-MX/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/es-MX/firefox-51.0.tar.bz2";
       locale = "es-MX";
       arch = "linux-i686";
-      sha512 = "7a7464de3223e9cf1cd0f6b7767ea0fb7ee8db0b3b2c3eb9d284cd5ee8db77b9b0ec3c604625c8c6ffffc41bbac4ea47543c1508f7f8aadbaaeb9954b7e62247";
+      sha512 = "fb31254aaf29d8f843576d3dd1f7d9172ff3f021efbe862aba7409fb9b6269107d982219f519778d1bf8e984589b034fd948367f7d6be7c95b778aaf6ed71db7";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/et/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/et/firefox-51.0.tar.bz2";
       locale = "et";
       arch = "linux-i686";
-      sha512 = "907612ce5691ec5e4647e943ed58d437db872551da8490af3e5f7af44e7d9ac78a8c5eaf721f719af782c8b202aa24ee6a87640e54323b5eb823dbee39b2903b";
+      sha512 = "24b7e8070c92cec844fd13e5fbab3abf549bb2685fd7a09397c8a6a0c1742fb58eaace43542b3f7399639348a5c34427f0b162114cdef99946e673108e899e13";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/eu/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/eu/firefox-51.0.tar.bz2";
       locale = "eu";
       arch = "linux-i686";
-      sha512 = "29c76a0f49d87d162749f824e287f2c1b37cab465cdd5e5e991ce429273d492fc905772c25f4c812c6fb899249a9bb7346eefc91af9f642b4acdc70d3af6f338";
+      sha512 = "ec30e182f42fa2c3a6ff09b8354fea55da91748b9ab024466ec5fe9dfee47ba0b8732d43c61858c4e46a48d8bca9b45a03e972afbcbac113640b44951a67b81b";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/fa/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/fa/firefox-51.0.tar.bz2";
       locale = "fa";
       arch = "linux-i686";
-      sha512 = "0deec5372d5876861af20a60d8db9d4c5aaef8c133c81bc3af6d85d2de528f96ae1da7f5fc78a9bf34bf06d9121fdb6d74e28ad40ae2b7fc23b4a0c161e09722";
+      sha512 = "89e96bdd179fd5e3aeaca6967fb40c1c3310fb390fa62a4dc7ab419cf57ecbf11cf57a01f0ecde64a387a784135f2a6e90c7ff1ee9953508fafe6a8bee236309";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ff/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ff/firefox-51.0.tar.bz2";
       locale = "ff";
       arch = "linux-i686";
-      sha512 = "07c87801154ce44d37b1a477850bf9568651beabb4004d7cfe427c0ecf75fc85da91cffbbd60af773c8b3b7cd30e10937c9ff2fcf65409faf2dd194694d9b6c1";
+      sha512 = "ebe06e58b607791f91522314558506ba4179a23cc3ce64418bee68aeacff6680571013a8af99645f53761564b5b8672c3ec39ff879731c37d2ae69cc81144879";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/fi/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/fi/firefox-51.0.tar.bz2";
       locale = "fi";
       arch = "linux-i686";
-      sha512 = "310b71c8e46fd7ab3127cfc0743c1d98ede8adbfd01a645089cb6e5752e8ff4e3da9f8f47ab5fd7d06284b3fd76b9780d60c2898d0868e30a76dcebf35c24b05";
+      sha512 = "c6acadf1d77cb9b82918dba4ae6421bfd2054d20c852a08bd28e2f908a6d2acaf9c29fe6b347e9493fe2ff14a5c0e9f4896d1d0a91c4f4c23ad7817b1497eb04";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/fr/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/fr/firefox-51.0.tar.bz2";
       locale = "fr";
       arch = "linux-i686";
-      sha512 = "1bc1e595f12d04067b9985be57fe4ec17de89069e4d6b780c16231c4ea195fa0cd8e6daece265335fa56ac3dae9d94c3b76f93199cf1e0946f6d6ac75bd01a1a";
+      sha512 = "75f0efa7a2c4954dc86b5cf4b0e2d2a38bafc9f484d9cb455168ad9b80b2e8201175d5d1ae398da3fd2d5fdcabeff881fc12970cbb48b33175d0d180c90cfdce";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/fy-NL/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/fy-NL/firefox-51.0.tar.bz2";
       locale = "fy-NL";
       arch = "linux-i686";
-      sha512 = "d07b171d615306c6de663f4592450dea92cd7298e6994ea7fb5d55f01f260c2b66d1b4bc4109f44c3d007107c78feccaa6540ddb14dc8666e0192ff3978d8f5f";
+      sha512 = "77e76e4f485a886a9e32c9ba9663a51d0bc25170237b48a5a42bd895592ad04170d415313eae2a7573495d2a15603e5195c014be621bdb6e078bc8d58f668bb0";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ga-IE/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ga-IE/firefox-51.0.tar.bz2";
       locale = "ga-IE";
       arch = "linux-i686";
-      sha512 = "1c234083d098c52a7597dd727c246ea6dfc177edd1e4fc021ad5868ce9082353036d78b9297503a5eb14dc8d500a7a2549d771ea2d3c849817ab791329925d25";
+      sha512 = "0f9745299df4b31137286ee985ea526f33a127fb91a6568f7c2fc922c44e1cf83cc6e728fb1f05c7e68d3365c43045c61020261318a76100a716b7d35948bbc7";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/gd/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/gd/firefox-51.0.tar.bz2";
       locale = "gd";
       arch = "linux-i686";
-      sha512 = "0e88344c58c1b2e63b765949db63ed9e874b23e382f9fe833206cadde1d6c32d804d68a22f17741cc7964773858fa7adb6a6a42e7ed56dad54f2d7d0a71dce08";
+      sha512 = "fd015052565985956dd89cd96b3f3148704010529db96b3f68a7eff3e78c813ef090d79e9b112710439fd07ee3c0745c1ecffb708a62c9b5c12cc40b4ce05645";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/gl/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/gl/firefox-51.0.tar.bz2";
       locale = "gl";
       arch = "linux-i686";
-      sha512 = "244cf85b95f4a1eed0369f4f41ba870f4a3fd48fd85979b005ffc19ab4c03e52da87ae8687f5e3048c33599baab46fa8ed8274db5b180936076fd63e02b955b2";
+      sha512 = "4cd8b4aa4f5f450c7a8eff57592cc584300c64e8976544e5de3c16e358330d5db91c5ce504a2576654dee2f80557f8c439e359e8050518784846f0f8b9c36dbb";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/gn/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/gn/firefox-51.0.tar.bz2";
       locale = "gn";
       arch = "linux-i686";
-      sha512 = "20d51aefbc2f98f83fafd23a5800840d1bce7f0688f76d0ef322b2f1dfe44e75fd82c39fef23cc9afb15faa41514f29f8313748a2e969e2051b3824962de6e56";
+      sha512 = "baba3e61db17d04224c08595de42c4c76ef7e0c05e259772f8265c07f311613552024256ddf0e209358be3780d3fea97b20854284b3a15d8be3f52193df86501";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/gu-IN/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/gu-IN/firefox-51.0.tar.bz2";
       locale = "gu-IN";
       arch = "linux-i686";
-      sha512 = "b07adecbbf8aaa8dce8e7d8e03b86d5ce3bb97646404433d89d82832e692efeb532df86a5a4276dcf1f63c705507e0d87f3d72440c49e5d70c9a08968f75fbe7";
+      sha512 = "5423af4164dcb39954cf32f6ec6aca508d06b3fde8b9946ce9adef03877625db3567000ed5a1e812c5accefcbfda3c89d332e7e3cb373e89d6d7e3be664d63e1";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/he/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/he/firefox-51.0.tar.bz2";
       locale = "he";
       arch = "linux-i686";
-      sha512 = "a6d9a10704ad4097af79ee05aae504a9a6ff109192241cd99c3be665f0adaffa6e5b7b39da859d61d9294cf899a5496ce0c82ac4012a318ad4aa96d6418f380f";
+      sha512 = "7ed6b2d4c108a3a6bfb146bd35682f5c7ddf1c2f84998bc70d362352d6e0ddf2887bf6c84d9dbcaaf6289cca0c29036c4295d4d3b45c52c613ad8a9ed51c334a";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/hi-IN/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/hi-IN/firefox-51.0.tar.bz2";
       locale = "hi-IN";
       arch = "linux-i686";
-      sha512 = "6d78b83b289abf37267b08c72c3b3c42005ddc2f2b13c846012f342b16a3bbf9a891fcd6e24af01160d1749c1b7e76a9f62060970d52144405e4162d4c6297e1";
+      sha512 = "f85636573a871214848cc1785adf6b57a993d0ceea7920654a5b6e92fea62ef91a637a2baeee03e2b5a54469447307b2116dc85338493756768469920deec284";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/hr/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/hr/firefox-51.0.tar.bz2";
       locale = "hr";
       arch = "linux-i686";
-      sha512 = "e70daf40c8a0885c344a01d1cde03b34af23a2d9c76450f0723cc5ec1b577251dfbb8bfacd3eba866953c5b3dcd2974456305a9e171025cfbd43416f679f1cc4";
+      sha512 = "ee4474ceb010040153b9527b4455846b4486be09d8ffbb5604021ace790e4f8937a3ea358cd81513aaa515d5c546f323a309c4afb0acf8092f88d7ab5b4ef96e";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/hsb/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/hsb/firefox-51.0.tar.bz2";
       locale = "hsb";
       arch = "linux-i686";
-      sha512 = "8c137a61cb020dbfb1d73a698d76c4921c9a1dff5f836185caba29c22c81c7c0683cb4139b0642d4bf408e01d498de46022c36de78a3c0413eae048f2be69e72";
+      sha512 = "bc67effad488c2baafc516e51faa2b897d167dff34d8153e4cc3af6069a1621284f497c8135336bb4a52294f4b3cb0cf6aee165fe2a0b09106948a0537be7aff";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/hu/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/hu/firefox-51.0.tar.bz2";
       locale = "hu";
       arch = "linux-i686";
-      sha512 = "1630ad84eff835e1f56e424000515e37d52a268ce569ea12fe5abb8afde231f2aee2293046ee8aeb338ccd81ec98c92246f4b62e000ece032349eedb2ca3bb82";
+      sha512 = "0b38ef74627415300a6575f73c9bfa8eaf5672e82e98524e02f9d79a98d817b217e1238ce485249b0d094903d88c545e1e5469a4a0593322273db5c88e456a01";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/hy-AM/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/hy-AM/firefox-51.0.tar.bz2";
       locale = "hy-AM";
       arch = "linux-i686";
-      sha512 = "dc2359753972d1eac82bc357461331d69e52bde41736ab5c4bd590491add2b592bd3e4f15f32db94922afee84af04500928ece6be14071b10ad1fc4c8b82314b";
+      sha512 = "d492943011b7ea58e211d4a4d5cede973d02928519849be8cdd2287edd92b45d963368dfa556b811cd1353f048e406a1e907899c89cab29c7e28200b5518eb15";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/id/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/id/firefox-51.0.tar.bz2";
       locale = "id";
       arch = "linux-i686";
-      sha512 = "61717f0c508b61b874080e21f7cf22283b1d123e2301490af409c710ee612ee8e0e7709f3bee20891c0a76b3b2de05b4ba94885d1b3813e6612a1dd1f871d34c";
+      sha512 = "b0cf8c192350878ab3502ce077dd0ac85f21329b7bb96e3d3040cb959b20fbd4a21c315d8c2c528eadc9388af63e8f2789b3fa610269e658145afe5c4069d834";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/is/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/is/firefox-51.0.tar.bz2";
       locale = "is";
       arch = "linux-i686";
-      sha512 = "57d649dd96889b533c336078b4d2380a8417a1f77e40379d51a80518ffe2024a303c2b9c42861436425098cbf2e328264972b82039b9fe13054ae3d33a93e737";
+      sha512 = "28e18d3978a7c4510eeea68fec06014e8ac6789c6297048002ec85317e9e1a304dbe530d93d970bc1f4166be91f6ed7fb4961270e91533dc0d9c8314828b06b9";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/it/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/it/firefox-51.0.tar.bz2";
       locale = "it";
       arch = "linux-i686";
-      sha512 = "b8bb4e379f4e21bdea2190695b0f74c23b72af5c6149e8790a433c09cbe3ee170fc68a375b71ea112d15eb00b948b6c30466fe382f86e8c5da85ea7479b355ed";
+      sha512 = "76b25e5ce6fdc96143cbe20e348c45e13c519e0db506ad8f39084734d33bc29dfcb6ce7e4e13c33890c1a6d8d69ae886324e63ef9d3c697f97713b8f4b95f65d";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ja/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ja/firefox-51.0.tar.bz2";
       locale = "ja";
       arch = "linux-i686";
-      sha512 = "287d4ba06988e7a6022fead8af2d921fb761222cd0cbaacb7136c44e397b4620a6129f59f97d98d8a992caaf203e7c8fc130aa4e5e9c58b13a2700f63d786497";
+      sha512 = "01887c81b4806356041be5ff3c7e2a5e9fd3903c3ec3ab8c2f578799375f19bfaaefe18bc41f3055312a7654f91b67f43d1eaee609024cb83a482b05238cfebd";
+    }
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ka/firefox-51.0.tar.bz2";
+      locale = "ka";
+      arch = "linux-i686";
+      sha512 = "595e766c2be521013f755f85dd33c9aef3deeb6824b170fcd948d6d8afad556d4b6e6772041227bf26de23b8a103c39c6c62326c6d30454acd9f73706c53780f";
+    }
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/kab/firefox-51.0.tar.bz2";
+      locale = "kab";
+      arch = "linux-i686";
+      sha512 = "49b72ae5e248d55aa20d719b57ebb569ef7470761aa5358a9ff46e495868507431ba2d081de2ee170cdaf7d6c5a20aaf5a3a463e0ac8ce772a7369a5049b0aa4";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/kk/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/kk/firefox-51.0.tar.bz2";
       locale = "kk";
       arch = "linux-i686";
-      sha512 = "f96a9b418849234b41d181ad141dbb030a8b2f26e73944694c5a805a21778d708862df988dda8ab8fe28eca0aa342153db84d6af971461f0eb8072590445ac15";
+      sha512 = "04329c30d403a516ef459beb9290c0dd3db21de2cc3d2258423771146724dc6ecb97174d0d55520943c5558d1160974937de0d6f6192ef85ec9a23f1770a5217";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/km/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/km/firefox-51.0.tar.bz2";
       locale = "km";
       arch = "linux-i686";
-      sha512 = "63af9259f4326d4dc356513203646712f26dd992d2150d58c4f1892d76f0a3944063dbfec0db68f67d20538aea3247313357e5a822e0a8507bfad2a7209067d4";
+      sha512 = "7773700766cd12c320981b97510743d5414a0ad4c0bc3eaedf2dcd2f48a8bdfa367f68d5ebfdfa1f9df19fd3596da17b249bf41fd9ade6ba4d547dad2e2ec8e7";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/kn/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/kn/firefox-51.0.tar.bz2";
       locale = "kn";
       arch = "linux-i686";
-      sha512 = "afa965fd87ca7dcf5217011cf0aa53d89e1656d64cb8ad973a149eed3897eb577bdbe3359a5310bf9e11dc6e927883c08fb7ef069756313dfc75850378ae7820";
+      sha512 = "43a84c6aa11c9672c3c5a248306d1cf386a37a14efe5bb3c6e469d6dea8c52b31d4222ff9b54cba4a934569d322b2dae2942acda26e91f9a1eb63000f64ac9f2";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ko/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ko/firefox-51.0.tar.bz2";
       locale = "ko";
       arch = "linux-i686";
-      sha512 = "724726e85066350ba9fb0254462b198e198c20970664737c925ca41a474ac4070d2e746b671e8583339fb1935e9a05d6191856f5abaa6e23413efdb707d34d19";
+      sha512 = "4d7d43042a54e495be869ede9904f54ed5dfc3685a693564fa1fd9805fecb5d617659eb68b09f21cb8c976369f62a9e76fea56111919ac4f19b5bd4252916716";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/lij/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/lij/firefox-51.0.tar.bz2";
       locale = "lij";
       arch = "linux-i686";
-      sha512 = "e17504c60dcf3eea34c9525b3ca537656fabf90a7d888284cd5ac014a939565ba50e8b3d0fd1c936dd5be1ac59ee9f61e2de22b5b1eaeb12fca0f59a094a06eb";
+      sha512 = "b8388bfb293177564c09509e8db3f2e2151fb735fd4ddb55adf0045ac096e5e17753632ccb8866e08a0b5fe5edda967c1c9958c7361907bd08b1b27191bed729";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/lt/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/lt/firefox-51.0.tar.bz2";
       locale = "lt";
       arch = "linux-i686";
-      sha512 = "00689c1e19f748e5676ea3b8ed0076f6a63698c57b171eb771d45e9d9ba5bcf359eeb827f5791c96ca6a31eb9ca166208fc63b4a211676b466656e537323719d";
+      sha512 = "fd9ce324c49dc042be215167272eb7f81c653e5a03dbe09bc573dd1a8852406d0f9e002a7db2e04089004e9f30e86e989f8556527e87efe8cfb5b33da5931bad";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/lv/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/lv/firefox-51.0.tar.bz2";
       locale = "lv";
       arch = "linux-i686";
-      sha512 = "1218ec478e28229f0ef8d5a7a669ed6f69722602f75185c4817a9870b35b6955f87f004317bb32cdada379075115c12ad92f73f74818c182a480393961a85bf4";
+      sha512 = "07f4d39b46c8e96908a0d7a144874d8a054c115941014c8fdadbdfce84cfd468226c8da2e82c2f61854af1abd645986b42e038768f3644208afeb4fa5b376088";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/mai/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/mai/firefox-51.0.tar.bz2";
       locale = "mai";
       arch = "linux-i686";
-      sha512 = "6fe97505743b8aa14b9bb3be57077c9da14c2049b2d0d455fc2b777b09bc42924f04c781073188fcdb3130bd5d1cba2cbc5c2ebd04fecc7e73ddb8f20f61c716";
+      sha512 = "3b16658b9a09d9334ce3da90d05e8af0bd163fb7292c6b858a9098a45305e1b6a689687ad02a47259610b0269ed64f58ed0a3611676f5f282bbdc5b048e13351";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/mk/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/mk/firefox-51.0.tar.bz2";
       locale = "mk";
       arch = "linux-i686";
-      sha512 = "e0bbe68d53a08df8e2ac46b9b51567f69fcd11b03d19b6e84f86ca9f255c0920f89b011df5fd4ff300cb3fda65470fc15ad779757421eea2b3b6db6bc7ae9c1d";
+      sha512 = "e4c13520ac45271fe9d11f7f89fe50ef6299137084a0ea46c0ec4a3a64d1a1b311df4f7c54dd6a0f1d351e78e1d328039aa1d547f1bda7a4a386a60b850a4366";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ml/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ml/firefox-51.0.tar.bz2";
       locale = "ml";
       arch = "linux-i686";
-      sha512 = "0e6560b60dc8c0fa309c3a73c1aa3331aec82556e3ee5eec9014d8787c9a5f8311049fc7939ec69569abf689e349be08bce040bfab8bd2ee3ac0042753ce2860";
+      sha512 = "342286c05b755482bf19b38aad1f288c0b333b99c39177bf846f46e22ee9b08914e65be2277939a400a514e6603613dfce0bbdecfdb69ceaa77bdec73d1e6082";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/mr/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/mr/firefox-51.0.tar.bz2";
       locale = "mr";
       arch = "linux-i686";
-      sha512 = "cc31171f3ee669fb47dfe4e416c84ed58125b1a4787a92588c3650a2062e4e7fed28f2cc5c784fcf1d804c64fb335c2e16340d46f2d879b73e4465f8c662350a";
+      sha512 = "e1c4b4e41aafc5fc015883b91bef7d94a8d2f228cd37692d35b10b509036b0cf434f9eee56f7a490db5e2d58f5602ffd63c6413d8220211253dce5fd4b805393";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ms/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ms/firefox-51.0.tar.bz2";
       locale = "ms";
       arch = "linux-i686";
-      sha512 = "12d3bfa0c956b342604a043beefadbe5bff639fbe4b12614832ca36ac11a4046987f3be34dfeb5d3dbb4e9c1d8533645a8d78c3413f9730a72ae952bb07fd703";
+      sha512 = "7ba605a491acba8d1dee3858e0c0ef19b66f95b65565e0fb4bccd7d46d9e01aceba01b2a59bcd6d2a58f0978f446fde838b21edd253afe3de9b856d4c0c1ea62";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/nb-NO/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/nb-NO/firefox-51.0.tar.bz2";
       locale = "nb-NO";
       arch = "linux-i686";
-      sha512 = "b144e104f01a075bd0d107f77af39664323eed78987ebc78a7a2917b86d83c2d6ff3bb35b6c5230e27c8164246fb32defea91e5b84672e20f5071e0d52456726";
+      sha512 = "26d8bb5183dff82a0515936f33cfae5197c0bc3d90e2294622e37062d33c531a6508d0b129579dbfec13941e155d052a2a292591992bb201256a59c7a192bb9a";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/nl/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/nl/firefox-51.0.tar.bz2";
       locale = "nl";
       arch = "linux-i686";
-      sha512 = "da466f3dc573096be1d55bdb03f926f0b94ee2ad8e326a3fdc29d519d00f5c0c9166b85c0c8c191d1ca7c992b05b68abff5f33882e52e43be3015a35333be3d8";
+      sha512 = "5b410bde9763eccfff227b0f667877997be6df08e73748034d411363cfef1fcd33a8639f5bbe883dc52bdb1dd9b728e217b1d4033b5ee3e7b2b5cd1d616b2b69";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/nn-NO/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/nn-NO/firefox-51.0.tar.bz2";
       locale = "nn-NO";
       arch = "linux-i686";
-      sha512 = "85f83572953a0b54805b22f3a21cea70343092912c3b988f8408ac1df1931dda52a8686c32cdd7c91e776a17af0a390d6394b22fdf46ae1205a01499f390dc5a";
+      sha512 = "f4da4e20d6fec450669feb9f31a2f8a49f2670f24c88cab08948043331f8cca44908f25a0028d0a1d73707afb156cc763dbdf7726d427acdc8639066e9fa1273";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/or/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/or/firefox-51.0.tar.bz2";
       locale = "or";
       arch = "linux-i686";
-      sha512 = "1a0b08aa675bfe8b26675f1eac53389f34d02b0c28287d1a73e663ce5d747efd0bc4db5f0f29e3e864c99447e759fdf35ff573235a7ac9b815fe8b749f0a0e88";
+      sha512 = "75c69e7d49436dd14108ce1395236401157ec8e55e417bb56f54e0c601335cbe3613da69ba90a7a6f25cc658d36349b3273ec134a4011bffd955aa320fb603b5";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/pa-IN/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/pa-IN/firefox-51.0.tar.bz2";
       locale = "pa-IN";
       arch = "linux-i686";
-      sha512 = "ee9c1c9cc27cd8470cee9a1600951274f9a663e4562cacf7452426c562815f393b726402b1356f9a60095e85278030d64f35cb1fdadd5c8cd11d6917f9c70d60";
+      sha512 = "2a219eab022bc38c51c0ab91cdf0058840d306a7b420367e2b887627d0cc9af66367cfdff8ea9d4868e3f6e8686db20dd268a5a603e73349bb66a620af594958";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/pl/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/pl/firefox-51.0.tar.bz2";
       locale = "pl";
       arch = "linux-i686";
-      sha512 = "a326d11cb0df567ad13e6d543426c0a28d9158f7d8f0f519b208bddad26145e3eee6350dfb54735cfc05d656ed40b022fa132991a91f1de78eb36ee4f7333fcc";
+      sha512 = "542093af3bee169ca314c592d456f0b8f350ab4ebdc203488ce6881983b7acb8c210c8d195e309a5c6936d43c2c2b2336638efae3ecbe1400bf3ec5c70494070";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/pt-BR/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/pt-BR/firefox-51.0.tar.bz2";
       locale = "pt-BR";
       arch = "linux-i686";
-      sha512 = "cb99dec511614bfdccf43b06e4babd28dbe0dfac464147aadccbf69bdedf3a093e625e4fcdfe0cf8db867b5854ce4c3c5d399a6e9ba932a9fd8574928962360c";
+      sha512 = "b6ad50d05e9023a8cad99000ff368fd1bacac1df5fb1400c44209f9af7a13234b262dd875ad84fcda3b9f52c6fcbaeb4d51363277d4eb09d917e25d790e45547";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/pt-PT/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/pt-PT/firefox-51.0.tar.bz2";
       locale = "pt-PT";
       arch = "linux-i686";
-      sha512 = "2c4215b8bd5ee9ff78fdfda763c5506fb6a3c7056c9b4494d89f77ff4255c86617f4102f36bf534c0e3ff24ed27ef4a0853d24578bb39ae0a04f741422e6eba3";
+      sha512 = "dbdbece91863c98a2fe5e50961b613cc9c3989a519599b554e59bc7fcde86235deffa76381b317aa033af565c781894e0a7f4533cddf41bb14cb4abc93c6bc9d";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/rm/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/rm/firefox-51.0.tar.bz2";
       locale = "rm";
       arch = "linux-i686";
-      sha512 = "470b3ce93cd25c24c0c9a1581da7a48c101d7a93764423073b1934dbeb5a0fc401150009a622feba1f2f799501fb03e0af79a308c4fef08ac942c5adcaaf0d91";
+      sha512 = "b31b0e52f1b368271877fe56f868e64bfdfc4c5f1533883d90ee1b794cea8f54e7df2704f87a4f1913acf35e105ee5fbf4d4535474e1da1ab6919cf702d58aaf";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ro/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ro/firefox-51.0.tar.bz2";
       locale = "ro";
       arch = "linux-i686";
-      sha512 = "7cfaa6b7b2dbe4dadc464591ffbb508e66b724eba76b6fa8e9547ef1092f1aa51f1846e9392a8531c7ba24aedb4ba49e7a2e0c1f41a0b97e6dbacdf1d6c34c75";
+      sha512 = "6f86862438e13213398e5d4ac1a2bf0ade1d56d7ee0ccb217e8ba9383c237871caad4a6c067758babdd571b0bb936890681553cd481ae5790caf52b1b3246930";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ru/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ru/firefox-51.0.tar.bz2";
       locale = "ru";
       arch = "linux-i686";
-      sha512 = "5915a55e881a57797a67d59b4ae9fd95da8bcc4caaa1ad7decb78a6de7a5da7ff35139ff33f7e4ed171615ba9c25ab7df43677a58cecbee530eed25d8a7cc8ca";
+      sha512 = "ed01bb4eef1014d403626e4eb68aa1b86e0a54067c51aad5d0caa255b5cecac45d81ef535d2c50d72cc5568cf45f6cdb7eedd8d527e985e605614e395894a1f2";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/si/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/si/firefox-51.0.tar.bz2";
       locale = "si";
       arch = "linux-i686";
-      sha512 = "a1702939f705a7c2b3b66efdd6dc27a4320ed019dcd62b59da67ef3f078be0afab91ee5158e67cb62691b1a4a002783f807d6133885bd0ac9bb05401268d5f24";
+      sha512 = "fa3d1fb7c5c223e6195b2f65148db2eed268a3cef74e51a27e3e3df025d98209c1854cd393dfa1d8a7206c0aff966da981463b8b11880d76bc1b21498ad9d56d";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/sk/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/sk/firefox-51.0.tar.bz2";
       locale = "sk";
       arch = "linux-i686";
-      sha512 = "43b72dd5ebcb1524c5b633cbfb73eed21aaf466227f29f4ffdd93f1c49dcc2295a38b57b3ce072c40da72184e1fb954a9097ea6d6d6df6807dfc5d04ff48b327";
+      sha512 = "d6d3a459e390f4b768de3017f611f619e98f93fd6676b77b3f83173c34df23ac8425b43a57fa79aba37e8f3f406e3507ce4d709ed65d0b41b4ff3a241d1892a7";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/sl/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/sl/firefox-51.0.tar.bz2";
       locale = "sl";
       arch = "linux-i686";
-      sha512 = "24840e76f00d6a07de581d06050f924018ae2613a6e4cba993073859dd05007b6c97a7d518a6c4b111740945357621c7325c4cd7f45adddceea270e08c1a09c3";
+      sha512 = "578720764a2af9b62eccdad2a95b2233e6f81e1f4c321cc5c6fad0106ef8d8fe944f8e160b7c3386cb561e385e54d2124aac11505ba2e90af88c6f3a57e0754c";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/son/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/son/firefox-51.0.tar.bz2";
       locale = "son";
       arch = "linux-i686";
-      sha512 = "004f8732e194d9c1972390d0ce0d04f9e8f91583676fa5d65bcfb1ee58a6b52db5176ce8a281a3ac94391b43aa637ed157128950e589a0f0a354622da6f04132";
+      sha512 = "c01bdddb9382357a85f86c494977df1185d3fc00b290c6076ccdb48823da8ab73b0af0a7d6d61510f24e881a206e3149070be38dfdaacc8a7a7311e8540acba6";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/sq/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/sq/firefox-51.0.tar.bz2";
       locale = "sq";
       arch = "linux-i686";
-      sha512 = "3dead0e008b4255585d22dacb6fa0aec125da6581b7ef4b1ccc6697e03a5afacd14d340bd8eb7bc0b38478bc6ca20f09364e9180313ceedf1853739ee181d125";
+      sha512 = "4027be0b161a175fa9576c31a223120ebd559873b622ae0a658bcd85b7afa73e0353aa7dcb379fa196f32c6a7a615cd4e8321bc081c195d78ca1bf63d443912b";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/sr/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/sr/firefox-51.0.tar.bz2";
       locale = "sr";
       arch = "linux-i686";
-      sha512 = "cdbf5fa9d085829828f5a395114c3efae9b82e77e34aa69b622e611de8aaf54c525ad12ca445190ba5cc9c22d979be902e4f1f6e6a746b5f97570326cd90009b";
+      sha512 = "3e975eae9b281af3e44c72aec6684c668186c67f99b3a3f584e319b5784eb3dbde710bfade02ef0158d7191b831861aa292842aed2c58b63877fca22caa95481";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/sv-SE/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/sv-SE/firefox-51.0.tar.bz2";
       locale = "sv-SE";
       arch = "linux-i686";
-      sha512 = "ef8a625973d0286799e2a9ea3a5a10078d912a65521be8f935ec6eb207ba53942ec5d0e0c4c5c013ea2705307dafda12294fdf708dca35f72d5ba3eb48733238";
+      sha512 = "130af7c0ff6bce178119b88a585f4216effb0d08b17965b75c8eee0c0af728849f5c78ec1732db1ef4c18a2b004ad031b34221921ff7fee1a580e954fd90f123";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/ta/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/ta/firefox-51.0.tar.bz2";
       locale = "ta";
       arch = "linux-i686";
-      sha512 = "64652e5c68680f1ab15bdb5ec6487387789bd4b1a1537daa215094e57156fd4a1272311d8084435994151aff5e7ddffb16b93c2048989d9c2dc455f98d072b06";
+      sha512 = "afd344db4d2e8f64bb2cbdb9cd29bae258aefe0dece1f784fa683d27107d863ca1000d47f0764edb5c2deb80ba5ba36778396f94aba85ee5ff569a6364bfb64a";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/te/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/te/firefox-51.0.tar.bz2";
       locale = "te";
       arch = "linux-i686";
-      sha512 = "e516ee1f536dd98ab95a9a621cf4634f1ac70a3b5952cd8c6498890536b1630b362ebda8e69577eda4c0a6224f1a9cbf19453e5709dbca467e37597016eb5fe3";
+      sha512 = "e6dde9414cb8a75616bdfd7590aab3b4b9c70b43dc8218eddcda7b5d82968f702438cf6f9fcbac8d1c4aa68d10a7b7aa0b144229a1ddee190a670a93b96b8068";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/th/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/th/firefox-51.0.tar.bz2";
       locale = "th";
       arch = "linux-i686";
-      sha512 = "0b9ae06d78e94d6f9ee5861dc911eca02f39671d8f13f2119323ed7dc394dffbe99f2d23dd3eba955d46f7d4b9775cd9fc3311337d4339748c178aa67d7467eb";
+      sha512 = "3a3a78429127cd9b4677618c583135e4b6adacfd26b411442e7654cc1dba6fe97bdb2485b63cffd212e9dca708e260740cd70a8b8213f241cabb2d0ee651ada4";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/tr/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/tr/firefox-51.0.tar.bz2";
       locale = "tr";
       arch = "linux-i686";
-      sha512 = "31be512e591504d3e8a776933f0926ae54a7797fa037e53a4627b1bb39ed61e4689cafee7d84dfb6b930ee2e4a84df158a97c1c5b201a3a8ea112e2910e65846";
+      sha512 = "f0e75b3edbfc1d254c28e545cd15f0dae01c54361f65b7d3fc9e28cfbe4f620dc995725302e9e77c94b85458c60a25cb2ca3ef11839303fa6a1a55829e01944c";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/uk/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/uk/firefox-51.0.tar.bz2";
       locale = "uk";
       arch = "linux-i686";
-      sha512 = "19614a4999f5c7509a3c0b1c6bb2bc3d9f408ff6727bcf9bf93bf91a59ec8d3c04206719fe2aa2319a0e62687df871bfa2fe67117219398e19aa5a6e0782c15c";
+      sha512 = "e00212ba3205a6ce8ce3e66e430cc653b607501900f50cecfac67c73cb7e3ba6cecff276903aa8bf9fc99a2e3d6e9d30021c12ae74be027b6c775ba8f5ef58db";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/uz/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/uz/firefox-51.0.tar.bz2";
       locale = "uz";
       arch = "linux-i686";
-      sha512 = "22bb3b4a3a5a98ad8da002a220dd2779a46fd50a3d0ff41bec8312186ae34543da44fc49518fee160aa4b48176a0d3ba0dd0c4853fea9befc66911684b83ddb1";
+      sha512 = "e3d3bbfc59c5d8db89edff8be8dd40a8b4d63821bb0661d8b7af73ffaffbaf955e441ba2f51a3bcd60e0a9fdb972ee02c5eb9e9b1639982be4dd8685bd18b57a";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/vi/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/vi/firefox-51.0.tar.bz2";
       locale = "vi";
       arch = "linux-i686";
-      sha512 = "99140a71208a7912dc8b9fd3bd7f5454a0b032dee4d903304dfd14aa9abec0722fdcc6624f3c0a1c6e753bc6ab6ea512d6f8c55b5482069ed6c65d5579f562e0";
+      sha512 = "bbba8a10fa3d3958ee2310bf7c72886a94808ac2dc55bf717b0fb073ab2a38dcf258578e653fea2cbc89daaf996915da441d49639f38a3a25ae00b66380e10b5";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/xh/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/xh/firefox-51.0.tar.bz2";
       locale = "xh";
       arch = "linux-i686";
-      sha512 = "440573a5e364ecd59121b30f664ed23bd2fa80945562d1e5cc04303f12dfff23c96ef53ce07cf689d247a5120b9d7679533ccb6e17c27b29898154f0fc9fc581";
+      sha512 = "1e67a4b168e582d8528192b7f15f4c87edf0a9b5f6113c1a22818e0a31ccf9c9d11f934c043a4f12541ffcf2cc7d7dcbe15ab9df14c37f0bbcfa2a54c6f74017";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/zh-CN/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/zh-CN/firefox-51.0.tar.bz2";
       locale = "zh-CN";
       arch = "linux-i686";
-      sha512 = "4a2f5550c130d0992408d328afa3dbd37f80e5b63c2b33c095ab74e397ea394cb33f87214f1b0d3650c60450738fe3eca636ed51ca1c4e5dce9b58e0f09c30f6";
+      sha512 = "1bdd72ad912894961872da41d76498863bb67ba6bf26ab551cac1da450fc79d5196050968ba0786c32254af83fa86dc2c368e8c9703cdf27309475b1ff4ee899";
     }
-    { url = "http://archive.mozilla.org/pub/firefox/releases/50.1.0/linux-i686/zh-TW/firefox-50.1.0.tar.bz2";
+    { url = "http://archive.mozilla.org/pub/firefox/releases/51.0/linux-i686/zh-TW/firefox-51.0.tar.bz2";
       locale = "zh-TW";
       arch = "linux-i686";
-      sha512 = "6417da7af1792f241c8d57dd5bb05dac974db2b73a6274fe3159037bcf8ae8a23b3f1849f5b42a0bfc09f1dcbf949bcaa8b1e9cc633fd3726c12cde7e3cf542f";
+      sha512 = "7920151c1d99fda897b8cfc62eb1e6ec7b984dc56253478fb49e3182695313c3c0fd21a49f37993024e5898377bed23e6d943f6d8d5a851aba30fff8922287a2";
     }
     ];
 }
diff --git a/pkgs/applications/networking/browsers/firefox/default.nix b/pkgs/applications/networking/browsers/firefox/default.nix
index 6a688de02d08..1c4b5fc9d526 100644
--- a/pkgs/applications/networking/browsers/firefox/default.nix
+++ b/pkgs/applications/networking/browsers/firefox/default.nix
@@ -148,8 +148,8 @@ in {
 
   firefox-unwrapped = common {
     pname = "firefox";
-    version = "50.1.0";
-    sha512 = "370d2e9b8c4b1b59c3394659c3a7f0f79e6a911ccd9f32095b50b3a22d087132b1f7cb87b734f7497c4381b1df6df80d120b4b87c13eecc425cc66f56acccba5";
+    version = "51.0";
+    sha512 = "4406f840a7a2b4e76a74e846d702b717618fb5b677f1c6df864c3428033dd22aad295d656f1fc57e581fd202d894c5483a16691a60b6ca7710315b157b812467";
     updateScript = import ./update.nix {
         name = "firefox";
         inherit writeScript xidel coreutils gnused gnugrep curl ed;
@@ -158,8 +158,8 @@ in {
 
   firefox-esr-unwrapped = common {
     pname = "firefox-esr";
-    version = "45.6.0esr";
-    sha512 = "b96c71aeed8a1185a085512f33d454a1735237cd9ddf37c8caa9cc91892eafab0615fc0ca6035f282ca8101489fa84c0de1087d1963c05b64df32b0c86446610";
+    version = "45.7.0esr";
+    sha512 = "6424101b6958191ce654d0619950dfbf98d4aa6bdd979306a2df8d6d30d3fecf1ab44638061a2b4fb1af85fe972f5ff49400e8eeda30cdcb9087c4b110b97a7d";
     updateScript = import ./update.nix {
         name = "firefox-esr";
         versionSuffix = "esr";
diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix
index 4da733261774..e5e8cacd21cd 100644
--- a/pkgs/applications/networking/browsers/firefox/wrapper.nix
+++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix
@@ -2,7 +2,7 @@
 
 ## various stuff that can be plugged in
 , gnash, flashplayer, hal-flash
-, MPlayerPlugin, gecko_mediaplayer, ffmpeg, gst_all, xorg, libpulseaudio, libcanberra_gtk2
+, MPlayerPlugin, ffmpeg, gst_all, xorg, libpulseaudio, libcanberra_gtk2
 , supportsJDK, jrePlugin, icedtea_web
 , trezor-bridge, bluejeans, djview4, adobe-reader
 , google_talk_plugin, fribid, gnome3/*.gnome_shell*/
@@ -36,7 +36,6 @@ let
       ++ lib.optional enableAdobeFlash flashplayer
       ++ lib.optional (cfg.enableDjvu or false) (djview4)
       ++ lib.optional (cfg.enableMPlayer or false) (MPlayerPlugin browser)
-      ++ lib.optional (cfg.enableGeckoMediaPlayer or false) gecko_mediaplayer
       ++ lib.optional (supportsJDK && jre && jrePlugin ? mozillaPlugin) jrePlugin
       ++ lib.optional icedtea icedtea_web
       ++ lib.optional (cfg.enableGoogleTalkPlugin or false) google_talk_plugin
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix
deleted file mode 100644
index f59de7db9f5c..000000000000
--- a/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix
+++ /dev/null
@@ -1,37 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, glib, dbus, dbus_glib, browser, xlibsWrapper
-, GConf, gnome_mplayer, mplayer, gmtk
-}:
-
-stdenv.mkDerivation rec {
-  name = "gecko-mediaplayer-1.0.5";
-
-  src = fetchurl {
-    url = "http://gecko-mediaplayer.googlecode.com/files/${name}.tar.gz";
-    sha256 = "913fd39e70c564cb210c2544a88869f9d1a448184421f000b14b2bc5ba718b49";
-  };
-
-  buildInputs = [ pkgconfig glib dbus dbus_glib browser xlibsWrapper GConf browser gmtk ];
-
-  # !!! fix this
-  preBuild =
-    ''
-      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${browser}/include/xulrunner-*) -I${browser.nspr.dev}/include/nspr"
-      echo $NIX_CFLAGS_COMPILE
-    '';
-
-  # This plugin requires Gnome MPlayer and MPlayer to be in the
-  # browser's $PATH.
-  postInstall =
-    ''
-      echo "${gnome_mplayer}/bin:${mplayer}/bin" > $out/${passthru.mozillaPlugin}/extra-bin-path
-    '';
-
-  passthru.mozillaPlugin = "/lib/mozilla/plugins";
-
-  meta = {
-    description = "A browser plugin that uses GNOME MPlayer to play media in a browser";
-    homepage = http://kdekorte.googlepages.com/gecko-mediaplayer;
-    broken = true;
-  };
-}
-
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/gmtk/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/gmtk/default.nix
deleted file mode 100644
index 82a1c2712250..000000000000
--- a/pkgs/applications/networking/browsers/mozilla-plugins/gmtk/default.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ stdenv, fetchurl, intltool, pkgconfig, gtk2, GConf, alsaLib }:
-
-stdenv.mkDerivation rec {
-  name = "gmtk-1.0.9b";
-
-  src = fetchurl {
-    url = "http://gmtk.googlecode.com/files/${name}.tar.gz";
-    sha256 = "07y5hd94qhvlk9a9vhrpznqaml013j3rq52r3qxmrj74gg4yf4zc";
-  };
-
-  buildInputs = [ intltool pkgconfig gtk2 GConf alsaLib ];
-
-  meta = {
-    platforms = stdenv.lib.platforms.linux;
-  };
-}
diff --git a/pkgs/applications/networking/cluster/kubernetes/default.nix b/pkgs/applications/networking/cluster/kubernetes/default.nix
index 2b2cca6a6095..0040d0ca8238 100644
--- a/pkgs/applications/networking/cluster/kubernetes/default.nix
+++ b/pkgs/applications/networking/cluster/kubernetes/default.nix
@@ -1,6 +1,7 @@
 { stdenv, lib, fetchFromGitHub, which, go, go-bindata, makeWrapper, rsync
 , iptables, coreutils
 , components ? [
+    "cmd/kubeadm"
     "cmd/kubectl"
     "cmd/kubelet"
     "cmd/kube-apiserver"
diff --git a/pkgs/applications/networking/cluster/terragrunt/default.nix b/pkgs/applications/networking/cluster/terragrunt/default.nix
index 4362d7cff90d..aad37ca4d56a 100644
--- a/pkgs/applications/networking/cluster/terragrunt/default.nix
+++ b/pkgs/applications/networking/cluster/terragrunt/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "terragrunt-${version}";
-  version = "0.9.1";
+  version = "0.9.3";
 
   goPackagePath = "github.com/gruntwork-io/terragrunt";
 
@@ -10,7 +10,7 @@ buildGoPackage rec {
     rev    = "v${version}";
     owner  = "gruntwork-io";
     repo   = "terragrunt";
-    sha256 = "19im4sazw09854lnzalljwx22qswly8ffyys3yrjkd2l9vfxfly3";
+    sha256 = "0i6sqgyxhi6icp7nps9prc40m9wsbr71v967kgl2865sgb214rdx";
   };
 
   goDeps = ./deps.nix;
diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix
index 2ea1de961096..f665e0ea3254 100644
--- a/pkgs/applications/networking/dropbox/default.nix
+++ b/pkgs/applications/networking/dropbox/default.nix
@@ -23,11 +23,11 @@
 let
   # NOTE: When updating, please also update in current stable,
   # as older versions stop working
-  version = "17.4.33";
+  version = "18.4.32";
   sha256 =
     {
-      "x86_64-linux" = "0q3afwzd48mdv4mj4zbm6bvafj4hv18ianzhwjxz5dj6njv7s47y";
-      "i686-linux"   = "0wgq94if8wx08kqzsj6n20aia29h1qfn448ww63yn8dvkp6nlpya";
+      "x86_64-linux" = "0rm91gic6qwlvkclhwpw9mhsb1l9qdxqi7kyvn5ij6a978c70k5r";
+      "i686-linux"   = "0xzk4hxykacvrym8ls8q4zv2277adg6b5m7zmncmfwb6igx4ipap";
     }."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
 
   arch =
diff --git a/pkgs/applications/networking/instant-messengers/viber/default.nix b/pkgs/applications/networking/instant-messengers/viber/default.nix
index 2e3832b9ee87..71d1bccc2b1d 100644
--- a/pkgs/applications/networking/instant-messengers/viber/default.nix
+++ b/pkgs/applications/networking/instant-messengers/viber/default.nix
@@ -1,20 +1,17 @@
 {fetchurl, stdenv, dpkg, makeWrapper,
  alsaLib, cups, curl, dbus, expat, fontconfig, freetype, glib, gst_all_1, harfbuzz, libcap,
- libpulseaudio, mesa, nspr, nss, systemd, wayland, xorg, zlib, ...
+ libpulseaudio, libxml2, libxslt, mesa, nspr, nss, openssl, systemd, wayland, xorg, zlib, ...
 }:
 
 assert stdenv.system == "x86_64-linux";
 
-# BUG: Viber requires running tray application, segfaulting if it's missing
-# FIX: Start something like `stalonetray` if you DE doesn't provide tray
-
 stdenv.mkDerivation rec {
   name = "viber-${version}";
-  version = "6.0.1.5";
+  version = "6.5.5.1481";
 
   src = fetchurl {
     url = "http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb";
-    sha256 = "026vp2pv66b2dlwi5w5wk4yjnnmnsqapdww98p7xdnz8n0hnsbbi";
+    sha256 = "0gvpaprfki04x66ga2ljksspdxd4cz455h92a7i2dnd69w1kik5s";
   };
 
   buildInputs = [ dpkg makeWrapper ];
@@ -35,9 +32,12 @@ stdenv.mkDerivation rec {
       harfbuzz
       libcap
       libpulseaudio
+      libxml2
+      libxslt
       mesa
       nspr
       nss
+      openssl
       stdenv.cc.cc
       systemd
       wayland
diff --git a/pkgs/applications/networking/irc/hexchat/default.nix b/pkgs/applications/networking/irc/hexchat/default.nix
index 4d7ebbfac2e8..80eea8219be2 100644
--- a/pkgs/applications/networking/irc/hexchat/default.nix
+++ b/pkgs/applications/networking/irc/hexchat/default.nix
@@ -1,20 +1,24 @@
-{ stdenv, fetchurl, pkgconfig, gtk2, lua, perl, python
+{ stdenv, fetchFromGitHub, pkgconfig, gtk2, lua, perl, python
 , libtool, pciutils, dbus_glib, libcanberra_gtk2, libproxy
 , libsexy, enchant, libnotify, openssl, intltool
 , desktop_file_utils, hicolor_icon_theme
+, autoconf, automake, autoconf-archive
 }:
 
 stdenv.mkDerivation rec {
-  version = "2.12.3";
+  version = "2.12.4";
   name = "hexchat-${version}";
 
-  src = fetchurl {
-    url = "http://dl.hexchat.net/hexchat/${name}.tar.xz";
-    sha256 = "1fpj2kk1p85snffchqxsz3sphhcgiripjw41mgzxi7ks5hvj4avg";
+  src = fetchFromGitHub {
+    owner = "hexchat";
+    repo = "hexchat";
+    rev = "v${version}";
+    sha256 = "1z8v7jg1mc2277k3jihnq4rixw1q27305aw6b6rpb1x7vpiy2zr3";
   };
 
   nativeBuildInputs = [
     pkgconfig libtool intltool
+    autoconf autoconf-archive automake
   ];
 
   buildInputs = [
@@ -24,11 +28,15 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
- #hexchat and heachat-text loads enchant spell checking library at run time and so it needs to have route to the path
+  #hexchat and heachat-text loads enchant spell checking library at run time and so it needs to have route to the path
   patchPhase = ''
     sed -i "s,libenchant.so.1,${enchant}/lib/libenchant.so.1,g" src/fe-gtk/sexy-spell-entry.c
   '';
 
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
   configureFlags = [ "--enable-shm" "--enable-textfe" ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix
index 637f2cdca9cb..56fe9859caa5 100644
--- a/pkgs/applications/networking/sniffers/wireshark/default.nix
+++ b/pkgs/applications/networking/sniffers/wireshark/default.nix
@@ -12,7 +12,7 @@ assert withQt -> !withGtk && qt4 != null;
 with stdenv.lib;
 
 let
-  version = "2.2.3";
+  version = "2.2.4";
   variant = if withGtk then "gtk" else if withQt then "qt" else "cli";
 in
 
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.bz2";
-    sha256 = "0fsrvl6sp772g2q2j24h10h9lfda6q67x7wahjjm8849i2gciflp";
+    sha256 = "049r5962yrajhhz9r4dsnx403dab50d6091y2mw298ymxqszp9s2";
   };
 
   buildInputs = [
diff --git a/pkgs/applications/networking/syncthing/default.nix b/pkgs/applications/networking/syncthing/default.nix
index 16e3c61bcc1f..59c0f6d92b04 100644
--- a/pkgs/applications/networking/syncthing/default.nix
+++ b/pkgs/applications/networking/syncthing/default.nix
@@ -1,20 +1,19 @@
 { stdenv, lib, fetchFromGitHub, go, pkgs }:
+
 let
   removeExpr = ref: ''
     sed -i "s,${ref},$(echo "${ref}" | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" \
   '';
 
-in
-
-stdenv.mkDerivation rec {
-  version = "0.14.19";
+in stdenv.mkDerivation rec {
+  version = "0.14.21";
   name = "syncthing-${version}";
 
   src = fetchFromGitHub {
     owner  = "syncthing";
     repo   = "syncthing";
     rev    = "v${version}";
-    sha256 = "16wpw9ndx3x37mfnymp2fx9n2az9ibyr61zgq3mh2mszzzl7bkcg";
+    sha256 = "0gxv4r7zg2rxjj0q8iiq3p5s75kwshcy6drjv65k8p2778bbvcjl";
   };
 
   buildInputs = [ go ];
diff --git a/pkgs/applications/office/homebank/default.nix b/pkgs/applications/office/homebank/default.nix
index 5f1c721e4c41..b4df8fdd4606 100644
--- a/pkgs/applications/office/homebank/default.nix
+++ b/pkgs/applications/office/homebank/default.nix
@@ -2,10 +2,10 @@
 , hicolor_icon_theme, libsoup, gnome3 }:
 
 stdenv.mkDerivation rec {
-  name = "homebank-5.1.2";
+  name = "homebank-5.1.3";
   src = fetchurl {
     url = "http://homebank.free.fr/public/${name}.tar.gz";
-    sha256 = "09zsq5l3s8cg4slhsyybsq8v1arnhh07i0rzka3j6ahysky15pfh";
+    sha256 = "0wzv2hkm30a1kqjldw02bzbh49bdmac041d6qybjzvkgwvrbmci2";
   };
 
   nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
diff --git a/pkgs/applications/science/logic/coq/8.4.nix b/pkgs/applications/science/logic/coq/8.4.nix
index f162fe4a86ea..32007ba45ce3 100644
--- a/pkgs/applications/science/logic/coq/8.4.nix
+++ b/pkgs/applications/science/logic/coq/8.4.nix
@@ -63,6 +63,7 @@ stdenv.mkDerivation {
   '';
 
   passthru = {
+    inherit findlib;
     emacsBufferSetup = pkgs: ''
       ; Propagate coq paths to children
       (inherit-local-permanent coq-prog-name "${self}/bin/coqtop")
diff --git a/pkgs/applications/science/logic/coq/8.6.nix b/pkgs/applications/science/logic/coq/8.6.nix
deleted file mode 100644
index 9d3aa756aa58..000000000000
--- a/pkgs/applications/science/logic/coq/8.6.nix
+++ /dev/null
@@ -1,88 +0,0 @@
-# - coqide compilation can be disabled by setting lablgtk to null;
-# - The csdp program used for the Micromega tactic is statically referenced.
-#   However, coq can build without csdp by setting it to null.
-#   In this case some Micromega tactics will search the user's path for the csdp program and will fail if it is not found.
-# - The patch-level version can be specified through the `pl` argument to
-#   the derivation; it defaults to the greatest.
-
-{ stdenv, fetchurl, writeText, pkgconfig
-, ocaml, findlib, camlp5, ncurses
-, lablgtk ? null, csdp ? null
-, pl ? "1"
-}:
-
-let
-  # version = "8.6pl${pl}";
-  version = "8.6";
-  sha256 = "1pw1xvy1657l1k69wrb911iqqflzhhp8wwsjvihbgc72r3skqg3f";
-  coq-version = "8.6";
-  buildIde = lablgtk != null;
-  ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
-  csdpPatch = if csdp != null then ''
-    substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
-    substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
-  '' else "";
-in
-
-stdenv.mkDerivation {
-  name = "coq-${version}";
-
-  inherit coq-version;
-  inherit ocaml camlp5;
-
-  src = fetchurl {
-    url = "http://coq.inria.fr/distrib/V${version}/files/coq-${version}.tar.gz";
-    inherit sha256;
-  };
-
-  buildInputs = [ pkgconfig ocaml findlib camlp5 ncurses lablgtk ];
-
-  postPatch = ''
-    UNAME=$(type -tp uname)
-    RM=$(type -tp rm)
-    substituteInPlace configure --replace "/bin/uname" "$UNAME"
-    substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
-    substituteInPlace configure.ml --replace '"md5 -q"' '"md5sum"'
-    ${csdpPatch}
-  '';
-
-  setupHook = writeText "setupHook.sh" ''
-    addCoqPath () {
-      if test -d "''$1/lib/coq/${coq-version}/user-contrib"; then
-        export COQPATH="''${COQPATH}''${COQPATH:+:}''$1/lib/coq/${coq-version}/user-contrib/"
-      fi
-    }
-
-    envHooks=(''${envHooks[@]} addCoqPath)
-  '';
-
-  preConfigure = ''
-    configureFlagsArray=(
-      -opt
-      ${ideFlags}
-    )
-  '';
-
-  prefixKey = "-prefix ";
-
-  buildFlags = "revision coq coqide bin/votour";
-
-  postInstall = ''
-    cp bin/votour $out/bin/
-  '';
-
-  meta = with stdenv.lib; {
-    description = "Coq proof assistant";
-    longDescription = ''
-      Coq is a formal proof management system.  It provides a formal language
-      to write mathematical definitions, executable algorithms and theorems
-      together with an environment for semi-interactive development of
-      machine-checked proofs.
-    '';
-    homepage = "http://coq.inria.fr";
-    license = licenses.lgpl21;
-    branch = coq-version;
-    maintainers = with maintainers; [ roconnor thoughtpolice vbgl ];
-    platforms = platforms.unix;
-  };
-}
diff --git a/pkgs/applications/science/logic/coq/8.5.nix b/pkgs/applications/science/logic/coq/default.nix
index aae2101f50e9..bc9ba049cd2c 100644
--- a/pkgs/applications/science/logic/coq/8.5.nix
+++ b/pkgs/applications/science/logic/coq/default.nix
@@ -1,26 +1,27 @@
-# - coqide compilation can be disabled by setting lablgtk to null;
+# - coqide compilation can be disabled by setting buildIde to false
 # - The csdp program used for the Micromega tactic is statically referenced.
 #   However, coq can build without csdp by setting it to null.
 #   In this case some Micromega tactics will search the user's path for the csdp program and will fail if it is not found.
-# - The patch-level version can be specified through the `pl` argument to
+# - The patch-level version can be specified through the `version` argument to
 #   the derivation; it defaults to the greatest.
 
 { stdenv, fetchurl, writeText, pkgconfig
-, ocaml, findlib, camlp5, ncurses
-, lablgtk ? null, csdp ? null
-, pl ? "3"
+, ocamlPackages, ncurses
+, buildIde ? true
+, csdp ? null
+, version ? "8.6"
 }:
 
 let
-  version = "8.5pl${pl}";
   sha256 = {
-   "1" = "1w2xvm6w16khfn63bp95s25hnkn2ny3w0yqg3lq63gp11aqpbyjb";
-   "2" = "0wyywia0darak2zmc5v0ra9rn0b9whwdfiahralm8v5za499s8w3";
-   "3" = "0fyk2a4fpifibq8y8jhx1891k55qnsnlygglch64sva0bph94nrh";
-  }."${pl}";
-  coq-version = "8.5";
-  buildIde = lablgtk != null;
-  ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
+   "8.5pl1"	= "1w2xvm6w16khfn63bp95s25hnkn2ny3w0yqg3lq63gp11aqpbyjb";
+   "8.5pl2"	= "0wyywia0darak2zmc5v0ra9rn0b9whwdfiahralm8v5za499s8w3";
+   "8.5pl3"	= "0fyk2a4fpifibq8y8jhx1891k55qnsnlygglch64sva0bph94nrh";
+   "8.6"	= "1pw1xvy1657l1k69wrb911iqqflzhhp8wwsjvihbgc72r3skqg3f";
+  }."${version}";
+  coq-version = builtins.substring 0 3 version;
+  camlp5 = ocamlPackages.camlp5_transitional;
+  ideFlags = if buildIde then "-lablgtkdir ${ocamlPackages.lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
   csdpPatch = if csdp != null then ''
     substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
     substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
@@ -31,14 +32,18 @@ stdenv.mkDerivation {
   name = "coq-${version}";
 
   inherit coq-version;
-  inherit ocaml camlp5;
+  inherit camlp5;
+  inherit (ocamlPackages) ocaml;
+  passthru = {
+    inherit (ocamlPackages) findlib;
+  };
 
   src = fetchurl {
     url = "http://coq.inria.fr/distrib/V${version}/files/coq-${version}.tar.gz";
     inherit sha256;
   };
 
-  buildInputs = [ pkgconfig ocaml findlib camlp5 ncurses lablgtk ];
+  buildInputs = [ pkgconfig ocamlPackages.ocaml ocamlPackages.findlib camlp5 ncurses ocamlPackages.lablgtk ];
 
   postPatch = ''
     UNAME=$(type -tp uname)
diff --git a/pkgs/applications/version-management/cvs/CVE-2012-0804.patch b/pkgs/applications/version-management/cvs/CVE-2012-0804.patch
new file mode 100644
index 000000000000..cd2b324729fb
--- /dev/null
+++ b/pkgs/applications/version-management/cvs/CVE-2012-0804.patch
@@ -0,0 +1,16 @@
+diff --git a/src/client.c b/src/client.c
+index 751406b..b45d89c 100644
+--- a/src/client.c
++++ b/src/client.c
+@@ -3558,9 +3558,9 @@ connect_to_pserver (cvsroot_t *root, struct buffer **to_server_p,
+          * code.
+          */
+ 	read_line_via (from_server, to_server, &read_buf);
+-	sscanf (read_buf, "%s %d", write_buf, &codenum);
++	count = sscanf (read_buf, "%*s %d", &codenum);
+
+-	if ((codenum / 100) != 2)
++	if (count != 1 || (codenum / 100) != 2)
+ 	    error (1, 0, "proxy server %s:%d does not support http tunnelling",
+ 		   root->proxy_hostname, proxy_port_number);
+ 	free (read_buf);
diff --git a/pkgs/applications/version-management/cvs/default.nix b/pkgs/applications/version-management/cvs/default.nix
index 74a2267043cb..7ad3aac61d9e 100644
--- a/pkgs/applications/version-management/cvs/default.nix
+++ b/pkgs/applications/version-management/cvs/default.nix
@@ -8,7 +8,10 @@ stdenv.mkDerivation {
     sha256 = "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq";
   };
 
-  patches = [ ./getcwd-chroot.patch ];
+  patches = [
+    ./getcwd-chroot.patch
+    ./CVE-2012-0804.patch
+  ];
 
   hardeningDisable = [ "fortify" "format" ];
 
diff --git a/pkgs/applications/version-management/gitlab-workhorse/default.nix b/pkgs/applications/version-management/gitlab-workhorse/default.nix
index 4cbec62b2f9b..b15576b364eb 100644
--- a/pkgs/applications/version-management/gitlab-workhorse/default.nix
+++ b/pkgs/applications/version-management/gitlab-workhorse/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitLab, git, go }:
 
 stdenv.mkDerivation rec {
-  version = "1.2.1";
+  version = "1.3.0";
   name = "gitlab-workhorse-${version}";
 
   srcs = fetchFromGitLab {
     owner = "gitlab-org";
     repo = "gitlab-workhorse";
     rev = "v${version}";
-    sha256 = "1z4iyymld3pssf1dwar0hy6c5hii79gk4k59mqj0mgy2k73405y0";
+    sha256 = "06pxnb675c5fwk7rv6fjh0cwbdylrdbjcyf8b0pins8jl0ix0szy";
   };
 
   buildInputs = [ git go ];
diff --git a/pkgs/applications/version-management/gitlab/Gemfile b/pkgs/applications/version-management/gitlab/Gemfile
index 8edb08638dda..0e80d9f233e1 100644
--- a/pkgs/applications/version-management/gitlab/Gemfile
+++ b/pkgs/applications/version-management/gitlab/Gemfile
@@ -16,10 +16,12 @@ gem 'default_value_for', '~> 3.0.0'
 gem 'mysql2', '~> 0.3.16', group: :mysql
 gem 'pg', '~> 0.18.2', group: :postgres
 
+gem 'rugged', '~> 0.24.0'
+
 # Authentication libraries
 gem 'devise',                 '~> 4.2'
 gem 'doorkeeper',             '~> 4.2.0'
-gem 'omniauth',               '~> 1.3.1'
+gem 'omniauth',               '~> 1.3.2'
 gem 'omniauth-auth0',         '~> 1.4.1'
 gem 'omniauth-azure-oauth2',  '~> 0.0.6'
 gem 'omniauth-cas3',          '~> 1.1.2'
@@ -49,10 +51,6 @@ gem 'u2f', '~> 0.2.1'
 # Browser detection
 gem 'browser', '~> 2.2'
 
-# Extracting information from a git repository
-# Provide access to Gitlab::Git library
-gem 'gitlab_git', '~> 10.7.0'
-
 # LDAP Auth
 # GitLab fork with several improvements to original library. For full list of changes
 # see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
@@ -101,18 +99,19 @@ gem 'unf', '~> 0.1.4'
 gem 'seed-fu', '~> 2.3.5'
 
 # Markdown and HTML processing
-gem 'html-pipeline',      '~> 1.11.0'
-gem 'deckar01-task_list', '1.0.6', require: 'task_list/railtie'
-gem 'gitlab-markup',      '~> 1.5.1'
-gem 'redcarpet',          '~> 3.3.3'
-gem 'RedCloth',           '~> 4.3.2'
-gem 'rdoc',               '~> 4.2'
-gem 'org-ruby',           '~> 0.9.12'
-gem 'creole',             '~> 0.5.0'
-gem 'wikicloth',          '0.8.1'
-gem 'asciidoctor',        '~> 1.5.2'
-gem 'rouge',              '~> 2.0'
-gem 'truncato',           '~> 0.7.8'
+gem 'html-pipeline',        '~> 1.11.0'
+gem 'deckar01-task_list',   '1.0.6', require: 'task_list/railtie'
+gem 'gitlab-markup',        '~> 1.5.1'
+gem 'redcarpet',            '~> 3.3.3'
+gem 'RedCloth',             '~> 4.3.2'
+gem 'rdoc',                 '~> 4.2'
+gem 'org-ruby',             '~> 0.9.12'
+gem 'creole',               '~> 0.5.0'
+gem 'wikicloth',            '0.8.1'
+gem 'asciidoctor',          '~> 1.5.2'
+gem 'asciidoctor-plantuml', '0.0.6'
+gem 'rouge',                '~> 2.0'
+gem 'truncato',             '~> 0.7.8'
 
 # See https://groups.google.com/forum/#!topic/ruby-security-ann/aSbgDiwb24s
 # and https://groups.google.com/forum/#!topic/ruby-security-ann/Dy7YiKb_pMM
@@ -253,10 +252,9 @@ end
 
 group :development do
   gem 'foreman', '~> 0.78.0'
-  gem 'brakeman', '~> 3.3.0', require: false
+  gem 'brakeman', '~> 3.4.0', require: false
 
   gem 'letter_opener_web', '~> 1.3.0'
-  gem 'rerun', '~> 0.11.0'
   gem 'bullet', '~> 5.2.0', require: false
   gem 'rblineprof', '~> 0.3.6', platform: :mri, require: false
   gem 'web-console', '~> 2.0'
@@ -287,7 +285,7 @@ group :development, :test do
   gem 'minitest', '~> 5.7.0'
 
   # Generate Fake data
-  gem 'ffaker', '~> 2.0.0'
+  gem 'ffaker', '~> 2.4'
 
   gem 'capybara',            '~> 2.6.2'
   gem 'capybara-screenshot', '~> 1.0.0'
@@ -301,8 +299,8 @@ group :development, :test do
   gem 'spring-commands-spinach',  '~> 1.1.0'
   gem 'spring-commands-teaspoon', '~> 0.0.2'
 
-  gem 'rubocop', '~> 0.43.0', require: false
-  gem 'rubocop-rspec', '~> 1.5.0', require: false
+  gem 'rubocop', '~> 0.46.0', require: false
+  gem 'rubocop-rspec', '~> 1.9.1', require: false
   gem 'scss_lint', '~> 0.47.0', require: false
   gem 'haml_lint', '~> 0.18.2', require: false
   gem 'simplecov', '0.12.0', require: false
@@ -331,11 +329,11 @@ end
 
 gem 'newrelic_rpm', '~> 3.16'
 
-gem 'octokit', '~> 4.3.0'
+gem 'octokit', '~> 4.6.2'
 
 gem 'mail_room', '~> 0.9.0'
 
-gem 'email_reply_parser', '~> 0.5.8'
+gem 'email_reply_trimmer', '~> 0.1'
 gem 'html2text'
 
 gem 'ruby-prof', '~> 0.16.2'
@@ -350,7 +348,7 @@ gem 'paranoia', '~> 2.2'
 gem 'health_check', '~> 2.2.0'
 
 # System information
-gem 'vmstat', '~> 2.2'
+gem 'vmstat', '~> 2.3.0'
 gem 'sys-filesystem', '~> 1.1.6'
 
 gem "activerecord-nulldb-adapter"
diff --git a/pkgs/applications/version-management/gitlab/Gemfile.lock b/pkgs/applications/version-management/gitlab/Gemfile.lock
index 211bdd20fd10..ca1e2ed25c38 100644
--- a/pkgs/applications/version-management/gitlab/Gemfile.lock
+++ b/pkgs/applications/version-management/gitlab/Gemfile.lock
@@ -56,6 +56,8 @@ GEM
       faraday_middleware-multi_json (~> 0.0)
       oauth2 (~> 1.0)
     asciidoctor (1.5.3)
+    asciidoctor-plantuml (0.0.6)
+      asciidoctor (~> 1.5)
     ast (2.3.0)
     attr_encrypted (3.0.3)
       encryptor (~> 3.0.0)
@@ -88,7 +90,7 @@ GEM
     bootstrap-sass (3.3.6)
       autoprefixer-rails (>= 5.2.1)
       sass (>= 3.3.4)
-    brakeman (3.3.2)
+    brakeman (3.4.1)
     browser (2.2.0)
     builder (3.2.2)
     bullet (5.2.0)
@@ -173,7 +175,7 @@ GEM
       railties (>= 4.2)
     dropzonejs-rails (0.7.2)
       rails (> 3.1)
-    email_reply_parser (0.5.8)
+    email_reply_trimmer (0.1.6)
     email_spec (1.6.0)
       launchy (~> 2.1)
       mail (~> 2.2)
@@ -198,7 +200,7 @@ GEM
     faraday_middleware-multi_json (0.0.6)
       faraday_middleware
       multi_json
-    ffaker (2.0.0)
+    ffaker (2.4.0)
     ffi (1.9.10)
     flay (2.6.1)
       ruby_parser (~> 3.0)
@@ -268,11 +270,6 @@ GEM
     gitlab-markup (1.5.1)
     gitlab-turbolinks-classic (2.5.6)
       coffee-rails
-    gitlab_git (10.7.0)
-      activesupport (~> 4.0)
-      charlock_holmes (~> 0.7.3)
-      github-linguist (~> 4.7.0)
-      rugged (~> 0.24.0)
     gitlab_omniauth-ldap (1.2.1)
       net-ldap (~> 0.9)
       omniauth (~> 1.0)
@@ -412,9 +409,6 @@ GEM
       xml-simple
     licensee (8.0.0)
       rugged (>= 0.24b)
-    listen (3.0.5)
-      rb-fsevent (>= 0.9.3)
-      rb-inotify (>= 0.9)
     little-plugger (1.1.4)
     logging (2.1.0)
       little-plugger (~> 1.1)
@@ -454,10 +448,10 @@ GEM
       multi_json (~> 1.3)
       multi_xml (~> 0.5)
       rack (>= 1.2, < 3)
-    octokit (4.3.0)
-      sawyer (~> 0.7.0, >= 0.5.3)
+    octokit (4.6.2)
+      sawyer (~> 0.8.0, >= 0.5.3)
     oj (2.17.4)
-    omniauth (1.3.1)
+    omniauth (1.3.2)
       hashie (>= 1.2, < 4)
       rack (>= 1.0, < 3)
     omniauth-auth0 (1.4.1)
@@ -585,9 +579,6 @@ GEM
     rainbow (2.1.0)
     raindrops (0.17.0)
     rake (10.5.0)
-    rb-fsevent (0.9.6)
-    rb-inotify (0.9.5)
-      ffi (>= 0.5.0)
     rblineprof (0.3.6)
       debugger-ruby_core_source (~> 1.3)
     rdoc (4.2.2)
@@ -616,8 +607,6 @@ GEM
     redis-store (1.2.0)
       redis (>= 2.2)
     request_store (1.3.1)
-    rerun (0.11.0)
-      listen (~> 3.0)
     responders (2.3.0)
       railties (>= 4.2.0, < 5.1)
     rest-client (2.0.0)
@@ -655,14 +644,14 @@ GEM
     rspec-retry (0.4.5)
       rspec-core
     rspec-support (3.5.0)
-    rubocop (0.43.0)
+    rubocop (0.46.0)
       parser (>= 2.3.1.1, < 3.0)
       powerpack (~> 0.1)
       rainbow (>= 1.99.1, < 3.0)
       ruby-progressbar (~> 1.7)
       unicode-display_width (~> 1.0, >= 1.0.1)
-    rubocop-rspec (1.5.0)
-      rubocop (>= 0.40.0)
+    rubocop-rspec (1.9.1)
+      rubocop (>= 0.42.0)
     ruby-fogbugz (0.2.1)
       crack (~> 0.4)
     ruby-prof (0.16.2)
@@ -686,9 +675,9 @@ GEM
       sprockets (>= 2.8, < 4.0)
       sprockets-rails (>= 2.0, < 4.0)
       tilt (>= 1.1, < 3)
-    sawyer (0.7.0)
-      addressable (>= 2.3.5, < 2.5)
-      faraday (~> 0.8, < 0.10)
+    sawyer (0.8.1)
+      addressable (>= 2.3.5, < 2.6)
+      faraday (~> 0.8, < 1.0)
     scss_lint (0.47.1)
       rake (>= 0.9, < 11)
       sass (~> 3.4.15)
@@ -812,7 +801,7 @@ GEM
       coercible (~> 1.0)
       descendants_tracker (~> 0.0, >= 0.0.3)
       equalizer (~> 0.0, >= 0.0.9)
-    vmstat (2.2.0)
+    vmstat (2.3.0)
     warden (1.2.6)
       rack (>= 1.0)
     web-console (2.3.0)
@@ -849,6 +838,7 @@ DEPENDENCIES
   allocations (~> 1.0)
   asana (~> 0.4.0)
   asciidoctor (~> 1.5.2)
+  asciidoctor-plantuml (= 0.0.6)
   attr_encrypted (~> 3.0.0)
   awesome_print (~> 1.2.0)
   babosa (~> 1.0.2)
@@ -857,7 +847,7 @@ DEPENDENCIES
   better_errors (~> 1.0.1)
   binding_of_caller (~> 0.7.2)
   bootstrap-sass (~> 3.3.0)
-  brakeman (~> 3.3.0)
+  brakeman (~> 3.4.0)
   browser (~> 2.2)
   bullet (~> 5.2.0)
   bundler-audit (~> 0.5.0)
@@ -879,10 +869,10 @@ DEPENDENCIES
   diffy (~> 3.1.0)
   doorkeeper (~> 4.2.0)
   dropzonejs-rails (~> 0.7.1)
-  email_reply_parser (~> 0.5.8)
+  email_reply_trimmer (~> 0.1)
   email_spec (~> 1.6.0)
   factory_girl_rails (~> 4.7.0)
-  ffaker (~> 2.0.0)
+  ffaker (~> 2.4)
   flay (~> 2.6.1)
   fog-aws (~> 0.9)
   fog-core (~> 1.40)
@@ -899,7 +889,6 @@ DEPENDENCIES
   gitlab-flowdock-git-hook (~> 1.0.1)
   gitlab-markup (~> 1.5.1)
   gitlab-turbolinks-classic (~> 2.5, >= 2.5.6)
-  gitlab_git (~> 10.7.0)
   gitlab_omniauth-ldap (~> 1.2.1)
   gollum-lib (~> 4.2)
   gollum-rugged_adapter (~> 0.4.2)
@@ -937,9 +926,9 @@ DEPENDENCIES
   newrelic_rpm (~> 3.16)
   nokogiri (~> 1.6.7, >= 1.6.7.2)
   oauth2 (~> 1.2.0)
-  octokit (~> 4.3.0)
+  octokit (~> 4.6.2)
   oj (~> 2.17.4)
-  omniauth (~> 1.3.1)
+  omniauth (~> 1.3.2)
   omniauth-auth0 (~> 1.4.1)
   omniauth-authentiq (~> 0.2.0)
   omniauth-azure-oauth2 (~> 0.0.6)
@@ -974,16 +963,16 @@ DEPENDENCIES
   redis-namespace (~> 1.5.2)
   redis-rails (~> 5.0.1)
   request_store (~> 1.3)
-  rerun (~> 0.11.0)
   responders (~> 2.0)
   rouge (~> 2.0)
   rqrcode-rails3 (~> 0.1.7)
   rspec-rails (~> 3.5.0)
   rspec-retry (~> 0.4.5)
-  rubocop (~> 0.43.0)
-  rubocop-rspec (~> 1.5.0)
+  rubocop (~> 0.46.0)
+  rubocop-rspec (~> 1.9.1)
   ruby-fogbugz (~> 0.2.1)
   ruby-prof (~> 0.16.2)
+  rugged (~> 0.24.0)
   sanitize (~> 2.0)
   sass-rails (~> 5.0.6)
   scss_lint (~> 0.47.0)
@@ -1023,7 +1012,7 @@ DEPENDENCIES
   unicorn-worker-killer (~> 0.4.4)
   version_sorter (~> 2.1.0)
   virtus (~> 1.0.1)
-  vmstat (~> 2.2)
+  vmstat (~> 2.3.0)
   web-console (~> 2.0)
   webmock (~> 1.21.0)
   wikicloth (= 0.8.1)
diff --git a/pkgs/applications/version-management/gitlab/default.nix b/pkgs/applications/version-management/gitlab/default.nix
index 659e002dfb6e..2840b06ecf58 100644
--- a/pkgs/applications/version-management/gitlab/default.nix
+++ b/pkgs/applications/version-management/gitlab/default.nix
@@ -22,7 +22,7 @@ in
 
 stdenv.mkDerivation rec {
   name = "gitlab-${version}";
-  version = "8.15.4";
+  version = "8.16.1";
 
   buildInputs = [ env ruby bundler tzdata git nodejs procps ];
 
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
     owner = "gitlabhq";
     repo = "gitlabhq";
     rev = "v${version}";
-    sha256 = "1cd6dl8niy1xxifxdrm1kwm8qhy4x4zyvwdsb722kr136rwnxm84";
+    sha256 = "0c6cf8p1xx21xxmlpldhxs0i01myd4ddpjl7vfv932qmw9bw4in7";
   };
 
   patches = [
diff --git a/pkgs/applications/version-management/gitlab/gemset.nix b/pkgs/applications/version-management/gitlab/gemset.nix
index 64ebf34e477d..21ab6d324ddb 100644
--- a/pkgs/applications/version-management/gitlab/gemset.nix
+++ b/pkgs/applications/version-management/gitlab/gemset.nix
@@ -143,6 +143,14 @@
     };
     version = "1.5.3";
   };
+  asciidoctor-plantuml = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0rd8yh0by5sxhg1c3cb1mzkp4jp3j8v6vzbyv1mx492s9ml451fx";
+      type = "gem";
+    };
+    version = "0.0.6";
+  };
   ast = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -274,10 +282,10 @@
   brakeman = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0v2yllqcn2zyi60ahgi8ds8pix6a82703ln25p9pkm1bvrwj3fsq";
+      sha256 = "0kmg55glfnx7jidrl1ivkfqc0zqya78wxk8wf5j37rj8ya3lzxgd";
       type = "gem";
     };
-    version = "3.3.2";
+    version = "3.4.1";
   };
   browser = {
     source = {
@@ -607,13 +615,13 @@
     };
     version = "0.7.2";
   };
-  email_reply_parser = {
+  email_reply_trimmer = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0k2p229mv7xn7q627zwmvhrcvba4b9m70pw2jfjm6iimg2vmf22r";
+      sha256 = "0vijywhy1acsq4187ss6w8a7ksswaf1d5np3wbj962b6rqif5vcz";
       type = "gem";
     };
-    version = "0.5.8";
+    version = "0.1.6";
   };
   email_spec = {
     source = {
@@ -738,10 +746,10 @@
   ffaker = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "19fnbbsw87asyb1hvkr870l2yldah2jcjb8074pgyrma5lynwmn0";
+      sha256 = "1rlfvf2iakphs3krxy1hiywr2jzmrhvhig8n8fw6rcivpz9v52ry";
       type = "gem";
     };
-    version = "2.0.0";
+    version = "2.4.0";
   };
   ffi = {
     source = {
@@ -944,14 +952,6 @@
     };
     version = "2.5.6";
   };
-  gitlab_git = {
-    source = {
-      remotes = ["https://rubygems.org"];
-      sha256 = "0nnr6dlqq30syab2g7yvffgzinj5c8n9q7fvr3d88ix8hsawjrjm";
-      type = "gem";
-    };
-    version = "10.7.0";
-  };
   gitlab_omniauth-ldap = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -1312,14 +1312,6 @@
     };
     version = "8.0.0";
   };
-  listen = {
-    source = {
-      remotes = ["https://rubygems.org"];
-      sha256 = "182wd2pkf690ll19lx6zbk01a3rqkk5lwsyin6kwydl7lqxj5z3g";
-      type = "gem";
-    };
-    version = "3.0.5";
-  };
   little-plugger = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -1531,10 +1523,10 @@
   octokit = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1hq47ck0z03vr3rzblyszihn7x2m81gv35chwwx0vrhf17nd27np";
+      sha256 = "1bppfc0q8mflbcdsb66dly3skx42vad30q0fkzwx4za908qwvjpd";
       type = "gem";
     };
-    version = "4.3.0";
+    version = "4.6.2";
   };
   oj = {
     source = {
@@ -1547,10 +1539,10 @@
   omniauth = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0vsqxgzkcfi10b7k6vpv3shmlphbs8grc29hznwl9s0i16n8962p";
+      sha256 = "1dp5g3a6jnppy2kriz365p3jf9alrir4fhrj2nff2gm9skci2bk6";
       type = "gem";
     };
-    version = "1.3.1";
+    version = "1.3.2";
   };
   omniauth-auth0 = {
     source = {
@@ -1928,22 +1920,6 @@
     };
     version = "10.5.0";
   };
-  rb-fsevent = {
-    source = {
-      remotes = ["https://rubygems.org"];
-      sha256 = "1hq57by28iv0ijz8pk9ynih0xdg7vnl1010xjcijfklrcv89a1j2";
-      type = "gem";
-    };
-    version = "0.9.6";
-  };
-  rb-inotify = {
-    source = {
-      remotes = ["https://rubygems.org"];
-      sha256 = "0kddx2ia0qylw3r52nhg83irkaclvrncgy2m1ywpbhlhsz1rymb9";
-      type = "gem";
-    };
-    version = "0.9.5";
-  };
   rblineprof = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -2056,14 +2032,6 @@
     };
     version = "1.3.1";
   };
-  rerun = {
-    source = {
-      remotes = ["https://rubygems.org"];
-      sha256 = "0av239bpmy55fdx4qaw9n71aapjy2myr51h5plzjxsyr0fdwn1xq";
-      type = "gem";
-    };
-    version = "0.11.0";
-  };
   responders = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -2187,18 +2155,18 @@
   rubocop = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0r2p4v6w5w1zx4skj9i3g3pshg3rykhgswimydrswp6nb8nkaphj";
+      sha256 = "0604qa0s0xcq0avnh9aa6iw58azpz6a7bavcs0ch61xnaz0qfl0c";
       type = "gem";
     };
-    version = "0.43.0";
+    version = "0.46.0";
   };
   rubocop-rspec = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "11701iw858vkxmb6khc9apmagz3lmnbdxm8irsxsgg57d0p8bs8p";
+      sha256 = "0h3781f4mz72qz8i30ah4fjfm4i20aqncak6rc9kwsvm5hw48i18";
       type = "gem";
     };
-    version = "1.5.0";
+    version = "1.9.1";
   };
   ruby-fogbugz = {
     source = {
@@ -2315,10 +2283,10 @@
   sawyer = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1cn48ql00mf1ag9icmfpj7g7swh7mdn7992ggynjqbw1gh15bs3j";
+      sha256 = "0sv1463r7bqzvx4drqdmd36m7rrv6sf1v3c6vswpnq3k6vdw2dvd";
       type = "gem";
     };
-    version = "0.7.0";
+    version = "0.8.1";
   };
   scss_lint = {
     source = {
@@ -2779,10 +2747,10 @@
   vmstat = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "10hlfam5gvxjvr5p1f4f81wlv5k81mrlg556rc9525290bcz31f0";
+      sha256 = "0vb5mwc71p8rlm30hnll3lb4z70ipl5rmilskpdrq2mxwfilcm5b";
       type = "gem";
     };
-    version = "2.2.0";
+    version = "2.3.0";
   };
   warden = {
     source = {
diff --git a/pkgs/applications/video/clipgrab/default.nix b/pkgs/applications/video/clipgrab/default.nix
index 26128f44fa24..69f58fe94bd8 100644
--- a/pkgs/applications/video/clipgrab/default.nix
+++ b/pkgs/applications/video/clipgrab/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   name = "clipgrab-${version}";
-  version = "3.6.1";
+  version = "3.6.2";
 
   src = fetchurl {
-    sha256 = "1pmsnb9yfyadp8kzxldw09wmv2r0wmg9yza9ariqc27jz1j3kpsc";
+    sha256 = "0n7bhwkzknjpp54h54hxv1s8nsmmb7cwwf1aqpbcsnd7y6cv28nm";
     # The .tar.bz2 "Download" link is a binary blob, the source is the .tar.gz!
     url = "https://download.clipgrab.org/${name}.tar.gz";
   };
diff --git a/pkgs/applications/video/mkvtoolnix/default.nix b/pkgs/applications/video/mkvtoolnix/default.nix
index 9c987534065e..e8dc1227ef87 100644
--- a/pkgs/applications/video/mkvtoolnix/default.nix
+++ b/pkgs/applications/video/mkvtoolnix/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, pkgconfig, autoconf, automake
-, ruby, file, xdg_utils, gettext, expat, qt5, boost
+, drake, ruby, file, xdg_utils, gettext, expat, qt5, boost
 , libebml, zlib, libmatroska, libogg, libvorbis, flac
 , withGUI ? true
 }:
@@ -10,16 +10,16 @@ with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "mkvtoolnix-${version}";
-  version = "9.6.0";
+  version = "9.8.0";
 
   src = fetchFromGitHub {
     owner = "mbunkus";
     repo = "mkvtoolnix";
     rev = "release-${version}";
-    sha256 = "14v6iclzkqxibzcdxr65bb5frmnsjyyly0d3lwv1gg7g1mkcw3jd";
+    sha256 = "1hnk92ksgg290q4kwdl8jqrz7vzlwki4f85bb6kgdgzpjkblw76n";
   };
 
-  nativeBuildInputs = [ pkgconfig autoconf automake gettext ruby ];
+  nativeBuildInputs = [ pkgconfig autoconf automake gettext drake ruby ];
 
   buildInputs = [
     expat file xdg_utils boost libebml zlib libmatroska libogg
@@ -27,8 +27,8 @@ stdenv.mkDerivation rec {
   ] ++ optional withGUI qt5.qtbase;
 
   preConfigure = "./autogen.sh; patchShebangs .";
-  buildPhase   = "./drake -j $NIX_BUILD_CORES";
-  installPhase = "./drake install -j $NIX_BUILD_CORES";
+  buildPhase   = "drake -j $NIX_BUILD_CORES";
+  installPhase = "drake install -j $NIX_BUILD_CORES";
 
   configureFlags = [
     "--enable-magic"
@@ -38,7 +38,6 @@ stdenv.mkDerivation rec {
     "--disable-profiling"
     "--disable-precompiled-headers"
     "--disable-static-qt"
-    "--without-curl"
     "--with-gettext"
     (enableFeature withGUI "qt")
   ];
diff --git a/pkgs/applications/video/streamlink/default.nix b/pkgs/applications/video/streamlink/default.nix
index f516c871f51d..462d74c9672f 100644
--- a/pkgs/applications/video/streamlink/default.nix
+++ b/pkgs/applications/video/streamlink/default.nix
@@ -1,14 +1,14 @@
 { stdenv, pythonPackages, fetchFromGitHub, rtmpdump }:
 
 pythonPackages.buildPythonApplication rec {
-  version = "0.0.2";
+  version = "0.3.0";
   name = "streamlink-${version}";
 
   src = fetchFromGitHub {
     owner = "streamlink";
     repo = "streamlink";
     rev = "${version}";
-    sha256 = "156b3smivs8lja7a98g3qa74bawqhc4mi8w8f3dscampbxx4dr9y";
+    sha256 = "1bjih6y21vmjmsk3xvhgc1innymryklgylyvjrskqw610niai59j";
   };
 
   propagatedBuildInputs = (with pythonPackages; [ pycrypto requests2 ]) ++ [ rtmpdump ];
diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix
index 2391775af42a..7c0475697c03 100644
--- a/pkgs/applications/virtualization/docker/default.nix
+++ b/pkgs/applications/virtualization/docker/default.nix
@@ -12,6 +12,7 @@ with lib;
 stdenv.mkDerivation rec {
   name = "docker-${version}";
   version = "1.13.0";
+  rev = "49bf474"; # should match the version commit
 
   src = fetchFromGitHub {
     owner = "docker";
@@ -79,7 +80,7 @@ stdenv.mkDerivation rec {
   buildPhase = ''
     patchShebangs .
     export AUTO_GOPATH=1
-    export DOCKER_GITCOMMIT="23cf638"
+    export DOCKER_GITCOMMIT="${rev}"
     ./hack/make.sh dynbinary
   '';
 
diff --git a/pkgs/applications/virtualization/lkl/default.nix b/pkgs/applications/virtualization/lkl/default.nix
index b1b3c3aebeef..a307099783eb 100644
--- a/pkgs/applications/virtualization/lkl/default.nix
+++ b/pkgs/applications/virtualization/lkl/default.nix
@@ -13,6 +13,9 @@ stdenv.mkDerivation rec {
     sha256 = "0x1hdjsrj6hfk1sgfw11ihm00fmp6g158sr2q3cgjy2b6jnsr4hp";
   };
 
+  # Fix a /usr/bin/env reference in here that breaks sandboxed builds
+  prePatch = "patchShebangs arch/lkl/scripts";
+
   installPhase = ''
     mkdir -p $out/{bin,lib}
 
diff --git a/pkgs/applications/virtualization/rkt/default.nix b/pkgs/applications/virtualization/rkt/default.nix
index c0bd9d8ed13d..2f610208c720 100644
--- a/pkgs/applications/virtualization/rkt/default.nix
+++ b/pkgs/applications/virtualization/rkt/default.nix
@@ -12,7 +12,7 @@ let
   stage1Dir = "lib/rkt/stage1-images";
 
 in stdenv.mkDerivation rec {
-  version = "1.22.0";
+  version = "1.23.0";
   name = "rkt-${version}";
   BUILDDIR="build-${name}";
 
@@ -20,7 +20,7 @@ in stdenv.mkDerivation rec {
       owner = "coreos";
       repo = "rkt";
       rev = "v${version}";
-      sha256 = "14rp3652awvx2iw1l6mia5flfib9jfkiaic16afchrlp17sdq2ji";
+      sha256 = "0fgvc3s8rb6da3jgrd8jmqv9xky7mq1y184jbm4lgy0rds4zhkf4";
   };
 
   stage1BaseImage = fetchurl {
diff --git a/pkgs/applications/window-managers/i3/status.nix b/pkgs/applications/window-managers/i3/status.nix
index 1693e7ed0fd4..bd79f6b8ff0a 100644
--- a/pkgs/applications/window-managers/i3/status.nix
+++ b/pkgs/applications/window-managers/i3/status.nix
@@ -2,11 +2,11 @@
   }:
 
 stdenv.mkDerivation rec {
-  name = "i3status-2.10";
+  name = "i3status-2.11";
 
   src = fetchurl {
     url = "http://i3wm.org/i3status/${name}.tar.bz2";
-    sha256 = "1497dsvb32z9xljmxz95dnyvsbayn188ilm3l4ys8m5h25vd1xfs";
+    sha256 = "0pwcy599fw8by1a1sf91crkqba7679qhvhbacpmhis8c1xrpxnwq";
   };
 
   buildInputs = [ confuse yajl alsaLib libpulseaudio libnl pkgconfig ];
diff --git a/pkgs/applications/window-managers/jwm/default.nix b/pkgs/applications/window-managers/jwm/default.nix
index 47130ac71ece..97e4b391a790 100644
--- a/pkgs/applications/window-managers/jwm/default.nix
+++ b/pkgs/applications/window-managers/jwm/default.nix
@@ -5,13 +5,13 @@
 
 stdenv.mkDerivation rec {
   name = "jwm-${version}";
-  version = "1563";
+  version = "1575";
   
   src = fetchFromGitHub {
     owner = "joewing";
     repo = "jwm";
     rev = "s${version}";
-    sha256 = "0xfrsk0cffc0fmlmq1340ylzdcmancn2bwgzv6why3gklxplsp9z";
+    sha256 = "0dw0f29s04jglncavgqr7h9h791f7vw3lb3dcwrgmzk5v50v4nx9";
   };
 
   nativeBuildInputs = [ pkgconfig automake autoconf libtool gettext which ];
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index c8e3d8b4cc82..95e0b360937a 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -281,9 +281,6 @@ stdenv.mkDerivation {
   crossAttrs = {
     shell = shell.crossDrv + shell.crossDrv.shellPath;
     libc = stdenv.ccCross.libc;
-    coreutils = coreutils.crossDrv;
-    binutils = binutils.crossDrv;
-    cc = cc.crossDrv;
     #
     # This is not the best way to do this. I think the reference should be
     # the style in the gcc-cross-wrapper, but to keep a stable stdenv now I
diff --git a/pkgs/build-support/fetchbower/default.nix b/pkgs/build-support/fetchbower/default.nix
index 11d88ae10e9f..835fbec6bf0e 100644
--- a/pkgs/build-support/fetchbower/default.nix
+++ b/pkgs/build-support/fetchbower/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, bower2nix }:
+{ stdenv, lib, bower2nix, cacert }:
 let
   bowerVersion = version:
     let
@@ -9,6 +9,7 @@ let
 
   fetchbower = name: version: target: outputHash: stdenv.mkDerivation {
     name = "${name}-${bowerVersion version}";
+    SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
     buildCommand = ''
       fetch-bower --quiet --out=$PWD/out "${name}" "${target}" "${version}"
       # In some cases, the result of fetchBower is different depending
diff --git a/pkgs/data/fonts/gentium/default.nix b/pkgs/data/fonts/gentium/default.nix
index 6addc779f350..9e4a88ab770d 100644
--- a/pkgs/data/fonts/gentium/default.nix
+++ b/pkgs/data/fonts/gentium/default.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
   version = "5.000";
 
   src = fetchzip {
-    url = "http://software.sil.org/downloads/gentium/GentiumPlus-${version}.zip";
+    url = "http://software.sil.org/downloads/d/gentium/GentiumPlus-${version}.zip";
     sha256 = "0g9sx38wh7f0m16gr64g2xggjwak2q6jw9y4zhrvhmp4aq4xfqm6";
   };
 
diff --git a/pkgs/data/fonts/overpass/default.nix b/pkgs/data/fonts/overpass/default.nix
index d441ac514d37..e24d61d5ba1c 100644
--- a/pkgs/data/fonts/overpass/default.nix
+++ b/pkgs/data/fonts/overpass/default.nix
@@ -1,12 +1,14 @@
-{ stdenv, fetchurl, unzip }:
+{ stdenv, fetchFromGitHub, unzip }:
 
 stdenv.mkDerivation rec {
   name = "overpass-${version}";
-  version = "2.1";
+  version = "3.0.2";
 
-  src = fetchurl {
-    url = "https://github.com/RedHatBrand/overpass/releases/download/2.1/overpass-fonts-ttf-2.1.zip";
-    sha256 = "1kd7vbqffp5988j3p4zxkxajdmfviyv4y6rzk7jazg81xcsxicwf";
+  src = fetchFromGitHub {
+    owner = "RedHatBrand";
+    repo = "Overpass";
+    rev = version;
+    sha256 = "1bgmnhdfmp4rycyadcnzw62vkvn63nn29pq9vbjf4c9picvl8ah6";
   };
 
   nativeBuildInputs = [ unzip ];
@@ -15,8 +17,8 @@ stdenv.mkDerivation rec {
 
   installPhase = ''
     mkdir -p $out/share/doc/${name}
-    mkdir -p $out/share/fonts/truetype
-    cp -v *.ttf $out/share/fonts/truetype
+    mkdir -p $out/share/fonts/opentype
+    cp -v "desktop-fonts/"*"/"*.otf $out/share/fonts/opentype
     cp -v LICENSE.md README.md $out/share/doc/${name}
   '';
 
diff --git a/pkgs/data/fonts/paratype-pt/sans.nix b/pkgs/data/fonts/paratype-pt/sans.nix
index 2958611e474b..fe9d30854708 100644
--- a/pkgs/data/fonts/paratype-pt/sans.nix
+++ b/pkgs/data/fonts/paratype-pt/sans.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, unzip }:
 
 stdenv.mkDerivation rec {
-  name = "paratype-pt-sane";
+  name = "paratype-pt-sans";
 
   src = fetchurl rec {
     url = "http://www.paratype.ru/uni/public/PTSans.zip";
diff --git a/pkgs/data/fonts/roboto/default.nix b/pkgs/data/fonts/roboto/default.nix
index e0d2545973bb..fbb364b9d721 100644
--- a/pkgs/data/fonts/roboto/default.nix
+++ b/pkgs/data/fonts/roboto/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "roboto-${version}";
-  version = "2.135";
+  version = "2.136";
 
   src = fetchurl {
     url = "https://github.com/google/roboto/releases/download/v${version}/roboto-unhinted.zip";
-    sha256 = "1ndlh36bcx4mhi58sxfx6ywbib586brh6s5sk3jyji78h1i7j8zr";
+    sha256 = "0yx3q5wbbl1qkxfx1fglzy3rvms98jr8fcfj70vvvz3r3lppv201";
   };
 
   nativeBuildInputs = [ unzip ];
diff --git a/pkgs/desktops/enlightenment/terminology.nix b/pkgs/desktops/enlightenment/terminology.nix
index 34506c05fabe..fc36a7e7a656 100644
--- a/pkgs/desktops/enlightenment/terminology.nix
+++ b/pkgs/desktops/enlightenment/terminology.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "terminology-${version}";
-  version = "0.9.1";
+  version = "1.0.0";
 
   src = fetchurl {
     url = "http://download.enlightenment.org/rel/apps/terminology/${name}.tar.xz";
-    sha256 = "1kwv9vkhngdm5v38q93xpcykghnyawhjjcb5bgy0p89gpbk7mvpc";
+    sha256 = "1x4j2q4qqj10ckbka0zaq2r2zm66ff1x791kp8slv1ff7fw45vdz";
   };
 
   nativeBuildInputs = [ pkgconfig ];
@@ -25,8 +25,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "The best terminal emulator written with the EFL";
     homepage = http://enlightenment.org/;
-    maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx ];
     platforms = stdenv.lib.platforms.linux;
     license = stdenv.lib.licenses.bsd2;
+    maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx ];
   };
 }
diff --git a/pkgs/desktops/lumina/default.nix b/pkgs/desktops/lumina/default.nix
index dcacabc39c1e..f593bd144374 100644
--- a/pkgs/desktops/lumina/default.nix
+++ b/pkgs/desktops/lumina/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   name = "lumina-${version}";
-  version = "1.1.0-p1";
+  version = "1.2.0-p1";
 
   src = fetchFromGitHub {
     owner = "trueos";
     repo = "lumina";
     rev = "v${version}";
-    sha256 = "1kkb6v6p6w5mx1qdmcrq3r674k9ahpc6wlsb9pi2lq8qk9yaid0m";
+    sha256 = "0k16lcpxp9avwkadbbyqficd1wxsmwian5ji38wyax76v22yq7p6";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-whiskermenu-plugin.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-whiskermenu-plugin.nix
index a9c4da810c15..ffda5b94e076 100644
--- a/pkgs/desktops/xfce/panel-plugins/xfce4-whiskermenu-plugin.nix
+++ b/pkgs/desktops/xfce/panel-plugins/xfce4-whiskermenu-plugin.nix
@@ -4,7 +4,7 @@
 with stdenv.lib;
 stdenv.mkDerivation rec {
   p_name  = "xfce4-whiskermenu-plugin";
-  version = "1.6.1";
+  version = "1.6.2";
 
   name = "${p_name}-${version}";
 
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
     owner = "gottcode";
     repo = "xfce4-whiskermenu-plugin";
     rev = "v${version}";
-    sha256 = "19hldrrgy7qmrncv5rfsclybycjp9rjfnslhm996h62d2p675qpc";
+    sha256 = "0vfyav01hynjm7p73wwbwnn2l8l9a0hkz755wmjzr6qv06f9019d";
   };
 
   nativeBuildInputs = [ cmake pkgconfig intltool ];
diff --git a/pkgs/development/compilers/aspectj/default.nix b/pkgs/development/compilers/aspectj/default.nix
index 264e76d038ca..f9e792260335 100644
--- a/pkgs/development/compilers/aspectj/default.nix
+++ b/pkgs/development/compilers/aspectj/default.nix
@@ -1,12 +1,12 @@
 {stdenv, fetchurl, jre}:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   name = "aspectj-1.5.2";
   builder = ./builder.sh;
 
   src = fetchurl {
-    url = http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/aspectj/aspectj-1.5.2.jar;
-    md5 = "64245d451549325147e3ca1ec4c9e57c";
+    url = "http://archive.eclipse.org/tools/aspectj/${name}.jar";
+    sha256 = "1b3mx248dc1xka1vgsl0jj4sm0nfjsqdcj9r9036mvixj1zj3nmh";
   };
 
   inherit jre;
diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix
index 7162f85e05d3..6202a8e968b3 100644
--- a/pkgs/development/compilers/crystal/default.nix
+++ b/pkgs/development/compilers/crystal/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm_39, makeWrapper }:
 
 stdenv.mkDerivation rec {
-  version = "0.20.4";
+  version = "0.20.5";
   name = "crystal-${version}-1";
   arch =
     {
@@ -14,15 +14,15 @@ stdenv.mkDerivation rec {
     url = "https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-1-${arch}.tar.gz";
     sha256 =
       {
-        "x86_64-linux" = "cdc11c30235f8bd3b89e1fc13b56838f99d585715fb66563d6599026f5393e37";
-        "i686-linux" = "93e7df2bea3220728987a49a2f93d1c615e2ccae63843e0259a5d891c53a0b80";
-        "x86_64-darwin" = "3fd291a4a5c9eccdea933a9df25446c90d80660a17e89f83503fcb5b6deba03e";
+        "x86_64-linux" = "fd077c0a727419e131b1be6198a5aa5820ecbdaafd2d2bb38be5716ba75b5100";
+        "i686-linux" = "e3a890f11833c57c9004655d108f981c7c630cd7a939f828d9a6c571705bc3e7";
+        "x86_64-darwin" = "79462c8ff994b36cff219c356967844a17e8cb2817bb24a196a960a08b8c9e47";
       }."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
   };
 
   src = fetchurl {
     url = "https://github.com/crystal-lang/crystal/archive/${version}.tar.gz";
-    sha256 = "fd099f278b71bbb5cad1927c93933d1feba554fbf8f6f4ab9165f535765f5e31";
+    sha256 = "ee1e5948c6e662ccb1e62671cf2c91458775b559b23d74ab226dc2a2d23f7707";
   };
 
   # crystal on Darwin needs libiconv to build
diff --git a/pkgs/development/compilers/ghc/8.0.2.nix b/pkgs/development/compilers/ghc/8.0.2.nix
index 5979eba3e100..ba8401b9b092 100644
--- a/pkgs/development/compilers/ghc/8.0.2.nix
+++ b/pkgs/development/compilers/ghc/8.0.2.nix
@@ -4,13 +4,6 @@
 
 let
   inherit (bootPkgs) ghc;
-
-  fetchFilteredPatch = args: fetchurl (args // {
-    downloadToTemp = true;
-    postFetch = ''
-      ${patchutils}/bin/filterdiff --clean --strip-match=1 -x 'testsuite/*' "$downloadedFile" > "$out"
-    ''; # fix syntax highlighting: */
-  });
 in
 stdenv.mkDerivation rec {
   version = "8.0.2";
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index 971365eda48f..e7f4335d6f6e 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils
-, autoconf, automake, happy, alex, python3, crossSystem, selfPkgs, cross ? null
+, autoconf, automake, happy, alex, python3, buildPlatform, targetPlatform
+, selfPkgs, cross ? null
 }:
 
 let
@@ -68,9 +69,9 @@ in stdenv.mkDerivation (rec {
 
   passthru = {
     inherit bootPkgs;
-  } // stdenv.lib.optionalAttrs (crossSystem != null) {
+  } // stdenv.lib.optionalAttrs (targetPlatform != buildPlatform) {
     crossCompiler = selfPkgs.ghc.override {
-      cross = crossSystem;
+      cross = targetPlatform;
       bootPkgs = selfPkgs;
     };
   };
diff --git a/pkgs/development/compilers/go/1.4.nix b/pkgs/development/compilers/go/1.4.nix
index eb4c64ed3340..b703a92f3ea5 100644
--- a/pkgs/development/compilers/go/1.4.nix
+++ b/pkgs/development/compilers/go/1.4.nix
@@ -77,6 +77,29 @@ stdenv.mkDerivation rec {
     # fails when running inside tmux
     sed -i '/TestNohup/areturn' src/os/signal/signal_test.go
 
+    # unix socket tests fail on darwin
+    sed -i '/TestConnAndListener/areturn' src/net/conn_test.go
+    sed -i '/TestPacketConn/areturn' src/net/conn_test.go
+    sed -i '/TestPacketConn/areturn' src/net/packetconn_test.go
+    sed -i '/TestConnAndPacketConn/areturn' src/net/packetconn_test.go
+    sed -i '/TestUnixListenerSpecificMethods/areturn' src/net/packetconn_test.go
+    sed -i '/TestUnixConnSpecificMethods/areturn' src/net/packetconn_test.go
+    sed -i '/TestUnixListenerSpecificMethods/areturn' src/net/protoconn_test.go
+    sed -i '/TestUnixConnSpecificMethods/areturn' src/net/protoconn_test.go
+    sed -i '/TestStreamConnServer/areturn' src/net/server_test.go
+    sed -i '/TestReadUnixgramWithUnnamedSocket/areturn' src/net/unix_test.go
+    sed -i '/TestReadUnixgramWithZeroBytesBuffer/areturn' src/net/unix_test.go
+    sed -i '/TestUnixgramWrite/areturn' src/net/unix_test.go
+    sed -i '/TestUnixConnLocalAndRemoteNames/areturn' src/net/unix_test.go
+    sed -i '/TestUnixgramConnLocalAndRemoteNames/areturn' src/net/unix_test.go
+    sed -i '/TestWithSimulated/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestFlap/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestNew/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestNewLogger/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestDial/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestWrite/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestConcurrentWrite/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestConcurrentReconnect/areturn' src/log/syslog/syslog_test.go
 
     # remove IP resolving tests, on darwin they can find fe80::1%lo while expecting ::1
     sed -i '/TestResolveIPAddr/areturn' src/net/ipraw_test.go
diff --git a/pkgs/development/compilers/go/1.6.nix b/pkgs/development/compilers/go/1.6.nix
index 982446f4fdb1..7d78f5efd104 100644
--- a/pkgs/development/compilers/go/1.6.nix
+++ b/pkgs/development/compilers/go/1.6.nix
@@ -89,7 +89,7 @@ stdenv.mkDerivation rec {
     sed -i '/TestChdirAndGetwd/areturn' src/os/os_test.go
     sed -i '/TestRead0/areturn' src/os/os_test.go
     sed -i '/TestNohup/areturn' src/os/signal/signal_test.go
-    sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
+    rm src/crypto/x509/root_darwin_test.go src/crypto/x509/verify_test.go
 
     sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/areturn' src/cmd/go/go_test.go
     sed -i '/TestBuildDashIInstallsDependencies/areturn' src/cmd/go/go_test.go
diff --git a/pkgs/development/compilers/jikes/default.nix b/pkgs/development/compilers/jikes/default.nix
index 1423bc8d51ef..1e202160b3c5 100644
--- a/pkgs/development/compilers/jikes/default.nix
+++ b/pkgs/development/compilers/jikes/default.nix
@@ -4,7 +4,7 @@ stdenv.mkDerivation {
   name = "jikes-1.22";
   src = fetchurl {
     url = mirror://sourceforge/jikes/jikes-1.22.tar.bz2;
-    md5 = "cda958c7fef6b43b803e1d1ef9afcb85";
+    sha256 = "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c";
   };
 
   meta = {
diff --git a/pkgs/development/compilers/meta-environment/meta-build-env/default.nix b/pkgs/development/compilers/meta-environment/meta-build-env/default.nix
index 105844887f1d..3869bdad84f6 100644
--- a/pkgs/development/compilers/meta-environment/meta-build-env/default.nix
+++ b/pkgs/development/compilers/meta-environment/meta-build-env/default.nix
@@ -2,7 +2,7 @@
   name = "meta-build-env-0.1";
   src = fetchurl {
     url = http://www.meta-environment.org/releases/meta-build-env-0.1.tar.gz ;
-    md5 = "827b54ace4e2d3c8e7605ea149b34293";
+    sha256 = "1imn1gaan4fv73v8w3k3lgyjzkcn7bdp69k6hlz0vqdg17ysd1x3";
   };
 
   meta = {
diff --git a/pkgs/development/compilers/ocaml/4.04.nix b/pkgs/development/compilers/ocaml/4.04.nix
new file mode 100644
index 000000000000..7e35c9e1aa80
--- /dev/null
+++ b/pkgs/development/compilers/ocaml/4.04.nix
@@ -0,0 +1,6 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "04";
+  patch_version = "0";
+  sha256 = "1d2nk3kq4dyzz8dls45r13jprq5by3q8kshc8kvxzm8n4fnnvvb4";
+}
diff --git a/pkgs/development/compilers/ocaml/generic.nix b/pkgs/development/compilers/ocaml/generic.nix
index abded4b66900..17b3033c31df 100644
--- a/pkgs/development/compilers/ocaml/generic.nix
+++ b/pkgs/development/compilers/ocaml/generic.nix
@@ -41,7 +41,7 @@ stdenv.mkDerivation (args // rec {
   buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";
   buildInputs = [ncurses] ++ optionals useX11 [ libX11 xproto ];
   installTargets = "install" + optionalString useNativeCompilers " installopt";
-  preConfigure = ''
+  preConfigure = optionalString (!stdenv.lib.versionAtLeast version "4.04") ''
     CAT=$(type -tp cat)
     sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
   '';
@@ -56,7 +56,7 @@ stdenv.mkDerivation (args // rec {
 
   meta = with stdenv.lib; {
     homepage = http://caml.inria.fr/ocaml;
-    branch = "4.03";
+    branch = versionNoPatch;
     license = with licenses; [
       qpl /* compiler */
       lgpl2 /* library */
diff --git a/pkgs/development/compilers/zulu/default.nix b/pkgs/development/compilers/zulu/default.nix
new file mode 100644
index 000000000000..657f5274d000
--- /dev/null
+++ b/pkgs/development/compilers/zulu/default.nix
@@ -0,0 +1,67 @@
+{ stdenv, pkgs, fetchurl, unzip, makeWrapper, setJavaClassPath, swingSupport ? true }:
+
+with pkgs;
+
+let
+  version = "8.19.0.1";
+  openjdk = "8.0.112";
+
+  sha256_linux = "1icb6in1197n44wk2cqnrxr7w0bd5abxxysfrhbg56jlb9nzmp4x";
+  sha256_darwin = "0kxwh62a6kckc9l9jkgakf86lqkqazp3dwfwaxqc4cg5zczgbhmd";
+
+  platform = if stdenv.isDarwin then "macosx" else "linux";
+  hash = if stdenv.isDarwin then sha256_darwin else sha256_linux;
+  extension = if stdenv.isDarwin then "zip" else "tar.gz";
+in stdenv.mkDerivation rec {
+  inherit version openjdk platform hash extension;
+
+  name = "zulu-${version}";
+
+  src = fetchurl {
+    url = "https://cdn.azul.com/zulu/bin/zulu${version}-jdk${openjdk}-${platform}_x64.${extension}";
+    sha256 = hash;
+  };
+
+  buildInputs = [ makeWrapper ] ++ stdenv.lib.optional stdenv.isDarwin [ unzip ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r ./* "$out/"
+
+    jrePath="$out/jre"
+
+    rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/jli
+    rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/server
+    rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/xawt
+    rpath=$rpath''${rpath:+:}$jrePath/lib/amd64
+
+    # set all the dynamic linkers
+    find $out -type f -perm -0100 \
+        -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+        --set-rpath "$rpath" {} \;
+
+    find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
+
+    mkdir -p $out/nix-support
+    echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
+
+    # Set JAVA_HOME automatically.
+    cat <<EOF >> $out/nix-support/setup-hook
+    if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
+    EOF
+  '';
+
+  libraries = [ stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xorg.libXxf86vm alsaLib fontconfig freetype gnome2.pango gnome2.gtk cairo gdk_pixbuf atk ]
+      ++ (if swingSupport then [ xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp xorg.libXt xorg.libXrender stdenv.cc.cc ] else [ ]);
+
+  rpath = stdenv.lib.strings.makeLibraryPath libraries;
+
+  meta = with stdenv.lib; {
+    homepage = https://www.azul.com/products/zulu/;
+    license = licenses.gpl2;
+    description = "Certified builds of OpenJDK";
+    longDescription = "Certified builds of OpenJDK that can be deployed across multiple operating systems, containers, hypervisors and Cloud platforms";
+    maintainers = with maintainers; [ nequissimus ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/pkgs/development/coq-modules/mathcomp/default.nix b/pkgs/development/coq-modules/mathcomp/default.nix
index 81cfdecdfffb..dba6a3abbea5 100644
--- a/pkgs/development/coq-modules/mathcomp/default.nix
+++ b/pkgs/development/coq-modules/mathcomp/default.nix
@@ -1,39 +1,22 @@
 { callPackage, fetchurl, coq }:
 
-if coq.coq-version == "8.4" then
-
-callPackage ./generic.nix {
-
-  name = "coq-mathcomp-1.6-${coq.coq-version}";
-  src = fetchurl {
+let param =
+  let v16 = {
+    version = "1.6";
     url = http://ssr.msr-inria.inria.fr/FTP/mathcomp-1.6.tar.gz;
     sha256 = "0adr556032r1jkvphbpfvrrv041qk0yqb7a1xnbam52ji0mdl2w8";
-  };
-
-}
-
-else if coq.coq-version == "8.5" then
-
-callPackage ./generic.nix {
-
-  name = "coq-mathcomp-1.6-${coq.coq-version}";
-  src = fetchurl {
-    url = http://ssr.msr-inria.inria.fr/FTP/mathcomp-1.6.tar.gz;
-    sha256 = "0adr556032r1jkvphbpfvrrv041qk0yqb7a1xnbam52ji0mdl2w8";
-  };
-
-}
-
-else if coq.coq-version == "8.6" then
-
-callPackage ./generic.nix {
-
-  name = "coq-mathcomp-1.6.1-${coq.coq-version}";
-  src = fetchurl {
+  }; v161 = {
+    version = "1.6.1";
     url = https://github.com/math-comp/math-comp/archive/mathcomp-1.6.1.tar.gz;
     sha256 = "1j9ylggjzrxz1i2hdl2yhsvmvy5z6l4rprwx7604401080p5sgjw";
-  };
+  }; in
+{
+  "8.4" = v16;
+  "8.5" = v16;
+  "8.6" = v161;
+}."${coq.coq-version}"; in
 
+callPackage ./generic.nix {
+  name = "coq${coq.coq-version}-mathcomp-${param.version}";
+  src = fetchurl { inherit (param) url sha256; };
 }
-
-else throw "No ssreflect package for Coq version ${coq.coq-version}"
diff --git a/pkgs/development/coq-modules/mathcomp/generic.nix b/pkgs/development/coq-modules/mathcomp/generic.nix
index 9a6a98609d29..1c150c9e69fa 100644
--- a/pkgs/development/coq-modules/mathcomp/generic.nix
+++ b/pkgs/development/coq-modules/mathcomp/generic.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, coq, ssreflect, ncurses, which
-, graphviz, ocamlPackages, withDoc ? false
+, graphviz, withDoc ? false
 , src, name
 }:
 
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
   inherit src;
 
   nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
-  buildInputs = [ coq.ocaml coq.camlp5 ncurses which ];
+  buildInputs = [ coq.ocaml coq.findlib coq.camlp5 ncurses which ];
   propagatedBuildInputs = [ coq ssreflect ];
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/coq-modules/ssreflect/default.nix b/pkgs/development/coq-modules/ssreflect/default.nix
index 16147c4dc2ae..18eafe5e9c2c 100644
--- a/pkgs/development/coq-modules/ssreflect/default.nix
+++ b/pkgs/development/coq-modules/ssreflect/default.nix
@@ -1,39 +1,22 @@
 { callPackage, fetchurl, coq }:
 
-if coq.coq-version == "8.4" then
-
-callPackage ./generic.nix {
-
-  name = "coq-ssreflect-1.6-${coq.coq-version}";
-  src = fetchurl {
+let param =
+  let v16 = {
+    version = "1.6";
     url = http://ssr.msr-inria.inria.fr/FTP/mathcomp-1.6.tar.gz;
     sha256 = "0adr556032r1jkvphbpfvrrv041qk0yqb7a1xnbam52ji0mdl2w8";
-  };
-
-}
-
-else if coq.coq-version == "8.5" then
-
-callPackage ./generic.nix {
-
-  name = "coq-ssreflect-1.6-${coq.coq-version}";
-  src = fetchurl {
-    url = http://ssr.msr-inria.inria.fr/FTP/mathcomp-1.6.tar.gz;
-    sha256 = "0adr556032r1jkvphbpfvrrv041qk0yqb7a1xnbam52ji0mdl2w8";
-  };
-
-}
-
-else if coq.coq-version == "8.6" then
-
-callPackage ./generic.nix {
-
-  name = "coq-ssreflect-1.6.1-${coq.coq-version}";
-  src = fetchurl {
+  }; v161 = {
+    version = "1.6.1";
     url = https://github.com/math-comp/math-comp/archive/mathcomp-1.6.1.tar.gz;
     sha256 = "1j9ylggjzrxz1i2hdl2yhsvmvy5z6l4rprwx7604401080p5sgjw";
-  };
+  }; in
+{
+  "8.4" = v16;
+  "8.5" = v16;
+  "8.6" = v161;
+}."${coq.coq-version}"; in
 
+callPackage ./generic.nix {
+  name = "coq${coq.coq-version}-ssreflect-${param.version}";
+  src = fetchurl { inherit (param) url sha256; };
 }
-
-else throw "No ssreflect package for Coq version ${coq.coq-version}"
diff --git a/pkgs/development/coq-modules/ssreflect/generic.nix b/pkgs/development/coq-modules/ssreflect/generic.nix
index 3362e8839a75..c598345403db 100644
--- a/pkgs/development/coq-modules/ssreflect/generic.nix
+++ b/pkgs/development/coq-modules/ssreflect/generic.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
   inherit src;
 
   nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
-  buildInputs = [ coq.ocaml coq.camlp5 ncurses which ];
+  buildInputs = [ coq.ocaml coq.findlib coq.camlp5 ncurses which ];
   propagatedBuildInputs = [ coq ];
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 90e80e21406d..a30829898550 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -57,14 +57,7 @@ self: super: {
       sha256 = "1vy6bj7f8zyj4n1r0gpi0r7mxapsrjvhwmsi5sbnradfng5j3jya";
       rev = drv.version;
     };
-  })).overrideScope (self: super: {
-    # https://github.com/bitemyapp/esqueleto/issues/8
-    esqueleto = self.esqueleto_2_4_3;
-    # https://github.com/prowdsponsor/esqueleto/issues/137
-    persistent = self.persistent_2_2_4_1;
-    persistent-template = self.persistent-template_2_1_8_1;
-    persistent-sqlite = self.persistent-sqlite_2_2_1;
-  })).override {
+  }))).override {
     dbus = if pkgs.stdenv.isLinux then self.dbus else null;
     fdo-notify = if pkgs.stdenv.isLinux then self.fdo-notify else null;
     hinotify = if pkgs.stdenv.isLinux then self.hinotify else self.fsnotify;
@@ -516,7 +509,7 @@ self: super: {
 
   # https://ghc.haskell.org/trac/ghc/ticket/9625
   vty = dontCheck super.vty;
-  vty_5_14 = dontCheck super.vty_5_14;
+  vty_5_15 = dontCheck super.vty_5_15;
 
   # https://github.com/vincenthz/hs-crypto-pubkey/issues/20
   crypto-pubkey = dontCheck super.crypto-pubkey;
@@ -675,8 +668,38 @@ self: super: {
     '';
   }));
 
-  # Requires optparse-applicative 0.13.0.0
+  # Packages of the diagrams ecosystem that require:
+  #   diagrams-core ==1.4.*
+  #   diagrams-lib ==1.4.*
+  #   optparse-applicative ==0.13.*
+  diagrams_1_4 = super.diagrams_1_4.overrideScope (self: super: {
+    diagrams-contrib = self.diagrams-contrib_1_4_0_1;
+    diagrams-core = self.diagrams-core_1_4;
+    diagrams-lib = self.diagrams-lib_1_4_0_1;
+    diagrams-svg = self.diagrams-svg_1_4_1;
+    optparse-applicative = self.optparse-applicative_0_13_0_0;
+  });
+  diagrams-contrib_1_4_0_1 = super.diagrams-contrib_1_4_0_1.overrideScope (self: super: {
+    diagrams-core = self.diagrams-core_1_4;
+    diagrams-lib = self.diagrams-lib_1_4_0_1;
+  });
+  diagrams-lib_1_4_0_1 = super.diagrams-lib_1_4_0_1.overrideScope (self: super: {
+    diagrams-core = self.diagrams-core_1_4;
+    optparse-applicative = self.optparse-applicative_0_13_0_0;
+  });
   diagrams-pgf = super.diagrams-pgf.overrideScope (self: super: {
+    diagrams-core = self.diagrams-core_1_4;
+    diagrams-lib = self.diagrams-lib_1_4_0_1;
+    optparse-applicative = self.optparse-applicative_0_13_0_0;
+  });
+  diagrams-rasterific_1_4 = super.diagrams-rasterific_1_4.overrideScope (self: super: {
+    diagrams-core = self.diagrams-core_1_4;
+    diagrams-lib = self.diagrams-lib_1_4_0_1;
+    optparse-applicative = self.optparse-applicative_0_13_0_0;
+  });
+  diagrams-svg_1_4_1 = super.diagrams-svg_1_4_1.overrideScope (self: super: {
+    diagrams-core = self.diagrams-core_1_4;
+    diagrams-lib = self.diagrams-lib_1_4_0_1;
     optparse-applicative = self.optparse-applicative_0_13_0_0;
   });
 
@@ -693,6 +716,9 @@ self: super: {
   # https://github.com/nushio3/doctest-prop/issues/1
   doctest-prop = dontCheck super.doctest-prop;
 
+  # Depends on itself for testing
+  doctest-discover = addBuildTool super.doctest-discover (dontCheck super.doctest-discover);
+
   # https://github.com/bos/aeson/issues/253
   aeson = dontCheck super.aeson;
 
@@ -808,14 +834,6 @@ self: super: {
 
   # Fine-tune the build.
   structured-haskell-mode = (overrideCabal super.structured-haskell-mode (drv: {
-    # Bump version to latest git-version to get support for Emacs 25.x.
-    version = "1.0.20-28-g1ffb4db";
-    src = pkgs.fetchFromGitHub {
-      owner = "chrisdone";
-      repo = "structured-haskell-mode";
-      rev = "dde5104ee28e1c63ca9fbc37c969f8e319b4b903";
-      sha256 = "0g5qpnxzr9qmgzvsld5mg94rb28xb8kd1a02q045r6zlmv1zx7lp";
-    };
     # Statically linked Haskell libraries make the tool start-up much faster,
     # which is important for use in Emacs.
     enableSharedExecutables = false;
@@ -1123,8 +1141,7 @@ self: super: {
   # https://github.com/pontarius/pontarius-xmpp/issues/105
   pontarius-xmpp = dontCheck super.pontarius-xmpp;
 
-  # https://github.com/fpco/store/issues/77
-  store = dontCheck super.store;
+  # Use proper store-core version.
   store_0_3 = super.store_0_3.overrideScope (self: super: { store-core = self.store-core_0_3; });
 
   # https://github.com/bmillwood/applicative-quoters/issues/6
@@ -1133,9 +1150,6 @@ self: super: {
   # https://github.com/roelvandijk/terminal-progress-bar/issues/13
   terminal-progress-bar = doJailbreak super.terminal-progress-bar;
 
-  # https://github.com/vshabanov/HsOpenSSL/issues/11
-  HsOpenSSL = doJailbreak super.HsOpenSSL;
-
   # https://github.com/NixOS/nixpkgs/issues/19612
   wai-app-file-cgi = (dontCheck super.wai-app-file-cgi).overrideScope (self: super: {
     http-client = self.http-client_0_5_5;
@@ -1169,18 +1183,8 @@ self: super: {
 
   socket_0_7_0_0 = super.socket_0_7_0_0.overrideScope (self: super: { QuickCheck = self.QuickCheck_2_9_2; });
 
-  # Encountered missing dependencies: hspec >=1.3 && <2.1
-  # https://github.com/rampion/ReadArgs/issues/8
-  ReadArgs = doJailbreak super.ReadArgs;
-
-  # https://github.com/philopon/barrier/issues/3
-  barrier = doJailbreak super.barrier;
-
-  # requires vty 5.13
-  brick = super.brick.overrideScope (self: super: { vty = self.vty_5_14; });
-
-  # https://github.com/krisajenkins/elm-export/pull/22
-  elm-export = doJailbreak super.elm-export;
+  # requires most recent vty
+  brick = super.brick.overrideScope (self: super: { vty = self.vty_5_15; });
 
   turtle_1_3_1 = super.turtle_1_3_1.overrideScope (self: super: {
     optparse-applicative = self.optparse-applicative_0_13_0_0;
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix
index a7696dfc2e31..7a421e4f7b68 100644
--- a/pkgs/development/haskell-modules/generic-builder.nix
+++ b/pkgs/development/haskell-modules/generic-builder.nix
@@ -148,8 +148,10 @@ let
 
   setupBuilder = if isCross || isGhcjs then "${nativeGhc}/bin/ghc" else ghcCommand;
   setupCommand = "./Setup";
-  ghcCommand = if isGhcjs then "ghcjs" else if isCross then "${ghc.cross.config}-ghc" else "ghc";
-  ghcCommandCaps = toUpper ghcCommand;
+  ghcCommand' = if isGhcjs then "ghcjs" else "ghc";
+  crossPrefix = if (ghc.cross or null) != null then "${ghc.cross.config}-" else "";
+  ghcCommand = "${crossPrefix}${ghcCommand'}";
+  ghcCommandCaps= toUpper ghcCommand';
 
 in
 
diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index 056a98727c12..276965d28d26 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -1676,8 +1676,8 @@ self: {
      }:
      mkDerivation {
        pname = "BitStringRandomMonad";
-       version = "0.1.1.1";
-       sha256 = "496715852ecfd5651fee81eba635b88865ef6dbc87792e56ea47eeac36fd9c36";
+       version = "0.1.1.2";
+       sha256 = "96a5bb1cb04427a64be71f83d1a09abb950d3023ae80e3811a304748ace16dbf";
        libraryHaskellDepends = [
          base bitstring bytestring mtl parallel primitive transformers
          vector
@@ -4992,6 +4992,18 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "FastPush" = callPackage
+    ({ mkDerivation, base, STMonadTrans, vector }:
+     mkDerivation {
+       pname = "FastPush";
+       version = "0.1.0.2";
+       sha256 = "301cf0552dc14adc8865038b7d7f5aac7dc791f4039c790c28262603b129c674";
+       libraryHaskellDepends = [ base STMonadTrans vector ];
+       homepage = "https://github.com/wyager/FastPush/";
+       description = "A monad and monad transformer for pushing things onto a stack very fast";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "FastxPipe" = callPackage
     ({ mkDerivation, attoparsec, base, blaze-builder, bytestring, pipes
      , pipes-attoparsec, pipes-bytestring
@@ -6273,6 +6285,22 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "GoogleCodeJam" = callPackage
+    ({ mkDerivation, array, base, containers, mtl, parallel, safe
+     , split, transformers
+     }:
+     mkDerivation {
+       pname = "GoogleCodeJam";
+       version = "0.0.3";
+       sha256 = "e08209b95b264757ce8c4fc1422059c09910b38a4bdd22f6d4e51b24ab1cabdc";
+       libraryHaskellDepends = [
+         array base containers mtl parallel safe split transformers
+       ];
+       homepage = "http://johannesgerer.com/GoogleCodeJam";
+       description = "A monad for flexible parsing of Google Code Jam input files with automatic parallelization";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
   "GoogleDirections" = callPackage
     ({ mkDerivation, AttoJson, base, bytestring, containers, dataenc
      , download-curl
@@ -9422,6 +9450,25 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {inherit (pkgs) openssl;};
 
+  "HsOpenSSL_0_11_4" = callPackage
+    ({ mkDerivation, base, bytestring, integer-gmp, network, openssl
+     , time
+     }:
+     mkDerivation {
+       pname = "HsOpenSSL";
+       version = "0.11.4";
+       sha256 = "6326b9b1fb07e05a72f8435cc3ae777d696251e43e93b25ec2ff513f7f2bed07";
+       libraryHaskellDepends = [
+         base bytestring integer-gmp network time
+       ];
+       librarySystemDepends = [ openssl ];
+       testHaskellDepends = [ base bytestring ];
+       homepage = "https://github.com/vshabanov/HsOpenSSL";
+       description = "Partial OpenSSL binding for Haskell";
+       license = stdenv.lib.licenses.publicDomain;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {inherit (pkgs) openssl;};
+
   "HsOpenSSL-x509-system" = callPackage
     ({ mkDerivation, base, bytestring, HsOpenSSL, unix }:
      mkDerivation {
@@ -14047,8 +14094,8 @@ self: {
     ({ mkDerivation, base, QuickCheck }:
      mkDerivation {
        pname = "QuickCheckVariant";
-       version = "0.1.1.0";
-       sha256 = "3d29e3b03f3908b04db06d3912e65e4370f752d57296e509bbf7e17db949c2f8";
+       version = "0.2.0.0";
+       sha256 = "5ad8557a69793d00facc27a8f3eb9edd7bfde8cd923ea51465a9bfa0a7e7d682";
        libraryHaskellDepends = [ base QuickCheck ];
        homepage = "https://github.com/sanjorgek/QuickCheckVariant";
        description = "Generator of \"valid\" and \"invalid\" data in a type class";
@@ -14558,21 +14605,20 @@ self: {
   "Redmine" = callPackage
     ({ mkDerivation, aeson, base, bytestring, connection, containers
      , HTTP, http-client-tls, http-conduit, http-types, HUnit, MissingH
-     , network, old-locale, old-time, resourcet, text, time
-     , transformers
+     , network, resourcet, text, time, transformers
      }:
      mkDerivation {
        pname = "Redmine";
-       version = "0.0.6";
-       sha256 = "e81f23501fc58456db77b9797a196200f20a81013da3b8f89fdffbf1214d9882";
+       version = "0.0.8";
+       sha256 = "0f0460459b9293b95f55ea966891daf04552de4c8d950da79963fe8b9552acd2";
        libraryHaskellDepends = [
          aeson base bytestring connection containers HTTP http-client-tls
-         http-conduit http-types MissingH network old-locale old-time
-         resourcet text time transformers
+         http-conduit http-types MissingH network resourcet text time
+         transformers
        ];
        testHaskellDepends = [
-         aeson base bytestring connection containers http-client-tls
-         http-conduit HUnit MissingH network old-locale resourcet text time
+         aeson base bytestring connection containers HTTP http-client-tls
+         http-conduit http-types HUnit MissingH network resourcet text time
          transformers
        ];
        homepage = "https://github.com/lookunder/RedmineHs";
@@ -16408,8 +16454,8 @@ self: {
     ({ mkDerivation, base, template-haskell }:
      mkDerivation {
        pname = "THEff";
-       version = "0.1.1.0";
-       sha256 = "545725746fa7ea7d77cdb1447a1f2564ddfe36624c8a3118a7e8d0b009ef2462";
+       version = "0.1.4";
+       sha256 = "4857093c5be0c15557a5c1b06d6dd16e65ff6da0a9362b1d6ee3614d476af266";
        libraryHaskellDepends = [ base template-haskell ];
        description = "TH implementation of effects";
        license = stdenv.lib.licenses.bsd3;
@@ -27830,8 +27876,8 @@ self: {
      }:
      mkDerivation {
        pname = "async-pool";
-       version = "0.9.0";
-       sha256 = "3083cc4a45ebda8d44d25ed143f670cbdc877603ba1d37353a7dee088c172581";
+       version = "0.9.0.1";
+       sha256 = "54c7cc38f00e85978c59569744ca11802a28a93d9a7bbfc83d87c72158bee28b";
        libraryHaskellDepends = [
          async base containers fgl monad-control stm transformers
          transformers-base
@@ -28901,8 +28947,8 @@ self: {
        pname = "avers";
        version = "0.0.17.1";
        sha256 = "1b45d8aa036b3c2ec7ea180327ff3cdce28dc1e1ef319c062be79f0ffa7626f5";
-       revision = "5";
-       editedCabalFile = "319f1526093b829e5cbb6fe1591f77f3f5be25da83df7790e37741272e711b24";
+       revision = "6";
+       editedCabalFile = "4fdb981cfedcc58b8b64a823d826fafd32c7b0fce7e01bd816db1474994d6018";
        libraryHaskellDepends = [
          aeson attoparsec base bytestring clock containers cryptonite
          filepath inflections memory MonadRandom mtl network network-uri
@@ -33338,30 +33384,36 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "bitcoin-payment-channel_0_6_0_1" = callPackage
+  "bitcoin-payment-channel_1_0_0_0" = callPackage
     ({ mkDerivation, aeson, base, base16-bytestring, base64-bytestring
-     , bytestring, cereal, errors, haskoin-core, hexstring, QuickCheck
-     , scientific, string-conversions, tagged, test-framework
-     , test-framework-quickcheck2, text, time
+     , bytestring, cereal, errors, haskell-rbpcp-api, haskoin-core
+     , hexstring, hspec, monad-time, mtl, QuickCheck, random, scientific
+     , semigroups, string-conversions, tagged, test-framework
+     , test-framework-quickcheck2, text, tf-random, time
      }:
      mkDerivation {
        pname = "bitcoin-payment-channel";
-       version = "0.6.0.1";
-       sha256 = "10085ef9254d88a4494986f372b07d4109d1767196cc6d230c02ffe18f5f1abd";
+       version = "1.0.0.0";
+       sha256 = "3858a212258099aed8361bbaeef5a251c5d12d7b222c027290d963571e1f7698";
        libraryHaskellDepends = [
-         aeson base base16-bytestring bytestring cereal errors haskoin-core
-         hexstring QuickCheck scientific string-conversions tagged text time
+         aeson base base16-bytestring bytestring cereal errors
+         haskell-rbpcp-api haskoin-core hexstring hspec monad-time
+         QuickCheck scientific semigroups string-conversions tagged text
+         time
        ];
        testHaskellDepends = [
          aeson base base16-bytestring base64-bytestring bytestring cereal
-         haskoin-core hexstring QuickCheck string-conversions test-framework
-         test-framework-quickcheck2 text time
+         errors haskell-rbpcp-api haskoin-core hexstring hspec monad-time
+         mtl QuickCheck random scientific semigroups string-conversions
+         tagged test-framework test-framework-quickcheck2 text tf-random
+         time
        ];
        homepage = "https://github.com/runeksvendsen/bitcoin-payment-channel";
-       description = "Library for working with Bitcoin payment channels";
+       description = "Instant, two-party Bitcoin payments";
        license = stdenv.lib.licenses.publicDomain;
        hydraPlatforms = stdenv.lib.platforms.none;
-     }) {};
+       broken = true;
+     }) {haskell-rbpcp-api = null;};
 
   "bitcoin-rpc" = callPackage
     ({ mkDerivation, aeson, attoparsec, base, bytestring, cereal
@@ -35136,8 +35188,8 @@ self: {
     ({ mkDerivation, base, gtk, transformers, X11 }:
      mkDerivation {
        pname = "boring-window-switcher";
-       version = "0.1.0.2";
-       sha256 = "e7e568de0b410fd878c6cd6ce9eae66f51e3e98c83090ad5dec23b5738c9721f";
+       version = "0.1.0.3";
+       sha256 = "ac8273d978973b9424ce195ab48b6f599d06bb1af1af6abf94305b35ffed2748";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [ base gtk transformers X11 ];
@@ -35480,26 +35532,6 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "brick_0_15_2" = callPackage
-    ({ mkDerivation, base, containers, contravariant, data-default
-     , deepseq, microlens, microlens-mtl, microlens-th, template-haskell
-     , text, text-zipper, transformers, vector, vty
-     }:
-     mkDerivation {
-       pname = "brick";
-       version = "0.15.2";
-       sha256 = "7407473d133588df46c43480a2b41a50a04a7f0e63a996c6422a07592b8ca85e";
-       libraryHaskellDepends = [
-         base containers contravariant data-default deepseq microlens
-         microlens-mtl microlens-th template-haskell text text-zipper
-         transformers vector vty
-       ];
-       homepage = "https://github.com/jtdaugherty/brick/";
-       description = "A declarative terminal user interface library";
-       license = stdenv.lib.licenses.bsd3;
-       hydraPlatforms = stdenv.lib.platforms.none;
-     }) {};
-
   "brick" = callPackage
     ({ mkDerivation, base, containers, contravariant, data-default
      , deepseq, dlist, microlens, microlens-mtl, microlens-th, stm
@@ -35517,6 +35549,7 @@ self: {
        homepage = "https://github.com/jtdaugherty/brick/";
        description = "A declarative terminal user interface library";
        license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "brillig" = callPackage
@@ -36957,6 +36990,23 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "cabal-dependency-licenses_0_2_0_0" = callPackage
+    ({ mkDerivation, base, Cabal, containers, directory, filepath }:
+     mkDerivation {
+       pname = "cabal-dependency-licenses";
+       version = "0.2.0.0";
+       sha256 = "1731299d3764dd56fe93da2df0b32ce6d4e794e9a68a3dff96cf84a63fb5341e";
+       isLibrary = false;
+       isExecutable = true;
+       executableHaskellDepends = [
+         base Cabal containers directory filepath
+       ];
+       homepage = "http://github.com/jaspervdj/cabal-dependency-licenses";
+       description = "Compose a list of a project's transitive dependencies with their licenses";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "cabal-dev" = callPackage
     ({ mkDerivation, base, bytestring, Cabal, cabal-install, containers
      , directory, filepath, HTTP, mtl, network, pretty, process, setenv
@@ -37838,15 +37888,15 @@ self: {
      }) {};
 
   "cached-io" = callPackage
-    ({ mkDerivation, base, stm, time }:
+    ({ mkDerivation, base, stm, time, transformers }:
      mkDerivation {
        pname = "cached-io";
-       version = "0.1.1.0";
-       sha256 = "b43e7b329aff4a1f96daff221b6e68b7124d35cef3331034b452d794c8b03546";
+       version = "1.1.0.0";
+       sha256 = "353267bfc4de538ed0811cc4ce9d77683dc7c92654519a29e483d582ba781f30";
        isLibrary = true;
        isExecutable = true;
-       libraryHaskellDepends = [ base stm time ];
-       executableHaskellDepends = [ base stm time ];
+       libraryHaskellDepends = [ base stm time transformers ];
+       executableHaskellDepends = [ base ];
        description = "A simple library to cache a single IO action with timeout";
        license = stdenv.lib.licenses.asl20;
        hydraPlatforms = stdenv.lib.platforms.none;
@@ -38393,8 +38443,8 @@ self: {
     ({ mkDerivation, aeson, base }:
      mkDerivation {
        pname = "canteven-listen-http";
-       version = "0.1.0.0";
-       sha256 = "b7a750e3cf9c1aa7bac89c631714546aea477f3b5a5672dd3df7bb1e2513e168";
+       version = "1.0.0.1";
+       sha256 = "80035ba4bd16e308dd27008aa989efcbd9bedb96c6a84ca651ebef6fbeb781c5";
        libraryHaskellDepends = [ aeson base ];
        description = "data types to describe HTTP services";
        license = stdenv.lib.licenses.asl20;
@@ -41736,6 +41786,38 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "classy-prelude_1_2_0" = callPackage
+    ({ mkDerivation, async, base, basic-prelude, bifunctors, bytestring
+     , chunked-data, containers, deepseq, dlist, exceptions, ghc-prim
+     , hashable, hspec, lifted-async, lifted-base, monad-unlift
+     , mono-traversable, mono-traversable-instances, mtl
+     , mutable-containers, primitive, QuickCheck, safe-exceptions, say
+     , semigroups, stm, stm-chans, text, time, time-locale-compat
+     , transformers, transformers-base, unordered-containers, vector
+     , vector-instances
+     }:
+     mkDerivation {
+       pname = "classy-prelude";
+       version = "1.2.0";
+       sha256 = "74ca864563ae2b6e048f86ec3be256192e81d12fbef0723d2aa2ee3d1d71fd70";
+       libraryHaskellDepends = [
+         async base basic-prelude bifunctors bytestring chunked-data
+         containers deepseq dlist exceptions ghc-prim hashable lifted-async
+         lifted-base monad-unlift mono-traversable
+         mono-traversable-instances mtl mutable-containers primitive
+         safe-exceptions say semigroups stm stm-chans text time
+         time-locale-compat transformers transformers-base
+         unordered-containers vector vector-instances
+       ];
+       testHaskellDepends = [
+         base containers hspec QuickCheck transformers unordered-containers
+       ];
+       homepage = "https://github.com/snoyberg/mono-traversable";
+       description = "A typeclass-based Prelude";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "classy-prelude-conduit" = callPackage
     ({ mkDerivation, base, bytestring, classy-prelude, conduit
      , conduit-combinators, hspec, monad-control, QuickCheck, resourcet
@@ -41758,6 +41840,28 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "classy-prelude-conduit_1_2_0" = callPackage
+    ({ mkDerivation, base, bytestring, classy-prelude, conduit
+     , conduit-combinators, hspec, monad-control, QuickCheck, resourcet
+     , transformers, void
+     }:
+     mkDerivation {
+       pname = "classy-prelude-conduit";
+       version = "1.2.0";
+       sha256 = "24090dd042cd74d2663a5870482a60746b9096754f598b5171b800511230ec7f";
+       libraryHaskellDepends = [
+         base bytestring classy-prelude conduit conduit-combinators
+         monad-control resourcet transformers void
+       ];
+       testHaskellDepends = [
+         base bytestring conduit hspec QuickCheck transformers
+       ];
+       homepage = "https://github.com/snoyberg/mono-traversable";
+       description = "classy-prelude together with conduit functions";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "classy-prelude-yesod" = callPackage
     ({ mkDerivation, aeson, base, classy-prelude
      , classy-prelude-conduit, data-default, http-conduit, http-types
@@ -41778,15 +41882,15 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "classy-prelude-yesod_1_1_0" = callPackage
+  "classy-prelude-yesod_1_2_0" = callPackage
     ({ mkDerivation, aeson, base, classy-prelude
      , classy-prelude-conduit, data-default, http-conduit, http-types
      , persistent, yesod, yesod-newsfeed, yesod-static
      }:
      mkDerivation {
        pname = "classy-prelude-yesod";
-       version = "1.1.0";
-       sha256 = "2b7672093e16850dba4c118c56d8626d8049e3c29b163c8389619bfc265f5b58";
+       version = "1.2.0";
+       sha256 = "01cfe84ab5de0b803dc68a2bee5f5bfa4b9daf948974113ef9af9dd99c003fd5";
        libraryHaskellDepends = [
          aeson base classy-prelude classy-prelude-conduit data-default
          http-conduit http-types persistent yesod yesod-newsfeed
@@ -42281,6 +42385,22 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "clif" = callPackage
+    ({ mkDerivation, base, containers, QuickCheck, tasty
+     , tasty-quickcheck, tasty-th
+     }:
+     mkDerivation {
+       pname = "clif";
+       version = "0.1.0.0";
+       sha256 = "5c39d33787674c4452fab56f8166920525254e0dd095bdd64e3e51a97285d9c6";
+       libraryHaskellDepends = [ base containers QuickCheck ];
+       testHaskellDepends = [
+         base containers QuickCheck tasty tasty-quickcheck tasty-th
+       ];
+       description = "A Clifford algebra number type for Haskell";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
   "clifford" = callPackage
     ({ mkDerivation, base, cereal, Chart, Chart-cairo, colour, converge
      , criterion, data-default-class, data-ordlist, deepseq, derive
@@ -43807,17 +43927,18 @@ self: {
 
   "commodities" = callPackage
     ({ mkDerivation, base, comonad, containers, directory, distributive
-     , doctest, filepath, hspec, hspec-expectations, keys, lens, linear
-     , mtl, numbers, PSQueue, QuickCheck, semigroupoids, semigroups
-     , text, thyme, transformers
+     , doctest, failure, filepath, hspec, hspec-expectations, keys, lens
+     , linear, mtl, numbers, parsers, PSQueue, QuickCheck, semigroupoids
+     , semigroups, split, text, thyme, transformers, trifecta
      }:
      mkDerivation {
        pname = "commodities";
-       version = "0.2.0";
-       sha256 = "093df899954134b657ac338384342f64a4f71dbe9841cef2ec138fc5cfddc275";
+       version = "0.2.0.1";
+       sha256 = "fa58f2c3c5acf6f14d0079d8cd2d944c6e35c4bd12c128904021094e8c059130";
        libraryHaskellDepends = [
-         base comonad containers distributive keys lens linear mtl numbers
-         PSQueue semigroupoids semigroups text thyme transformers
+         base comonad containers distributive failure keys lens linear mtl
+         numbers parsers PSQueue semigroupoids semigroups split text thyme
+         transformers trifecta
        ];
        testHaskellDepends = [
          base containers directory doctest filepath hspec hspec-expectations
@@ -44996,6 +45117,35 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "conduit-combinators_1_1_0" = callPackage
+    ({ mkDerivation, base, base16-bytestring, base64-bytestring
+     , bytestring, chunked-data, conduit, conduit-extra, containers
+     , directory, filepath, hspec, monad-control, mono-traversable, mtl
+     , mwc-random, primitive, QuickCheck, resourcet, safe, silently
+     , text, transformers, transformers-base, unix, unix-compat, vector
+     , void
+     }:
+     mkDerivation {
+       pname = "conduit-combinators";
+       version = "1.1.0";
+       sha256 = "ff1f16f24e2c186ce5d61f079b318e2f58c4bc3a4a2c8d9011d001512786335a";
+       libraryHaskellDepends = [
+         base base16-bytestring base64-bytestring bytestring chunked-data
+         conduit conduit-extra filepath monad-control mono-traversable
+         mwc-random primitive resourcet text transformers transformers-base
+         unix unix-compat vector void
+       ];
+       testHaskellDepends = [
+         base base16-bytestring base64-bytestring bytestring chunked-data
+         conduit containers directory filepath hspec mono-traversable mtl
+         mwc-random QuickCheck safe silently text transformers vector
+       ];
+       homepage = "https://github.com/snoyberg/mono-traversable";
+       description = "Commonly used conduit functions, for both chunked and unchunked data";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "conduit-connection" = callPackage
     ({ mkDerivation, base, bytestring, conduit, connection, HUnit
      , network, resourcet, test-framework, test-framework-hunit
@@ -45578,8 +45728,8 @@ self: {
      }:
      mkDerivation {
        pname = "consistent";
-       version = "0.0.1";
-       sha256 = "a57d5872c68de93d5f2cf9aaa45c091559ed3877d26eab2b025fae6a60b57b00";
+       version = "0.1.0";
+       sha256 = "f8d983c3c3bc4f0928681c98dac459c18d4dbe64c575d260ac4576e8866a0833";
        libraryHaskellDepends = [
          base lifted-async lifted-base monad-control stm transformers
          transformers-base unordered-containers
@@ -47462,12 +47612,12 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "crackNum_1_8" = callPackage
+  "crackNum_1_9" = callPackage
     ({ mkDerivation, base, data-binary-ieee754, FloatingHex, ieee754 }:
      mkDerivation {
        pname = "crackNum";
-       version = "1.8";
-       sha256 = "26a592d71d6290c1acda8a8acc72f1e5e2be0461236ac9369ab4bc25647b3dc4";
+       version = "1.9";
+       sha256 = "a5a78b774e17837513b7c6048856c375457095898a59b7f3bbb7f49abb1639c5";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -47930,6 +48080,19 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "criu-rpc-types" = callPackage
+    ({ mkDerivation, base, proto-lens, proto-lens-protoc }:
+     mkDerivation {
+       pname = "criu-rpc-types";
+       version = "0.0.0.1";
+       sha256 = "eb5cbe012507a81ede156858b262f69270308592ba1faf097e00b90eff496aad";
+       setupHaskellDepends = [ base proto-lens-protoc ];
+       libraryHaskellDepends = [ base proto-lens proto-lens-protoc ];
+       homepage = "https://github.com/wayofthepie/haskell-criu-rpc-types";
+       description = "Criu RPC protocol buffer types";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
   "crockford" = callPackage
     ({ mkDerivation, base, digits, QuickCheck, safe }:
      mkDerivation {
@@ -53840,10 +54003,8 @@ self: {
      }:
      mkDerivation {
        pname = "dhall";
-       version = "1.0.1";
-       sha256 = "4bc7a6e0de32900ac64b58024ea989c3afaeab0f9a3e1256a04090eb6233b428";
-       revision = "1";
-       editedCabalFile = "a149e10771a65c573ffb2c9ed1c6694f11392590a36d60a9b1c48f02d0e9e77c";
+       version = "1.0.2";
+       sha256 = "75816f0ca8c8c4bd764cc5d55654656839e72179bd047491ad7f9b7826fda845";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -53857,6 +54018,26 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "dhall-nix" = callPackage
+    ({ mkDerivation, base, containers, data-fix, dhall, hnix
+     , neat-interpolation, optparse-generic, text, trifecta, vector
+     }:
+     mkDerivation {
+       pname = "dhall-nix";
+       version = "1.0.0";
+       sha256 = "a3331f9fd1fb35cbd9aa4690fe755e85d89a3f66f28430108dd4f29f3a994e4e";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         base containers data-fix dhall hnix neat-interpolation text vector
+       ];
+       executableHaskellDepends = [
+         base dhall hnix optparse-generic text trifecta
+       ];
+       description = "Dhall to Nix compiler";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "dia-base" = callPackage
     ({ mkDerivation, base, deepseq }:
      mkDerivation {
@@ -56963,6 +57144,35 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "doi" = callPackage
+    ({ mkDerivation, async, base, bibtex, directory, filepath
+     , haskeline, MissingH, optparse-applicative, parsec, process
+     , regex-base, regex-compat, regex-tdfa, safe, strict, tagsoup
+     , temporary, time, transformers, urlencoded, utility-ht
+     }:
+     mkDerivation {
+       pname = "doi";
+       version = "0.0.2";
+       sha256 = "202c7a5bf7b49077a287f6d73d55620684c3cbe8c6b0e30f66d333151bb259a5";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         async base bibtex directory filepath haskeline MissingH
+         optparse-applicative parsec process regex-base regex-compat
+         regex-tdfa safe strict tagsoup temporary time transformers
+         urlencoded utility-ht
+       ];
+       executableHaskellDepends = [
+         async base bibtex directory filepath haskeline MissingH
+         optparse-applicative parsec process regex-base regex-compat
+         regex-tdfa safe strict tagsoup temporary time transformers
+         urlencoded utility-ht
+       ];
+       homepage = "http://johannesgerer.com/doi";
+       description = "Automatic Bibtex and fulltext of scientific articles";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
   "dom-lt" = callPackage
     ({ mkDerivation, array, base, containers }:
      mkDerivation {
@@ -61357,8 +61567,8 @@ self: {
      }:
      mkDerivation {
        pname = "escape-artist";
-       version = "1.0.0";
-       sha256 = "50bd3a9b1e8773abff8d2a863c014978a74f3d4cd17a0c14cd8f4fdfb5740c7e";
+       version = "1.1.0";
+       sha256 = "e2ccea8bfb7e5d6d094b70a47b1449affcffc3e94044351b6a1addcaaad451fe";
        libraryHaskellDepends = [ base bytestring text ];
        testHaskellDepends = [
          base bytestring hspec QuickCheck silently text
@@ -61429,8 +61639,8 @@ self: {
      }:
      mkDerivation {
        pname = "esqueleto";
-       version = "2.5.0";
-       sha256 = "2cba54c813bb506024889b29ceb75079e31e4172dc79cfa1e48c84337e064fa2";
+       version = "2.5.1";
+       sha256 = "76a75c84c4b4e0d41b28d8f8e73cc746282f5e7e50cfb11fcc252286950c87d9";
        libraryHaskellDepends = [
          base blaze-html bytestring conduit monad-logger persistent
          resourcet tagged text transformers unordered-containers
@@ -61957,7 +62167,7 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "eventstore_0_14_0_0" = callPackage
+  "eventstore_0_14_0_1" = callPackage
     ({ mkDerivation, aeson, array, base, cereal, classy-prelude
      , connection, containers, dns, dotnet-timespan, http-client, mtl
      , protobuf, random, semigroups, stm, tasty, tasty-hunit, text, time
@@ -61965,8 +62175,8 @@ self: {
      }:
      mkDerivation {
        pname = "eventstore";
-       version = "0.14.0.0";
-       sha256 = "0855c29baa25f14da74804bd324a4e4fb4f51f7609df3d0c6fbb0ef09d81552d";
+       version = "0.14.0.1";
+       sha256 = "0daf1e7c51405053cbcb35ab53f8b1eaaa4e937b985c49762e9e6814f9b380d0";
        libraryHaskellDepends = [
          aeson array base cereal classy-prelude connection containers dns
          dotnet-timespan http-client mtl protobuf random semigroups stm time
@@ -64727,8 +64937,8 @@ self: {
      }:
      mkDerivation {
        pname = "filestore";
-       version = "0.6.2";
-       sha256 = "a545e54c70bd12b5a2dfd9a303784d7eccd1db6a074860263f40fd0dd092d3d7";
+       version = "0.6.3";
+       sha256 = "b1f3ea70bdecb17281c65b14c8f5c6c52e189a30ad102d87a8f9c2fe08d92d57";
        libraryHaskellDepends = [
          base bytestring containers Diff directory filepath old-locale
          parsec process split time utf8-string xml
@@ -66027,8 +66237,8 @@ self: {
      }:
      mkDerivation {
        pname = "fltkhs";
-       version = "0.5.0.2";
-       sha256 = "a8f848eb6d47d1ce3e6d102ec61137737371fb68a112155696629d53f81e2cab";
+       version = "0.5.0.3";
+       sha256 = "6c90ce6d51ebba82fc3148b6a60d0665f941be04f12328ace8ac69ad825bdeec";
        isLibrary = true;
        isExecutable = true;
        setupHaskellDepends = [ base Cabal ];
@@ -66270,6 +66480,24 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "fold-debounce_0_2_0_5" = callPackage
+    ({ mkDerivation, base, data-default-class, hspec, stm, stm-delay
+     , time
+     }:
+     mkDerivation {
+       pname = "fold-debounce";
+       version = "0.2.0.5";
+       sha256 = "78c0ff60d8a69193fbd298ece7a20351566c0a5a9adadfae96ff15e902fa594d";
+       libraryHaskellDepends = [
+         base data-default-class stm stm-delay time
+       ];
+       testHaskellDepends = [ base hspec stm time ];
+       homepage = "https://github.com/debug-ito/fold-debounce";
+       description = "Fold multiple events that happen in a given period of time";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "fold-debounce-conduit" = callPackage
     ({ mkDerivation, base, conduit, fold-debounce, hspec, resourcet
      , stm, transformers, transformers-base
@@ -66290,6 +66518,27 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "fold-debounce-conduit_0_1_0_5" = callPackage
+    ({ mkDerivation, base, conduit, fold-debounce, hspec, resourcet
+     , stm, transformers, transformers-base
+     }:
+     mkDerivation {
+       pname = "fold-debounce-conduit";
+       version = "0.1.0.5";
+       sha256 = "253e73bcf6e1cb281acce2c9e39b00b2419032e4f1e0234bd19a473d210f84cc";
+       libraryHaskellDepends = [
+         base conduit fold-debounce resourcet stm transformers
+         transformers-base
+       ];
+       testHaskellDepends = [
+         base conduit hspec resourcet stm transformers
+       ];
+       homepage = "https://github.com/debug-ito/fold-debounce-conduit";
+       description = "Regulate input traffic from conduit Source with Control.FoldDebounce";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "foldl" = callPackage
     ({ mkDerivation, base, bytestring, comonad, containers
      , contravariant, mwc-random, primitive, profunctors, text
@@ -67502,8 +67751,8 @@ self: {
      }:
      mkDerivation {
        pname = "free-vector-spaces";
-       version = "0.1.1.0";
-       sha256 = "fa4066b3cb1e6e58ca471e953154acaca9f978cfc81d3987552da79c4805f1b4";
+       version = "0.1.2.0";
+       sha256 = "68aed93d6e73e9d4e68fceb63e5b276b79558474d66cf44df34be667db1ba4ce";
        libraryHaskellDepends = [
          base lens linear MemoTrie vector vector-space
        ];
@@ -69122,8 +69371,8 @@ self: {
      }:
      mkDerivation {
        pname = "gegl";
-       version = "0.0.0.2";
-       sha256 = "475adb9ff07a1e8cc314e441c76e76e46919e842c77ec092b9ed8d7847549e95";
+       version = "0.0.0.4";
+       sha256 = "cd938dcc3042980669f01186cc4d0a52d03a5b8cf14553598ef6c04e0748f822";
        libraryHaskellDepends = [
          babl base containers glib inline-c monad-loops random split
          template-haskell
@@ -69859,8 +70108,8 @@ self: {
        pname = "genvalidity-hspec";
        version = "0.3.0.0";
        sha256 = "0d25376307b9bbbf8a7d438f0e9252e86f1f3227c356a2979f002ebb711d612d";
-       revision = "1";
-       editedCabalFile = "cd36781a3c2aa0a77ed801ae246560f8e04901bfae7cf88139fa68eb3c5e0e25";
+       revision = "2";
+       editedCabalFile = "dc8f7ce63cb185436f09ee5ff581a6b6430576a9e1053849321cd4d4ad653719";
        libraryHaskellDepends = [
          base genvalidity hspec QuickCheck validity
        ];
@@ -77725,17 +77974,19 @@ self: {
      }) {};
 
   "graflog" = callPackage
-    ({ mkDerivation, aeson, base, bytestring, hspec, mtl, test-fixture
-     , text, text-conversions
+    ({ mkDerivation, aeson, base, bytestring, containers, hspec, mtl
+     , test-fixture, text, text-conversions
      }:
      mkDerivation {
        pname = "graflog";
-       version = "1.0.0";
-       sha256 = "fcc205034be28055c3f6550e09a94bec4561530926151d7710001b53293c17c0";
+       version = "3.0.0";
+       sha256 = "4f1022278257fb078ba136050f4f919047bdc0f9a9a3e4d97b9cdcd2740feaf6";
        libraryHaskellDepends = [
-         aeson base bytestring text text-conversions
+         aeson base bytestring containers text text-conversions
+       ];
+       testHaskellDepends = [
+         aeson base containers hspec mtl test-fixture text
        ];
-       testHaskellDepends = [ base hspec mtl test-fixture ];
        homepage = "https://github.com/m-arnold/graflog#readme";
        description = "Monadic correlated log events";
        license = stdenv.lib.licenses.bsd3;
@@ -81590,8 +81841,8 @@ self: {
      }:
      mkDerivation {
        pname = "hakyll";
-       version = "4.9.3.0";
-       sha256 = "f15c6cd2118501fa6be44e3cb3d9f37a22fced0fd1ebd64236277e2daf622e7a";
+       version = "4.9.5.0";
+       sha256 = "47cb6b1859911f638a69ff7cc4fb3ca837be56c51a98b5ff98e43f638ac406d7";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -83749,8 +84000,8 @@ self: {
     ({ mkDerivation, base, bytestring, containers, split }:
      mkDerivation {
        pname = "hashids";
-       version = "1.0.2.2";
-       sha256 = "989d7d1f50738c664230629b3e43340c929d5995ab978837748a5cc22aaaf308";
+       version = "1.0.2.3";
+       sha256 = "ecd74235e8f729514214715b828bf479701aa4b777e4f104ea07534a30822534";
        libraryHaskellDepends = [ base bytestring containers split ];
        testHaskellDepends = [ base bytestring containers split ];
        homepage = "http://hashids.org/";
@@ -88585,8 +88836,8 @@ self: {
        pname = "heist";
        version = "1.0.1.0";
        sha256 = "fd4ff3c1bfc1473feb9e913a5cdecaf56bc9db022abc27a76768cb6345c68bcb";
-       revision = "3";
-       editedCabalFile = "35bff91163943a30b86f87edf1873568e88b12ebe70a66d3f5fc146c6af4d84f";
+       revision = "4";
+       editedCabalFile = "d6925d28dee1606c73a16d86ce362e5e6faace458e1dff1fded52c0deac590eb";
        libraryHaskellDepends = [
          aeson attoparsec base blaze-builder blaze-html bytestring
          containers directory directory-tree dlist filepath hashable
@@ -89339,8 +89590,8 @@ self: {
      }:
      mkDerivation {
        pname = "heterocephalus";
-       version = "1.0.2.3";
-       sha256 = "653de3568644936d8e011bb329efd763d3b9d9f03101b9cf6486c45532453046";
+       version = "1.0.3.0";
+       sha256 = "df5bece7cd4a03df21e82a195b030b59608b991b16b1d7771569d542bbb7ee0b";
        libraryHaskellDepends = [
          base blaze-html blaze-markup containers dlist parsec shakespeare
          template-haskell text
@@ -90345,10 +90596,8 @@ self: {
      }:
      mkDerivation {
        pname = "hierarchy";
-       version = "0.3.1";
-       sha256 = "4ff6dcb89691dbf20de993964ad32904508f5b6569af1e83eaaaf73a271c9c5f";
-       revision = "1";
-       editedCabalFile = "d5f57b7a5087193876ddccfb410a297bcc4d0babb0b7b8233a4bb591d6d0e5eb";
+       version = "0.3.1.2";
+       sha256 = "d0ac3d7099930278da265c1f4fd384e061636834243eb1cf935530bdf66d541d";
        libraryHaskellDepends = [
          base exceptions free mmorph monad-control mtl pipes semigroups
          transformers transformers-base transformers-compat
@@ -90380,6 +90629,26 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "hifi" = callPackage
+    ({ mkDerivation, base, directory, filepath, mustache, parsec
+     , process, text, unix
+     }:
+     mkDerivation {
+       pname = "hifi";
+       version = "0.1.0.0";
+       sha256 = "6afe6184c86e888a56452a1593830d8fb9514a74d943d9abec7fbc4164fe20de";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         base directory filepath mustache parsec process text unix
+       ];
+       executableHaskellDepends = [ base ];
+       testHaskellDepends = [ base ];
+       homepage = "https://gitlab.com/gonz/hifi";
+       description = "Initial project template from stack";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "highWaterMark" = callPackage
     ({ mkDerivation, base, ghc }:
      mkDerivation {
@@ -90903,20 +91172,20 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "hip_1_4_0_1" = callPackage
+  "hip_1_5_0_0" = callPackage
     ({ mkDerivation, base, bytestring, Chart, Chart-diagrams, colour
      , deepseq, directory, filepath, hspec, JuicyPixels, netpbm
      , primitive, process, QuickCheck, repa, temporary, vector
      }:
      mkDerivation {
        pname = "hip";
-       version = "1.4.0.1";
-       sha256 = "960a4f964e5a7e82e5948b05da5a0b17122b50afabea86f451475b0c58a9a4c0";
+       version = "1.5.0.0";
+       sha256 = "b8d04faecd4b6adaaa3b0625eef17f0658794ee6fcfa64c522104a0df30206b9";
        libraryHaskellDepends = [
          base bytestring Chart Chart-diagrams colour deepseq directory
          filepath JuicyPixels netpbm primitive process repa temporary vector
        ];
-       testHaskellDepends = [ base hspec QuickCheck ];
+       testHaskellDepends = [ base bytestring hspec QuickCheck ];
        homepage = "https://github.com/lehins/hip";
        description = "Haskell Image Processing (HIP) Library";
        license = stdenv.lib.licenses.bsd3;
@@ -91939,15 +92208,15 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "hlint_1_9_39" = callPackage
+  "hlint_1_9_40" = callPackage
     ({ mkDerivation, ansi-terminal, base, cmdargs, containers, cpphs
      , directory, extra, filepath, haskell-src-exts, hscolour, process
      , refact, transformers, uniplate
      }:
      mkDerivation {
        pname = "hlint";
-       version = "1.9.39";
-       sha256 = "66cffc12e38c0dfbbab61219381c0af6b41a48462a71e3810612ff2bbdc0b38f";
+       version = "1.9.40";
+       sha256 = "68ff63ac4686ac5b09ff71be811af57a2e640af49e3e606f389901b6388594a1";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -94939,6 +95208,27 @@ self: {
        hydraPlatforms = [ "x86_64-linux" ];
      }) {inherit (pkgs) ruby;};
 
+  "hruby_0_3_4_3" = callPackage
+    ({ mkDerivation, aeson, attoparsec, base, bytestring, QuickCheck
+     , ruby, scientific, stm, text, unordered-containers, vector
+     }:
+     mkDerivation {
+       pname = "hruby";
+       version = "0.3.4.3";
+       sha256 = "a1fe68e20ffeae12b12a0f156e58c020c4d2da85dcd773ae4350f7b79aacf9cc";
+       libraryHaskellDepends = [
+         aeson attoparsec base bytestring scientific stm text
+         unordered-containers vector
+       ];
+       librarySystemDepends = [ ruby ];
+       testHaskellDepends = [
+         aeson attoparsec base QuickCheck text vector
+       ];
+       description = "Embed a Ruby intepreter in your Haskell program !";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {inherit (pkgs) ruby;};
+
   "hs-GeoIP" = callPackage
     ({ mkDerivation, base, bytestring, deepseq, GeoIP }:
      mkDerivation {
@@ -96869,8 +97159,8 @@ self: {
     ({ mkDerivation, base, hslogger, mtl, template-haskell }:
      mkDerivation {
        pname = "hslogger-template";
-       version = "2.0.3";
-       sha256 = "b324e500ee3e05e653ff1ca427895195a53c56ee0c0bc1f2da5f7ad29f14afe0";
+       version = "2.0.4";
+       sha256 = "e8a251f7d50d1bd9a095062e9a8783f140b6f3a995e05257bccb0e36ccb7e7b9";
        libraryHaskellDepends = [ base hslogger mtl template-haskell ];
        description = "Automatic generation of hslogger functions";
        license = stdenv.lib.licenses.publicDomain;
@@ -97283,15 +97573,15 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
-  "hspec_2_3_2" = callPackage
+  "hspec_2_4_0" = callPackage
     ({ mkDerivation, base, call-stack, directory, hspec-core
      , hspec-discover, hspec-expectations, hspec-meta, HUnit, QuickCheck
      , stringbuilder, transformers
      }:
      mkDerivation {
        pname = "hspec";
-       version = "2.3.2";
-       sha256 = "e852f69cd585cc945c2a9aa191ae6f8894f2e7e10685d60bfed29b521f032fb4";
+       version = "2.4.0";
+       sha256 = "8c8119027bb7c6529bb513b53dca1b55d1df3b7c8f083de0c513d993594a873b";
        libraryHaskellDepends = [
          base call-stack hspec-core hspec-discover hspec-expectations HUnit
          QuickCheck transformers
@@ -97377,25 +97667,26 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
-  "hspec-core_2_3_2" = callPackage
-    ({ mkDerivation, ansi-terminal, async, base, call-stack, deepseq
-     , hspec-expectations, hspec-meta, HUnit, process, QuickCheck
-     , quickcheck-io, random, setenv, silently, tf-random, time
-     , transformers
+  "hspec-core_2_4_0" = callPackage
+    ({ mkDerivation, ansi-terminal, array, async, base, call-stack
+     , deepseq, directory, filepath, hspec-expectations, hspec-meta
+     , HUnit, process, QuickCheck, quickcheck-io, random, setenv
+     , silently, temporary, tf-random, time, transformers
      }:
      mkDerivation {
        pname = "hspec-core";
-       version = "2.3.2";
-       sha256 = "1c6d5d07475a4de72837b1739e0e94cfa2896e762af403d1978ee4df683541b9";
+       version = "2.4.0";
+       sha256 = "0703c133b0f85df86c9b0b9bf00fa9ef1c51ca914ac6aef8b15ec6b9db78c353";
        libraryHaskellDepends = [
-         ansi-terminal async base call-stack deepseq hspec-expectations
-         HUnit QuickCheck quickcheck-io random setenv tf-random time
-         transformers
+         ansi-terminal array async base call-stack deepseq directory
+         filepath hspec-expectations HUnit QuickCheck quickcheck-io random
+         setenv tf-random time transformers
        ];
        testHaskellDepends = [
-         ansi-terminal async base call-stack deepseq hspec-expectations
-         hspec-meta HUnit process QuickCheck quickcheck-io random setenv
-         silently tf-random time transformers
+         ansi-terminal array async base call-stack deepseq directory
+         filepath hspec-expectations hspec-meta HUnit process QuickCheck
+         quickcheck-io random setenv silently temporary tf-random time
+         transformers
        ];
        homepage = "http://hspec.github.io/";
        description = "A Testing Framework for Haskell";
@@ -97419,12 +97710,12 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
-  "hspec-discover_2_3_2" = callPackage
+  "hspec-discover_2_4_0" = callPackage
     ({ mkDerivation, base, directory, filepath, hspec-meta }:
      mkDerivation {
        pname = "hspec-discover";
-       version = "2.3.2";
-       sha256 = "fd36c9b91d417d0bb9041e0c2f148fa593dd752d4d62a8ca156fb3d8f88fe35f";
+       version = "2.4.0";
+       sha256 = "563d0b596cac68f5c0dcb8f361cd017bed32f817835e8c6b5858d1902e743bb3";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [ base directory filepath ];
@@ -98029,8 +98320,8 @@ self: {
     ({ mkDerivation, base, hspec, QuickCheckVariant }:
      mkDerivation {
        pname = "hspecVariant";
-       version = "0.1.0.0";
-       sha256 = "2ca22b48d9535b9099a38df0d26dc7bd694632e5ba0b50791450fdf540912d0c";
+       version = "0.1.0.1";
+       sha256 = "d54fcc1e543c718732088e6579401cba5b62e01f1b9021429e958e3e2ba2866e";
        libraryHaskellDepends = [ base hspec QuickCheckVariant ];
        homepage = "https://github.com/sanjorgek/hspecVariant";
        description = "Spec for testing properties for variant types";
@@ -98043,8 +98334,8 @@ self: {
      }:
      mkDerivation {
        pname = "hspkcs11";
-       version = "0.2";
-       sha256 = "c66b9527f152d5ed29d5de18883905863a3b87fa177514ad0728cb56ae172f98";
+       version = "0.3";
+       sha256 = "c95ba5b7a560b0e1d2b1e11fec7dca72a253232ba9def3081b2313c8b103f7b1";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -98055,6 +98346,7 @@ self: {
          base bytestring cipher-aes cprng-aes crypto-api RSA testpack unix
          utf8-string
        ];
+       executableToolDepends = [ c2hs ];
        homepage = "https://github.com/denisenkom/hspkcs11";
        description = "Wrapper for PKCS #11 interface";
        license = stdenv.lib.licenses.mit;
@@ -98834,8 +99126,8 @@ self: {
     ({ mkDerivation, base, bytestring, com_err, mtl, time, zephyr }:
      mkDerivation {
        pname = "hszephyr";
-       version = "0.1";
-       sha256 = "593b213b298bdda179bd97b013e4e7ad52ddab1ae9f18c7595710bdc58ccff51";
+       version = "0.2";
+       sha256 = "9175c7cdae7e37f86cd28b38c213b00c458b789758bb675e2012c2b68e91f418";
        libraryHaskellDepends = [ base bytestring mtl time ];
        librarySystemDepends = [ com_err zephyr ];
        description = "Simple libzephyr bindings";
@@ -105061,12 +105353,14 @@ self: {
        pname = "integer-logarithms";
        version = "1";
        sha256 = "9a34b7a9ea6cf0e760159913f41305f786fd027efce3c4e4fe700c2a46cf103c";
+       revision = "2";
+       editedCabalFile = "ee7f145ff4250ef4babd7e0b679b1a26c79da0897da2453cc12281a78f992a04";
        libraryHaskellDepends = [ array base ghc-prim integer-gmp ];
        testHaskellDepends = [
          base QuickCheck smallcheck tasty tasty-hunit tasty-quickcheck
          tasty-smallcheck
        ];
-       homepage = "https://github.com/phadej/integer-logarithms";
+       homepage = "https://github.com/Bodigrim/integer-logarithms";
        description = "Integer logarithms";
        license = stdenv.lib.licenses.mit;
        hydraPlatforms = stdenv.lib.platforms.none;
@@ -105454,8 +105748,8 @@ self: {
      }:
      mkDerivation {
        pname = "intro";
-       version = "0.1.0.4";
-       sha256 = "a8475b8a72bbd9ef8b712defc8206c3eac6dbb3917d52a57e4175b363acf1f84";
+       version = "0.1.0.5";
+       sha256 = "0803d38f425d8f338d7ce5ae5e0755b59f39ae54a7ccc44a381a2840f3d48cb0";
        libraryHaskellDepends = [
          base bifunctors binary bytestring containers deepseq dlist extra
          hashable mtl safe string-conversions tagged text transformers
@@ -110229,7 +110523,7 @@ self: {
      }) {};
 
   "keysafe" = callPackage
-    ({ mkDerivation, aeson, argon2, async, base, binary, bloomfilter
+    ({ mkDerivation, aeson, argon2, async, base, bloomfilter
      , bytestring, containers, deepseq, directory, disk-free-space
      , exceptions, fast-logger, filepath, http-client, lifted-base
      , MonadRandom, network, optparse-applicative, process, raaz, random
@@ -110240,20 +110534,20 @@ self: {
      }:
      mkDerivation {
        pname = "keysafe";
-       version = "0.20161107";
-       sha256 = "ded1fd52ede4c574a4dd85ff60296f0e1bfe9b248857ee83025247790a03dfe7";
+       version = "0.20170122";
+       sha256 = "39349c641898e77e340d171263a9b2d860089a4ae7a6068a563e8e6647a1fd7e";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
-         aeson argon2 async base binary bloomfilter bytestring containers
-         deepseq directory disk-free-space exceptions fast-logger filepath
+         aeson argon2 async base bloomfilter bytestring containers deepseq
+         directory disk-free-space exceptions fast-logger filepath
          http-client lifted-base MonadRandom network optparse-applicative
          process raaz random random-shuffle readline SafeSemaphore
          secret-sharing servant servant-client servant-server socks split
          stm text time token-bucket transformers unbounded-delays unix
          unix-compat utf8-string wai warp zxcvbn-c
        ];
-       homepage = "https://joeyh.name/code/keysafe/";
+       homepage = "https://keysafe.branchable.com/";
        description = "back up a secret key securely to the cloud";
        license = stdenv.lib.licenses.agpl3;
        hydraPlatforms = stdenv.lib.platforms.none;
@@ -111625,8 +111919,8 @@ self: {
      }:
      mkDerivation {
        pname = "lambdacube-gl";
-       version = "0.5.2.0";
-       sha256 = "6552d8dc5aa3d1639155d42890934aeaa19afe6c5feafee041199ad98cfbd165";
+       version = "0.5.2.2";
+       sha256 = "9dda0c70df5caddee65ca89cabb4e7b169f413f7bf54cab15ec66b3df9154c5e";
        libraryHaskellDepends = [
          base bytestring containers JuicyPixels lambdacube-ir mtl OpenGLRaw
          vector vector-algorithms
@@ -113783,6 +114077,18 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "lens-family-th_0_4_1_0" = callPackage
+    ({ mkDerivation, base, template-haskell }:
+     mkDerivation {
+       pname = "lens-family-th";
+       version = "0.4.1.0";
+       sha256 = "084yng26xyhw6c6hij3p70zvjpvm1dlw6klphw51car9gi6dqkvm";
+       libraryHaskellDepends = [ base template-haskell ];
+       homepage = "http://github.com/DanBurton/lens-family-th#readme";
+       description = "Generate lens-family style lenses";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "lens-family-th" = callPackage
     ({ mkDerivation, base, template-haskell }:
      mkDerivation {
@@ -113976,8 +114282,8 @@ self: {
      }:
      mkDerivation {
        pname = "lentil";
-       version = "1.0.7.0";
-       sha256 = "582a1191b8ac60a4a50fa9361a48f0fe58686ab94db7dbc13bee07e57a20e615";
+       version = "1.0.8.0";
+       sha256 = "108af2057f56b74a8a42e8f1bbb47e7af64cff612bb90f886e93f6118651154e";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -118111,6 +118417,8 @@ self: {
        pname = "lrucaching";
        version = "0.3.1";
        sha256 = "2f287ea60d721f58474dc105dec953f98ce9a41dd1897647ef68a48605b132d6";
+       revision = "1";
+       editedCabalFile = "d6cfaad57c507189c9c63c24c96b551ce36f8bd035baceda4b9d187a98fef060";
        libraryHaskellDepends = [
          base base-compat deepseq hashable psqueues vector
        ];
@@ -119077,8 +119385,8 @@ self: {
      }:
      mkDerivation {
        pname = "madlang";
-       version = "0.1.0.2";
-       sha256 = "8ce44a28bff7b1c22554719aa94adb529482745a2ddc0efd5e06bff4f77ad53c";
+       version = "0.1.0.3";
+       sha256 = "da323b35826c891860b6d93a79cc4d83c53ab7d4f558fab23bc706ac8fb58d43";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -120750,6 +121058,8 @@ self: {
        pname = "mcm";
        version = "0.6.5.0";
        sha256 = "35dd7823314ff88d64fc533429a188f455c9dc3dc55abe12f37d791fbf22c5ed";
+       revision = "1";
+       editedCabalFile = "f80a81b16f1133ff0d7ba1468633a76ffb28dde2b1b2edf6f14718856886d0aa";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -124543,6 +124853,19 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "monadoid" = callPackage
+    ({ mkDerivation, base, monad-control, mtl, transformers-base }:
+     mkDerivation {
+       pname = "monadoid";
+       version = "0.0.2";
+       sha256 = "26c2e9fb0456dbec761c6d9723ad33cbb9fcd3a1318ff4197859d766e14ec877";
+       libraryHaskellDepends = [
+         base monad-control mtl transformers-base
+       ];
+       description = "A monoid for monads";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "monadplus" = callPackage
     ({ mkDerivation, base }:
      mkDerivation {
@@ -125130,6 +125453,18 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "more-extensible-effects" = callPackage
+    ({ mkDerivation, base }:
+     mkDerivation {
+       pname = "more-extensible-effects";
+       version = "0.1.0.0";
+       sha256 = "e7d3dfd5e6982f7a071acca3180d2968c621fb91b50fa44aaa64f22734b46357";
+       libraryHaskellDepends = [ base ];
+       homepage = "https://github.com/qzchenwl/more-extensible-effects#readme";
+       description = "Initial project template from stack";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "morfette" = callPackage
     ({ mkDerivation, array, base, binary, bytestring, containers
      , directory, filepath, mtl, pretty, QuickCheck, text, utf8-string
@@ -130205,6 +130540,18 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "non-empty-zipper" = callPackage
+    ({ mkDerivation, base, checkers, QuickCheck }:
+     mkDerivation {
+       pname = "non-empty-zipper";
+       version = "0.1.0.5";
+       sha256 = "196e30fd12ce74458a62b8b61ea7c1f6cec4d5999f465d2ccb11b394c3ed77b4";
+       libraryHaskellDepends = [ base ];
+       testHaskellDepends = [ base checkers QuickCheck ];
+       description = "The Zipper for NonEmpty";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "non-negative" = callPackage
     ({ mkDerivation, base, QuickCheck, utility-ht }:
      mkDerivation {
@@ -131829,15 +132176,16 @@ self: {
      }) {};
 
   "one-liner" = callPackage
-    ({ mkDerivation, base, contravariant, ghc-prim, profunctors
-     , transformers
+    ({ mkDerivation, base, bifunctors, contravariant, ghc-prim
+     , profunctors, tagged, transformers
      }:
      mkDerivation {
        pname = "one-liner";
-       version = "0.6";
-       sha256 = "40b4ed5de04d7f32a1297c33eedc971abd0652c156cfb89172fbeccdeda1e17f";
+       version = "0.7";
+       sha256 = "2ea06f985f3755c870b2cdcd9b7ab0d541b51e1687507acccd833eb2de258ab4";
        libraryHaskellDepends = [
-         base contravariant ghc-prim profunctors transformers
+         base bifunctors contravariant ghc-prim profunctors tagged
+         transformers
        ];
        homepage = "https://github.com/sjoerdvisscher/one-liner";
        description = "Constraint-based generics";
@@ -134349,15 +134697,15 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "pandoc-types_1_17_0_5" = callPackage
+  "pandoc-types_1_19" = callPackage
     ({ mkDerivation, aeson, base, bytestring, containers, deepseq
      , ghc-prim, HUnit, QuickCheck, string-qq, syb, test-framework
      , test-framework-hunit, test-framework-quickcheck2
      }:
      mkDerivation {
        pname = "pandoc-types";
-       version = "1.17.0.5";
-       sha256 = "c8825588b587ff5ed0c105156a11a43f3b752279997231cfc13102809bbc51b3";
+       version = "1.19";
+       sha256 = "2bdd244a1a8fda8d3da07b7e0ffbfe54d7808709bb35825963177b112d4dcccf";
        libraryHaskellDepends = [
          aeson base bytestring containers deepseq ghc-prim QuickCheck syb
        ];
@@ -135757,8 +136105,8 @@ self: {
      }:
      mkDerivation {
        pname = "patat";
-       version = "0.4.7.0";
-       sha256 = "f0e1dafb87d6a09c9cc3dae0dfab740c7b387327c913e2512a4aae9feb5d4f3c";
+       version = "0.4.7.1";
+       sha256 = "9e05e5510afd0b2c031e6115ee68749d0075c7357d536c67e34e60f1ea71da13";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -138251,7 +138599,7 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
-  "pinboard_0_9_12_3" = callPackage
+  "pinboard_0_9_12_4" = callPackage
     ({ mkDerivation, aeson, base, bytestring, containers, hspec
      , http-client, http-client-tls, http-types, monad-logger, mtl
      , network, profunctors, QuickCheck, random, safe-exceptions
@@ -138260,8 +138608,8 @@ self: {
      }:
      mkDerivation {
        pname = "pinboard";
-       version = "0.9.12.3";
-       sha256 = "b38931a4cd32bc6a43862c38116779af76c0b5b5eb6f117ba6b60ef3f717324b";
+       version = "0.9.12.4";
+       sha256 = "a64c3dab19bedbe341406a0897a323d9f7830f384856f01a8d0a2cf5ae591e99";
        libraryHaskellDepends = [
          aeson base bytestring containers http-client http-client-tls
          http-types monad-logger mtl network profunctors random
@@ -138814,10 +139162,8 @@ self: {
      }:
      mkDerivation {
        pname = "pipes-files";
-       version = "0.1.1";
-       sha256 = "a895f464790996ca19195fe605040520660087a36e8c6316fe6647bc23d516aa";
-       revision = "1";
-       editedCabalFile = "5ac3b0b50d526ba7e9018a8870d0df0e981c0365d1a0650bc84959dd1a80da83";
+       version = "0.1.2";
+       sha256 = "7c76760998925020f912d0da9f67938bfdb96858b63771bd5c2696b0de1a4531";
        libraryHaskellDepends = [
          attoparsec base bytestring directory exceptions filepath free
          hierarchy mmorph monad-control mtl pipes pipes-safe posix-paths
@@ -138886,10 +139232,8 @@ self: {
     ({ mkDerivation, base, containers, heaps, pipes }:
      mkDerivation {
        pname = "pipes-interleave";
-       version = "1.1.0";
-       sha256 = "bd083ec1cc9f35ee393763b18581835d8124b358480ae91c6473308af642d8c4";
-       revision = "1";
-       editedCabalFile = "d198f42613a501edcdd6f66ad1991b0ba0a2de01453b001e95b0627f87a5853c";
+       version = "1.1.1";
+       sha256 = "2758429d9da110fcd8037d2db301813c5635c28e89c01e91c709663d090aef50";
        libraryHaskellDepends = [ base containers heaps pipes ];
        homepage = "http://github.com/bgamari/pipes-interleave";
        description = "Interleave and merge streams of elements";
@@ -141445,6 +141789,26 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "postgresql-simple-url_0_2_0_0" = callPackage
+    ({ mkDerivation, base, network-uri, postgresql-simple, split, tasty
+     , tasty-quickcheck
+     }:
+     mkDerivation {
+       pname = "postgresql-simple-url";
+       version = "0.2.0.0";
+       sha256 = "f7d85afe7dd047c63aa56cc67e8d28e1d18f33baff8ee447adc5bec427b6ea4c";
+       libraryHaskellDepends = [
+         base network-uri postgresql-simple split
+       ];
+       testHaskellDepends = [
+         base postgresql-simple tasty tasty-quickcheck
+       ];
+       homepage = "https://github.com/futurice/postgresql-simple-url";
+       description = "Parse postgres:// url into ConnectInfo";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "postgresql-transactional" = callPackage
     ({ mkDerivation, base, monad-control, mtl, postgresql-simple }:
      mkDerivation {
@@ -142385,8 +142749,8 @@ self: {
      }:
      mkDerivation {
        pname = "pretty-simple";
-       version = "1.1.0.0";
-       sha256 = "ebb343d0a26d88c4700a2b60d5185b8444e879cc7ed60b79eec157b004325aa8";
+       version = "1.1.0.2";
+       sha256 = "0286520edbca9018b254b2a0a8839b03904c1da4919dfd19433bb9c7c7ada1a2";
        libraryHaskellDepends = [
          ansi-terminal base containers lens mono-traversable mtl parsec
          semigroups text transformers
@@ -147706,6 +148070,23 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "rbpcp-api" = callPackage
+    ({ mkDerivation, aeson, base, base16-bytestring, bytestring, cereal
+     , haskoin-core, servant, string-conversions, text
+     }:
+     mkDerivation {
+       pname = "rbpcp-api";
+       version = "0.1.0.0";
+       sha256 = "16290f21dc85b53a4738753a7c827584bfd2455d1e0f0d11f78c2520448afd06";
+       libraryHaskellDepends = [
+         aeson base base16-bytestring bytestring cereal haskoin-core servant
+         string-conversions text
+       ];
+       homepage = "http://paychandoc.runeks.me/";
+       description = "RESTful Bitcoin Payment Channel Protocol Servant API description";
+       license = "unknown";
+     }) {};
+
   "rbr" = callPackage
     ({ mkDerivation, base, bio, bytestring, containers }:
      mkDerivation {
@@ -150366,23 +150747,23 @@ self: {
      }) {};
 
   "remarks" = callPackage
-    ({ mkDerivation, base, directory, filepath, GenericPretty, pretty
-     , tasty, tasty-golden, tasty-hunit
+    ({ mkDerivation, base, containers, directory, filepath
+     , GenericPretty, pretty, tasty, tasty-golden, tasty-hunit
      }:
      mkDerivation {
        pname = "remarks";
-       version = "0.1.9";
-       sha256 = "fe76db6ef442c2b7cf234a909e359651ac7dddc9c603c78d49f2094805a1542b";
+       version = "0.1.11";
+       sha256 = "769f3e9bd64926a8bf00e76d60265baf02d69d3622a161f5e43e3b21a4f0e245";
        isLibrary = true;
        isExecutable = true;
-       libraryHaskellDepends = [ base GenericPretty pretty ];
+       libraryHaskellDepends = [ base containers GenericPretty pretty ];
        executableHaskellDepends = [
          base directory filepath GenericPretty
        ];
        testHaskellDepends = [
          base GenericPretty tasty tasty-golden tasty-hunit
        ];
-       homepage = "https://github.com/oleks/remarks#readme";
+       homepage = "https://github.com/DIKU-EDU/remarks#readme";
        description = "A DSL for marking student work";
        license = stdenv.lib.licenses.bsd3;
        hydraPlatforms = stdenv.lib.platforms.none;
@@ -153795,6 +154176,20 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "safe_0_3_11" = callPackage
+    ({ mkDerivation, base, deepseq, QuickCheck }:
+     mkDerivation {
+       pname = "safe";
+       version = "0.3.11";
+       sha256 = "6a58c8199a8c5ee7ca14077b69c2e876b29be51c797ec4b93de9c7ab3c7bd879";
+       libraryHaskellDepends = [ base ];
+       testHaskellDepends = [ base deepseq QuickCheck ];
+       homepage = "https://github.com/ndmitchell/safe#readme";
+       description = "Library of safe (exception free) functions";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "safe-access" = callPackage
     ({ mkDerivation, base, mtl, transformers }:
      mkDerivation {
@@ -155781,8 +156176,8 @@ self: {
      }:
      mkDerivation {
        pname = "scroll";
-       version = "1.20151219";
-       sha256 = "4f91c20e645ee715c9d3549fffffcc58943bee4fb3ba2e622e0189ccb70dd050";
+       version = "1.20170122";
+       sha256 = "89b5636f8ff2e540892a1b6fb96d3c1bb7b287c13f24c94c143e99afdca38b38";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -160437,8 +160832,8 @@ self: {
      }:
      mkDerivation {
        pname = "simple-conduit";
-       version = "0.5.1";
-       sha256 = "f997a94736b90abfd6abc08a56e59c02cd42ab549f35148c68ce40c11b03c7cb";
+       version = "0.6.0";
+       sha256 = "184446555a051992f1a7111af95e84c6cf4a89bdd97c68d354cf9100cb2414fe";
        libraryHaskellDepends = [
          base bifunctors bytestring chunked-data containers either
          exceptions filepath free lifted-async lifted-base mmorph
@@ -161621,8 +162016,8 @@ self: {
      }:
      mkDerivation {
        pname = "skylighting";
-       version = "0.1.1";
-       sha256 = "010c00a96fe61acb2650695633705a19ebda535822862887b94aadc31177945b";
+       version = "0.1.1.1";
+       sha256 = "27722ea3ac638ace239b241a27a6c66ea9ca1580d5eb97985ec766b88acc4775";
        libraryHaskellDepends = [
          aeson base blaze-html bytestring case-insensitive containers
          directory filepath hxt mtl regex-pcre-builtin safe text utf8-string
@@ -161702,8 +162097,8 @@ self: {
      }:
      mkDerivation {
        pname = "slack-api";
-       version = "0.10";
-       sha256 = "0b9b6688858b85d9c40a6cfd670658330671173ac309326936ff07c931afb452";
+       version = "0.11";
+       sha256 = "aa4c71bd6e877bca8d5e4cdb516c4049eb9068e287205985fd4305d78425d0c3";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -164096,10 +164491,8 @@ self: {
      }:
      mkDerivation {
        pname = "socket-unix";
-       version = "0.1.0.0";
-       sha256 = "34c71e014e728a4c5f31fbb55ac0d46f049969a8860e2b8629369f4d83429f2d";
-       revision = "1";
-       editedCabalFile = "082468d0b01112a99fffa76d7ff1bbe1b0ebbf878b3364fecec64a73fed094a3";
+       version = "0.1.1.0";
+       sha256 = "7541dd005761c6d08f8a87fe8157e1cfde128437c3bb3b9a72f3052f799ebd0f";
        libraryHaskellDepends = [ base bytestring socket ];
        testHaskellDepends = [
          async base bytestring socket tasty tasty-hunit unix
@@ -167732,6 +168125,20 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "stopwatch_0_1_0_4" = callPackage
+    ({ mkDerivation, base, clock, hspec, transformers }:
+     mkDerivation {
+       pname = "stopwatch";
+       version = "0.1.0.4";
+       sha256 = "b9f4c22f93359491c9fd20a0bd1ff9abd7e077aadfce1a213293e7e124b1b5c2";
+       libraryHaskellDepends = [ base clock transformers ];
+       testHaskellDepends = [ base clock hspec ];
+       homepage = "https://github.com/debug-ito/stopwatch";
+       description = "A simple stopwatch utility";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "storable" = callPackage
     ({ mkDerivation, base, mtl }:
      mkDerivation {
@@ -168310,6 +168717,29 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "streaming-commons_0_1_17" = callPackage
+    ({ mkDerivation, array, async, base, blaze-builder, bytestring
+     , deepseq, directory, hspec, network, process, QuickCheck, random
+     , stm, text, transformers, unix, zlib
+     }:
+     mkDerivation {
+       pname = "streaming-commons";
+       version = "0.1.17";
+       sha256 = "e50a38cb8b626ef2f031c195e22171ffce00e20cbe63e8c768887564a7f47da9";
+       libraryHaskellDepends = [
+         array async base blaze-builder bytestring directory network process
+         random stm text transformers unix zlib
+       ];
+       testHaskellDepends = [
+         array async base blaze-builder bytestring deepseq hspec network
+         QuickCheck text unix zlib
+       ];
+       homepage = "https://github.com/fpco/streaming-commons";
+       description = "Common lower-level functions needed by various streaming data libraries";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "streaming-eversion" = callPackage
     ({ mkDerivation, base, doctest, foldl, microlens, pipes
      , pipes-bytestring, pipes-text, streaming, tasty, tasty-hunit
@@ -168373,8 +168803,8 @@ self: {
      }:
      mkDerivation {
        pname = "streaming-utils";
-       version = "0.1.4.6";
-       sha256 = "fe061b466b47b227b871c40bbb55a90a9425341de32690328ce04adeb2067e51";
+       version = "0.1.4.7";
+       sha256 = "d75d3baaf5afa5a020a8a48830779835112047c4da1b708cfb3901ac6c068d48";
        libraryHaskellDepends = [
          aeson attoparsec base bytestring http-client http-client-tls
          json-stream mtl network network-simple pipes resourcet streaming
@@ -169195,15 +169625,15 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "stylish-haskell_0_6_5_0" = callPackage
+  "stylish-haskell_0_7_1_0" = callPackage
     ({ mkDerivation, aeson, base, bytestring, containers, directory
      , filepath, haskell-src-exts, HUnit, mtl, optparse-applicative
      , strict, syb, test-framework, test-framework-hunit, yaml
      }:
      mkDerivation {
        pname = "stylish-haskell";
-       version = "0.6.5.0";
-       sha256 = "aeee182f8b6a9492eedd12a45cd9a4abb677e95e1789ddd8681e699f27a5ea78";
+       version = "0.7.1.0";
+       sha256 = "570a643ae6798995a43b0b357005e71c1529ed43ebafa2748fc97a236e0c01bc";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -170099,6 +170529,20 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "sxml" = callPackage
+    ({ mkDerivation, base, containers, polyparse, text, xml-types }:
+     mkDerivation {
+       pname = "sxml";
+       version = "0.1.0.0";
+       sha256 = "ab37bccc87b50d14060ae65d63d0f0ee9eca73962d414f7ae1002a286dd7bd8b";
+       libraryHaskellDepends = [
+         base containers polyparse text xml-types
+       ];
+       homepage = "http://blog.luigiscorner.com/";
+       description = "A SXML-parser";
+       license = stdenv.lib.licenses.publicDomain;
+     }) {};
+
   "syb" = callPackage
     ({ mkDerivation, base, containers, HUnit, mtl }:
      mkDerivation {
@@ -172201,6 +172645,27 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "tasty-auto" = callPackage
+    ({ mkDerivation, base, directory, filepath, tasty, tasty-hspec
+     , tasty-hunit, tasty-quickcheck, tasty-smallcheck
+     }:
+     mkDerivation {
+       pname = "tasty-auto";
+       version = "0.1.0.1";
+       sha256 = "ec858ac5f1890af16c7a98ae866231e15ee3f46c374245bd89a9168b52a7d109";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [ base directory filepath ];
+       executableHaskellDepends = [ base directory filepath ];
+       testHaskellDepends = [
+         base directory filepath tasty tasty-hspec tasty-hunit
+         tasty-quickcheck tasty-smallcheck
+       ];
+       homepage = "https://github.com/minad/tasty-auto#readme";
+       description = "Simple auto discovery for Tasty";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
   "tasty-dejafu" = callPackage
     ({ mkDerivation, base, dejafu, tagged, tasty }:
      mkDerivation {
@@ -172313,8 +172778,8 @@ self: {
        pname = "tasty-hspec";
        version = "1.1.3";
        sha256 = "3c597d948cad9c61355a56811533abbad130eb6e4068fd930ab5514c759bfe31";
-       revision = "1";
-       editedCabalFile = "01a77505da91de5d767129a556b345bf6b26265fa047a9f2b7cd8677adab1412";
+       revision = "2";
+       editedCabalFile = "16e03febf0d4bc7921878291345c6658518656d8c8420618e5d72d10143d93f4";
        libraryHaskellDepends = [
          base hspec hspec-core QuickCheck random tagged tasty
          tasty-quickcheck tasty-smallcheck
@@ -175667,12 +176132,11 @@ self: {
     ({ mkDerivation, atomic-primops, base, containers }:
      mkDerivation {
        pname = "thread-local-storage";
-       version = "0.1.0.4";
-       sha256 = "3e87f35f3cabfedbd39810f33b7b167832aac008f4f458a2b2411349506b8239";
-       revision = "1";
-       editedCabalFile = "3bba7e8933033aa92c2767ccee383d84cc36a791773aff56d51ea95ecf12d90f";
+       version = "0.1.1";
+       sha256 = "11a0dfa77abf3d39e33529975aade945b0a6720143b3b134fd9460b0889845ca";
        libraryHaskellDepends = [ base containers ];
-       testHaskellDepends = [ atomic-primops base containers ];
+       testHaskellDepends = [ atomic-primops base ];
+       homepage = "https://github.com/rrnewton/thread-local-storage";
        description = "Several options for thread-local-storage (TLS) in Haskell";
        license = stdenv.lib.licenses.bsd3;
      }) {};
@@ -176001,8 +176465,8 @@ self: {
      }:
      mkDerivation {
        pname = "tibetan-utils";
-       version = "0.1.0.2";
-       sha256 = "6afa74aaef0d2fa8ae42f840ab19100f747abc8ddef5e1ffd1186f0a0035182c";
+       version = "0.1.0.4";
+       sha256 = "64fe33564b370cb906fa877d5f130c25618800351c12bc6fb6fed77edd3af1ae";
        libraryHaskellDepends = [
          base composition either megaparsec text text-show
        ];
@@ -181340,18 +181804,16 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "unfoldable_0_9_1" = callPackage
-    ({ mkDerivation, base, containers, ghc-prim, QuickCheck, random
-     , transformers
+  "unfoldable_0_9_2" = callPackage
+    ({ mkDerivation, base, containers, ghc-prim, one-liner, QuickCheck
+     , random, transformers
      }:
      mkDerivation {
        pname = "unfoldable";
-       version = "0.9.1";
-       sha256 = "08e2565142d11f21242d631dfd78ad02da93fd6fa3e75af0df4c1024123db236";
-       revision = "1";
-       editedCabalFile = "6b047ce80f7c2eab1edef56df078b25bd86bcb496f1c8f9962758a229324ef7c";
+       version = "0.9.2";
+       sha256 = "9592ec5b6d021fe5c93bc2a047e4f9dddb4bc688bae546fb357e8cd4071b0e04";
        libraryHaskellDepends = [
-         base containers ghc-prim QuickCheck random transformers
+         base containers ghc-prim one-liner QuickCheck random transformers
        ];
        homepage = "https://github.com/sjoerdvisscher/unfoldable";
        description = "Class of data structures that can be unfolded";
@@ -181602,16 +182064,14 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "unicode-transforms_0_2_0" = callPackage
+  "unicode-transforms_0_2_1" = callPackage
     ({ mkDerivation, base, bitarray, bytestring, deepseq
      , getopt-generics, QuickCheck, split, text
      }:
      mkDerivation {
        pname = "unicode-transforms";
-       version = "0.2.0";
-       sha256 = "3b27ca1ae8f0a906fbbefe1de819a80a01933610a4657ef6383db2590fdecb0e";
-       revision = "1";
-       editedCabalFile = "33480d6bb76758c9016397d10769d6ebf2db4004391961ad6dff05610a67d380";
+       version = "0.2.1";
+       sha256 = "1d8baa0de3c58685aa1e476961f7f3765395ba257d79258c66e86b06a87f3abc";
        libraryHaskellDepends = [ base bitarray bytestring text ];
        testHaskellDepends = [
          base deepseq getopt-generics QuickCheck split text
@@ -182070,8 +182530,8 @@ self: {
      }:
      mkDerivation {
        pname = "universum";
-       version = "0.2";
-       sha256 = "e913282eb9952229d109544c1f4541d8fce503d6ab77e38dc50330423d91e665";
+       version = "0.2.1";
+       sha256 = "e5f8c58824cbf559fb3632ff5a00190870e254262a0f4db9dfde7bc2bc423d21";
        libraryHaskellDepends = [
          async base bytestring containers deepseq exceptions ghc-prim
          hashable microlens microlens-mtl mtl safe stm text text-format
@@ -184184,8 +184644,8 @@ self: {
      }:
      mkDerivation {
        pname = "vcsgui";
-       version = "0.2.1.1";
-       sha256 = "76fa0af1c68195097059ea05e3bf7337dd94590d5f6d10109b33a2def474176b";
+       version = "0.2.1.2";
+       sha256 = "e58fc0156b8badcb5ee74c81e2c75a1f3e4a047d3154f356ba833e1cb58dc5e1";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -185474,38 +185934,37 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "vty_5_14" = callPackage
+  "vty_5_15" = callPackage
     ({ mkDerivation, base, blaze-builder, bytestring, Cabal, containers
-     , data-default, deepseq, directory, filepath, hashable, HUnit
-     , microlens, microlens-mtl, microlens-th, mtl, parallel, parsec
-     , QuickCheck, quickcheck-assertions, random, smallcheck, stm
-     , string-qq, terminfo, test-framework, test-framework-hunit
+     , deepseq, directory, filepath, hashable, HUnit, microlens
+     , microlens-mtl, microlens-th, mtl, parallel, parsec, QuickCheck
+     , quickcheck-assertions, random, smallcheck, stm, string-qq
+     , terminfo, test-framework, test-framework-hunit
      , test-framework-smallcheck, text, transformers, unix, utf8-string
      , vector
      }:
      mkDerivation {
        pname = "vty";
-       version = "5.14";
-       sha256 = "6f96be6c79c55850f09589b940bfebcc774adddf8a8258af2235320893c53912";
+       version = "5.15";
+       sha256 = "03bf0fa5132c271248e0f721ad9fb3f5003dc93cff99776fcc7cb7920a85d7f7";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
-         base blaze-builder bytestring containers data-default deepseq
-         directory filepath hashable microlens microlens-mtl microlens-th
-         mtl parallel parsec stm terminfo text transformers unix utf8-string
-         vector
+         base blaze-builder bytestring containers deepseq directory filepath
+         hashable microlens microlens-mtl microlens-th mtl parallel parsec
+         stm terminfo text transformers unix utf8-string vector
        ];
        executableHaskellDepends = [
-         base containers data-default microlens microlens-mtl mtl
+         base containers microlens microlens-mtl mtl
        ];
        testHaskellDepends = [
-         base blaze-builder bytestring Cabal containers data-default deepseq
-         HUnit microlens microlens-mtl mtl QuickCheck quickcheck-assertions
-         random smallcheck stm string-qq terminfo test-framework
+         base blaze-builder bytestring Cabal containers deepseq HUnit
+         microlens microlens-mtl mtl QuickCheck quickcheck-assertions random
+         smallcheck stm string-qq terminfo test-framework
          test-framework-hunit test-framework-smallcheck text unix
          utf8-string vector
        ];
-       homepage = "https://github.com/coreyoconnor/vty";
+       homepage = "https://github.com/jtdaugherty/vty";
        description = "A simple terminal UI library";
        license = stdenv.lib.licenses.bsd3;
        hydraPlatforms = stdenv.lib.platforms.none;
@@ -185769,6 +186228,25 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "wai-cli" = callPackage
+    ({ mkDerivation, ansi-terminal, base, http-types, monads-tf
+     , network, options, socket-activation, stm, streaming-commons, unix
+     , wai, wai-extra, warp, warp-tls
+     }:
+     mkDerivation {
+       pname = "wai-cli";
+       version = "0.1.0";
+       sha256 = "220d8b3eb52e7b045844be37682f09823a9730115f33ea718717896f74673007";
+       libraryHaskellDepends = [
+         ansi-terminal base http-types monads-tf network options
+         socket-activation stm streaming-commons unix wai wai-extra warp
+         warp-tls
+       ];
+       homepage = "https://github.com/myfreeweb/wai-cli";
+       description = "Command line runner for Wai apps (using Warp) with TLS, CGI, socket activation & graceful shutdown";
+       license = stdenv.lib.licenses.publicDomain;
+     }) {};
+
   "wai-conduit" = callPackage
     ({ mkDerivation, base, blaze-builder, bytestring, conduit
      , http-types, transformers, wai
@@ -186013,8 +186491,8 @@ self: {
      }:
      mkDerivation {
        pname = "wai-handler-launch";
-       version = "3.0.2.1";
-       sha256 = "84a466837e6df61be9ae03f8c0241bee374a0493f24f4bdc2a1e5f38ab705864";
+       version = "3.0.2.2";
+       sha256 = "9c94c4da533ebcbbd28cf3dfbeb44a5e953dbf73b53cab0179f16931fa102908";
        libraryHaskellDepends = [
          async base blaze-builder bytestring http-types process
          streaming-commons transformers wai warp
@@ -188569,6 +189047,21 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "wide-word" = callPackage
+    ({ mkDerivation, base, bytestring, ghc-prim, hspec, QuickCheck }:
+     mkDerivation {
+       pname = "wide-word";
+       version = "0.1.0.0";
+       sha256 = "1a2a5926cbc65afa7bd7dee2ea776779c48d581e980dbc47dfb024391e0836c7";
+       revision = "1";
+       editedCabalFile = "9dad4dd0b247fd7649e70c4cd0a112b9ce1e231981f624653c7ab15fc5f26e5a";
+       libraryHaskellDepends = [ base bytestring ghc-prim ];
+       testHaskellDepends = [ base bytestring ghc-prim hspec QuickCheck ];
+       homepage = "https://github.com/erikd/wide-word";
+       description = "Data types for large but fixed width signed and unsigned integers";
+       license = stdenv.lib.licenses.bsd2;
+     }) {};
+
   "wigner-symbols" = callPackage
     ({ mkDerivation, base, bytestring, cryptonite }:
      mkDerivation {
@@ -188599,6 +189092,24 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "wikicfp-scraper_0_1_0_7" = callPackage
+    ({ mkDerivation, attoparsec, base, bytestring, filepath, hspec
+     , scalpel, text, time
+     }:
+     mkDerivation {
+       pname = "wikicfp-scraper";
+       version = "0.1.0.7";
+       sha256 = "1e76ab2361c54b4f68dbe9c099f1e36144b405927abd69e6ee09c2292f65c582";
+       libraryHaskellDepends = [
+         attoparsec base bytestring scalpel text time
+       ];
+       testHaskellDepends = [ base bytestring filepath hspec time ];
+       homepage = "https://github.com/debug-ito/wikicfp-scraper";
+       description = "Scrape WikiCFP web site";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "wikipedia4epub" = callPackage
     ({ mkDerivation, base, bytestring, directory, epub, filepath
      , haskell98, HTTP, network, regex-base, regex-posix, tagsoup, url
@@ -188626,8 +189137,8 @@ self: {
      }:
      mkDerivation {
        pname = "wild-bind";
-       version = "0.1.0.2";
-       sha256 = "472a0bec3129e8b0ea60170e0535e602030e1d68c39bfd405c71b246c5211522";
+       version = "0.1.0.3";
+       sha256 = "f2f5764b9b33aee30d87646a849e6db063fde2b92c8bce0e08ebb94b6b9f737f";
        libraryHaskellDepends = [ base containers text transformers ];
        testHaskellDepends = [
          base hspec microlens QuickCheck stm transformers
@@ -188676,8 +189187,8 @@ self: {
      }:
      mkDerivation {
        pname = "wild-bind-x11";
-       version = "0.1.0.4";
-       sha256 = "62b6ca3f4b6fdc19dae22126ff831b2633bf2d5e24c0c5bedc2757ea9a59e45a";
+       version = "0.1.0.5";
+       sha256 = "655f263a134e26a45b1001f7ea861743dbdbd30e69ea4808050c5d3178d557e1";
        libraryHaskellDepends = [
          base containers fold-debounce stm text transformers wild-bind X11
        ];
@@ -188804,21 +189315,20 @@ self: {
      }) {};
 
   "wiringPi" = callPackage
-    ({ mkDerivation, base, wiringPi }:
+    ({ mkDerivation, base }:
      mkDerivation {
        pname = "wiringPi";
-       version = "0.1.0.0";
-       sha256 = "b38a690d3c0e05c892a04f212dcf729f784fb6f05e4ecff2933cd969da04b23f";
+       version = "1.0";
+       sha256 = "78449f9f48bab82bf8e268e0b858171e7539d7b9a61dd92c75a9ea7c1a7523d0";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [ base ];
-       librarySystemDepends = [ wiringPi ];
        executableHaskellDepends = [ base ];
        homepage = "https://github.com/ppelleti/hs-wiringPi";
        description = "Access GPIO pins on Raspberry Pi via wiringPi library";
        license = stdenv.lib.licenses.bsd3;
        hydraPlatforms = stdenv.lib.platforms.none;
-     }) {wiringPi = null;};
+     }) {};
 
   "with-location" = callPackage
     ({ mkDerivation, base, hspec }:
@@ -191426,8 +191936,8 @@ self: {
        pname = "xmlhtml";
        version = "0.2.3.5";
        sha256 = "e333a1c7afd5068b60b143457fea7325a34408cc65b3ac55f5b342eb0274b06d";
-       revision = "2";
-       editedCabalFile = "7ef4b85552808a9169da9c650ece3b9994a6c6106185a92e73aad50c5e98e6f1";
+       revision = "3";
+       editedCabalFile = "4b5e2c334e6fdcab94095ca5fa805a2353690d3a616733cec0febf2ba2991880";
        libraryHaskellDepends = [
          base blaze-builder blaze-html blaze-markup bytestring containers
          parsec text unordered-containers
@@ -191710,6 +192220,26 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "xmonad-vanessa" = callPackage
+    ({ mkDerivation, base, containers, process, tibetan-utils, X11
+     , xmonad, xmonad-contrib, xmonad-extras
+     }:
+     mkDerivation {
+       pname = "xmonad-vanessa";
+       version = "0.1.0.1";
+       sha256 = "795192ea6b9510512dd0e7cb1959b6d070089e0fd5c6896218f17af893447290";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         base containers process tibetan-utils X11 xmonad xmonad-contrib
+         xmonad-extras
+       ];
+       executableHaskellDepends = [ base ];
+       homepage = "https://github.com/vmchale/xmonad-vanessa#readme";
+       description = "Custom xmonad, which uses stack and sets various defaults";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "xmonad-wallpaper" = callPackage
     ({ mkDerivation, base, magic, mtl, random, unix, xmonad }:
      mkDerivation {
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix
index c261668edd26..b7777d55667c 100644
--- a/pkgs/development/interpreters/php/default.nix
+++ b/pkgs/development/interpreters/php/default.nix
@@ -9,9 +9,10 @@ let
   generic =
     { version, sha256 }:
 
-    let php7 = lib.versionAtLeast version "7.0"; in
+    let php7 = lib.versionAtLeast version "7.0";
+        mysqlHeaders = mysql.lib.dev or mysql;
 
-    composableDerivation.composableDerivation {} (fixed: {
+    in composableDerivation.composableDerivation {} (fixed: {
 
       inherit version;
 
@@ -114,12 +115,12 @@ let
 
         mysql = {
           configureFlags = ["--with-mysql"];
-          buildInputs = [ mysql.lib.dev ];
+          buildInputs = [ mysqlHeaders ];
         };
 
         mysqli = {
-          configureFlags = ["--with-mysqli=${mysql.lib.dev}/bin/mysql_config"];
-          buildInputs = [ mysql.lib.dev ];
+          configureFlags = ["--with-mysqli=${mysqlHeaders}/bin/mysql_config"];
+          buildInputs = [ mysqlHeaders ];
         };
 
         mysqli_embedded = {
@@ -129,8 +130,8 @@ let
         };
 
         pdo_mysql = {
-          configureFlags = ["--with-pdo-mysql=${mysql.lib.dev}"];
-          buildInputs = [ mysql.lib.dev ];
+          configureFlags = ["--with-pdo-mysql=${mysqlHeaders}"];
+          buildInputs = [ mysqlHeaders ];
         };
 
         bcmath = {
diff --git a/pkgs/development/libraries/cil-aterm/cil-aterm-1.3.6.patch b/pkgs/development/libraries/cil-aterm/cil-aterm-1.3.6.patch
deleted file mode 100644
index 97891652853e..000000000000
--- a/pkgs/development/libraries/cil-aterm/cil-aterm-1.3.6.patch
+++ /dev/null
@@ -1,600 +0,0 @@
-diff -urN cil-1.3.6-orig/bin/CilConfig.pm.in cil-1.3.6/bin/CilConfig.pm.in
---- cil-1.3.6-orig/bin/CilConfig.pm.in	2007-02-05 22:10:29.000000000 +0100
-+++ cil-1.3.6/bin/CilConfig.pm.in	2007-03-08 15:02:06.000000000 +0100
-@@ -1,6 +1,6 @@
- 
- $::archos    = "@ARCHOS@";
- $::cc        = "@CC@";
--$::cilhome   = "@CILHOME@";
-+$::cilhome   = "@prefix@";
- $::default_mode = "@DEFAULT_CIL_MODE@";
- 
-diff -urN cil-1.3.6-orig/Makefile.in cil-1.3.6/Makefile.in
---- cil-1.3.6-orig/Makefile.in	2007-02-05 22:10:29.000000000 +0100
-+++ cil-1.3.6/Makefile.in	2007-03-05 15:10:31.000000000 +0100
-@@ -85,6 +85,7 @@
-               cfg liveness reachingdefs deadcodeelim availexps \
-               availexpslv predabst\
-               testcil \
-+	      atermprinter \
- 	      $(CILLY_FEATURES) \
- 	      ciloptions feature_config
- # ww: we don't want "main" in an external cil library (cil.cma),
-@@ -626,6 +627,8 @@
- 
- prefix = @prefix@
- exec_prefix = @exec_prefix@
-+bindir = @prefix@/bin
-+objdir = @prefix@/$(OBJDIR)
- datarootdir = @datarootdir@
- libdir = @libdir@
- pkglibdir = $(libdir)/cil
-@@ -645,6 +648,11 @@
- 	$(INSTALL_DATA) $(install_lib) $(DESTDIR)$(pkglibdir)
- 	$(INSTALL) -d $(DESTDIR)$(pkgdatadir)
- 	$(INSTALL_DATA) $(addprefix lib/, $(filter %.pm, $(DISTRIB_LIB))) $(DESTDIR)$(pkgdatadir)
-+	$(INSTALL) -d $(bindir)
-+	$(INSTALL) -d $(objdir)
-+	$(INSTALL) bin/* $(bindir)
-+	$(INSTALL_DATA) lib/* $(bindir)
-+	$(INSTALL) $(OBJDIR)/*.exe $(objdir)
- 
- cil.spec: cil.spec.in
- 	./config.status $@
-diff -urN cil-1.3.6-orig/ocamlutil/Makefile.ocaml cil-1.3.6/ocamlutil/Makefile.ocaml
---- cil-1.3.6-orig/ocamlutil/Makefile.ocaml	2007-02-05 22:10:29.000000000 +0100
-+++ cil-1.3.6/ocamlutil/Makefile.ocaml	2007-03-05 15:14:01.000000000 +0100
-@@ -192,20 +192,10 @@
- #   $(AT)          - put this before shell commands which are to be executed,
- #                    and also printed in style 2
- #   $(ECHO)        - use in place of '@' for things not printed in either style
--ifdef ECHOSTYLE_SCOTT
--  # 'true' silently consumes its arguments, whereas 'echo' prints them
--  NARRATIVE   := true           
--  COMMAND     := echo
--  AT          := 
--  ECHO        := @
--else
--  NARRATIVE   := echo
--  COMMAND     := true
--  # change these next two definitions to <empty> to echo everything,
--  # or leave as @ to suppress echoing
--  AT          := @
--  ECHO        := @
--endif
-+NARRATIVE   := true           
-+COMMAND     := echo
-+AT          := 
-+ECHO        := @
- 
- ifdef PREPROC
-   COMPILEFLAGS += -pp "$(PREPROC)$"
-diff -urN cil-1.3.6-orig/src/ext/atermprinter.ml cil-1.3.6/src/ext/atermprinter.ml
---- cil-1.3.6-orig/src/ext/atermprinter.ml	1970-01-01 01:00:00.000000000 +0100
-+++ cil-1.3.6/src/ext/atermprinter.ml	2007-03-05 16:48:08.000000000 +0100
-@@ -0,0 +1,514 @@
-+open Cil
-+open Pretty
-+open List
-+open String
-+open Printf
-+module S = String 
-+module E = Errormsg
-+module H = Hashtbl
-+module IH = Inthash
-+
-+let outputfilename = ref "cil.aterm"
-+let trace p = eprintf "%s" (p ^ "\n") ; flush stderr
-+let invalidStmt = mkStmt (Instr [])
-+let id = fun x -> x 
-+let compose f g x = (f (g x))
-+let (@) = compose
-+let pSpace            = text " "
-+let foldl1 op ls      = match ls with
-+			| (x::xs) -> fold_left op x xs
-+                        | _       -> raise (Invalid_argument "foldl1 should not take an empty list")
-+let pPacked d l r     = l ++ d ++ r
-+let pParens d         = pPacked d (text "(") (text ")")
-+let pBraced d         = pPacked d (text "{") (text "}")
-+let pSquared d        = pPacked d (text "[") (text "]")
-+let pSpaced d         = pPacked d pSpace pSpace
-+let pBool b           = (pSpaced @ text @ S.capitalize @ string_of_bool) b
-+let pInt64 i          = text (Int64.to_string i)
-+let pSeqSep sep xs    = match xs with
-+			| [] -> nil
-+                        | _  -> foldl1 (pPacked sep) xs
-+let pCommaSep xs      = pSeqSep (text ",") xs
-+let pPair (a,b)       = (pSpaced @ pParens @ pCommaSep) [a;b]
-+let pTriplet (a,b,c)  = (pSpaced @ pParens @ pCommaSep) [a;b;c]
-+let pSemiColSep xs    = pSeqSep (text ";") xs
-+let pTriple f g h (a,b,c) = (f a, g b, h c)
-+let pDouble f g (a,b) = (f a, g b)
-+let pOption p m  = match m with
-+	         | None   -> text "None()"
-+                 | Some v -> text "Some" ++ pParens( p v )
-+let pSpParens = pSpaced @ pParens
-+let pQuoted str = pPacked (text(escaped str)) (text "\"") (text "\"")
-+let pList   = pSpaced @ pSquared @ pCommaSep
-+let pRecord = pSpaced @ pBraced  @ pCommaSep
-+
-+class atermPrinter : cilPrinter  = 
-+object (self)
-+  inherit defaultCilPrinterClass
-+
-+  (* printing variable declarations; just store the varinfo *)
-+  method pVDecl () (vinfo:varinfo) : doc = if !E.verboseFlag then trace "pVDecl"
-+                                         ; self#pp_varinfo vinfo
-+  (* printing variable uses; same as declarations; store the varinfo *)
-+  method pVar (vinfo:varinfo) : doc = if !E.verboseFlag then trace "pVar" ;
-+    self#pp_varinfo vinfo
-+
-+  method pLval () ((lh, off):lval) : doc = if !E.verboseFlag then trace "pLvalue" ;
-+    text "Lvalue" ++ (pParens @ pCommaSep) [ self#pp_lhost lh ; self#pOffset nil off ] 
-+
-+  (** we are not using the first argument which represents the base from which we are
-+      offsetting, because we just want to generate a tree view of the CIL tree. For a tree view
-+      this base case is not necessary **)
-+  method pOffset (d:doc) (o:offset) : doc = if !E.verboseFlag then trace "pOffset" ;
-+    match o with
-+    | NoOffset           -> text "Offset_NoOffset() "
-+    | Field (finfo, off) -> text "Offset_Field" ++ (pParens @ pCommaSep) [ (self#pFieldDecl ()) finfo ; self#pOffset nil off ]
-+    | Index (e, off)     -> text "Offset_Index" ++ (pParens @ pCommaSep) [ self#pExp () e ; self#pOffset nil off ]
-+  
-+  (*** INSTRUCTIONS ***)
-+  method pInstr () (i:instr) : doc = if !E.verboseFlag then trace "pInstr" ;
-+    match i with
-+    | Set (lv,e,l) -> text "Set" ++ (pParens @ pCommaSep) [ 
-+	self#pLval () lv ;
-+	self#pExp () e ;
-+	self#pp_location l ]
-+    | Call (olv,e, elst, l) -> text "Call" ++ (pParens @ pCommaSep) [
-+	pOption (self#pLval ()) olv ;
-+	self#pExp () e ;
-+	pList (map (self#pExp ()) elst) ;
-+	self#pp_location l]
-+    | Asm (attr, slst1, outs, ins, slst2, l) -> text "Asm" ++ (pParens @ pCommaSep) [
-+	self#pAttrs () attr ;
-+	(pList  @ map pQuoted) slst1 ;
-+	(pList   @ ( map ( pTriplet 
-+	              @ (pTriple (pOption (pQuoted)) (pQuoted) (self#pLval ()))
-+		        ) 
-+		  ) ) outs ;
-+	(pList   @ ( map ( pTriplet 
-+	              @ (pTriple (pOption (pQuoted)) (pQuoted) (self#pExp ()))
-+		        ) 
-+		  ) ) ins ;
-+	(pList  @ map pQuoted) slst2 ;
-+	self#pp_location l]
-+
-+	
-+
-+  (* a statement itself is just a record of info about the statement
-+     the different kinds of statements can be found at pStmtKind *) 
-+  method pStmt () (s:stmt) : doc = if !E.verboseFlag then trace "pStmt" ;
-+    self#pp_stmtinfo s
-+  method dStmt (out:out_channel) (i:int) (s:stmt) : unit = fprint out i (self#pStmt () s)
-+
-+  (* a block is just a record of info about the block of interest.
-+     the real block is a stmtkind (see pStmtKind) *)
-+  method dBlock (out:out_channel) (i:int) (b:block) : unit = fprint out i (self#pBlock () b)
-+  method pBlock () (b:block) : doc = if !E.verboseFlag then trace "pBlock" ;
-+    self#pp_blockinfo b
-+
-+  (*** GLOBALS ***)
-+  method pGlobal () (g:global) : doc = if !E.verboseFlag then trace "pGlobal" ;      (* global (vars, types, etc.) *)
-+    match g with 
-+    | GType        (typ , l) -> text "GlobalType" ++ (pParens @ pCommaSep) [ self#pp_typeinfo typ ; self#pp_location l ]
-+    | GCompTag     (comp, l) -> text "GlobalCompTag" ++ (pParens @ pCommaSep) [ self#pp_compinfo comp ; self#pp_location l ]
-+    | GCompTagDecl (comp, l) -> text "GlobalCompTagDecl" ++ (pParens @ pCommaSep) [ self#pp_compinfo comp ; self#pp_location l ]
-+    | GEnumTag     (enum, l) -> text "GlobalEnumTag" ++ (pParens @ pCommaSep) [ self#pp_enuminfo enum ; self#pp_location l ]
-+    | GEnumTagDecl (enum, l) -> text "GlobalEnumTagDecl" ++ (pParens @ pCommaSep) [ self#pp_enuminfo enum ; self#pp_location l ]
-+    | GVarDecl     (vinf, l) -> text "GlobalVarDecl" ++ (pParens @ pCommaSep) [ self#pp_varinfo vinf ; self#pp_location l ]
-+    | GVar   (vinf, iinf, l) -> text "GlobalVar" ++ (pParens @ pCommaSep) [ self#pp_varinfo vinf ; self#pp_initinfo iinf ; self#pp_location l ]
-+    | GFun         (fdec, l) -> text "GlobalFun" ++ (pParens @ pCommaSep) [ self#pp_fundec fdec ; self#pp_location l ]
-+    | GAsm         (str , l) -> text "GlobalAsm"  ++ (pParens @ pCommaSep) [ pQuoted str ; self#pp_location l ]
-+    | GPragma      (attr, l) -> text "GlobalPragma" ++ (pParens @ pCommaSep) [ (fun (doc1, bool1) -> doc1) (self#pAttr attr)
-+                                                        ; self#pp_location l
-+                                        ]
-+    | GText str -> text "GlobalText" ++ pParens( pQuoted str)
-+  method dGlobal (out:out_channel) (g:global) : unit = fprint out 80 (self#pGlobal () g)
-+
-+  (* a fielddecl is just a record containing info about the decl *)
-+  method pFieldDecl () : fieldinfo -> doc = if !E.verboseFlag then trace "pFieldDecl" ;
-+    self#pp_fieldinfo
-+
-+  (*** TYPES ***)
-+  method pType (nameOpt: doc option) (* Whether we are declaring a name or 
-+                                      * we are just printing a type *)
-+               () (t:typ) =  if !E.verboseFlag then trace "pType" ;     (* use of some type *)
-+    match t with
-+    | TVoid  attr         -> text "TVoid" ++ pParens( self#pAttrs () attr)
-+    | TInt   (ikin, attr) -> text "TInt" ++ (pParens @ pCommaSep) [ self#pp_ikind ikin ; self#pAttrs () attr ]
-+    | TFloat (fkin, attr) -> text "TFloat" ++ (pParens @ pCommaSep) [ self#pp_fkind fkin ; self#pAttrs () attr ]
-+    | TPtr   (t   , attr) -> text "TPtr" ++ (pParens @ pCommaSep) [ self#pType None () t ; self#pAttrs () attr ]
-+    | TArray (t, e, attr) -> text "TArray" ++ (pParens @ pCommaSep) [ self#pType None () t ;
-+	pOption (self#pExp ()) e ; self#pAttrs () attr ]
-+    | TFun (t, olst, b, attr) -> text "TFun" ++ (pParens @ pCommaSep) [ 
-+        self#pType None () t ;
-+	pOption (pList @ (map ( pTriplet
-+                              @ (pTriple (pQuoted) (self#pType None ()) (self#pAttrs ()))
-+                              )     
-+                         )
-+                )
-+                olst ;
-+	pBool b ;
-+	self#pAttrs () attr]
-+    | TNamed (tinfo, attr) -> text "TNamed" ++ (pParens @ pCommaSep) [ self#pp_typeinfo tinfo ; self#pAttrs () attr ]
-+    | TComp  (cinfo, attr) -> text "TComp" ++ (pParens @ pCommaSep) [ (text @ string_of_int) cinfo.ckey ;
-+                                                           self#pAttrs () attr]
-+    | TEnum  (einfo, attr) -> text "TEnum" ++ (pParens @ pCommaSep) [ self#pp_enuminfo einfo ; self#pAttrs () attr ]
-+    | TBuiltin_va_list (attr) -> text "TBuiltin_va_list" ++ pParens( self#pAttrs () attr)
-+  
-+  (*** ATTRIBUTES ***)
-+  method pAttr (Attr(an, args) : attribute) : (doc * bool) = if !E.verboseFlag then trace "pAttr" ;
-+    ( text "Attr" ++ (pParens @ pCommaSep) [ pQuoted an ; pList (map (self#pAttrParam ()) args) ]
-+    , false
-+    )
-+
-+  method pAttrParam () (p:attrparam) : doc = if !E.verboseFlag then trace "pAttrParam" ;
-+    match p with
-+    | AInt      (i)               -> text "AInt" ++ pParens( pQuoted (string_of_int i))
-+    | AStr      (s)               -> text "AStr" ++ pParens( pQuoted s)
-+    | ACons     (s, args)         -> text "ACons" ++ (pParens @ pCommaSep) [ pQuoted s ; pList (map (self#pAttrParam ()) args) ]
-+    | ASizeOf   (t)               -> text "ASizeOf" ++ pParens( self#pType None () t)
-+    | ASizeOfE  (arg)             -> text "ASizeOfE" ++ pParens( self#pAttrParam () arg)
-+    | ASizeOfS  (tsig)            -> text "ASizeOfS" ++ pParens( self#pp_typsig tsig)
-+    | AAlignOf  (t)               -> text "AAlignOf" ++ pParens( self#pType None () t)
-+    | AAlignOfE (arg)             -> text "AAlignOfE" ++ pParens( self#pAttrParam () arg)
-+    | AAlignOfS (tsig)            -> text "AAlignOfS" ++ pParens( self#pp_typsig tsig)
-+    | AUnOp     (uop, arg)        -> text "AUnOp" ++ (pParens @ pCommaSep) [ self#pp_unop uop ; self#pAttrParam () arg ]
-+    | ABinOp    (bop, arg1, arg2) -> text "ABinOp" ++ (pParens @ pCommaSep) [ self#pp_binop bop 
-+                                                                ; self#pAttrParam () arg1
-+                                                                ; self#pAttrParam () arg2 ]
-+    | ADot      (arg, s)          -> text "ADot" ++ (pParens @ pCommaSep) [ self#pAttrParam () arg ; pQuoted s]
-+    | AStar     (a1)              -> text "AStar" ++ pParens( self#pAttrParam () a1 )
-+    | AAddrOf   (a1)              -> text "AAddrOf" ++ pParens( self#pAttrParam () a1 )
-+    | AIndex    (a1, a2)          -> text "AIndex" ++ (pParens @ pCommaSep) [ self#pAttrParam () a1 
-+                                                                            ; self#pAttrParam () a2 ]
-+    | AQuestion (a1, a2, a3)      -> text "AQuestion" ++ (pParens @ pCommaSep) [ self#pAttrParam () a1 
-+                                                                               ; self#pAttrParam () a2 
-+                                                                               ; self#pAttrParam () a3 ]
-+
-+  (*  | AStar a1 -> 
-+        text "(*" ++ (self#pAttrPrec derefStarLevel () a1) ++ text ")"
-+    | AAddrOf a1 -> text "& " ++ (self#pAttrPrec addrOfLevel () a1)
-+    | AIndex (a1, a2) -> self#pAttrParam () a1 ++ text "[" ++ 
-+                         self#pAttrParam () a2 ++ text "]"
-+    | AQuestion (a1, a2, a3) -> 
-+          self#pAttrParam () a1 ++ text " ? " ++
-+          self#pAttrParam () a2 ++ text " : " ++
-+          self#pAttrParam () a3 
-+*)
-+  method pAttrs () (attr:attributes) : doc = if !E.verboseFlag then trace "pAttrs" ;
-+    text "Attributes" ++ pParens( 
-+               pList (map (fst @ self#pAttr) attr)
-+              )
-+  
-+  (*** LABELS ***)
-+  method pLabel () (l:label) : doc = if !E.verboseFlag then trace "pLabel" ;
-+    match l with
-+    | Label   (s,l,b) -> text "Label" ++ (pParens @ pCommaSep) [
-+	pQuoted s ;
-+	self#pp_location l ;
-+	pBool b ]
-+    | Case    (e,l)   -> text "Case" ++ (pParens @ pCommaSep) [ 
-+	self#pExp () e ;
-+	self#pp_location l ]
-+    | Default (l)     -> text "Default" ++ pParens( self#pp_location l)
-+
-+  (*** printing out locations as line directives is not necessary
-+       because we are printing the tree structure and locations are
-+       present everywhere ***)
-+  method pLineDirective : ?forcefile:bool -> location -> doc = fun ?forcefile _ -> nil
-+
-+  (*** STATEMENT KINDS ***)
-+  method pStmtKind s () (sk:stmtkind) : doc = if !E.verboseFlag then trace "pStmtKind" ;
-+    match sk with
-+    | Instr      (ilst)          -> text "Instr" ++ pParens( pList (map (self#pInstr ()) ilst))
-+    | Return     (oe, l)         -> text "Return" ++ (pParens @ pCommaSep) [ pOption (self#pExp ()) oe ; self#pp_location l ]
-+    | Goto       (stmtref, l)    -> text "Goto" ++ (pParens @ pCommaSep) [ self#pStmt () !stmtref ; self#pp_location l ]
-+    | Break      (l)             -> text "Break" ++ pParens( self#pp_location l)
-+    | Continue   (l)             -> text "Continue" ++ pParens( self#pp_location l)
-+    | If         (e, b1, b2, l)  -> text "If" ++ (pParens @ pCommaSep) [ 
-+	self#pExp () e ;
-+	self#pBlock () b1 ;
-+	self#pBlock () b2 ;
-+	self#pp_location l ]
-+    | Switch     (e,b,stlst,l)   -> text "Switch" ++ (pParens @ pCommaSep) [ 
-+	self#pExp () e ;
-+	self#pBlock () b ;
-+	pList (map (self#pStmt ()) stlst) ;
-+	self#pp_location l ]
-+    | Loop       (b,l,os1, os2)  -> text "Loop" ++ (pParens @ pCommaSep) [
-+	self#pBlock () b ;
-+	self#pp_location l ;
-+	pOption (self#pStmt ()) os1 ;
-+	pOption (self#pStmt ()) os2 ]
-+    | Block      (b)             -> text "Block" ++ pParens( self#pBlock () b)
-+    | TryFinally (b1,b2,l)       -> text "TryFinally" ++ (pParens @ pCommaSep) [ 
-+	self#pBlock () b1 ;
-+	self#pBlock () b2 ;
-+	self#pp_location l ]
-+    | TryExcept  (b1, pr, b2, l) -> text "TryExcept" ++ (pParens @ pCommaSep) [ 
-+	self#pBlock () b1 ;
-+	(  pPair
-+         @ pDouble (pList @ map (self#pInstr ())) 
-+                   (self#pExp ())
-+        ) pr ;
-+	self#pBlock () b2 ;
-+	self#pp_location l ]
-+
-+  (*** EXPRESSIONS ***)
-+
-+  method pExp () (e:exp) : doc = if !E.verboseFlag then trace "pExp" ;
-+    match e with
-+    | Const     (c)              -> text "Constant" ++ pParens( self#pp_constant c)
-+    | Lval      (lh,off)         -> text "Lvalue" ++ (pParens @ pCommaSep)  [self#pp_lhost lh ; self#pOffset nil off ]
-+    | SizeOf    (t)              -> text "SizeOfType" ++ pParens( self#pType None () t)
-+    | SizeOfE   (e)              -> text "SizeOfExp" ++ pParens( self#pExp () e)
-+    | SizeOfStr (s)              -> text "SizeOfString" ++ pParens( pQuoted s)
-+    | AlignOf   (t)              -> text "AlignOfType" ++ pParens( self#pType None () t)
-+    | AlignOfE  (e)              -> text "AlignOfExp" ++ pParens( self#pExp () e)
-+    | UnOp      (uop, e, t)      -> text "UnOp" ++ (pParens @ pCommaSep) [ 
-+					self#pp_unop uop ; 
-+                                        self#pExp () e ; 
-+	                                self#pType None () t ]
-+    | BinOp     (bop, e1, e2, t) -> text "BinOp" ++ (pParens @ pCommaSep) [ 
-+                                        self#pp_binop bop ;
-+                                        self#pExp () e1 ;
-+                                        self#pExp () e2 ;
-+                                        self#pType None () t ]
-+    | CastE     (t,e)            -> text "Cast" ++ (pParens @ pCommaSep) [ self#pType None () t ; self#pExp () e]
-+    | AddrOf    (lv)             -> text "AddressOf" ++ pParens( self#pLval () lv)
-+    | StartOf   (lv)             -> text "StartOf" ++ pParens( self#pLval () lv)
-+
-+  (*** INITIALIZERS ***)
-+  method pInit () (i:init) : doc = if !E.verboseFlag then trace "pInit" ;
-+    match i with
-+    | SingleInit   (e)        -> text "SingleInit" ++ pParens( self#pExp () e)
-+    | CompoundInit (t, oilst) -> text "CompoundInit" ++ (pParens @ pCommaSep) [ self#pType None () t ;
-+				    pList (map (  pPair
-+			                        @ pDouble (self#pOffset nil) (self#pInit ())
-+			                       ) 
-+			                       oilst
-+			                  ) ]
-+  method dInit (out:out_channel) (i:int) (init1:init) : unit = fprint out i (self#pInit () init1)
-+
-+  (*** auxiliary methods ***)
-+  method private pp_storage (s:storage) : doc =
-+    let tok = match s with
-+	      | NoStorage -> "NoStorage"
-+	      | Static    -> "Static"
-+	      | Register  -> "Register"
-+	      | Extern	  -> "Extern"
-+    in text ("Storage_" ^ tok)
-+
-+  method private pp_typeinfo (tinfo:typeinfo) : doc = if !E.verboseFlag then trace "pp_typeinfo" ;
-+    text "Typeinfo" ++ (pParens @ pCommaSep) [   
-+    pQuoted tinfo.tname ;
-+    self#pType None () tinfo.ttype ;
-+    pBool tinfo.treferenced ]
-+
-+  method private pp_fieldinfo (finfo:fieldinfo) : doc = if !E.verboseFlag then trace "pp_fieldinfo" ;
-+    text "Fieldinfo" ++ (pParens @ pCommaSep) [ 
-+    pQuoted finfo.fname ;
-+    self#pType None () finfo.ftype ;
-+    pOption (pQuoted @ string_of_int) finfo.fbitfield ;
-+    self#pAttrs () finfo.fattr ;
-+    self#pp_location finfo.floc ]
-+
-+  method private pp_compinfo (cinfo:compinfo) : doc = if !E.verboseFlag then trace "pp_compinfo" ;
-+    text "Compinfo" ++ (pParens @ pCommaSep) [ 
-+    pBool cinfo.cstruct ;
-+    pQuoted cinfo.cname ;
-+    text (string_of_int cinfo.ckey) ;
-+    pList (map (self#pFieldDecl ()) cinfo.cfields) ;
-+    self#pAttrs () cinfo.cattr ;
-+    pBool cinfo.cdefined ;
-+    pBool cinfo.creferenced ]
-+
-+  method private pp_enuminfo (einfo:enuminfo) : doc = if !E.verboseFlag then trace "pp_enuminfo" ;
-+    text "Enuminfo" ++ (pParens @ pCommaSep) [
-+    pQuoted einfo.ename ;
-+    pList (map (  pTriplet
-+                @ (pTriple pQuoted (self#pExp ()) self#pp_location)
-+               )
-+               einfo.eitems) ;
-+    self#pAttrs () einfo.eattr ;
-+    pBool einfo.ereferenced ]
-+
-+  method private pp_location (loc:location) : doc = if !E.verboseFlag then trace "pp_location" ;
-+    text "Location" ++ (pParens @ pCommaSep) [
-+    text (string_of_int loc.line) ;
-+    pQuoted loc.file ;
-+    text (string_of_int loc.byte) ]
-+
-+  method private pp_varinfo (vinfo:varinfo) : doc = if !E.verboseFlag then trace "pp_varinfo" ;
-+    text "Varinfo" ++ (pParens @ pCommaSep) [
-+    pQuoted vinfo.vname ;
-+    self#pType None () vinfo.vtype ;
-+    self#pAttrs () vinfo.vattr ;
-+    self#pp_storage vinfo.vstorage ;
-+    pBool vinfo.vglob ;
-+    pBool vinfo.vinline ;
-+    self#pp_location vinfo.vdecl ;
-+    text (string_of_int vinfo.vid) ;
-+    pBool vinfo.vaddrof ;
-+    pBool vinfo.vreferenced ]
-+
-+  method private pp_initinfo (iinfo:initinfo) : doc = if !E.verboseFlag then trace "pp_initinfo" ;
-+    text "Initinfo" ++ pParens( 
-+    pOption (self#pInit ()) iinfo.init)
-+
-+  method private pp_fundec (fdec:fundec) : doc = if !E.verboseFlag then trace "pp_fundec" ;
-+    text "Fundec" ++ (pParens @ pCommaSep) [
-+    self#pp_varinfo fdec.svar ;
-+    pList (map self#pp_varinfo fdec.sformals) ;
-+    pList (map self#pp_varinfo fdec.slocals) ;
-+    text (string_of_int fdec.smaxid) ;
-+    self#pBlock () fdec.sbody ;
-+    pOption (pSpParens @ text @ string_of_int) fdec.smaxstmtid ;
-+    pList (map (self#pStmt ()) fdec.sallstmts) ]
-+
-+  method private pp_ikind (ikin:ikind) : doc =
-+    let tok = match ikin with
-+              | IChar  -> "IChar"
-+	      | ISChar -> "ISChar"
-+	      | IUChar -> "IUChar"
-+	      | IInt   -> "IInt"
-+	      | IUInt  -> "IUInt"
-+	      | IShort -> "IShort"
-+	      | IUShort -> "IUShort"
-+	      | ILong  -> "ILong"
-+	      | IULong -> "IULong"
-+	      | ILongLong -> "ILongLong"
-+	      | IULongLong -> "IULongLong"
-+    in text ("Ikind_" ^ tok)
-+
-+  method private pp_fkind (fkin:fkind) : doc =
-+    let tok = match fkin with
-+	      | FFloat -> "FFloat"
-+	      | FDouble -> "FDouble"
-+	      | FLongDouble -> "FLongDouble"
-+    in text ("Fkind_" ^ tok)
-+
-+  method private pp_typsig (tsig:typsig) : doc = if !E.verboseFlag then trace "pp_typsig" ;
-+    match tsig with
-+    | TSArray (tsig2, oe, attr)         -> text "TSArray" ++ (pParens @ pCommaSep) [
-+					      self#pp_typsig tsig2 ;
-+					      pOption pInt64 oe ;
-+					      self#pAttrs () attr ]
-+    | TSPtr   (tsig2, attr)             -> text "TSPtr" ++ (pParens @ pCommaSep) [
-+					      self#pp_typsig tsig2 ;
-+					      self#pAttrs () attr ]	
-+    | TSComp  (b, s, attr)              -> text "TSComp" ++ (pParens @ pCommaSep) [
-+					      pBool b ;
-+					      pQuoted s ;
-+					      self#pAttrs () attr ]
-+    | TSFun   (tsig2, tsiglst, b, attr) -> text "TSFun" ++ (pParens @ pCommaSep) [
-+					      self#pp_typsig tsig2 ;
-+					      pList (map self#pp_typsig tsiglst) ;
-+					      pBool b ;
-+					      self#pAttrs () attr ]
-+    | TSEnum  (s, attr)                 -> text "TSEnum" ++ (pParens @ pCommaSep) [
-+					      pQuoted s ;
-+					      self#pAttrs () attr ]
-+    | TSBase  (t)                       -> text "TSBase" ++ pParens( self#pType None () t)
-+     
-+
-+  method private pp_unop (uop:unop) : doc =
-+    let tok = match uop with
-+	      | Neg -> "Neg"
-+	      | BNot -> "BNot"
-+	      | LNot -> "LNot"
-+    in text ("UnOp_" ^ tok)
-+
-+  method private pp_binop (bop:binop) : doc = 
-+    let tok = match bop with
-+              | PlusA -> "PlusA"
-+	      | PlusPI -> "PlusPI"
-+	      | IndexPI -> "IndexPI"
-+	      | MinusA -> "MinusA"
-+	      | MinusPI -> "MinusPI"
-+	      | MinusPP -> "MinusPP"
-+	      | Mult -> "Mult"
-+	      | Div -> "Div"
-+	      | Mod -> "Mod"
-+	      | Shiftlt -> "Shiftlt"
-+	      | Shiftrt -> "Shiftrt"
-+	      | Lt -> "Lt"
-+	      | Gt -> "Gt"
-+	      | Le -> "Le"
-+	      | Ge -> "Ge"
-+	      | Eq -> "Eq"
-+	      | Ne -> "Ne"
-+	      | BAnd -> "BAnd"
-+	      | BXor -> "BXor"
-+	      | BOr -> "BOr"
-+	      | LAnd -> "LAnd"
-+	      | LOr -> "LOr"
-+    in text ("BinOp_" ^ tok )
-+
-+  method private pp_constant (c:constant) : doc = if !E.verboseFlag then trace "pp_constant" ;
-+    match c with
-+    | CInt64 (i, ikin, os) -> text "CInt64" ++ (pParens @ pCommaSep) [  
-+                                  pQuoted (Int64.to_string i)  ;
-+				  self#pp_ikind ikin ;
-+				  pOption pQuoted os ]
-+    | CStr   (s)           -> text "CStr" ++ pParens( pQuoted s)
-+    | CWStr  (ilist)       -> text "CWStr" ++ pParens( pList (map ( text @ Int64.to_string) ilist))
-+    | CChr   (c)           -> text "CChr" ++ pParens( text "\"" ++ text (Char.escaped c) ++ text "\"")
-+    | CReal  (f, fkin, os) -> text "CReal" ++ (pParens @ pCommaSep) [  pQuoted (sprintf "%f0" f) ;
-+				  self#pp_fkind fkin ;
-+				  pOption pQuoted os ]
-+    | CEnum(_, s, ei)      -> text "CEnum" ++ pParens( pQuoted s)
-+
-+  method private pp_lhost (lh:lhost) : doc = if !E.verboseFlag then trace "pp_lhost" ;
-+    match lh with
-+    | Var (vinfo) -> text "Var" ++ pParens( self#pp_varinfo vinfo)
-+    | Mem (e)     -> text "Mem" ++ pParens( self#pExp () e)
-+
-+  method private pp_blockinfo (b:block) : doc = if !E.verboseFlag then trace "pp_blockinfo" ;
-+    text "Block" ++ (pParens @ pCommaSep) [
-+    self#pAttrs () b.battrs ;
-+    pList (map (self#pStmt ()) b.bstmts) ]
-+
-+  method private pp_stmtinfo (sinfo:stmt) : doc = if !E.verboseFlag then trace "pp_stmtinfo" ;
-+    text "Stmt" ++ (pParens @ pCommaSep) [
-+    pList (map (self#pLabel ()) sinfo.labels) ;
-+    self#pStmtKind invalidStmt () sinfo.skind ;
-+    text (string_of_int sinfo.sid) ;
-+    pList (map self#pp_stmtinfo sinfo.succs) ;
-+    pList (map self#pp_stmtinfo sinfo.preds) ]
-+end
-+
-+let ppFile (f:file) (pp:cilPrinter) : doc = if !E.verboseFlag then trace "ppFile" ;
-+  text "File" ++ (pParens @ pCommaSep) [ 
-+  pQuoted f.fileName ;
-+  pList (map (pp#pGlobal ()) f.globals) ]
-+
-+(* we need a different more flexible mapGlobals
-+   we only visit globals and not global init;
-+   use mapGlobinits *)
-+let mapGlobals2 (fl: file) 
-+                (doone: global -> 'a) : 'a list = 
-+  List.map doone fl.globals
-+
-+(* We redefine dumpFile because we don't want a header in our
-+   file telling us it was generated with CIL blabla *)
-+let dumpFile (pp: cilPrinter) (out : out_channel) file =
-+  printDepth := 99999;  
-+  Pretty.fastMode := true;
-+  if !E.verboseFlag then ignore (E.log "printing file %s\n" file.fileName);
-+  let file_doc = ppFile file pp in
-+  fprint out 80 file_doc;
-+  flush out
-+
-+let feature : featureDescr =
-+  { fd_name = "printaterm";
-+    fd_enabled = ref false;
-+    fd_description = "printing the current CIL AST to an ATerm";
-+    fd_extraopt = [("--atermfile", Arg.String (fun s -> outputfilename := s), "=<filename>: writes the ATerm to <filename>");];
-+    fd_doit = (function (f: file) ->        
-+        let channel = open_out !outputfilename in 
-+        let printer = new atermPrinter
-+	in dumpFile printer channel f
-+         ; close_out channel
-+    );
-+    fd_post_check = false;
-+  }
-diff -urN cil-1.3.6-orig/src/main.ml cil-1.3.6/src/main.ml
---- cil-1.3.6-orig/src/main.ml	2007-02-05 22:10:29.000000000 +0100
-+++ cil-1.3.6/src/main.ml	2007-03-05 15:14:54.000000000 +0100
-@@ -105,6 +105,7 @@
-     Logcalls.feature;
-     Ptranal.feature;
-     Liveness.feature;
-+    Atermprinter.feature;
-   ] 
-   @ Feature_config.features 
- 
diff --git a/pkgs/development/libraries/cil-aterm/default.nix b/pkgs/development/libraries/cil-aterm/default.nix
deleted file mode 100644
index 62d69f943af9..000000000000
--- a/pkgs/development/libraries/cil-aterm/default.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ stdenv, fetchurl, ocaml, perl }:
-
-stdenv.mkDerivation {
-  name    = "cil-aterm-1.3.6";
-  src     = fetchurl {
-		url = mirror://sourceforge/cil/cil-1.3.6.tar.gz;
-                md5 = "112dfbabdd0e1280800d62ba4449ab45";
-            };
-  patches = [./cil-aterm-1.3.6.patch];
-  buildInputs = [ ocaml perl ];
-  inherit ocaml perl;
-  meta.broken = true;
-}  
diff --git a/pkgs/development/libraries/fdk-aac/default.nix b/pkgs/development/libraries/fdk-aac/default.nix
index 12c21693a799..43a5eb2103dd 100644
--- a/pkgs/development/libraries/fdk-aac/default.nix
+++ b/pkgs/development/libraries/fdk-aac/default.nix
@@ -5,11 +5,11 @@
 with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "fdk-aac-${version}";
-  version = "0.1.4";
+  version = "0.1.5";
 
   src = fetchurl {
     url = "mirror://sourceforge/opencore-amr/fdk-aac/${name}.tar.gz";
-    sha256 = "1aqmzxri23q83wfmwbbashs27mq1mapvfirz5r9i7jkphrwgw42r";
+    sha256 = "1msdkcf559agmpycd4bk0scm2s2h9jyzbnnw1yrfarxlcwm5jr11";
   };
 
   configureFlags = [ ]
diff --git a/pkgs/development/libraries/ffmpeg/2.8.nix b/pkgs/development/libraries/ffmpeg/2.8.nix
index 04336c9ee4d3..366adfbefca2 100644
--- a/pkgs/development/libraries/ffmpeg/2.8.nix
+++ b/pkgs/development/libraries/ffmpeg/2.8.nix
@@ -1,7 +1,7 @@
 { callPackage, ... } @ args:
 
 callPackage ./generic.nix (args // rec {
-  version = "${branch}.8";
+  version = "${branch}.10";
   branch = "2.8";
-  sha256 = "19h6xmlcb933hgpfd40mjwkral8v389v25sx660a3p7aiyalh25p";
+  sha256 = "1jd9vqrsng6swk1xsms3qvwqjzla58xbk3103qmnxkixa1rimkni";
 })
diff --git a/pkgs/development/libraries/freealut/default.nix b/pkgs/development/libraries/freealut/default.nix
index 39d63a8bd693..2c9a893284be 100644
--- a/pkgs/development/libraries/freealut/default.nix
+++ b/pkgs/development/libraries/freealut/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, openal }:
+{ stdenv, darwin, fetchurl, openal }:
 
 stdenv.mkDerivation rec {
   name = "freealut-1.1.0";
@@ -8,12 +8,15 @@ stdenv.mkDerivation rec {
     sha256 = "0kzlil6112x2429nw6mycmif8y6bxr2cwjcvp18vh6s7g63ymlb0";
   };
 
-  buildInputs = [ openal ];
+  buildInputs = [ openal
+  ] ++ stdenv.lib.optional stdenv.isDarwin
+    darwin.apple_sdk.frameworks.OpenAL
+  ;
 
   meta = {
     homepage = "http://openal.org/";
     description = "Free implementation of OpenAL's ALUT standard";
     license = stdenv.lib.licenses.lgpl2;
-    platforms = stdenv.lib.platforms.linux;
+    platforms = stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/gd/default.nix b/pkgs/development/libraries/gd/default.nix
index 724888b3b824..c87e344ae558 100644
--- a/pkgs/development/libraries/gd/default.nix
+++ b/pkgs/development/libraries/gd/default.nix
@@ -12,11 +12,11 @@
 
 stdenv.mkDerivation rec {
   name = "gd-${version}";
-  version = "2.2.3";
+  version = "2.2.4";
 
   src = fetchurl {
     url = "https://github.com/libgd/libgd/releases/download/${name}/libgd-${version}.tar.xz";
-    sha256 = "0g3xz8jpz1pl2zzmssglrpa9nxiaa7rmcmvgpbrjz8k9cyynqsvl";
+    sha256 = "1rp4v7n1dq38b92kl7gkvpvqqkw7nvdfnz6d5kip5klkxfki6zqk";
   };
 
   hardeningDisable = [ "format" ];
diff --git a/pkgs/development/libraries/gtkmozembed-sharp/builder.sh b/pkgs/development/libraries/gtkmozembed-sharp/builder.sh
deleted file mode 100644
index 4b8f757540b5..000000000000
--- a/pkgs/development/libraries/gtkmozembed-sharp/builder.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-source $stdenv/setup
-
-genericBuild
-
-# !!! hack
-export ALL_INPUTS="$out $pkgs"
-
-find $out -name "*.dll.config" | while read configFile; do
-    echo "modifying config file $configFile"
-    $monoDLLFixer "$configFile"
-done
diff --git a/pkgs/development/libraries/gtkmozembed-sharp/default.nix b/pkgs/development/libraries/gtkmozembed-sharp/default.nix
deleted file mode 100644
index 52fc4b26e6da..000000000000
--- a/pkgs/development/libraries/gtkmozembed-sharp/default.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{stdenv, fetchurl, pkgconfig, mono, gtksharp, gtk2, monoDLLFixer}:
-
-stdenv.mkDerivation {
-  name = "gtkmozembed-sharp-0.7-pre41601";
-
-  builder = ./builder.sh;
-  src = fetchurl {
-    url = http://tarballs.nixos.org/gtkmozembed-sharp-0.7-pre41601.tar.bz2;
-    md5 = "34aac139377296791acf3af9b5dc27ed";
-  };
-
-  buildInputs = [
-    pkgconfig mono gtksharp gtk2
-  ];
-
-  inherit monoDLLFixer;
-
-  meta = {
-    platforms = stdenv.lib.platforms.linux;
-  };
-}
diff --git a/pkgs/development/libraries/hunspell/dictionaries.nix b/pkgs/development/libraries/hunspell/dictionaries.nix
index 0189ecda77ff..e5cb99aa44a1 100644
--- a/pkgs/development/libraries/hunspell/dictionaries.nix
+++ b/pkgs/development/libraries/hunspell/dictionaries.nix
@@ -40,22 +40,6 @@ let
     '';
   };
 
-  mkDictFromRedIRIS =
-    { shortName, shortDescription, dictFileName, src }:
-    mkDict rec {
-      inherit src dictFileName;
-      version = "0.7";
-      name = "hunspell-dict-${shortName}-rediris-${version}";
-      readmeFile = "README.txt";
-      meta = with stdenv.lib; {
-        description = "Hunspell dictionary for ${shortDescription} from RedIRIS";
-        homepage = https://forja.rediris.es/projects/rla-es/;
-        license = with licenses; [ gpl3 lgpl3 mpl11 ];
-        maintainers = with maintainers; [ renzo ];
-        platforms = platforms.all;
-      };
-    };
-
   mkDictFromDicollecte =
     { shortName, shortDescription, longDescription, dictFileName }:
     mkDict rec {
@@ -152,218 +136,6 @@ in {
     };
   };
 
-  /* SPANISH */
-
-  es-any = mkDictFromRedIRIS {
-    shortName = "es-any";
-    shortDescription = "Spanish (any variant)";
-    dictFileName = "es_ANY";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2933/es_ANY.oxt;
-      md5 = "e3d4b38f280e7376178529db2ece982b";
-    };
-  };
-
-  es-ar = mkDictFromRedIRIS {
-    shortName = "es-ar";
-    shortDescription = "Spanish (Argentina)";
-    dictFileName = "es_AR";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2953/es_AR.oxt;
-      md5 = "68ee8f4ebc89a1fa461045d4dbb9b7be";
-    };
-  };
-
-  es-bo = mkDictFromRedIRIS {
-    shortName = "es-bo";
-    shortDescription = "Spanish (Bolivia)";
-    dictFileName = "es_BO";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2952/es_BO.oxt;
-      md5 = "1ebf11b6094e0bfece8e95cc34e7a409";
-    };
-  };
-
-  es-cl = mkDictFromRedIRIS {
-    shortName = "es-cl";
-    shortDescription = "Spanish (Chile)";
-    dictFileName = "es_CL";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2951/es_CL.oxt;
-      md5 = "092a388101350b77af4fd789668582bd";
-    };
-  };
-
-  es-co = mkDictFromRedIRIS {
-    shortName = "es-co";
-    shortDescription = "Spanish (Colombia)";
-    dictFileName = "es_CO";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2950/es_CO.oxt;
-      md5 = "fc440fd9fc55ca2dfb9bfa34a1e63864";
-    };
-  };
-
-  es-cr = mkDictFromRedIRIS {
-    shortName = "es-cr";
-    shortDescription = "Spanish (Costra Rica)";
-    dictFileName = "es_CR";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2949/es_CR.oxt;
-      md5 = "7510fd0f4eb3c6e65523a8d0960f77dd";
-    };
-  };
-
-  es-cu = mkDictFromRedIRIS {
-    shortName = "es-cu";
-    shortDescription = "Spanish (Cuba)";
-    dictFileName = "es_CU";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2948/es_CU.oxt;
-      md5 = "0ab4b9638f58ddd3d95d1265918ff39e";
-    };
-  };
-
-  es-do = mkDictFromRedIRIS {
-    shortName = "es-do";
-    shortDescription = "Spanish (Dominican Republic)";
-    dictFileName = "es_DO";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2947/es_DO.oxt;
-      md5 = "24a20fd4d887693afef539e6f1a3b58e";
-    };
-  };
-
-  es-ec = mkDictFromRedIRIS {
-    shortName = "es-ec";
-    shortDescription = "Spanish (Ecuador)";
-    dictFileName = "es_EC";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2946/es_EC.oxt;
-      md5 = "5d7343a246323ceda58cfbbf1428e279";
-    };
-  };
-
-  es-es = mkDictFromRedIRIS {
-    shortName = "es-es";
-    shortDescription = "Spanish (Spain)";
-    dictFileName = "es_ES";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2945/es_ES.oxt;
-      md5 = "59dd45e6785ed644adbbd73f4f126182";
-    };
-  };
-
-  es-gt = mkDictFromRedIRIS {
-    shortName = "es-gt";
-    shortDescription = "Spanish (Guatemala)";
-    dictFileName = "es_GT";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2944/es_GT.oxt;
-      md5 = "b1a9be80687e3117c67ac46aad6b8d66";
-    };
-  };
-
-  es-hn = mkDictFromRedIRIS {
-    shortName = "es-hn";
-    shortDescription = "Spanish (Honduras)";
-    dictFileName = "es_HN";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2943/es_HN.oxt;
-      md5 = "d0db5bebd6925738b524de9709950f22";
-    };
-  };
-
-  es-mx = mkDictFromRedIRIS {
-    shortName = "es-mx";
-    shortDescription = "Spanish (Mexico)";
-    dictFileName = "es_MX";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2942/es_MX.oxt;
-      md5 = "0de780714f84955112f38f35fb63a894";
-    };
-  };
-
-  es-ni = mkDictFromRedIRIS {
-    shortName = "es-ni";
-    shortDescription = "Spanish (Nicaragua)";
-    dictFileName = "es_NI";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2941/es_NI.oxt;
-      md5 = "d259d7be17c34df76c7de40c80720a39";
-    };
-  };
-
-  es-pa = mkDictFromRedIRIS {
-    shortName = "es-pa";
-    shortDescription = "Spanish (Panama)";
-    dictFileName = "es_PA";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2940/es_PA.oxt;
-      md5 = "085fbdbed6a2e248630c801881563b7a";
-    };
-  };
-
-  es-pe = mkDictFromRedIRIS {
-    shortName = "es-pe";
-    shortDescription = "Spanish (Peru)";
-    dictFileName = "es_PE";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2939/es_PE.oxt;
-      md5 = "f4673063246888995d4eaa2d4a24ee3d";
-    };
-  };
-
-  es-pr = mkDictFromRedIRIS {
-    shortName = "es-pr";
-    shortDescription = "Spanish (Puerto Rico)";
-    dictFileName = "es_PR";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2938/es_PR.oxt;
-      md5 = "e67bcf891ba9eeaeb57a60ec8e57f1ac";
-    };
-  };
-
-  es-py = mkDictFromRedIRIS {
-    shortName = "es-py";
-    shortDescription = "Spanish (Paraguay)";
-    dictFileName = "es_PY";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2937/es_PY.oxt;
-      md5 = "ba98e3197c81db4c572def2c5cca942d";
-    };
-  };
-
-  es-sv = mkDictFromRedIRIS {
-    shortName = "es-sv";
-    shortDescription = "Spanish (El Salvador)";
-    dictFileName = "es_SV";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2936/es_SV.oxt;
-      md5 = "c68ca9d188cb23c88cdd34a069c5a013";
-    };
-  };
-
-  es-uy = mkDictFromRedIRIS {
-    shortName = "es-uy";
-    shortDescription = "Spanish (Uruguay)";
-    dictFileName = "es_UY";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2935/es_UY.oxt;
-      md5 = "aeb9d39e4d17e9c904c1f3567178aad6";
-    };
-  };
-
-  es-ve = mkDictFromRedIRIS {
-    shortName = "es-ve";
-    shortDescription = "Spanish (Venezuela)";
-    dictFileName = "es_VE";
-    src = fetchurl {
-      url = http://forja.rediris.es/frs/download.php/2934/es_VE.oxt;
-      md5 = "8afa9619aede2d9708e799e0f5d0fcab";
-    };
-  };
-
   /* FRENCH */
 
   fr-any = mkDictFromDicollecte {
@@ -416,7 +188,7 @@ in {
     shortDescription = "Hunspell dictionary for 'Italian (Italy)' from Linguistico";
     src = fetchurl {
       url = mirror://sourceforge/linguistico/italiano_2_4_2007_09_01.zip;
-      md5 = "e7fbd9e2dfb25ea3288cdb918e1e1260";
+      sha256 = "0m9frz75fx456bczknay5i446gdcp1smm48lc0qfwzhz0j3zcdrd";
     };
   };
 }
diff --git a/pkgs/development/libraries/java/jjtraveler/default.nix b/pkgs/development/libraries/java/jjtraveler/default.nix
deleted file mode 100644
index b9dc1d688605..000000000000
--- a/pkgs/development/libraries/java/jjtraveler/default.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{stdenv, fetchurl, jdk}:
-
-stdenv.mkDerivation {
-  name = "jjtraveler-0.4.3";
-  src = fetchurl {
-    url = http://www.cwi.nl/projects/MetaEnv/jjtraveler/JJTraveler-0.4.3.tar.gz;
-    md5 = "35bf801ee61f042513ae88247fe1bf1d";
-  };
-  buildInputs = [stdenv jdk];
-
-  meta = {
-    platforms = stdenv.lib.platforms.unix;
-  };
-}
diff --git a/pkgs/development/libraries/java/lucene/default.nix b/pkgs/development/libraries/java/lucene/default.nix
index d6e26a02d676..6f6534cee3ea 100644
--- a/pkgs/development/libraries/java/lucene/default.nix
+++ b/pkgs/development/libraries/java/lucene/default.nix
@@ -1,12 +1,14 @@
 {stdenv, fetchurl} :
 
-stdenv.mkDerivation {
-  name = "lucene-1.4.1";
+stdenv.mkDerivation rec {
+  name = "lucene-${version}";
+  version = "1.4.3";
+
   builder = ./builder.sh;
 
   src = fetchurl {
-    url = http://cvs.apache.org/dist/jakarta/lucene/v1.4.1/lucene-1.4.1.tar.gz;
-    md5 = "656a6f40f5b8f7d2e19453436848bfe8";
+    url = "https://archive.apache.org/dist/jakarta/lucene/${name}.tar.gz";
+    sha256 = "1mxaxg65f7v8n60irjwm24v7hcisbl0srmpvcy1l4scs6rjj1awh";
   };
 
   meta = {
diff --git a/pkgs/development/libraries/java/mockobjects/default.nix b/pkgs/development/libraries/java/mockobjects/default.nix
index 5681200c4fa7..551375d33bd6 100644
--- a/pkgs/development/libraries/java/mockobjects/default.nix
+++ b/pkgs/development/libraries/java/mockobjects/default.nix
@@ -6,7 +6,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = mirror://sourceforge/mockobjects/mockobjects-bin-0.09.tar;
-    md5 = "a0e11423bd5fcbb6ea65753643ea8852";
+    sha256 = "18rnyqfcyh0s3dwkkaszdd50ssyjx5fa1y3ii309ldqg693lfgnz";
   };
 
   meta = {
diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix
index 7bf969b78da9..6d81a284040c 100644
--- a/pkgs/development/libraries/libav/default.nix
+++ b/pkgs/development/libraries/libav/default.nix
@@ -26,8 +26,8 @@ with { inherit (stdenv.lib) optional optionals hasPrefix; };
 
 let
   result = {
-    libav_0_8 = libavFun "0.8.19" "c79350d6fa071fcd66448ffc713fe3b9754876a8";
-    libav_11  = libavFun  "11.8"  "y18hmrzy7jqq7h9ys54nrr4s49mkzsfh";
+    libav_0_8 = libavFun "0.8.20" "0c7a2417c3a01eb74072691bb93ce802ae1be08f";
+    libav_11  = libavFun  "11.8"  "d0e93f6b229ae46c49d13ec183b13cfee70a51f0";
     libav_12  = libavFun "12"     "4ecde7274621c82a6882b7614d907b28de25cc4e";
   };
 
diff --git a/pkgs/development/libraries/libfm/default.nix b/pkgs/development/libraries/libfm/default.nix
index 32eb4e04f03c..2b30dacb58fa 100644
--- a/pkgs/development/libraries/libfm/default.nix
+++ b/pkgs/development/libraries/libfm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, glib, gtk2, intltool, menu-cache, pango, pkgconfig, vala_0_23
+{ stdenv, fetchurl, glib, gtk2, intltool, menu-cache, pango, pkgconfig, vala_0_34
 , extraOnly ? false }:
 let
     inherit (stdenv.lib) optional;
@@ -7,14 +7,14 @@ stdenv.mkDerivation rec {
   name = if extraOnly
     then "libfm-extra-${version}"
     else "libfm-${version}";
-  version = "1.2.4";
+  version = "1.2.5";
 
   src = fetchurl {
     url = "mirror://sourceforge/pcmanfm/libfm-${version}.tar.xz";
-    sha256 = "0bsh4p7h2glhxf1cc1lvbxyb4qy0y1zsnl9izf7vrldkikrgc13q";
+    sha256 = "0nlvfwh09gbq8bkbvwnw6iqr918rrs9gc9ljb9pjspyg408bn1n7";
   };
 
-  buildInputs = [ glib gtk2 intltool pango pkgconfig vala_0_23 ]
+  buildInputs = [ glib gtk2 intltool pango pkgconfig vala_0_34 ]
                 ++ optional (!extraOnly) menu-cache;
 
   configureFlags = optional extraOnly "--with-extra-only";
diff --git a/pkgs/development/libraries/libjpeg/62.nix b/pkgs/development/libraries/libjpeg/62.nix
deleted file mode 100644
index 3ae8cfac39c0..000000000000
--- a/pkgs/development/libraries/libjpeg/62.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{stdenv, fetchurl, libtool, static ? false, ...}: 
-
-stdenv.mkDerivation {
-  name = "libjpeg-6b";
-  
-  builder = ./builder.sh;
-  
-  src = fetchurl {
-    url = http://www.ijg.org/files/jpegsrc.v6b.tar.gz;
-    sha256 = "0pg34z6rbkk5kvdz6wirf7g4mdqn5z8x97iaw17m15lr3qjfrhvm";
-  };
-  
-  inherit libtool;
-
-  configureFlags = "--enable-shared ${if static then " --enable-static" else ""}";
-    
-  # Required for building of dynamic libraries on Darwin.
-  patches = [
-    (fetchurl {
-      url = http://svn.macports.org/repository/macports/trunk/dports/graphics/jpeg/files/patch-ltconfig;
-      md5 = "e6725fa4a09aa1de4ca75343fd0f61d5";
-    })
-    (fetchurl {
-      url = http://svn.macports.org/repository/macports/trunk/dports/graphics/jpeg/files/patch-ltmain.sh;
-      #md5 = "489986ad8e7a93aef036766b25f321d5";
-      md5 = "092a12aeb0c386dd7dae059109d950ba";
-    })
-  ];
-
-  meta = {
-        platforms = stdenv.lib.platforms.unix;
-  };
-}
diff --git a/pkgs/development/libraries/liburcu/default.nix b/pkgs/development/libraries/liburcu/default.nix
index 29765f070664..b31ced11c6ce 100644
--- a/pkgs/development/libraries/liburcu/default.nix
+++ b/pkgs/development/libraries/liburcu/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
     description = "Userspace RCU (read-copy-update) library";
     homepage = http://lttng.org/urcu;
     license = licenses.lgpl21Plus;
-    platforms = platforms.linux;
+    platforms = platforms.unix;
     maintainers = [ maintainers.bjornfor ];
   };
 
diff --git a/pkgs/development/libraries/nss/85_security_load.patch b/pkgs/development/libraries/nss/85_security_load.patch
index 9e4be3bf282e..7687ea9bedb0 100644
--- a/pkgs/development/libraries/nss/85_security_load.patch
+++ b/pkgs/development/libraries/nss/85_security_load.patch
@@ -1,45 +1,45 @@
-diff -ru -x '*~' nss-3.27.1-orig/nss/cmd/shlibsign/shlibsign.c nss-3.27.1/nss/cmd/shlibsign/shlibsign.c
---- nss-3.27.1-orig/nss/cmd/shlibsign/shlibsign.c	2016-10-03 16:55:58.000000000 +0200
-+++ nss-3.27.1/nss/cmd/shlibsign/shlibsign.c	2016-11-15 16:28:07.308117900 +0100
-@@ -871,6 +871,8 @@
-     libname = PR_GetLibraryName(NULL, "softokn3");
-     assert(libname != NULL);
+diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/cmd/shlibsign/shlibsign.c nss/cmd/shlibsign/shlibsign.c
+--- nss/cmd/shlibsign/shlibsign.c	2017-01-04 15:24:24.000000000 +0100
++++ nss/cmd/shlibsign/shlibsign.c	2017-01-24 14:43:31.030420852 +0100
+@@ -875,6 +875,8 @@
+         goto cleanup;
+     }
      lib = PR_LoadLibrary(libname);
 +    if (!lib)
 +        lib = PR_LoadLibrary(NIX_NSS_LIBDIR"libsoftokn3.so");
      assert(lib != NULL);
-     PR_FreeLibraryName(libname);
- 
-diff -ru -x '*~' nss-3.27.1-orig/nss/coreconf/config.mk nss-3.27.1/nss/coreconf/config.mk
---- nss-3.27.1-orig/nss/coreconf/config.mk	2016-10-03 16:55:58.000000000 +0200
-+++ nss-3.27.1/nss/coreconf/config.mk	2016-11-15 16:28:07.308117900 +0100
-@@ -217,3 +217,6 @@
- ifdef NSS_NO_PKCS11_BYPASS
- DEFINES += -DNO_PKCS11_BYPASS
- endif
+     if (!lib) {
+         PR_fprintf(PR_STDERR, "loading softokn3 failed");
+diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/coreconf/config.mk nss/coreconf/config.mk
+--- nss/coreconf/config.mk	2017-01-04 15:24:24.000000000 +0100
++++ nss/coreconf/config.mk	2017-01-24 14:43:47.989432372 +0100
+@@ -208,3 +208,6 @@
+ # exported symbols, which causes problem when NSS is built as part of Mozilla.
+ # So we add a NSS_SSL_ENABLE_ZLIB variable to allow Mozilla to turn this off.
+ NSS_SSL_ENABLE_ZLIB = 1
 +
 +# Nix specific stuff.
 +DEFINES += -DNIX_NSS_LIBDIR=\"$(out)/lib/\"
-diff -ru -x '*~' nss-3.27.1-orig/nss/lib/pk11wrap/pk11load.c nss-3.27.1/nss/lib/pk11wrap/pk11load.c
---- nss-3.27.1-orig/nss/lib/pk11wrap/pk11load.c	2016-10-03 16:55:58.000000000 +0200
-+++ nss-3.27.1/nss/lib/pk11wrap/pk11load.c	2016-11-15 16:28:07.308117900 +0100
-@@ -429,6 +429,13 @@
- 	 * unload the library if anything goes wrong from here on out...
- 	 */
- 	library = PR_LoadLibrary(mod->dllName);
-+	if ((library == NULL) &&
-+	    !rindex(mod->dllName, PR_GetDirectorySeparator())) {
+diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/pk11wrap/pk11load.c nss/lib/pk11wrap/pk11load.c
+--- nss/lib/pk11wrap/pk11load.c	2017-01-04 15:24:24.000000000 +0100
++++ nss/lib/pk11wrap/pk11load.c	2017-01-24 14:45:06.883485652 +0100
+@@ -440,6 +440,13 @@
+          * unload the library if anything goes wrong from here on out...
+          */
+         library = PR_LoadLibrary(mod->dllName);
++        if ((library == NULL) &&
++            !rindex(mod->dllName, PR_GetDirectorySeparator())) {
 +            library = PORT_LoadLibraryFromOrigin(my_shlib_name,
-+                                      (PRFuncPtr) &softoken_LoadDSO,
-+                                      mod->dllName);
-+	}
++                (PRFuncPtr) &softoken_LoadDSO,
++                mod->dllName);
++        }
 +
- 	mod->library = (void *)library;
+         mod->library = (void *)library;
  
- 	if (library == NULL) {
-diff -ru -x '*~' nss-3.27.1-orig/nss/lib/util/secload.c nss-3.27.1/nss/lib/util/secload.c
---- nss-3.27.1-orig/nss/lib/util/secload.c	2016-10-03 16:55:58.000000000 +0200
-+++ nss-3.27.1/nss/lib/util/secload.c	2016-11-15 16:29:50.482259746 +0100
+         if (library == NULL) {
+diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/util/secload.c nss/lib/util/secload.c
+--- nss/lib/util/secload.c	2017-01-04 15:24:24.000000000 +0100
++++ nss/lib/util/secload.c	2017-01-24 14:43:31.030420852 +0100
 @@ -70,9 +70,14 @@
  
      /* Remove the trailing filename from referencePath and add the new one */
diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix
index 72f57dff1ce3..8621d60ca960 100644
--- a/pkgs/development/libraries/nss/default.nix
+++ b/pkgs/development/libraries/nss/default.nix
@@ -9,11 +9,11 @@ let
 
 in stdenv.mkDerivation rec {
   name = "nss-${version}";
-  version = "3.27.2";
+  version = "3.28.1";
 
   src = fetchurl {
-    url = "mirror://mozilla/security/nss/releases/NSS_3_27_2_RTM/src/${name}.tar.gz";
-    sha256 = "dc8ac8524469d0230274fd13a53fdcd74efe4aa67205dde1a4a92be87dc28524";
+    url = "mirror://mozilla/security/nss/releases/NSS_3_28_1_RTM/src/${name}.tar.gz";
+    sha256 = "58cc0c05c0ed9523e6d820bea74f513538f48c87aac931876e3d3775de1a82ad";
   };
 
   buildInputs = [ nspr perl zlib sqlite ];
@@ -23,11 +23,21 @@ in stdenv.mkDerivation rec {
   '';
 
   patches =
-    [ ./nss-3.21-gentoo-fixups.patch
+    [ # Install a nss.pc (pkgconfig) file and nss-config script
+      # Upstream issue: https://bugzilla.mozilla.org/show_bug.cgi?id=530672
+      (fetchurl {
+        name = "nss-3.28-gentoo-fixups.patch";
+        url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/"
+            + "dev-libs/nss/files/nss-3.28-gentoo-fixups.patch"
+            + "?id=05c31f8cca591b3ce8219e4def7c26c7b1b130d6";
+        sha256 = "0z58axd1n7vq4kdp5mrb3dsg6di39a1g40s3shl6n2dzs14c1y2q";
+      })
       # Based on http://patch-tracker.debian.org/patch/series/dl/nss/2:3.15.4-1/85_security_load.patch
       ./85_security_load.patch
     ];
 
+  patchFlags = "-p0";
+
   postPatch = ''
     # Fix up the patch from Gentoo.
     sed -i \
diff --git a/pkgs/development/libraries/nss/nss-3.21-gentoo-fixups.patch b/pkgs/development/libraries/nss/nss-3.21-gentoo-fixups.patch
deleted file mode 100644
index 33819821c193..000000000000
--- a/pkgs/development/libraries/nss/nss-3.21-gentoo-fixups.patch
+++ /dev/null
@@ -1,243 +0,0 @@
-diff -urN a/nss/config/Makefile b/nss/config/Makefile
---- a/nss/config/Makefile	1969-12-31 18:00:00.000000000 -0600
-+++ b/nss/config/Makefile	2015-11-15 10:42:46.249578304 -0600
-@@ -0,0 +1,40 @@
-+CORE_DEPTH = ..
-+DEPTH      = ..
-+
-+include $(CORE_DEPTH)/coreconf/config.mk
-+
-+NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
-+NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
-+NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
-+PREFIX = /usr
-+
-+all: export libs
-+
-+export:
-+	# Create the nss.pc file
-+	mkdir -p $(DIST)/lib/pkgconfig
-+	sed -e "s,@prefix@,$(PREFIX)," \
-+	    -e "s,@exec_prefix@,\$${prefix}," \
-+	    -e "s,@libdir@,\$${prefix}/lib64," \
-+	    -e "s,@includedir@,\$${prefix}/include/nss," \
-+	    -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
-+	    -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
-+	    -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
-+	    nss.pc.in > nss.pc
-+	chmod 0644 nss.pc
-+	ln -sf ../../../../config/nss.pc $(DIST)/lib/pkgconfig
-+
-+	# Create the nss-config script
-+	mkdir -p $(DIST)/bin
-+	sed -e "s,@prefix@,$(PREFIX)," \
-+	    -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \
-+	    -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
-+	    -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
-+	    nss-config.in > nss-config
-+	chmod 0755 nss-config
-+	ln -sf ../../../config/nss-config $(DIST)/bin
-+
-+libs:
-+
-+dummy: all export libs
-+
-diff -urN a/nss/config/nss-config.in b/nss/config/nss-config.in
---- a/nss/config/nss-config.in	1969-12-31 18:00:00.000000000 -0600
-+++ b/nss/config/nss-config.in	2015-11-15 10:42:46.250578304 -0600
-@@ -0,0 +1,145 @@
-+#!/bin/sh
-+
-+prefix=@prefix@
-+
-+major_version=@NSS_MAJOR_VERSION@
-+minor_version=@NSS_MINOR_VERSION@
-+patch_version=@NSS_PATCH_VERSION@
-+
-+usage()
-+{
-+	cat <<EOF
-+Usage: nss-config [OPTIONS] [LIBRARIES]
-+Options:
-+	[--prefix[=DIR]]
-+	[--exec-prefix[=DIR]]
-+	[--includedir[=DIR]]
-+	[--libdir[=DIR]]
-+	[--version]
-+	[--libs]
-+	[--cflags]
-+Dynamic Libraries:
-+	nss
-+	ssl
-+	smime
-+	nssutil
-+EOF
-+	exit $1
-+}
-+
-+if test $# -eq 0; then
-+	usage 1 1>&2
-+fi
-+
-+lib_ssl=yes
-+lib_smime=yes
-+lib_nss=yes
-+lib_nssutil=yes
-+
-+while test $# -gt 0; do
-+  case "$1" in
-+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-+  *) optarg= ;;
-+  esac
-+
-+  case $1 in
-+    --prefix=*)
-+      prefix=$optarg
-+      ;;
-+    --prefix)
-+      echo_prefix=yes
-+      ;;
-+    --exec-prefix=*)
-+      exec_prefix=$optarg
-+      ;;
-+    --exec-prefix)
-+      echo_exec_prefix=yes
-+      ;;
-+    --includedir=*)
-+      includedir=$optarg
-+      ;;
-+    --includedir)
-+      echo_includedir=yes
-+      ;;
-+    --libdir=*)
-+      libdir=$optarg
-+      ;;
-+    --libdir)
-+      echo_libdir=yes
-+      ;;
-+    --version)
-+      echo ${major_version}.${minor_version}.${patch_version}
-+      ;;
-+    --cflags)
-+      echo_cflags=yes
-+      ;;
-+    --libs)
-+      echo_libs=yes
-+      ;;
-+    ssl)
-+      lib_ssl=yes
-+      ;;
-+    smime)
-+      lib_smime=yes
-+      ;;
-+    nss)
-+      lib_nss=yes
-+      ;;
-+    nssutil)                                                      
-+      lib_nssutil=yes                                             
-+      ;;
-+    *)
-+      usage 1 1>&2
-+      ;;
-+  esac
-+  shift
-+done
-+
-+# Set variables that may be dependent upon other variables
-+if test -z "$exec_prefix"; then
-+    exec_prefix=`pkg-config --variable=exec_prefix nss`
-+fi
-+if test -z "$includedir"; then
-+    includedir=`pkg-config --variable=includedir nss`
-+fi
-+if test -z "$libdir"; then
-+    libdir=`pkg-config --variable=libdir nss`
-+fi
-+
-+if test "$echo_prefix" = "yes"; then
-+    echo $prefix
-+fi
-+
-+if test "$echo_exec_prefix" = "yes"; then
-+    echo $exec_prefix
-+fi
-+
-+if test "$echo_includedir" = "yes"; then
-+    echo $includedir
-+fi
-+
-+if test "$echo_libdir" = "yes"; then
-+    echo $libdir
-+fi
-+
-+if test "$echo_cflags" = "yes"; then
-+    echo -I$includedir
-+fi
-+
-+if test "$echo_libs" = "yes"; then
-+      libdirs=""
-+      if test -n "$lib_ssl"; then
-+	libdirs="$libdirs -lssl${major_version}"
-+      fi
-+      if test -n "$lib_smime"; then
-+	libdirs="$libdirs -lsmime${major_version}"
-+      fi
-+      if test -n "$lib_nss"; then
-+	libdirs="$libdirs -lnss${major_version}"
-+      fi
-+      if test -n "$lib_nssutil"; then
-+       libdirs="$libdirs -lnssutil${major_version}"
-+      fi
-+      echo $libdirs
-+fi      
-+
-diff -urN a/nss/config/nss.pc.in b/nss/config/nss.pc.in
---- a/nss/config/nss.pc.in	1969-12-31 18:00:00.000000000 -0600
-+++ b/nss/config/nss.pc.in	2015-11-15 10:42:46.251578304 -0600
-@@ -0,0 +1,12 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+
-+Name: NSS
-+Description: Network Security Services
-+Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
-+Requires: nspr >= 4.8
-+Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
-+Cflags: -I${includedir}
-+
-diff -urN a/nss/Makefile b/nss/Makefile
---- a/nss/Makefile	2015-11-15 09:25:06.410786060 -0600
-+++ b/nss/Makefile	2015-11-15 10:42:46.252578304 -0600
-@@ -46,7 +46,7 @@
- # (7) Execute "local" rules. (OPTIONAL).                              #
- #######################################################################
- 
--nss_build_all: build_nspr all
-+nss_build_all: all
- 
- nss_clean_all: clobber_nspr clobber
- 
-@@ -115,12 +115,6 @@
- 	--with-dist-prefix='$(NSPR_PREFIX)' \
- 	--with-dist-includedir='$(NSPR_PREFIX)/include'
- 
--build_nspr: $(NSPR_CONFIG_STATUS)
--	$(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)
--
--clobber_nspr: $(NSPR_CONFIG_STATUS)
--	$(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) clobber
--
- build_docs:
- 	$(MAKE) -C $(CORE_DEPTH)/doc
- 
-diff -urN a/nss/manifest.mn b/nss/manifest.mn
---- a/nss/manifest.mn	2015-11-15 09:25:06.411786060 -0600
-+++ b/nss/manifest.mn	2015-11-15 10:43:15.633576994 -0600
-@@ -10,4 +10,4 @@
- 
- RELEASE = nss
- 
--DIRS = coreconf lib cmd external_tests
-+DIRS = coreconf lib cmd config
diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix
index 978b28aaa480..af0456c0162b 100644
--- a/pkgs/development/libraries/opencv/3.x.nix
+++ b/pkgs/development/libraries/opencv/3.x.nix
@@ -1,81 +1,103 @@
-{ lib, stdenv, fetchurl, fetchpatch, fetchFromGitHub, cmake, pkgconfig, unzip
-, zlib
-, enableIpp ? false
-, enableContrib ? false
-, enablePython ? false, pythonPackages
-, enableGtk2 ? false, gtk2
-, enableGtk3 ? false, gtk3
-, enableJPEG ? true, libjpeg
-, enablePNG ? true, libpng
-, enableTIFF ? true, libtiff
-, enableWebP ? true, libwebp
-, enableEXR ? true, openexr, ilmbase
-, enableJPEG2K ? true, jasper
-, enableFfmpeg ? false, ffmpeg
+{ lib, stdenv, fetchurl, fetchpatch, fetchFromGitHub, cmake, pkgconfig, unzip, zlib
+
+, enableJPEG      ? true, libjpeg
+, enablePNG       ? true, libpng
+, enableTIFF      ? true, libtiff
+, enableWebP      ? true, libwebp
+, enableEXR       ? true, openexr, ilmbase
+, enableJPEG2K    ? true, jasper
+
+, enableIpp       ? false
+, enableContrib   ? false, protobuf3_1
+, enablePython    ? false, pythonPackages
+, enableGtk2      ? false, gtk2
+, enableGtk3      ? false, gtk3
+, enableFfmpeg    ? false, ffmpeg
 , enableGStreamer ? false, gst_all_1
-, enableEigen ? false, eigen
-, enableCuda ? false, cudatoolkit, gcc5
+, enableEigen     ? false, eigen
+, enableCuda      ? false, cudatoolkit, gcc5
 }:
 
 let
-  version = "3.1.0";
+  version = "3.2.0";
+
+  src = fetchFromGitHub {
+    owner  = "opencv";
+    repo   = "opencv";
+    rev    = version;
+    sha256 = "0f59g0dvhp5xg1xa3r4lp351a7x0k03i77ylgcf69ns3y47qd16p";
+  };
 
   contribSrc = fetchFromGitHub {
-    owner = "Itseez";
-    repo = "opencv_contrib";
-    rev = version;
-    sha256 = "153yx62f34gl3zd6vgxv0fj3wccwmq78lnawlda1f6xhrclg9bax";
+    owner  = "opencv";
+    repo   = "opencv_contrib";
+    rev    = version;
+    sha256 = "1lynpbxz1jay3ya5y45zac5v8c6ifgk4ssn8d1chfdk3spi691jj";
   };
 
-  opencvFlag = name: enabled: "-DWITH_${name}=${if enabled then "ON" else "OFF"}";
+  vggFiles = fetchFromGitHub {
+    owner  = "opencv";
+    repo   = "opencv_3rdparty";
+    rev    = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d";
+    sha256 = "0r9fam8dplyqqsd3qgpnnfgf9l7lj44di19rxwbm8mxiw0rlcdvy";
+  };
+
+  bootdescFiles = fetchFromGitHub {
+    owner  = "opencv";
+    repo   = "opencv_3rdparty";
+    rev    = "34e4206aef44d50e6bbcd0ab06354b52e7466d26";
+    sha256 = "13yig1xhvgghvxspxmdidss5lqiikpjr0ddm83jsi0k85j92sn62";
+  };
 
+  opencvFlag = name: enabled: "-DWITH_${name}=${if enabled then "ON" else "OFF"}";
 in
 
 stdenv.mkDerivation rec {
   name = "opencv-${version}";
-  inherit version;
-
-  src = fetchFromGitHub {
-    owner = "Itseez";
-    repo = "opencv";
-    rev = version;
-    sha256 = "1l0w12czavgs0wzw1c594g358ilvfg2fn32cn8z7pv84zxj4g429";
-  };
-
-  patches =
-    lib.optionals enableCuda [
-      (fetchpatch { # Patch for CUDA 8 compatibility
-        url = "https://github.com/opencv/opencv/commit/10896129b39655e19e4e7c529153cb5c2191a1db.patch";
-        sha256 = "0jka3kxxywgs3prqqgym5kav6p73rrblwj50k1nf3fvfpk194ah1";
-      })
-      (fetchpatch { # Patch to add CUDA Compute Capability compilation targets up to 6.0
-        url = "https://github.com/opencv/opencv/commit/d76f258aebdf63f979a205cabe6d3e81700a7cd8.patch";
-        sha256 = "00b3msfgrcw7laij6qafn4b18c1dl96xxpzwx05wxzrjldqb6kqg";
-      })
-    ]
-    ++ lib.optional enablePython (fetchpatch { # Patch to fix FlannBasedMatcher under python
-      url = "https://github.com/opencv/opencv/commit/05cfe28612fd8dc8fb0ccb876df945c7b435dd26.patch";
-      sha256 = "0niza5lybr1ljzdkyiapr16laa468168qinpy5qn00yimnaygpm6";
-    });
-
+  inherit version src;
+
+  postUnpack =
+    (lib.optionalString enableContrib ''
+      cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/opencv_contrib"
+
+      for name in vgg_generated_48.i \
+                  vgg_generated_64.i \
+                  vgg_generated_80.i \
+                  vgg_generated_120.i; do
+        ln -s "${vggFiles}/$name" "$NIX_BUILD_TOP/opencv_contrib/xfeatures2d/src/$name"
+      done
+
+      for name in boostdesc_bgm.i          \
+                  boostdesc_bgm_bi.i       \
+                  boostdesc_bgm_hd.i       \
+                  boostdesc_binboost_064.i \
+                  boostdesc_binboost_128.i \
+                  boostdesc_binboost_256.i \
+                  boostdesc_lbgm.i; do
+        ln -s "${bootdescFiles}/$name" "$NIX_BUILD_TOP/opencv_contrib/xfeatures2d/src/$name"
+      done
+    '');
   preConfigure =
-    let ippicvVersion = "20151201";
-        ippicvPlatform = if stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux" then "linux"
-                         else throw "ICV is not available for this platform (or not yet supported by this package)";
-        ippicvHash = if ippicvPlatform == "linux" then "1nph0w0pdcxwhdb5lxkb8whpwd9ylvwl97hn0k425amg80z86cs3"
-                     else throw "ippicvHash: impossible";
-
-        ippicvName = "ippicv_${ippicvPlatform}_${ippicvVersion}.tgz";
-        ippicvArchive = "3rdparty/ippicv/downloads/linux-${ippicvHash}/${ippicvName}";
-        ippicv = fetchurl {
-          url = "https://github.com/Itseez/opencv_3rdparty/raw/ippicv/master_${ippicvVersion}/ippicv/${ippicvName}";
-          sha256 = ippicvHash;
-        };
-    in lib.optionalString enableIpp
-      ''
-        mkdir -p $(dirname ${ippicvArchive})
-        ln -s ${ippicv}    ${ippicvArchive}
-      '';
+    (let version  = "20151201";
+         md5      = "808b791a6eac9ed78d32a7666804320e";
+         sha256   = "1nph0w0pdcxwhdb5lxkb8whpwd9ylvwl97hn0k425amg80z86cs3";
+         rev      = "81a676001ca8075ada498583e4166079e5744668";
+         platform = if stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux" then "linux"
+                    else throw "ICV is not available for this platform (or not yet supported by this package)";
+         name = "ippicv_${platform}_${version}.tgz";
+         ippicv = fetchurl {
+           url = "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${rev}/ippicv/${name}";
+           inherit sha256;
+         };
+         dir = "3rdparty/ippicv/downloads/${platform}-${md5}";
+     in lib.optionalString enableIpp ''
+          mkdir -p "${dir}"
+          ln -s "${ippicv}" "${dir}/${name}"
+        ''
+    ) +
+    (lib.optionalString enableContrib ''
+      cmakeFlagsArray+=("-DOPENCV_EXTRA_MODULES_PATH=$NIX_BUILD_TOP/opencv_contrib")
+    '');
 
   buildInputs =
        [ zlib ]
@@ -91,7 +113,8 @@ stdenv.mkDerivation rec {
     ++ lib.optional enableFfmpeg ffmpeg
     ++ lib.optionals enableGStreamer (with gst_all_1; [ gstreamer gst-plugins-base ])
     ++ lib.optional enableEigen eigen
-    ++ lib.optional enableCuda [ cudatoolkit gcc5 ]
+    ++ lib.optionals enableCuda [ cudatoolkit gcc5 ]
+    ++ lib.optional enableContrib protobuf3_1
     ;
 
   propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy;
@@ -110,8 +133,8 @@ stdenv.mkDerivation rec {
     (opencvFlag "OPENEXR" enableEXR)
     (opencvFlag "CUDA" enableCuda)
     (opencvFlag "CUBLAS" enableCuda)
-  ] ++ lib.optionals enableContrib [ "-DOPENCV_EXTRA_MODULES_PATH=${contribSrc}/modules" ]
-    ++ lib.optionals enableCuda [ "-DCUDA_FAST_MATH=ON" ];
+  ] ++ lib.optionals enableCuda [ "-DCUDA_FAST_MATH=ON" ]
+    ++ lib.optional enableContrib "-DBUILD_PROTOBUF=off";
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix
index cd4a696b1d98..b65f7880de56 100644
--- a/pkgs/development/libraries/openssl/default.nix
+++ b/pkgs/development/libraries/openssl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, perl
+{ stdenv, fetchurl, buildPackages, perl
 , withCryptodev ? false, cryptodevHeaders
 , enableSSL2 ? false }:
 
@@ -76,7 +76,7 @@ let
 
     postFixup = ''
       # Check to make sure the main output doesn't depend on perl
-      if grep -r '${perl}' $out; then
+      if grep -r '${buildPackages.perl}' $out; then
         echo "Found an erroneous dependency on perl ^^^" >&2
         exit 1
       fi
@@ -109,24 +109,24 @@ let
 
 in {
 
-  openssl_1_0_1 = common {
+  openssl_1_0_1-vulnerable = common {
     version = "1.0.1u";
     sha256 = "0fb7y9pwbd76pgzd7xzqfrzibmc0vf03sl07f34z5dhm2b5b84j3";
   };
 
   openssl_1_0_2 = common {
-    version = "1.0.2j";
-    sha256 = "0cf4ar97ijfc7mg35zdgpad6x8ivkdx9qii6mz35khi1ps9g5bz7";
+    version = "1.0.2k";
+    sha256 = "1h6qi35w6hv6rd73p4cdgdzg732pdrfgpp37cgwz1v9a3z37ffbb";
   };
 
   openssl_1_1_0 = common {
-    version = "1.1.0c";
-    sha256 = "1xfn5ydl14myd9wgxm4nxy5a42cpp1g12ijf3g9m4mz0l90n8hzw";
+    version = "1.1.0d";
+    sha256 = "1pv0zql3r73qpjini90hn29l28d65b7i777zav0larbmi6gbnpkx";
   };
 
   openssl_1_0_2-steam = common {
-    version = "1.0.2j";
-    sha256 = "0cf4ar97ijfc7mg35zdgpad6x8ivkdx9qii6mz35khi1ps9g5bz7";
+    version = "1.0.2k";
+    sha256 = "1h6qi35w6hv6rd73p4cdgdzg732pdrfgpp37cgwz1v9a3z37ffbb";
     configureFlags = [ "no-engine" ];
     makeDepend = true;
     patches = [ ./openssl-fix-cpuid_setup.patch ];
diff --git a/pkgs/development/libraries/postgis/default.nix b/pkgs/development/libraries/postgis/default.nix
index 1886038dff3f..44a66409d45f 100644
--- a/pkgs/development/libraries/postgis/default.nix
+++ b/pkgs/development/libraries/postgis/default.nix
@@ -5,7 +5,7 @@ args@{fetchurl, composableDerivation, stdenv, perl, libxml2, postgresql, geos, p
   ### NixOS - usage:
   ==================
 
-    services.postgresql.extraPlugins = [ (pkgs.postgis.override { postgresql = pkgs.postgresql95; }).v_2_2_1 ];
+    services.postgresql.extraPlugins = [ (pkgs.postgis.override { postgresql = pkgs.postgresql95; }).v_2_3_1 ];
 
 
   ### important Postgis implementation details:
@@ -84,9 +84,9 @@ let
 
 in rec {
 
-  v_2_2_1 = pgDerivationBaseNewer.merge ( fix : {
-    version = "2.2.1";
-    sha256 = "02gsi1cm63kf0r7881444lrkzdjqhhpz9a5zav3al0q24nq01r8g";
+  v_2_3_1 = pgDerivationBaseNewer.merge ( fix : {
+    version = "2.3.1";
+    sha256 = "0xd21h2k6x3i1b3z6pgm3pmkfpxm6irxd5wbx68acjndjgd6p3ac";
     sql_srcs = ["postgis.sql" "spatial_ref_sys.sql"];
     builtInputs = [gdal json_c pkgconfig];
 
diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix
index 8161d3bfa1fd..6e86780446c5 100644
--- a/pkgs/development/libraries/sqlite/default.nix
+++ b/pkgs/development/libraries/sqlite/default.nix
@@ -3,11 +3,11 @@
 assert interactive -> readline != null && ncurses != null;
 
 stdenv.mkDerivation {
-  name = "sqlite-3.15.2";
+  name = "sqlite-3.16.2";
 
   src = fetchurl {
-    url = "http://sqlite.org/2016/sqlite-autoconf-3150200.tar.gz";
-    sha256 = "0j9i1zrwxc7dfd6xr3xagal3incrlalsrk96havnas1qp5im1cq7";
+    url = "http://sqlite.org/2017/sqlite-autoconf-3160200.tar.gz";
+    sha256 = "059n4s9qd35qpbd4g29y9ay99a6f68ad7k65g430rxb6jcz0rk35";
   };
 
   outputs = [ "bin" "dev" "out" ];
diff --git a/pkgs/development/libraries/t1lib/default.nix b/pkgs/development/libraries/t1lib/default.nix
index c6f3d68ebd60..8a76e886b4f6 100644
--- a/pkgs/development/libraries/t1lib/default.nix
+++ b/pkgs/development/libraries/t1lib/default.nix
@@ -13,6 +13,7 @@ let
     { name = "CVE-2011-0764.diff"; sha256 = "1j0y3f38im7srpqjg9jvx8as6sxkz8gw7hglcxnxl9qylx8mr2jh"; }
     { name = "CVE-2011-1552_1553_1554.patch"; sha256 = "16cyq6jhyhh8912j8hapx9pq4rzxk36ljlkxlnyi7i3wr8iz1dir"; }
     { name = "CVE-2010-2642.patch"; sha256 = "175zvyr9v1xs22k2svgxqjcpz5nihfa7j46hn9nzvkqcrhm5m9y8"; }
+      # this ^ also fixes CVE-2011-5244
   ];
 in
 stdenv.mkDerivation {
diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix
index cafe329c0767..3c56b3ecb8af 100644
--- a/pkgs/development/mobile/titaniumenv/build-app.nix
+++ b/pkgs/development/mobile/titaniumenv/build-app.nix
@@ -1,7 +1,7 @@
 {stdenv, androidsdk, titaniumsdk, titanium, alloy, xcodewrapper, jdk, python, nodejs, which, xcodeBaseDir}:
 { name, src, target, androidPlatformVersions ? [ "23" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null
 , release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null
-, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "9.2"
+, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "10.2"
 , enableWirelessDistribution ? false, installURL ? null
 }:
 
diff --git a/pkgs/development/mobile/titaniumenv/default.nix b/pkgs/development/mobile/titaniumenv/default.nix
index ae7a16984b8e..6ca4c441e640 100644
--- a/pkgs/development/mobile/titaniumenv/default.nix
+++ b/pkgs/development/mobile/titaniumenv/default.nix
@@ -1,4 +1,4 @@
-{pkgs, pkgs_i686, xcodeVersion ? "7.2", xcodeBaseDir ? "/Applications/Xcode.app", tiVersion ? "5.2.3.GA"}:
+{pkgs, pkgs_i686, xcodeVersion ? "8.2.1", xcodeBaseDir ? "/Applications/Xcode.app", tiVersion ? "6.0.2.GA"}:
 
 rec {
   androidenv = pkgs.androidenv;
@@ -11,6 +11,7 @@ rec {
   titaniumsdk = let
     titaniumSdkFile = if tiVersion == "5.1.2.GA" then ./titaniumsdk-5.1.nix
       else if tiVersion == "5.2.3.GA" then ./titaniumsdk-5.2.nix
+      else if tiVersion == "6.0.2.GA" then ./titaniumsdk-6.0.nix
       else throw "Titanium version not supported: "+tiVersion;
     in
     import titaniumSdkFile {
@@ -19,7 +20,7 @@ rec {
   
   buildApp = import ./build-app.nix {
     inherit (pkgs) stdenv python which jdk nodejs;
-    inherit (pkgs.nodePackages) titanium alloy;
+    inherit (pkgs.nodePackages_4_x) titanium alloy;
     inherit (androidenv) androidsdk;
     inherit (xcodeenv) xcodewrapper;
     inherit titaniumsdk xcodeBaseDir;
diff --git a/pkgs/development/mobile/titaniumenv/examples/default.nix b/pkgs/development/mobile/titaniumenv/examples/default.nix
index ffeefdbbbcfa..3c5d3a018ec8 100644
--- a/pkgs/development/mobile/titaniumenv/examples/default.nix
+++ b/pkgs/development/mobile/titaniumenv/examples/default.nix
@@ -1,10 +1,10 @@
 { nixpkgs ? <nixpkgs>
 , systems ? [ "x86_64-linux" "x86_64-darwin" ]
-, xcodeVersion ? "7.2"
+, xcodeVersion ? "8.2.1"
 , xcodeBaseDir ? "/Applications/Xcode.app"
-, tiVersion ? "5.1.2.GA"
+, tiVersion ? "6.0.2.GA"
 , rename ? false
-, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "9.2"
+, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "10.2"
 , enableWirelessDistribution ? false, installURL ? null
 }:
 
diff --git a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix b/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix
index 60b96548da46..4abf650ebee1 100644
--- a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix
+++ b/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix
@@ -8,8 +8,8 @@ assert rename -> (stdenv != null && newBundleId != null && iosMobileProvisioning
 let
   src = fetchgit {
     url = https://github.com/appcelerator/KitchenSink.git;
-    rev = "6e9f509069fafdebfa78e15b2d14f20a27a485cc";
-    sha256 = "049cf0d9y0ivhsi35slx621z0wry4lqf76hw0ksb315i2713v347";
+    rev = "ec9edebf35030f61368000a8a9071dd7a0773884";
+    sha256 = "1j41w4nhcbl40x550pjgabqrach80f9dybv7ya32771wnw2000iy";
   };
   
   # Rename the bundle id to something else
diff --git a/pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix b/pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix
index 15a86e338dea..5bdd0fd63c5a 100644
--- a/pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix
+++ b/pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix
@@ -3,5 +3,5 @@
 xcodeenv.simulateApp {
   name = "simulate-${kitchensink.name}";
   inherit bundleId;
-  app = "${kitchensink}/build/iphone/build/Debug-iphonesimulator";
+  app = "${kitchensink}/build/iphone/build/Products/Debug-iphonesimulator";
 }
diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-6.0.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-6.0.nix
new file mode 100644
index 000000000000..fdaaff394534
--- /dev/null
+++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-6.0.nix
@@ -0,0 +1,39 @@
+{stdenv, fetchurl, unzip, makeWrapper, python, jdk}:
+
+stdenv.mkDerivation {
+  name = "mobilesdk-6.0.2.GA";
+  src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl {
+    url = http://builds.appcelerator.com/mobile/6_0_X/mobilesdk-6.0.2.v20170123140026-linux.zip;
+    sha256 = "1yjhr4fgjnxfxzwmgw71yynrfzhsjqj2cirjr5rd14zlp4q9751q";
+  }
+  else if stdenv.system == "x86_64-darwin" then fetchurl {
+    url = http://builds.appcelerator.com/mobile/6_0_X/mobilesdk-6.0.2.v20170123140026-osx.zip;
+    sha256 = "1ijd1wp56ygy238xpcffy112akim208wbv5zm901dvych83ibw1c";
+  }
+  else throw "Platform: ${stdenv.system} not supported!";
+  
+  buildInputs = [ unzip makeWrapper ];
+  
+  buildCommand = ''
+    mkdir -p $out
+    cd $out
+    (yes y | unzip $src) || true
+    
+    # Rename ugly version number
+    cd mobilesdk/*
+    mv * 6.0.2.GA
+    cd *
+    
+    # Patch some executables
+    
+    ${if stdenv.system == "i686-linux" then
+      ''
+        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32
+      ''
+      else if stdenv.system == "x86_64-linux" then
+      ''
+        patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64
+      ''
+      else ""}
+  '';
+}
diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix
index b2e6f84bb000..7e46aefb2997 100644
--- a/pkgs/development/mobile/xcodeenv/build-app.nix
+++ b/pkgs/development/mobile/xcodeenv/build-app.nix
@@ -1,12 +1,11 @@
 {stdenv, xcodewrapper}:
 { name
 , src
-, sdkVersion ? "6.1"
+, sdkVersion ? "10.2"
 , target ? null
 , configuration ? null
 , scheme ? null
 , sdk ? null
-, arch ? null
 , xcodeFlags ? ""
 , release ? false
 , codeSignIdentity ? null
@@ -35,11 +34,6 @@ let
       if release then "Release" else "Debug"
     else configuration;
     
-  _arch = if arch == null
-    then
-      if release then "armv7" else "x86_64"
-    else arch;
-
   _sdk = if sdk == null
     then
       if release then "iphoneos" + sdkVersion else "iphonesimulator" + sdkVersion
@@ -83,7 +77,7 @@ stdenv.mkDerivation {
       ''}
 
     # Do the building
-    xcodebuild -target ${_target} -configuration ${_configuration} ${stdenv.lib.optionalString (scheme != null) "-scheme ${scheme}"} -sdk ${_sdk} -arch ${_arch} ONLY_ACTIVE_ARCH=NO VALID_ARCHS="${_arch}" CONFIGURATION_TEMP_DIR=$TMPDIR CONFIGURATION_BUILD_DIR=$out ${if generateXCArchive then "archive" else ""} ${xcodeFlags} ${if release then ''"CODE_SIGN_IDENTITY=${codeSignIdentity}" PROVISIONING_PROFILE=$PROVISIONING_PROFILE OTHER_CODE_SIGN_FLAGS="--keychain $HOME/Library/Keychains/$keychainName"'' else ""}
+    xcodebuild -target ${_target} -configuration ${_configuration} ${stdenv.lib.optionalString (scheme != null) "-scheme ${scheme}"} -sdk ${_sdk} TARGETED_DEVICE_FAMILY="1, 2" ONLY_ACTIVE_ARCH=NO CONFIGURATION_TEMP_DIR=$TMPDIR CONFIGURATION_BUILD_DIR=$out ${if generateXCArchive then "archive" else ""} ${xcodeFlags} ${if release then ''"CODE_SIGN_IDENTITY=${codeSignIdentity}" PROVISIONING_PROFILE=$PROVISIONING_PROFILE OTHER_CODE_SIGN_FLAGS="--keychain $HOME/Library/Keychains/$keychainName"'' else ""}
     
     ${stdenv.lib.optionalString release ''
       ${stdenv.lib.optionalString generateIPA ''
diff --git a/pkgs/development/mobile/xcodeenv/default.nix b/pkgs/development/mobile/xcodeenv/default.nix
index d7e35142be4c..afe430df383a 100644
--- a/pkgs/development/mobile/xcodeenv/default.nix
+++ b/pkgs/development/mobile/xcodeenv/default.nix
@@ -1,4 +1,4 @@
-{stdenv, version ? "7.2", xcodeBaseDir ? "/Applications/Xcode.app"}:
+{stdenv, version ? "8.2.1", xcodeBaseDir ? "/Applications/Xcode.app"}:
 
 rec {
   xcodewrapper = import ./xcodewrapper.nix {
diff --git a/pkgs/development/mobile/xcodeenv/simulate-app.nix b/pkgs/development/mobile/xcodeenv/simulate-app.nix
index ecfdbe2a6e39..5f71b5994080 100644
--- a/pkgs/development/mobile/xcodeenv/simulate-app.nix
+++ b/pkgs/development/mobile/xcodeenv/simulate-app.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
     
     # Copy the app and restore the write permissions
     appTmpDir=$(mktemp -d -t appTmpDir)
-    cp -r "$(echo ${app}/*.app)" $appTmpDir
+    cp -r "$(echo ${app}/*.app)" "$appTmpDir"
     chmod -R 755 "$(echo $appTmpDir/*.app)"
     
     # Wait for the simulator to start
@@ -33,7 +33,7 @@ stdenv.mkDerivation {
     read
     
     # Install the app
-    xcrun simctl install $udid "$(echo $appTmpDir/*.app)"
+    xcrun simctl install "$udid" "$(echo $appTmpDir/*.app)"
     
     # Remove the app tempdir
     rm -Rf $appTmpDir
@@ -45,4 +45,3 @@ stdenv.mkDerivation {
     chmod +x $out/bin/run-test-simulator
   '';
 }
-
diff --git a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
index 26b0197b2e13..38afe86c5aa5 100644
--- a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
+++ b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
@@ -8,8 +8,8 @@ stdenv.mkDerivation {
     ln -s /usr/bin/xcode-select
     ln -s /usr/bin/security
     ln -s /usr/bin/codesign
+    ln -s /usr/bin/xcrun
     ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"
-    ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcrun"
     ln -s "${xcodeBaseDir}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator"
 
     cd ..
diff --git a/pkgs/development/ocaml-modules/apron/default.nix b/pkgs/development/ocaml-modules/apron/default.nix
new file mode 100644
index 000000000000..0e73c6a73d31
--- /dev/null
+++ b/pkgs/development/ocaml-modules/apron/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchzip, perl, gmp, mpfr, ppl, ocaml, findlib, camlidl, mlgmpidl }:
+
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-apron-${version}";
+  version = "20160125";
+  src = fetchzip {
+    url = "http://apron.gforge.inria.fr/apron-${version}.tar.gz";
+    sha256 = "1a7b7b9wsd0gdvm41lgg6ayb85wxc2a3ggcrghy4qiphs4b9v4m4";
+  };
+
+  buildInputs = [ perl gmp mpfr ppl ocaml findlib camlidl ];
+  propagatedBuildInputs = [ mlgmpidl ];
+
+  prefixKey = "-prefix ";
+  createFindlibDestdir = true;
+
+  meta = {
+    license = stdenv.lib.licenses.lgpl21;
+    homepage = http://apron.cri.ensmp.fr/library/;
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+    description = "Numerical abstract domain library";
+    inherit (ocaml.meta) platforms;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/mlgmpidl/default.nix b/pkgs/development/ocaml-modules/mlgmpidl/default.nix
new file mode 100644
index 000000000000..7e12abe386b8
--- /dev/null
+++ b/pkgs/development/ocaml-modules/mlgmpidl/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, camlidl, gmp, mpfr }:
+
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-mlgmpidl-${version}";
+  version = "1.2.4";
+  src = fetchFromGitHub {
+    owner = "nberth";
+    repo = "mlgmpidl";
+    rev = version;
+    sha256 = "09f9rk2bavhb7cdwjpibjf8bcjk59z85ac9dr8nvks1s842dp65s";
+  };
+
+  buildInputs = [ gmp mpfr ocaml findlib camlidl ];
+
+  configurePhase = ''
+    cp Makefile.config.model Makefile.config
+    sed -i Makefile.config \
+      -e 's|^MLGMPIDL_PREFIX.*$|MLGMPIDL_PREFIX = $out|' \
+      -e 's|^GMP_PREFIX.*$|GMP_PREFIX = ${gmp.dev}|' \
+      -e 's|^MPFR_PREFIX.*$|MPFR_PREFIX = ${mpfr.dev}|' \
+      -e 's|^CAMLIDL_DIR.*$|CAMLIDL_DIR = ${camlidl}/lib/ocaml/${ocaml.version}/site-lib/camlidl|'
+    echo HAS_NATIVE_PLUGINS = 1 >> Makefile.config
+    sed -i Makefile \
+      -e 's|^	/bin/rm |	rm |'
+  '';
+
+  createFindlibDestdir = true;
+
+  meta = {
+    description = "OCaml interface to the GMP library";
+    homepage = https://www.inrialpes.fr/pop-art/people/bjeannet/mlxxxidl-forge/mlgmpidl/;
+    license = stdenv.lib.licenses.lgpl21;
+    inherit (ocaml.meta) platforms;
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/mtime/default.nix b/pkgs/development/ocaml-modules/mtime/default.nix
new file mode 100644
index 000000000000..a26109bd4f95
--- /dev/null
+++ b/pkgs/development/ocaml-modules/mtime/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, js_of_ocaml
+, jsooSupport ? !(stdenv.lib.versionAtLeast ocaml.version "4.04")
+}:
+
+stdenv.mkDerivation {
+  name = "ocaml${ocaml.version}-mtime-0.8.3";
+
+  src = fetchurl {
+    url = http://erratique.ch/software/mtime/releases/mtime-0.8.3.tbz;
+    sha256 = "1hfx4ny2dkw6jf3jppz0640dafl5xgn8r2si9kpwzhmibal8qrah";
+  };
+
+  unpackCmd = "tar xjf $src";
+
+  buildInputs = [ ocaml findlib ocamlbuild opam ]
+  ++ stdenv.lib.optional jsooSupport js_of_ocaml;
+
+  buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true jsoo=${if jsooSupport then "true" else "false"}";
+
+  installPhase = "opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR";
+
+  meta = {
+    description = "Monotonic wall-clock time for OCaml";
+    homepage = http://erratique.ch/software/mtime;
+    inherit (ocaml.meta) platforms;
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+    license = stdenv.lib.licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix b/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix
index d2d66994604b..653445617958 100644
--- a/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix
+++ b/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix
@@ -1,15 +1,15 @@
-{ stdenv, fetchzip, ocaml, findlib, oasis, ocaml_optcomp, camlp4 }:
+{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, oasis, ocaml_optcomp, camlp4 }:
 
-let version = "0.7"; in
+let version = "0.7.1"; in
 
 stdenv.mkDerivation {
   name = "ocsigen-deriving-${version}";
   src = fetchzip {
     url = "https://github.com/ocsigen/deriving/archive/${version}.tar.gz";
-    sha256 = "05z606gly1iyan292x3mflg3zasgg68n8i2mivz0zbshx2hz2jbw";
+    sha256 = "0gg3nr3iic4rwqrcc0qvfm9x0x57zclvdsnpy0z8rv2fl5isbzms";
     };
 
-  buildInputs = [ ocaml findlib oasis ocaml_optcomp camlp4 ];
+  buildInputs = [ ocaml findlib ocamlbuild oasis ocaml_optcomp camlp4 ];
 
   createFindlibDestdir = true;
 
diff --git a/pkgs/development/ocaml-modules/optcomp/default.nix b/pkgs/development/ocaml-modules/optcomp/default.nix
index 7afbf3a4b407..8953373954a5 100644
--- a/pkgs/development/ocaml-modules/optcomp/default.nix
+++ b/pkgs/development/ocaml-modules/optcomp/default.nix
@@ -4,8 +4,8 @@ stdenv.mkDerivation {
   name = "ocaml-optcomp-1.6";
   src = fetchurl {
     url = https://github.com/diml/optcomp/archive/1.6.tar.gz;
-    md5 = "d3587244dba1b8b10f24d0b60a8c700d";
-    };
+    sha256 = "0hhhb2gisah1h22zlg5iszbgqxdd7x85cwd57bd4mfkx9l7dh8jh";
+  };
   
   createFindlibDestdir = true;
 
diff --git a/pkgs/development/ocaml-modules/ppx_tools/default.nix b/pkgs/development/ocaml-modules/ppx_tools/default.nix
index 33bf180cd7f3..b6a6039a4faa 100644
--- a/pkgs/development/ocaml-modules/ppx_tools/default.nix
+++ b/pkgs/development/ocaml-modules/ppx_tools/default.nix
@@ -1,19 +1,21 @@
 { stdenv, fetchFromGitHub, ocaml, findlib }:
 
-let
-  version =
-  if stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.03" then "5.0+4.03.0" else "5.0+4.02.0";
+let param = {
+  "4.02.3" = {
+    version = "5.0+4.02.0";
+    sha256 = "16drjk0qafjls8blng69qiv35a84wlafpk16grrg2i3x19p8dlj8"; };
+  "4.03.0" = {
+    version = "5.0+4.03.0";
+    sha256 = "061v1fl5z7z3ywi4ppryrlcywnvnqbsw83ppq72qmkc7ma4603jg"; };
+}."${ocaml.version}";
 in
   stdenv.mkDerivation {
-    name = "ocaml-ppx_tools-${version}";
+    name = "ocaml${ocaml.version}-ppx_tools-${param.version}";
     src = fetchFromGitHub {
       owner = "alainfrisch";
       repo = "ppx_tools";
-      rev = version;
-      sha256 = if version == "5.0+4.03.0"
-      then "061v1fl5z7z3ywi4ppryrlcywnvnqbsw83ppq72qmkc7ma4603jg"
-      else "16drjk0qafjls8blng69qiv35a84wlafpk16grrg2i3x19p8dlj8"
-      ;
+      rev = param.version;
+      inherit (param) sha256;
     };
 
     buildInputs = [ ocaml findlib ];
diff --git a/pkgs/development/ocaml-modules/spacetime_lib/default.nix b/pkgs/development/ocaml-modules/spacetime_lib/default.nix
new file mode 100644
index 000000000000..c12e47968ef0
--- /dev/null
+++ b/pkgs/development/ocaml-modules/spacetime_lib/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, owee }:
+
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-spacetime_lib-${version}";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "lpw25";
+    repo = "spacetime_lib";
+    rev = version;
+    sha256 = "1g91y6wl3z18jhaz2q03wn54zj6xk1qcjidr1nc6nq9a8906lcq5";
+  };
+
+  buildInputs = [ ocaml findlib ];
+
+  propagatedBuildInputs = [ owee ];
+
+  createFindlibDestdir = true;
+
+  meta = {
+    description = "An OCaml library providing some simple operations for handling OCaml “spacetime” profiles";
+    inherit (src.meta) homepage;
+    inherit (ocaml.meta) platforms;
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+  };
+}
diff --git a/pkgs/development/python-modules/django_guardian.nix b/pkgs/development/python-modules/django_guardian.nix
new file mode 100644
index 000000000000..c9217955213d
--- /dev/null
+++ b/pkgs/development/python-modules/django_guardian.nix
@@ -0,0 +1,26 @@
+{ stdenv, buildPythonPackage, python, fetchurl
+, django_environ, mock, django, six
+, pytest, pytestrunner, pytestdjango, setuptools_scm
+}:
+buildPythonPackage rec {
+  name = "django-guardian-${version}";
+  version = "1.4.6";
+
+  src = fetchurl {
+    url = "mirror://pypi/d/django-guardian/${name}.tar.gz";
+    sha256 = "1r3xj0ik0hh6dfak4kjndxk5v73x95nfbppgr394nhnmiayv4zc5";
+  };
+
+  buildInputs = [ pytest pytestrunner pytestdjango django_environ mock setuptools_scm ];
+  propagatedBuildInputs = [ django six ];
+
+  checkPhase = ''
+    ${python.interpreter} nix_run_setup.py test --addopts="--ignore build"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Per object permissions for Django";
+    homepage = https://github.com/django-guardian/django-guardian;
+    licenses = [ licenses.mit licenses.bsd2 ];
+  };
+}
diff --git a/pkgs/development/python-modules/pytest/2_7.nix b/pkgs/development/python-modules/pytest/2_7.nix
new file mode 100644
index 000000000000..adaa640fdbe6
--- /dev/null
+++ b/pkgs/development/python-modules/pytest/2_7.nix
@@ -0,0 +1,28 @@
+{ stdenv, pkgs, buildPythonPackage, fetchurl, isPy26, argparse, py, selenium }:
+buildPythonPackage rec {
+  name = "pytest-2.7.3";
+
+  src = fetchurl {
+    url = "mirror://pypi/p/pytest/${name}.tar.gz";
+    sha256 = "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm";
+  };
+
+  # Disabled temporarily because of Hydra issue with namespaces
+  doCheck = false;
+
+  preCheck = ''
+    # don't test bash builtins
+    rm testing/test_argcomplete.py
+  '';
+
+  propagatedBuildInputs = [ py ]
+    ++ (stdenv.lib.optional isPy26 argparse)
+    ++ stdenv.lib.optional
+      pkgs.config.pythonPackages.pytest.selenium or false
+      selenium;
+
+  meta = with stdenv.lib; {
+    maintainers = with maintainers; [ domenkozar lovek323 madjar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/python-modules/pytest/2_8.nix b/pkgs/development/python-modules/pytest/2_8.nix
new file mode 100644
index 000000000000..6232ccaf7006
--- /dev/null
+++ b/pkgs/development/python-modules/pytest/2_8.nix
@@ -0,0 +1,28 @@
+{ stdenv, pkgs, buildPythonPackage, fetchurl, isPy26, argparse, py, selenium }:
+buildPythonPackage rec {
+  name = "pytest-2.8.7";
+
+  src = fetchurl {
+    url = "mirror://pypi/p/pytest/${name}.tar.gz";
+    sha256 = "1bwb06g64x2gky8x5hcrfpg6r351xwvafimnhm5qxq7wajz8ck7w";
+  };
+
+  # Disabled temporarily because of Hydra issue with namespaces
+  doCheck = false;
+
+  preCheck = ''
+    # don't test bash builtins
+    rm testing/test_argcomplete.py
+  '';
+
+  propagatedBuildInputs = [ py ]
+    ++ (stdenv.lib.optional isPy26 argparse)
+    ++ stdenv.lib.optional
+      pkgs.config.pythonPackages.pytest.selenium or false
+      selenium;
+
+  meta = with stdenv.lib; {
+    maintainers = with maintainers; [ domenkozar lovek323 madjar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/python-modules/pytest/2_9.nix b/pkgs/development/python-modules/pytest/2_9.nix
new file mode 100644
index 000000000000..3ca7120dd92c
--- /dev/null
+++ b/pkgs/development/python-modules/pytest/2_9.nix
@@ -0,0 +1,28 @@
+{ stdenv, pkgs, buildPythonPackage, fetchurl, isPy26, argparse, py, selenium }:
+buildPythonPackage rec {
+  name = "pytest-2.9.2";
+
+  src = fetchurl {
+    url = "mirror://pypi/p/pytest/${name}.tar.gz";
+    sha256 = "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j";
+  };
+
+  # Disabled temporarily because of Hydra issue with namespaces
+  doCheck = false;
+
+  preCheck = ''
+    # don't test bash builtins
+    rm testing/test_argcomplete.py
+  '';
+
+  propagatedBuildInputs = [ py ]
+    ++ (stdenv.lib.optional isPy26 argparse)
+    ++ stdenv.lib.optional
+      pkgs.config.pythonPackages.pytest.selenium or false
+      selenium;
+
+  meta = with stdenv.lib; {
+    maintainers = with maintainers; [ domenkozar lovek323 madjar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/python-modules/pytest/default.nix b/pkgs/development/python-modules/pytest/default.nix
new file mode 100644
index 000000000000..d3fea5a3b43f
--- /dev/null
+++ b/pkgs/development/python-modules/pytest/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, buildPythonPackage, fetchurl, isPy26, argparse, hypothesis, py }:
+buildPythonPackage rec {
+  name = "pytest-${version}";
+  version = "3.0.6";
+
+  preCheck = ''
+    # don't test bash builtins
+    rm testing/test_argcomplete.py
+  '';
+
+  src = fetchurl {
+    url = "mirror://pypi/p/pytest/${name}.tar.gz";
+    sha256 = "0h6rfp7y7c5mqwfm9fy5fq4l9idnp160c82ylcfjg251y6lk8d34";
+  };
+
+  buildInputs = [ hypothesis ];
+  propagatedBuildInputs = [ py ]
+    ++ (stdenv.lib.optional isPy26 argparse);
+
+  meta = with stdenv.lib; {
+    maintainers = with maintainers; [ domenkozar lovek323 madjar lsix ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/python-modules/pytestdjango.nix b/pkgs/development/python-modules/pytestdjango.nix
new file mode 100644
index 000000000000..5a8dd85f4bdb
--- /dev/null
+++ b/pkgs/development/python-modules/pytestdjango.nix
@@ -0,0 +1,21 @@
+{ stdenv, buildPythonPackage, fetchurl
+, pytest, django, setuptools_scm
+}:
+buildPythonPackage rec {
+  name = "pytest-django-${version}";
+  version = "3.1.2";
+
+  src = fetchurl {
+    url = "mirror://pypi/p/pytest-django/${name}.tar.gz";
+    sha256 = "02932m2sr8x22m4az8syr8g835g4ak77varrnw71n6xakmdcr303";
+  };
+
+  buildInputs = [ pytest setuptools_scm ];
+  propagatedBuildInputs = [ django ];
+
+  meta = with stdenv.lib; {
+    description = "py.test plugin for testing of Django applications";
+    homepage = http://pytest-django.readthedocs.org/en/latest/;
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/tools/ammonite/default.nix b/pkgs/development/tools/ammonite/default.nix
index 74c15adc4834..049ea51b8f90 100644
--- a/pkgs/development/tools/ammonite/default.nix
+++ b/pkgs/development/tools/ammonite/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "ammonite-repl-${version}";
-  version = "0.8.1";
+  version = "0.8.2";
 
   src = fetchurl {
-    url = "https://github.com/lihaoyi/Ammonite/releases/download/${version}/${version}";
-    sha256 = "0xwy05yfqr1dfypka9wnm60wm0q60kmckzxfp5x79aib94f5ds51";
+    url = "https://github.com/lihaoyi/Ammonite/releases/download/${version}/2.12-${version}";
+    sha256 = "0fgwqdvk0nljd6xm16r8qdhjcp7ix4vx91w5ab856hllf4911120";
   };
 
   propagatedBuildInputs = [ jre ] ;
diff --git a/pkgs/development/tools/analysis/frama-c/default.nix b/pkgs/development/tools/analysis/frama-c/default.nix
index fc817a8e391e..a1239c6a1216 100644
--- a/pkgs/development/tools/analysis/frama-c/default.nix
+++ b/pkgs/development/tools/analysis/frama-c/default.nix
@@ -1,6 +1,11 @@
-{ stdenv, fetchurl, ncurses, ocamlPackages, graphviz
+{ stdenv, fetchurl, makeWrapper, ncurses, ocamlPackages, graphviz
 , ltl2ba, coq, alt-ergo, why3 }:
 
+let
+  mkocamlpath = p: "${p}/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib";
+  ocamlpath = "${mkocamlpath ocamlPackages.apron}:${mkocamlpath ocamlPackages.mlgmpidl}";
+in
+
 stdenv.mkDerivation rec {
   name    = "frama-c-${version}";
   version = "20160501";
@@ -16,9 +21,11 @@ stdenv.mkDerivation rec {
     sha256 = "1335bhq9v3h46m8aba2c5myi9ghm87q41in0m15xvdrwq5big1jg";
   };
 
+  nativeBuildInputs = [ makeWrapper ];
+
   buildInputs = with ocamlPackages; [
     ncurses ocaml findlib alt-ergo ltl2ba ocamlgraph
-    lablgtk coq graphviz zarith why3 zarith
+    lablgtk coq graphviz zarith why3 apron
   ];
 
 
@@ -38,11 +45,15 @@ stdenv.mkDerivation rec {
     FRAMAC=$out/bin/frama-c ./configure --prefix=$out
     make
     make install
+    for p in $out/bin/frama-c{,-gui};
+    do
+      wrapProgram $p --prefix OCAMLPATH ':' ${ocamlpath}
+    done
   '';
 
-
   # Enter frama-c directory before patching
   prePatch = ''cd frama*'';
+  patches = [ ./dynamic.diff ];
   postPatch = ''
     # strip absolute paths to /usr/bin
     for file in ./configure ./share/Makefile.common ./src/*/configure; do
diff --git a/pkgs/development/tools/analysis/frama-c/dynamic.diff b/pkgs/development/tools/analysis/frama-c/dynamic.diff
new file mode 100644
index 000000000000..7ab2b32de1e7
--- /dev/null
+++ b/pkgs/development/tools/analysis/frama-c/dynamic.diff
@@ -0,0 +1,12 @@
+--- a/src/kernel_services/plugin_entry_points/dynamic.ml	2016-05-30 16:15:22.000000000 +0200
++++ b/src/kernel_services/plugin_entry_points/dynamic.ml	2016-10-13 18:25:31.000000000 +0200
+@@ -287,7 +287,8 @@
+         (List.fold_right (add_dir ~user:false) Config.plugin_dir []) ;
+     let pkgs = ref [] in
+     List.iter (scan_directory pkgs) !load_path ;
+-    let findlib_path = String.concat ":" !load_path in
++    let findlib_path = String.concat ":" (!load_path @
++      try [Sys.getenv "OCAMLPATH"] with Not_found -> []) in
+     Klog.debug ~dkey "setting findlib path to %s" findlib_path;
+     Findlib.init ~env_ocamlpath:findlib_path ();
+     load_packages (List.rev !pkgs) ;
diff --git a/pkgs/development/tools/apktool/default.nix b/pkgs/development/tools/apktool/default.nix
index 9d97b0f9f319..4f87bcd1589e 100644
--- a/pkgs/development/tools/apktool/default.nix
+++ b/pkgs/development/tools/apktool/default.nix
@@ -2,30 +2,25 @@
 
 stdenv.mkDerivation rec {
   name = "apktool-${version}";
-  version = "1.5.2";
+  version = "2.2.2";
 
   src = fetchurl {
-    url = "https://android-apktool.googlecode.com/files/apktool${version}.tar.bz2";
-    sha1 = "2dd828cf79467730c7406aa918f1da1bd21aaec8";
+    url = "https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_${version}.jar";
+    sha256 = "1a94jw0ml08xdwls1q9v5p1zak5qrbw2zyychnm5vch8znyws411";
   };
 
-  unpackCmd = ''
-    tar -xvf $src || true
-    cd apktool*
-  '';
-
-  phases = [ "unpackPhase" "installPhase" ];
+  phases = [ "installPhase" ];
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   sourceRoot = ".";
 
   installPhase = ''
-    install -D apktool.jar "$out/libexec/apktool/apktool.jar"
+    install -D ${src} "$out/libexec/apktool/apktool.jar"
     mkdir -p "$out/bin"
     makeWrapper "${jre}/bin/java" "$out/bin/apktool" \
         --add-flags "-jar $out/libexec/apktool/apktool.jar" \
-        --prefix PATH : "${buildTools}/build-tools/android-4.3/"
+        --prefix PATH : "${buildTools}/build-tools/25.0.1/"
   '';
 
   meta = with stdenv.lib; {
@@ -33,7 +28,7 @@ stdenv.mkDerivation rec {
     homepage    = https://code.google.com/p/android-apktool/;
     license     = licenses.asl20;
     maintainers = with maintainers; [ offline ];
-    platforms = with platforms; unix;
+    platforms   = with platforms; unix;
   };
 
 }
diff --git a/pkgs/development/tools/build-managers/drake/Gemfile b/pkgs/development/tools/build-managers/drake/Gemfile
new file mode 100644
index 000000000000..ddb13a65c165
--- /dev/null
+++ b/pkgs/development/tools/build-managers/drake/Gemfile
@@ -0,0 +1,2 @@
+source 'https://rubygems.org'
+gem 'drake'
diff --git a/pkgs/development/tools/build-managers/drake/Gemfile.lock b/pkgs/development/tools/build-managers/drake/Gemfile.lock
new file mode 100644
index 000000000000..cf8900a30eed
--- /dev/null
+++ b/pkgs/development/tools/build-managers/drake/Gemfile.lock
@@ -0,0 +1,15 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    comp_tree (1.1.3)
+    drake (0.9.2.0.3.1)
+      comp_tree (>= 1.1.3)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  drake
+
+BUNDLED WITH
+   1.13.7
diff --git a/pkgs/development/tools/build-managers/drake/default.nix b/pkgs/development/tools/build-managers/drake/default.nix
new file mode 100644
index 000000000000..15a88b1fc312
--- /dev/null
+++ b/pkgs/development/tools/build-managers/drake/default.nix
@@ -0,0 +1,18 @@
+{ lib, bundlerEnv, ruby }:
+
+bundlerEnv {
+  name = "drake-0.9.2.0.3.1";
+
+  inherit ruby;
+  gemfile = ./Gemfile;
+  lockfile = ./Gemfile.lock;
+  gemset = ./gemset.nix;
+  
+  meta = with lib; {
+    description = "A branch of Rake supporting automatic parallelizing of tasks";
+    homepage = http://quix.github.io/rake/;
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ romildo ];
+  };
+}
diff --git a/pkgs/development/tools/build-managers/drake/gemset.nix b/pkgs/development/tools/build-managers/drake/gemset.nix
new file mode 100644
index 000000000000..fd5a6f06a2a8
--- /dev/null
+++ b/pkgs/development/tools/build-managers/drake/gemset.nix
@@ -0,0 +1,18 @@
+{
+  comp_tree = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0dj9lkfxcczn67l1j12dcxswrfxxd1zgxa344zk6vqs2gwwhy9m9";
+      type = "gem";
+    };
+    version = "1.1.3";
+  };
+  drake = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "09gkmdshwdmdnkdxi03dv4rk1dip0wdv6dx14wscrmi0jyk86yag";
+      type = "gem";
+    };
+    version = "0.9.2.0.3.1";
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/tools/build-managers/gup/build.nix b/pkgs/development/tools/build-managers/gup/build.nix
index a9af037bb81e..b2a60c309b32 100644
--- a/pkgs/development/tools/build-managers/gup/build.nix
+++ b/pkgs/development/tools/build-managers/gup/build.nix
@@ -1,14 +1,30 @@
-# NOTE: this file is copied from the upstream repository for this package.
-# Please submit any changes you make here to https://github.com/timbertson/gup/
+# NOTE: the `nixpkgs` version of this file is copied from the upstream repository
+# for this package. Please make any changes to https://github.com/timbertson/gup/
 
-{ stdenv, lib, python, which, pychecker ? null }:
-{ src, version, meta ? {} }:
+{ stdenv, lib, pythonPackages }:
+{ src, version, meta ? {}, passthru ? {}, forceTests ? false }:
+let
+  testInputs = [
+    pythonPackages.mocktest or null
+    pythonPackages.whichcraft
+    pythonPackages.nose
+    pythonPackages.nose_progressive
+  ];
+  pychecker = pythonPackages.pychecker or null;
+  usePychecker = forceTests || pychecker != null;
+  enableTests = forceTests || (lib.all (dep: dep != null) testInputs);
+in
 stdenv.mkDerivation {
-  inherit src meta;
+  inherit src meta passthru;
   name = "gup-${version}";
-  buildInputs = lib.remove null [ python which pychecker ];
-  SKIP_PYCHECKER = pychecker == null;
+  buildInputs = [ pythonPackages.python ]
+    ++ (lib.optionals enableTests testInputs)
+    ++ (lib.optional usePychecker pychecker)
+  ;
+  SKIP_PYCHECKER = !usePychecker;
   buildPhase = "make python";
+  inherit pychecker;
+  testPhase = if enableTests then "make test" else "true";
   installPhase = ''
     mkdir $out
     cp -r python/bin $out/bin
diff --git a/pkgs/development/tools/build-managers/gup/build.nix.gup b/pkgs/development/tools/build-managers/gup/build.nix.gup
new file mode 100755
index 000000000000..915d4287566a
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gup/build.nix.gup
@@ -0,0 +1,6 @@
+#!/bin/bash
+set -eu
+if [ -n "${GUP_TARGET:-}" ]; then
+	gup --always
+fi
+curl -LSs -o "$1" https://raw.githubusercontent.com/timbertson/gup/master/nix/gup-python.nix
diff --git a/pkgs/development/tools/build-managers/gup/default.nix b/pkgs/development/tools/build-managers/gup/default.nix
index 8e85c63cb6e5..e73beb031645 100644
--- a/pkgs/development/tools/build-managers/gup/default.nix
+++ b/pkgs/development/tools/build-managers/gup/default.nix
@@ -1,21 +1,21 @@
-{ stdenv, fetchFromGitHub, lib, python, which }:
-let
-  version = "0.5.5";
-  src = fetchFromGitHub {
-    sha256 = "12yv0j333z6jkaaal8my3jx3k4ml9hq8ldis5zfvr8179d4xah7q";
-    rev = "version-${version}";
-    repo = "gup";
-    owner = "timbertson";
-  };
-in
+{ stdenv, fetchFromGitHub, lib, pythonPackages, nix-update-source, curl }:
 import ./build.nix
-  { inherit stdenv lib python which; }
-  { inherit src version;
+  { inherit stdenv lib pythonPackages; }
+  { inherit (nix-update-source.fetch ./src.json) src version;
     meta = {
-      inherit (src.meta) homepage;
+      homepage = https://github.com/timbertson/gup/;
       description = "A better make, inspired by djb's redo";
       license = stdenv.lib.licenses.lgpl2Plus;
       maintainers = [ stdenv.lib.maintainers.timbertson ];
       platforms = stdenv.lib.platforms.all;
     };
+    passthru = {
+      updateScript = ''
+        set -e
+        echo
+        cd ${toString ./.}
+        ${nix-update-source}/bin/nix-update-source --prompt version src.json
+        ./build.nix.gup build.nix
+      '';
+    };
   }
diff --git a/pkgs/development/tools/build-managers/gup/src.json b/pkgs/development/tools/build-managers/gup/src.json
new file mode 100644
index 000000000000..6b9719a30762
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gup/src.json
@@ -0,0 +1,17 @@
+{
+  "fetch": {
+    "args": {
+      "owner": "timbertson",
+      "repo": "gup",
+      "rev": "version-0.6.0",
+      "sha256": "053xnx39jh9kn9l572z4k0q7bbxjpisf1fm9aq27ybj2ha1rh6wr"
+    },
+    "fn": "fetchFromGitHub",
+    "rev": "version-0.6.0",
+    "version": "0.6.0"
+  },
+  "owner": "timbertson",
+  "repo": "gup",
+  "rev": "version-{version}",
+  "type": "fetchFromGitHub"
+}
\ No newline at end of file
diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix
index 1338201b9962..c2e105d469e2 100644
--- a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix
+++ b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix
@@ -1,16 +1,16 @@
 { lib, buildGoPackage, fetchFromGitLab, fetchurl, go-bindata }:
 
 let
-  version = "1.9.0";
+  version = "1.10.0";
   # Gitlab runner embeds some docker images these are prebuilt for arm and x86_64
   docker_x86_64 = fetchurl {
     url = "https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/v${version}/docker/prebuilt-x86_64.tar.xz";
-    sha256 = "12hcpvc0j6g200qhz12gfsslngbqx4sifrikr05vh2av17hba25s";
+    sha256 = "1fv4sv92ng4gx53pbpagb6kv2hdab04lf2chsflf10xgzqw5l521";
   };
 
   docker_arm = fetchurl {
     url = "https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/v${version}/docker/prebuilt-arm.tar.xz";
-    sha256 = "1hqwhg94g514g0ad4h0h7wh7k5clm9i7whzr6c30i8yb00ga628s";
+    sha256 = "153dbgk6fvl73d5qhainqr9hzicsryc6ynlryi9si40ld82flrsr";
   };
 in
 buildGoPackage rec {
@@ -29,7 +29,7 @@ buildGoPackage rec {
     owner = "gitlab-org";
     repo = "gitlab-ci-multi-runner";
     rev = "v${version}";
-    sha256 = "1b30daxnpn1psy3vds1m4mnbl2hmvr2bc0zrd3nn9xm3xacm3dqj";
+    sha256 = "0ma6b6624c8218cz4gg5pr077li7nbs0v3mpgr1hxq7v465spa7j";
   };
 
   buildInputs = [ go-bindata ];
diff --git a/pkgs/development/tools/guile/g-wrap/default.nix b/pkgs/development/tools/guile/g-wrap/default.nix
index a1564859e84f..030693714f07 100644
--- a/pkgs/development/tools/guile/g-wrap/default.nix
+++ b/pkgs/development/tools/guile/g-wrap/default.nix
@@ -9,12 +9,11 @@ stdenv.mkDerivation rec {
 
   # Note: Glib support is optional, but it's quite useful (e.g., it's
   # used by Guile-GNOME).
-  buildInputs = [ guile pkgconfig glib ]
-    ++ stdenv.lib.optional doCheck guile_lib;
+  buildInputs = [ guile pkgconfig glib guile_lib ];
 
   propagatedBuildInputs = [ libffi ];
 
-  doCheck = !stdenv.isFreeBSD; # XXX: 00-socket.test hangs
+  doCheck = true;
 
   meta = {
     description = "G-Wrap, a wrapper generator for Guile";
diff --git a/pkgs/development/tools/java/jclasslib/default.nix b/pkgs/development/tools/java/jclasslib/default.nix
index cb3f6164b02c..1d8ae80572a1 100644
--- a/pkgs/development/tools/java/jclasslib/default.nix
+++ b/pkgs/development/tools/java/jclasslib/default.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation {
   builder = ./builder.sh;
   src = fetchurl {
     url = mirror://sourceforge/jclasslib/jclasslib_unix_2_0.tar.gz;
-    md5 = "31d91bb03fee23410689d2f1c4c439b1";
+    sha256 = "1y2fbg5h2p3fwcp7h5n1qib7x9svyrilq3i58vm6vany1xzg7nx5";
   };
 
   inherit jre xpf ant;
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix
index da0447c49da8..f39d15bc7be6 100644
--- a/pkgs/development/tools/misc/gdb/default.nix
+++ b/pkgs/development/tools/misc/gdb/default.nix
@@ -12,7 +12,7 @@
 
 let
 
-  basename = "gdb-7.12";
+  basename = "gdb-7.12.1";
 
   # Whether (cross-)building for GNU/Hurd.  This is an approximation since
   # having `stdenv ? cross' doesn't tell us if we're building `crossDrv' and
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnu/gdb/${basename}.tar.xz";
-    sha256 = "152g2qa8337cxif3lkvabjcxfd9jphfb2mza8f1p2c4bjk2z6kw3";
+    sha256 = "11ii260h1sd7v0bs3cz6d5l8gqxxgldry0md60ncjgixjw5nh1s6";
   };
 
   nativeBuildInputs = [ pkgconfig texinfo perl ]
diff --git a/pkgs/development/tools/msgpack-tools/default.nix b/pkgs/development/tools/msgpack-tools/default.nix
new file mode 100644
index 000000000000..d83be1c14313
--- /dev/null
+++ b/pkgs/development/tools/msgpack-tools/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  name = "msgpack-tools-${version}";
+  version = "v0.6";
+
+  src = fetchFromGitHub {
+    owner = "ludocode";
+    repo = "msgpack-tools";
+    rev = version;
+    sha256 = "1ygjk25zlpqjckxgqmahnz999704zy2bd9id6hp5jych1szkjgs5";
+  };
+
+  buildInputs = [ cmake ];
+
+  meta = with stdenv.lib; {
+    description = "Command-line tools for converting between MessagePack and JSON";
+    homepage = https://github.com/ludocode/msgpack-tools;
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ alibabzo ];
+  };
+}
diff --git a/pkgs/development/tools/ocaml/camlidl/default.nix b/pkgs/development/tools/ocaml/camlidl/default.nix
index feedd8835485..780862b6727f 100644
--- a/pkgs/development/tools/ocaml/camlidl/default.nix
+++ b/pkgs/development/tools/ocaml/camlidl/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
     substituteInPlace config/Makefile --replace BINDIR=/usr/local/bin BINDIR=$out
     substituteInPlace config/Makefile --replace OCAMLLIB=/usr/local/lib/ocaml OCAMLLIB=$out/lib/ocaml/${ocaml.version}/site-lib/camlidl
     substituteInPlace config/Makefile --replace CPP=/lib/cpp CPP=${stdenv.cc}/bin/cpp
+    substituteInPlace config/Makefile --replace "OCAMLC=ocamlc -g" "OCAMLC=ocamlc -g -warn-error -31"
     mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/camlidl/caml
   '';
 
diff --git a/pkgs/development/tools/ocaml/camlp4/default.nix b/pkgs/development/tools/ocaml/camlp4/default.nix
index 1e1d2eb68eab..a257a88287cd 100644
--- a/pkgs/development/tools/ocaml/camlp4/default.nix
+++ b/pkgs/development/tools/ocaml/camlp4/default.nix
@@ -7,6 +7,9 @@ let param = {
   "4.03.0" = {
      version = "4.03+1";
      sha256 = "1f2ndch6f1m4fgnxsjb94qbpwjnjgdlya6pard44y6n0dqxi1wsq"; };
+  "4.04.0" = {
+     version = "4.04+1";
+     sha256 = "1ad7rygqjxrc1im95gw9lp8q83nhdaf383f2808f1p63yl42xm7k"; };
   }."${ocaml.version}";
 in
 
diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
index d88dd9eb8964..81cd2caf7ee0 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
+{ stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving, ppx_deriving, camlp4, ocamlbuild
 , cmdliner, tyxml, reactivedata, cppo, which, base64, uchar
 }:
 
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
     }."${version}";
   };
 
-  buildInputs = [ ocaml findlib menhir ocsigen_deriving
+  buildInputs = [ ocaml findlib menhir ocsigen_deriving ocamlbuild
                  cmdliner reactivedata cppo which base64 ]
   ++ stdenv.lib.optional (stdenv.lib.versionAtLeast ocaml.version "4.02") tyxml;
   propagatedBuildInputs = [ ocaml_lwt camlp4 ppx_deriving ]
diff --git a/pkgs/development/tools/parsing/antlr/default.nix b/pkgs/development/tools/parsing/antlr/default.nix
deleted file mode 100644
index e866f61f25a3..000000000000
--- a/pkgs/development/tools/parsing/antlr/default.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{stdenv, fetchurl, jre}:
-
-stdenv.mkDerivation {
-  name = "antlr-3.0b3";
-  builder = ./builder.sh;
-  src = fetchurl {
-    url = http://www.antlr.org/download/antlr-3.0b3.tar.gz;
-    md5 = "6a7e70ccece8149b735cc3aaa24241cc";
-  };
-  inherit jre;
-
-  meta = with stdenv.lib; {
-    description = "Powerful parser generator";
-    longDescription = ''
-      ANTLR (ANother Tool for Language Recognition) is a powerful parser
-      generator for reading, processing, executing, or translating structured
-      text or binary files. It's widely used to build languages, tools, and
-      frameworks. From a grammar, ANTLR generates a parser that can build and
-      walk parse trees.
-    '';
-    homepage = http://www.antlr.org/;
-    platforms = platforms.linux;
-  };
-}
diff --git a/pkgs/development/tools/rtags/default.nix b/pkgs/development/tools/rtags/default.nix
index f8f9646182b1..44f922906e89 100644
--- a/pkgs/development/tools/rtags/default.nix
+++ b/pkgs/development/tools/rtags/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "rtags-${version}";
-  version = "2.3";
+  version = "2.8-p1";
 
   buildInputs = [ cmake llvmPackages.llvm openssl llvmPackages.clang emacs ]
-    ++ lib.optional stdenv.isDarwin apple_sdk.sdk;
+    ++ lib.optionals stdenv.isDarwin [ apple_sdk.sdk apple_sdk.frameworks.CoreServices ];
 
   preConfigure = ''
-    export LIBCLANG_CXXFLAGS="-isystem ${llvmPackages.clang.cc}/include $(llvm-config --cxxflags) " \
+    export LIBCLANG_CXXFLAGS="-isystem ${llvmPackages.clang.cc}/include $(llvm-config --cxxflags) -fexceptions" \
            LIBCLANG_LIBDIR="${llvmPackages.clang.cc}/lib" \
 
   '' + lib.optionalString stdenv.isDarwin ''
@@ -17,10 +17,11 @@ stdenv.mkDerivation rec {
   '';
 
   src = fetchgit {
-    rev = "refs/tags/v${version}";
+    # rev = "refs/tags/v${version}"; # TODO Renable if sha1 below is tagged as release
+    rev = "f85bd60f00d51748ea159b00fda7b5bfa78ef571";
     fetchSubmodules = true;
     url = "https://github.com/andersbakken/rtags.git";
-    sha256 = "05kzch88x2wiimygfli6vsr9i5hzgkybsya8qx4zvb6daip4b7yf";
+    sha256 = "0g9sgc763c5d695hjffhis19sbaqk8z4884szljf7kbrjxl17y78";
   };
 
   meta = {
diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix
index 39c7ca77f8f6..659c831bbe3c 100644
--- a/pkgs/development/tools/vagrant/default.nix
+++ b/pkgs/development/tools/vagrant/default.nix
@@ -117,7 +117,8 @@ in stdenv.mkDerivation rec {
     mkdir -p "$out"
     cp -r opt "$out"
     cp -r usr/bin "$out"
-    wrapProgram "$out/bin/vagrant" --prefix LD_LIBRARY_PATH : "$out/opt/vagrant/embedded/lib"
+    wrapProgram "$out/bin/vagrant" --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ libxml2 libxslt ]}" \
+                                   --prefix LD_LIBRARY_PATH : "$out/opt/vagrant/embedded/lib"
   '';
 
   preFixup = ''
diff --git a/pkgs/development/tools/valadoc/default.nix b/pkgs/development/tools/valadoc/default.nix
index 7d4e61c87995..3fd92dfeba41 100644
--- a/pkgs/development/tools/valadoc/default.nix
+++ b/pkgs/development/tools/valadoc/default.nix
@@ -1,12 +1,12 @@
 {stdenv, fetchgit, gnome3, automake, autoconf, which, libtool, pkgconfig, graphviz, glib, gobjectIntrospection, expat}:
 stdenv.mkDerivation rec {
-  version = "2016-10-09";
+  version = "2016-11-11";
   name = "valadoc-unstable-${version}";
 
   src = fetchgit {
     url = "git://git.gnome.org/valadoc";
-    rev = "37756970379d1363453562e9f2af2c354d172fb4";
-    sha256 = "1s9sf6f0srh5sqqikswnb3bgwv5s1r9bd4n10hs2lzfmh7z227qb";
+    rev = "8080b626db9c16ac9a0a9802677b4f6ab0d36d4e";
+    sha256 = "1y00yls4wgxggzfagm3hcmzkpskfbs3m52pjgl71lg4p85kv6msv";
   };
 
   nativeBuildInputs = [ automake autoconf which gnome3.vala libtool pkgconfig gobjectIntrospection ];
diff --git a/pkgs/games/factorio/default.nix b/pkgs/games/factorio/default.nix
index fe01667f5318..e071edfeb815 100644
--- a/pkgs/games/factorio/default.nix
+++ b/pkgs/games/factorio/default.nix
@@ -10,7 +10,7 @@ assert releaseType == "alpha" || releaseType == "headless";
 
 with stdenv.lib;
 let
-  version = "0.13.20";
+  version = "0.14.21";
   isHeadless = releaseType == "headless";
 
   arch = if stdenv.system == "x86_64-linux" then {
@@ -27,12 +27,12 @@ let
     url = "https://www.factorio.com/get-download/${version}/${releaseType}/${arch.inUrl}";
     name = "factorio_${releaseType}_${arch.inTar}-${version}.tar.gz";
     x64 = {
-      headless = fetchurl        { inherit name url; sha256 = "0nf1sxcgnbx52iwx7jgkjxass10lzz1iyskvgk0gq3ky9cg4ixfb"; };
-      alpha = authenticatedFetch { inherit      url; sha256 = "0rgjdxdcqf9m3ghzr076q3xi1g01ix14jldjwn6jgnvggzqkph9l"; };
+      headless = fetchurl        { inherit name url; sha256 = "0bx4fq46781vv9vr0ciyckaskksjrqikvcdv1yz0wj8mrb2j08cw"; };
+      alpha = authenticatedFetch { inherit      url; sha256 = "067p1i5wcxk88kmblyklc4lh8fqjc5pqjdarvhjz420vqmdls7k6"; };
     };
     i386 = {
       headless = abort "Factorio 32-bit headless binaries are not available for download.";
-      alpha = authenticatedFetch { inherit      url; sha256 = "0hda2z1q22xanl328kic5q09ck59mr3aa5cy4dbjv86s4dx9kxfq"; };
+      alpha = authenticatedFetch { inherit      url; sha256 = "0iwhachp0z02w19x5y70qy3b0yp79dspawkcygdfna5cfqrybvx6"; };
     };
   };
 
diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix
index 53227f2cc81b..e28a83cc6a20 100644
--- a/pkgs/games/minetest/default.nix
+++ b/pkgs/games/minetest/default.nix
@@ -4,19 +4,19 @@
 }:
 
 let
-  version = "0.4.14";
+  version = "0.4.15";
   sources = {
     src = fetchFromGitHub {
       owner = "minetest";
       repo = "minetest";
       rev = "${version}";
-      sha256 = "1f74wsiqj8x1m8wqmxijb00df5ljlvy4ac0ahbh325vfzi0bjla3";
+      sha256 = "0bn4102d0hq774bn6hqhrs6qzl4sancrs4j15w4318bqdndk4676";
     };
     data = fetchFromGitHub {
       owner = "minetest";
       repo = "minetest_game";
       rev = "${version}";
-      sha256 = "1dc9zfbp603h2nlk39bw37kjbswrfmpd9yg3v72z1jb89pcxzsqs";
+      sha256 = "1mjj40slfiw0khg9nrq8yfmnay237z5jm1cg9hrsiq2fkjrr8w2m";
     };
   };
 in stdenv.mkDerivation {
diff --git a/pkgs/games/super-tux-kart/default.nix b/pkgs/games/super-tux-kart/default.nix
index a1778cc69d79..4d2db9d293f5 100644
--- a/pkgs/games/super-tux-kart/default.nix
+++ b/pkgs/games/super-tux-kart/default.nix
@@ -1,45 +1,51 @@
-{ fetchgit, fetchsvn, cmake, stdenv, plib, SDL, openal, freealut, mesa
-, libvorbis, libogg, gettext, libXxf86vm, curl, pkgconfig
-, fribidi, autoconf, automake, libtool, bluez, libjpeg, libpng }:
+{ stdenv, fetchFromGitHub, fetchsvn, cmake, pkgconfig
+, openal, freealut, mesa, libvorbis, libogg, gettext, curl, freetype
+, fribidi, libtool, bluez, libjpeg, libpng, zlib, libX11, libXrandr }:
 
-stdenv.mkDerivation rec {
+let
+  dir = "stk-code";
+
+in stdenv.mkDerivation rec {
   name = "supertuxkart-${version}";
 
-  version = "0.9";
+  version = "0.9.2";
   srcs = [
-    (fetchgit {
-      url = "https://github.com/supertuxkart/stk-code";
-      rev = "28a525f6d4aba2667c41a549b027149fcceda97e";
-      sha256 = "0b5izr7j3clm6pcxanwwaas06f17wi454s6hwmgv1mg48aay2v97";
-      name = "stk-code";
+    (fetchFromGitHub {
+      owner  = "supertuxkart";
+      repo   = "stk-code";
+      rev    = version;
+      sha256 = "1zsc5nw8il8xwppk624jampfk6qhqzjnni8zicrhqix0xg07nxca";
+      name   = dir;
     })
     (fetchsvn {
-      url = "https://svn.code.sf.net/p/supertuxkart/code/stk-assets";
-      rev = "16293";
-      sha256 = "07jdkli28xr3rcxvixyy5bwi26n5i7dkhd9q0j4wifgs4pymm8r5";
-      name = "stk-assets";
+      url    = "https://svn.code.sf.net/p/supertuxkart/code/stk-assets";
+      rev    = "16503"; # 0.9.2 crashes with 16937. Refer to stk-code/doc/assets_version
+      sha256 = "0j1dy27gxm4hx26xddr2ak6vw0lim0nqmjnszfb4c61y92j12cqp";
+      name   = "stk-assets";
     })
   ];
-  
+
   buildInputs = [
-    plib SDL openal freealut mesa libvorbis libogg gettext
-    libXxf86vm curl pkgconfig fribidi autoconf automake libtool cmake bluez libjpeg libpng
+    cmake libtool pkgconfig
+    libX11 libXrandr
+    openal freealut mesa libvorbis libogg gettext zlib freetype
+    curl fribidi bluez libjpeg libpng
   ];
 
   enableParallelBuilding = true;
 
-  sourceRoot = "stk-code";
+  sourceRoot = dir;
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "A Free 3D kart racing game";
     longDescription = ''
       SuperTuxKart is a Free 3D kart racing game, with many tracks,
       characters and items for you to try, similar in spirit to Mario
       Kart.
     '';
-    homepage = http://supertuxkart.sourceforge.net/;
-    license = stdenv.lib.licenses.gpl2Plus;
-    maintainers = with stdenv.lib.maintainers; [ c0dehero fuuzetsu ];
-    platforms = with stdenv.lib.platforms; linux;
+    homepage = https://supertuxkart.net/;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ c0dehero fuuzetsu peterhoeg ];
+    platforms = with platforms; linux;
   };
 }
diff --git a/pkgs/games/warsow/default.nix b/pkgs/games/warsow/default.nix
index 9f2dfbab2ecd..ef0e4640c393 100644
--- a/pkgs/games/warsow/default.nix
+++ b/pkgs/games/warsow/default.nix
@@ -59,5 +59,6 @@ stdenv.mkDerivation rec {
     license = licenses.unfreeRedistributable;
     maintainers = with maintainers; [ astsmtl ];
     platforms = platforms.linux;
+    broken = true; # Depends on a specific old libjpeg version
   };
 }
diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix
index 4108bc60c270..29a0658d4388 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix
@@ -196,7 +196,7 @@ let
     Csu             = applePackage "Csu"               "osx-10.11.6"     "0yh5mslyx28xzpv8qww14infkylvc1ssi57imhi471fs91sisagj" {};
     dtrace          = applePackage "dtrace"            "osx-10.11.6"     "0pp5x8dgvzmg9vvg32hpy2brm17dpmbwrcr4prsmdmfvd4767wc0" {};
     dyld            = applePackage "dyld"              "osx-10.11.6"     "0qkjmjazm2zpgvwqizhandybr9cm3gz9pckx8rmf0py03faafc08" {};
-    eap8021x        = applePackage "eap8021x"          "osx-10.11.6"     "15bbgjhi8l7hbib41gqcldzbf3hf6105jbwc745hp1gmrscw4zch" {};
+    eap8021x        = applePackage "eap8021x"          "osx-10.11.6"     "0iw0qdib59hihyx2275rwq507bq2a06gaj8db4a8z1rkaj1frskh" {};
     IOKit           = applePackage "IOKit"             "osx-10.11.6"     "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x00" { inherit IOKitSrcs; };
     launchd         = applePackage "launchd"           "osx-10.9.5"      "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {};
     libauto         = applePackage "libauto"           "osx-10.9.5"      "17z27yq5d7zfkwr49r7f0vn9pxvj95884sd2k6lq6rfaz9gxqhy3" {};
@@ -212,7 +212,7 @@ let
     libiconv        = applePackage "libiconv"          "osx-10.11.6"     "11h6lfajydri4widis62q8scyz7z8l6msqyx40ly4ahsdlbl0981" {};
     Libinfo         = applePackage "Libinfo"           "osx-10.11.6"     "0qjgkd4y8sjvwjzv5wwyzkb61pg8wwg95bkp721dgzv119dqhr8x" {};
     Libm            = applePackage "Libm"              "osx-10.7.4"      "02sd82ig2jvvyyfschmb4gpz6psnizri8sh6i982v341x6y4ysl7" {};
-    Libnotify       = applePackage "Libnotify"         "osx-10.11.6"     "14rhhfzb75r9jf3kyj8fzd01n09n7km1fsdj3dzl3lkkp1sir78m" {};
+    Libnotify       = applePackage "Libnotify"         "osx-10.11.6"     "0zbcyxlcfhf91jxczhd5bq9qfgvg494gwwp3l7q5ayb2qdihzr8b" {};
     libpthread      = applePackage "libpthread"        "osx-10.11.6"     "1kbw738cmr9pa7pz1igmajs307clfq7gv2vm1sqdzhcnnjxbl28w" {};
     libresolv       = applePackage "libresolv"         "osx-10.11.6"     "09flfdi3dlzq0yap32sxidacpc4nn4va7z12a6viip21ix2xb2gf" {};
     Libsystem       = applePackage "Libsystem"         "osx-10.11.6"     "1nfkmbqml587v2s1d1y2s2v8nmr577jvk51y6vqrfvsrhdhc2w94" {};
diff --git a/pkgs/os-specific/darwin/ghc-standalone-archive/default.nix b/pkgs/os-specific/darwin/ghc-standalone-archive/default.nix
new file mode 100644
index 000000000000..d23328d362e0
--- /dev/null
+++ b/pkgs/os-specific/darwin/ghc-standalone-archive/default.nix
@@ -0,0 +1,14 @@
+{ runCommand, cctools }:
+{ haskellPackages, src, deps ? p : [], name }: let
+  inherit (haskellPackages) ghc ghcWithPackages;
+  with-env = ghcWithPackages deps;
+  crossPrefix = if (ghc.cross or null) != null then "${ghc.cross.config}-" else "";
+  ghcName = "${crossPrefix}ghc";
+in runCommand name { buildInputs = [ with-env cctools ]; } ''
+  mkdir -p $out/lib
+  mkdir -p $out/include
+  ${ghcName} ${src} -staticlib -outputdir . -o $out/lib/${name}.a -stubdir $out/include
+  for file in ${ghc}/lib/${ghcName}-${ghc.version}/include/*; do
+    ln -sv $file $out/include
+  done
+''
diff --git a/pkgs/os-specific/darwin/ios-cross/default.nix b/pkgs/os-specific/darwin/ios-cross/default.nix
index 01753a5300b7..7de7d291289f 100644
--- a/pkgs/os-specific/darwin/ios-cross/default.nix
+++ b/pkgs/os-specific/darwin/ios-cross/default.nix
@@ -45,7 +45,7 @@
     '';
   };
 in {
-  cc = runCommand "${prefix}-cc" {} ''
+  cc = runCommand "${prefix}-cc" { passthru = { inherit sdkType sdkVer sdk; }; } ''
     mkdir -p $out/bin
     ln -sv ${wrapper}/bin/clang $out/bin/${prefix}-cc
     mkdir -p $out/nix-support
diff --git a/pkgs/os-specific/darwin/khd/default.nix b/pkgs/os-specific/darwin/khd/default.nix
new file mode 100644
index 000000000000..f08073a8901e
--- /dev/null
+++ b/pkgs/os-specific/darwin/khd/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchFromGitHub, Carbon, Cocoa }:
+
+stdenv.mkDerivation rec {
+  name = "khd-${version}";
+  version = "1.1.4";
+
+  src = fetchFromGitHub {
+    owner = "koekeishiya";
+    repo = "khd";
+    rev = "v${version}";
+    sha256 = "1klia3fywl0c88zbp5wdn6kxhdwdry1jwmkj27vpv8vzvdfzwfmy";
+  };
+
+  buildInputs = [ Carbon Cocoa ];
+
+  prePatch = ''
+    substituteInPlace makefile \
+      --replace g++ clang++
+  '';
+
+  buildPhase = ''
+    make install
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp bin/khd $out/bin/khd
+
+    mkdir -p $out/Library/LaunchDaemons
+    cp ${./org.nixos.khd.plist} $out/Library/LaunchDaemons/org.nixos.khd.plist
+    substituteInPlace $out/Library/LaunchDaemons/org.nixos.khd.plist --subst-var out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A simple modal hototkey daemon for OSX";
+    homepage = https://github.com/koekeishiya/khd;
+    downloadPage = https://github.com/koekeishiya/khd/releases;
+    platforms = platforms.darwin;
+    maintainers = with maintainers; [ lnl7 ];
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/os-specific/darwin/khd/org.nixos.khd.plist b/pkgs/os-specific/darwin/khd/org.nixos.khd.plist
new file mode 100644
index 000000000000..3c0aaa81eb61
--- /dev/null
+++ b/pkgs/os-specific/darwin/khd/org.nixos.khd.plist
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>Label</key>
+  <string>org.nixos.khd</string>
+  <key>ProgramArguments</key>
+  <array>
+  <string>@out@/bin/khd</string>
+  </array>
+  <key>KeepAlive</key>
+  <true/>
+  <key>ProcessType</key>
+  <string>Interactive</string>
+  <key>EnvironmentVariables</key>
+  <dict>
+    <key>PATH</key>
+    <string>@out@/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin</string>
+  </dict>
+  <key>Sockets</key>
+  <dict>
+    <key>Listeners</key>
+    <dict>
+      <key>SockServiceName</key>
+      <string>3021</string>
+      <key>SockType</key>
+      <string>dgram</string>
+      <key>SockFamily</key>
+      <string>IPv4</string>
+    </dict>
+  </dict>
+</dict>
+</plist>
diff --git a/pkgs/os-specific/darwin/kwm/default.nix b/pkgs/os-specific/darwin/kwm/default.nix
new file mode 100644
index 000000000000..ac231f2dfe3d
--- /dev/null
+++ b/pkgs/os-specific/darwin/kwm/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchzip }:
+
+stdenv.mkDerivation rec {
+  name = "kwm-${version}";
+  version = "4.0.4";
+
+  src = fetchzip {
+    stripRoot = false;
+    url = "https://github.com/koekeishiya/kwm/releases/download/v${version}/Kwm-${version}.zip";
+    sha256 = "07rf4ichq511w8qmvd6s602s7xcyjhjp73d5c615sj82cxvgirwc";
+  };
+
+  # TODO: Build this properly once we have swiftc.
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp kwmc $out/bin/kwmc
+    cp kwm overlaylib.dylib $out
+
+    mkdir -p $out/Library/LaunchDaemons
+    cp ${./org.nixos.kwm.plist} $out/Library/LaunchDaemons/org.nixos.kwm.plist
+    substituteInPlace $out/Library/LaunchDaemons/org.nixos.kwm.plist --subst-var out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Tiling window manager with focus follows mouse for OSX";
+    homepage = https://github.com/koekeishiya/kwm;
+    downloadPage = https://github.com/koekeishiya/kwm/releases;
+    platforms = platforms.darwin;
+    maintainers = with maintainers; [ lnl7 ];
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/os-specific/darwin/kwm/org.nixos.kwm.plist b/pkgs/os-specific/darwin/kwm/org.nixos.kwm.plist
new file mode 100644
index 000000000000..eafce2ab4a46
--- /dev/null
+++ b/pkgs/os-specific/darwin/kwm/org.nixos.kwm.plist
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>Label</key>
+  <string>org.nixos.kwm</string>
+  <key>ProgramArguments</key>
+  <array>
+    <string>@out@/kwm</string>
+  </array>
+  <key>KeepAlive</key>
+  <true/>
+  <key>Sockets</key>
+  <dict>
+    <key>Listeners</key>
+    <dict>
+      <key>SockServiceName</key>
+      <string>3020</string>
+      <key>SockType</key>
+      <string>dgram</string>
+      <key>SockFamily</key>
+      <string>IPv4</string>
+  </dict>
+</dict>
+</dict>
+</plist>
diff --git a/pkgs/os-specific/gnu/default.nix b/pkgs/os-specific/gnu/default.nix
index 457b670319e0..247c73e468d0 100644
--- a/pkgs/os-specific/gnu/default.nix
+++ b/pkgs/os-specific/gnu/default.nix
@@ -3,7 +3,8 @@
 args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool
 , texinfo, glibcCross, hurdPartedCross, libuuid, samba
 , gccCrossStageStatic, gccCrossStageFinal
-, forceNativeDrv, forceSystem, newScope, platform, config, crossSystem
+, forcedNativePackages, forceSystem, newScope, platform, config
+, targetPlatform, buildPlatform
 , overrides ? {} }:
 
 with args;
@@ -12,25 +13,25 @@ let
   callPackage = newScope gnu;
 
   gnu = {
-    hurdCross = forceNativeDrv (callPackage ./hurd {
+    hurdCross = forcedNativePackages.callPackage ./hurd {
       inherit fetchgit stdenv autoconf libtool texinfo
         glibcCross hurdPartedCross;
       inherit (gnu) machHeaders mig;
       libuuid = libuuid.crossDrv;
       automake = automake111x;
       headersOnly = false;
-      cross = assert crossSystem != null; crossSystem;
+      cross = assert targetPlatform != buildPlatform; targetPlatform;
       gccCross = gccCrossStageFinal;
-    });
+    };
 
-    hurdCrossIntermediate = forceNativeDrv (callPackage ./hurd {
+    hurdCrossIntermediate = forcedNativePackages.callPackage ./hurd {
       inherit fetchgit stdenv autoconf libtool texinfo glibcCross;
       inherit (gnu) machHeaders mig;
       hurdPartedCross = null;
       libuuid = null;
       automake = automake111x;
       headersOnly = false;
-      cross = assert crossSystem != null; crossSystem;
+      cross = assert targetPlatform != buildPlatform; targetPlatform;
 
       # The "final" GCC needs glibc and the Hurd libraries (libpthread in
       # particular) so we first need an intermediate Hurd built with the
@@ -42,7 +43,7 @@ let
       # libshouldbeinlibc.
       buildTarget = "libihash libstore libshouldbeinlibc";
       installTarget = "libihash-install libstore-install libshouldbeinlibc-install";
-    });
+    };
 
     hurdHeaders = callPackage ./hurd {
       automake = automake111x;
@@ -58,13 +59,13 @@ let
       hurd = null;
     };
 
-    libpthreadCross = forceNativeDrv (callPackage ./libpthread {
+    libpthreadCross = forcedNativePackages.callPackage ./libpthread {
       inherit fetchgit stdenv autoconf automake libtool glibcCross;
       inherit (gnu) machHeaders hurdHeaders;
       hurd = gnu.hurdCrossIntermediate;
       gccCross = gccCrossStageStatic;
-      cross = assert crossSystem != null; crossSystem;
-    });
+      cross = assert targetPlatform != buildPlatform; targetPlatform;
+    };
 
     # In theory GNU Mach doesn't have to be cross-compiled.  However, since it
     # has to be built for i586 (it doesn't work on x86_64), one needs a cross
diff --git a/pkgs/os-specific/linux/eventstat/default.nix b/pkgs/os-specific/linux/eventstat/default.nix
index 49eab1fe2546..de27d7b0d838 100644
--- a/pkgs/os-specific/linux/eventstat/default.nix
+++ b/pkgs/os-specific/linux/eventstat/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   name = "eventstat-${version}";
-  version = "0.03.02";
+  version = "0.03.03";
   src = fetchzip {
     url = "http://kernel.ubuntu.com/~cking/tarballs/eventstat/eventstat-${version}.tar.gz";
-    sha256 = "1bwv0m9pk9l0jfibvsfjggc5pp9lyyrsfr10h6jm6kf1v6r6hf5s";
+    sha256 = "02pg46f3x7v1c1vvqzfjqq0wjb2bzmfkd6a8xp06cg9zvidn6jpb";
   };
   buildInputs = [ ncurses ];
   installFlags = [ "DESTDIR=$(out)" ];
diff --git a/pkgs/os-specific/linux/fnotifystat/default.nix b/pkgs/os-specific/linux/fnotifystat/default.nix
index 5708ed7c4df2..35638e7dabd5 100644
--- a/pkgs/os-specific/linux/fnotifystat/default.nix
+++ b/pkgs/os-specific/linux/fnotifystat/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   name = "fnotifystat-${version}";
-  version = "0.01.14";
+  version = "0.01.16";
   src = fetchurl {
     url = "http://kernel.ubuntu.com/~cking/tarballs/fnotifystat/fnotifystat-${version}.tar.gz";
-    sha256 = "1cc3w94v8b4nfpkgr33gfzxpwaf43brqyc0fla9p70gk3hxjqzi5";
+    sha256 = "1k9nc7a4r7c2l7vrlcrfxj9rsdb04amiqcsnxm5kpshncry38nl5";
   };
   installFlags = [ "DESTDIR=$(out)" ];
   postInstall = ''
diff --git a/pkgs/os-specific/linux/forkstat/default.nix b/pkgs/os-specific/linux/forkstat/default.nix
index a0478af912c8..f8d0eab835bd 100644
--- a/pkgs/os-specific/linux/forkstat/default.nix
+++ b/pkgs/os-specific/linux/forkstat/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   name = "forkstat-${version}";
-  version = "0.01.14";
+  version = "0.01.16";
   src = fetchurl {
     url = "http://kernel.ubuntu.com/~cking/tarballs/forkstat/forkstat-${version}.tar.gz";
-    sha256 = "0yj3mhf9b2nm8fnz4vf2fqdd8417g30p2sgv3ilq3zwy4hbg9bav";
+    sha256 = "0g65basrs569y42zhgjq9sdyz62km8xy55yfilmyxa43ckb3xmlw";
   };
   installFlags = [ "DESTDIR=$(out)" ];
   postInstall = ''
diff --git a/pkgs/os-specific/linux/kernel/linux-3.10.nix b/pkgs/os-specific/linux/kernel/linux-3.10.nix
index 3e6bd51cc475..42546b0262e6 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.10.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.10.nix
@@ -14,6 +14,5 @@ import ./generic.nix (args // rec {
   features.iwlwifi = true;
   features.efiBootStub = true;
   features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
   features.netfilterRPFilter = true;
 })
diff --git a/pkgs/os-specific/linux/kernel/linux-3.12.nix b/pkgs/os-specific/linux/kernel/linux-3.12.nix
index 95ca51a972e9..9a0f314c2465 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.12.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.12.nix
@@ -14,6 +14,5 @@ import ./generic.nix (args // rec {
   features.iwlwifi = true;
   features.efiBootStub = true;
   features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
   features.netfilterRPFilter = true;
 })
diff --git a/pkgs/os-specific/linux/kernel/linux-3.18.nix b/pkgs/os-specific/linux/kernel/linux-3.18.nix
index 5ecfdefa97d8..acfd08f2af3e 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.18.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.18.nix
@@ -14,6 +14,5 @@ import ./generic.nix (args // rec {
   features.iwlwifi = true;
   features.efiBootStub = true;
   features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
   features.netfilterRPFilter = true;
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-4.1.nix b/pkgs/os-specific/linux/kernel/linux-4.1.nix
index fd171eae0012..9c7354024ada 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.1.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.1.nix
@@ -14,6 +14,5 @@ import ./generic.nix (args // rec {
   features.iwlwifi = true;
   features.efiBootStub = true;
   features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
   features.netfilterRPFilter = true;
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix
index 2d2f4d924db4..bec31549ae3c 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.4.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, perl, buildLinux, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "4.4.43";
+  version = "4.4.44";
   extraMeta.branch = "4.4";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1yzphiznkwambniq21fiw0vw1fgql4cwcxjlp290y8cf3b3704qb";
+    sha256 = "0j779p83w4i9vj7l23rx1ihymplgy44pjh53lf55napj0ckwzggs";
   };
 
   kernelPatches = args.kernelPatches;
@@ -14,6 +14,5 @@ import ./generic.nix (args // rec {
   features.iwlwifi = true;
   features.efiBootStub = true;
   features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
   features.netfilterRPFilter = true;
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix
index 54c67901f503..dba02330380a 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.9.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix
@@ -14,6 +14,5 @@ import ./generic.nix (args // rec {
   features.iwlwifi = true;
   features.efiBootStub = true;
   features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
   features.netfilterRPFilter = true;
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-chromiumos-3.14.nix b/pkgs/os-specific/linux/kernel/linux-chromiumos-3.14.nix
index 72d7cd1fba0a..c8e189dcbfcb 100644
--- a/pkgs/os-specific/linux/kernel/linux-chromiumos-3.14.nix
+++ b/pkgs/os-specific/linux/kernel/linux-chromiumos-3.14.nix
@@ -16,7 +16,6 @@ import ./generic.nix (args // rec {
   features.iwlwifi = true;
   features.efiBootStub = true;
   features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
   features.netfilterRPFilter = true;
   features.chromiumos = true;
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-chromiumos-3.18.nix b/pkgs/os-specific/linux/kernel/linux-chromiumos-3.18.nix
index 4be81409ee1e..b80c9acd659e 100644
--- a/pkgs/os-specific/linux/kernel/linux-chromiumos-3.18.nix
+++ b/pkgs/os-specific/linux/kernel/linux-chromiumos-3.18.nix
@@ -16,9 +16,8 @@ import ./generic.nix (args // rec {
   features.iwlwifi = true;
   features.efiBootStub = true;
   features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
   features.netfilterRPFilter = true;
   features.chromiumos = true;
-  
+
   extraMeta.hydraPlatforms = [];
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-grsecurity.nix b/pkgs/os-specific/linux/kernel/linux-grsecurity.nix
index 8a71a771c4fc..ebeb47397bca 100644
--- a/pkgs/os-specific/linux/kernel/linux-grsecurity.nix
+++ b/pkgs/os-specific/linux/kernel/linux-grsecurity.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, perl, buildLinux, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "4.8.16";
+  version = "4.8.17";
   extraMeta.branch = "4.8";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1aml6vhsfpvm8rsadraff7qj0ivgd9aw75k2q65drz4iby1pqb9h";
+    sha256 = "1zk0q6bvqgz2pk1axd5z0cx71vqk96314f1zn8apwa4raylf9fpa";
   };
 
   kernelPatches = args.kernelPatches;
@@ -14,6 +14,5 @@ import ./generic.nix (args // rec {
   features.iwlwifi = true;
   features.efiBootStub = true;
   features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
   features.netfilterRPFilter = true;
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-mptcp.nix b/pkgs/os-specific/linux/kernel/linux-mptcp.nix
index a037343751ca..e533670014b3 100644
--- a/pkgs/os-specific/linux/kernel/linux-mptcp.nix
+++ b/pkgs/os-specific/linux/kernel/linux-mptcp.nix
@@ -46,6 +46,5 @@ import ./generic.nix (args // rec {
   features.iwlwifi = true;
   features.efiBootStub = true;
   features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
   features.netfilterRPFilter = true;
 } // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-rpi.nix b/pkgs/os-specific/linux/kernel/linux-rpi.nix
index f41c53da5a68..e50a6c802326 100644
--- a/pkgs/os-specific/linux/kernel/linux-rpi.nix
+++ b/pkgs/os-specific/linux/kernel/linux-rpi.nix
@@ -17,7 +17,6 @@ stdenv.lib.overrideDerivation (import ./generic.nix (args // rec {
 
   features.iwlwifi = true;
   features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
   features.netfilterRPFilter = true;
 
   extraMeta.hydraPlatforms = [];
diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix
index 8f18febdf0df..1778f3439039 100644
--- a/pkgs/os-specific/linux/kernel/linux-testing.nix
+++ b/pkgs/os-specific/linux/kernel/linux-testing.nix
@@ -13,7 +13,6 @@ import ./generic.nix (args // rec {
   features.iwlwifi = true;
   features.efiBootStub = true;
   features.needsCifsUtils = true;
-  features.canDisableNetfilterConntrackHelpers = true;
   features.netfilterRPFilter = true;
 
   # Should the testing kernels ever be built on Hydra?
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 42a6e0d037b9..4848057547eb 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -30,7 +30,7 @@ let
         # When updating versions/hashes, ALWAYS use the official
         # version; we use this mirror only because upstream removes
         # source files immediately upon releasing a new version ...
-        "https://raw.githubusercontent.com/slashbeast/grsecurity-scrape/master/${grbranch}/${name}.patch"
+        "https://raw.githubusercontent.com/slashbeast/grsecurity-scrape/master/${grbranch}/${kver}/${name}.patch"
       ];
       inherit sha256;
     };
@@ -95,9 +95,9 @@ rec {
   };
 
   grsecurity_testing = grsecPatch
-    { kver   = "4.8.16";
-      grrev  = "201701062021";
-      sha256 = "0ivl9dpbyf0f7ywgh8kbzdf0za10yrh6s8plqk9vnns3dhgcnvnq";
+    { kver   = "4.8.17";
+      grrev  = "201701151620";
+      sha256 = "10gavcdby8aiylbx8afc1x4j0vzbb16bhlw39a7ibnav45scsr0p";
     };
 
   # This patch relaxes grsec constraints on the location of usermode helpers,
@@ -175,12 +175,12 @@ rec {
       };
     };
 
-  p9_caching_4_4 = rec
+  p9_caching_4_9 = rec
     { name = "9p-caching.patch";
       patch = fetchpatch {
         inherit name;
-        url = https://github.com/edolstra/linux/commit/d522582553368b9564e2d88a8d7b1d469bf98c65.patch;
-        sha256 = "01h7461pdgavd6ghd6w9wg136hkaca0mrmmzhy6s3phksksimbc2";
+        url = https://github.com/edolstra/linux/commit/7e20254412c780a2102761fee92cb1d32ceeaefd.patch;
+        sha256 = "001kf1sdy6pirn8sqnfgbfahvwwkc7n7vr5i8fy2n74xph1kks5a";
       };
     };
 
diff --git a/pkgs/os-specific/linux/libnl/default.nix b/pkgs/os-specific/linux/libnl/default.nix
index 481d134b4610..22bae8a921b9 100644
--- a/pkgs/os-specific/linux/libnl/default.nix
+++ b/pkgs/os-specific/linux/libnl/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchFromGitHub, autoreconfHook, bison, flex, pkgconfig }:
 
-let version = "3.2.28"; in
+let version = "3.2.29"; in
 stdenv.mkDerivation {
   name = "libnl-${version}";
 
   src = fetchFromGitHub {
-    sha256 = "02cm57z4h7rhjlxza07zhk02924acfz6m5gbmm5lbkkp6qh81328";
-    rev = "libnl3_2_28";
+    sha256 = "1078sbfgcb6ijal9af6lv26sy233wq14afyrc4bkdbnfl0zgsbwi";
+    rev = "libnl3_2_23";
     repo = "libnl";
     owner = "thom311";
   };
diff --git a/pkgs/os-specific/linux/nftables/default.nix b/pkgs/os-specific/linux/nftables/default.nix
index 78b13b902c8d..c06de7ea6f2c 100644
--- a/pkgs/os-specific/linux/nftables/default.nix
+++ b/pkgs/os-specific/linux/nftables/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, docbook2x, docbook_xml_dtd_45
-, flex, bison, libmnl, libnftnl, gmp, readline, iptables }:
+, flex, bison, libmnl, libnftnl, gmp, readline }:
 
 stdenv.mkDerivation rec {
   name = "nftables-0.7";
@@ -12,13 +12,12 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "CONFIG_MAN=y"
     "DB2MAN=docbook2man"
-    "--with-xtables"
   ];
 
   XML_CATALOG_FILES = "${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml";
 
   nativeBuildInputs = [ pkgconfig docbook2x flex bison ];
-  buildInputs = [ libmnl libnftnl gmp readline iptables ];
+  buildInputs = [ libmnl libnftnl gmp readline ];
 
   meta = with stdenv.lib; {
     description = "The project that aims to replace the existing {ip,ip6,arp,eb}tables framework";
diff --git a/pkgs/os-specific/linux/powerstat/default.nix b/pkgs/os-specific/linux/powerstat/default.nix
index 9604a67ddd9a..69abdbec5d23 100644
--- a/pkgs/os-specific/linux/powerstat/default.nix
+++ b/pkgs/os-specific/linux/powerstat/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   name = "powerstat-${version}";
-  version = "0.02.10";
+  version = "0.02.11";
   src = fetchurl {
     url = "http://kernel.ubuntu.com/~cking/tarballs/powerstat/powerstat-${version}.tar.gz";
-    sha256 = "11n2k20h27j7m8j0l524w23xlkjhapsb3ml1qpx1si7gf0pkglcl";
+    sha256 = "0iid3b3284sf89pfp68i1k5mwmr31bqjzasb8clm2sa45ivafx52";
   };
   installFlags = [ "DESTDIR=$(out)" ];
   postInstall = ''
diff --git a/pkgs/os-specific/linux/smemstat/default.nix b/pkgs/os-specific/linux/smemstat/default.nix
index a38c819bc6ff..9a244c6ed8fb 100644
--- a/pkgs/os-specific/linux/smemstat/default.nix
+++ b/pkgs/os-specific/linux/smemstat/default.nix
@@ -1,12 +1,13 @@
-{ stdenv, lib, fetchurl }:
+{ stdenv, lib, fetchurl, ncurses }:
 
 stdenv.mkDerivation rec {
   name = "smemstat-${version}";
-  version = "0.01.14";
+  version = "0.01.16";
   src = fetchurl {
     url = "http://kernel.ubuntu.com/~cking/tarballs/smemstat/smemstat-${version}.tar.gz";
-    sha256 = "0qkpbg0n40d8m9jzf3ylpdp65zzs344zbjn8khha4plbwg00ijrw";
+    sha256 = "14n3s6ibm9bq58drvpiasqn11ci6mrwswfpcbpbsimx6fh2j4bi3";
   };
+  buildInputs = [ ncurses ];
   installFlags = [ "DESTDIR=$(out)" ];
   postInstall = ''
     mv $out/usr/* $out
diff --git a/pkgs/servers/caddy/default.nix b/pkgs/servers/caddy/default.nix
index bf0b40e1d7ba..add92f688763 100644
--- a/pkgs/servers/caddy/default.nix
+++ b/pkgs/servers/caddy/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "caddy-${version}";
-  version = "0.9.2";
+  version = "0.9.5";
 
   goPackagePath = "github.com/mholt/caddy";
 
@@ -12,7 +12,7 @@ buildGoPackage rec {
     owner = "mholt";
     repo = "caddy";
     rev = "v${version}";
-    sha256 = "1nmimyykbjfnwbrka50z15d11z0fc6abpkr0cjbj678d5r9wpz33";
+    sha256 = "0z1qjmlxrsiccrl5cb0j4c48ksng4xgp5bgy11gswrijvymsbq2r";
   };
 
   buildFlagsArray = ''
diff --git a/pkgs/servers/caddy/deps.nix b/pkgs/servers/caddy/deps.nix
index d7c974ecb162..49ae8fa09e89 100644
--- a/pkgs/servers/caddy/deps.nix
+++ b/pkgs/servers/caddy/deps.nix
@@ -5,8 +5,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/dustin/go-humanize";
-      rev = "2fcb5204cdc65b4bec9fd0a87606bb0d0e3c54e8";
-      sha256 = "1m2qgn5vh5m66ggmclgikvwc05np2r7sxgpvlj2jip5d61x29j5k";
+      rev = "7a41df006ff9af79a29f0ffa9c5f21fbe6314a2d";
+      sha256 = "0055ir369kz63x9ay0fxqpx2xby8digja6ffbc35vsqjnzfwws18";
     };
   }
   {
@@ -23,8 +23,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/gorilla/websocket";
-      rev = "2d1e4548da234d9cb742cc3628556fef86aafbac";
-      sha256 = "0n7af8pjjmg5rhb3104lyvn966l1p4dfblmy3g9b0plsmnzrz6g5";
+      rev = "0674c7c7968d9fac5f0f678325161ec31df406af";
+      sha256 = "0ql8bsxcc0rjli5cxb0jf22jaq18bd6s4pja7razir3a9zcyn3km";
     };
   }
   {
@@ -32,8 +32,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/hashicorp/go-syslog";
-      rev = "315de0c1920b18b942603ffdc2229e2af4803c17";
-      sha256 = "1z0kinqp8hbl7hw856jhx41ys97rc6hflcgwrkfyxj5fdx60xis6";
+      rev = "b609c7d9de4658cded34a7336b90886c56f9dbdb";
+      sha256 = "1k0dqkizj4vwgdsb7x7fzmcgz9079sczhpn9whd0r3xcnqs7pkkb";
     };
   }
   {
@@ -59,8 +59,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/lucas-clemente/aes12";
-      rev = "8ee5b5610baca43b60ecfad586b3c40d92a96e0c";
-      sha256 = "1lnzrr7f6cyb10gqji6433fvwi8zid0k019m694xyppv4pzgrc93";
+      rev = "25700e67be5c860bcc999137275b9ef8b65932bd";
+      sha256 = "08zbfy5n6ki6fjaihk7y686dwksdglds9c8f1klkldvjbg8mw4vp";
     };
   }
   {
@@ -77,8 +77,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/lucas-clemente/quic-go";
-      rev = "8f7a96dfafd8b03eae5679702a837ed5bdf91327";
-      sha256 = "12qc7y8v3g16q3klh852f3v4yvbcp6h8am1q98ds2c1zay9jl50n";
+      rev = "86e02c4d2c459b70073cd5c39468e8a5a22db45a";
+      sha256 = "16qrkcwllx88f6623ps5p5h62168xs6mcwybbw8862pvb0zkndz0";
     };
   }
   {
@@ -91,21 +91,12 @@
     };
   }
   {
-    goPackagePath = "github.com/mholt/caddy";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mholt/caddy";
-      rev = "73916ccc3069de4720a77b6b817b0bb77bda6b44";
-      sha256 = "1nmimyykbjfnwbrka50z15d11z0fc6abpkr0cjbj678d5r9wpz33";
-    };
-  }
-  {
     goPackagePath = "github.com/miekg/dns";
     fetch = {
       type = "git";
       url = "https://github.com/miekg/dns";
-      rev = "db96a2b759cdef4f11a34506a42eb8d1290c598e";
-      sha256 = "0h5n4psd0p7q55jadgsgz2a1aj791yanrfj76avalh6aawvdpcm6";
+      rev = "ca336a1f95a6b89be9c250df26c7a41742eb4a6f";
+      sha256 = "03yh1zszhspmmq0v22ckw96q8ds2a5s3nd0c6r3p3n165w28z434";
     };
   }
   {
@@ -131,8 +122,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/russross/blackfriday";
-      rev = "35eb537633d9950afc8ae7bdf0edb6134584e9fc";
-      sha256 = "1hwi1nq5kkpcci7lf4fwhs8jj0mf6xcbdz1vgijpfyyd0zr6mphc";
+      rev = "5f33e7b7878355cd2b7e6b8eefc48a5472c69f70";
+      sha256 = "0d7faqxrxvh8hwc1r8gbasgmr8x5blxvzciwspir2yafjfbqy87k";
     };
   }
   {
@@ -149,8 +140,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/xenolf/lego";
-      rev = "82ac43327b01319544c050d5d78a4edeff9565d2";
-      sha256 = "0zs1l4dm0srkx78a7rqq1g8g4yn84c07177zbaa286jqpzgijahi";
+      rev = "f5d538caab6dc0c167d4e32990c79bbf9eff578c";
+      sha256 = "026sjqinb0j4ddfh3rwhhh7a1yjkfdmdr4yflba5syp1hrjf1f37";
     };
   }
   {
@@ -158,8 +149,8 @@
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/crypto";
-      rev = "6ab629be5e31660579425a738ba8870beb5b7404";
-      sha256 = "1pk98j3wcxkns9whgazhid3if0dnaf57hmq0h6byq75aj9xbncxj";
+      rev = "41d678d1df78cd0410143162dff954e6dc09300f";
+      sha256 = "1gcw2850nghsfi3m98ibsxs8bwqzhdjsgiznrr9ymarzn58v3357";
     };
   }
   {
@@ -167,8 +158,8 @@
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/net";
-      rev = "f4fe4abe3c785295ddf81c7f1823bcd3bad391b6";
-      sha256 = "0l50x533pj0sj3gnr30zxgm51y4x5a5fwc515zj93iy1z0pyf9cn";
+      rev = "f2499483f923065a842d38eb4c7f1927e6fc6e6d";
+      sha256 = "0q1ps8igfczfafk39hkp8gs57s6qxjvf2c48hiq00p873agz0x7s";
     };
   }
   {
@@ -176,8 +167,8 @@
     fetch = {
       type = "git";
       url = "https://gopkg.in/natefinch/lumberjack.v2";
-      rev = "514cbda263a734ae8caac038dadf05f8f3f9f738";
-      sha256 = "1v92v8vkip36l2fs6l5dpp655151hrijjc781cif658r8nf7xr82";
+      rev = "dd45e6a67c53f673bb49ca8a001fd3a63ceb640e";
+      sha256 = "1fla2mzbwl1lxa9na3xhjmcszn8kiw051xq7i9xzbazzpgf0csg0";
     };
   }
   {
@@ -185,8 +176,8 @@
     fetch = {
       type = "git";
       url = "https://gopkg.in/square/go-jose.v1";
-      rev = "139276ceb5afbf13e636c44e9382f0ca75c12ba3";
-      sha256 = "1f46qka0xzzkbsg01r9c9fi9zlzai7h83mp9hlwg9m5s73h8gzwj";
+      rev = "aa2e30fdd1fe9dd3394119af66451ae790d50e0d";
+      sha256 = "0drajyadd6c4m5qv0jxcv748qczg8sgxz28nva1jn39f234m02is";
     };
   }
   {
@@ -194,8 +185,8 @@
     fetch = {
       type = "git";
       url = "https://gopkg.in/yaml.v2";
-      rev = "31c299268d302dd0aa9a0dcf765a3d58971ac83f";
-      sha256 = "14jkpa8g0s448n2x5qdi05m59ncsdscby1wy2p089zxl9nqavm8h";
+      rev = "14227de293ca979cf205cd88769fe71ed96a97e2";
+      sha256 = "038hnrjcnjygyi3qidfrkpkakis82qg381sr495d2s40g2dwlzah";
     };
   }
 ]
diff --git a/pkgs/servers/dns/knot-dns/default.nix b/pkgs/servers/dns/knot-dns/default.nix
index 9ecd6fe0b9d5..07ba9cef82fb 100644
--- a/pkgs/servers/dns/knot-dns/default.nix
+++ b/pkgs/servers/dns/knot-dns/default.nix
@@ -15,10 +15,11 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [
-    gnutls jansson liburcu lmdb libcap_ng libidn
-    systemd nettle libedit
+    gnutls jansson liburcu lmdb libidn
+    nettle libedit
     # without sphinx &al. for developer documentation
-  ];
+  ]
+    ++ stdenv.lib.optionals stdenv.isLinux [ libcap_ng systemd ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/servers/dns/knot-resolver/default.nix b/pkgs/servers/dns/knot-resolver/default.nix
new file mode 100644
index 000000000000..3c84d0942e76
--- /dev/null
+++ b/pkgs/servers/dns/knot-resolver/default.nix
@@ -0,0 +1,70 @@
+{ stdenv, fetchurl, pkgconfig, utillinux, vimNox, which
+, knot-dns, luajit, libuv, lmdb
+, cmocka, systemd, hiredis, libmemcached
+, gnutls, nettle
+, luajitPackages, makeWrapper
+}:
+
+let
+  inherit (stdenv.lib) optional;
+in
+stdenv.mkDerivation rec {
+  name = "knot-resolver-${version}";
+  version = "1.2.0";
+
+  src = fetchurl {
+    url = "http://secure.nic.cz/files/knot-resolver/${name}.tar.xz";
+    sha256 = "b8828197dbd563e4b502571538c6d44ef2bb07dede1df884b785921f8aec77fd";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  configurePhase = ":";
+
+  nativeBuildInputs = [ pkgconfig which makeWrapper ]
+    ++ [(if stdenv.isLinux then utillinux.bin/*hexdump*/ else vimNox/*xxd*/)];
+
+  buildInputs = [ knot-dns luajit libuv gnutls ]
+    # TODO: lmdb needs lmdb.pc; embedded for now
+    ## optional dependencies
+    ++ optional doInstallCheck cmocka
+    ++ optional stdenv.isLinux systemd # socket activation
+    ++ [
+      nettle # DNS cookies
+      hiredis libmemcached # additional cache backends
+      # http://knot-resolver.readthedocs.io/en/latest/build.html#requirements
+    ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+  CFLAGS = [ "-O2" "-DNDEBUG" ];
+
+  enableParallelBuilding = true;
+
+  doInstallCheck = true;
+  installCheckTarget = "check";
+  preInstallCheck = ''
+    export LD_LIBRARY_PATH="$out/lib"
+  '';
+
+  # optional: to allow auto-bootstrapping root trust anchor via https
+  postInstall = with luajitPackages; ''
+    wrapProgram "$out/sbin/kresd" \
+      --set LUA_PATH '${
+        stdenv.lib.concatStringsSep ";"
+          (map getLuaPath [ luasec luasocket ])
+        }' \
+      --set LUA_CPATH '${
+        stdenv.lib.concatStringsSep ";"
+          (map getLuaCPath [ luasec luasocket ])
+        }'
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Caching validating DNS resolver, from .cz domain registry";
+    homepage = https://knot-resolver.cz;
+    license = licenses.gpl3Plus;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.vcunat /* upstream developer */ ];
+  };
+}
+
diff --git a/pkgs/servers/dns/pdns-recursor/default.nix b/pkgs/servers/dns/pdns-recursor/default.nix
new file mode 100644
index 000000000000..70deadb74e14
--- /dev/null
+++ b/pkgs/servers/dns/pdns-recursor/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, pkgconfig, boost
+, openssl, systemd, lua, luajit, protobuf
+, enableLua ? false
+, enableProtoBuf ? false
+}:
+
+assert enableLua      -> lua != null && luajit != null;
+assert enableProtoBuf -> protobuf != null;
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "pdns-recursor-${version}";
+  version = "4.0.4";
+
+  src = fetchurl {
+    url = "https://downloads.powerdns.com/releases/pdns-recursor-${version}.tar.bz2";
+    sha256 = "0k8y9zxj2lz4rq782vgzr28yd43q0hwlnvszwq0k9l6c967pff13";
+  };
+
+  buildInputs = [
+    boost openssl pkgconfig systemd
+  ] ++ optional enableLua [ lua luajit ]
+    ++ optional enableProtoBuf protobuf;
+
+  configureFlags = [
+    "--enable-reproducible"
+    "--with-systemd"
+  ];
+
+  meta = {
+    description = "A recursive DNS server";
+    homepage = http://www.powerdns.com/;
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ rnhmjoj ];
+  };
+}
diff --git a/pkgs/servers/freeradius/default.nix b/pkgs/servers/freeradius/default.nix
index cbafe16623ed..117fa8782c9b 100644
--- a/pkgs/servers/freeradius/default.nix
+++ b/pkgs/servers/freeradius/default.nix
@@ -2,9 +2,9 @@
 , openssl
 , linkOpenssl? true
 , openldap
-, withLdap ? false
+, withLdap ? true
 , sqlite
-, withSqlite ? false
+, withSqlite ? true
 , libpcap
 , withPcap ? true
 , libcap
@@ -40,9 +40,16 @@ assert withCollectd -> collectd != null;
 with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "freeradius-${version}";
-  version = "3.0.11";
+  version = "3.0.12";
 
-  buildInputs = [ autoreconfHook openssl talloc finger_bsd perl ]
+  src = fetchurl {
+    url = "ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-${version}.tar.gz";
+    sha256 = "182xnb9pdsivlyfm471l90m37q9i04h7jadhkgm0ivvzrzpzcnja";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ openssl talloc finger_bsd perl ]
     ++ optional withLdap openldap
     ++ optional withSqlite sqlite
     ++ optional withPcap libpcap
@@ -54,8 +61,6 @@ stdenv.mkDerivation rec {
     ++ optional withYubikey libyubikey
     ++ optional withCollectd collectd;
 
-  # NOTE: are the --with-{lib}-lib-dir and --with-{lib}-include-dir necessary with buildInputs ?
-
   configureFlags = [
      "--sysconfdir=/etc"
      "--localstatedir=/var"
@@ -70,11 +75,6 @@ stdenv.mkDerivation rec {
     "localstatedir=\${TMPDIR}"
   ];
 
-  src = fetchurl {
-    url = "ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-${version}.tar.gz";
-    sha256 = "0naxw9b060rbp4409904j6nr2zwl6wbjrbq1839xrwhmaf8p4yxr";
-  };
-
   meta = with stdenv.lib; {
     homepage = http://freeradius.org/;
     description = "A modular, high performance free RADIUS suite";
diff --git a/pkgs/servers/http/nginx/mainline.nix b/pkgs/servers/http/nginx/mainline.nix
index 0e688b0c0c46..5d976a33488c 100644
--- a/pkgs/servers/http/nginx/mainline.nix
+++ b/pkgs/servers/http/nginx/mainline.nix
@@ -1,6 +1,6 @@
 { callPackage, ... }@args:
 
 callPackage ./generic.nix (args // {
-  version = "1.11.8";
-  sha256 = "0d3bcrgj2ykky2yk06y0ihv6832s30mqzcfwq8a560brbmqz7bjk";
+  version = "1.11.9";
+  sha256 = "0j2pcara9ir2xj3m2mjzf7wz46mdy51c0kal61cp0ldm2qgvf8nw";
 })
diff --git a/pkgs/servers/monitoring/munin/default.nix b/pkgs/servers/monitoring/munin/default.nix
index 25ff8ed25fc7..3e4e778e238b 100644
--- a/pkgs/servers/monitoring/munin/default.nix
+++ b/pkgs/servers/monitoring/munin/default.nix
@@ -1,14 +1,16 @@
-{ stdenv, fetchurl, makeWrapper, which, coreutils, rrdtool, perl, perlPackages
+{ stdenv, fetchFromGitHub, makeWrapper, which, coreutils, rrdtool, perl, perlPackages
 , python, ruby, jre, nettools
 }:
 
 stdenv.mkDerivation rec {
-  version = "2.0.29";
+  version = "2.0.30";
   name = "munin-${version}";
 
-  src = fetchurl {
-    url = "https://github.com/munin-monitoring/munin/archive/${version}.tar.gz";
-    sha256 = "1zpv0p10iyx49z1hsqvlkk6hh46hp9dhbrdyx103hgx7p3xnxfnv";
+  src = fetchFromGitHub {
+    owner = "munin-monitoring";
+    repo = "munin";
+    rev = version;
+    sha256 = "1sxsdfq9a5d8b13jigr06gs7n4m3c95645sfyyl49bkfy0n5cxrg";
   };
 
   buildInputs = [ 
diff --git a/pkgs/servers/monitoring/nagios/plugins/official-2.x.nix b/pkgs/servers/monitoring/nagios/plugins/official-2.x.nix
index 306dee0ec627..897182fe225c 100644
--- a/pkgs/servers/monitoring/nagios/plugins/official-2.x.nix
+++ b/pkgs/servers/monitoring/nagios/plugins/official-2.x.nix
@@ -1,12 +1,12 @@
-{ stdenv, fetchurl, openssh }:
+{ stdenv, fetchurl, openssh, openssl }:
 
 stdenv.mkDerivation rec {
   name = "nagios-plugins-${version}";
-  version = "2.1.4";
+  version = "2.2.0";
 
   src = fetchurl {
     url = "http://nagios-plugins.org/download/${name}.tar.gz";
-    sha256 = "146hrpcwciz0niqsv4k5yvkhaggs9mr5v02xnnxp5yp0xpdbama3";
+    sha256 = "074yia04py5y07sbgkvri10dv8nf41kqq1x6kmwqcix5vvm9qyy3";
   };
 
   # !!! Awful hack. Grrr... this of course only works on NixOS.
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
   postInstall = "ln -s libexec $out/bin";
 
   # !!! make openssh a runtime dependency only
-  buildInputs = [ openssh ];
+  buildInputs = [ openssh openssl ];
 
   meta = {
     description = "Official plugins for Nagios";
diff --git a/pkgs/servers/monitoring/riemann/default.nix b/pkgs/servers/monitoring/riemann/default.nix
index 5d6534749619..64585de51ff3 100644
--- a/pkgs/servers/monitoring/riemann/default.nix
+++ b/pkgs/servers/monitoring/riemann/default.nix
@@ -1,23 +1,27 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, makeWrapper, jre }:
 
 stdenv.mkDerivation rec {
   name = "riemann-${version}";
-  version = "0.2.9";
+  version = "0.2.12";
 
   src = fetchurl {
-    url = "http://aphyr.com/riemann/${name}.tar.bz2";
-    sha256 = "10zz92sg9ak8g7xsfc05p4kic6hzwj7nqpkjgsd8f7f3slvfjqw3";
+    url = "https://github.com/riemann/riemann/releases/download/${version}/${name}.tar.bz2";
+    sha256 = "1x57gi301rg6faxm4q5scq9dpp0v9nqiwjpsgigdb8whmjr1zwkr";
   };
 
+  nativeBuildInputs = [ makeWrapper ];
+
   phases = [ "unpackPhase" "installPhase" ];
 
   installPhase = ''
-    sed -i 's#lib/riemann.jar#$out/share/java/riemann.jar#' bin/riemann
+    substituteInPlace bin/riemann --replace '$top/lib/riemann.jar' "$out/share/java/riemann.jar"
 
     mkdir -p $out/share/java $out/bin $out/etc
     mv lib/riemann.jar $out/share/java/
     mv bin/riemann $out/bin/
     mv etc/riemann.config $out/etc/
+
+    wrapProgram "$out/bin/riemann" --prefix PATH : "${jre}/bin"
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/servers/monitoring/telegraf/default.nix b/pkgs/servers/monitoring/telegraf/default.nix
index 996c839acff9..a3c0e3c9226f 100644
--- a/pkgs/servers/monitoring/telegraf/default.nix
+++ b/pkgs/servers/monitoring/telegraf/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "telegraf-${version}";
-  version = "1.1.2";
+  version = "1.2.0";
 
   goPackagePath = "github.com/influxdata/telegraf";
 
@@ -12,7 +12,7 @@ buildGoPackage rec {
     owner = "influxdata";
     repo = "telegraf";
     rev = "${version}";
-    sha256 = "0dgrbdyz261j28wcq636125ha4xmfgh4y9shlg8m1y6jqdqd2zf2";
+    sha256 = "0kijg3j2jnz7jfybycv2scvpsfmxg83jh8wl95p2bw322ypqlks1";
   };
 
   goDeps = ./. + builtins.toPath "/deps-${version}.nix";
diff --git a/pkgs/servers/monitoring/telegraf/deps-1.1.2.nix b/pkgs/servers/monitoring/telegraf/deps-1.2.0.nix
index b62ae44dbc92..a866881e53d9 100644
--- a/pkgs/servers/monitoring/telegraf/deps-1.1.2.nix
+++ b/pkgs/servers/monitoring/telegraf/deps-1.2.0.nix
@@ -199,15 +199,6 @@
     };
   }
   {
-    goPackagePath = "github.com/gonuts/go-shellquote";
-    fetch = {
-      type = "git";
-      url = "https://github.com/gonuts/go-shellquote";
-      rev = "e842a11b24c6abfb3dd27af69a17f482e4b483c2";
-      sha256 = "19lbz7wl241bsyzsv2ai40b2vnj8c9nl107b6jf9gid3i6h0xydg";
-    };
-  }
-  {
     goPackagePath = "github.com/gorilla/context";
     fetch = {
       type = "git";
@@ -307,6 +298,15 @@
     };
   }
   {
+    goPackagePath = "github.com/kballard/go-shellquote";
+    fetch = {
+      type = "git";
+      url = "https://github.com/kballard/go-shellquote";
+      rev = "d8ec1a69a250a17bb0e419c386eac1f3711dc142";
+      sha256 = "1a57hm0zwyi70am670s0pkglnkk1ilddnmfxz1ba7innpkf5z6s7";
+    };
+  }
+  {
     goPackagePath = "github.com/klauspost/crc32";
     fetch = {
       type = "git";
@@ -446,8 +446,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/shirou/gopsutil";
-      rev = "4d0c402af66c78735c5ccf820dc2ca7de5e4ff08";
-      sha256 = "1wkp7chzpz6brq2y0k2mvsf0iaknns279wfsjn5gm6gvih49lqni";
+      rev = "1516eb9ddc5e61ba58874047a98f8b44b5e585e8";
+      sha256 = "1pnl1g2l1y5vmnraq97rbm0nirprqvfzxsp6h4xacn1429jdl5bv";
     };
   }
   {
@@ -491,8 +491,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/wvanbergen/kafka";
-      rev = "46f9a1cf3f670edec492029fadded9c2d9e18866";
-      sha256 = "1czmbilprffdbwnrq4wcllaqknbq91l6p0ni6b55fkaggnwck694";
+      rev = "bc265fedb9ff5b5c5d3c0fdcef4a819b3523d3ee";
+      sha256 = "0x86gnkpsr6gsc6mk2312ay8yqrzscvvdra2knhvwgaws6rzvj2l";
     };
   }
   {
diff --git a/pkgs/servers/search/groonga/default.nix b/pkgs/servers/search/groonga/default.nix
index 8dce24948fe3..6e3ab5a4eaea 100644
--- a/pkgs/servers/search/groonga/default.nix
+++ b/pkgs/servers/search/groonga/default.nix
@@ -1,46 +1,42 @@
 { stdenv, fetchurl, mecab, kytea, libedit, pkgconfig
 , suggestSupport ? false, zeromq, libevent, libmsgpack
-, lz4Support ? false, lz4
+, lz4Support  ? false, lz4
 , zlibSupport ? false, zlib
 }:
 
 stdenv.mkDerivation rec {
 
   name    = "groonga-${version}";
-  version = "6.1.1";
+  version = "6.1.5";
 
   src = fetchurl {
     url    = "http://packages.groonga.org/source/groonga/${name}.tar.gz";
-    sha256 = "03h65gycy0j2q4n5h62x3sw76ibdywdvmiciys5a7ppxb2mncabz";
+    sha256 = "0phh4qp7ky5rw8xgxv3gjzw2cadkjl604xrdyxxbpd30i354sh5x";
   };
 
-  buildInputs = with stdenv.lib; [ pkgconfig mecab kytea libedit ] ++
-    optional lz4Support lz4 ++
-    optional zlibSupport zlib ++
-    optional suggestSupport [ zeromq libevent libmsgpack ];
+  buildInputs = with stdenv.lib;
+     [ pkgconfig mecab kytea libedit ]
+    ++ optional lz4Support lz4
+    ++ optional zlibSupport zlib
+    ++ optionals suggestSupport [ zeromq libevent libmsgpack ];
 
-  configureFlags = with stdenv.lib; ''
-    ${optionalString zlibSupport "--with-zlib"}
-    ${optionalString lz4Support "--with-lz4"}
-  '';
-
-  doInstallCheck = true;
+  configureFlags = with stdenv.lib;
+       optional zlibSupport "--with-zlib"
+    ++ optional lz4Support  "--with-lz4";
 
+  doInstallCheck    = true;
   installCheckPhase = "$out/bin/groonga --version";
 
   meta = with stdenv.lib; {
-    homepage = http://groonga.org/;
+    homepage    = http://groonga.org/;
     description = "An open-source fulltext search engine and column store";
-
+    license     = licenses.lgpl21;
+    maintainers = [ maintainers.ericsagnes ];
+    platforms   = platforms.linux;
     longDescription = ''
       Groonga is an open-source fulltext search engine and column store. 
       It lets you write high-performance applications that requires fulltext search.
     '';
-
-    license = licenses.lgpl21;
-
-    maintainers = [ maintainers.ericsagnes ];
-    platforms = platforms.linux;
   };
 
 }
diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix
index f50a97afd20d..4f64afe3d92b 100644
--- a/pkgs/servers/sql/mariadb/default.nix
+++ b/pkgs/servers/sql/mariadb/default.nix
@@ -15,11 +15,11 @@ mariadb = everything // {
 };
 
 common = rec { # attributes common to both builds
-  version = "10.1.19";
+  version = "10.1.21";
 
   src = fetchurl {
     url    = "https://downloads.mariadb.org/interstitial/mariadb-${version}/source/mariadb-${version}.tar.gz";
-    sha256 = "108s4mimdbmgmmn5pcr9a405j70cyny9adzv49s75lg22krp74sv";
+    sha256 = "144lcm5awcf0k6a7saqfr4p2kg8r5wbdhdm4cmn2m8hyg1an70as";
   };
 
   prePatch = ''
@@ -161,4 +161,3 @@ everything = stdenv.mkDerivation (common // {
 });
 
 in mariadb
-
diff --git a/pkgs/servers/squid/4.nix b/pkgs/servers/squid/4.nix
new file mode 100644
index 000000000000..52fcad7ff958
--- /dev/null
+++ b/pkgs/servers/squid/4.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, perl, openldap, pam, db, cyrus_sasl, libcap
+, expat, libxml2, openssl }:
+
+stdenv.mkDerivation rec {
+  name = "squid-4.0.17";
+
+  src = fetchurl {
+    url = "http://www.squid-cache.org/Versions/v4/${name}.tar.xz";
+    sha256 = "1713fqw59r3d892p5hpbkhmfcaw6jzfnngfn5f4h46sx963k87wb";
+  };
+
+  buildInputs = [
+    perl openldap pam db cyrus_sasl libcap expat libxml2 openssl
+  ];
+
+  configureFlags = [
+    "--enable-ipv6"
+    "--disable-strict-error-checking"
+    "--disable-arch-native"
+    "--with-openssl"
+    "--enable-ssl-crtd"
+    "--enable-linux-netfilter"
+    "--enable-storeio=ufs,aufs,diskd,rock"
+    "--enable-removal-policies=lru,heap"
+    "--enable-delay-pools"
+    "--enable-x-accelerator-vary"
+  ];
+
+  meta = with stdenv.lib; {
+    description = "A caching proxy for the Web supporting HTTP, HTTPS, FTP, and more";
+    homepage = "http://www.squid-cache.org";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ fpletz raskin ];
+  };
+}
diff --git a/pkgs/shells/tcsh/avoid-gcc5-wrong-optimisation.patch b/pkgs/shells/tcsh/avoid-gcc5-wrong-optimisation.patch
deleted file mode 100644
index b35d29680af4..000000000000
--- a/pkgs/shells/tcsh/avoid-gcc5-wrong-optimisation.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: christos <christos>
-Date: Thu, 28 May 2015 11:47:03 +0000
-Subject: [PATCH] avoid gcc-5 optimization malloc + memset = calloc (Fridolin
-Pokorny)
-
----
-tc.alloc.c | 5 ++++-
-1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/tc.alloc.c b/tc.alloc.c
-index b9aec63..c1cb330 100644
---- a/tc.alloc.c
-+++ b/tc.alloc.c
-@@ -348,10 +348,13 @@ calloc(size_t i, size_t j)
- {
- #ifndef lint
-     char *cp;
-+    volatile size_t k;
- 
-     i *= j;
-     cp = xmalloc(i);
--    memset(cp, 0, i);
-+    /* Stop gcc 5.x from optimizing malloc+memset = calloc */
-+    k = i;
-+    memset(cp, 0, k);
- 
-     return ((memalign_t) cp);
- #else
diff --git a/pkgs/shells/tcsh/default.nix b/pkgs/shells/tcsh/default.nix
index 027025100144..da76e2c3027a 100644
--- a/pkgs/shells/tcsh/default.nix
+++ b/pkgs/shells/tcsh/default.nix
@@ -3,19 +3,17 @@
 
 stdenv.mkDerivation rec {
   name = "tcsh-${version}";
-  version = "6.19.00";
-  
+  version = "6.20.00";
+
   src = fetchurl {
-    urls = [ 
-             "http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/${name}.tar.gz" 
-             "ftp://ftp.astron.com/pub/tcsh/${name}.tar.gz" 
-             "ftp://ftp.funet.fi/pub/unix/shells/tcsh/${name}.tar.gz"
-             ];
-    sha256 = "0jaw51382pqyb6d1kgfg8ir0wd3p5qr2bmg8svcmjhlyp3h73qhj";
+    urls = [
+      "http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/${name}.tar.gz"
+      "ftp://ftp.astron.com/pub/tcsh/${name}.tar.gz"
+      "ftp://ftp.funet.fi/pub/unix/shells/tcsh/${name}.tar.gz"
+    ];
+    sha256 = "17ggxkkn5skl0v1x0j6hbv5l0sgnidfzwv16992sqkdm983fg7dq";
   };
 
-  patches = [ ./avoid-gcc5-wrong-optimisation.patch ./tcsh.glibc-2.24.patch ];
-  
   buildInputs = [ ncurses ];
 
   meta = with stdenv.lib;{
diff --git a/pkgs/shells/tcsh/tcsh.glibc-2.24.patch b/pkgs/shells/tcsh/tcsh.glibc-2.24.patch
deleted file mode 100644
index 267d89c8f1be..000000000000
--- a/pkgs/shells/tcsh/tcsh.glibc-2.24.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Proposed patch from Debian bug tracker by Aurelien Jarno <aurel32@debian.org>
-
-diff --git a/sh.proc.c b/sh.proc.c
-index ad07250..5c68409 100644
---- a/sh.proc.c
-+++ b/sh.proc.c
-@@ -47,11 +47,11 @@ RCSID("$tcsh$")
- # define HZ 16
- #endif /* aiws */
- 
--#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
--# if !defined(__ANDROID__)
-+#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__linux__) || defined(__GLIBC__)
-+# if !defined(__ANDROID__) && !defined(__GLIBC__)
- #  define BSDWAIT
- # endif
--#endif /* _BSD || (IRIS4D && __STDC__) || __lucid || glibc */
-+#endif /* _BSD || (IRIS4D && __STDC__) || __lucid || gnu-linux */
- #ifndef WTERMSIG
- # define WTERMSIG(w)	(((union wait *) &(w))->w_termsig)
- # ifndef BSDWAIT
diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix
index 11f9a43c035e..7e0eaeddd2c4 100644
--- a/pkgs/stdenv/adapters.nix
+++ b/pkgs/stdenv/adapters.nix
@@ -56,69 +56,59 @@ rec {
 
   # Return a modified stdenv that adds a cross compiler to the
   # builds.
-  makeStdenvCross = stdenv: cross: binutilsCross: gccCross: stdenv //
-    { mkDerivation = {name ? "", buildInputs ? [], nativeBuildInputs ? [],
-            propagatedBuildInputs ? [], propagatedNativeBuildInputs ? [],
-            selfNativeBuildInput ? false, ...}@args: let
-
-            # *BuildInputs exists temporarily as another name for
-            # *HostInputs.
-
-            # In nixpkgs, sometimes 'null' gets in as a buildInputs element,
-            # and we handle that through isAttrs.
-            getNativeDrv = drv: drv.nativeDrv or drv;
-            getCrossDrv = drv: drv.crossDrv or drv;
-            nativeBuildInputsDrvs = map getNativeDrv nativeBuildInputs;
-            buildInputsDrvs = map getCrossDrv buildInputs;
-            propagatedBuildInputsDrvs = map getCrossDrv propagatedBuildInputs;
-            propagatedNativeBuildInputsDrvs = map getNativeDrv propagatedNativeBuildInputs;
-
-            # The base stdenv already knows that nativeBuildInputs and
-            # buildInputs should be built with the usual gcc-wrapper
-            # And the same for propagatedBuildInputs.
-            nativeDrv = stdenv.mkDerivation args;
-
-            # Temporary expression until the cross_renaming, to handle the
-            # case of pkgconfig given as buildInput, but to be used as
-            # nativeBuildInput.
-            hostAsNativeDrv = drv:
-                builtins.unsafeDiscardStringContext drv.nativeDrv.drvPath
-                == builtins.unsafeDiscardStringContext drv.crossDrv.drvPath;
-            buildInputsNotNull = stdenv.lib.filter
-                (drv: builtins.isAttrs drv && drv ? nativeDrv) buildInputs;
-            nativeInputsFromBuildInputs = stdenv.lib.filter hostAsNativeDrv buildInputsNotNull;
-
-            # We should overwrite the input attributes in crossDrv, to overwrite
-            # the defaults for only-native builds in the base stdenv
-            crossDrv = if cross == null then nativeDrv else
-                stdenv.mkDerivation (args // {
-                    name = name + "-" + cross.config;
-                    nativeBuildInputs = nativeBuildInputsDrvs
-                      ++ nativeInputsFromBuildInputs
-                      ++ [ gccCross binutilsCross ]
-                      ++ stdenv.lib.optional selfNativeBuildInput nativeDrv
-                        # without proper `file` command, libtool sometimes fails
-                        # to recognize 64-bit DLLs
-                      ++ stdenv.lib.optional (cross.config  == "x86_64-w64-mingw32") pkgs.file
-                      ;
-
-                    # Cross-linking dynamic libraries, every buildInput should
-                    # be propagated because ld needs the -rpath-link to find
-                    # any library needed to link the program dynamically at
-                    # loader time. ld(1) explains it.
-                    buildInputs = [];
-                    propagatedBuildInputs = propagatedBuildInputsDrvs ++ buildInputsDrvs;
-                    propagatedNativeBuildInputs = propagatedNativeBuildInputsDrvs;
-
-                    crossConfig = cross.config;
-                } // args.crossAttrs or {});
-        in nativeDrv // {
-          inherit crossDrv nativeDrv;
-        };
-    } // {
-      inherit cross gccCross binutilsCross;
-      ccCross = gccCross;
-    };
+  makeStdenvCross = stdenv: cross: binutilsCross: gccCross: stdenv // {
+
+    mkDerivation =
+      { name ? "", buildInputs ? [], nativeBuildInputs ? []
+      , propagatedBuildInputs ? [], propagatedNativeBuildInputs ? []
+      , selfNativeBuildInput ? false, ...
+      } @ args:
+
+      let
+        # *BuildInputs exists temporarily as another name for
+        # *HostInputs.
+
+        # The base stdenv already knows that nativeBuildInputs and
+        # buildInputs should be built with the usual gcc-wrapper
+        # And the same for propagatedBuildInputs.
+        nativeDrv = stdenv.mkDerivation args;
+
+        # Temporary expression until the cross_renaming, to handle the
+        # case of pkgconfig given as buildInput, but to be used as
+        # nativeBuildInput.
+        hostAsNativeDrv = drv:
+            builtins.unsafeDiscardStringContext drv.nativeDrv.drvPath
+            == builtins.unsafeDiscardStringContext drv.crossDrv.drvPath;
+        buildInputsNotNull = stdenv.lib.filter
+            (drv: builtins.isAttrs drv && drv ? nativeDrv) buildInputs;
+        nativeInputsFromBuildInputs = stdenv.lib.filter hostAsNativeDrv buildInputsNotNull;
+      in
+        stdenv.mkDerivation (args // {
+          name = name + "-" + cross.config;
+          nativeBuildInputs = nativeBuildInputs
+            ++ nativeInputsFromBuildInputs
+            ++ [ gccCross binutilsCross ]
+            ++ stdenv.lib.optional selfNativeBuildInput nativeDrv
+              # without proper `file` command, libtool sometimes fails
+              # to recognize 64-bit DLLs
+            ++ stdenv.lib.optional (cross.config  == "x86_64-w64-mingw32") pkgs.file
+            ;
+
+          # Cross-linking dynamic libraries, every buildInput should
+          # be propagated because ld needs the -rpath-link to find
+          # any library needed to link the program dynamically at
+          # loader time. ld(1) explains it.
+          buildInputs = [];
+          propagatedBuildInputs = propagatedBuildInputs ++ buildInputs;
+          propagatedNativeBuildInputs = propagatedNativeBuildInputs;
+
+          crossConfig = cross.config;
+        } // args.crossAttrs or {});
+
+    inherit gccCross binutilsCross;
+    ccCross = gccCross;
+
+  };
 
 
   /* Modify a stdenv so that the specified attributes are added to
diff --git a/pkgs/stdenv/booter.nix b/pkgs/stdenv/booter.nix
index 11ca8e1440e1..2c82d12da95d 100644
--- a/pkgs/stdenv/booter.nix
+++ b/pkgs/stdenv/booter.nix
@@ -57,12 +57,17 @@ stageFuns: let
   # debugging purposes.
   folder = stageFun: finalSoFar: let
     args = stageFun finalSoFar;
-    stdenv = args.stdenv // {
-      # For debugging
-      __bootPackages = finalSoFar;
+    args' = args // {
+      stdenv = args.stdenv // {
+        # For debugging
+        __bootPackages = finalSoFar;
+      };
     };
-    args' = args // { inherit stdenv; };
   in
-    (if args.__raw or false then lib.id else allPackages) args';
+    if args.__raw or false
+    then args'
+    else allPackages ((builtins.removeAttrs args' ["selfBuild"]) // {
+      buildPackages = if args.selfBuild or true then null else finalSoFar;
+    });
 
 in lib.lists.fold folder {} withAllowCustomOverrides
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix
index 16f41671b768..37f403acee9e 100644
--- a/pkgs/stdenv/cross/default.nix
+++ b/pkgs/stdenv/cross/default.nix
@@ -1,10 +1,10 @@
 { lib
-, system, platform, crossSystem, config, overlays
+, localSystem, crossSystem, config, overlays
 }:
 
 let
   bootStages = import ../. {
-    inherit lib system platform overlays;
+    inherit lib localSystem overlays;
     crossSystem = null;
     # Ignore custom stdenvs when cross compiling for compatability
     config = builtins.removeAttrs config [ "replaceStdenv" ];
@@ -12,25 +12,28 @@ let
 
 in bootStages ++ [
 
-  # Build Packages.
-  #
-  # For now, this is just used to build the native stdenv. Eventually, it
-  # should be used to build compilers and other such tools targeting the cross
-  # platform. Then, `forceNativeDrv` can be removed.
+  # Build Packages
   (vanillaPackages: {
-    inherit system platform crossSystem config overlays;
+    buildPlatform = localSystem;
+    hostPlatform = localSystem;
+    targetPlatform = crossSystem;
+    inherit config overlays;
+    # Should be false, but we're trying to preserve hashes for now
+    selfBuild = true;
     # It's OK to change the built-time dependencies
     allowCustomOverrides = true;
     stdenv = vanillaPackages.stdenv // {
-      # Needed elsewhere as a hacky way to pass the target
-      cross = crossSystem;
       overrides = _: _: {};
     };
   })
 
-  # Run packages
+  # Run Packages
   (buildPackages: {
-    inherit system platform crossSystem config overlays;
+    buildPlatform = localSystem;
+    hostPlatform = crossSystem;
+    targetPlatform = crossSystem;
+    inherit config overlays;
+    selfBuild = false;
     stdenv = if crossSystem.useiOSCross or false
       then let
           inherit (buildPackages.darwin.ios-cross {
diff --git a/pkgs/stdenv/custom/default.nix b/pkgs/stdenv/custom/default.nix
index d7e9bf53bed1..d5dc977b37a7 100644
--- a/pkgs/stdenv/custom/default.nix
+++ b/pkgs/stdenv/custom/default.nix
@@ -1,12 +1,12 @@
 { lib
-, system, platform, crossSystem, config, overlays
+, localSystem, crossSystem, config, overlays
 }:
 
 assert crossSystem == null;
 
 let
   bootStages = import ../. {
-    inherit lib system platform crossSystem overlays;
+    inherit lib localSystem crossSystem overlays;
     # Remove config.replaceStdenv to ensure termination.
     config = builtins.removeAttrs config [ "replaceStdenv" ];
   };
@@ -15,7 +15,10 @@ in bootStages ++ [
 
   # Additional stage, built using custom stdenv
   (vanillaPackages: {
-    inherit system platform crossSystem config overlays;
+    buildPlatform = localSystem;
+    hostPlatform = localSystem;
+    targetPlatform = localSystem;
+    inherit config overlays;
     stdenv = config.replaceStdenv { pkgs = vanillaPackages; };
   })
 
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix
index e3a87ea078fc..e647c81890e1 100644
--- a/pkgs/stdenv/darwin/default.nix
+++ b/pkgs/stdenv/darwin/default.nix
@@ -1,11 +1,12 @@
 { lib
-, system, platform, crossSystem, config, overlays
+, localSystem, crossSystem, config, overlays
 
 # Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools
 , bootstrapFiles ? let
   fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> {
     url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/33f59c9d11b8d5014dfd18cc11a425f6393c884a/${file}";
-    inherit sha256 system executable;
+    inherit (localSystem) system;
+    inherit sha256 executable;
   }; in {
     sh      = fetch { file = "sh";    sha256 = "1rx4kg6358xdj05z0m139a0zn4f4zfmq4n4vimlmnwyfiyn4x7wk"; };
     bzip2   = fetch { file = "bzip2"; sha256 = "104qnhzk79vkbp2yi0kci6lszgfppvrwk3rgxhry842ly1xz2r7l"; };
@@ -18,6 +19,8 @@
 assert crossSystem == null;
 
 let
+  inherit (localSystem) system platform;
+
   libSystemProfile = ''
     (import "${./standard-sandbox.sb}")
   '';
@@ -98,7 +101,10 @@ in rec {
       };
 
     in {
-      inherit system platform crossSystem config overlays;
+      buildPlatform = localSystem;
+      hostPlatform = localSystem;
+      targetPlatform = localSystem;
+      inherit config overlays;
       stdenv = thisStdenv;
     };
 
@@ -316,7 +322,10 @@ in rec {
     stage3
     stage4
     (prevStage: {
-      inherit system crossSystem platform config overlays;
+      buildPlatform = localSystem;
+      hostPlatform = localSystem;
+      targetPlatform = localSystem;
+      inherit config overlays;
       stdenv = stdenvDarwin prevStage;
     })
   ];
diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix
index f60ffec4b564..78dbde13b89d 100644
--- a/pkgs/stdenv/default.nix
+++ b/pkgs/stdenv/default.nix
@@ -7,7 +7,7 @@
 { # Args just for stdenvs' usage
   lib
   # Args to pass on to the pkgset builder, too
-, system, platform, crossSystem, config, overlays
+, localSystem, crossSystem, config, overlays
 } @ args:
 
 let
@@ -51,4 +51,4 @@ in
     "i686-cygwin" = stagesNative;
     "x86_64-cygwin" = stagesNative;
     "x86_64-freebsd" = stagesFreeBSD;
-  }.${system} or stagesNative
+  }.${localSystem.system} or stagesNative
diff --git a/pkgs/stdenv/freebsd/default.nix b/pkgs/stdenv/freebsd/default.nix
index 2cb059deb34b..b926c6bdd901 100644
--- a/pkgs/stdenv/freebsd/default.nix
+++ b/pkgs/stdenv/freebsd/default.nix
@@ -1,8 +1,9 @@
 { lib
-, system, platform, crossSystem, config, overlays
+, localSystem, crossSystem, config, overlays
 }:
 
 assert crossSystem == null;
+let inherit (localSystem) system; in
 
 
 [
@@ -58,7 +59,10 @@ assert crossSystem == null;
   })
 
   (prevStage: {
-    inherit system crossSystem platform config overlays;
+    buildPlatform = localSystem;
+    hostPlatform = localSystem;
+    targetPlatform = localSystem;
+    inherit config overlays;
     stdenv = import ../generic {
       name = "stdenv-freebsd-boot-3";
       inherit system config;
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index 32e0d8948188..269d7ef893a1 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -115,7 +115,19 @@ let
     , sandboxProfile ? ""
     , propagatedSandboxProfile ? ""
     , ... } @ attrs:
-    let
+    let # Rename argumemnts to avoid cycles
+      buildInputs__ = buildInputs;
+      nativeBuildInputs__ = nativeBuildInputs;
+      propagatedBuildInputs__ = propagatedBuildInputs;
+      propagatedNativeBuildInputs__ = propagatedNativeBuildInputs;
+    in let
+      getNativeDrv = drv: drv.nativeDrv or drv;
+      getCrossDrv = drv: drv.crossDrv or drv;
+      nativeBuildInputs = map getNativeDrv nativeBuildInputs__;
+      buildInputs = map getCrossDrv buildInputs__;
+      propagatedBuildInputs = map getCrossDrv propagatedBuildInputs__;
+      propagatedNativeBuildInputs = map getNativeDrv propagatedNativeBuildInputs__;
+    in let
       pos' =
         if pos != null then
           pos
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index 12da007f2a76..611628b35aba 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -4,21 +4,23 @@
 # compiler and linker that do not search in default locations,
 # ensuring purity of components produced by it.
 { lib
-, system, platform, crossSystem, config, overlays
-
-, bootstrapFiles ?
-    if system == "i686-linux" then import ./bootstrap-files/i686.nix
-    else if system == "x86_64-linux" then import ./bootstrap-files/x86_64.nix
-    else if system == "armv5tel-linux" then import ./bootstrap-files/armv5tel.nix
-    else if system == "armv6l-linux" then import ./bootstrap-files/armv6l.nix
-    else if system == "armv7l-linux" then import ./bootstrap-files/armv7l.nix
-    else if system == "mips64el-linux" then import ./bootstrap-files/loongson2f.nix
-    else abort "unsupported platform for the pure Linux stdenv"
+, localSystem, crossSystem, config, overlays
+
+, bootstrapFiles ? { # switch
+    "i686-linux" = import ./bootstrap-files/i686.nix;
+    "x86_64-linux" = import ./bootstrap-files/x86_64.nix;
+    "armv5tel-linux" = import ./bootstrap-files/armv5tel.nix;
+    "armv6l-linux" = import ./bootstrap-files/armv6l.nix;
+    "armv7l-linux" = import ./bootstrap-files/armv7l.nix;
+    "mips64el-linux" = import ./bootstrap-files/loongson2f.nix;
+  }.${localSystem.system}
+    or (abort "unsupported platform for the pure Linux stdenv")
 }:
 
 assert crossSystem == null;
 
 let
+  inherit (localSystem) system platform;
 
   commonPreHook =
     ''
@@ -91,7 +93,10 @@ let
       };
 
     in {
-      inherit system platform crossSystem config overlays;
+      buildPlatform = localSystem;
+      hostPlatform = localSystem;
+      targetPlatform = localSystem;
+      inherit config overlays;
       stdenv = thisStdenv;
     };
 
@@ -246,7 +251,10 @@ in
   # dependency (`nix-store -qR') on bootstrapTools or the first
   # binutils built.
   (prevStage: {
-    inherit system crossSystem platform config overlays;
+    buildPlatform = localSystem;
+    hostPlatform = localSystem;
+    targetPlatform = localSystem;
+    inherit config overlays;
     stdenv = import ../generic rec {
       inherit system config;
 
diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
index 9f4a4517627e..b5dfcb73a122 100644
--- a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
+++ b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
@@ -57,46 +57,46 @@ let
 
   pkgs = pkgsFun ({inherit system;} // selectedCrossSystem);
 
-  inherit (pkgs) stdenv nukeReferences cpio binutilsCross;
-
-  glibc = pkgs.libcCross;
-  bash = pkgs.bash.crossDrv;
-  findutils = pkgs.findutils.crossDrv;
-  diffutils = pkgs.diffutils.crossDrv;
-  gnused = pkgs.gnused.crossDrv;
-  gnugrep = pkgs.gnugrep.crossDrv;
-  gawk = pkgs.gawk.crossDrv;
-  gzip = pkgs.gzip.crossDrv;
-  bzip2 = pkgs.bzip2.crossDrv;
-  gnumake = pkgs.gnumake.crossDrv;
-  patch = pkgs.patch.crossDrv;
-  patchelf = pkgs.patchelf.crossDrv;
-  gcc = pkgs.gcc.cc.crossDrv;
-  gmpxx = pkgs.gmpxx.crossDrv;
-  mpfr = pkgs.mpfr.crossDrv;
-  zlib = pkgs.zlib.crossDrv;
-  libmpc = pkgs.libmpc.crossDrv;
-  binutils = pkgs.binutils.crossDrv;
-  libelf = pkgs.libelf.crossDrv;
+  inherit (pkgs.buildPackages) stdenv nukeReferences cpio binutilsCross;
+
+  glibc = pkgs.buildPackages.libcCross;
+  bash = pkgs.bash;
+  findutils = pkgs.findutils;
+  diffutils = pkgs.diffutils;
+  gnused = pkgs.gnused;
+  gnugrep = pkgs.gnugrep;
+  gawk = pkgs.gawk;
+  gzip = pkgs.gzip;
+  bzip2 = pkgs.bzip2;
+  gnumake = pkgs.gnumake;
+  patch = pkgs.patch;
+  patchelf = pkgs.patchelf;
+  gcc = pkgs.gcc.cc;
+  gmpxx = pkgs.gmpxx;
+  mpfr = pkgs.mpfr;
+  zlib = pkgs.zlib;
+  libmpc = pkgs.libmpc;
+  binutils = pkgs.binutils;
+  libelf = pkgs.libelf;
 
   # Keep these versions in sync with the versions used in the current GCC!
-  isl = pkgs.isl_0_14.crossDrv;
+  isl = pkgs.isl_0_14;
 in
 
 rec {
 
 
-  coreutilsMinimal = (pkgs.coreutils.override (args: {
+  coreutilsMinimal = pkgs.coreutils.override (args: {
     # We want coreutils without ACL/attr support.
     aclSupport = false;
     attrSupport = false;
     # Our tooling currently can't handle scripts in bin/, only ELFs and symlinks.
     singleBinary = "symlinks";
-  })).crossDrv;
+  });
 
-  tarMinimal = (pkgs.gnutar.override { acl = null; }).crossDrv;
+  tarMinimal = pkgs.gnutar.override { acl = null; };
 
-  busyboxMinimal = (pkgs.busybox.override {
+  busyboxMinimal = pkgs.busybox.override {
     useMusl = true;
     enableStatic = true;
     enableMinimal = true;
@@ -109,13 +109,13 @@ rec {
       CONFIG_TAR y
       CONFIG_UNXZ y
     '';
-  }).crossDrv;
+  };
 
   build =
 
     stdenv.mkDerivation {
       name = "stdenv-bootstrap-tools-cross";
-      crossConfig = stdenv.cross.config;
+      crossConfig = pkgs.hostPlatform.config;
 
       buildInputs = [nukeReferences cpio binutilsCross];
 
@@ -173,7 +173,7 @@ rec {
         cp -d ${patch}/bin/* $out/bin
         cp ${patchelf}/bin/* $out/bin
 
-        cp -d ${gnugrep.pcre.crossDrv.out}/lib/libpcre*.so* $out/lib # needed by grep
+        cp -d ${gnugrep.pcre.out}/lib/libpcre*.so* $out/lib # needed by grep
 
         # Copy what we need of GCC.
         cp -d ${gcc.out}/bin/gcc $out/bin
diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix
index 4028638009e1..f5c0976bf931 100644
--- a/pkgs/stdenv/native/default.nix
+++ b/pkgs/stdenv/native/default.nix
@@ -1,10 +1,11 @@
 { lib
-, system, platform, crossSystem, config, overlays
+, localSystem, crossSystem, config, overlays
 }:
 
 assert crossSystem == null;
 
 let
+  inherit (localSystem) system platform;
 
   shell =
     if system == "i686-freebsd" || system == "x86_64-freebsd" then "/usr/local/bin/bash"
@@ -134,7 +135,10 @@ in
 
   # First build a stdenv based only on tools outside the store.
   (prevStage: {
-    inherit system crossSystem platform config overlays;
+    buildPlatform = localSystem;
+    hostPlatform = localSystem;
+    targetPlatform = localSystem;
+    inherit config overlays;
     stdenv = makeStdenv {
       inherit (prevStage) cc fetchurl;
     } // { inherit (prevStage) fetchurl; };
@@ -143,7 +147,10 @@ in
   # Using that, build a stdenv that adds the ‘xz’ command (which most systems
   # don't have, so we mustn't rely on the native environment providing it).
   (prevStage: {
-    inherit system crossSystem platform config overlays;
+    buildPlatform = localSystem;
+    hostPlatform = localSystem;
+    targetPlatform = localSystem;
+    inherit config overlays;
     stdenv = makeStdenv {
       inherit (prevStage.stdenv) cc fetchurl;
       extraPath = [ prevStage.xz ];
diff --git a/pkgs/stdenv/nix/default.nix b/pkgs/stdenv/nix/default.nix
index a5f0a18464c1..9aece3ce829d 100644
--- a/pkgs/stdenv/nix/default.nix
+++ b/pkgs/stdenv/nix/default.nix
@@ -9,9 +9,9 @@ assert crossSystem == null;
 bootStages ++ [
   (prevStage: let
     inherit (prevStage) stdenv;
-    inherit (stdenv) system platform;
   in {
-    inherit system platform crossSystem config;
+    inherit (prevStage) buildPlatform hostPlatform targetPlatform;
+    inherit config overlays;
 
     stdenv = import ../generic rec {
       inherit config;
diff --git a/pkgs/tools/X11/xchainkeys/default.nix b/pkgs/tools/X11/xchainkeys/default.nix
index 3d228fedfb77..238b8c7b2b2d 100644
--- a/pkgs/tools/X11/xchainkeys/default.nix
+++ b/pkgs/tools/X11/xchainkeys/default.nix
@@ -4,14 +4,14 @@ stdenv.mkDerivation rec {
   name = "xchainkeys-0.11";
 
   src = fetchurl {
-    url = "https://xchainkeys.googlecode.com/files/${name}.tar.gz";
+    url = "http://henning-bekel.de/download/xchainkeys/${name}.tar.gz";
     sha256 = "1rpqs7h5krral08vqxwb0imy33z17v5llvrg5hy8hkl2ap7ya0mn";
   };
 
   buildInputs = [ libX11 ];
 
   meta = {
-    homepage = "https://code.google.com/p/xchainkeys/";
+    homepage = "http://henning-bekel.de/xchainkeys/";
     description = "A standalone X11 program to create chained key bindings";
     license = stdenv.lib.licenses.gpl3;
     platforms = stdenv.lib.platforms.unix;
diff --git a/pkgs/tools/audio/pasystray/default.nix b/pkgs/tools/audio/pasystray/default.nix
index 8b5427ed626a..c50805c578f7 100644
--- a/pkgs/tools/audio/pasystray/default.nix
+++ b/pkgs/tools/audio/pasystray/default.nix
@@ -2,13 +2,14 @@
 , gnome3, avahi, gtk3, libnotify, libpulseaudio, xlibsWrapper}:
 
 stdenv.mkDerivation rec {
-  name = "pasystray-0.5.2";
+  name = "pasystray-${version}";
+  version = "0.6.0";
 
   src = fetchFromGitHub {
     owner = "christophgysin";
     repo = "pasystray";
-    rev = "6709fc1e9f792baf4f7b4507a887d5876b2cfa70";
-    sha256 = "1z21wassdiwfnlcrkpdqh8ylblpd1xxjxcmib5mwix9va2lykdfv";
+    rev = name;
+    sha256 = "0k13s7pmz5ks3kli8pwhzd47hcjwv46gd2fgk7i4fbkfwf3z279h";
   };
 
   buildInputs = [ autoconf automake makeWrapper pkgconfig 
@@ -31,7 +32,7 @@ stdenv.mkDerivation rec {
     description = "PulseAudio system tray";
     homepage = "https://github.com/christophgysin/pasystray";
     license = licenses.lgpl21Plus;
-    maintainers = [ maintainers.exlevan ];
+    maintainers = with maintainers; [ exlevan kamilchm ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/tools/filesystems/hubicfuse/default.nix b/pkgs/tools/filesystems/hubicfuse/default.nix
index 7ce48d288030..88922d9ce944 100644
--- a/pkgs/tools/filesystems/hubicfuse/default.nix
+++ b/pkgs/tools/filesystems/hubicfuse/default.nix
@@ -1,12 +1,14 @@
-{ stdenv, fetchurl, pkgconfig, curl, openssl, fuse, libxml2, json_c, file }:
+{ stdenv, fetchFromGitHub, pkgconfig, curl, openssl, fuse, libxml2, json_c, file }:
 
 stdenv.mkDerivation rec {
   name = "hubicfuse-${version}";
-  version = "2.1.0";
+  version = "3.0.0";
 
-  src = fetchurl {
-    url = https://github.com/TurboGit/hubicfuse/archive/v2.1.0.tar.gz;
-    sha256 = "1mnijcwac6k3f6xknvdrsbmkkizpwbayqkb5l6jic15ymxv1fs7d";
+  src = fetchFromGitHub {
+    owner = "TurboGit";
+    repo = "hubicfuse";
+    rev = "v${version}";
+    sha256 = "1y4n63bk9vd6n1l5psjb9xm9h042kw4yh2ni33z7agixkanajv1s";
   };
 
   buildInputs = [ pkgconfig curl openssl fuse libxml2 json_c file ];
@@ -21,5 +23,6 @@ stdenv.mkDerivation rec {
     description = "FUSE-based filesystem to access hubic cloud storage";
     platforms = platforms.linux;
     license = licenses.mit;
+    maintainers = [ maintainers.jpierre03 ];
   };
 }
diff --git a/pkgs/tools/misc/bandwidth/default.nix b/pkgs/tools/misc/bandwidth/default.nix
index eb0a0d2b60b8..05fbe9b56324 100644
--- a/pkgs/tools/misc/bandwidth/default.nix
+++ b/pkgs/tools/misc/bandwidth/default.nix
@@ -14,8 +14,7 @@ stdenv.mkDerivation rec {
   version = "1.3.1";
 
   src = fetchurl {
-    url = "https://mutineer.org/file.php?id=284ebee21bde256fd0daeae91242c2b73d9cf1df&p=bandwidth";
-    name = "${name}.tar.gz";
+    url = "http://zsmith.co/archives/${name}.tar.gz";
     sha256 = "13a0mxrkybpwiynv4cj8wsy8zl5xir5xi1a03fzam5gw815dj4am";
   };
 
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix
index 9e66c6ba9181..2c435881f8c5 100644
--- a/pkgs/tools/misc/coreutils/default.nix
+++ b/pkgs/tools/misc/coreutils/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, perl, xz, gmp ? null
+{ lib, stdenv, buildPackages, fetchurl, perl, xz, gmp ? null
 , aclSupport ? false, acl ? null
 , attrSupport ? false, attr ? null
 , selinuxSupport? false, libselinux ? null, libsepol ? null
@@ -12,104 +12,101 @@ assert selinuxSupport -> libselinux != null && libsepol != null;
 
 with lib;
 
-let
-  self = stdenv.mkDerivation rec {
-    name = "coreutils-8.26";
+stdenv.mkDerivation rec {
+  name = "coreutils-8.26";
 
-    src = fetchurl {
-      url = "mirror://gnu/coreutils/${name}.tar.xz";
-      sha256 = "13lspazc7xkviy93qz7ks9jv4sldvgmwpq36ghrbrqpq93br8phm";
-    };
+  src = fetchurl {
+    url = "mirror://gnu/coreutils/${name}.tar.xz";
+    sha256 = "13lspazc7xkviy93qz7ks9jv4sldvgmwpq36ghrbrqpq93br8phm";
+  };
+
+  # FIXME needs gcc 4.9 in bootstrap tools
+  hardeningDisable = [ "stackprotector" ];
+
+  patches = optional stdenv.isCygwin ./coreutils-8.23-4.cygwin.patch;
+
+  # The test tends to fail on btrfs and maybe other unusual filesystems.
+  postPatch = optionalString (!stdenv.isDarwin) ''
+    sed '2i echo Skipping dd sparse test && exit 0' -i ./tests/dd/sparse.sh
+    sed '2i echo Skipping cp sparse test && exit 0' -i ./tests/cp/sparse.sh
+    sed '2i echo Skipping rm deep-2 test && exit 0' -i ./tests/rm/deep-2.sh
+    sed '2i echo Skipping du long-from-unreadable test && exit 0' -i ./tests/du/long-from-unreadable.sh
+  '';
+
+  outputs = [ "out" "info" ];
+
+  nativeBuildInputs = [ perl xz.bin ];
+  configureFlags =
+    optional (singleBinary != false)
+      ("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}")
+    ++ optional stdenv.isSunOS "ac_cv_func_inotify_init=no"
+    ++ optional withPrefix "--program-prefix=g";
+
+  buildInputs = [ gmp ]
+    ++ optional aclSupport acl
+    ++ optional attrSupport attr
+    ++ optionals stdenv.isCygwin [ autoconf automake114x texinfo ]   # due to patch
+    ++ optionals selinuxSupport [ libselinux libsepol ];
+
+  crossAttrs = {
+    buildInputs = [ gmp.crossDrv ]
+      ++ optional aclSupport acl.crossDrv
+      ++ optional attrSupport attr.crossDrv
+      ++ optionals selinuxSupport [ libselinux.crossDrv libsepol.crossDrv ]
+      ++ optional (stdenv.ccCross.libc ? libiconv)
+        stdenv.ccCross.libc.libiconv.crossDrv;
+
+    # Prevents attempts of running 'help2man' on cross-built binaries.
+    PERL = "missing";
+
+    # Works around a bug with 8.26:
+    # Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually).  Stop.
+    preInstall = ''
+      sed -i Makefile -e 's|^INSTALL =.*|INSTALL = ${buildPackages.coreutils}/bin/install -c|'
+    '';
+
+    postInstall = ''
+      rm $out/share/man/man1/*
+      cp ${buildPackages.coreutils}/share/man/man1/* $out/share/man/man1
+    '';
+
+    # Needed for fstatfs()
+    # I don't know why it is not properly detected cross building with glibc.
+    configureFlags = [ "fu_cv_sys_stat_statfs2_bsize=yes" ];
+    doCheck = false;
+  };
+
+  # The tests are known broken on Cygwin
+  # (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025),
+  # Darwin (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19351),
+  # and {Open,Free}BSD.
+  # With non-standard storeDir: https://github.com/NixOS/nix/issues/512
+  doCheck = stdenv ? glibc && builtins.storeDir == "/nix/store";
+
+  # Saw random failures like ‘help2man: can't get '--help' info from
+  # man/sha512sum.td/sha512sum’.
+  enableParallelBuilding = false;
 
-    # FIXME needs gcc 4.9 in bootstrap tools
-    hardeningDisable = [ "stackprotector" ];
+  NIX_LDFLAGS = optionalString selinuxSupport "-lsepol";
+  FORCE_UNSAFE_CONFIGURE = optionalString stdenv.isSunOS "1";
 
-    patches = optional stdenv.isCygwin ./coreutils-8.23-4.cygwin.patch;
+  makeFlags = optionalString stdenv.isDarwin "CFLAGS=-D_FORTIFY_SOURCE=0";
 
-    # The test tends to fail on btrfs and maybe other unusual filesystems.
-    postPatch = optionalString (!stdenv.isDarwin) ''
-      sed '2i echo Skipping dd sparse test && exit 0' -i ./tests/dd/sparse.sh
-      sed '2i echo Skipping cp sparse test && exit 0' -i ./tests/cp/sparse.sh
-      sed '2i echo Skipping rm deep-2 test && exit 0' -i ./tests/rm/deep-2.sh
-      sed '2i echo Skipping du long-from-unreadable test && exit 0' -i ./tests/du/long-from-unreadable.sh
+  meta = {
+    homepage = http://www.gnu.org/software/coreutils/;
+    description = "The basic file, shell and text manipulation utilities of the GNU operating system";
+
+    longDescription = ''
+      The GNU Core Utilities are the basic file, shell and text
+      manipulation utilities of the GNU operating system.  These are
+      the core utilities which are expected to exist on every
+      operating system.
     '';
 
-    outputs = [ "out" "info" ];
-
-    nativeBuildInputs = [ perl xz.bin ];
-    configureFlags =
-      optional (singleBinary != false)
-        ("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}")
-      ++ optional stdenv.isSunOS "ac_cv_func_inotify_init=no"
-      ++ optional withPrefix "--program-prefix=g";
-
-    buildInputs = [ gmp ]
-      ++ optional aclSupport acl
-      ++ optional attrSupport attr
-      ++ optionals stdenv.isCygwin [ autoconf automake114x texinfo ]   # due to patch
-      ++ optionals selinuxSupport [ libselinux libsepol ];
-
-    crossAttrs = {
-      buildInputs = [ gmp.crossDrv ]
-        ++ optional aclSupport acl.crossDrv
-        ++ optional attrSupport attr.crossDrv
-        ++ optionals selinuxSupport [ libselinux.crossDrv libsepol.crossDrv ]
-        ++ optional (stdenv.ccCross.libc ? libiconv)
-          stdenv.ccCross.libc.libiconv.crossDrv;
-
-      # Prevents attempts of running 'help2man' on cross-built binaries.
-      PERL = "missing";
-
-      # Works around a bug with 8.26:
-      # Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually).  Stop.
-      preInstall = ''
-        sed -i Makefile -e 's|^INSTALL =.*|INSTALL = ${self}/bin/install -c|'
-      '';
-
-      postInstall = ''
-        rm $out/share/man/man1/*
-        cp ${self}/share/man/man1/* $out/share/man/man1
-      '';
-
-      # Needed for fstatfs()
-      # I don't know why it is not properly detected cross building with glibc.
-      configureFlags = [ "fu_cv_sys_stat_statfs2_bsize=yes" ];
-      doCheck = false;
-    };
-
-    # The tests are known broken on Cygwin
-    # (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025),
-    # Darwin (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19351),
-    # and {Open,Free}BSD.
-    # With non-standard storeDir: https://github.com/NixOS/nix/issues/512
-    doCheck = stdenv ? glibc && builtins.storeDir == "/nix/store";
-
-    # Saw random failures like ‘help2man: can't get '--help' info from
-    # man/sha512sum.td/sha512sum’.
-    enableParallelBuilding = false;
-
-    NIX_LDFLAGS = optionalString selinuxSupport "-lsepol";
-    FORCE_UNSAFE_CONFIGURE = optionalString stdenv.isSunOS "1";
-
-    makeFlags = optionalString stdenv.isDarwin "CFLAGS=-D_FORTIFY_SOURCE=0";
-
-    meta = {
-      homepage = http://www.gnu.org/software/coreutils/;
-      description = "The basic file, shell and text manipulation utilities of the GNU operating system";
-
-      longDescription = ''
-        The GNU Core Utilities are the basic file, shell and text
-        manipulation utilities of the GNU operating system.  These are
-        the core utilities which are expected to exist on every
-        operating system.
-      '';
-
-      license = licenses.gpl3Plus;
-
-      platforms = platforms.all;
-
-      maintainers = [ maintainers.eelco ];
-    };
+    license = licenses.gpl3Plus;
+
+    platforms = platforms.all;
+
+    maintainers = [ maintainers.eelco ];
   };
-in
-  self
+}
diff --git a/pkgs/tools/misc/fluentd/Gemfile b/pkgs/tools/misc/fluentd/Gemfile
index 8c9dd3aa0a02..2c4fbc849631 100644
--- a/pkgs/tools/misc/fluentd/Gemfile
+++ b/pkgs/tools/misc/fluentd/Gemfile
@@ -3,3 +3,12 @@ source "https://rubygems.org"
 gem 'fluentd'
 gem 'fluent-plugin-elasticsearch'
 gem 'fluent-plugin-record-reformer'
+gem 'fluent-plugin-s3'
+gem 'fluent-plugin-kinesis'
+gem 'fluent-plugin-kafka'
+gem 'fluent-plugin-elasticsearch'
+gem 'fluent-plugin-scribe'
+gem 'fluent-plugin-mongo'
+gem 'fluent-plugin-webhdfs'
+gem 'fluent-plugin-rewrite-tag-filter'
+
diff --git a/pkgs/tools/misc/fluentd/Gemfile.lock b/pkgs/tools/misc/fluentd/Gemfile.lock
index 581fa6e169ae..2f9485d95777 100644
--- a/pkgs/tools/misc/fluentd/Gemfile.lock
+++ b/pkgs/tools/misc/fluentd/Gemfile.lock
@@ -1,58 +1,136 @@
 GEM
   remote: https://rubygems.org/
   specs:
-    cool.io (1.4.4)
-    elasticsearch (1.0.17)
-      elasticsearch-api (= 1.0.17)
-      elasticsearch-transport (= 1.0.17)
-    elasticsearch-api (1.0.17)
+    activesupport (5.0.1)
+      concurrent-ruby (~> 1.0, >= 1.0.2)
+      i18n (~> 0.7)
+      minitest (~> 5.1)
+      tzinfo (~> 1.1)
+    addressable (2.5.0)
+      public_suffix (~> 2.0, >= 2.0.2)
+    aws-sdk (2.7.0)
+      aws-sdk-resources (= 2.7.0)
+    aws-sdk-core (2.7.0)
+      aws-sigv4 (~> 1.0)
+      jmespath (~> 1.0)
+    aws-sdk-resources (2.7.0)
+      aws-sdk-core (= 2.7.0)
+    aws-sigv4 (1.0.0)
+    bson (1.12.5)
+    bzip2-ffi (1.0.0)
+      ffi (~> 1.0)
+    concurrent-ruby (1.0.4)
+    cool.io (1.4.5)
+    elasticsearch (1.0.18)
+      elasticsearch-api (= 1.0.18)
+      elasticsearch-transport (= 1.0.18)
+    elasticsearch-api (1.0.18)
       multi_json
-    elasticsearch-transport (1.0.17)
+    elasticsearch-transport (1.0.18)
       faraday
       multi_json
-    excon (0.49.0)
-    faraday (0.9.2)
+    excon (0.54.0)
+    faraday (0.11.0)
       multipart-post (>= 1.2, < 3)
-    fluent-plugin-elasticsearch (1.5.0)
-      elasticsearch
+    ffi (1.9.17)
+    fluent-mixin-config-placeholders (0.4.0)
+      fluentd
+      uuidtools (>= 2.1.5)
+    fluent-mixin-plaintextformatter (0.2.6)
+      fluentd
+      ltsv
+    fluent-plugin-elasticsearch (1.9.2)
+      elasticsearch (< 1.1)
       excon
       fluentd (>= 0.10.43)
-    fluent-plugin-record-reformer (0.8.1)
+    fluent-plugin-kafka (0.5.0)
+      fluentd (>= 0.10.58, < 2)
+      ltsv
+      ruby-kafka (= 0.3.16.beta2)
+    fluent-plugin-kinesis (1.1.2)
+      aws-sdk (~> 2)
+      concurrent-ruby (~> 1)
+      fluentd (>= 0.10.58, < 2)
+      os (>= 0.9.6)
+      protobuf (>= 3.5.5)
+    fluent-plugin-mongo (0.7.16)
+      fluentd (>= 0.10.58, < 2)
+      mongo (~> 1.9)
+    fluent-plugin-record-reformer (0.8.2)
+      fluentd
+    fluent-plugin-rewrite-tag-filter (1.5.5)
       fluentd
-    fluentd (0.14.0)
-      cool.io (>= 1.4.3, < 2.0.0)
+    fluent-plugin-s3 (0.8.0)
+      aws-sdk (>= 2.3.22, < 3)
+      fluentd (>= 0.10.58, < 2)
+    fluent-plugin-scribe (0.10.14)
+      fluentd
+      thrift (~> 0.8.0)
+    fluent-plugin-webhdfs (0.5.2)
+      bzip2-ffi
+      fluent-mixin-config-placeholders (>= 0.3.0)
+      fluent-mixin-plaintextformatter (>= 0.2.1)
+      fluentd (>= 0.10.59)
+      webhdfs (>= 0.6.0)
+    fluentd (0.14.11)
+      cool.io (~> 1.4.5)
       http_parser.rb (>= 0.5.1, < 0.7.0)
-      json (>= 1.4.3)
-      msgpack (>= 0.7.0)
-      serverengine (>= 1.6.4)
+      msgpack (>= 0.7.0, < 2.0.0)
+      serverengine (>= 2.0.4, < 3.0.0)
       sigdump (~> 0.2.2)
-      strptime (>= 0.1.7)
-      tzinfo (>= 1.0.0)
-      tzinfo-data (>= 1.0.0)
+      strptime (~> 0.1.7)
+      tzinfo (~> 1.0)
+      tzinfo-data (~> 1.0)
       yajl-ruby (~> 1.0)
     http_parser.rb (0.6.0)
-    json (1.8.3)
-    msgpack (0.7.6)
+    i18n (0.7.0)
+    jmespath (1.3.1)
+    ltsv (0.1.0)
+    middleware (0.1.0)
+    minitest (5.10.1)
+    mongo (1.12.5)
+      bson (= 1.12.5)
+    msgpack (1.0.2)
     multi_json (1.12.1)
     multipart-post (2.0.0)
-    serverengine (1.6.4)
+    os (0.9.6)
+    protobuf (3.6.12)
+      activesupport (>= 3.2)
+      middleware
+      thor
+      thread_safe
+    public_suffix (2.0.5)
+    ruby-kafka (0.3.16.beta2)
+    serverengine (2.0.4)
       sigdump (~> 0.2.2)
     sigdump (0.2.4)
-    strptime (0.1.8)
+    strptime (0.1.9)
+    thor (0.19.4)
     thread_safe (0.3.5)
+    thrift (0.8.0)
     tzinfo (1.2.2)
       thread_safe (~> 0.1)
-    tzinfo-data (1.2016.4)
+    tzinfo-data (1.2016.10)
       tzinfo (>= 1.0.0)
-    yajl-ruby (1.2.1)
+    uuidtools (2.1.5)
+    webhdfs (0.8.0)
+      addressable
+    yajl-ruby (1.3.0)
 
 PLATFORMS
   ruby
 
 DEPENDENCIES
   fluent-plugin-elasticsearch
+  fluent-plugin-kafka
+  fluent-plugin-kinesis
+  fluent-plugin-mongo
   fluent-plugin-record-reformer
+  fluent-plugin-rewrite-tag-filter
+  fluent-plugin-s3
+  fluent-plugin-scribe
+  fluent-plugin-webhdfs
   fluentd
 
 BUNDLED WITH
-   1.11.2
+   1.12.5
diff --git a/pkgs/tools/misc/fluentd/gemset.nix b/pkgs/tools/misc/fluentd/gemset.nix
index e6b03fadfd36..1c508e7b58e2 100644
--- a/pkgs/tools/misc/fluentd/gemset.nix
+++ b/pkgs/tools/misc/fluentd/gemset.nix
@@ -1,75 +1,227 @@
 {
+  activesupport = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "08bnl0nr9csjgkgz6xf8dyg7rccinmfrmn235z3bfaz8ihz15d1d";
+      type = "gem";
+    };
+    version = "5.0.1";
+  };
+  addressable = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1j5r0anj8m4qlf2psnldip4b8ha2bsscv11lpdgnfh4nnchzjnxw";
+      type = "gem";
+    };
+    version = "2.5.0";
+  };
+  aws-sdk = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "19s7ialas1yrc54g50yfa37z7m8dq4gqbf8dvlfg8qmpdijjxy3l";
+      type = "gem";
+    };
+    version = "2.7.0";
+  };
+  aws-sdk-core = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0a9sgff43s3zhpcmisk1bp6vvlpawa617svfhz84xwa6lmik9sp4";
+      type = "gem";
+    };
+    version = "2.7.0";
+  };
+  aws-sdk-resources = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1b5z25n4bgzwkzmzx2q6ik2y74jinyphmrh38lnrn9im6pmmvy3w";
+      type = "gem";
+    };
+    version = "2.7.0";
+  };
+  aws-sigv4 = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0cnrfxbaxn86qrxhfidg10f89ka1hddihakdhcvnri0dljaw7dsz";
+      type = "gem";
+    };
+    version = "1.0.0";
+  };
+  bson = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "12zcsfr72hr0w1qyxv1iz587nzganpclvimyx5y02gg1hij8hz6b";
+      type = "gem";
+    };
+    version = "1.12.5";
+  };
+  bzip2-ffi = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1y5jlcz1vb0v3rbmsbbrarfglcmzdhr5jhlfc5wjnhz2zpybsz3y";
+      type = "gem";
+    };
+    version = "1.0.0";
+  };
+  concurrent-ruby = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0p7ji1h1l407kci9w4b4yspzd58ssmlx7p91npx55kw08836dlpb";
+      type = "gem";
+    };
+    version = "1.0.4";
+  };
   "cool.io" = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0ycc8qdvpba8bf6da8nsna34md86mk527j4qizxh059vqm3521sb";
+      sha256 = "1x5fkyjdjwk68sg7fwxhx2k3hzxkkm6frnd2yix7brxdh06fp0k1";
       type = "gem";
     };
-    version = "1.4.4";
+    version = "1.4.5";
   };
   elasticsearch = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1g7vax396l68w5mrrfbsaly39zkc4rrvljz9717mxyn82m5f66w5";
+      sha256 = "1wdy17i56b4m7akp7yavnr8vhfhyz720waphmixq05dj21b11hl0";
       type = "gem";
     };
-    version = "1.0.17";
+    version = "1.0.18";
   };
   elasticsearch-api = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "08bb63raz381fmspijwjc4ksvrrgavmwrymjms1b9mg4qkic87jx";
+      sha256 = "1v6nb3ajz5rack3p4b4nz37hs0zb9x738h2ms8cc4plp6wqh1w5s";
       type = "gem";
     };
-    version = "1.0.17";
+    version = "1.0.18";
   };
   elasticsearch-transport = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "07r798g3lnzr3zabk2ks2j5jnxdga23bc8wrr7mcqzn8q0yv82bz";
+      sha256 = "0smfrz8nq49hgf67y5ayxa9i4rmmi0q4m51l0h499ykq4cvcwv6i";
       type = "gem";
     };
-    version = "1.0.17";
+    version = "1.0.18";
   };
   excon = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0jmdgc4lhlbxccpg79a32vn3qngqipcaaq8bxa0ivfw5mvz0zc0z";
+      sha256 = "0j4b6s90v84r4wrhbg4rzjfjg9sfisq50fjd3hh9p6yrkm86wbd3";
       type = "gem";
     };
-    version = "0.49.0";
+    version = "0.54.0";
   };
   faraday = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1kplqkpn2s2yl3lxdf6h7sfldqvkbkpxwwxhyk7mdhjplb5faqh6";
+      sha256 = "18p1csdivgwmshfw3mb698a3bn0yrykg30khk5qxjf6n168g91jr";
+      type = "gem";
+    };
+    version = "0.11.0";
+  };
+  ffi = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "07hnyr47mndsjfanzh348wm3fxjx9nx68mdb3cpsdvfqrxnz97s7";
+      type = "gem";
+    };
+    version = "1.9.17";
+  };
+  fluent-mixin-config-placeholders = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "14b4lqy91jgpky6g7h0vyfy2rr1qavmjzzgnmhwajfzxgw9y2jvi";
+      type = "gem";
+    };
+    version = "0.4.0";
+  };
+  fluent-mixin-plaintextformatter = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0gliangfr07060ya9sawkyfx2vz7vdygys65f83czawhckvvm75n";
       type = "gem";
     };
-    version = "0.9.2";
+    version = "0.2.6";
   };
   fluent-plugin-elasticsearch = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1kgv62s51y9x98qk0b6wrg4a73jfbhw50vg5z36hr0bh9rh2rq4y";
+      sha256 = "0q0v8jxpwrkh1z5qh0chwrssz93nldka4jwfn32hlqhnmb99q8i1";
+      type = "gem";
+    };
+    version = "1.9.2";
+  };
+  fluent-plugin-kafka = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0sd025xsl1cnjs11wasg0di2k02rx9ifaj49n28ak363df6vsqgf";
+      type = "gem";
+    };
+    version = "0.5.0";
+  };
+  fluent-plugin-kinesis = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "119ngswi9q0p5hh5ldan9pzrgd1lfsbkr5f56hy1k4gfss4kmq27";
+      type = "gem";
+    };
+    version = "1.1.2";
+  };
+  fluent-plugin-mongo = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1x7n8cknqh956yx3c9hv2g535x4kcixmnxw3fvcspjbqprrd1s91";
       type = "gem";
     };
-    version = "1.5.0";
+    version = "0.7.16";
   };
   fluent-plugin-record-reformer = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1ca09msvcdgrjv0xdjxh0nhxx8crp3h9nz5qw90c75s5hss2ws9b";
+      sha256 = "1q2pws1mqp6pkb00ix6wjkxklckqb4wcbp79lpyk0b644bk9hqzb";
+      type = "gem";
+    };
+    version = "0.8.2";
+  };
+  fluent-plugin-rewrite-tag-filter = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1avxvvmfm7bl7fpa2p73295kydh1nbsgdvsr7bsyrb77z1s1m86z";
       type = "gem";
     };
-    version = "0.8.1";
+    version = "1.5.5";
+  };
+  fluent-plugin-s3 = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0nxvk5n76pw4r37lv8vfl1cd0yjxnlj5wlwyk8f1lvp9ma5zlzmg";
+      type = "gem";
+    };
+    version = "0.8.0";
+  };
+  fluent-plugin-scribe = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "00m19w7p22adq0yx1h7h2h4ckw9kh5j458a8lawgmbazw2dz0zxi";
+      type = "gem";
+    };
+    version = "0.10.14";
+  };
+  fluent-plugin-webhdfs = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0kb9cgrgvh61pqqzv2csnibmp2jwh4hyjyvrh2npkk59k3jp54ad";
+      type = "gem";
+    };
+    version = "0.5.2";
   };
   fluentd = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1v6c8g6fv9s710lrl0jy9ihbb8af37gvw3klk7csr5whp1mhwb8f";
+      sha256 = "0w1bg3nrn6gwhyp8xlpbs9rcajkddnvw6jhn7kvzydp70g2aydhz";
       type = "gem";
     };
-    version = "0.14.0";
+    version = "0.14.11";
   };
   "http_parser.rb" = {
     source = {
@@ -78,21 +230,61 @@
     };
     version = "0.6.0";
   };
-  json = {
+  i18n = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1i5z1ykl8zhszsxcs8mzl8d0dxgs3ylz8qlzrw74jb0gplkx6758";
+      type = "gem";
+    };
+    version = "0.7.0";
+  };
+  jmespath = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "07w8ipjg59qavijq59hl82zs74jf3jsp7vxl9q3a2d0wpv5akz3y";
+      type = "gem";
+    };
+    version = "1.3.1";
+  };
+  ltsv = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1alfq3g0mih4w86736ybnzqmknphm2z95c9q0wl765i4lrmxng11";
+      type = "gem";
+    };
+    version = "0.1.0";
+  };
+  middleware = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl";
+      type = "gem";
+    };
+    version = "0.1.0";
+  };
+  minitest = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1yk2m8sp0p5m1niawa3ncg157a4i0594cg7z91rzjxv963rzrwab";
+      type = "gem";
+    };
+    version = "5.10.1";
+  };
+  mongo = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1nsby6ry8l9xg3yw4adlhk2pnc7i0h0rznvcss4vk3v74qg0k8lc";
+      sha256 = "0658pn2hbyfvbnpp3wdh3irin0wpikm6y2qbhnx07w54jbkmgh5p";
       type = "gem";
     };
-    version = "1.8.3";
+    version = "1.12.5";
   };
   msgpack = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1fn2riiaygiyvmr0glgm1vx995np3jb2hjf5i0j78vncd2wbwdw5";
+      sha256 = "1fb2my91j08plsbbry5kilsrh7slmzgbbf6f55zy6xk28p9036lg";
       type = "gem";
     };
-    version = "0.7.6";
+    version = "1.0.2";
   };
   multi_json = {
     source = {
@@ -109,13 +301,45 @@
     };
     version = "2.0.0";
   };
+  os = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1llv8w3g2jwggdxr5a5cjkrnbbfnvai3vxacxxc0fy84xmz3hymz";
+      type = "gem";
+    };
+    version = "0.9.6";
+  };
+  protobuf = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0cvkfp7574dr6wqpgafl3pg9niqfri3dh2fxb2f8qaapcgfgcaq6";
+      type = "gem";
+    };
+    version = "3.6.12";
+  };
+  public_suffix = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "040jf98jpp6w140ghkhw2hvc1qx41zvywx5gj7r2ylr1148qnj7q";
+      type = "gem";
+    };
+    version = "2.0.5";
+  };
+  ruby-kafka = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "112avql9nf0hq07zvh47fyx7na721bj4zfpf43ip471l6k2ksrf5";
+      type = "gem";
+    };
+    version = "0.3.16.beta2";
+  };
   serverengine = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "16sy6yissv8h2vla5ba4msqzsjy0cm0x8q2llssx3kl3bwysrbrp";
+      sha256 = "0f08kbiqg9yp5fxdw5blsrnq383a9g4n830g1ypppb7ddv61sbmi";
       type = "gem";
     };
-    version = "1.6.4";
+    version = "2.0.4";
   };
   sigdump = {
     source = {
@@ -128,10 +352,18 @@
   strptime = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0lkadizgdls9ya4sbf3bg5i1z6g2kxfw1r5ja0wkc9711zxjilx2";
+      sha256 = "1avbl1fj4y5qx9ywkxpcjjxxpjj6h7r1dqlnddhk5wqg6ypq8lsb";
+      type = "gem";
+    };
+    version = "0.1.9";
+  };
+  thor = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "01n5dv9kql60m6a00zc0r66jvaxx98qhdny3klyj0p3w34pad2ns";
       type = "gem";
     };
-    version = "0.1.8";
+    version = "0.19.4";
   };
   thread_safe = {
     source = {
@@ -140,6 +372,14 @@
     };
     version = "0.3.5";
   };
+  thrift = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0aj23ndh5n5yqcvp4c12y7vl5wvxpl66zncf6n6ax2zvb6ig44cv";
+      type = "gem";
+    };
+    version = "0.8.0";
+  };
   tzinfo = {
     dependencies = ["thread_safe"];
     source = {
@@ -151,16 +391,33 @@
   tzinfo-data = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1bxfljd5i7g89s7jc5l4a3ddykfsvvp0gm02805r1q77ahn1gp33";
+      sha256 = "01nr50alfm1fyzlcbzvfbpnsq37yb3h676f9n3z0iyp4s4766psf";
+      type = "gem";
+    };
+    version = "1.2016.10";
+  };
+  uuidtools = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0zjvq1jrrnzj69ylmz1xcr30skf9ymmvjmdwbvscncd7zkr8av5g";
+      type = "gem";
+    };
+    version = "2.1.5";
+  };
+  webhdfs = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0gs6xb9dz9bp5xc38yplfy48jcgj7jrj0zg0vgi7ydkxnkzkhbf2";
       type = "gem";
     };
-    version = "1.2016.4";
+    version = "0.8.0";
   };
   yajl-ruby = {
     source = {
-      sha256 = "0zvvb7i1bl98k3zkdrnx9vasq0rp2cyy5n7p9804dqs4fz9xh9vf";
+      remotes = ["https://rubygems.org"];
+      sha256 = "0sah2lpvpsh555dcnhgcqylinjj5544md9dh1a0a13da0qv1p57i";
       type = "gem";
     };
-    version = "1.2.1";
+    version = "1.3.0";
   };
 }
\ No newline at end of file
diff --git a/pkgs/tools/misc/grub/trusted.nix b/pkgs/tools/misc/grub/trusted.nix
index 377d6faefa01..e57c98bf51b0 100644
--- a/pkgs/tools/misc/grub/trusted.nix
+++ b/pkgs/tools/misc/grub/trusted.nix
@@ -49,6 +49,8 @@ stdenv.mkDerivation rec {
 
   hardeningDisable = [ "stackprotector" "pic" ];
 
+  NIX_CFLAGS_COMPILE = "-Wno-error"; # generated code redefines yyfree
+
   preConfigure =
     '' for i in "tests/util/"*.in
        do
diff --git a/pkgs/tools/misc/mlocate/default.nix b/pkgs/tools/misc/mlocate/default.nix
index 6dbd0bcc439a..4aef6114c57c 100644
--- a/pkgs/tools/misc/mlocate/default.nix
+++ b/pkgs/tools/misc/mlocate/default.nix
@@ -1,6 +1,8 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, config }:
 
-stdenv.mkDerivation rec {
+let
+  dbfile = stdenv.lib.attrByPath [ "locate" "dbfile" ] "/var/cache/locatedb" config;
+in stdenv.mkDerivation rec {
   name = "mlocate-${version}";
   version = "0.26";
 
@@ -10,6 +12,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ ];
+  makeFlags = [ "dbfile=${dbfile}" ];
 
   meta = with stdenv.lib; {
     description = "Merging locate is an utility to index and quickly search for files";
diff --git a/pkgs/tools/misc/neofetch/default.nix b/pkgs/tools/misc/neofetch/default.nix
new file mode 100644
index 000000000000..92a2f589b301
--- /dev/null
+++ b/pkgs/tools/misc/neofetch/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "neofetch-${version}";
+  version = "3.0";
+  src = fetchFromGitHub {
+    owner = "dylanaraps";
+    repo = "neofetch";
+    rev = version;
+    sha256 = "0z8sqbspf6j7yqy7wbd8ba3pfn836b0y8kmgkcyvswgjkcyh8m68";
+  };
+
+  patchPhase = ''
+    substituteInPlace ./neofetch \
+    --replace "/usr/share" "$out/share"
+  '';
+
+  dontBuild = true;
+
+
+  makeFlags = [
+    "DESTDIR=$(out)"
+    "PREFIX="
+  ];
+
+  meta = with stdenv.lib; {
+    description = "A fast, highly customizable system info script";
+    homepage = https://github.com/dylanaraps/neofetch;
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ alibabzo ];
+  };
+}
diff --git a/pkgs/tools/misc/riemann-c-client/default.nix b/pkgs/tools/misc/riemann-c-client/default.nix
index eb8e17a86938..54e5a3ab17e0 100644
--- a/pkgs/tools/misc/riemann-c-client/default.nix
+++ b/pkgs/tools/misc/riemann-c-client/default.nix
@@ -1,15 +1,15 @@
 { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, file , protobufc }:
 
 stdenv.mkDerivation rec {
-  name = "riemann-c-client-${version}";
-
-  version = "1.7.0";
+  pname = "riemann-c-client";
+  version = "1.9.1";
+  name = "${pname}-${version}";
 
   src = fetchFromGitHub {
     owner = "algernon";
     repo = "riemann-c-client";
-    rev = "54f4a656793d6c5ca0bf1ff2388693fb6b2b82a7";
-    sha256 = "0jc2bbw7sp2gr4cswx78srs0p1kp81prcarq4ivqpfw4bmzg6xg4";
+    rev = "${name}";
+    sha256 = "1j3wgf9xigsv6ckmv82gjj4wavi7xjn2zvj1f63fzbaa1rv7pf3s";
   };
 
   buildInputs = [ autoreconfHook pkgconfig file protobufc ];
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
     homepage = https://github.com/algernon/riemann-c-client;
     description = "A C client library for the Riemann monitoring system";
     license = licenses.gpl3;
-    maintainers = [ maintainers.rickynils ];
+    maintainers = with maintainers; [ rickynils pradeepchhetri ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/tools/misc/svtplay-dl/default.nix b/pkgs/tools/misc/svtplay-dl/default.nix
index c5f017564af5..8eaad3b5201c 100644
--- a/pkgs/tools/misc/svtplay-dl/default.nix
+++ b/pkgs/tools/misc/svtplay-dl/default.nix
@@ -5,13 +5,13 @@ let
   inherit (pythonPackages) python nose pycrypto requests2 mock;
 in stdenv.mkDerivation rec {
   name = "svtplay-dl-${version}";
-  version = "1.8";
+  version = "1.9";
 
   src = fetchFromGitHub {
     owner = "spaam";
     repo = "svtplay-dl";
     rev = version;
-    sha256 = "1cn79kbz9fhhbajxg1fqd8xlab9jz4x1n9w7n42w0j8c627q0rlv";
+    sha256 = "0kqly2jzpn1l26is65nhaq0xdvsjylh7wm12fw9r1wz1558pqswf";
   };
 
   pythonPaths = [ pycrypto requests2 ];
diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix
index f9590b3f0442..68a422b97e2e 100644
--- a/pkgs/tools/misc/youtube-dl/default.nix
+++ b/pkgs/tools/misc/youtube-dl/default.nix
@@ -15,11 +15,11 @@ with stdenv.lib;
 buildPythonApplication rec {
 
   name = "youtube-dl-${version}";
-  version = "2017.01.18";
+  version = "2017.01.24";
 
   src = fetchurl {
     url = "https://yt-dl.org/downloads/${version}/${name}.tar.gz";
-    sha256 = "7c16f3ce7cf8a673a4c531e4a1fc10801467a61732cb65430e40b3ab8b2f2d2e";
+    sha256 = "6691206f68b8ecf8e9f81a85c63b4c00676f66f549d37e9ea36113eda6d1e4d8";
   };
 
   buildInputs = [ makeWrapper zip ] ++ optional generateManPage pandoc;
diff --git a/pkgs/tools/networking/aiccu/default.nix b/pkgs/tools/networking/aiccu/default.nix
index e1b3a420079a..a821c6476f74 100644
--- a/pkgs/tools/networking/aiccu/default.nix
+++ b/pkgs/tools/networking/aiccu/default.nix
@@ -6,8 +6,8 @@ stdenv.mkDerivation rec {
   version = "20070115";
 
   src = fetchurl {
-    url = "https://www.sixxs.net/archive/sixxs/aiccu/unix/aiccu_20070115.tar.gz";
-    sha256 = "2260f426c13471169ccff8cb4a3908dc5f79fda18ddb6a55363e7824e6c4c760";
+    url = "http://http.debian.net/debian/pool/main/a/aiccu/aiccu_20070115.orig.tar.gz";
+    sha256 = "1k73vw7i25qzmnbvmsp3ci4pm6h8q70w70vnr512517s2q5gag6j";
   };
 
   buildInputs = [ gnutls iproute makeWrapper ];
diff --git a/pkgs/tools/networking/aria2/default.nix b/pkgs/tools/networking/aria2/default.nix
index ab82851f178f..1f003f67df6d 100644
--- a/pkgs/tools/networking/aria2/default.nix
+++ b/pkgs/tools/networking/aria2/default.nix
@@ -5,13 +5,13 @@
 
 stdenv.mkDerivation rec {
   name = "aria2-${version}";
-  version = "1.29.0";
+  version = "1.31.0";
 
   src = fetchFromGitHub {
     owner = "aria2";
     repo = "aria2";
     rev = "release-${version}";
-    sha256 = "1ivxz2ld4cl9z29kdicban9dir6s0si2jqn4g11gz587x7pagbim";
+    sha256 = "0d7z4bss1plkvlw5kfwzivxryrh13zi58ii3vf8q4csaz4yqhcjy";
   };
 
   nativeBuildInputs = [ pkgconfig autoreconfHook ];
diff --git a/pkgs/tools/networking/biosdevname/default.nix b/pkgs/tools/networking/biosdevname/default.nix
index 2b7d3a5dc7ac..906e3eda3a65 100644
--- a/pkgs/tools/networking/biosdevname/default.nix
+++ b/pkgs/tools/networking/biosdevname/default.nix
@@ -1,20 +1,18 @@
-{ stdenv, fetchgit, autoreconfHook, zlib, pciutils }:
+{ stdenv, fetchFromGitHub, autoreconfHook, zlib, pciutils }:
 
 stdenv.mkDerivation rec {
   name = "biosdevname-${version}";
-  version = "0.6.1";
+  version = "0.7.2";
 
-  src = fetchgit {
-    url = git://linux.dell.com/biosdevname.git;
-    rev = "refs/tags/v${version}";
-    sha256 = "059s3qyky9i497c9wnrjml15sknpsqbv01ww7q95bf9ybhdqqq8w";
+  src = fetchFromGitHub {
+    owner = "dell";
+    repo = "biosdevname";
+    rev = "v${version}";
+    sha256 = "183k6f9nayhai27y6nizf0sp9bj1kabykj66hcwdzllhrrh505sd";
   };
 
-  buildInputs = [
-    autoreconfHook
-    zlib
-    pciutils
-  ];
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ zlib pciutils ];
 
   # Don't install /lib/udev/rules.d/*-biosdevname.rules
   patches = [ ./makefile.patch ];
diff --git a/pkgs/tools/networking/chrony/default.nix b/pkgs/tools/networking/chrony/default.nix
index 1e2b48207f5e..32a8ca5f99e8 100644
--- a/pkgs/tools/networking/chrony/default.nix
+++ b/pkgs/tools/networking/chrony/default.nix
@@ -1,25 +1,26 @@
-{ stdenv, fetchurl, pkgconfig, libcap, readline, texinfo, nss, nspr }:
+{ stdenv, fetchurl, pkgconfig, libcap, readline, texinfo, nss, nspr
+, libseccomp }:
 
 assert stdenv.isLinux -> libcap != null;
 
 stdenv.mkDerivation rec {
   name = "chrony-${version}";
 
-  version = "2.4.1";
+  version = "3.0";
 
   src = fetchurl {
     url = "http://download.tuxfamily.org/chrony/${name}.tar.gz";
-    sha256 = "1q5nxl19fdppwpxancff5dc9crgma8f24zww7ag4bd15yq79xm8g";
+    sha256 = "0vfdsajz2w6b7c94rxrj7fsr234jryhl2rbdlmb7h10gla8pnf50";
   };
 
-  buildInputs = [ readline texinfo nss nspr ] ++ stdenv.lib.optional stdenv.isLinux libcap;
+  buildInputs = [ readline texinfo nss nspr ]
+    ++ stdenv.lib.optionals stdenv.isLinux [ libcap libseccomp ];
   nativeBuildInputs = [ pkgconfig ];
 
   hardeningEnable = [ "pie" ];
 
-  configureFlags = [
-    "--chronyvardir=$(out)/var/lib/chrony"
-  ];
+  configureFlags = [ "--chronyvardir=$(out)/var/lib/chrony" ]
+    ++ stdenv.lib.optional stdenv.isLinux [ "--enable-scfilter" ];
 
   meta = with stdenv.lib; {
     description = "Sets your computer's clock from time servers on the Net";
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix
index 9ed56ee1ec56..a80069974224 100644
--- a/pkgs/tools/networking/curl/default.nix
+++ b/pkgs/tools/networking/curl/default.nix
@@ -25,8 +25,12 @@ stdenv.mkDerivation rec {
     sha256 = "16rqhyzlpnivifin8n7l2fr9ihay9v2nw2drsniinb6bcykqaqfi";
   };
 
+  patches = [ ./issue-1174.patch ];
+
   outputs = [ "bin" "dev" "out" "man" "devdoc" ];
 
+  enableParallelBuilding = true;
+
   nativeBuildInputs = [ pkgconfig perl ];
 
   # Zlib and OpenSSL must be propagated because `libcurl.la' contains
diff --git a/pkgs/tools/networking/curl/issue-1174.patch b/pkgs/tools/networking/curl/issue-1174.patch
new file mode 100644
index 000000000000..eceeef8b001b
--- /dev/null
+++ b/pkgs/tools/networking/curl/issue-1174.patch
@@ -0,0 +1,34 @@
+commit a7b38c9dc98481e4a5fc37e51a8690337c674dfb
+Author: Daniel Stenberg <daniel@haxx.se>
+Date:   Mon Dec 26 00:06:33 2016 +0100
+
+    vtls: s/SSLEAY/OPENSSL
+    
+    Fixed an old leftover use of the USE_SSLEAY define which would make a
+    socket get removed from the applications sockets to monitor when the
+    multi_socket API was used, leading to timeouts.
+    
+    Bug: #1174
+
+diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
+index b808e1c..707f24b 100644
+--- a/lib/vtls/vtls.c
++++ b/lib/vtls/vtls.c
+@@ -484,7 +484,7 @@ void Curl_ssl_close_all(struct Curl_easy *data)
+   curlssl_close_all(data);
+ }
+ 
+-#if defined(USE_SSLEAY) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
++#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
+     defined(USE_DARWINSSL) || defined(USE_NSS)
+ /* This function is for OpenSSL, GnuTLS, darwinssl, and schannel only. */
+ int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks,
+@@ -518,7 +518,7 @@ int Curl_ssl_getsock(struct connectdata *conn,
+   (void)numsocks;
+   return GETSOCK_BLANK;
+ }
+-/* USE_SSLEAY || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */
++/* USE_OPENSSL || USE_GNUTLS || USE_SCHANNEL || USE_DARWINSSL || USE_NSS */
+ #endif
+ 
+ void Curl_ssl_close(struct connectdata *conn, int sockindex)
diff --git a/pkgs/tools/networking/dnscrypt-proxy/default.nix b/pkgs/tools/networking/dnscrypt-proxy/default.nix
index baa295c0b001..24aa3d4b829b 100644
--- a/pkgs/tools/networking/dnscrypt-proxy/default.nix
+++ b/pkgs/tools/networking/dnscrypt-proxy/default.nix
@@ -4,11 +4,11 @@ with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "dnscrypt-proxy-${version}";
-  version = "1.9.1";
+  version = "1.9.4";
 
   src = fetchurl {
     url = "https://download.dnscrypt.org/dnscrypt-proxy/${name}.tar.bz2";
-    sha256 = "0aa1qw59b72wl922lfhg24xq2gkv95v1s0daiiqv9b4zpap3ynag";
+    sha256 = "07piwsjczamwvdpv1585kg4awqakip51bwsm8nqi6bljww4agx7x";
   };
 
   configureFlags = optional stdenv.isLinux "--with-systemd";
@@ -21,14 +21,6 @@ stdenv.mkDerivation rec {
     # Previous versions required libtool files to load plugins; they are
     # now strictly optional.
     rm $out/lib/dnscrypt-proxy/*.la
-
-    # The installation ends up copying the same sample configuration
-    # into $out/etc twice, with the expectation that one of them will be
-    # edited by the user.  Since we can't modify the file, it makes more
-    # sense to move only a single copy to the doc directory.
-    mkdir -p $out/share/doc/dnscrypt-proxy
-    mv $out/etc/dnscrypt-proxy.conf.example $out/share/doc/dnscrypt-proxy/
-    rm -rf $out/etc
   '';
 
   meta = {
diff --git a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix
index 6b88d2d2b7df..4bdc630efd79 100644
--- a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix
+++ b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix
@@ -6,13 +6,13 @@
 # some loss of functionality because of it.
 
 pythonPackages.buildPythonApplication rec {
-  version = "1.11.0";
+  version = "1.12.1";
   name = "tahoe-lafs-${version}";
   namePrefix = "";
 
   src = fetchurl {
     url = "https://tahoe-lafs.org/downloads/tahoe-lafs-${version}.tar.bz2";
-    sha256 = "0hrp87rarbmmpnrxk91s83h6irkykds3pl263dagcddbdl5inqdi";
+    sha256 = "0x9f1kjym1188fp6l5sqy0zz8mdb4xw861bni2ccv26q482ynbks";
   };
 
   patchPhase = ''
@@ -36,7 +36,7 @@ pythonPackages.buildPythonApplication rec {
   propagatedBuildInputs = with pythonPackages; [
     twisted foolscap nevow simplejson zfec pycryptopp darcsver
     setuptoolsTrial setuptoolsDarcs pycrypto pyasn1 zope_interface
-    service-identity
+    service-identity pyyaml
   ];
 
   postInstall = ''
diff --git a/pkgs/tools/networking/ppp/default.nix b/pkgs/tools/networking/ppp/default.nix
index bc6b2b0e5ded..90a4b988c3f7 100644
--- a/pkgs/tools/networking/ppp/default.nix
+++ b/pkgs/tools/networking/ppp/default.nix
@@ -18,6 +18,11 @@ stdenv.mkDerivation rec {
       # Without nonpriv.patch, pppd --version doesn't work when not run as
       # root.
       ./nonpriv.patch
+      (fetchurl {
+        name = "CVE-2015-3310.patch";
+        url = "https://anonscm.debian.org/git/collab-maint/pkg-ppp.git/plain/debian/patches/rc_mksid-no-buffer-overflow?h=debian/2.4.7-1%2b4";
+        sha256 = "1dk00j7bg9nfgskw39fagnwv1xgsmyv0xnkd6n1v5gy0psw0lvqh";
+      })
     ];
 
   buildInputs = [ libpcap ];
diff --git a/pkgs/tools/networking/stunnel/default.nix b/pkgs/tools/networking/stunnel/default.nix
index e9c82a798ed2..cf930769b861 100644
--- a/pkgs/tools/networking/stunnel/default.nix
+++ b/pkgs/tools/networking/stunnel/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name    = "stunnel-${version}";
-  version = "5.38";
+  version = "5.39";
 
   src = fetchurl {
     url    = "http://www.stunnel.org/downloads/${name}.tar.gz";
-    sha256 = "1mag0gd52f5q1jj3ds1pcn3s09si63cbxmri3zyv2fk8l6ds5b89";
+    sha256 = "1vjdn32iw11zqsygwxbjmqgs4644dk3ql1h8ap890ls6a1x0i318";
   };
 
   buildInputs = [ openssl ];
diff --git a/pkgs/tools/package-management/dpkg/default.nix b/pkgs/tools/package-management/dpkg/default.nix
index 103ef8d77765..0d7a5449d6e3 100644
--- a/pkgs/tools/package-management/dpkg/default.nix
+++ b/pkgs/tools/package-management/dpkg/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "dpkg-${version}";
-  version = "1.18.15";
+  version = "1.18.18";
 
   src = fetchurl {
     url = "mirror://debian/pool/main/d/dpkg/dpkg_${version}.tar.xz";
-    sha256 = "0wd3rl1wi2d22jyavxg1ljzkymilg7p338y0c0ql0fcw7djkdsdf";
+    sha256 = "1xbgjdazcxb9iqrz6jcmy8qwgwggvf6rws2265sh01b6skin32y8";
   };
 
   configureFlags = [
diff --git a/pkgs/tools/package-management/nix-update-source/default.nix b/pkgs/tools/package-management/nix-update-source/default.nix
new file mode 100644
index 000000000000..08b5dcb319ca
--- /dev/null
+++ b/pkgs/tools/package-management/nix-update-source/default.nix
@@ -0,0 +1,29 @@
+{ lib, pkgs, fetchFromGitHub, python3Packages, nix-prefetch-scripts }:
+python3Packages.buildPythonApplication rec {
+  version = "0.2.2";
+  name = "nix-update-source-${version}";
+  src = fetchFromGitHub {
+    owner = "timbertson";
+    repo = "nix-update-source";
+    rev = "version-${version}";
+    sha256 = "0liigkr37ib2xy269bcp53ivpir4mpg6lzwnfrsqc4kbkz3l16gg";
+  };
+  propagatedBuildInputs = [ nix-prefetch-scripts ];
+  passthru = {
+    fetch = path:
+      let
+        fetchers = {
+          # whitelist of allowed fetchers
+          inherit (pkgs) fetchgit fetchurl fetchFromGitHub;
+        };
+        json = lib.importJSON path;
+        fetchFn = builtins.getAttr json.fetch.fn fetchers;
+        src = fetchFn json.fetch.args;
+      in
+      json // json.fetch // { inherit src; };
+  };
+  meta = {
+    description = "Utility to autimate updating of nix derivation sources";
+    maintainers = with lib.maintainers; [ timbertson ];
+  };
+}
diff --git a/pkgs/tools/security/fcrackzip/default.nix b/pkgs/tools/security/fcrackzip/default.nix
new file mode 100644
index 000000000000..5d2e515c3277
--- /dev/null
+++ b/pkgs/tools/security/fcrackzip/default.nix
@@ -0,0 +1,26 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  name = "fcrackzip-${version}";
+  version = "1.0";
+  src = fetchurl {
+    url = "http://oldhome.schmorp.de/marc/data/${name}.tar.gz";
+    sha256 = "0l1qsk949vnz18k4vjf3ppq8p497966x4c7f2yx18x8pk35whn2a";
+  };
+
+  # 'fcrackzip --use-unzip' cannot deal with file names containing a single quote
+  # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=430387
+  patches = [ ./fcrackzip_forkexec.patch ];
+
+  # Do not clash with unizp/zipinfo
+  postInstall = "mv $out/bin/zipinfo $out/bin/fcrackzip-zipinfo";
+
+  meta = with stdenv.lib; {
+    description = "zip password cracker, similar to fzc, zipcrack and others";
+    homepage = http://oldhome.schmorp.de/marc/fcrackzip.html;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ nico202 ];
+    platforms = with platforms; unix;
+  };
+}
+
diff --git a/pkgs/tools/security/fcrackzip/fcrackzip_forkexec.patch b/pkgs/tools/security/fcrackzip/fcrackzip_forkexec.patch
new file mode 100644
index 000000000000..8e508ec1f596
--- /dev/null
+++ b/pkgs/tools/security/fcrackzip/fcrackzip_forkexec.patch
@@ -0,0 +1,105 @@
+--- origin/main.c	2016-12-12 12:53:38.344285376 +0100
++++ main.c	2016-12-12 13:01:41.134548824 +0100
+@@ -26,11 +26,13 @@
+ #include <string.h>
+ 
+ #ifdef USE_UNIX_REDIRECTION
+-#define DEVNULL ">/dev/null 2>&1"
++#define DEVNULL "/dev/null"
+ #else
+-#define DEVNULL ">NUL 2>&1"
++#define DEVNULL "NUL"
+ #endif
+ 
++#include <errno.h>
++
+ #include "crack.h"
+ 
+ int use_unzip;
+@@ -47,21 +49,77 @@
+ int REGPARAM
+ check_unzip (const char *pw)
+ {
+-  char buff[1024];
+-  int status;
++pid_t cpid;
++cpid = fork ();
++if (cpid == -1)
++  {
++    perror ("fork");
++    exit (EXIT_FAILURE);
++  }
++
++if (cpid == 0)
++  {
++    // Redirect STDERR/STDOUT to /dev/null
++    int oldfd_stderr, oldfd_stdout;
++    oldfd_stdout = dup (fileno (stdout));
++    if (oldfd_stdout == -1)
++      {
++        perror ("dup for stdout");
++        _exit (127);
++      }
++    oldfd_stderr = dup (fileno (stderr));
++    if (oldfd_stderr == -1)
++      {
++        perror ("dup for stderr");
++        _exit (127);
++      }
++    if (freopen (DEVNULL, "w", stdout) == NULL)
++      {
++        perror ("freopen " DEVNULL " for stdout");
++        _exit (127);
++      }
++    if (freopen (DEVNULL, "w", stderr) == NULL)
++      {
++        perror ("freopen " DEVNULL " for stderr");
++        _exit (127);
++      }
++    execlp ("unzip", "unzip", "-qqtP", pw, file_path[0], NULL);
++
++    // When execlp failed.
++    // Restores the stderr/stdout redirection to print an error.
++    int errno_saved = errno;
++    dup2 (oldfd_stderr, fileno (stderr));
++    dup2 (oldfd_stdout, fileno (stdout));
++    close (oldfd_stderr);
++    close (oldfd_stdout);
++    errno = errno_saved;
++    perror ("execlp for unzip");
++    _exit (127); // Returns 127 on error as system(3) does
++  }
+ 
+-  sprintf (buff, "unzip -qqtP \"%s\" %s " DEVNULL, pw, file_path[0]);
+-  status = system (buff);
+-
+-#undef REDIR
++  int status;
+ 
+-  if (status == EXIT_SUCCESS)
++  if (waitpid (cpid, &status, 0) == -1)
+     {
+-      printf("\n\nPASSWORD FOUND!!!!: pw == %s\n", pw);
++    perror ("waitpid");
++    exit (EXIT_FAILURE);
++  }
++
++  // The child process does not terminated normally, OR returns the exit status 127.
++  if (!WIFEXITED (status)
++    || (WIFEXITED (status) && (WEXITSTATUS (status) == 127)))
++  {
++    fprintf (stderr, "Executing unzip failed.\n");
++    exit (EXIT_FAILURE);
++  }
++// unzip exited normally with the exit status 0 then...
++ if (WIFEXITED (status) && (WEXITSTATUS (status) == EXIT_SUCCESS))
++  {
++    printf ("\n\nPASSWORD FOUND!!!!: pw == %s\n", pw);
+       exit (EXIT_SUCCESS);
+     }
+ 
+-  return !status;
++  return 0;
+ }
+ 
+ /* misc. callbacks.  */
diff --git a/pkgs/tools/security/gnupg/21.nix b/pkgs/tools/security/gnupg/21.nix
index b96226d5c3f8..e40d1f7bf019 100644
--- a/pkgs/tools/security/gnupg/21.nix
+++ b/pkgs/tools/security/gnupg/21.nix
@@ -15,11 +15,11 @@ assert guiSupport -> pinentry != null;
 stdenv.mkDerivation rec {
   name = "gnupg-${version}";
 
-  version = "2.1.17";
+  version = "2.1.18";
 
   src = fetchurl {
     url = "mirror://gnupg/gnupg/${name}.tar.bz2";
-    sha256 = "1js308b46ifx1gim0c9nivr5yxhans7iq1yvkf7zl2928gdm9p65";
+    sha256 = "157rrv3ly9j2k0acz43nhiba5hfl6h7048jvj55wwqjmgsmnyk6h";
   };
 
   buildInputs = [
diff --git a/pkgs/tools/security/tor/default.nix b/pkgs/tools/security/tor/default.nix
index da52bde56bd6..41cb399cb9fd 100644
--- a/pkgs/tools/security/tor/default.nix
+++ b/pkgs/tools/security/tor/default.nix
@@ -3,11 +3,11 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "tor-0.2.8.12";
+  name = "tor-0.2.9.9";
 
   src = fetchurl {
-    url = "https://archive.torproject.org/tor-package-archive/${name}.tar.gz";
-    sha256 = "1bsagy4gcf6hgq04q949hv45ljb36j3ylxxn22cwxy4whgr4hmxk";
+    url = "https://dist.torproject.org/${name}.tar.gz";
+    sha256 = "0hqdk5p6dw4bpn7c8gmhyi8jjkhc37112pfw5nx4gl0g4lmmscik";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/tools/security/tor/torbrowser.nix b/pkgs/tools/security/tor/torbrowser.nix
index f08d741f6938..7661d42a5d6b 100644
--- a/pkgs/tools/security/tor/torbrowser.nix
+++ b/pkgs/tools/security/tor/torbrowser.nix
@@ -21,13 +21,13 @@ in
 
 stdenv.mkDerivation rec {
   name = "tor-browser-${version}";
-  version = "6.0.8";
+  version = "6.5";
 
   src = fetchurl {
-    url = "https://archive.torproject.org/tor-package-archive/torbrowser/${version}/tor-browser-linux${if stdenv.is64bit then "64" else "32"}-${version}_en-US.tar.xz";
+    url = "https://dist.torproject.org/torbrowser/${version}/tor-browser-linux${if stdenv.is64bit then "64" else "32"}-${version}_en-US.tar.xz";
     sha256 = if stdenv.is64bit then
-      "1s2yv72kj4zxba0850fi1jv41c69vcw3inhj9kqhy1d45ql7iw0w" else
-      "0zvqf444h35ikv1f3nwkh2jx51zj5k9w4zdxx32zcrnxpk5nhn97";
+      "0q0rdwjiqjjh9awiyp0a55nkhyri5y6zhkyq3n3x6w4afihl0wf4" else
+      "1y1sx2gp7c66l7a4smfibl8mv54byvawhhkikpa5l2vic75vyhk9";
   };
 
   preferLocalBuild = true;
diff --git a/pkgs/tools/system/journalbeat/default.nix b/pkgs/tools/system/journalbeat/default.nix
new file mode 100644
index 000000000000..5a66fcf52990
--- /dev/null
+++ b/pkgs/tools/system/journalbeat/default.nix
@@ -0,0 +1,34 @@
+{ lib, pkgs, buildGoPackage, fetchFromGitHub, makeWrapper }:
+
+let
+
+  libPath = lib.makeLibraryPath [ pkgs.systemd.lib ];
+
+in buildGoPackage rec {
+
+  name = "journalbeat-${version}";
+  version = "5.1.2";
+
+  goPackagePath = "github.com/mheese/journalbeat";
+
+  buildInputs = [ makeWrapper pkgs.systemd ];
+
+  postInstall = ''
+    wrapProgram $bin/bin/journalbeat \
+      --prefix LD_LIBRARY_PATH : ${libPath}
+  '';
+
+  src = fetchFromGitHub {
+    owner = "mheese";
+    repo = "journalbeat";
+    rev = "v${version}";
+    sha256 = "179jayzvd5k4mwhn73yflbzl5md1fmv7a9hb8vz2ir76lvr33g3l";
+  };
+
+  meta = with lib; {
+    homepage = https://github.com/mheese/journalbeat;
+    description = "Journalbeat is a log shipper from systemd/journald to Logstash/Elasticsearch";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ mbrgm ];
+  };
+}
diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix
index 46932076177f..df04ef48730d 100644
--- a/pkgs/tools/system/netdata/default.nix
+++ b/pkgs/tools/system/netdata/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub, autoreconfHook, zlib, pkgconfig, libuuid }:
 
 stdenv.mkDerivation rec{
-  version = "1.4.0";
+  version = "1.5.0";
   name = "netdata-${version}";
 
   src = fetchFromGitHub {
     rev = "v${version}";
     owner = "firehol";
     repo = "netdata";
-    sha256 = "1wknxci2baj6f7rl8z8j7haaz122jmbb74aw7i3xbj2y61cs58n8";
+    sha256 = "1nsv0s11ai1kvig9xr4cz2f2lalvilpbfjpd8fdfqk9fak690zhz";
   };
 
   buildInputs = [ autoreconfHook zlib pkgconfig libuuid ];
diff --git a/pkgs/tools/typesetting/tex/tetex/default.nix b/pkgs/tools/typesetting/tex/tetex/default.nix
index c3d226a2acb0..83bead83ea3e 100644
--- a/pkgs/tools/typesetting/tex/tetex/default.nix
+++ b/pkgs/tools/typesetting/tex/tetex/default.nix
@@ -4,13 +4,13 @@ stdenv.mkDerivation {
   name = "tetex-3.0";
 
   src = fetchurl {
-    url = ftp://cam.ctan.org/tex-archive/systems/unix/teTeX/current/distrib/tetex-src-3.0.tar.gz;
-    md5 = "944a4641e79e61043fdaf8f38ecbb4b3";
+    url = http://mirrors.ctan.org/obsolete/systems/unix/teTeX/3.0/distrib/tetex-src-3.0.tar.gz;
+    sha256 = "16v44465ipd9yyqri9rgxp6rbgs194k4sh1kckvccvdsnnp7w3ww";
   };
 
   texmf = fetchurl {
-    url = ftp://cam.ctan.org/tex-archive/systems/unix/teTeX/current/distrib/tetex-texmf-3.0.tar.gz;
-    md5 = "11aa15c8d3e28ee7815e0d5fcdf43fd4";
+    url = http://mirrors.ctan.org/obsolete/systems/unix/teTeX/3.0/distrib/tetex-texmf-3.0.tar.gz;
+    sha256 = "1hj06qvm02a2hx1a67igp45kxlbkczjlg20gr8lbp73l36k8yfvc";
   };
 
   buildInputs = [ flex bison zlib libpng ncurses ed ];
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 5df31f6bbd39..0dc0ec66c249 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -10,26 +10,12 @@ self: pkgs:
 
 with pkgs;
 
-let
-  defaultScope = pkgs // pkgs.xorg;
-in
-
 {
 
   # Allow callPackage to fill in the pkgs argument
   inherit pkgs;
 
 
-  # We use `callPackage' to be able to omit function arguments that
-  # can be obtained from `pkgs' or `pkgs.xorg' (i.e. `defaultScope').
-  # Use `newScope' for sets of packages in `pkgs' (see e.g. `gnome'
-  # below).
-  callPackage = newScope {};
-
-  callPackages = lib.callPackagesWith defaultScope;
-
-  newScope = extra: lib.callPackageWith (defaultScope // extra);
-
   # Override system. This is useful to build i686 packages on x86_64-linux.
   forceSystem = system: kernel: nixpkgsFun {
     inherit system;
@@ -39,15 +25,9 @@ in
   # Used by wine, firefox with debugging version of Flash, ...
   pkgsi686Linux = forceSystem "i686-linux" "i386";
 
-  callPackage_i686 = lib.callPackageWith (pkgsi686Linux // pkgsi686Linux.xorg);
+  callPackage_i686 = pkgsi686Linux.callPackage;
 
-  forceNativeDrv = drv:
-    # Even when cross compiling, some packages come from the stdenv's
-    # bootstrapping package set. Those packages are only built for the native
-    # platform.
-    if crossSystem != null && drv ? crossDrv
-    then drv // { crossDrv = drv.nativeDrv; }
-    else drv;
+  forcedNativePackages = if hostPlatform == buildPlatform then pkgs else buildPackages;
 
   # A stdenv capable of building 32-bit binaries.  On x86_64-linux,
   # it uses GCC compiled with multilib support; on i686-linux, it's
@@ -524,6 +504,12 @@ in
 
   oracle-instantclient = callPackage ../development/libraries/oracle-instantclient { };
 
+  kwm = callPackage ../os-specific/darwin/kwm { };
+
+  khd = callPackage ../os-specific/darwin/khd {
+    inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
+  };
+
   reattach-to-user-namespace = callPackage ../os-specific/darwin/reattach-to-user-namespace {};
 
   install_name_tool = callPackage ../os-specific/darwin/install_name_tool { };
@@ -1677,6 +1663,8 @@ in
 
   fcppt = callPackage ../development/libraries/fcppt/default.nix { };
 
+  fcrackzip = callPackage ../tools/security/fcrackzip { };
+
   fcron = callPackage ../tools/system/fcron { };
 
   fdm = callPackage ../tools/networking/fdm {};
@@ -2361,6 +2349,8 @@ in
     gcc = gcc49; # doesn't build with gcc5
   };
 
+  journalbeat = callPackage ../tools/system/journalbeat { };
+
   jp = callPackage ../development/tools/jp { };
 
   jp2a = callPackage ../applications/misc/jp2a { };
@@ -2852,7 +2842,7 @@ in
 
   mkcue = callPackage ../tools/cd-dvd/mkcue { };
 
-  mkpasswd = callPackage ../tools/security/mkpasswd { };
+  mkpasswd = hiPrio (callPackage ../tools/security/mkpasswd { });
 
   mkrand = callPackage ../tools/security/mkrand { };
 
@@ -2935,6 +2925,8 @@ in
 
   ndjbdns = callPackage ../tools/networking/ndjbdns { };
 
+  neofetch = callPackage ../tools/misc/neofetch { };
+
   nerdfonts = callPackage ../data/fonts/nerdfonts { };
 
   nestopia = callPackage ../misc/emulators/nestopia { };
@@ -3266,7 +3258,7 @@ in
   pngout = callPackage ../tools/graphics/pngout { };
 
   hurdPartedCross =
-    if crossSystem != null && crossSystem.config == "i586-pc-gnu"
+    if targetPlatform != buildPlatform && targetPlatform.config == "i586-pc-gnu"
     then (makeOverridable
             ({ hurd }:
               (parted.override {
@@ -3894,7 +3886,7 @@ in
   sshpass = callPackage ../tools/networking/sshpass { };
 
   sslscan = callPackage ../tools/security/sslscan {
-    openssl = openssl_1_0_1.override { enableSSL2 = true; };
+    openssl = openssl_1_0_1-vulnerable.override { enableSSL2 = true; };
   };
 
   sslmate = callPackage ../development/tools/sslmate { };
@@ -4771,44 +4763,48 @@ in
 
   gccApple = throw "gccApple is no longer supported";
 
-  gccCrossStageStatic = let
+  gccCrossStageStatic = assert targetPlatform != buildPlatform; let
     libcCross1 =
       if stdenv.cross.libc == "msvcrt" then windows.mingw_w64_headers
       else if stdenv.cross.libc == "libSystem" then darwin.xcode
       else null;
     in wrapGCCCross {
-      gcc = forceNativeDrv (gcc.cc.override {
-        cross = crossSystem;
+      gcc = forcedNativePackages.gcc.cc.override {
+        cross = targetPlatform;
         crossStageStatic = true;
         langCC = false;
         libcCross = libcCross1;
         enableShared = false;
-      });
+        # Why is this needed?
+        inherit (forcedNativePackages) binutilsCross;
+      };
       libc = libcCross1;
       binutils = binutilsCross;
-      cross = crossSystem;
+      cross = targetPlatform;
   };
 
   # Only needed for mingw builds
-  gccCrossMingw2 = wrapGCCCross {
+  gccCrossMingw2 = assert targetPlatform != buildPlatform; wrapGCCCross {
     gcc = gccCrossStageStatic.gcc;
     libc = windows.mingw_headers2;
     binutils = binutilsCross;
-    cross = assert crossSystem != null; crossSystem;
+    cross = targetPlatform;
   };
 
-  gccCrossStageFinal = wrapGCCCross {
-    gcc = forceNativeDrv (gcc.cc.override {
-      cross = crossSystem;
+  gccCrossStageFinal = assert targetPlatform != buildPlatform; wrapGCCCross {
+    gcc = forcedNativePackages.gcc.cc.override {
+      cross = targetPlatform;
       crossStageStatic = false;
 
       # XXX: We have troubles cross-compiling libstdc++ on MinGW (see
       # <http://hydra.nixos.org/build/4268232>), so don't even try.
-      langCC = crossSystem.config != "i686-pc-mingw32";
-    });
+      langCC = targetPlatform.config != "i686-pc-mingw32";
+      # Why is this needed?
+      inherit (forcedNativePackages) binutilsCross;
+    };
     libc = libcCross;
     binutils = binutilsCross;
-    cross = crossSystem;
+    cross = targetPlatform;
   };
 
   gcc45 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.5 {
@@ -4826,7 +4822,7 @@ in
     # and host != build), `cross' must be null but the cross-libc must still
     # be passed.
     cross = null;
-    libcCross = if crossSystem != null then libcCross else null;
+    libcCross = if targetPlatform != buildPlatform then libcCross else null;
   }));
 
   gcc48 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.8 {
@@ -4839,7 +4835,7 @@ in
     # and host != build), `cross' must be null but the cross-libc must still
     # be passed.
     cross = null;
-    libcCross = if crossSystem != null then libcCross else null;
+    libcCross = if targetPlatform != buildPlatform then libcCross else null;
 
     isl = if !stdenv.isDarwin then isl_0_14 else null;
     cloog = if !stdenv.isDarwin then cloog else null;
@@ -4856,7 +4852,7 @@ in
     # and host != build), `cross' must be null but the cross-libc must still
     # be passed.
     cross = null;
-    libcCross = if crossSystem != null then libcCross else null;
+    libcCross = if targetPlatform != buildPlatform then libcCross else null;
 
     isl = if !stdenv.isDarwin then isl_0_11 else null;
 
@@ -4873,7 +4869,7 @@ in
     # and host != build), `cross' must be null but the cross-libc must still
     # be passed.
     cross = null;
-    libcCross = if crossSystem != null then libcCross else null;
+    libcCross = if targetPlatform != buildPlatform then libcCross else null;
 
     isl = if !stdenv.isDarwin then isl_0_14 else null;
   }));
@@ -4888,7 +4884,7 @@ in
     # and host != build), `cross' must be null but the cross-libc must still
     # be passed.
     cross = null;
-    libcCross = if crossSystem != null then libcCross else null;
+    libcCross = if targetPlatform != buildPlatform then libcCross else null;
 
     isl = if !stdenv.isDarwin then isl_0_14 else null;
   }));
@@ -5021,7 +5017,7 @@ in
 
   # Haskell and GHC
 
-  haskell = callPackage ./haskell-packages.nix { inherit crossSystem; };
+  haskell = callPackage ./haskell-packages.nix { };
 
   haskellPackages = haskell.packages.ghc801.override {
     overrides = config.haskellPackageOverrides or (self: super: {});
@@ -5499,12 +5495,12 @@ in
   wrapGCCCross =
     {gcc, libc, binutils, cross, shell ? "", name ? "gcc-cross-wrapper"}:
 
-    forceNativeDrv (callPackage ../build-support/gcc-cross-wrapper {
+    forcedNativePackages.callPackage ../build-support/gcc-cross-wrapper {
       nativeTools = false;
       nativeLibc = false;
       noLibc = (libc == null);
       inherit gcc binutils libc shell name cross;
-    });
+    };
 
   # prolog
   yap = callPackage ../development/compilers/yap { };
@@ -5513,6 +5509,8 @@ in
 
   yosys = callPackage ../development/compilers/yosys { };
 
+  zulu = callPackage ../development/compilers/zulu { };
+
 
   ### DEVELOPMENT / INTERPRETERS
 
@@ -6012,9 +6010,9 @@ in
 
   antlr = callPackage ../development/tools/parsing/antlr/2.7.7.nix { };
 
-  antlr3 = callPackage ../development/tools/parsing/antlr { };
   antlr3_4 = callPackage ../development/tools/parsing/antlr/3.4.nix { };
   antlr3_5 = callPackage ../development/tools/parsing/antlr/3.5.nix { };
+  antlr3 = antlr3_5;
 
   ant = apacheAnt;
 
@@ -6083,12 +6081,12 @@ in
     gold = false;
   });
 
-  binutilsCross = assert crossSystem != null; lowPrio (forceNativeDrv (
-    if crossSystem.libc == "libSystem" then darwin.cctools_cross
-    else binutils.override {
+  binutilsCross = assert targetPlatform != buildPlatform; lowPrio (
+    if targetPlatform.libc == "libSystem" then darwin.cctools_cross
+    else forcedNativePackages.binutils.override {
       noSysDirs = true;
-      cross = crossSystem;
-    }));
+      cross = targetPlatform;
+    });
 
   bison2 = callPackage ../development/tools/parsing/bison/2.x.nix { };
   bison3 = callPackage ../development/tools/parsing/bison/3.x.nix { };
@@ -6292,6 +6290,8 @@ in
 
   doxygen_gui = lowPrio (doxygen.override { inherit qt4; });
 
+  drake = callPackage ../development/tools/build-managers/drake { };
+
   drush = callPackage ../development/tools/misc/drush { };
 
   editorconfig-core-c = callPackage ../development/tools/misc/editorconfig-core-c { };
@@ -6479,6 +6479,8 @@ in
 
   mk = callPackage ../development/tools/build-managers/mk { };
 
+  msgpack-tools = callPackage ../development/tools/msgpack-tools { };
+
   msitools = callPackage ../development/tools/misc/msitools { };
 
   multi-ghc-travis = callPackage ../development/tools/haskell/multi-ghc-travis { };
@@ -6555,9 +6557,9 @@ in
      cross_renaming: we should make all programs use pkgconfig as
      nativeBuildInput after the renaming.
      */
-  pkgconfig = forceNativeDrv (callPackage ../development/tools/misc/pkgconfig {
+  pkgconfig = forcedNativePackages.callPackage ../development/tools/misc/pkgconfig {
     fetchurl = fetchurlBoot;
-  });
+  };
   pkgconfigUpstream = lowPrio (pkgconfig.override { vanilla = true; });
 
   postiats-utilities = callPackage ../development/tools/postiats-utilities {};
@@ -6731,7 +6733,7 @@ in
   gdbGuile = lowPrio (gdb.override { inherit guile; });
 
   gdbCross = lowPrio (callPackage ../development/tools/misc/gdb {
-    target = crossSystem;
+    target = if targetPlatform != buildPlatform then targetPlatform else null;
   });
 
   gdb-multitarget = lowPrio (gdb.override { multitarget = true; });
@@ -6935,10 +6937,6 @@ in
 
   chromaprint = callPackage ../development/libraries/chromaprint { };
 
-  cilaterm = callPackage ../development/libraries/cil-aterm {
-    stdenv = overrideInStdenv stdenv [gnumake380];
-  };
-
   cl = callPackage ../development/libraries/cl { };
 
   classads = callPackage ../development/libraries/classads { };
@@ -7333,10 +7331,10 @@ in
     withGd = true;
   };
 
-  glibcCross = forceNativeDrv (glibc.override {
+  glibcCross = forcedNativePackages.glibc.override {
     gccCross = gccCrossStageStatic;
     linuxHeaders = linuxHeadersCross;
-  });
+  };
 
   # We can choose:
   libcCrossChooser = name: if name == "glibc" then glibcCross
@@ -7345,7 +7343,7 @@ in
     else if name == "libSystem" then darwin.xcode
     else throw "Unknown libc";
 
-  libcCross = assert crossSystem != null; libcCrossChooser crossSystem.libc;
+  libcCross = assert targetPlatform != buildPlatform; libcCrossChooser targetPlatform.libc;
 
   # Only supported on Linux
   glibcLocales = if stdenv.isLinux then callPackage ../development/libraries/glibc/locales.nix { } else null;
@@ -7564,10 +7562,6 @@ in
   gtkmm2 = callPackage ../development/libraries/gtkmm/2.x.nix { };
   gtkmm3 = callPackage ../development/libraries/gtkmm/3.x.nix { };
 
-  gtkmozembedsharp = callPackage ../development/libraries/gtkmozembed-sharp {
-    gtksharp = gtk-sharp-2_0;
-  };
-
   gtk-sharp-2_0 = callPackage ../development/libraries/gtk-sharp/2.0.nix {
     inherit (gnome2) libglade libgtkhtml gtkhtml
               libgnomecanvas libgnomeui libgnomeprint
@@ -8254,9 +8248,9 @@ in
   # glibc provides libiconv so systems with glibc don't need to build libiconv
   # separately, but we also provide libiconvReal, which will always be a
   # standalone libiconv, just in case you want it
-  libiconv = if crossSystem != null then
-    (if crossSystem.libc == "glibc" then libcCross
-      else if crossSystem.libc == "libSystem" then darwin.libiconv
+  libiconv = if stdenv ? cross then
+    (if stdenv.cross.libc == "glibc" then libcCross
+      else if stdenv.cross.libc == "libSystem" then darwin.libiconv
       else libiconvReal)
     else if stdenv.isGlibc then glibcIconv stdenv.cc.libc
     else if stdenv.isDarwin then darwin.libiconv
@@ -8306,10 +8300,6 @@ in
   libjpeg_drop = callPackage ../development/libraries/libjpeg-drop { };
   libjpeg = if stdenv.isLinux then libjpeg_turbo else libjpeg_original; # some problems, both on FreeBSD and Darwin
 
-  libjpeg62 = callPackage ../development/libraries/libjpeg/62.nix {
-    libtool = libtool_1_5;
-  };
-
   libjreen = callPackage ../development/libraries/libjreen { };
 
   libjson_rpc_cpp = callPackage ../development/libraries/libjson-rpc-cpp { };
@@ -9015,7 +9005,7 @@ in
         onlyHeaders = true;
       };
     })
-    openssl_1_0_1
+    openssl_1_0_1-vulnerable
     openssl_1_0_2
     openssl_1_1_0
     openssl_1_0_2-steam;
@@ -10015,10 +10005,6 @@ in
 
   jflex = callPackage ../development/libraries/java/jflex { };
 
-  jjtraveler = callPackage ../development/libraries/java/jjtraveler {
-    stdenv = overrideInStdenv stdenv [gnumake380];
-  };
-
   junit = callPackage ../development/libraries/java/junit { antBuild = releaseTools.antBuild; };
 
   junixsocket = callPackage ../development/libraries/java/junixsocket { };
@@ -10345,6 +10331,7 @@ in
   jetty = callPackage ../servers/http/jetty { };
 
   knot-dns = callPackage ../servers/dns/knot-dns { };
+  knot-resolver = callPackage ../servers/dns/knot-resolver { };
 
   rdkafka = callPackage ../development/libraries/rdkafka { };
 
@@ -10718,6 +10705,7 @@ in
   spawn_fcgi = callPackage ../servers/http/spawn-fcgi { };
 
   squid = callPackage ../servers/squid { };
+  squid4 = callPackage ../servers/squid/4.nix { };
 
   sslh = callPackage ../servers/sslh { };
 
@@ -10907,8 +10895,8 @@ in
     cmdline = callPackage ../os-specific/darwin/command-line-tools {};
     apple-source-releases = callPackage ../os-specific/darwin/apple-source-releases { };
   in apple-source-releases // rec {
-    cctools_cross = callPackage (forceNativeDrv (callPackage ../os-specific/darwin/cctools/port.nix {}).cross) {
-      cross = assert crossSystem != null; crossSystem;
+    cctools_cross = callPackage (forcedNativePackages.callPackage ../os-specific/darwin/cctools/port.nix {}).cross {
+      cross = assert targetPlatform != buildPlatform; targetPlatform;
       inherit maloader;
       xctoolchain = xcode.toolchain;
     };
@@ -10981,7 +10969,7 @@ in
   libossp_uuid = callPackage ../development/libraries/libossp-uuid { };
 
   libuuid =
-    if crossSystem != null && crossSystem.config == "i586-pc-gnu"
+    if targetPlatform != buildPlatform && targetPlatform.config == "i586-pc-gnu"
     then (utillinuxMinimal // {
       crossDrv = lib.overrideDerivation utillinuxMinimal.crossDrv (args: {
         # `libblkid' fails to build on GNU/Hurd.
@@ -11066,7 +11054,7 @@ in
 
   # GNU/Hurd core packages.
   gnu = recurseIntoAttrs (callPackage ../os-specific/gnu {
-    inherit platform crossSystem;
+    inherit platform;
   });
 
   hwdata = callPackage ../os-specific/linux/hwdata { };
@@ -11145,13 +11133,13 @@ in
 
   linuxHeaders = linuxHeaders_4_4;
 
-  linuxHeaders24Cross = forceNativeDrv (callPackage ../os-specific/linux/kernel-headers/2.4.nix {
-    cross = assert crossSystem != null; crossSystem;
-  });
+  linuxHeaders24Cross = forcedNativePackages.callPackage ../os-specific/linux/kernel-headers/2.4.nix {
+    cross = assert targetPlatform != buildPlatform; targetPlatform;
+  };
 
-  linuxHeaders26Cross = forceNativeDrv (callPackage ../os-specific/linux/kernel-headers/4.4.nix {
-    cross = assert crossSystem != null; crossSystem;
-  });
+  linuxHeaders26Cross = forcedNativePackages.callPackage ../os-specific/linux/kernel-headers/4.4.nix {
+    cross = assert targetPlatform != buildPlatform; targetPlatform;
+  };
 
   linuxHeaders_3_18 = callPackage ../os-specific/linux/kernel-headers/3.18.nix { };
 
@@ -11162,8 +11150,8 @@ in
     else if ver == "2.6" then linuxHeaders26Cross
     else throw "Unknown linux kernel version";
 
-  linuxHeadersCross = assert crossSystem != null;
-    linuxHeadersCrossChooser crossSystem.platform.kernelMajor;
+  linuxHeadersCross = assert targetPlatform != buildPlatform;
+    linuxHeadersCrossChooser targetPlatform.platform.kernelMajor;
 
   kernelPatches = callPackage ../os-specific/linux/kernel/patches.nix { };
 
@@ -11240,7 +11228,6 @@ in
     kernelPatches =
       [ kernelPatches.bridge_stp_helper
         kernelPatches.cpu-cgroup-v2."4.4"
-        kernelPatches.p9_caching_4_4
       ]
       ++ lib.optionals ((platform.kernelArch or null) == "mips")
       [ kernelPatches.mips_fpureg_emu
@@ -11257,6 +11244,7 @@ in
         # !!! 4.7 patch doesn't apply, 4.9 patch not up yet, will keep checking
         # kernelPatches.cpu-cgroup-v2."4.7"
         kernelPatches.modinst_arg_list_too_long
+        kernelPatches.p9_caching_4_9
       ]
       ++ lib.optionals ((platform.kernelArch or null) == "mips")
       [ kernelPatches.mips_fpureg_emu
@@ -11269,6 +11257,7 @@ in
     kernelPatches = [
       kernelPatches.bridge_stp_helper
       kernelPatches.modinst_arg_list_too_long
+      kernelPatches.p9_caching_4_9
     ] ++ lib.optionals ((platform.kernelArch or null) == "mips") [
       kernelPatches.mips_fpureg_emu
       kernelPatches.mips_fpu_sigill
@@ -11669,6 +11658,8 @@ in
 
   powerdns = callPackage ../servers/dns/powerdns { };
 
+  pdns-recursor = callPackage ../servers/dns/pdns-recursor { };
+
   powertop = callPackage ../os-specific/linux/powertop { };
 
   prayer = callPackage ../servers/prayer { };
@@ -11825,7 +11816,7 @@ in
   uclibcCross = lowPrio (callPackage ../os-specific/linux/uclibc {
     linuxHeaders = linuxHeadersCross;
     gccCross = gccCrossStageStatic;
-    cross = assert crossSystem != null; crossSystem;
+    cross = assert targetPlatform != buildPlatform; targetPlatform;
   });
 
   udev = systemd;
@@ -13540,11 +13531,6 @@ in
 
   qrencode = callPackage ../tools/graphics/qrencode { };
 
-  gecko_mediaplayer = callPackage ../applications/networking/browsers/mozilla-plugins/gecko-mediaplayer {
-    inherit (gnome2) GConf;
-    browser = firefox-unwrapped;
-  };
-
   geeqie = callPackage ../applications/graphics/geeqie { };
 
   gigedit = callPackage ../applications/audio/gigedit { };
@@ -13553,10 +13539,6 @@ in
 
   gmpc = callPackage ../applications/audio/gmpc {};
 
-  gmtk = callPackage ../applications/networking/browsers/mozilla-plugins/gmtk {
-    inherit (gnome2) GConf;
-  };
-
   gnome-mpv = callPackage ../applications/video/gnome-mpv { };
 
   gollum = callPackage ../applications/misc/gollum { };
@@ -14739,9 +14721,9 @@ in
 
   quiterss = qt5.callPackage ../applications/networking/newsreaders/quiterss {};
 
-  quodlibet = callPackage ../applications/audio/quodlibet { };
+  quodlibet-without-gst-plugins = callPackage ../applications/audio/quodlibet { };
 
-  quodlibet-with-gst-plugins = callPackage ../applications/audio/quodlibet {
+  quodlibet = callPackage ../applications/audio/quodlibet {
     withGstPlugins = true;
     gst_plugins_bad = null;
   };
@@ -16420,9 +16402,7 @@ in
 
   warmux = callPackage ../games/warmux { };
 
-  warsow = callPackage ../games/warsow {
-    libjpeg = libjpeg62;
-  };
+  warsow = callPackage ../games/warsow { };
 
   warzone2100 = qt5.callPackage ../games/warzone2100 { };
 
@@ -16993,14 +16973,10 @@ in
     inherit (ocamlPackages_4_01_0) ocaml findlib lablgtk;
     camlp5 = ocamlPackages_4_01_0.camlp5_transitional;
   };
-  coq_8_5 = callPackage ../applications/science/logic/coq/8.5.nix {
-    inherit (ocamlPackages) ocaml findlib lablgtk;
-    camlp5 = ocamlPackages.camlp5_transitional;
-  };
-  coq_8_6 = callPackage ../applications/science/logic/coq/8.6.nix {
-    inherit (ocamlPackages) ocaml findlib lablgtk;
-    camlp5 = ocamlPackages.camlp5_transitional;
+  coq_8_5 = callPackage ../applications/science/logic/coq {
+    version = "8.5pl3";
   };
+  coq_8_6 = callPackage ../applications/science/logic/coq {};
   coq_HEAD = callPackage ../applications/science/logic/coq/HEAD.nix {
     inherit (ocamlPackages) ocaml findlib lablgtk;
     camlp5 = ocamlPackages.camlp5_transitional;
@@ -17268,7 +17244,9 @@ in
 
   scilab-bin = callPackage ../applications/science/math/scilab-bin {};
 
-  scotch = callPackage ../applications/science/math/scotch { };
+  scotch = callPackage ../applications/science/math/scotch {
+    flex = flex_2_5_35;
+  };
 
   msieve = callPackage ../applications/science/math/msieve { };
 
@@ -17590,6 +17568,8 @@ in
     nix-prefetch-zip
     nix-prefetch-scripts;
 
+  nix-update-source = callPackage ../tools/package-management/nix-update-source {};
+
   nix-template-rpm = callPackage ../build-support/templaterpm { inherit (pythonPackages) python toposort; };
 
   nix-repl = callPackage ../tools/package-management/nix-repl { };
@@ -18033,4 +18013,6 @@ in
   simplenote = callPackage ../applications/misc/simplenote { };
 
   hy = callPackage ../development/interpreters/hy {};
+
+  ghc-standalone-archive = callPackage ../os-specific/darwin/ghc-standalone-archive { inherit (darwin) cctools; };
 }
diff --git a/pkgs/top-level/default.nix b/pkgs/top-level/default.nix
index a146dad63bc8..3c67d316f7c8 100644
--- a/pkgs/top-level/default.nix
+++ b/pkgs/top-level/default.nix
@@ -83,7 +83,24 @@ in let
   boot = import ../stdenv/booter.nix { inherit lib allPackages; };
 
   stages = stdenvStages {
-    inherit lib system platform crossSystem config overlays;
+    # One would think that `localSystem` and `crossSystem` overlap horribly with
+    # the three `*Platforms` (`buildPlatform`, `hostPlatform,` and
+    # `targetPlatform`; see `stage.nix` or the manual). Actually, those
+    # identifiers I, @Ericson2314, purposefully not used here to draw a subtle
+    # but important distinction:
+    #
+    # While the granularity of having 3 platforms is necessary to properly
+    # *build* packages, it is overkill for specifying the user's *intent* when
+    # making a build plan or package set. A simple "build vs deploy" dichotomy
+    # is adequate: the "sliding window" principle described in the manual shows
+    # how to interpolate between the these two "end points" to get the 3
+    # platform triple for each bootstrapping stage.
+    #
+    # Also, less philosophically but quite practically, `crossSystem` should be
+    # null when one doesn't want to cross-compile, while the `*Platform`s are
+    # always non-null. `localSystem` is always non-null.
+    localSystem = { inherit system platform; };
+    inherit lib crossSystem config overlays;
   };
 
   pkgs = boot stages;
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 5b14af145e9f..7309121486e5 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -1,4 +1,4 @@
-{ pkgs, callPackage, stdenv, crossSystem }:
+{ pkgs, callPackage, stdenv, buildPlatform, targetPlatform }:
 
 rec {
 
@@ -55,7 +55,7 @@ rec {
     ghcHEAD = callPackage ../development/compilers/ghc/head.nix rec {
       bootPkgs = packages.ghc7103;
       inherit (bootPkgs) alex happy;
-      inherit crossSystem;
+      inherit buildPlatform targetPlatform;
       selfPkgs = packages.ghcHEAD;
     };
     ghcjs = packages.ghc7103.callPackage ../development/compilers/ghcjs {
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 199bc04f9bf4..40f4ba857457 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -20,6 +20,8 @@ let
 
     ansiterminal = callPackage ../development/ocaml-modules/ansiterminal { };
 
+    apron = callPackage ../development/ocaml-modules/apron { };
+
     asn1-combinators = callPackage ../development/ocaml-modules/asn1-combinators { };
 
     astring = callPackage ../development/ocaml-modules/astring { };
@@ -265,6 +267,10 @@ let
 
     mlgmp =  callPackage ../development/ocaml-modules/mlgmp { };
 
+    mlgmpidl =  callPackage ../development/ocaml-modules/mlgmpidl { };
+
+    mtime =  callPackage ../development/ocaml-modules/mtime { };
+
     nocrypto =  callPackage ../development/ocaml-modules/nocrypto {
       lwt = ocaml_lwt;
     };
@@ -370,6 +376,8 @@ let
 
     sequence = callPackage ../development/ocaml-modules/sequence { };
 
+    spacetime_lib = callPackage ../development/ocaml-modules/spacetime_lib { };
+
     sqlexpr = callPackage ../development/ocaml-modules/sqlexpr { };
 
     tuntap = callPackage ../development/ocaml-modules/tuntap { };
@@ -723,7 +731,9 @@ in rec
 
   ocamlPackages_4_03 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.03.nix { }) (self: super: { });
 
-  ocamlPackages_latest = ocamlPackages_4_03;
+  ocamlPackages_4_04 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.04.nix { }) (self: super: { });
+
+  ocamlPackages_latest = ocamlPackages_4_04;
 
   ocamlPackages = ocamlPackages_4_01_0;
 }
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 0b4f53ac8613..9d8bf6930782 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -8599,17 +8599,16 @@ let self = _self // overrides; _self = with self; {
   };
 
   MooXTypesMooseLikeNumeric = buildPerlPackage rec {
-    name = "MooX-Types-MooseLike-Numeric-1.02";
+    name = "MooX-Types-MooseLike-Numeric-1.03";
     src = fetchurl {
       url = "mirror://cpan/authors/id/M/MA/MATEU/${name}.tar.gz";
-      sha256 = "6186f75ab2747723fd979249ec6ee0c4550f5b47aa50c0d222cc7d3590182bb6";
+      sha256 = "16adeb617b963d010179922c2e4e8762df77c75232e17320b459868c4970c44b";
     };
-    buildInputs = [ TestFatal ];
+    buildInputs = [ Moo TestFatal ];
     propagatedBuildInputs = [ MooXTypesMooseLike ];
     meta = {
       description = "Moo types for numbers";
       license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
-      maintainers = [ maintainers.rycee ];
     };
   };
 
@@ -9138,18 +9137,17 @@ let self = _self // overrides; _self = with self; {
   };
 
   MooseXTypesCommon = buildPerlPackage rec {
-    name = "MooseX-Types-Common-0.001013";
+    name = "MooseX-Types-Common-0.001014";
     src = fetchurl {
       url = "mirror://cpan/authors/id/E/ET/ETHER/${name}.tar.gz";
-      sha256 = "ff0c963f5e8304acb5f64bdf9ba1f19284311148e1a8f0d1f81f123f9950f5f2";
+      sha256 = "ef93718b6d2f240d50b5c3acb1a74b4c2a191869651470001a82be1f35d0ef0f";
     };
     buildInputs = [ ModuleBuildTiny TestDeep TestWarnings perl ];
-    propagatedBuildInputs = [ MooseXTypes ];
+    propagatedBuildInputs = [ MooseXTypes self."if" ];
     meta = {
       homepage = https://github.com/moose/MooseX-Types-Common;
       description = "A library of commonly used type constraints";
       license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
-      maintainers = with maintainers; [ rycee ];
     };
   };
 
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index ffb1aefdd336..5c9f43c2870f 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -4968,6 +4968,23 @@ in {
     };
   };
 
+  pydub = buildPythonPackage rec {
+    name = "${pname}-${version}";
+    pname = "pydub";
+    version = "0.16.7";
+    src = pkgs.fetchurl {
+      url = "https://pypi.python.org/packages/05/e0/8d2496c8ef1d7f2c8ff625be3849f550da42809b862879a8fb137c6baa11/${name}.tar.gz";
+      sha256 = "10rmbvsld5fni9wsvb7la8lblrglsnzd2l1159rcxqf6b8k441dx";
+    };
+
+    meta = {
+      description = "Manipulate audio with a simple and easy high level interface.";
+      homepage    = "http://pydub.com/";
+      license     = licenses.mit;
+      platforms   = platforms.all;
+    };
+  };
+
   pyjade = buildPythonPackage rec {
     name = "${pname}-${version}";
     pname = "pyjade";
@@ -4997,61 +5014,13 @@ in {
 
   pytest = self.pytest_29;
 
-  pytest_27 = buildPythonPackage rec {
-    name = "pytest-2.7.3";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/p/pytest/${name}.tar.gz";
-      sha256 = "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm";
-    };
-
-    # Disabled temporarily because of Hydra issue with namespaces
-    doCheck = false;
+  pytest_27 = callPackage ../development/python-modules/pytest/2_7.nix {};
 
-    preCheck = ''
-      # don't test bash builtins
-      rm testing/test_argcomplete.py
-    '';
-
-    propagatedBuildInputs = with self; [ py ]
-      ++ (optional isPy26 argparse)
-      ++ stdenv.lib.optional
-        pkgs.config.pythonPackages.pytest.selenium or false
-        self.selenium;
-
-    meta = {
-      maintainers = with maintainers; [ domenkozar lovek323 madjar ];
-      platforms = platforms.unix;
-    };
-  };
-
-  pytest_28 = self.pytest_27.override rec {
-    name = "pytest-2.8.7";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/p/pytest/${name}.tar.gz";
-      sha256 = "1bwb06g64x2gky8x5hcrfpg6r351xwvafimnhm5qxq7wajz8ck7w";
-    };
-  };
-
-  pytest_29 = self.pytest_27.override rec {
-    name = "pytest-2.9.2";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/p/pytest/${name}.tar.gz";
-      sha256 = "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j";
-    };
-  };
+  pytest_28 = callPackage ../development/python-modules/pytest/2_8.nix {};
 
-  pytest_30 = self.pytest_27.override rec {
-    name = "pytest-3.0.5";
+  pytest_29 = callPackage ../development/python-modules/pytest/2_9.nix {};
 
-    propagatedBuildInputs = with self; [ hypothesis py ];
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/p/pytest/${name}.tar.gz";
-      sha256 = "1z9pj39w0r2gw5hsqndlmsqa80kgbrann5kfma8ww8zhaslkl02a";
-    };
-  };
+  pytest_30 = callPackage ../development/python-modules/pytest {};
 
   pytestcache = buildPythonPackage rec {
     name = "pytest-cache-1.0";
@@ -5077,27 +5046,8 @@ in {
     };
   };
 
-  pytestdjango = buildPythonPackage rec {
-    name = "pytest-django-${version}";
-    version = "2.9.1";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/p/pytest-django/${name}.tar.gz";
-      sha256 = "1mmc7zsz3dlhs6sx4sppkj1vgshabi362r1a8b8wpj1qfximpqcb";
-    };
-
-    # doing this to allow depending packages to find
-    # pytest's binaries
-    pytest = self.pytest;
-
-    buildInputs = with self; [ pytest ];
-    propagatedBuildInputs = with self; [ django setuptools_scm_18 ];
-
-    meta = {
-      description = "py.test plugin for testing of Django applications";
-      homepage = http://pytest-django.readthedocs.org/en/latest/;
-      license = licenses.bsd3;
-    };
+  pytestdjango = callPackage ../development/python-modules/pytestdjango.nix {
+    pytest = self.pytest_30;
   };
 
   pytest-fixture-config = buildPythonPackage rec {
@@ -10424,27 +10374,8 @@ in {
     };
   };
 
-  django_guardian = buildPythonPackage rec {
-    name = "django-guardian-${version}";
-    version = "1.4.4";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/d/django-guardian/${name}.tar.gz";
-      sha256 = "1m7y3brk3697hr2cvkzl8dry4pp7wkmhvxmf8db1ardz1r9d8895";
-    };
-
-    buildInputs = with self ; [ pytest pytestrunner pytestdjango django_environ mock ];
-    propagatedBuildInputs = with self ; [ django six ];
-
-    checkPhase = ''
-      ${python.interpreter} nix_run_setup.py test --addopts="--ignore build"
-    '';
-
-    meta = {
-      description = "Per object permissions for Django";
-      homepage = https://github.com/django-guardian/django-guardian;
-      licenses = [ licenses.mit licenses.bsd2 ];
-    };
+  django_guardian = callPackage ../development/python-modules/django_guardian.nix {
+    pytest = self.pytest_30;
   };
 
   django_tagging = buildPythonPackage rec {
@@ -11778,14 +11709,21 @@ in {
   });
 
   foolscap = buildPythonPackage (rec {
-    name = "foolscap-0.10.1";
+    name = "foolscap-${version}";
+    version = "0.12.6";
 
     src = pkgs.fetchurl {
-      url = "http://foolscap.lothar.com/releases/${name}.tar.gz";
-      sha256 = "1wrnbdq3y3lfxnhx30yj9xbr3iy9512jb60k8qi1da1phalnwz5x";
+      url = "mirror://pypi/f/foolscap/${name}.tar.gz";
+      sha256 = "1bpmqq6485mmr5jza9q2c55l9m1bfsvsbd9drsip7p5qcsi22jrz";
     };
 
-    propagatedBuildInputs = [ self.twisted self.pyopenssl self.service-identity ];
+    propagatedBuildInputs = with self; [ mock twisted pyopenssl service-identity ];
+
+    checkPhase = ''
+      # Either uncomment this, or remove this custom check phase entirely, if
+      # you wish to do battle with the foolscap tests. ~ C.
+      # trial foolscap
+    '';
 
     meta = {
       homepage = http://foolscap.lothar.com/;
@@ -25264,9 +25202,11 @@ in {
     '';
 
     patchPhase = ''
-      substituteInPlace "scripts/syncthing-gtk" \
-              --replace "/usr/share" "$out/share"
-      substituteInPlace setup.py --replace "version = get_version()" "version = '${version}'"
+        substituteInPlace setup.py --replace "version = get_version()" "version = '${version}'"
+        substituteInPlace scripts/syncthing-gtk --replace "/usr/share" "$out/share"
+        substituteInPlace syncthing_gtk/app.py --replace "/usr/share" "$out/share"
+        substituteInPlace syncthing_gtk/wizard.py --replace "/usr/share" "$out/share"
+        substituteInPlace syncthing-gtk.desktop --replace "/usr/bin/syncthing-gtk" "$out/bin/syncthing-gtk"
     '';
 
     meta = {
@@ -26094,6 +26034,13 @@ in {
 
     propagatedBuildInputs = with self; [ zope_interface ];
 
+    # Patch t.p._inotify to point to libc. Without this,
+    # twisted.python.runtime.platform.supportsINotify() == False
+    patchPhase = optionalString stdenv.isLinux ''
+      substituteInPlace twisted/python/_inotify.py --replace \
+        "ctypes.util.find_library('c')" "'${stdenv.glibc.out}/lib/libc.so.6'"
+    '';
+
     # Generate Twisted's plug-in cache.  Twisted users must do it as well.  See
     # http://twistedmatrix.com/documents/current/core/howto/plugin.html#auto3
     # and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477103 for
diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix
index f582bcf3b323..f9382985fcd1 100644
--- a/pkgs/top-level/release-cross.nix
+++ b/pkgs/top-level/release-cross.nix
@@ -14,17 +14,17 @@ let
 
   /* Basic list of packages to cross-build */
   basicCrossDrv = {
-    gccCrossStageFinal = nativePlatforms;
-    bison.crossDrv = nativePlatforms;
-    busybox.crossDrv = nativePlatforms;
-    coreutils.crossDrv = nativePlatforms;
-    dropbear.crossDrv = nativePlatforms;
+    bison = nativePlatforms;
+    busybox = nativePlatforms;
+    coreutils = nativePlatforms;
+    dropbear = nativePlatforms;
   };
 
   /* Basic list of packages to be natively built,
      but need a crossSystem defined to get meaning */
   basicNativeDrv = {
-    gdbCross.nativeDrv = nativePlatforms;
+    buildPackages.gccCrossStageFinal = nativePlatforms;
+    buildPackages.gdbCross = nativePlatforms;
   };
 
   basic = basicCrossDrv // basicNativeDrv;
@@ -32,8 +32,10 @@ let
 in
 
 {
-  # These `nativeDrv`s should be identical to their vanilla ones --- cross
-  # compiling should not affect the native derivation.
+  # These derivations from a cross package set's `buildPackages` should be
+  # identical to their vanilla equivalents --- none of these package should
+  # observe the target platform which is the only difference between those
+  # package sets.
   ensureUnaffected = let
     # Absurd values are fine here, as we are not building anything. In fact,
     # there probably a good idea to try to be "more parametric" --- i.e. avoid
@@ -47,8 +49,12 @@ in
     # good idea lest there be some irrelevant pass-through debug attrs that
     # cause false negatives.
     testEqualOne = path: system: let
-      f = attrs: builtins.toString (lib.getAttrFromPath path (allPackages attrs));
-    in assert f { inherit system; } == f { inherit system crossSystem; }; true;
+      f = path: attrs: builtins.toString (lib.getAttrFromPath path (allPackages attrs));
+    in assert
+        f path { inherit system; }
+        ==
+        f (["buildPackages"] ++ path) { inherit system crossSystem; };
+      true;
 
     testEqual = path: systems: forAllSupportedSystems systems (testEqualOne path);
 
@@ -79,7 +85,7 @@ in
       openssl.system = "linux-generic32";
     };
   in mapTestOnCross crossSystem (basic // {
-    ubootSheevaplug.crossDrv = nativePlatforms;
+    ubootSheevaplug = nativePlatforms;
   });
 
 
@@ -92,14 +98,14 @@ in
       platform = {};
     };
   in mapTestOnCross crossSystem {
-    coreutils.crossDrv = nativePlatforms;
-    boehmgc.crossDrv = nativePlatforms;
-    gmp.crossDrv = nativePlatforms;
-    guile_1_8.crossDrv = nativePlatforms;
-    libffi.crossDrv = nativePlatforms;
-    libtool.crossDrv = nativePlatforms;
-    libunistring.crossDrv = nativePlatforms;
-    windows.wxMSW.crossDrv = nativePlatforms;
+    coreutils = nativePlatforms;
+    boehmgc = nativePlatforms;
+    gmp = nativePlatforms;
+    guile_1_8 = nativePlatforms;
+    libffi = nativePlatforms;
+    libtool = nativePlatforms;
+    libunistring = nativePlatforms;
+    windows.wxMSW = nativePlatforms;
   };
 
 
@@ -113,14 +119,14 @@ in
       platform = {};
     };
   in mapTestOnCross crossSystem {
-    coreutils.crossDrv = nativePlatforms;
-    boehmgc.crossDrv = nativePlatforms;
-    gmp.crossDrv = nativePlatforms;
-    guile_1_8.crossDrv = nativePlatforms;
-    libffi.crossDrv = nativePlatforms;
-    libtool.crossDrv = nativePlatforms;
-    libunistring.crossDrv = nativePlatforms;
-    windows.wxMSW.crossDrv = nativePlatforms;
+    coreutils = nativePlatforms;
+    boehmgc = nativePlatforms;
+    gmp = nativePlatforms;
+    guile_1_8 = nativePlatforms;
+    libffi = nativePlatforms;
+    libtool = nativePlatforms;
+    libunistring = nativePlatforms;
+    windows.wxMSW = nativePlatforms;
   };
 
 
@@ -150,9 +156,9 @@ in
       };
     };
   in mapTestOnCross crossSystem {
-    coreutils.crossDrv = nativePlatforms;
-    ed.crossDrv = nativePlatforms;
-    patch.crossDrv = nativePlatforms;
+    coreutils = nativePlatforms;
+    ed = nativePlatforms;
+    patch = nativePlatforms;
   };
 
 
@@ -176,16 +182,16 @@ in
       };
     };
   in mapTestOnCross crossSystem {
-    coreutils.crossDrv = nativePlatforms;
-    ed.crossDrv = nativePlatforms;
-    patch.crossDrv = nativePlatforms;
-    vim.crossDrv = nativePlatforms;
-    unzip.crossDrv = nativePlatforms;
-    ddrescue.crossDrv = nativePlatforms;
-    lynx.crossDrv = nativePlatforms;
-    patchelf.crossDrv = nativePlatforms;
-    binutils.crossDrv = nativePlatforms;
-    mpg123.crossDrv = nativePlatforms;
+    coreutils = nativePlatforms;
+    ed = nativePlatforms;
+    patch = nativePlatforms;
+    vim = nativePlatforms;
+    unzip = nativePlatforms;
+    ddrescue = nativePlatforms;
+    lynx = nativePlatforms;
+    patchelf = nativePlatforms;
+    buildPackages.binutils = nativePlatforms;
+    mpg123 = nativePlatforms;
   };
 
 
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index 2052957edd61..c301ceb1530d 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -67,13 +67,13 @@ let
               jobs.vim.x86_64-darwin
             ] ++ lib.collect lib.isDerivation jobs.stdenvBootstrapTools;
         };
-
+    } // (lib.optionalAttrs (builtins.elem "i686-linux" supportedSystems) {
       stdenvBootstrapTools.i686-linux =
         { inherit (import ../stdenv/linux/make-bootstrap-tools.nix { system = "i686-linux"; }) dist test; };
-
+    }) // (lib.optionalAttrs (builtins.elem "x86_64-linux" supportedSystems) {
       stdenvBootstrapTools.x86_64-linux =
         { inherit (import ../stdenv/linux/make-bootstrap-tools.nix { system = "x86_64-linux"; }) dist test; };
-
+    }) // (lib.optionalAttrs (builtins.elem "x86_64-darwin" supportedSystems) {
       stdenvBootstrapTools.x86_64-darwin =
         let
           bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix { system = "x86_64-darwin"; };
@@ -83,8 +83,7 @@ let
           # Test a full stdenv bootstrap from the bootstrap tools definition
           inherit (bootstrap.test-pkgs) stdenv;
         };
-
-    } // (mapTestOn ((packagePlatforms pkgs) // rec {
+    }) // (mapTestOn ((packagePlatforms pkgs) // rec {
       haskell.compiler = packagePlatforms pkgs.haskell.compiler;
       haskellPackages = packagePlatforms pkgs.haskellPackages;
 
diff --git a/pkgs/top-level/splice.nix b/pkgs/top-level/splice.nix
new file mode 100644
index 000000000000..a22587d5b576
--- /dev/null
+++ b/pkgs/top-level/splice.nix
@@ -0,0 +1,81 @@
+# The `splicedPackages' package set, and its use by `callPackage`
+#
+# The `buildPackages` pkg set is a new concept, and the vast majority package
+# expression (the other *.nix files) are not designed with it in mind. This
+# presents us with a problem with how to get the right version (build-time vs
+# run-time) of a package to a consumer that isn't used to thinking so cleverly.
+#
+# The solution is to splice the package sets together as we do below, so every
+# `callPackage`d expression in fact gets both versions. Each# derivation (and
+# each derivation's outputs) consists of the run-time version, augmented with a
+# `nativeDrv` field for the build-time version, and `crossDrv` field for the
+# run-time version.
+#
+# We could have used any names we want for the disambiguated versions, but
+# `crossDrv` and `nativeDrv` were somewhat similarly used for the old
+# cross-compiling infrastructure. The names are mostly invisible as
+# `mkDerivation` knows how to pull out the right ones for `buildDepends` and
+# friends, but a few packages use them directly, so it seemed efficient (to
+# @Ericson2314) to reuse those names, at least initially, to minimize breakage.
+#
+# For performance reasons, rather than uniformally splice in all cases, we only
+# do so when `pkgs` and `buildPackages` are distinct. The `actuallySplice`
+# parameter there the boolean value of that equality check.
+lib: pkgs: actuallySplice:
+
+let
+  defaultBuildScope = pkgs.buildPackages // pkgs.buildPackages.xorg;
+  # TODO(@Ericson2314): we shouldn't preclude run-time fetching by removing
+  # these attributes. We should have a more general solution for selecting
+  # whether `nativeDrv` or `crossDrv` is the default in `defaultScope`.
+  pkgsWithoutFetchers = lib.filterAttrs (n: _: !lib.hasPrefix "fetch" n) pkgs;
+  defaultRunScope = pkgsWithoutFetchers // pkgs.xorg;
+
+  splicer = buildPkgs: runPkgs: let
+    mash = buildPkgs // runPkgs;
+    merge = name: {
+      inherit name;
+      value = let
+        defaultValue = mash.${name};
+        buildValue = buildPkgs.${name} or {};
+        runValue = runPkgs.${name} or {};
+        augmentedValue = defaultValue
+          // (lib.optionalAttrs (buildPkgs ? ${name}) { nativeDrv = buildValue; })
+          // (lib.optionalAttrs (runPkgs ? ${name}) { crossDrv = runValue; });
+        # Get the set of outputs of a derivation
+        getOutputs = value:
+          lib.genAttrs (value.outputs or []) (output: value.${output});
+      in
+        # Certain *Cross derivations will fail assertions, but we need their
+        # nativeDrv. We are assuming anything that fails to evaluate is an
+        # attrset (including derivation) and thus can be unioned.
+        if !(builtins.tryEval defaultValue).success then augmentedValue
+        # The derivation along with its outputs, which we recur
+        # on to splice them together.
+        else if lib.isDerivation defaultValue then augmentedValue
+          // splicer (getOutputs buildValue) (getOutputs runValue)
+        # Just recur on plain attrsets
+        else if lib.isAttrs defaultValue then splicer buildValue runValue
+        # Don't be fancy about non-derivations. But we could have used used
+        # `__functor__` for functions instead.
+        else defaultValue;
+    };
+  in lib.listToAttrs (map merge (lib.attrNames mash));
+
+  splicedPackages =
+    if actuallySplice
+    then splicer defaultBuildScope defaultRunScope
+    else pkgs // pkgs.xorg;
+
+in
+
+{
+  # We use `callPackage' to be able to omit function arguments that can be
+  # obtained `pkgs` or `buildPackages` and their `xorg` package sets. Use
+  # `newScope' for sets of packages in `pkgs' (see e.g. `gnome' below).
+  callPackage = pkgs.newScope {};
+
+  callPackages = lib.callPackagesWith splicedPackages;
+
+  newScope = extra: lib.callPackageWith (splicedPackages // extra);
+}
diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix
index cbf65870eb7e..6febedb79f3d 100644
--- a/pkgs/top-level/stage.nix
+++ b/pkgs/top-level/stage.nix
@@ -9,8 +9,45 @@
    import `pkgs/default.nix` or `default.nix`. */
 
 
-{ # The system (e.g., `i686-linux') for which to build the packages.
-  system
+{ ## Misc parameters kept the same for all stages
+  ##
+
+  # Utility functions, could just import but passing in for efficiency
+  lib
+
+, # Use to reevaluate Nixpkgs; a dirty hack that should be removed
+  nixpkgsFun
+
+  ## Platform parameters
+  ##
+  ## The "build" "host" "target" terminology below comes from GNU Autotools. See
+  ## its documentation for more information on what those words mean. Note that
+  ## each should always be defined, even when not cross compiling.
+  ##
+  ## For purposes of bootstrapping, think of each stage as a "sliding window"
+  ## over a list of platforms. Specifically, the host platform of the previous
+  ## stage becomes the build platform of the current one, and likewise the
+  ## target platform of the previous stage becomes the host platform of the
+  ## current one.
+  ##
+
+, # The platform on which packages are built. Consists of `system`, a
+  # string (e.g.,`i686-linux') identifying the most import attributes of the
+  # build platform, and `platform` a set of other details.
+  buildPlatform
+
+, # The platform on which packages run.
+  hostPlatform
+
+, # The platform which build tools (especially compilers) build for in this stage,
+  targetPlatform
+
+  ## Other parameters
+  ##
+
+, # The package set used at build-time. If null, `buildPackages` will
+  # be defined internally as the produced package set as itself.
+  buildPackages
 
 , # The standard environment to use for building packages.
   stdenv
@@ -21,21 +58,19 @@
   allowCustomOverrides
 
 , # Non-GNU/Linux OSes are currently "impure" platforms, with their libc
-  # outside of the store.  Thus, GCC, GFortran, & co. must always look for
-  # files in standard system directories (/usr/include, etc.)
-  noSysDirs ? (system != "x86_64-freebsd" && system != "i686-freebsd"
-               && system != "x86_64-solaris"
-               && system != "x86_64-kfreebsd-gnu")
+  # outside of the store.  Thus, GCC, GFortran, & co. must always look for files
+  # in standard system directories (/usr/include, etc.)
+  noSysDirs ? buildPlatform.system != "x86_64-freebsd"
+           && buildPlatform.system != "i686-freebsd"
+           && buildPlatform.system != "x86_64-solaris"
+           && buildPlatform.system != "x86_64-kfreebsd-gnu"
 
 , # The configuration attribute set
   config
 
-, overlays # List of overlays to use in the fix-point.
-
-, crossSystem
-, platform
-, lib
-, nixpkgsFun
+, # A list of overlays (Additional `self: super: { .. }` customization
+  # functions) to be fixed together in the produced package set
+  overlays
 }:
 
 let
@@ -50,11 +85,28 @@ let
     };
 
   stdenvBootstappingAndPlatforms = self: super: {
-    stdenv = stdenv // { inherit platform; };
-    inherit
-      system platform crossSystem;
+    buildPackages = (if buildPackages == null then self else buildPackages)
+      // { recurseForDerivations = false; };
+    inherit stdenv
+      buildPlatform hostPlatform targetPlatform;
   };
 
+  # The old identifiers for cross-compiling. These should eventually be removed,
+  # and the packages that rely on them refactored accordingly.
+  platformCompat = self: super: let
+    # TODO(@Ericson2314) this causes infinite recursion
+    #inherit (self) buildPlatform hostPlatform targetPlatform;
+  in {
+    stdenv = super.stdenv // {
+      inherit (buildPlatform) platform;
+    } // lib.optionalAttrs (targetPlatform != buildPlatform) {
+      cross = targetPlatform;
+    };
+    inherit (buildPlatform) system platform;
+  };
+
+  splice = self: super: import ./splice.nix lib self (buildPackages != null);
+
   allPackages = self: super:
     let res = import ./all-packages.nix
       { inherit lib nixpkgsFun noSysDirs config; }
@@ -83,8 +135,10 @@ let
   # The complete chain of package set builders, applied from top to bottom
   toFix = lib.foldl' (lib.flip lib.extends) (self: {}) ([
     stdenvBootstappingAndPlatforms
+    platformCompat
     stdenvAdapters
     trivialBuilders
+    splice
     allPackages
     aliases
     stdenvOverrides