summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/stdenv.xml9
-rw-r--r--lib/maintainers.nix6
-rw-r--r--lib/trivial.nix23
-rw-r--r--nixos/doc/manual/release-notes/rl-1609.xml7
-rw-r--r--nixos/doc/manual/release-notes/rl-1703.xml9
-rw-r--r--nixos/modules/config/timezone.nix5
-rw-r--r--nixos/modules/hardware/video/amdgpu-pro.nix56
-rw-r--r--nixos/modules/module-list.nix7
-rw-r--r--nixos/modules/programs/vim.nix24
-rw-r--r--nixos/modules/rename.nix2
-rw-r--r--nixos/modules/services/misc/docker-registry.nix66
-rw-r--r--nixos/modules/services/misc/errbot.nix101
-rw-r--r--nixos/modules/services/misc/taskserver/default.nix2
-rw-r--r--nixos/modules/services/networking/ircd-hybrid/builder.sh4
-rw-r--r--nixos/modules/services/networking/smokeping.nix103
-rw-r--r--nixos/modules/services/web-apps/atlassian/confluence.nix141
-rw-r--r--nixos/modules/services/web-apps/atlassian/crowd.nix147
-rw-r--r--nixos/modules/services/web-apps/atlassian/jira.nix149
-rw-r--r--nixos/modules/services/x11/desktop-managers/lxqt.nix1
-rw-r--r--nixos/modules/services/x11/xserver.nix4
-rw-r--r--nixos/modules/system/boot/kernel.nix16
-rw-r--r--nixos/modules/tasks/network-interfaces-scripted.nix33
-rw-r--r--nixos/modules/tasks/network-interfaces.nix13
-rw-r--r--nixos/release.nix1
-rw-r--r--nixos/tests/containers-physical_interfaces.nix133
-rw-r--r--nixos/tests/docker-registry.nix45
-rw-r--r--nixos/tests/smokeping.nix4
-rw-r--r--pkgs/applications/audio/audacious/default.nix6
-rw-r--r--pkgs/applications/audio/clerk/default.nix32
-rw-r--r--pkgs/applications/audio/opusfile/default.nix5
-rw-r--r--pkgs/applications/editors/vscode/default.nix42
-rw-r--r--pkgs/applications/graphics/ImageMagick/default.nix4
-rw-r--r--pkgs/applications/graphics/PythonMagick/default.nix6
-rw-r--r--pkgs/applications/graphics/gimp/plugins/default.nix22
-rw-r--r--pkgs/applications/graphics/graphicsmagick/default.nix22
-rw-r--r--pkgs/applications/graphics/gthumb/default.nix10
-rw-r--r--pkgs/applications/graphics/rawtherapee/ReleaseInfo.cmake6
-rw-r--r--pkgs/applications/graphics/rawtherapee/default.nix4
-rw-r--r--pkgs/applications/graphics/rawtherapee/dev.nix6
-rw-r--r--pkgs/applications/graphics/rawtherapee/fix-glibmm-output.patch23
-rw-r--r--pkgs/applications/graphics/simple-scan/default.nix26
-rw-r--r--pkgs/applications/misc/hugo/default.nix14
-rw-r--r--pkgs/applications/misc/hugo/deps.nix35
-rw-r--r--pkgs/applications/misc/qtpass/default.nix12
-rw-r--r--pkgs/applications/misc/styx/default.nix5
-rw-r--r--pkgs/applications/misc/tasksh/default.nix6
-rw-r--r--pkgs/applications/misc/zk-shell/default.nix28
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix4
-rw-r--r--pkgs/applications/networking/cluster/kops/default.nix31
-rw-r--r--pkgs/applications/networking/cluster/terraform/default.nix4
-rw-r--r--pkgs/applications/networking/dropbox/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/franz/default.nix21
-rw-r--r--pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-facebook/default.nix36
-rw-r--r--pkgs/applications/networking/instant-messengers/rambox/default.nix23
-rw-r--r--pkgs/applications/networking/instant-messengers/slack/default.nix4
-rw-r--r--pkgs/applications/networking/mumble/default.nix4
-rw-r--r--pkgs/applications/office/scribus/default.nix4
-rw-r--r--pkgs/applications/version-management/git-and-tools/gitflow/default.nix4
-rw-r--r--pkgs/applications/version-management/gitlab-shell/default.nix4
-rw-r--r--pkgs/applications/version-management/gitlab/Gemfile4
-rw-r--r--pkgs/applications/version-management/gitlab/Gemfile.lock10
-rw-r--r--pkgs/applications/version-management/gitlab/default.nix4
-rw-r--r--pkgs/applications/version-management/gitlab/gemset.nix8
-rw-r--r--pkgs/applications/version-management/smartgithg/default.nix11
-rw-r--r--pkgs/applications/video/handbrake/default.nix6
-rw-r--r--pkgs/applications/virtualization/docker-distribution/default.nix23
-rw-r--r--pkgs/applications/virtualization/xen/4.5.0.nix79
-rw-r--r--pkgs/applications/virtualization/xen/4.5.nix (renamed from pkgs/applications/virtualization/xen/4.5.2.nix)28
-rw-r--r--pkgs/build-support/build-fhs-userenv/env.nix1
-rw-r--r--pkgs/build-support/docker/default.nix452
-rw-r--r--pkgs/build-support/docker/examples.nix108
-rw-r--r--pkgs/build-support/vm/default.nix26
-rw-r--r--pkgs/data/fonts/droid/default.nix2
-rw-r--r--pkgs/data/fonts/overpass/default.nix30
-rw-r--r--pkgs/data/fonts/roboto-mono/default.nix2
-rw-r--r--pkgs/data/fonts/roboto-slab/default.nix2
-rw-r--r--pkgs/data/icons/arc-icon-theme/default.nix6
-rw-r--r--pkgs/data/icons/elementary-icon-theme/default.nix25
-rw-r--r--pkgs/data/icons/faba-icon-theme/default.nix6
-rw-r--r--pkgs/data/icons/faba-mono-icons/default.nix2
-rw-r--r--pkgs/data/icons/maia-icon-theme/default.nix15
-rw-r--r--pkgs/data/icons/moka-icon-theme/default.nix8
-rw-r--r--pkgs/data/icons/numix-icon-theme-circle/default.nix6
-rw-r--r--pkgs/data/icons/numix-icon-theme/default.nix6
-rw-r--r--pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/builder.sh3
-rw-r--r--pkgs/desktops/enlightenment/enlightenment.nix20
-rw-r--r--pkgs/desktops/gnome-3/3.20/core/epiphany/default.nix3
-rw-r--r--pkgs/desktops/kde-5/plasma/fetch.sh2
-rw-r--r--pkgs/desktops/kde-5/plasma/srcs.nix320
-rw-r--r--pkgs/desktops/lxqt/default.nix1
-rw-r--r--pkgs/desktops/lxqt/optional/qps/default.nix45
-rw-r--r--pkgs/development/arduino/arduino-core/downloads.nix2
-rw-r--r--pkgs/development/compilers/ghcjs/default.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.7/llvm.nix12
-rw-r--r--pkgs/development/compilers/llvm/3.8/clang/default.nix2
-rw-r--r--pkgs/development/compilers/llvm/3.8/default.nix6
-rw-r--r--pkgs/development/compilers/llvm/3.8/libc++/default.nix2
-rw-r--r--pkgs/development/compilers/llvm/3.8/libc++abi.nix2
-rw-r--r--pkgs/development/compilers/llvm/3.8/lldb.nix9
-rw-r--r--pkgs/development/compilers/llvm/3.8/llvm.nix2
-rw-r--r--pkgs/development/compilers/pakcs/case-insensitive.patch19
-rw-r--r--pkgs/development/compilers/pakcs/default.nix7
-rw-r--r--pkgs/development/compilers/ponyc/pony-stable.nix26
-rw-r--r--pkgs/development/compilers/rust/bootstrap.nix10
-rw-r--r--pkgs/development/compilers/rust/default.nix14
-rw-r--r--pkgs/development/compilers/rust/rustc.nix3
-rw-r--r--pkgs/development/compilers/swi-prolog/default.nix19
-rw-r--r--pkgs/development/compilers/vala/0.23.nix30
-rw-r--r--pkgs/development/compilers/vala/0.26.nix30
-rw-r--r--pkgs/development/compilers/vala/0.28.nix30
-rw-r--r--pkgs/development/compilers/vala/0.32.nix31
-rw-r--r--pkgs/development/compilers/vala/default.nix61
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix2
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix1
-rw-r--r--pkgs/development/haskell-modules/configuration-ghcjs.nix1
-rw-r--r--pkgs/development/haskell-modules/configuration-hackage2nix.yaml85
-rw-r--r--pkgs/development/haskell-modules/hackage-packages.nix2357
-rw-r--r--pkgs/development/interpreters/mujs/default.nix6
-rw-r--r--pkgs/development/interpreters/php/default.nix2
-rw-r--r--pkgs/development/interpreters/python/cpython/3.6/default.nix4
-rw-r--r--pkgs/development/libraries/clutter-gst/default.nix4
-rw-r--r--pkgs/development/libraries/clutter-gtk/default.nix4
-rw-r--r--pkgs/development/libraries/fontconfig/default.nix10
-rw-r--r--pkgs/development/libraries/gdk-pixbuf/default.nix4
-rw-r--r--pkgs/development/libraries/glib/default.nix4
-rw-r--r--pkgs/development/libraries/gpgme/default.nix3
-rw-r--r--pkgs/development/libraries/gtkmm/2.x.nix6
-rw-r--r--pkgs/development/libraries/gtkmm/gtkmm-2.24.4-missing-operator.patch11
-rw-r--r--pkgs/development/libraries/gvfs/default.nix16
-rw-r--r--pkgs/development/libraries/jansson/default.nix4
-rw-r--r--pkgs/development/libraries/kde-frameworks/kcoreaddons.nix9
-rw-r--r--pkgs/development/libraries/libcaca/default.nix5
-rw-r--r--pkgs/development/libraries/libcue/default.nix19
-rw-r--r--pkgs/development/libraries/libdrm/default.nix4
-rw-r--r--pkgs/development/libraries/libdwarf/default.nix4
-rw-r--r--pkgs/development/libraries/libgee/0.8.nix27
-rw-r--r--pkgs/development/libraries/libhttpseverywhere/default.nix39
-rw-r--r--pkgs/development/libraries/libhttpseverywhere/meson.patch13
-rw-r--r--pkgs/development/libraries/libmikmod/default.nix4
-rw-r--r--pkgs/development/libraries/libmpcdec/default.nix7
-rw-r--r--pkgs/development/libraries/libsamplerate/default.nix8
-rw-r--r--pkgs/development/libraries/libsodium/default.nix4
-rw-r--r--pkgs/development/libraries/libsolv/default.nix4
-rw-r--r--pkgs/development/libraries/libsoup/default.nix6
-rw-r--r--pkgs/development/libraries/libuecc/default.nix24
-rw-r--r--pkgs/development/libraries/libunistring/default.nix2
-rw-r--r--pkgs/development/libraries/openssl/default.nix5
-rw-r--r--pkgs/development/libraries/pangomm/default.nix4
-rw-r--r--pkgs/development/libraries/quickder/default.nix38
-rw-r--r--pkgs/development/libraries/unixODBC/default.nix2
-rw-r--r--pkgs/development/libraries/uri/default.nix36
-rw-r--r--pkgs/development/libraries/vaapi-intel/default.nix4
-rw-r--r--pkgs/development/libraries/webkitgtk/2.14.nix2
-rw-r--r--pkgs/development/libraries/zeroc-ice/default.nix4
-rw-r--r--pkgs/development/mobile/androidenv/androidsdk.nix19
-rw-r--r--pkgs/development/mobile/androidenv/default.nix8
-rwxr-xr-xpkgs/development/mobile/androidenv/fetch.sh1
-rwxr-xr-xpkgs/development/mobile/androidenv/generate-sources.sh3
-rw-r--r--pkgs/development/mobile/androidenv/generate-sources.xsl52
-rw-r--r--pkgs/development/mobile/androidenv/sources.nix140
-rw-r--r--pkgs/development/ocaml-modules/expat/default.nix3
-rw-r--r--pkgs/development/ocaml-modules/gapi-ocaml/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix4
-rw-r--r--pkgs/development/ocaml-modules/lambda-term/1.6.nix4
-rw-r--r--pkgs/development/ocaml-modules/lambda-term/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/llvm/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/lwt/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/markup/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ocamlnet/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/react/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/tyxml/default.nix4
-rw-r--r--pkgs/development/r-modules/README.md24
-rw-r--r--pkgs/development/ruby-modules/bundler-env/default.nix72
-rw-r--r--pkgs/development/tools/asn2quickder/default.nix36
-rw-r--r--pkgs/development/tools/build-managers/bazel/default.nix91
-rw-r--r--pkgs/development/tools/build-managers/bazel/java_stub_template.patch16
-rw-r--r--pkgs/development/tools/build-managers/buildbot/default.nix22
-rw-r--r--pkgs/development/tools/build-managers/buildbot/plugins.nix28
-rw-r--r--pkgs/development/tools/build-managers/buildbot/worker.nix10
-rw-r--r--pkgs/development/tools/build-managers/meson/default.nix5
-rw-r--r--pkgs/development/tools/hexio/default.nix36
-rw-r--r--pkgs/development/tools/mdk/default.nix2
-rw-r--r--pkgs/development/tools/misc/gdb/default.nix7
-rw-r--r--pkgs/development/tools/misc/intel-gpu-tools/default.nix4
-rw-r--r--pkgs/development/tools/misc/intltool/default.nix2
-rw-r--r--pkgs/development/tools/misc/travis/default.nix25
-rw-r--r--pkgs/development/tools/ocaml/camlidl/default.nix4
-rw-r--r--pkgs/development/tools/ocaml/utop/default.nix6
-rw-r--r--pkgs/development/tools/valadoc/default.nix24
-rw-r--r--pkgs/development/tools/xcbuild/default.nix43
-rw-r--r--pkgs/development/web/nodejs/nodejs.nix5
-rw-r--r--pkgs/development/web/nodejs/v4.nix4
-rw-r--r--pkgs/development/web/nodejs/v6.nix12
-rw-r--r--pkgs/games/opentyrian/default.nix21
-rw-r--r--pkgs/misc/emulators/fs-uae/default.nix21
-rw-r--r--pkgs/misc/screensavers/xscreensaver/default.nix4
-rw-r--r--pkgs/misc/themes/arc/default.nix25
-rw-r--r--pkgs/misc/themes/vertex/default.nix31
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix37
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols285
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols106
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/default.nix155
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0001-add-OS-detection-for-arch.patch26
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch25
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0003-add-kcl_drm_gem_object_lookup.patch204
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0004-paging-changes-for-linux-4.6.patch42
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch48
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch29
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch29
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch25
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0009-disable-dal-by-default.patch25
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0010-remove-dependency-on-System.map.patch112
-rw-r--r--pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix2
-rw-r--r--pkgs/os-specific/linux/kernel/linux-grsecurity.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix6
-rw-r--r--pkgs/os-specific/linux/kmod/aggregator.nix4
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/365.35-kernel-4.7.patch40
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/default.nix16
-rw-r--r--pkgs/os-specific/linux/powertop/default.nix12
-rw-r--r--pkgs/servers/atlassian/confluence.nix35
-rw-r--r--pkgs/servers/atlassian/crowd.nix36
-rw-r--r--pkgs/servers/atlassian/jira.nix32
-rw-r--r--pkgs/servers/mail/postfix/default.nix4
-rw-r--r--pkgs/servers/monitoring/riemann-dash/default.nix22
-rw-r--r--pkgs/servers/sql/mariadb/default.nix4
-rw-r--r--pkgs/servers/x11/xorg/default.nix48
-rw-r--r--pkgs/servers/x11/xorg/tarballs-7.7.list16
-rw-r--r--pkgs/stdenv/darwin/default.nix12
-rw-r--r--pkgs/stdenv/darwin/make-bootstrap-tools.nix47
-rw-r--r--pkgs/stdenv/darwin/unpack-bootstrap-tools.sh39
-rw-r--r--pkgs/stdenv/generic/setup.sh12
-rw-r--r--pkgs/tools/backup/rdup/default.nix2
-rw-r--r--pkgs/tools/bluetooth/blueman/default.nix5
-rw-r--r--pkgs/tools/compression/lhasa/default.nix21
-rw-r--r--pkgs/tools/filesystems/afpfs-ng/default.nix24
-rw-r--r--pkgs/tools/filesystems/zfstools/default.nix4
-rw-r--r--pkgs/tools/misc/fluentd/default.nix8
-rw-r--r--pkgs/tools/misc/lolcat/default.nix8
-rw-r--r--pkgs/tools/misc/man-db/default.nix17
-rw-r--r--pkgs/tools/misc/mysqltuner/default.nix27
-rw-r--r--pkgs/tools/misc/ostree/default.nix17
-rw-r--r--pkgs/tools/misc/rpm-ostree/default.nix49
-rw-r--r--pkgs/tools/misc/svtplay-dl/default.nix4
-rw-r--r--pkgs/tools/misc/tmuxp/default.nix9
-rw-r--r--pkgs/tools/misc/youtube-dl/default.nix4
-rw-r--r--pkgs/tools/networking/fastd/default.nix26
-rw-r--r--pkgs/tools/networking/linkchecker/default.nix16
-rw-r--r--pkgs/tools/networking/linkchecker/no-version-check.patch14
-rw-r--r--pkgs/tools/networking/modemmanager/default.nix10
-rw-r--r--pkgs/tools/networking/network-manager-applet/default.nix7
-rw-r--r--pkgs/tools/networking/network-manager/default.nix4
-rw-r--r--pkgs/tools/networking/network-manager/openconnect.nix5
-rw-r--r--pkgs/tools/networking/network-manager/openvpn.nix7
-rw-r--r--pkgs/tools/networking/network-manager/pptp.nix7
-rw-r--r--pkgs/tools/networking/network-manager/vpnc.nix7
-rw-r--r--pkgs/tools/networking/openssh/RH-1380296-NEWKEYS-null-pointer-deref.patch37
-rw-r--r--pkgs/tools/networking/openssh/default.nix1
-rw-r--r--pkgs/tools/networking/sshpass/default.nix8
-rw-r--r--pkgs/tools/networking/tinc/default.nix4
-rw-r--r--pkgs/tools/package-management/fpm/default.nix8
-rw-r--r--pkgs/tools/package-management/libhif/default.nix36
-rw-r--r--pkgs/tools/security/enpass/data.json12
-rw-r--r--pkgs/tools/security/enpass/default.nix106
-rw-r--r--pkgs/tools/security/enpass/update_script.py95
-rw-r--r--pkgs/tools/system/foreman/default.nix25
-rw-r--r--pkgs/tools/system/hiera-eyaml/default.nix23
-rw-r--r--pkgs/tools/system/netdata/default.nix15
-rw-r--r--pkgs/tools/system/netdata/web_access.patch19
-rw-r--r--pkgs/tools/text/shfmt/default.nix6
-rw-r--r--pkgs/tools/typesetting/asciidoctor/default.nix14
-rw-r--r--pkgs/tools/typesetting/tex/nix/animatedot.sh2
-rw-r--r--pkgs/tools/typesetting/tex/nix/default.nix2
-rw-r--r--pkgs/tools/typesetting/tex/nix/dot2pdf.sh2
-rw-r--r--pkgs/tools/typesetting/tex/nix/dot2ps.sh2
-rw-r--r--pkgs/tools/typesetting/tex/nix/lhs2tex.sh2
-rw-r--r--pkgs/tools/typesetting/tex/nix/run-latex.sh4
-rw-r--r--pkgs/top-level/all-packages.nix142
-rw-r--r--pkgs/top-level/make-tarball.nix5
-rw-r--r--pkgs/top-level/php-packages.nix17
-rw-r--r--pkgs/top-level/python-packages.nix52
-rw-r--r--pkgs/top-level/release.nix5
281 files changed, 6633 insertions, 2646 deletions
diff --git a/doc/stdenv.xml b/doc/stdenv.xml
index 2e88d6b41548..68441ea9393a 100644
--- a/doc/stdenv.xml
+++ b/doc/stdenv.xml
@@ -1231,13 +1231,12 @@ echo @foo@
     <term><function>stripHash</function>
     <replaceable>path</replaceable></term>
     <listitem><para>Strips the directory and hash part of a store
-    path, storing the name part in the environment variable
-    <literal>strippedName</literal>. For example:
+    path, outputting the name part to <literal>stdout</literal>.
+    For example:
     
 <programlisting>
-stripHash "/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
 # prints coreutils-8.24
-echo $strippedName
+stripHash "/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
 </programlisting>
 
     If you wish to store the result in another variable, then the
@@ -1245,7 +1244,7 @@ echo $strippedName
     
 <programlisting>
 name="/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
-someVar=$(stripHash $name; echo $strippedName)
+someVar=$(stripHash $name)
 </programlisting>
 
     </para></listitem>
diff --git a/lib/maintainers.nix b/lib/maintainers.nix
index c4644f0c2e0d..79f50a94a072 100644
--- a/lib/maintainers.nix
+++ b/lib/maintainers.nix
@@ -95,6 +95,7 @@
   codyopel = "Cody Opel <codyopel@gmail.com>";
   colemickens = "Cole Mickens <cole.mickens@gmail.com>";
   copumpkin = "Dan Peebles <pumpkingod@gmail.com>";
+  corngood = "David McFarland <corngood@gmail.com>";
   coroa = "Jonas Hörsch <jonas@chaoflow.net>";
   couchemar = "Andrey Pavlov <couchemar@yandex.ru>";
   cransom = "Casey Ransom <cransom@hubns.net>";
@@ -107,6 +108,7 @@
   danbst = "Danylo Hlynskyi <abcz2.uprola@gmail.com>";
   davidak = "David Kleuker <post@davidak.de>";
   davidrusu = "David Rusu <davidrusu.me@gmail.com>";
+  davorb = "Davor Babic <davor@davor.se>";
   dbohdan = "Danyil Bohdan <danyil.bohdan@gmail.com>";
   dbrock = "Daniel Brockman <daniel@brockman.se>";
   deepfire = "Kosyrev Serge <_deepfire@feelingofgreen.ru>";
@@ -117,6 +119,7 @@
   dezgeg = "Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>";
   dfoxfranke = "Daniel Fox Franke <dfoxfranke@gmail.com>";
   dgonyeo = "Derek Gonyeo <derek@gonyeo.com>";
+  dipinhora = "Dipin Hora <dipinhora+github@gmail.com>";
   dmalikov = "Dmitry Malikov <malikov.d.y@gmail.com>";
   dochang = "Desmond O. Chang <dochang@gmail.com>";
   doublec = "Chris Double <chris.double@double.co.nz>";
@@ -240,7 +243,7 @@
   lucas8 = "Luc Chabassier <luc.linux@mailoo.org>";
   ludo = "Ludovic Courtès <ludo@gnu.org>";
   luispedro = "Luis Pedro Coelho <luis@luispedro.org>";
-  lukasepple = "Lukas Epple <post@lukasepple.de>";
+  sternenseemann = "Lukas Epple <post@lukasepple.de>";
   lukego = "Luke Gorrie <luke@snabb.co>";
   lw = "Sergey Sofeychuk <lw@fmap.me>";
   madjar = "Georges Dubus <georges.dubus@compiletoi.net>";
@@ -368,6 +371,7 @@
   roblabla = "Robin Lambertz <robinlambertz+dev@gmail.com>";
   roconnor = "Russell O'Connor <roconnor@theorem.ca>";
   romildo = "José Romildo Malaquias <malaquias@gmail.com>";
+  ronny = "Ronny Pfannschmidt <nixos@ronnypfannschmidt.de>";
   rszibele = "Richard Szibele <richard_szibele@hotmail.com>";
   rushmorem = "Rushmore Mushambi <rushmore@webenchanter.com>";
   rvl = "Rodney Lorrimar <dev+nix@rodney.id.au>";
diff --git a/lib/trivial.nix b/lib/trivial.nix
index 3e606f0df48f..dac8b8d0106d 100644
--- a/lib/trivial.nix
+++ b/lib/trivial.nix
@@ -53,6 +53,27 @@ rec {
   # argument, but it's nice this way if several uses of `extends` are cascaded.
   extends = f: rattrs: self: let super = rattrs self; in super // f self super;
 
+  # Create an overridable, recursive attribute set. For example:
+  #
+  #     nix-repl> obj = makeExtensible (self: { })
+  #
+  #     nix-repl> obj
+  #     { __unfix__ = «lambda»; extend = «lambda»; }
+  #
+  #     nix-repl> obj = obj.extend (self: super: { foo = "foo"; })
+  #
+  #     nix-repl> obj
+  #     { __unfix__ = «lambda»; extend = «lambda»; foo = "foo"; }
+  #
+  #     nix-repl> obj = obj.extend (self: super: { foo = super.foo + " + "; bar = "bar"; foobar = self.foo + self.bar; })
+  #
+  #     nix-repl> obj
+  #     { __unfix__ = «lambda»; bar = "bar"; extend = «lambda»; foo = "foo + "; foobar = "foo + bar"; }
+  makeExtensible = rattrs:
+    fix' rattrs // {
+      extend = f: makeExtensible (extends f rattrs);
+   };
+
   # Flip the order of the arguments of a binary function.
   flip = f: a: b: f b a;
 
@@ -114,6 +135,6 @@ rec {
   warn = msg: builtins.trace "WARNING: ${msg}";
   info = msg: builtins.trace "INFO: ${msg}";
 
-  fetchMD5warn = name: context : data : warn
+  fetchMD5warn = name: context : data : info
     "Deprecated use of MD5 hash in ${name} to fetch ${context}" data;
 }
diff --git a/nixos/doc/manual/release-notes/rl-1609.xml b/nixos/doc/manual/release-notes/rl-1609.xml
index 56d08bf1c2d6..18b9a333e233 100644
--- a/nixos/doc/manual/release-notes/rl-1609.xml
+++ b/nixos/doc/manual/release-notes/rl-1609.xml
@@ -165,6 +165,13 @@ following incompatible changes:</para>
     </para>
   </listitem>
 
+  <listitem>
+    <para>PHP now scans for extra configuration .ini files in /etc/php.d
+    instead of /etc. This prevents accidentally loading non-PHP .ini files
+    that may be in /etc.
+    </para>
+  </listitem>
+
 </itemizedlist>
 
 
diff --git a/nixos/doc/manual/release-notes/rl-1703.xml b/nixos/doc/manual/release-notes/rl-1703.xml
index c1107977db79..21cea77f8768 100644
--- a/nixos/doc/manual/release-notes/rl-1703.xml
+++ b/nixos/doc/manual/release-notes/rl-1703.xml
@@ -52,6 +52,15 @@ following incompatible changes:</para>
       but will need to start that process from gdb (so it is a child).
     </para>
   </listitem>
+
+  <listitem>
+    <para>
+      The <literal>stripHash</literal> bash function in <literal>stdenv</literal>
+      changed according to its documentation; it now outputs the stripped name to
+      <literal>stdout</literal> instead of putting it in the variable
+      <literal>strippedName</literal>.
+    </para>
+  </listitem>
 </itemizedlist>
 
 
diff --git a/nixos/modules/config/timezone.nix b/nixos/modules/config/timezone.nix
index b9844b4adade..39a45042c6cc 100644
--- a/nixos/modules/config/timezone.nix
+++ b/nixos/modules/config/timezone.nix
@@ -37,14 +37,15 @@ in
 
     environment.sessionVariables.TZDIR = "/etc/zoneinfo";
 
+    # This way services are restarted when tzdata changes.
     systemd.globalEnvironment.TZDIR = tzdir;
 
     environment.etc.localtime =
-      { source = "${tzdir}/${config.time.timeZone}";
+      { source = "/etc/zoneinfo/${config.time.timeZone}";
         mode = "direct-symlink";
       };
 
-    environment.etc.zoneinfo.source = "${pkgs.tzdata}/share/zoneinfo";
+    environment.etc.zoneinfo.source = tzdir;
 
   };
 
diff --git a/nixos/modules/hardware/video/amdgpu-pro.nix b/nixos/modules/hardware/video/amdgpu-pro.nix
new file mode 100644
index 000000000000..3723d7690dc6
--- /dev/null
+++ b/nixos/modules/hardware/video/amdgpu-pro.nix
@@ -0,0 +1,56 @@
+# This module provides the proprietary AMDGPU-PRO drivers.
+
+{ config, lib, pkgs, pkgs_i686, ... }:
+
+with lib;
+
+let
+
+  drivers = config.services.xserver.videoDrivers;
+
+  enabled = elem "amdgpu-pro" drivers;
+
+  package = config.boot.kernelPackages.amdgpu-pro;
+  package32 = pkgs_i686.linuxPackages.amdgpu-pro.override { libsOnly = true; kernel = null; };
+
+  opengl = config.hardware.opengl;
+
+in
+
+{
+
+  config = mkIf enabled {
+
+    services.xserver.drivers = singleton
+      { name = "amdgpu"; modules = [ package ]; libPath = [ package ]; };
+
+    hardware.opengl.package = package;
+    hardware.opengl.package32 = package32;
+
+    boot.extraModulePackages = [ package ];
+
+    boot.blacklistedKernelModules = [ "radeon" ];
+
+    hardware.firmware = [ package ];
+
+    system.activationScripts.setup-amdgpu-pro = ''
+      mkdir -p /run/lib
+      ln -sfn ${package}/lib ${package.libCompatDir}
+    '' + optionalString opengl.driSupport32Bit ''
+      ln -sfn ${package32}/lib ${package32.libCompatDir}
+    '';
+
+    environment.etc = {
+      "amd/amdrc".source = package + "/etc/amd/amdrc";
+      "amd/amdapfxx.blb".source = package + "/etc/amd/amdapfxx.blb";
+      "gbm/gbm.conf".source = package + "/etc/gbm/gbm.conf";
+      "OpenCL/vendors/amdocl64.icd".source = package + "/etc/OpenCL/vendors/amdocl64.icd";
+      "vulkan/icd.d/amd_icd64.json".source = package + "/etc/vulkan/icd.d/amd_icd64.json";
+    } // optionalAttrs opengl.driSupport32Bit {
+      "OpenCL/vendors/amdocl32.icd".source = package32 + "/etc/OpenCL/vendors/amdocl32.icd";
+      "vulkan/icd.d/amd_icd32.json".source = package32 + "/etc/vulkan/icd.d/amd_icd32.json";
+    };
+
+  };
+
+}
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 26e5d625848d..403f326df3de 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -38,6 +38,7 @@
   ./hardware/opengl.nix
   ./hardware/pcmcia.nix
   ./hardware/video/amdgpu.nix
+  ./hardware/video/amdgpu-pro.nix
   ./hardware/video/ati.nix
   ./hardware/video/bumblebee.nix
   ./hardware/video/displaylink.nix
@@ -84,6 +85,7 @@
   ./programs/ssmtp.nix
   ./programs/tmux.nix
   ./programs/venus.nix
+  ./programs/vim.nix
   ./programs/wvdial.nix
   ./programs/xfs_quota.nix
   ./programs/xonsh.nix
@@ -234,7 +236,9 @@
   ./services/misc/dictd.nix
   ./services/misc/dysnomia.nix
   ./services/misc/disnix.nix
+  ./services/misc/docker-registry.nix
   ./services/misc/emby.nix
+  ./services/misc/errbot.nix
   ./services/misc/etcd.nix
   ./services/misc/felix.nix
   ./services/misc/folding-at-home.nix
@@ -480,6 +484,9 @@
   ./services/ttys/agetty.nix
   ./services/ttys/gpm.nix
   ./services/ttys/kmscon.nix
+  ./services/web-apps/atlassian/confluence.nix
+  ./services/web-apps/atlassian/crowd.nix
+  ./services/web-apps/atlassian/jira.nix
   ./services/web-apps/mattermost.nix
   ./services/web-apps/nixbot.nix
   ./services/web-apps/pump.io.nix
diff --git a/nixos/modules/programs/vim.nix b/nixos/modules/programs/vim.nix
new file mode 100644
index 000000000000..8476c1accd31
--- /dev/null
+++ b/nixos/modules/programs/vim.nix
@@ -0,0 +1,24 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.programs.vim;
+in {
+  options.programs.vim = {
+    defaultEditor = mkOption {
+      type = types.bool;
+      default = false;
+      example = true;
+      description = ''
+        When enabled, installs vim and configures vim to be the default editor
+        using the EDITOR environment variable.
+      '';
+    };
+  };
+
+  config = mkIf cfg.defaultEditor {
+        environment.systemPackages = [ pkgs.vim ];
+        environment.variables = { EDITOR = mkOverride 900 "vim"; };
+  };
+}
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 9abe7d450c93..44e07f4618de 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -156,7 +156,5 @@ with lib;
       "See the 16.09 release notes for more information.")
     (mkRemovedOptionModule [ "services" "phpfpm" "phpIni" ] "")
     (mkRemovedOptionModule [ "services" "dovecot2" "package" ] "")
-    (mkRemovedOptionModule [ "services" "dockerRegistry" ]
-      "docker-registry has been deprecated upstream since a long time.")
   ];
 }
diff --git a/nixos/modules/services/misc/docker-registry.nix b/nixos/modules/services/misc/docker-registry.nix
new file mode 100644
index 000000000000..96ac2a1cf2c9
--- /dev/null
+++ b/nixos/modules/services/misc/docker-registry.nix
@@ -0,0 +1,66 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.services.dockerRegistry;
+
+in {
+  options.services.dockerRegistry = {
+    enable = mkEnableOption "Docker Registry";
+
+    listenAddress = mkOption {
+      description = "Docker registry host or ip to bind to.";
+      default = "127.0.0.1";
+      type = types.str;
+    };
+
+    port = mkOption {
+      description = "Docker registry port to bind to.";
+      default = 5000;
+      type = types.int;
+    };
+
+    storagePath = mkOption {
+      type = types.path;
+      default = "/var/lib/docker-registry";
+      description = "Docker registry storage path.";
+    };
+
+    extraConfig = mkOption {
+      description = ''
+        Docker extra registry configuration via environment variables.
+      '';
+      default = {};
+      type = types.attrsOf types.str;
+    };
+  };
+
+  config = mkIf cfg.enable {
+    systemd.services.docker-registry = {
+      description = "Docker Container Registry";
+      wantedBy = [ "multi-user.target" ];
+      after = [ "network.target" ];
+
+      environment = {
+        REGISTRY_HTTP_ADDR = "${cfg.listenAddress}:${toString cfg.port}";
+        REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY = cfg.storagePath;
+      } // cfg.extraConfig;
+
+      script = ''
+        ${pkgs.docker-distribution}/bin/registry serve \
+          ${pkgs.docker-distribution.out}/share/go/src/github.com/docker/distribution/cmd/registry/config-example.yml
+      '';
+
+      serviceConfig = {
+        User = "docker-registry";
+        WorkingDirectory = cfg.storagePath;
+      };
+    };
+
+    users.extraUsers.docker-registry = {
+      createHome = true;
+      home = cfg.storagePath;
+    };
+  };
+}
diff --git a/nixos/modules/services/misc/errbot.nix b/nixos/modules/services/misc/errbot.nix
new file mode 100644
index 000000000000..f573be69925c
--- /dev/null
+++ b/nixos/modules/services/misc/errbot.nix
@@ -0,0 +1,101 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.services.errbot;
+  pluginEnv = plugins: pkgs.buildEnv {
+    name = "errbot-plugins";
+    paths = plugins;
+  };
+  mkConfigFile = instanceCfg: dataDir: pkgs.writeText "errbot-config.py" ''
+    import logging
+    BACKEND = '${instanceCfg.backend}'
+    BOT_DATA_DIR = '${dataDir}'
+    BOT_EXTRA_PLUGIN_DIR = '${pluginEnv instanceCfg.plugins}'
+
+    BOT_LOG_LEVEL = logging.${instanceCfg.logLevel}
+    BOT_LOG_FILE = False
+
+    BOT_ADMINS = (${concatMapStringsSep "," (name: "'${name}'") instanceCfg.admins})
+
+    BOT_IDENTITY = ${builtins.toJSON instanceCfg.identity}
+
+    ${instanceCfg.extraConfig}
+  '';
+in {
+  options = {
+    services.errbot.instances = mkOption {
+      default = {};
+      description = "Errbot instance configs";
+      type = types.attrsOf (types.submodule {
+        options = {
+          dataDir = mkOption {
+            type = types.nullOr types.path;
+            default = null;
+            description = "Data directory for errbot instance.";
+          };
+
+          plugins = mkOption {
+            type = types.listOf types.package;
+            default = [];
+            description = "List of errbot plugin derivations.";
+          };
+
+          logLevel = mkOption {
+            type = types.str;
+            default = "INFO";
+            description = "Errbot log level";
+          };
+
+          admins = mkOption {
+            type = types.listOf types.str;
+            default = [];
+            description = "List of identifiers of errbot admins.";
+          };
+
+          backend = mkOption {
+            type = types.str;
+            default = "XMPP";
+            description = "Errbot backend name.";
+          };
+
+          identity = mkOption {
+            type = types.attrs;
+            description = "Errbot identity configuration";
+          };
+
+          extraConfig = mkOption {
+            type = types.lines;
+            default = "";
+            description = "String to be appended to the config verbatim";
+          };
+        };
+      });
+    };
+  };
+
+  config = mkIf (cfg.instances != {}) {
+    users.extraUsers.errbot.group = "errbot";
+    users.extraGroups.errbot = {};
+
+    systemd.services = mapAttrs' (name: instanceCfg: nameValuePair "errbot-${name}" (
+    let
+      dataDir = if !isNull instanceCfg.dataDir then instanceCfg.dataDir else
+        "/var/lib/errbot/${name}";
+    in {
+      after = [ "network.target" ];
+      wantedBy = [ "multi-user.target" ];
+      preStart = ''
+        mkdir -p ${dataDir}
+        chown -R errbot:errbot ${dataDir}
+      '';
+      serviceConfig = {
+        User = "errbot";
+        Restart = "on-failure";
+        ExecStart = "${pkgs.errbot}/bin/errbot -c ${mkConfigFile instanceCfg dataDir}";
+        PermissionsStartOnly = true;
+      };
+    })) cfg.instances;
+  };
+}
diff --git a/nixos/modules/services/misc/taskserver/default.nix b/nixos/modules/services/misc/taskserver/default.nix
index 6d458feec345..233c47684b7d 100644
--- a/nixos/modules/services/misc/taskserver/default.nix
+++ b/nixos/modules/services/misc/taskserver/default.nix
@@ -154,7 +154,7 @@ let
 
   certtool = "${pkgs.gnutls.bin}/bin/certtool";
 
-  nixos-taskserver = pkgs.buildPythonPackage {
+  nixos-taskserver = pkgs.pythonPackages.buildPythonPackage {
     name = "nixos-taskserver";
     namePrefix = "";
 
diff --git a/nixos/modules/services/networking/ircd-hybrid/builder.sh b/nixos/modules/services/networking/ircd-hybrid/builder.sh
index f2c92878a4dc..38312210df25 100644
--- a/nixos/modules/services/networking/ircd-hybrid/builder.sh
+++ b/nixos/modules/services/networking/ircd-hybrid/builder.sh
@@ -12,7 +12,7 @@ for i in $scripts; do
     if test "$(echo $i | cut -c1-2)" = "=>"; then
         subDir=$(echo $i | cut -c3-)
     else
-        dst=$out/$subDir/$((stripHash $i; echo $strippedName) | sed 's/\.in//')
+        dst=$out/$subDir/$(stripHash $i | sed 's/\.in//')
         doSub $i $dst
         chmod +x $dst # !!!
     fi
@@ -23,7 +23,7 @@ for i in $substFiles; do
     if test "$(echo $i | cut -c1-2)" = "=>"; then
         subDir=$(echo $i | cut -c3-)
     else
-        dst=$out/$subDir/$((stripHash $i; echo $strippedName) | sed 's/\.in//')
+        dst=$out/$subDir/$(stripHash $i | sed 's/\.in//')
         doSub $i $dst
     fi
 done
diff --git a/nixos/modules/services/networking/smokeping.nix b/nixos/modules/services/networking/smokeping.nix
index f7a5926dc64b..cc373ae892ac 100644
--- a/nixos/modules/services/networking/smokeping.nix
+++ b/nixos/modules/services/networking/smokeping.nix
@@ -6,31 +6,39 @@ let
   cfg = config.services.smokeping;
   smokepingHome = "/var/lib/smokeping";
   smokepingPidDir = "/run";
-  configFile = ''
-    *** General ***
-    owner = ${cfg.owner}
-    contact = ${cfg.ownerEmail}
-    mailhost = ${cfg.mailHost}
-    #sendmail = /var/setuid-wrappers/sendmail
-    imgcache = ${smokepingHome}/cache
-    imgurl   = http://${cfg.hostName}:${builtins.toString cfg.port}/cache
-    datadir  = ${smokepingHome}/data
-    piddir  = ${smokepingPidDir}
-    cgiurl   = http://${cfg.hostName}:${builtins.toString cfg.port}/smokeping.cgi
-    smokemail = ${cfg.smokeMailTemplate}
-    *** Presentation ***
-    template = ${cfg.presentationTemplate}
-    ${cfg.presentationConfig}
-    #*** Alerts ***
-    #${cfg.alertConfig}
-    *** Database ***
-    ${cfg.databaseConfig}
-    *** Probes ***
-    ${cfg.probeConfig}
-    *** Targets ***
-    ${cfg.targetConfig}
-    ${cfg.extraConfig}
-  '';
+  configFile =
+    if cfg.config == null
+      then
+        ''
+          *** General ***
+          owner = ${cfg.owner}
+          contact = ${cfg.ownerEmail}
+          ${lib.optionalString (cfg.mailHost != "") "mailhost = ${cfg.mailHost}"}
+          ${lib.optionalString (cfg.sendmail != null) "sendmail = ${cfg.sendmail}"}
+          imgcache = ${smokepingHome}/cache
+          imgurl   = http://${cfg.hostName}:${builtins.toString cfg.port}/cache
+          datadir  = ${smokepingHome}/data
+          pagedir = ${smokepingHome}/cache
+          piddir  = ${smokepingPidDir}
+          cgiurl   = http://${cfg.hostName}:${builtins.toString cfg.port}/smokeping.cgi
+          linkstyle = ${cfg.linkStyle}
+          smokemail = ${cfg.smokeMailTemplate}
+          *** Presentation ***
+          template = ${cfg.presentationTemplate}
+          ${cfg.presentationConfig}
+          *** Alerts ***
+          ${cfg.alertConfig}
+          *** Database ***
+          ${cfg.databaseConfig}
+          *** Probes ***
+          ${cfg.probeConfig}
+          *** Targets ***
+          ${cfg.targetConfig}
+          ${cfg.extraConfig}
+        ''
+      else
+        cfg.config;
+
   configPath = pkgs.writeText "smokeping.conf" configFile;
   cgiHome = pkgs.writeScript "smokeping.fcgi" ''
     #!${pkgs.bash}/bin/bash
@@ -59,8 +67,15 @@ in
       };
       mailHost = mkOption {
         type = types.string;
-        default = "127.0.0.1";
-        description = "Use this SMTP server rather than localhost";
+        default = "";
+        example = "localhost";
+        description = "Use this SMTP server to send alerts";
+      };
+      sendmail = mkOption {
+        type = types.nullOr types.path;
+        default = null;
+        example = "/var/setuid-wrappers/sendmail";
+        description = "Use this sendmail compatible script to deliver alerts";
       };
       smokeMailTemplate = mkOption {
         type = types.string;
@@ -71,6 +86,7 @@ in
       package = mkOption {
         type = types.package;
         default = pkgs.smokeping;
+        defaultText = "pkgs.smokeping";
         description = "Specify a custom smokeping package";
       };
       owner = mkOption {
@@ -85,6 +101,12 @@ in
         example = "somewhere.example.com";
         description = "DNS name for the urls generated in the cgi.";
       };
+      linkStyle = mkOption {
+        type = types.enum ["original" "absolute" "relative"];
+        default = "relative";
+        example = "absolute";
+        description = "DNS name for the urls generated in the cgi.";
+      };
       port = mkOption {
         type = types.int;
         default = 8081;
@@ -132,7 +154,10 @@ in
       };
       alertConfig = mkOption {
         type = types.string;
-        default = "";
+        default = ''
+          to = root@localhost
+          from = smokeping@localhost
+        '';
         example = literalExample ''
           to = alertee@address.somewhere
           from = smokealert@company.xy
@@ -223,12 +248,26 @@ in
         default = "";
         description = "Any additional customization not already included.";
       };
+      config = mkOption {
+        type = types.nullOr types.string;
+        default = null;
+        description = "Full smokeping config supplied by the user. Overrides " +
+          "and replaces any other configuration supplied.";
+      };
 
     };
 
   };
 
   config = mkIf cfg.enable {
+    assertions = [
+      {
+        assertion = !(cfg.sendmail != null && cfg.mailHost != "");
+        message = "services.smokeping: sendmail and Mailhost cannot both be enabled.";
+      }
+    ];
+    security.setuidPrograms = [ "fping" ];
+    environment.systemPackages = [ pkgs.fping ];
     users.extraUsers = singleton {
       name = cfg.user;
       isNormalUser = false;
@@ -243,9 +282,12 @@ in
       serviceConfig.PermissionsStartOnly = true;
       preStart = ''
         mkdir -m 0755 -p ${smokepingHome}/cache ${smokepingHome}/data
+        rm -f ${smokepingHome}/cropper
+        ln -s ${cfg.package}/htdocs/cropper ${smokepingHome}/cropper
         chown -R ${cfg.user} ${smokepingHome}
         cp ${cgiHome} ${smokepingHome}/smokeping.fcgi
         ${cfg.package}/bin/smokeping --check --config=${configPath}
+        ${cfg.package}/bin/smokeping --static --config=${configPath}
       '';
       script = ''${cfg.package}/bin/smokeping --config=${configPath} --nodaemon'';
     };
@@ -253,8 +295,9 @@ in
       wantedBy = [ "multi-user.target"];
       requires = [ "smokeping.service"];
       partOf = [ "smokeping.service"];
-      path = with pkgs; [ bash rrdtool smokeping ];
-      script = ''${pkgs.thttpd}/bin/thttpd -u ${cfg.user} -c "**.fcgi" -d ${smokepingHome} -p ${builtins.toString cfg.port} -D'';
+      path = with pkgs; [ bash rrdtool smokeping thttpd ];
+      script = ''thttpd -u ${cfg.user} -c "**.fcgi" -d ${smokepingHome} -p ${builtins.toString cfg.port} -D -nos'';
+      serviceConfig.Restart = "always";
     };
   };
 }
diff --git a/nixos/modules/services/web-apps/atlassian/confluence.nix b/nixos/modules/services/web-apps/atlassian/confluence.nix
new file mode 100644
index 000000000000..2d9287577de8
--- /dev/null
+++ b/nixos/modules/services/web-apps/atlassian/confluence.nix
@@ -0,0 +1,141 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+  cfg = config.services.confluence;
+
+  pkg = pkgs.atlassian-confluence;
+
+in
+
+{
+  options = {
+    services.confluence = {
+      enable = mkEnableOption "Atlassian Confluence service";
+
+      user = mkOption {
+        type = types.str;
+        default = "confluence";
+        description = "User which runs confluence.";
+      };
+
+      group = mkOption {
+        type = types.str;
+        default = "confluence";
+        description = "Group which runs confluence.";
+      };
+
+      home = mkOption {
+        type = types.str;
+        default = "/var/lib/confluence";
+        description = "Home directory of the confluence instance.";
+      };
+
+      listenAddress = mkOption {
+        type = types.str;
+        default = "127.0.0.1";
+        description = "Address to listen on.";
+      };
+
+      listenPort = mkOption {
+        type = types.int;
+        default = 8090;
+        description = "Port to listen on.";
+      };
+
+      catalinaOptions = mkOption {
+        type = types.listOf types.str;
+        default = [];
+        example = [ "-Xms1024m" "-Xmx2048m" "-Dconfluence.disable.peopledirectory.all=true" ];
+        description = "Java options to pass to catalina/tomcat.";
+      };
+
+      proxy = {
+        enable = mkEnableOption "proxy support";
+
+        name = mkOption {
+          type = types.str;
+          example = "confluence.example.com";
+          description = "Virtual hostname at the proxy";
+        };
+
+        port = mkOption {
+          type = types.int;
+          default = 443;
+          example = 80;
+          description = "Port used at the proxy";
+        };
+
+        scheme = mkOption {
+          type = types.str;
+          default = "https";
+          example = "http";
+          description = "Protocol used at the proxy.";
+        };
+      };
+
+      jrePackage = let
+        jreSwitch = unfree: free: if config.nixpkgs.config.allowUnfree or false then unfree else free;
+      in mkOption {
+        type = types.package;
+        default = jreSwitch pkgs.oraclejre8 pkgs.openjdk8.jre;
+        defaultText = jreSwitch "pkgs.oraclejre8" "pkgs.openjdk8.jre";
+        example = literalExample "pkgs.openjdk8.jre";
+        description = "Java Runtime to use for Confluence. Note that Atlassian recommends the Oracle JRE.";
+      };
+    };
+  };
+
+  config = mkIf cfg.enable {
+    users.extraUsers."${cfg.user}" = {
+      isSystemUser = true;
+      group = cfg.group;
+    };
+
+    users.extraGroups."${cfg.group}" = {};
+
+    systemd.services.confluence = {
+      description = "Atlassian Confluence";
+
+      wantedBy = [ "multi-user.target" ];
+      requires = [ "postgresql.service" ];
+      after = [ "postgresql.service" ];
+
+      path = [ cfg.jrePackage ];
+
+      environment = {
+        CONF_USER = cfg.user;
+        JAVA_HOME = "${cfg.jrePackage}";
+        CATALINA_OPTS = concatStringsSep " " cfg.catalinaOptions;
+      };
+
+      preStart = ''
+        mkdir -p ${cfg.home}/{logs,work,temp,deploy}
+
+        mkdir -p /run/confluence
+        ln -sf ${cfg.home}/{logs,work,temp,server.xml} /run/confluence
+        ln -sf ${cfg.home} /run/confluence/home
+
+        chown -R ${cfg.user} ${cfg.home}
+
+        sed -e 's,port="8090",port="${toString cfg.listenPort}" address="${cfg.listenAddress}",' \
+        '' + (lib.optionalString cfg.proxy.enable ''
+          -e 's,protocol="org.apache.coyote.http11.Http11NioProtocol",protocol="org.apache.coyote.http11.Http11NioProtocol" proxyName="${cfg.proxy.name}" proxyPort="${toString cfg.proxy.port}" scheme="${cfg.proxy.scheme}",' \
+        '') + ''
+          ${pkg}/conf/server.xml.dist > ${cfg.home}/server.xml
+      '';
+
+      script = "${pkg}/bin/start-confluence.sh -fg";
+      stopScript  = "${pkg}/bin/stop-confluence.sh";
+
+      serviceConfig = {
+        User = cfg.user;
+        Group = cfg.group;
+        PrivateTmp = true;
+        PermissionsStartOnly = true;
+      };
+    };
+  };
+}
diff --git a/nixos/modules/services/web-apps/atlassian/crowd.nix b/nixos/modules/services/web-apps/atlassian/crowd.nix
new file mode 100644
index 000000000000..5e79678023da
--- /dev/null
+++ b/nixos/modules/services/web-apps/atlassian/crowd.nix
@@ -0,0 +1,147 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+  cfg = config.services.crowd;
+
+  pkg = pkgs.atlassian-crowd;
+
+in
+
+{
+  options = {
+    services.crowd = {
+      enable = mkEnableOption "Atlassian Crowd service";
+
+      user = mkOption {
+        type = types.str;
+        default = "crowd";
+        description = "User which runs Crowd.";
+      };
+
+      group = mkOption {
+        type = types.str;
+        default = "crowd";
+        description = "Group which runs Crowd.";
+      };
+
+      home = mkOption {
+        type = types.str;
+        default = "/var/lib/crowd";
+        description = "Home directory of the Crowd instance.";
+      };
+
+      listenAddress = mkOption {
+        type = types.str;
+        default = "127.0.0.1";
+        description = "Address to listen on.";
+      };
+
+      listenPort = mkOption {
+        type = types.int;
+        default = 8092;
+        description = "Port to listen on.";
+      };
+
+      catalinaOptions = mkOption {
+        type = types.listOf types.str;
+        default = [];
+        example = [ "-Xms1024m" "-Xmx2048m" ];
+        description = "Java options to pass to catalina/tomcat.";
+      };
+
+      proxy = {
+        enable = mkEnableOption "reverse proxy support";
+
+        name = mkOption {
+          type = types.str;
+          example = "crowd.example.com";
+          description = "Virtual hostname at the proxy";
+        };
+
+        port = mkOption {
+          type = types.int;
+          default = 443;
+          example = 80;
+          description = "Port used at the proxy";
+        };
+
+        scheme = mkOption {
+          type = types.str;
+          default = "https";
+          example = "http";
+          description = "Protocol used at the proxy.";
+        };
+
+        secure = mkOption {
+          type = types.bool;
+          default = true;
+          example = false;
+          description = "Whether the connections to the proxy should be considered secure.";
+        };
+      };
+
+      jrePackage = let
+        jreSwitch = unfree: free: if config.nixpkgs.config.allowUnfree or false then unfree else free;
+      in mkOption {
+        type = types.package;
+        default = jreSwitch pkgs.oraclejre8 pkgs.openjdk8.jre;
+        defaultText = jreSwitch "pkgs.oraclejre8" "pkgs.openjdk8.jre";
+        example = literalExample "pkgs.openjdk8.jre";
+        description = "Java Runtime to use for Crowd. Note that Atlassian recommends the Oracle JRE.";
+      };
+    };
+  };
+
+  config = mkIf cfg.enable {
+    users.extraUsers."${cfg.user}" = {
+      isSystemUser = true;
+      group = cfg.group;
+    };
+
+    users.extraGroups."${cfg.group}" = {};
+
+    systemd.services.atlassian-crowd = {
+      description = "Atlassian Crowd";
+
+      wantedBy = [ "multi-user.target" ];
+      requires = [ "postgresql.service" ];
+      after = [ "postgresql.service" ];
+
+      path = [ cfg.jrePackage ];
+
+      environment = {
+        JAVA_HOME = "${cfg.jrePackage}";
+        CATALINA_OPTS = concatStringsSep " " cfg.catalinaOptions;
+        CATALINA_TMPDIR = "/tmp";
+      };
+
+      preStart = ''
+        mkdir -p ${cfg.home}/{logs,work}
+
+        mkdir -p /run/atlassian-crowd
+        ln -sf ${cfg.home}/{work,server.xml} /run/atlassian-crowd
+
+        chown -R ${cfg.user} ${cfg.home}
+
+        sed -e 's,port="8095",port="${toString cfg.listenPort}" address="${cfg.listenAddress}",' \
+        '' + (lib.optionalString cfg.proxy.enable ''
+          -e 's,compression="on",compression="off" protocol="HTTP/1.1" proxyName="${cfg.proxy.name}" proxyPort="${toString cfg.proxy.port}" scheme="${cfg.proxy.scheme}" secure="${toString cfg.proxy.secure}",' \
+        '') + ''
+          ${pkg}/apache-tomcat/conf/server.xml.dist > ${cfg.home}/server.xml
+      '';
+
+      script = "${pkg}/start_crowd.sh";
+      #stopScript  = "${pkg}/bin/stop_crowd.sh";
+
+      serviceConfig = {
+        User = cfg.user;
+        Group = cfg.group;
+        PrivateTmp = true;
+        PermissionsStartOnly = true;
+      };
+    };
+  };
+}
diff --git a/nixos/modules/services/web-apps/atlassian/jira.nix b/nixos/modules/services/web-apps/atlassian/jira.nix
new file mode 100644
index 000000000000..6e31d20d0681
--- /dev/null
+++ b/nixos/modules/services/web-apps/atlassian/jira.nix
@@ -0,0 +1,149 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+  cfg = config.services.jira;
+
+  pkg = pkgs.atlassian-jira;
+
+in
+
+{
+  options = {
+    services.jira = {
+      enable = mkEnableOption "Atlassian JIRA service";
+
+      user = mkOption {
+        type = types.str;
+        default = "jira";
+        description = "User which runs JIRA.";
+      };
+
+      group = mkOption {
+        type = types.str;
+        default = "jira";
+        description = "Group which runs JIRA.";
+      };
+
+      home = mkOption {
+        type = types.str;
+        default = "/var/lib/jira";
+        description = "Home directory of the JIRA instance.";
+      };
+
+      listenAddress = mkOption {
+        type = types.str;
+        default = "127.0.0.1";
+        description = "Address to listen on.";
+      };
+
+      listenPort = mkOption {
+        type = types.int;
+        default = 8091;
+        description = "Port to listen on.";
+      };
+
+      catalinaOptions = mkOption {
+        type = types.listOf types.str;
+        default = [];
+        example = [ "-Xms1024m" "-Xmx2048m" ];
+        description = "Java options to pass to catalina/tomcat.";
+      };
+
+      proxy = {
+        enable = mkEnableOption "reverse proxy support";
+
+        name = mkOption {
+          type = types.str;
+          example = "jira.example.com";
+          description = "Virtual hostname at the proxy";
+        };
+
+        port = mkOption {
+          type = types.int;
+          default = 443;
+          example = 80;
+          description = "Port used at the proxy";
+        };
+
+        scheme = mkOption {
+          type = types.str;
+          default = "https";
+          example = "http";
+          description = "Protocol used at the proxy.";
+        };
+
+        secure = mkOption {
+          type = types.bool;
+          default = true;
+          example = false;
+          description = "Whether the connections to the proxy should be considered secure.";
+        };
+      };
+
+      jrePackage = let
+        jreSwitch = unfree: free: if config.nixpkgs.config.allowUnfree or false then unfree else free;
+      in mkOption {
+        type = types.package;
+        default = jreSwitch pkgs.oraclejre8 pkgs.openjdk8.jre;
+        defaultText = jreSwitch "pkgs.oraclejre8" "pkgs.openjdk8.jre";
+        example = literalExample "pkgs.openjdk8.jre";
+        description = "Java Runtime to use for JIRA. Note that Atlassian recommends the Oracle JRE.";
+      };
+    };
+  };
+
+  config = mkIf cfg.enable {
+    users.extraUsers."${cfg.user}" = {
+      isSystemUser = true;
+      group = cfg.group;
+    };
+
+    users.extraGroups."${cfg.group}" = {};
+
+    systemd.services.atlassian-jira = {
+      description = "Atlassian JIRA";
+
+      wantedBy = [ "multi-user.target" ];
+      requires = [ "postgresql.service" ];
+      after = [ "postgresql.service" ];
+
+      path = [ cfg.jrePackage ];
+
+      environment = {
+        JIRA_USER = cfg.user;
+        JIRA_HOME = cfg.home;
+        JAVA_HOME = "${cfg.jrePackage}";
+        CATALINA_OPTS = concatStringsSep " " cfg.catalinaOptions;
+      };
+
+      preStart = ''
+        mkdir -p ${cfg.home}/{logs,work,temp,deploy}
+
+        mkdir -p /run/atlassian-jira
+        ln -sf ${cfg.home}/{logs,work,temp,server.xml} /run/atlassian-jira
+        ln -sf ${cfg.home} /run/atlassian-jira/home
+
+        chown -R ${cfg.user} ${cfg.home}
+
+        sed -e 's,port="8080",port="${toString cfg.listenPort}" address="${cfg.listenAddress}",' \
+        '' + (lib.optionalString cfg.proxy.enable ''
+          -e 's,protocol="HTTP/1.1",protocol="HTTP/1.1" proxyName="${cfg.proxy.name}" proxyPort="${toString cfg.proxy.port}" scheme="${cfg.proxy.scheme}" secure="${toString cfg.proxy.secure}",' \
+        '') + ''
+          ${pkg}/conf/server.xml.dist > ${cfg.home}/server.xml
+      '';
+
+      script = "${pkg}/bin/start-jira.sh -fg";
+      stopScript  = "${pkg}/bin/stop-jira.sh";
+
+      serviceConfig = {
+        User = cfg.user;
+        Group = cfg.group;
+        PrivateTmp = true;
+        PermissionsStartOnly = true;
+      };
+    };
+  };
+}
diff --git a/nixos/modules/services/x11/desktop-managers/lxqt.nix b/nixos/modules/services/x11/desktop-managers/lxqt.nix
index d69f3cba8ccd..4241ec890dd7 100644
--- a/nixos/modules/services/x11/desktop-managers/lxqt.nix
+++ b/nixos/modules/services/x11/desktop-managers/lxqt.nix
@@ -61,6 +61,7 @@ in
       pkgs.lxqt.obconf-qt
       pkgs.lxqt.pavucontrol-qt
       pkgs.lxqt.pcmanfm-qt
+      pkgs.lxqt.qps
       pkgs.lxqt.qterminal
       pkgs.lxqt.qtermwidget
       pkgs.menu-cache
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index ec2f3a4f8bb1..e34f0c216639 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -539,6 +539,10 @@ in
           Restart = "always";
           RestartSec = "200ms";
           SyslogIdentifier = "display-manager";
+          # Stop restarting if the display manager stops (crashes) 2 times
+          # in one minute. Starting X typically takes 3-4s.
+          StartLimitInterval = "30s";
+          StartLimitBurst = "3";
         };
       };
 
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix
index ba15d0318b17..51b3b8a3dca9 100644
--- a/nixos/modules/system/boot/kernel.nix
+++ b/nixos/modules/system/boot/kernel.nix
@@ -4,7 +4,9 @@ with lib;
 
 let
 
-  kernel = config.boot.kernelPackages.kernel;
+  inherit (config.boot) kernelPatches;
+
+  inherit (config.boot.kernelPackages) kernel;
 
   kernelModulesConf = pkgs.writeText "nixos.conf"
     ''
@@ -21,6 +23,11 @@ in
 
     boot.kernelPackages = mkOption {
       default = pkgs.linuxPackages;
+      apply = kernelPackages: kernelPackages.extend (self: super: {
+        kernel = super.kernel.override {
+          kernelPatches = super.kernel.kernelPatches ++ kernelPatches;
+        };
+      });
       # We don't want to evaluate all of linuxPackages for the manual
       # - some of it might not even evaluate correctly.
       defaultText = "pkgs.linuxPackages";
@@ -39,6 +46,13 @@ in
       '';
     };
 
+    boot.kernelPatches = mkOption {
+      type = types.listOf types.attrs;
+      default = [];
+      example = literalExample "[ pkgs.kernelPatches.ubuntu_fan_4_4 ]";
+      description = "A list of additional patches to apply to the kernel.";
+    };
+
     boot.kernelParams = mkOption {
       type = types.listOf types.str;
       default = [ ];
diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix
index 6a8f20bab5b6..c50ea5c79643 100644
--- a/nixos/modules/tasks/network-interfaces-scripted.nix
+++ b/nixos/modules/tasks/network-interfaces-scripted.nix
@@ -46,6 +46,23 @@ in
     systemd.services =
       let
 
+        deviceDependency = dev:
+          if (config.boot.isContainer == false)
+          then
+            # Trust udev when not in the container
+            optional (dev != null) (subsystemDevice dev)
+          else
+            # When in the container, check whether the interface is built from other definitions
+            if (hasAttr dev cfg.bridges) ||
+               (hasAttr dev cfg.bonds) ||
+               (hasAttr dev cfg.macvlans) ||
+               (hasAttr dev cfg.sits) ||
+               (hasAttr dev cfg.vlans) ||
+               (hasAttr dev cfg.vswitches) ||
+               (hasAttr dev cfg.wlanInterfaces)
+            then [ "${dev}-netdev.service" ]
+            else [];
+
         networkLocalCommands = {
           after = [ "network-setup.service" ];
           bindsTo = [ "network-setup.service" ];
@@ -120,8 +137,8 @@ in
             # order before network-setup because the routes that are configured
             # there may need ip addresses configured
             before = [ "network-setup.service" ];
-            bindsTo = [ (subsystemDevice i.name) ];
-            after = [ (subsystemDevice i.name) "network-pre.target" ];
+            bindsTo = deviceDependency i.name;
+            after = [ "network-pre.target" ] ++ (deviceDependency i.name);
             serviceConfig.Type = "oneshot";
             serviceConfig.RemainAfterExit = true;
             path = [ pkgs.iproute ];
@@ -179,7 +196,7 @@ in
 
         createBridgeDevice = n: v: nameValuePair "${n}-netdev"
           (let
-            deps = map subsystemDevice v.interfaces;
+            deps = concatLists (map deviceDependency v.interfaces);
           in
           { description = "Bridge Interface ${n}";
             wantedBy = [ "network-setup.service" (subsystemDevice n) ];
@@ -220,7 +237,7 @@ in
 
         createVswitchDevice = n: v: nameValuePair "${n}-netdev"
           (let
-            deps = map subsystemDevice v.interfaces;
+            deps = concatLists (map deviceDependency v.interfaces);
             ofRules = pkgs.writeText "vswitch-${n}-openFlowRules" v.openFlowRules;
           in
           { description = "Open vSwitch Interface ${n}";
@@ -253,7 +270,7 @@ in
 
         createBondDevice = n: v: nameValuePair "${n}-netdev"
           (let
-            deps = map subsystemDevice v.interfaces;
+            deps = concatLists (map deviceDependency v.interfaces);
           in
           { description = "Bond Interface ${n}";
             wantedBy = [ "network-setup.service" (subsystemDevice n) ];
@@ -291,7 +308,7 @@ in
 
         createMacvlanDevice = n: v: nameValuePair "${n}-netdev"
           (let
-            deps = [ (subsystemDevice v.interface) ];
+            deps = deviceDependency v.interface;
           in
           { description = "Vlan Interface ${n}";
             wantedBy = [ "network-setup.service" (subsystemDevice n) ];
@@ -316,7 +333,7 @@ in
 
         createSitDevice = n: v: nameValuePair "${n}-netdev"
           (let
-            deps = optional (v.dev != null) (subsystemDevice v.dev);
+            deps = deviceDependency v.dev;
           in
           { description = "6-to-4 Tunnel Interface ${n}";
             wantedBy = [ "network-setup.service" (subsystemDevice n) ];
@@ -344,7 +361,7 @@ in
 
         createVlanDevice = n: v: nameValuePair "${n}-netdev"
           (let
-            deps = [ (subsystemDevice v.interface) ];
+            deps = deviceDependency v.interface;
           in
           { description = "Vlan Interface ${n}";
             wantedBy = [ "network-setup.service" (subsystemDevice n) ];
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index cac7e6b02eba..aae4dc5fdadf 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -310,9 +310,9 @@ in
         generate a random 32-bit ID using the following commands:
 
         <literal>cksum /etc/machine-id | while read c rest; do printf "%x" $c; done</literal>
-        
+
         (this derives it from the machine-id that systemd generates) or
-        
+
         <literal>head -c4 /dev/urandom | od -A none -t x4</literal>
       '';
     };
@@ -972,12 +972,17 @@ in
         '';
       };
     } // (listToAttrs (flip map interfaces (i:
+      let
+        deviceDependency = if config.boot.isContainer
+          then []
+          else [ (subsystemDevice i.name) ];
+      in
       nameValuePair "network-link-${i.name}"
       { description = "Link configuration of ${i.name}";
         wantedBy = [ "network-interfaces.target" ];
         before = [ "network-interfaces.target" ];
-        bindsTo = [ (subsystemDevice i.name) ];
-        after = [ (subsystemDevice i.name) "network-pre.target" ];
+        bindsTo = deviceDependency;
+        after = [ "network-pre.target" ] ++ deviceDependency;
         path = [ pkgs.iproute ];
         serviceConfig = {
           Type = "oneshot";
diff --git a/nixos/release.nix b/nixos/release.nix
index bff17da607f3..10c624afebc7 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -227,6 +227,7 @@ in rec {
   tests.containers-bridge = callTest tests/containers-bridge.nix {};
   tests.containers-imperative = callTest tests/containers-imperative.nix {};
   tests.containers-extra_veth = callTest tests/containers-extra_veth.nix {};
+  tests.containers-physical_interfaces = callTest tests/containers-physical_interfaces.nix {};
   tests.docker = hydraJob (import tests/docker.nix { system = "x86_64-linux"; });
   tests.dnscrypt-proxy = callTest tests/dnscrypt-proxy.nix { system = "x86_64-linux"; };
   tests.ecryptfs = callTest tests/ecryptfs.nix {};
diff --git a/nixos/tests/containers-physical_interfaces.nix b/nixos/tests/containers-physical_interfaces.nix
new file mode 100644
index 000000000000..a3b0b29951bf
--- /dev/null
+++ b/nixos/tests/containers-physical_interfaces.nix
@@ -0,0 +1,133 @@
+
+import ./make-test.nix ({ pkgs, ...} : {
+  name = "containers-physical_interfaces";
+  meta = with pkgs.stdenv.lib.maintainers; {
+    maintainers = [ kampfschlaefer ];
+  };
+
+  nodes = {
+    server = { config, pkgs, ... }:
+      {
+        virtualisation.memorySize = 256;
+        virtualisation.vlans = [ 1 ];
+
+        containers.server = {
+          privateNetwork = true;
+          interfaces = [ "eth1" ];
+
+          config = {
+            networking.interfaces.eth1 = {
+              ip4 = [ { address = "10.10.0.1"; prefixLength = 24; } ];
+            };
+            networking.firewall.enable = false;
+          };
+        };
+      };
+    bridged = { config, pkgs, ... }: {
+      virtualisation.memorySize = 128;
+      virtualisation.vlans = [ 1 ];
+
+      containers.bridged = {
+        privateNetwork = true;
+        interfaces = [ "eth1" ];
+
+        config = {
+          networking.bridges.br0.interfaces = [ "eth1" ];
+          networking.interfaces.br0 = {
+            ip4 = [ { address = "10.10.0.2"; prefixLength = 24; } ];
+          };
+          networking.firewall.enable = false;
+        };
+      };
+    };
+
+    bonded = { config, pkgs, ... }: {
+      virtualisation.memorySize = 128;
+      virtualisation.vlans = [ 1 ];
+
+      containers.bonded = {
+        privateNetwork = true;
+        interfaces = [ "eth1" ];
+
+        config = {
+          networking.bonds.bond0 = {
+            interfaces = [ "eth1" ];
+            mode = "active-backup";
+          };
+          networking.interfaces.bond0 = {
+            ip4 = [ { address = "10.10.0.3"; prefixLength = 24; } ];
+          };
+          networking.firewall.enable = false;
+        };
+      };
+    };
+
+    bridgedbond = { config, pkgs, ... }: {
+      virtualisation.memorySize = 128;
+      virtualisation.vlans = [ 1 ];
+
+      containers.bridgedbond = {
+        privateNetwork = true;
+        interfaces = [ "eth1" ];
+
+        config = {
+          networking.bonds.bond0 = {
+            interfaces = [ "eth1" ];
+            mode = "active-backup";
+          };
+          networking.bridges.br0.interfaces = [ "bond0" ];
+          networking.interfaces.br0 = {
+            ip4 = [ { address = "10.10.0.4"; prefixLength = 24; } ];
+          };
+          networking.firewall.enable = false;
+        };
+      };
+    };
+  };
+
+  testScript = ''
+    startAll;
+
+    subtest "prepare server", sub {
+      $server->waitForUnit("default.target");
+      $server->succeed("ip link show dev eth1 >&2");
+    };
+
+    subtest "simple physical interface", sub {
+      $server->succeed("nixos-container start server");
+      $server->waitForUnit("container\@server");
+      $server->succeed("systemctl -M server list-dependencies network-addresses-eth1.service >&2");
+
+      # The other tests will ping this container on its ip. Here we just check
+      # that the device is present in the container.
+      $server->succeed("nixos-container run server -- ip a show dev eth1 >&2");
+    };
+
+    subtest "physical device in bridge in container", sub {
+      $bridged->waitForUnit("default.target");
+      $bridged->succeed("nixos-container start bridged");
+      $bridged->waitForUnit("container\@bridged");
+      $bridged->succeed("systemctl -M bridged list-dependencies network-addresses-br0.service >&2");
+      $bridged->succeed("systemctl -M bridged status -n 30 -l network-addresses-br0.service");
+      $bridged->succeed("nixos-container run bridged -- ping -w 10 -c 1 -n 10.10.0.1");
+    };
+
+    subtest "physical device in bond in container", sub {
+      $bonded->waitForUnit("default.target");
+      $bonded->succeed("nixos-container start bonded");
+      $bonded->waitForUnit("container\@bonded");
+      $bonded->succeed("systemctl -M bonded list-dependencies network-addresses-bond0 >&2");
+      $bonded->succeed("systemctl -M bonded status -n 30 -l network-addresses-bond0 >&2");
+      $bonded->succeed("nixos-container run bonded -- ping -w 10 -c 1 -n 10.10.0.1");
+    };
+
+    subtest "physical device in bond in bridge in container", sub {
+      $bridgedbond->waitForUnit("default.target");
+      $bridgedbond->succeed("nixos-container start bridgedbond");
+      $bridgedbond->waitForUnit("container\@bridgedbond");
+      $bridgedbond->succeed("systemctl -M bridgedbond list-dependencies network-addresses-br0.service >&2");
+      $bridgedbond->succeed("systemctl -M bridgedbond status -n 30 -l network-addresses-br0.service");
+      $bridgedbond->succeed("nixos-container run bridgedbond -- ping -w 10 -c 1 -n 10.10.0.1");
+    };
+  '';
+})
diff --git a/nixos/tests/docker-registry.nix b/nixos/tests/docker-registry.nix
new file mode 100644
index 000000000000..df24686aba8e
--- /dev/null
+++ b/nixos/tests/docker-registry.nix
@@ -0,0 +1,45 @@
+# This test runs docker-registry and check if it works
+
+import ./make-test.nix ({ pkgs, ...} : {
+  name = "docker-registry";
+  meta = with pkgs.stdenv.lib.maintainers; {
+    maintainers = [ globin ];
+  };
+
+  nodes = {
+    registry = { config, pkgs, ... }: {
+      services.dockerRegistry.enable = true;
+      services.dockerRegistry.port = 8080;
+      services.dockerRegistry.listenAddress = "0.0.0.0";
+      networking.firewall.allowedTCPPorts = [ 8080 ];
+    };
+
+    client1 = { config, pkgs, ...}: {
+      virtualisation.docker.enable = true;
+      virtualisation.docker.socketActivation = false;
+      virtualisation.docker.extraOptions = "--insecure-registry registry:8080";
+    };
+
+    client2 = { config, pkgs, ...}: {
+      virtualisation.docker.enable = true;
+      virtualisation.docker.socketActivation = false;
+      virtualisation.docker.extraOptions = "--insecure-registry registry:8080";
+    };
+  };
+
+  testScript = ''
+    $client1->start();
+    $client1->waitForUnit("docker.service");
+    $client1->succeed("tar cv --files-from /dev/null | docker import - scratch");
+    $client1->succeed("docker tag scratch registry:8080/scratch");
+
+    $registry->start();
+    $registry->waitForUnit("docker-registry.service");
+    $client1->succeed("docker push registry:8080/scratch");
+
+    $client2->start();
+    $client2->waitForUnit("docker.service");
+    $client2->succeed("docker pull registry:8080/scratch");
+    $client2->succeed("docker images | grep scratch");
+  '';
+})
diff --git a/nixos/tests/smokeping.nix b/nixos/tests/smokeping.nix
index 324f83147e00..9de3030417f9 100644
--- a/nixos/tests/smokeping.nix
+++ b/nixos/tests/smokeping.nix
@@ -11,9 +11,10 @@ import ./make-test.nix ({ pkgs, ...} : {
         services.smokeping = {
           enable = true;
           port = 8081;
+          mailHost = "127.0.0.2";
           probeConfig = ''
             + FPing
-            binary = ${pkgs.fping}/bin/fping
+            binary = /var/setuid-wrappers/fping
             offset = 0%
           '';
         };
@@ -27,5 +28,6 @@ import ./make-test.nix ({ pkgs, ...} : {
     $sm->waitForFile("/var/lib/smokeping/data/Local/LocalMachine.rrd");
     $sm->succeed("curl -s -f localhost:8081/smokeping.fcgi?target=Local");
     $sm->succeed("ls /var/lib/smokeping/cache/Local/LocalMachine_mini.png");
+    $sm->succeed("ls /var/lib/smokeping/cache/index.html");
   '';
 })
diff --git a/pkgs/applications/audio/audacious/default.nix b/pkgs/applications/audio/audacious/default.nix
index e6322dd1d0aa..e9d7b5da79a6 100644
--- a/pkgs/applications/audio/audacious/default.nix
+++ b/pkgs/applications/audio/audacious/default.nix
@@ -8,16 +8,16 @@
 
 stdenv.mkDerivation rec {
   name = "audacious-${version}";
-  version = "3.7.2";
+  version = "3.8";
 
   src = fetchurl {
     url = "http://distfiles.audacious-media-player.org/audacious-${version}-gtk3.tar.bz2";
-    sha256 = "1pvyxi8niy70nv13kc16g2vaywwahmg2650fa7v4rlbmykifk75z";
+    sha256 = "0rpdzf9pb52lcswxypwh4nq3qkjzliw42v39nm5rlwwxdq6bm99q";
   };
 
   pluginsSrc = fetchurl {
     url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}-gtk3.tar.bz2";
-    sha256 = "0gxka0lp9a35k2xgq8bx69wyv83dvrqnpwcsqliy3h3yz6v1fv2v";
+    sha256 = "0j9svdqdjvj5spx1vfp0m63xh8xwk8naqsikdxfxbb68xk33rxb9";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/applications/audio/clerk/default.nix b/pkgs/applications/audio/clerk/default.nix
new file mode 100644
index 000000000000..3599991551ce
--- /dev/null
+++ b/pkgs/applications/audio/clerk/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, makeWrapper, rofi, mpc_cli, perl,
+utillinux, pythonPackages, libnotify }:
+
+stdenv.mkDerivation {
+  name = "clerk-unstable-2016-10-14";
+
+  src = fetchFromGitHub {
+    owner = "carnager";
+    repo = "clerk";
+    rev = "875963bcae095ac1db174627183c76ebe165f787";
+    sha256 = "0y045my65hr3hjyx13jrnyg6g3wb41phqb1m7azc4l6vx6r4124b";
+  };
+
+  buildInputs = [ makeWrapper pythonPackages.mpd2 ];
+
+  buildPhase = ''
+    echo skipping build phase...
+  '';
+
+  installPhase = ''
+    DESTDIR=$out PREFIX=/ make install
+    wrapProgram $out/bin/clerk $out/bin/clerk \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ rofi mpc_cli perl utillinux libnotify ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "An MPD client built on top of rofi";
+    homepage    = https://github.com/carnager/clerk;
+    license     = licenses.mit;
+    maintainers = with maintainers; [ anderspapitto ];
+  };
+}
diff --git a/pkgs/applications/audio/opusfile/default.nix b/pkgs/applications/audio/opusfile/default.nix
index 4937d09e532e..f840ba278cfc 100644
--- a/pkgs/applications/audio/opusfile/default.nix
+++ b/pkgs/applications/audio/opusfile/default.nix
@@ -1,16 +1,17 @@
 { stdenv, fetchurl, pkgconfig, openssl, libogg, libopus }:
 
 stdenv.mkDerivation rec {
-  name = "opusfile-0.6";
+  name = "opusfile-0.8";
   src = fetchurl {
     url = "http://downloads.xiph.org/releases/opus/${name}.tar.gz";
-    sha256 = "19iys2kld75k0210b807i4illrdmj3cmmnrgxlc9y4vf6mxp2a14";
+    sha256 = "192mp2jgn5s9815h31ybzsfipmbppmdhwx1dymrk26xarz9iw8rc";
   };
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ openssl libogg ];
   propagatedBuildInputs = [ libopus ];
   patches = [ ./include-multistream.patch ];
+  configureFlags = [ "--disable-examples" ];
 
   meta = {
     description = "High-level API for decoding and seeking in .opus files";
diff --git a/pkgs/applications/editors/vscode/default.nix b/pkgs/applications/editors/vscode/default.nix
index f69c9706e370..f7983f713850 100644
--- a/pkgs/applications/editors/vscode/default.nix
+++ b/pkgs/applications/editors/vscode/default.nix
@@ -1,20 +1,21 @@
-{ stdenv, lib, callPackage, fetchurl, unzip, atomEnv, makeDesktopItem }:
+{ stdenv, lib, callPackage, fetchurl, unzip, atomEnv, makeDesktopItem,
+  makeWrapper, libXScrnSaver }:
 
 let
-  version = "1.5.1";
-  rev = "07d663dc1bd848161edf4cd4ce30cce410d3d877";
+  version = "1.6.1";
+  rev = "9e4e44c19e393803e2b05fe2323cf4ed7e36880e";
 
-  sha256 = if stdenv.system == "i686-linux"    then "1a2854snjdmfhzx6qwib4iw3qjhlmlf09dlsbbvh24zbrjphnd85"
-      else if stdenv.system == "x86_64-linux"  then "0gg2ad7sp02ffv7la61hh9h4vfw8qkfladbhwlh5y4axbbrx17r7"
-      else if stdenv.system == "x86_64-darwin" then "18q4ldnmm619vv8yx6rznpznpcc19zjczmcidr34552i5qfg5xsz"
+  sha256 = if stdenv.system == "i686-linux"    then "1aks84siflpjbd2s9y1f0vvvf3nas4f50cimjf25lijxzjxrlivy"
+      else if stdenv.system == "x86_64-linux"  then "05kbi081ih64fadj4k74grkk9ca3wga6ybwgs5ld0bal4ilw1q6i"
+      else if stdenv.system == "x86_64-darwin" then "00p2m8b0l3pkf5k74szw6kcql3j1fjnv3rwnhy24wfkg4b4ah2x9"
       else throw "Unsupported system: ${stdenv.system}";
 
   urlBase = "https://az764295.vo.msecnd.net/stable/${rev}/";
 
   urlStr = if stdenv.system == "i686-linux" then
-        urlBase + "code-stable-code_${version}-1473369468_i386.tar.gz"
+        urlBase + "code-stable-code_${version}-1476372351_i386.tar.gz"
       else if stdenv.system == "x86_64-linux" then
-        urlBase + "code-stable-code_${version}-1473370243_amd64.tar.gz"
+        urlBase + "code-stable-code_${version}-1476373175_amd64.tar.gz"
       else if stdenv.system == "x86_64-darwin" then
         urlBase + "VSCode-darwin-stable.zip"
       else throw "Unsupported system: ${stdenv.system}";
@@ -32,15 +33,18 @@ in
       name = "code";
       exec = "code";
       icon = "code";
-      comment = "Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications";
+      comment = ''
+        Code editor redefined and optimized for building and debugging modern
+        web and cloud applications
+      '';
       desktopName = "Visual Studio Code";
       genericName = "Text Editor";
       categories = "GNOME;GTK;Utility;TextEditor;Development;";
     };
 
     buildInputs = if stdenv.system == "x86_64-darwin"
-      then [ unzip ]
-      else [ ];
+      then [ unzip makeWrapper libXScrnSaver ]
+      else [ makeWrapper libXScrnSaver ];
 
     installPhase = ''
       mkdir -p $out/lib/vscode $out/bin
@@ -59,14 +63,22 @@ in
         --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
         --set-rpath "${atomEnv.libPath}:$out/lib/vscode" \
         $out/lib/vscode/code
+
+      wrapProgram $out/bin/code \
+        --prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1
     '';
 
     meta = with stdenv.lib; {
-      description = "Visual Studio Code is an open source source code editor developed by Microsoft for Windows, Linux and OS X.";
+      description = ''
+        Open source source code editor developed by Microsoft for Windows,
+        Linux and OS X
+      '';
       longDescription = ''
-        Visual Studio Code is an open source source code editor developed by Microsoft for Windows, Linux and OS X.
-        It includes support for debugging, embedded Git control, syntax highlighting, intelligent code completion, snippets, and code refactoring.
-        It is also customizable, so users can change the editor's theme, keyboard shortcuts, and preferences.
+        Open source source code editor developed by Microsoft for Windows,
+        Linux and OS X. It includes support for debugging, embedded Git
+        control, syntax highlighting, intelligent code completion, snippets,
+        and code refactoring. It is also customizable, so users can change the
+        editor's theme, keyboard shortcuts, and preferences
       '';
       homepage = http://code.visualstudio.com/;
       downloadPage = https://code.visualstudio.com/Updates;
diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix
index d481bb934d4c..c7d1adfdd182 100644
--- a/pkgs/applications/graphics/ImageMagick/default.nix
+++ b/pkgs/applications/graphics/ImageMagick/default.nix
@@ -11,8 +11,8 @@ let
     else throw "ImageMagick is not supported on this platform.";
 
   cfg = {
-    version = "6.9.5-10";
-    sha256 = "0cxjzqzca80vf6sfx4z9zq4wq2w0vy9ajp9kf88jb4na8mwsn198";
+    version = "6.9.6-2";
+    sha256 = "139h9lycxw3lszn052m34xm0rqyanin4nb529vxjcrkkzqilh91r";
     patches = [];
   }
     # Freeze version on mingw so we don't need to port the patch too often.
diff --git a/pkgs/applications/graphics/PythonMagick/default.nix b/pkgs/applications/graphics/PythonMagick/default.nix
index 5ab7d4d8a694..a8d0d490f8bb 100644
--- a/pkgs/applications/graphics/PythonMagick/default.nix
+++ b/pkgs/applications/graphics/PythonMagick/default.nix
@@ -2,7 +2,7 @@
 
 let
 
-  version = "0.9.12";
+  version = "0.9.14";
 
 in
 
@@ -10,8 +10,8 @@ stdenv.mkDerivation rec {
   name = "pythonmagick-${version}";
 
   src = fetchurl {
-    url = "http://www.imagemagick.org/download/python/releases/PythonMagick-${version}.tar.xz";
-    sha256 = "1l1kr3d7l40fkxgs6mrlxj65alv2jizm9hhgg9i9g90a8qj8642b";
+    url = "mirror://imagemagick/python/releases/PythonMagick-${version}.tar.xz";
+    sha256 = "1flkdfi3c19wy2qcfzax1cqvmmri10rvmhc2y85gmagqvv01zz22";
   };
 
   buildInputs = [python boost pkgconfig imagemagick];
diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix
index 74abc06bc4e3..9fd669551dec 100644
--- a/pkgs/applications/graphics/gimp/plugins/default.nix
+++ b/pkgs/applications/graphics/gimp/plugins/default.nix
@@ -5,7 +5,7 @@
 
 { pkgs, gimp }:
 let
-  inherit (pkgs) stdenv fetchurl pkgconfig glib;
+  inherit (pkgs) stdenv fetchurl pkgconfig glib fetchFromGitHub;
   inherit (gimp) targetPluginDir targetScriptDir;
 
   pluginDerivation = a: stdenv.mkDerivation ({
@@ -57,6 +57,7 @@ rec {
       sed -e 's,^\(GIMP_PLUGIN_DIR=\).*,\1'"$out/${gimp.name}-plugins", \
        -e 's,^\(GIMP_DATA_DIR=\).*,\1'"$out/share/${gimp.name}", -i configure
     '';
+    hardeningDisable = [ "format" ];
     meta = with stdenv.lib; {
       description = "The GIMP Animation Package";
       homepage = http://www.gimp.org;
@@ -116,6 +117,25 @@ rec {
     ";
   };
 
+  resynthesizer2 = pluginDerivation {
+    /* menu:
+      Filters/Map/Resynthesize
+      Filters/Enhance/Smart enlarge
+      Filters/Enhance/Smart sharpen
+      Filters/Enhance/Smart remove selection
+    */
+    name = "resynthesizer-2.0.1";
+    buildInputs = [ gimp pkgs.fftw pkgs.autoreconfHook ] 
+      ++ gimp.nativeBuildInputs;
+    makeFlags = "GIMP_LIBDIR=$out/lib/gimp/2.0/";
+    src = fetchFromGitHub {
+      owner = "bootchk";
+      repo = "resynthesizer";
+      rev = "2.0.1";
+      sha256 = "1d214s0jsqxz83l9dd8vhnz3siw9fyw7xdhhir25ra7jiwxc99hd";
+    };
+  };
+
   texturize = pluginDerivation {
     name = "texturize-2.1";
     buildInputs = [ gimp ] ++ gimp.nativeBuildInputs;
diff --git a/pkgs/applications/graphics/graphicsmagick/default.nix b/pkgs/applications/graphics/graphicsmagick/default.nix
index 70d8feaa2753..2e573e09b31a 100644
--- a/pkgs/applications/graphics/graphicsmagick/default.nix
+++ b/pkgs/applications/graphics/graphicsmagick/default.nix
@@ -1,6 +1,6 @@
-{stdenv, fetchurl, bzip2, freetype, graphviz, ghostscript
-, libjpeg, libpng, libtiff, libxml2, zlib, libtool, xz
-, libX11, libwebp, quantumdepth ? 8}:
+{ stdenv, fetchurl, fetchpatch, bzip2, freetype, graphviz, ghostscript
+, libjpeg, libpng, libtiff, libxml2, zlib, libtool, xz, libX11
+, libwebp, quantumdepth ? 8 }:
 
 let version = "1.3.25"; in
 
@@ -12,7 +12,21 @@ stdenv.mkDerivation {
     sha256 = "17xcc7pfcmiwpfr1g8ys5a7bdnvqzka53vg3kkzhwwz0s99gljyn";
   };
 
-  patches = [ ./disable-popen.patch ];
+  patches = [
+    ./disable-popen.patch
+    (fetchpatch {
+      url = "https://sources.debian.net/data/main/g/graphicsmagick/1.3.25-4/debian/patches/CVE-2016-7996_CVE-2016-7997.patch";
+      sha256 = "0xsby2z8n7cnnln7szjznq7iaabq323wymvdjra59yb41aix74r2";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.net/data/main/g/graphicsmagick/1.3.25-4/debian/patches/CVE-2016-7800_part1.patch";
+      sha256 = "02s0x9bkbnm5wrd0d2x9ld4d9z5xqpfk310lyylyr5zlnhqxmwgn";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.net/data/main/g/graphicsmagick/1.3.25-4/debian/patches/CVE-2016-7800_part2.patch";
+      sha256 = "1h4xv3i1aq5avsd584rwa5sa7ca8f7w9ggmh7j2llqq5kymwsv5f";
+    })
+  ];
 
   configureFlags = [
     "--enable-shared"
diff --git a/pkgs/applications/graphics/gthumb/default.nix b/pkgs/applications/graphics/gthumb/default.nix
index 76086b87eb2b..adcba908a8fa 100644
--- a/pkgs/applications/graphics/gthumb/default.nix
+++ b/pkgs/applications/graphics/gthumb/default.nix
@@ -1,17 +1,17 @@
 { stdenv,  fetchurl, gnome3, itstool, libxml2, pkgconfig, intltool,
   exiv2, libjpeg, libtiff, gstreamer, libraw, libsoup, libsecret,
   libchamplain, librsvg, libwebp, json_glib, webkit, lcms2, bison,
-  flex, wrapGAppsHook }:
+  flex, hicolor_icon_theme, wrapGAppsHook }:
 
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   pname = "gthumb";
-  version = "${major}.3";
+  version = "${major}.4";
   major = "3.4";
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${major}/${name}.tar.xz";
-    sha256 = "0pc2xl6kwhi5l3d0dj6nzdcj2vpihs7y1s3l1hwir8zy7cpx23y1";
+    sha256 = "154bdc8c1940209f1e3d9c60184efef45b0d24f5f7f7f59b819e9c08e19c2981";
   };
 
   nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
@@ -19,7 +19,9 @@ stdenv.mkDerivation rec {
   buildInputs = with gnome3;
     [ itstool libxml2 intltool glib gtk gsettings_desktop_schemas dconf
       exiv2 libjpeg libtiff gstreamer libraw libsoup libsecret libchamplain
-      librsvg libwebp json_glib webkit lcms2 bison flex ];
+      librsvg libwebp json_glib webkit lcms2 bison flex hicolor_icon_theme ];
+
+  enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
     homepage = https://wiki.gnome.org/Apps/gthumb;
diff --git a/pkgs/applications/graphics/rawtherapee/ReleaseInfo.cmake b/pkgs/applications/graphics/rawtherapee/ReleaseInfo.cmake
index 28096618c9e3..7be7cb63f701 100644
--- a/pkgs/applications/graphics/rawtherapee/ReleaseInfo.cmake
+++ b/pkgs/applications/graphics/rawtherapee/ReleaseInfo.cmake
@@ -1,4 +1,4 @@
 set(GIT_BRANCH master)
-set(GIT_VERSION 4.2.1050)
-set(GIT_CHANGESET 2d0e5e4feeac9801994d82c5931531f508deb2e9)
-set(GIT_TAGDISTANCE 1050)
+set(GIT_VERSION 4.2.1115)
+set(GIT_CHANGESET 0821eea7b6a4ac2fce1fcf644e06078e161e41e3)
+set(GIT_TAGDISTANCE 1115)
diff --git a/pkgs/applications/graphics/rawtherapee/default.nix b/pkgs/applications/graphics/rawtherapee/default.nix
index 14cbf478bd46..50eb7749031f 100644
--- a/pkgs/applications/graphics/rawtherapee/default.nix
+++ b/pkgs/applications/graphics/rawtherapee/default.nix
@@ -16,6 +16,10 @@ stdenv.mkDerivation rec {
   buildInputs = [ pkgconfig cmake pixman libpthreadstubs gtkmm2 libXau libXdmcp
     lcms2 libiptcdata libcanberra_gtk2 fftw expat pcre libsigcxx ];
 
+  patches = [
+    ./fix-glibmm-output.patch
+  ];
+
   cmakeFlags = [
     "-DPROC_TARGET_NUMBER=2"
   ];
diff --git a/pkgs/applications/graphics/rawtherapee/dev.nix b/pkgs/applications/graphics/rawtherapee/dev.nix
index 2d664e5cf15d..71e41faaaef5 100644
--- a/pkgs/applications/graphics/rawtherapee/dev.nix
+++ b/pkgs/applications/graphics/rawtherapee/dev.nix
@@ -3,13 +3,13 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "rawtherapee-git-2016-09-21";
+  name = "rawtherapee-git-2016-10-10";
 
   src = fetchFromGitHub {
     owner = "Beep6581";
     repo = "RawTherapee";
-    rev = "2d0e5e4feeac9801994d82c5931531f508deb2e9";
-    sha256 = "1d9bi3b6cslm0rhhqf0rx47nlnsnky284vqsxyq3mss6bd8880xh";
+    rev = "0821eea7b6a4ac2fce1fcf644e06078e161e41e3";
+    sha256 = "1nwb6b1qrpdyigwig7bvr42lf7na1ngm0q2cislcvb2v1nmk6nlz";
   };
 
   buildInputs = [ pkgconfig cmake pixman libpthreadstubs gtkmm2 libXau libXdmcp
diff --git a/pkgs/applications/graphics/rawtherapee/fix-glibmm-output.patch b/pkgs/applications/graphics/rawtherapee/fix-glibmm-output.patch
new file mode 100644
index 000000000000..3c87ce64e26b
--- /dev/null
+++ b/pkgs/applications/graphics/rawtherapee/fix-glibmm-output.patch
@@ -0,0 +1,23 @@
+From ca0afa8d5f3cc7d09b6bab32d155a87c550f0d7b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fl=C3=B6ssie?= <floessie.mail@gmail.com>
+Date: Sat, 1 Oct 2016 12:38:24 +0200
+Subject: [PATCH] Fix incompatibility with glibmm 2.50 (#3440)
+
+Kudos to @Hombre57 for the suggestion.
+---
+ rtgui/dirbrowser.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rtgui/dirbrowser.cc b/rtgui/dirbrowser.cc
+index d3fc8bf..6f25f0f 100644
+--- a/rtgui/dirbrowser.cc
++++ b/rtgui/dirbrowser.cc
+@@ -59,7 +59,7 @@ std::vector<Glib::ustring> listSubDirs (const Glib::RefPtr<Gio::File>& dir, bool
+     } catch (const Glib::Exception& exception) {
+ 
+         if (options.rtSettings.verbose) {
+-            std::cerr << "Failed to list subdirectories of \"" << dir << "\": " << exception.what () << std::endl;
++            std::cerr << "Failed to list subdirectories of \"" << dir->get_basename() << "\": " << exception.what () << std::endl;
+         }
+ 
+     }
diff --git a/pkgs/applications/graphics/simple-scan/default.nix b/pkgs/applications/graphics/simple-scan/default.nix
index 8af753ac29c4..8a24eab22007 100644
--- a/pkgs/applications/graphics/simple-scan/default.nix
+++ b/pkgs/applications/graphics/simple-scan/default.nix
@@ -1,18 +1,18 @@
 { stdenv, fetchurl, cairo, colord, glib, gtk3, gusb, intltool, itstool
-, libusb1, libxml2, pkgconfig, sane-backends, vala_0_23, wrapGAppsHook
+, libusb1, libxml2, pkgconfig, sane-backends, vala_0_32, wrapGAppsHook
 , gnome3 }:
 
 stdenv.mkDerivation rec {
   name = "simple-scan-${version}";
-  version = "3.21.1";
+  version = "${major_version}.0.1";
+  major_version = "3.22";
 
   src = fetchurl {
-    sha256 = "00w206isni8m8qd9m8x0644s1gqg11pvgnw6zav33b0bs2h2kk79";
-    url = "https://launchpad.net/simple-scan/3.21/${version}/+download/${name}.tar.xz";
+    url = "https://launchpad.net/simple-scan/${major_version}/${version}/+download/${name}.tar.xz";
+    sha256 = "0l1b3llkdlqq0bcjx1cadba67l2zb4zfykdaprpjbjbr6gkbc1f5";
   };
 
-  buildInputs = [ cairo colord glib gusb gtk3 libusb1 libxml2 sane-backends
-    vala_0_23 ];
+  buildInputs = [ cairo colord glib gnome3.defaultIconTheme gusb gtk3 libusb1 libxml2 sane-backends vala_0_32 ];
   nativeBuildInputs = [ intltool itstool pkgconfig wrapGAppsHook ];
 
   configureFlags = [ "--disable-packagekit" ];
@@ -27,18 +27,8 @@ stdenv.mkDerivation rec {
   '';
 
   postInstall = ''
-    (
-    cd ${gnome3.defaultIconTheme}/share/icons/Adwaita
-
-    for f in `find . | grep 'scanner\.'` 
-    do
-      local outFile="`echo "$out/share/icons/hicolor/$f" | sed \
-        -e 's#/devices/#/apps/#g' \
-        -e 's#scanner\.#simple-scan\.#g'`"
-      mkdir -p "`realpath -m "$outFile/.."`"
-      cp "$f" "$outFile"
-    done
-    )
+    mkdir -p $out/share/icons
+    mv $out/share/simple-scan/icons/* $out/share/icons/
   '';
 
   enableParallelBuilding = true;
diff --git a/pkgs/applications/misc/hugo/default.nix b/pkgs/applications/misc/hugo/default.nix
index 90cf8de615d7..cc4f0d2e773e 100644
--- a/pkgs/applications/misc/hugo/default.nix
+++ b/pkgs/applications/misc/hugo/default.nix
@@ -2,17 +2,23 @@
 
 buildGoPackage rec {
   name = "hugo-${version}";
-  version = "v0.16";
-  rev = "8b54843a0db694facbaf368af4e777d0ae5fb992";
+  version = "0.17";
 
   goPackagePath = "github.com/spf13/hugo";
 
   src = fetchFromGitHub {
-    inherit rev;
     owner = "spf13";
     repo = "hugo";
-    sha256 = "135mrdi8i56z9m2sihjrdfab6lrczbfgavwvfrngvi1zxnx7scmv";
+    rev = "v${version}";
+    sha256 = "1h5d7m019r4zhk7xlcdbn4z3w6x7jq2lcdgq7w377688rk58wbgp";
   };
 
   goDeps = ./deps.nix;
+
+  meta = {
+    description = "A fast and modern static website engine.";
+    homepage = https://gohugo.io;
+    maintainers = with stdenv.lib.maintainers; [ schneefux ];
+    license = stdenv.lib.licenses.asl20;
+  };
 }
diff --git a/pkgs/applications/misc/hugo/deps.nix b/pkgs/applications/misc/hugo/deps.nix
index 20d0d8f1c9de..70781708f6eb 100644
--- a/pkgs/applications/misc/hugo/deps.nix
+++ b/pkgs/applications/misc/hugo/deps.nix
@@ -130,8 +130,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/spf13/viper";
-      rev = "c1ccc378a054ea8d4e38d8c67f6938d4760b53dd";
-      sha256 = "0lpdzalqhqp9pwsg63inkxwjji7m0pp42ryw1499bqbjp97hriq0";
+      rev = "ec4eb2fa8549869ae7a2accd4fcc83d1c0555c15";
+      sha256 = "018niqyrg09andj3g08jalflq2ypz9bp7qb1mbk50kfly29lkih7";
     };
   }
   {
@@ -139,8 +139,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/spf13/pflag";
-      rev = "367864438f1b1a3c7db4da06a2f55b144e6784e0";
-      sha256 = "03c6654hv4v1fj79i5sri3p9q2afqgicka4nicb6fr4kcfkkgbfp";
+      rev = "b83537d79690b75cac5e021b036ae16792bf0f20";
+      sha256 = "19blhq00rnynv11nnvixisx4h1429rp5bik13k661ixw0421qqyx";
     };
   }
   {
@@ -314,4 +314,31 @@
       sha256 = "0dppkmfs0hb5vcqli191x9yss5vvlx29qxjcywhdfirc89rn0sni";
     };
   }
+  {
+    goPackagePath = "github.com/nicksnyder/go-i18n";
+    fetch = {
+      type = "git";
+      url = "https://github.com/nicksnyder/go-i18n";
+      rev = "e6c90c3ceece7f43060f843b495c3c9c031f5575";
+      sha256 = "1i1hqvq05lk12wnrhayca66pvfbyjnj7dm0lr0hn5qhb2i8k84kd";
+    };
+  }
+  {
+    goPackagePath = "github.com/pelletier/go-toml";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pelletier/go-toml";
+      rev = "45932ad32dfdd20826f5671da37a5f3ce9f26a8d";
+      sha256 = "1rs25xqlpz2j9gqii144qnkvhsgzhwgy9ild7yvxhnbs2mybgix7";
+    };
+  }
+  {
+    goPackagePath = "github.com/pelletier/go-buffruneio";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pelletier/go-buffruneio";
+      rev = "df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d";
+      sha256 = "0jwn2g4jfdb3wvpqisd8h055099pwx6c5i3bb4zxk5l9vybg1c5f";
+    };
+  }
 ]
diff --git a/pkgs/applications/misc/qtpass/default.nix b/pkgs/applications/misc/qtpass/default.nix
index cca8d05ea5cf..eee2dffb0e1c 100644
--- a/pkgs/applications/misc/qtpass/default.nix
+++ b/pkgs/applications/misc/qtpass/default.nix
@@ -1,12 +1,14 @@
-{ stdenv, fetchzip, git, gnupg, makeQtWrapper, pass, qtbase, qtsvg, qttools, qmakeHook }:
+{ stdenv, fetchFromGitHub, git, gnupg, makeQtWrapper, pass, qtbase, qtsvg, qttools, qmakeHook }:
 
 stdenv.mkDerivation rec {
   name = "qtpass-${version}";
-  version = "1.1.3";
+  version = "1.1.4";
 
-  src = fetchzip {
-    url = "https://github.com/IJHack/qtpass/archive/v${version}.tar.gz";
-    sha256 = "114rqvd2jl98c75zmhdwfmp44kxa4v459naiivb4w020d60ziq7l";
+  src = fetchFromGitHub {
+    owner  = "IJHack";
+    repo   = "QtPass";
+    rev    = "v${version}";
+    sha256 = "0jxb15jn6vv54wb2z52wv9b2mq38xff8akyzwj5xx2332bc9xra2";
   };
 
   buildInputs = [ git gnupg pass qtbase qtsvg qttools ];
diff --git a/pkgs/applications/misc/styx/default.nix b/pkgs/applications/misc/styx/default.nix
index e44efc0f16d8..29d7067e2355 100644
--- a/pkgs/applications/misc/styx/default.nix
+++ b/pkgs/applications/misc/styx/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name    = "styx-${version}";
-  version = "0.1.0";
+  version = "0.2.0";
 
   src = fetchFromGitHub {
     owner  = "styx-static";
     repo   = "styx";
     rev    = "v${version}";
-    sha256 = "0lz6mfawschfjg4mvfsqz9dv884x2lcg787zjdlnhdi5yqmjx29r";
+    sha256 = "1bcd0ss628mhchrl85fy6acxcxqvm1d3qywfaxhikahl1r7inpwg";
   };
 
   server = caddy.bin;
@@ -28,7 +28,6 @@ stdenv.mkDerivation rec {
     asciidoctor $sourceRoot/doc/manual.doc -o $out/share/doc/styx/index.html
 
     substituteAllInPlace $out/bin/styx
-    substituteAllInPlace $out/share/styx/sample/templates/feed.nix
     substituteAllInPlace $out/share/doc/styx/index.html
   '';
 
diff --git a/pkgs/applications/misc/tasksh/default.nix b/pkgs/applications/misc/tasksh/default.nix
index 9283469fcc39..333ed411941b 100644
--- a/pkgs/applications/misc/tasksh/default.nix
+++ b/pkgs/applications/misc/tasksh/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "tasksh-${version}";
-  version = "1.0.0";
+  version = "1.1.0";
 
   enableParallelBuilding = true;
 
   src = fetchurl {
-    url = "http://taskwarrior.org/download/tasksh-latest.tar.gz";
-    sha256 = "0ll6pwhw4wsdffacsmpq46fqh084p9mdaa777giqbag3b8gwik4s";
+    url = "http://taskwarrior.org/download/${name}.tar.gz";
+    sha256 = "0900nzfgvhcc106pl68d0v0qszvdc34yi59mw70b34b2gmkwdxzf";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/applications/misc/zk-shell/default.nix b/pkgs/applications/misc/zk-shell/default.nix
new file mode 100644
index 000000000000..9f090e608236
--- /dev/null
+++ b/pkgs/applications/misc/zk-shell/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, buildPythonApplication, fetchFromGitHub, pythonPackages }:
+
+buildPythonApplication rec {
+  version = "1.0.0";
+  name = "zk-shell-" + version;
+
+  src = fetchFromGitHub {
+    owner = "rgs1";
+    repo = "zk_shell";
+    rev = "v${version}";
+    sha256 = "0zisvvlclsf4sdh7dpqcl1149xbxw6pi1aqcwjbqblgf8m4nm0c7";
+  };
+
+  propagatedBuildInputs = (with pythonPackages; [
+    ansi kazoo nose six tabulate twitter readline
+  ]);
+
+  #requires a running zookeeper, don't know how to fix that for the moment
+  doCheck = false;
+
+  meta = {
+    description = "A powerful & scriptable shell for Apache ZooKeeper";
+    homepage = https://github.com/rgs1/zk_shell;
+    license = stdenv.lib.licenses.asl20;
+    maintainers = [ stdenv.lib.maintainers.mahe ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
index 39a917394681..81fca6614a59 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
@@ -70,11 +70,11 @@ let
 in
 stdenv.mkDerivation rec {
   name = "flashplayer-${version}";
-  version = "11.2.202.635";
+  version = "11.2.202.637";
 
   src = fetchurl {
     url = "https://fpdownload.macromedia.com/pub/flashplayer/installers/archive/fp_${version}_archive.zip";
-    sha256 = "0xlaf6152ksknigrv6fsasscyfnjkxml4nl22apiwzb34nrbzk3m";
+    sha256 = "0xp1pxhrnam4yi8wfwaifqx7m2im0zx2xv8xgbdm0llrzbkc57mh";
   };
 
   nativeBuildInputs = [ unzip ];
diff --git a/pkgs/applications/networking/cluster/kops/default.nix b/pkgs/applications/networking/cluster/kops/default.nix
new file mode 100644
index 000000000000..80747e44bf53
--- /dev/null
+++ b/pkgs/applications/networking/cluster/kops/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, buildGoPackage, fetchFromGitHub, go-bindata  }:
+
+buildGoPackage rec {
+  name = "kops-${version}";
+  version = "1.4.0";
+  rev = "v${version}";
+
+  goPackagePath = "k8s.io/kops";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "kubernetes";
+    repo = "kops";
+    sha256 = "1jwgn7l8c639j5annwymqjdw5mcajwn58y21042jy5lhgdh8pdf5";
+  };
+
+  buildInputs = [go-bindata];
+  subPackages = ["cmd/kops"];
+
+  preBuild = ''
+    (cd go/src/k8s.io/kops
+     go-bindata -o upup/models/bindata.go -pkg models -prefix upup/models/ upup/models/...)
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Easiest way to get a production Kubernetes up and running";
+    homepage = https://github.com/kubernetes/kops;
+    license = licenses.asl20;
+    maintainers = with maintainers; [offline];
+  };
+}
diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix
index 70b810c35373..f22cc57b6273 100644
--- a/pkgs/applications/networking/cluster/terraform/default.nix
+++ b/pkgs/applications/networking/cluster/terraform/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "terraform-${version}";
-  version = "0.7.4";
+  version = "0.7.6";
   rev = "v${version}";
 
   goPackagePath = "github.com/hashicorp/terraform";
@@ -11,7 +11,7 @@ buildGoPackage rec {
     inherit rev;
     owner = "hashicorp";
     repo = "terraform";
-    sha256 = "1mj9kk9awhfv717xf9d8nc35xva8wqhbgls7cbgycg550cc2hf85";
+    sha256 = "02k3g38jk2dm70dkfl4w6is563m4abqvip5srv8bhv7xcgj0nfkq";
   };
 
   postInstall = ''
diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix
index 51e7e671175d..90c6bce65060 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 = "11.4.21";
+  version = "11.4.22";
   sha256 =
     {
-      "x86_64-linux" = "179ajawqy43jhgvysc386hdyz9hdandwvh8m2y2rassvycn9kr8z";
-      "i686-linux"   = "1y4z9rb06f2a3cj51xawgpzgar9x7gvr4jrazncqfpfqkv7zayv1";
+      "x86_64-linux" = "1fpwknf8as2h6d8d11nb8i0q4ap5r6fvii919b3pj5d29jgfd25l";
+      "i686-linux"   = "1dv60ijb93464js34vk3l8hm8a57zdpkzhrfkv2kp3v3172cqj8s";
     }."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
 
   arch =
diff --git a/pkgs/applications/networking/instant-messengers/franz/default.nix b/pkgs/applications/networking/instant-messengers/franz/default.nix
index 3686862527e5..8d7b16337f28 100644
--- a/pkgs/applications/networking/instant-messengers/franz/default.nix
+++ b/pkgs/applications/networking/instant-messengers/franz/default.nix
@@ -1,14 +1,25 @@
-{ stdenv, fetchurl
+{ stdenv, fetchurl, makeDesktopItem
 , xorg, gtk2, atk, glib, pango, gdk_pixbuf, cairo, freetype, fontconfig
 , gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify }:
 
-stdenv.mkDerivation rec {
+let
   bits = if stdenv.system == "x86_64-linux" then "x64"
          else "ia32";
+
   version = "4.0.4";
+
+  desktopItem = makeDesktopItem rec {
+    name = "Franz";
+    exec = name;
+    icon = "franz";
+    desktopName = name;
+    genericName = "Franz messenger";
+    categories = "Network;";
+  };
+in stdenv.mkDerivation rec {
   name = "franz-${version}";
   src = fetchurl {
-    url = "https://github.com/meetfranz/franz-app/releases/download/4.0.4/Franz-linux-${bits}-${version}.tgz";
+    url = "https://github.com/meetfranz/franz-app/releases/download/${version}/Franz-linux-${bits}-${version}.tgz";
     sha256 = if bits == "x64" then
       "0ssym0jfrig474g6j67g1jfybjkxnyhbqqjvrs8z6ihwlyd3rrk5" else
       "16l9jma2hiwzl9l41yhrwribcgmxca271rq0cfbbm9701mmmciyy";
@@ -36,6 +47,10 @@ stdenv.mkDerivation rec {
     mkdir -p $out/bin $out/share/franz
     cp -r * $out/share/franz
     ln -s $out/share/franz/Franz $out/bin
+
+    mkdir -p $out/share/applications $out/share/pixmaps
+    ln -s ${desktopItem}/share/applications/* $out/share/applications
+    ln -s $out/share/franz/resources/app.asar.unpacked/assets/franz.png $out/share/pixmaps
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-facebook/default.nix b/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-facebook/default.nix
new file mode 100644
index 000000000000..cc58736afa59
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-facebook/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, pidgin, glib, json_glib, mercurial, autoreconfHook } :
+
+stdenv.mkDerivation rec {
+  name = "purple-facebook-${version}";
+  version = "2016-04-09";
+
+  src = fetchFromGitHub {
+    owner = "dequis";
+    repo = "purple-facebook";
+    rev = "66ee77378d82";
+    sha256 = "0kr9idl79h70lacd3cvpmzvfd6il3b5xm2fj1sj96l7bjhiw9s3y";
+  };
+
+  preAutoreconf = "./autogen.sh";
+
+  makeFlags = [
+    "PLUGIN_DIR_PURPLE=/lib/pidgin/"
+    "DATA_ROOT_DIR_PURPLE=/share"
+    "DESTDIR=$(out)"
+  ];
+
+  postInstall =  ''
+    mkdir -p $out/lib/purple-2
+    cp pidgin/libpurple/protocols/facebook/.libs/*.so $out/lib/purple-2/
+  '';
+
+  buildInputs = [ pidgin glib json_glib mercurial autoreconfHook];
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Facebook protocol plugin for libpurple";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ davorb ];
+  };
+}
diff --git a/pkgs/applications/networking/instant-messengers/rambox/default.nix b/pkgs/applications/networking/instant-messengers/rambox/default.nix
index 802c814dbac6..e1cfb2fceddb 100644
--- a/pkgs/applications/networking/instant-messengers/rambox/default.nix
+++ b/pkgs/applications/networking/instant-messengers/rambox/default.nix
@@ -1,11 +1,27 @@
-{ stdenv, fetchurl
+{ stdenv, fetchurl, makeDesktopItem
 , xorg, gtk2, atk, glib, pango, gdk_pixbuf, cairo, freetype, fontconfig
 , gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify }:
 
-stdenv.mkDerivation rec {
+let
   bits = if stdenv.system == "x86_64-linux" then "x64"
          else "ia32";
+
   version = "0.4.4";
+
+  myIcon = fetchurl {
+    url = "https://raw.githubusercontent.com/saenzramiro/rambox/9e4444e6297dd35743b79fe23f8d451a104028d5/resources/Icon.png";
+    sha256 = "0r00l4r5mlbgn689i3rp6ks11fgs4h2flvrlggvm2qdd974d1x0b";
+  };
+
+  desktopItem = makeDesktopItem rec {
+    name = "Rambox";
+    exec = name;
+    icon = myIcon;
+    desktopName = name;
+    genericName = "Rambox messenger";
+    categories = "Network;";
+  };
+in stdenv.mkDerivation rec {
   name = "rambox-${version}";
   src = fetchurl {
     url = "https://github.com/saenzramiro/rambox/releases/download/${version}/Rambox-${version}-${bits}.tar.gz";
@@ -32,6 +48,9 @@ stdenv.mkDerivation rec {
     mkdir -p $out/bin $out/share/rambox
     cp -r * $out/share/rambox
     ln -s $out/share/rambox/Rambox $out/bin
+
+    mkdir -p $out/share/applications
+    ln -s ${desktopItem}/share/applications/* $out/share/applications
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/instant-messengers/slack/default.nix b/pkgs/applications/networking/instant-messengers/slack/default.nix
index 8a7d2bbd126f..9f2fee47d8d0 100644
--- a/pkgs/applications/networking/instant-messengers/slack/default.nix
+++ b/pkgs/applications/networking/instant-messengers/slack/default.nix
@@ -4,7 +4,7 @@
 
 let
 
-  version = "2.1.2";
+  version = "2.2.1";
 
   rpath = stdenv.lib.makeLibraryPath [
     alsaLib
@@ -43,7 +43,7 @@ let
     if stdenv.system == "x86_64-linux" then
       fetchurl {
         url = "https://slack-ssb-updates.global.ssl.fastly.net/linux_releases/slack-desktop-${version}-amd64.deb";
-        sha256 = "0bmz9d0p6676lzl4qxy6xmcampr2ilkc0mhh67860kcxjaz6sms6";
+        sha256 = "1x08bmkanllv3lpi2s722xs7qia8igf6zxzkc3g7vs5jms3mdrad";
       }
     else
       throw "Slack is not supported on ${stdenv.system}";
diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix
index 038f4cb1a739..92fe9c9d01be 100644
--- a/pkgs/applications/networking/mumble/default.nix
+++ b/pkgs/applications/networking/mumble/default.nix
@@ -108,12 +108,12 @@ let
   };
 
   stableSource = rec {
-    version = "1.2.16";
+    version = "1.2.17";
     qtVersion = 4;
 
     src = fetchurl {
       url = "https://github.com/mumble-voip/mumble/releases/download/${version}/mumble-${version}.tar.gz";
-      sha256 = "1ikswfm7zhwqcwcc1fwk0i9jjgqng49s0yilw50s34bgg1h3im7b";
+      sha256 = "176br3b0pv5sz3zvgzsz9rxr3n79irlm902h7n1wh4f6vbph2dhw";
     };
   };
 
diff --git a/pkgs/applications/office/scribus/default.nix b/pkgs/applications/office/scribus/default.nix
index d592e149588a..e1c80c50ee51 100644
--- a/pkgs/applications/office/scribus/default.nix
+++ b/pkgs/applications/office/scribus/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, freetype, lcms, libtiff, libxml2
-, libart_lgpl, qt4, python, cups, fontconfig, libjpeg
+, libart_lgpl, qt4, pythonFull, cups, fontconfig, libjpeg
 , zlib, libpng, xorg, cairo, podofo, aspell, boost, cmake }:
 
 stdenv.mkDerivation rec {
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = with xorg;
     [ pkgconfig cmake freetype lcms libtiff libxml2 libart_lgpl qt4
-      python cups fontconfig
+      pythonFull cups fontconfig
       libjpeg zlib libpng podofo aspell cairo
       boost # for internal 2geom library
       libXaw libXext libX11 libXtst libXi libXinerama
diff --git a/pkgs/applications/version-management/git-and-tools/gitflow/default.nix b/pkgs/applications/version-management/git-and-tools/gitflow/default.nix
index 3fe7dec8f3bb..ff7c652c622d 100644
--- a/pkgs/applications/version-management/git-and-tools/gitflow/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/gitflow/default.nix
@@ -2,14 +2,14 @@
 
 stdenv.mkDerivation rec {
   pname = "gitflow";
-  version = "1.9.1";
+  version = "1.10.0";
   name = "${pname}-${version}";
 
   src = fetchFromGitHub {
     owner = "petervanderdoes";
     repo = pname;
     rev = version;
-    sha256 = "0ad2421r3iq4xrdy46f4rrqbm8r3xphqcsdj3gqy8fnlrmxw5dfw";
+    sha256 = "1l67yizbcmgkhz8qn1zam2p04y8ha9b2gb2d89rff9y528b2m5z6";
   };
 
   preBuild = ''
diff --git a/pkgs/applications/version-management/gitlab-shell/default.nix b/pkgs/applications/version-management/gitlab-shell/default.nix
index 863faa16eaf4..2293d11331df 100644
--- a/pkgs/applications/version-management/gitlab-shell/default.nix
+++ b/pkgs/applications/version-management/gitlab-shell/default.nix
@@ -1,14 +1,14 @@
 { stdenv, ruby, bundler, fetchFromGitLab }:
 
 stdenv.mkDerivation rec {
-  version = "3.6.0";
+  version = "3.6.1";
   name = "gitlab-shell-${version}";
 
   srcs = fetchFromGitLab {
     owner = "gitlab-org";
     repo = "gitlab-shell";
     rev = "v${version}";
-    sha256 = "1cc8lnz06d1q2hdrgnsqk50wj0x950w81jsalfjxmx5lais4qgg9";
+    sha256 = "0j4kwsfzb7l871fma1b1q9h33vyng2nnghn5zz192sv4yp0w2pvq";
   };
 
   buildInputs = [
diff --git a/pkgs/applications/version-management/gitlab/Gemfile b/pkgs/applications/version-management/gitlab/Gemfile
index eb19a29ef0ca..eb3054dfd5b5 100644
--- a/pkgs/applications/version-management/gitlab/Gemfile
+++ b/pkgs/applications/version-management/gitlab/Gemfile
@@ -234,7 +234,7 @@ gem 'net-ssh',            '~> 3.0.1'
 gem 'base32',             '~> 0.3.0'
 
 # Sentry integration
-gem 'sentry-raven', '~> 1.1.0'
+gem 'sentry-raven', '~> 2.0.0'
 
 gem 'premailer-rails', '~> 1.9.0'
 
@@ -331,7 +331,7 @@ gem 'newrelic_rpm', '~> 3.16'
 
 gem 'octokit', '~> 4.3.0'
 
-gem 'mail_room', '~> 0.8'
+gem 'mail_room', '~> 0.8.1'
 
 gem 'email_reply_parser', '~> 0.5.8'
 
diff --git a/pkgs/applications/version-management/gitlab/Gemfile.lock b/pkgs/applications/version-management/gitlab/Gemfile.lock
index 468000e4d874..69f2af4f6f03 100644
--- a/pkgs/applications/version-management/gitlab/Gemfile.lock
+++ b/pkgs/applications/version-management/gitlab/Gemfile.lock
@@ -401,7 +401,7 @@ GEM
       systemu (~> 2.6.2)
     mail (2.6.4)
       mime-types (>= 1.16, < 4)
-    mail_room (0.8.0)
+    mail_room (0.8.1)
     method_source (0.8.2)
     mime-types (2.99.3)
     mimemagic (0.3.0)
@@ -667,8 +667,8 @@ GEM
       activesupport (>= 3.1)
     select2-rails (3.5.9.3)
       thor (~> 0.14)
-    sentry-raven (1.1.0)
-      faraday (>= 0.7.6)
+    sentry-raven (2.0.2)
+      faraday (>= 0.7.6, < 0.10.x)
     settingslogic (2.0.9)
     sexp_processor (4.7.0)
     sham_rack (1.3.6)
@@ -897,7 +897,7 @@ DEPENDENCIES
   license_finder (~> 2.1.0)
   licensee (~> 8.0.0)
   loofah (~> 2.0.3)
-  mail_room (~> 0.8)
+  mail_room (~> 0.8.1)
   method_source (~> 0.8)
   minitest (~> 5.7.0)
   mousetrap-rails (~> 1.4.6)
@@ -959,7 +959,7 @@ DEPENDENCIES
   sdoc (~> 0.3.20)
   seed-fu (~> 2.3.5)
   select2-rails (~> 3.5.9)
-  sentry-raven (~> 1.1.0)
+  sentry-raven (~> 2.0.0)
   settingslogic (~> 2.0.9)
   sham_rack (~> 1.3.6)
   shoulda-matchers (~> 2.8.0)
diff --git a/pkgs/applications/version-management/gitlab/default.nix b/pkgs/applications/version-management/gitlab/default.nix
index c5b151174e0c..7d6a85a81aa6 100644
--- a/pkgs/applications/version-management/gitlab/default.nix
+++ b/pkgs/applications/version-management/gitlab/default.nix
@@ -24,7 +24,7 @@ in
 
 stdenv.mkDerivation rec {
   name = "gitlab-${version}";
-  version = "8.12.1";
+  version = "8.12.6";
 
   buildInputs = [ env ruby bundler tzdata git nodejs procps ];
 
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
     owner = "gitlabhq";
     repo = "gitlabhq";
     rev = "v${version}";
-    sha256 = "1aq91q89g3xb28v833748y9ywy9d6551zn3hb22cqphjijkn3wgl";
+    sha256 = "14dbr8a1il75xz83hkdjm3yq49168mkn62l86bi36n5pfw44kcvh";
   };
 
   patches = [
diff --git a/pkgs/applications/version-management/gitlab/gemset.nix b/pkgs/applications/version-management/gitlab/gemset.nix
index 2525e924be41..bf552b5d4eff 100644
--- a/pkgs/applications/version-management/gitlab/gemset.nix
+++ b/pkgs/applications/version-management/gitlab/gemset.nix
@@ -1314,10 +1314,10 @@
   mail_room = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "00jaj42z6rhgpxprs7wb0a9gq33zsfalah3ddpynxldij5iz8mg0";
+      sha256 = "15zjqscdzm4rv8qpz8y8334nc5kvlqp0xk4wiics98hbjs8cd59i";
       type = "gem";
     };
-    version = "0.8.0";
+    version = "0.8.1";
   };
   method_source = {
     source = {
@@ -2299,10 +2299,10 @@
   sentry-raven = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0fjfq3hkfv3a415mk6cjwknnxg9d71x0b8x7szgbwhyqa8ahj3j3";
+      sha256 = "18k3n1yv077h28wszamhlifja7z2kxjdlm48aslc7zf7rm14fq90";
       type = "gem";
     };
-    version = "1.1.0";
+    version = "2.0.2";
   };
   settingslogic = {
     source = {
diff --git a/pkgs/applications/version-management/smartgithg/default.nix b/pkgs/applications/version-management/smartgithg/default.nix
index 485e8cc6c21e..b4b0e74a79c8 100644
--- a/pkgs/applications/version-management/smartgithg/default.nix
+++ b/pkgs/applications/version-management/smartgithg/default.nix
@@ -8,17 +8,16 @@
 
 stdenv.mkDerivation rec {
   name = "smartgithg-${version}";
-  version = "7_1_2";
+  version = "8_0_3";
 
   src = fetchurl {
     url = "http://www.syntevo.com/static/smart/download/smartgit/smartgit-linux-${version}.tar.gz";
-    sha256 = "18jw4g2akhj6h9w8378kacv7ws35ndcnc3kkhci9iypwy432ak8d";
+    sha256 = "1ghxjg5dm22kwfrq26nqp4qhh6h7f4l4fnf1cx9cksd30ypwy223";
   };
 
-  buildInputs = [
-    makeWrapper
-    jre
-  ];
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildInputs = [ jre ];
 
   buildCommand = let
     pkg_path = "$out/${name}";
diff --git a/pkgs/applications/video/handbrake/default.nix b/pkgs/applications/video/handbrake/default.nix
index 9f257cde21f9..1dbe34553b0a 100644
--- a/pkgs/applications/video/handbrake/default.nix
+++ b/pkgs/applications/video/handbrake/default.nix
@@ -44,7 +44,6 @@ stdenv.mkDerivation rec {
     lame ffmpeg libdvdread libdvdnav libbluray mp4v2 mpeg2dec x264 x265 libvpx
   ] ++ buildInputsX;
 
-
   src = fetchurl {
     url = "http://download.handbrake.fr/releases/${version}/HandBrake-${version}.tar.bz2";
     sha256 = "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv";
@@ -75,6 +74,11 @@ stdenv.mkDerivation rec {
     cd build
   '';
 
+  LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ x265 ];
+  preFixup = ''
+    gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}")
+  '';
+
   meta = {
     homepage = http://handbrake.fr/;
     description = "A tool for ripping DVDs into video files";
diff --git a/pkgs/applications/virtualization/docker-distribution/default.nix b/pkgs/applications/virtualization/docker-distribution/default.nix
new file mode 100644
index 000000000000..4850d7d9f5f5
--- /dev/null
+++ b/pkgs/applications/virtualization/docker-distribution/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "distribution-${version}";
+  version = "2.5.1";
+  rev = "v${version}";
+
+  goPackagePath = "github.com/docker/distribution";
+
+  src = fetchFromGitHub {
+    owner = "docker";
+    repo = "distribution";
+    inherit rev;
+    sha256 = "08nxcsl9bc3k9gav2mkqccm5byrlfcgy6qaqaywiyza0b0cn4kdc";
+  };
+
+  meta = with stdenv.lib; {
+    description = "The Docker toolset to pack, ship, store, and deliver content";
+    license = licenses.asl20;
+    maintainers = [ maintainers.globin ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/virtualization/xen/4.5.0.nix b/pkgs/applications/virtualization/xen/4.5.0.nix
deleted file mode 100644
index 887734ac6b99..000000000000
--- a/pkgs/applications/virtualization/xen/4.5.0.nix
+++ /dev/null
@@ -1,79 +0,0 @@
-{ callPackage, fetchurl, fetchgit, ... } @ args:
-
-let
-  # Xen 4.5.0
-  xenConfig = rec {
-    version = "4.5.0";
-    name = "xen-${version}";
-
-    src = fetchurl {
-      url = "http://bits.xensource.com/oss-xen/release/${version}/${name}.tar.gz";
-      sha256 = "0fvg00d596gh6cfm51xr8kj2mghcyivrf6np3dafnbldnbi41nsv";
-    };
-
-    # Sources needed to build the xen tools and tools/firmware.
-    firmwareGits =
-      [ # tag 1.7.5
-        { git = { name = "seabios";
-                  url = https://xenbits.xen.org/git-http/seabios.git;
-                  rev = "e51488c5f8800a52ac5c8da7a31b85cca5cc95d2";
-                  sha256 = "0jk54ybhmw97pzyhpm6jr2x99f702kbn0ipxv5qxcbynflgdazyb";
-                };
-          patches = [ ./0000-qemu-seabios-enable-ATA_DMA.patch ];
-        }
-        { git = { name = "ovmf";
-                  url = https://xenbits.xen.org/git-http/ovmf.git;
-                  rev = "447d264115c476142f884af0be287622cd244423";
-                  sha256 = "7086f882495a8be1497d881074e8f1005dc283a5e1686aec06c1913c76a6319b";
-                };
-        }
-      ];
-
-    toolsGits =
-      [ # tag qemu-xen-4.5.0
-        { git = { name = "qemu-xen";
-                  url = https://xenbits.xen.org/git-http/qemu-xen.git;
-                  rev = "1ebb75b1fee779621b63e84fefa7b07354c43a99";
-                  sha256 = "0yp9vmna3yl28vm5fkirghzhndaihmsm34fjzgr9sl6s46wx5yzg";
-                };
-        }
-        # tag xen-4.5.0
-        { git = { name = "qemu-xen-traditional";
-                  url = https://xenbits.xen.org/git-http/qemu-xen-traditional.git;
-                  rev = "b0d42741f8e9a00854c3b3faca1da84bfc69bf22";
-                  sha256 = "1lxlf1s81y5j0rhzzm1f4sbyrnbvd32vxiczs1qjcg6ls866vlki";
-                };
-        }
-        { git = { name = "xen-libhvm";
-                  url = https://github.com/ts468/xen-libhvm;
-                  rev = "442dcc4f6f4e374a51e4613532468bd6b48bdf63";
-                  sha256 = "9ba97c39a00a54c154785716aa06691d312c99be498ebbc00dc3769968178ba8";
-                };
-          description = ''
-            Helper library for reading ACPI and SMBIOS firmware values
-            from the host system for use with the HVM guest firmware
-            pass-through feature in Xen.
-            '';
-          #license = licenses.bsd2;
-        }
-      ];
-
-    xenserverPatches =
-      let
-        patches = {
-          url = https://github.com/ts468/xen-4.5.pg.git;
-          rev = "3442b65b490f43c817cbc53369220d0b1ab9b785";
-          sha256 = "31436c15def0a300b3ea1a63b2208c4a3bcbb143db5c6488d4db370b3ceeb845";
-        };
-      in ''
-        cp -r ${fetchgit patches}/master patches
-        quilt push -a
-        substituteInPlace tools/xenguest/Makefile --replace "_BSD_SOURCE" "_DEFAULT_SOURCE"
-      '';
-
-    xenPatches = [ ./0001-libxl-Spice-image-compression-setting-support-for-up.patch
-                   ./0002-libxl-Spice-streaming-video-setting-support-for-upst.patch
-                   ./0003-Add-qxl-vga-interface-support-for-upstream-qem.patch ];
-  };
-
-in callPackage ./generic.nix (args // { xenConfig=xenConfig; })
diff --git a/pkgs/applications/virtualization/xen/4.5.2.nix b/pkgs/applications/virtualization/xen/4.5.nix
index e0b13edb1f23..271ab7e7fe96 100644
--- a/pkgs/applications/virtualization/xen/4.5.2.nix
+++ b/pkgs/applications/virtualization/xen/4.5.nix
@@ -1,47 +1,41 @@
 { callPackage, fetchurl, fetchgit, ... } @ args:
 
 let
-  # Xen 4.5.2
+  # Xen 4.5.5
   xenConfig = rec {
-    version = "4.5.2";
+    version = "4.5.5";
     name = "xen-${version}";
 
     src = fetchurl {
       url = "http://bits.xensource.com/oss-xen/release/${version}/${name}.tar.gz";
-      sha256 = "1s7702zrxpsmx4vqvll4x2s762cfdiss4vgpx5s4jj7a9sn5v7jc";
+      sha256 = "1y74ms4yc3znf8jc3fgyq94va2y0pf7jh8m9pfqnpgklywqnw8g2";
     };
 
     # Sources needed to build the xen tools and tools/firmware.
     firmwareGits =
-      [ # tag 1.7.5
+      [
         { git = { name = "seabios";
                   url = https://xenbits.xen.org/git-http/seabios.git;
-                  rev = "e51488c5f8800a52ac5c8da7a31b85cca5cc95d2";
+                  rev = "rel-1.7.5";
                   sha256 = "0jk54ybhmw97pzyhpm6jr2x99f702kbn0ipxv5qxcbynflgdazyb";
                 };
           patches = [ ./0000-qemu-seabios-enable-ATA_DMA.patch ];
         }
-        { git = { name = "ovmf";
-                  url = https://xenbits.xen.org/git-http/ovmf.git;
-                  rev = "cb9a7ebabcd6b8a49dc0854b2f9592d732b5afbd";
-                  sha256 = "07zmdj90zjrzip74fvd4ss8n8njk6cim85s58mc6snxmqqv7gmcq";
-                };
-        }
       ];
 
     toolsGits =
-      [ # tag qemu-xen-4.5.2
+      [
         { git = { name = "qemu-xen";
                   url = https://xenbits.xen.org/git-http/qemu-xen.git;
-                  rev = "e5a1bb22cfb307db909dbd3404c48e5bbeb9e66d";
-                  sha256 = "00h6hc1y19y9wafxk01hvwm2j8lysz26wi2dnv8md76zxavg4maa";
+                  rev = "refs/tags/qemu-xen-${version}";
+                  sha256 = "014s755slmsc7xzy7qhk9i3kbjr2grxb5yznjp71dl6xxfvnday2";
                 };
         }
-        # tag xen-4.5.2
         { git = { name = "qemu-xen-traditional";
                   url = https://xenbits.xen.org/git-http/qemu-xen-traditional.git;
-                  rev = "dfe880e8d5fdc863ce6bbcdcaebaf918f8689cc0";
-                  sha256 = "07jwpxgk9ls5hma6vv1frnx1aczlvpddlgiyii9qmmlxxwjs21yj";
+                  # rev = "28c21388c2a32259cff37fc578684f994dca8c9f";
+                  rev = "refs/tags/xen-${version}";
+                  sha256 = "0n0ycxlf1wgdjkdl8l2w1i0zzssk55dfv67x8i6b2ima01r0k93r";
                 };
         }
         { git = { name = "xen-libhvm";
diff --git a/pkgs/build-support/build-fhs-userenv/env.nix b/pkgs/build-support/build-fhs-userenv/env.nix
index 1dc71987f543..8bc34d672c96 100644
--- a/pkgs/build-support/build-fhs-userenv/env.nix
+++ b/pkgs/build-support/build-fhs-userenv/env.nix
@@ -89,6 +89,7 @@ let
 
       # symlink other core stuff
       ln -s /host/etc/localtime localtime
+      ln -s /host/etc/zoneinfo zoneinfo
       ln -s /host/etc/machine-id machine-id
       ln -s /host/etc/os-release os-release
 
diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix
index dd5c523b91b5..b3db68a665dc 100644
--- a/pkgs/build-support/docker/default.nix
+++ b/pkgs/build-support/docker/default.nix
@@ -1,12 +1,36 @@
-{ stdenv, lib, callPackage, runCommand, writeReferencesToFile, writeText, vmTools, writeScript
-, docker, shadow, utillinux, coreutils, jshon, e2fsprogs, go, pigz, findutils }:
+{
+  callPackage,
+  coreutils,
+  docker,
+  e2fsprogs,
+  findutils,
+  go,
+  jshon,
+  lib,
+  pkgs,
+  pigz,
+  runCommand,
+  rsync,
+  shadow,
+  stdenv,
+  storeDir ? builtins.storeDir,
+  utillinux,
+  vmTools,
+  writeReferencesToFile,
+  writeScript,
+  writeText,
+}:
 
 # WARNING: this API is unstable and may be subject to backwards-incompatible changes in the future.
-  
+
 rec {
 
+  examples = import ./examples.nix {
+    inherit pkgs buildImage pullImage shadowSetup;
+  };
+
   pullImage = callPackage ./pull.nix {};
-  
+
   # We need to sum layer.tar, not a directory, hence tarsum instead of nix-hash.
   # And we cannot untar it, because then we cannot preserve permissions ecc.
   tarsum = runCommand "tarsum" {
@@ -23,110 +47,138 @@ rec {
 
     cp tarsum $out
   '';
-  
+
   # buildEnv creates symlinks to dirs, which is hard to edit inside the overlay VM
-  mergeDrvs = { drvs, onlyDeps ? false }:
+  mergeDrvs = {
+    derivations,
+    onlyDeps ? false
+  }:
     runCommand "merge-drvs" {
-      inherit drvs onlyDeps;
+      inherit derivations onlyDeps;
     } ''
-      if [ -n "$onlyDeps" ]; then
-        echo $drvs > $out
+      if [[ -n "$onlyDeps" ]]; then
+        echo $derivations > $out
         exit 0
       fi
-        
+
       mkdir $out
-      for drv in $drvs; do
-        echo Merging $drv
-        if [ -d "$drv" ]; then
-          cp -drf --preserve=mode -f $drv/* $out/
+      for derivation in $derivations; do
+        echo "Merging $derivation..."
+        if [[ -d "$derivation" ]]; then
+          # If it's a directory, copy all of its contents into $out.
+          cp -drf --preserve=mode -f $derivation/* $out/
         else
+          # Otherwise treat the derivation as a tarball and extract it
+          # into $out.
           tar -C $out -xpf $drv || true
         fi
       done
     '';
-  
-  shellScript = text:
-    writeScript "script.sh" ''
-      #!${stdenv.shell}
-      set -e
-      export PATH=${coreutils}/bin:/bin
-
-      ${text}
-    '';
 
+  # Helper for setting up the base files for managing users and
+  # groups, only if such files don't exist already. It is suitable for
+  # being used in a runAsRoot script.
   shadowSetup = ''
     export PATH=${shadow}/bin:$PATH
     mkdir -p /etc/pam.d
-    if [ ! -f /etc/passwd ]; then
+    if [[ ! -f /etc/passwd ]]; then
       echo "root:x:0:0::/root:/bin/sh" > /etc/passwd
       echo "root:!x:::::::" > /etc/shadow
     fi
-    if [ ! -f /etc/group ]; then
+    if [[ ! -f /etc/group ]]; then
       echo "root:x:0:" > /etc/group
       echo "root:x::" > /etc/gshadow
     fi
-    if [ ! -f /etc/pam.d/other ]; then
+    if [[ ! -f /etc/pam.d/other ]]; then
       cat > /etc/pam.d/other <<EOF
-account sufficient pam_unix.so
-auth sufficient pam_rootok.so
-password requisite pam_unix.so nullok sha512
-session required pam_unix.so
-EOF
+    account sufficient pam_unix.so
+    auth sufficient pam_rootok.so
+    password requisite pam_unix.so nullok sha512
+    session required pam_unix.so
+    EOF
     fi
-    if [ ! -f /etc/login.defs ]; then
+    if [[ ! -f /etc/login.defs ]]; then
       touch /etc/login.defs
     fi
   '';
 
-  runWithOverlay = { name , fromImage ? null, fromImageName ? null, fromImageTag ? null
-                   , diskSize ? 1024, preMount ? "", postMount ? "", postUmount ? "" }:
+  # Run commands in a virtual machine.
+  runWithOverlay = {
+    name,
+    fromImage ? null,
+    fromImageName ? null,
+    fromImageTag ? null,
+    diskSize ? 1024,
+    preMount ? "",
+    postMount ? "",
+    postUmount ? ""
+  }:
     vmTools.runInLinuxVM (
       runCommand name {
-        preVM = vmTools.createEmptyImage { size = diskSize; fullName = "docker-run-disk"; };
-
+        preVM = vmTools.createEmptyImage {
+          size = diskSize;
+          fullName = "docker-run-disk";
+        };
         inherit fromImage fromImageName fromImageTag;
-        
-        buildInputs = [ utillinux e2fsprogs jshon ];
+
+        buildInputs = [ utillinux e2fsprogs jshon rsync ];
       } ''
       rm -rf $out
-      
+
       mkdir disk
       mkfs /dev/${vmTools.hd}
       mount /dev/${vmTools.hd} disk
       cd disk
 
-      if [ -n "$fromImage" ]; then
-        echo Unpacking base image
+      if [[ -n "$fromImage" ]]; then
+        echo "Unpacking base image..."
         mkdir image
         tar -C image -xpf "$fromImage"
 
-        if [ -z "$fromImageName" ]; then
-          fromImageName=$(jshon -k < image/repositories|head -n1)
+        # If the image name isn't set, read it from the image repository json.
+        if [[ -z "$fromImageName" ]]; then
+          fromImageName=$(jshon -k < image/repositories | head -n 1)
+          echo "From-image name wasn't set. Read $fromImageName."
         fi
-        if [ -z "$fromImageTag" ]; then
-          fromImageTag=$(jshon -e $fromImageName -k < image/repositories|head -n1)
+
+        # If the tag isn't set, use the name as an index into the json
+        # and read the first key found.
+        if [[ -z "$fromImageTag" ]]; then
+          fromImageTag=$(jshon -e $fromImageName -k < image/repositories \
+                         | head -n1)
+          echo "From-image tag wasn't set. Read $fromImageTag."
         fi
-        parentID=$(jshon -e $fromImageName -e $fromImageTag -u < image/repositories)
+
+        # Use the name and tag to get the parent ID field.
+        parentID=$(jshon -e $fromImageName -e $fromImageTag -u \
+                   < image/repositories)
       fi
 
+      # Unpack all of the parent layers into the image.
       lowerdir=""
-      while [ -n "$parentID" ]; do
-        echo Unpacking layer $parentID
+      while [[ -n "$parentID" ]]; do
+        echo "Unpacking layer $parentID"
         mkdir -p image/$parentID/layer
         tar -C image/$parentID/layer -xpf image/$parentID/layer.tar
         rm image/$parentID/layer.tar
 
         find image/$parentID/layer -name ".wh.*" -exec bash -c 'name="$(basename {}|sed "s/^.wh.//")"; mknod "$(dirname {})/$name" c 0 0; rm {}' \;
 
+        # Get the next lower directory and continue the loop.
         lowerdir=$lowerdir''${lowerdir:+:}image/$parentID/layer
-        parentID=$(cat image/$parentID/json|(jshon -e parent -u 2>/dev/null || true))
+        parentID=$(cat image/$parentID/json \
+                  | (jshon -e parent -u 2>/dev/null || true))
       done
 
       mkdir work
       mkdir layer
       mkdir mnt
 
-      ${preMount}
+      ${lib.optionalString (preMount != "") ''
+        # Execute pre-mount steps
+        echo "Executing pre-mount steps..."
+        ${preMount}
+      ''}
 
       if [ -n "$lowerdir" ]; then
         mount -t overlay overlay -olowerdir=$lowerdir,workdir=work,upperdir=layer mnt
@@ -134,13 +186,19 @@ EOF
         mount --bind layer mnt
       fi
 
-      ${postMount}
- 
+      ${lib.optionalString (postMount != "") ''
+        # Execute post-mount steps
+        echo "Executing post-mount steps..."
+        ${postMount}
+      ''}
+
       umount mnt
 
-      pushd layer
-      find . -type c -exec bash -c 'name="$(basename {})"; touch "$(dirname {})/.wh.$name"; rm "{}"' \;
-      popd
+      (
+        cd layer
+        cmd='name="$(basename {})"; touch "$(dirname {})/.wh.$name"; rm "{}"'
+        find . -type c -exec bash -c "$cmd" \;
+      )
 
       ${postUmount}
       '');
@@ -150,76 +208,148 @@ EOF
       inherit name fromImage fromImageName fromImageTag diskSize;
 
       postMount = ''
-        echo Packing raw image
+        echo "Packing raw image..."
         tar -C mnt --mtime=0 -cf $out .
       '';
     };
-    
-  mkPureLayer = { baseJson, contents ? null, extraCommands ? "" }:
-    runCommand "docker-layer" {
+
+
+  # Create an executable shell script which has the coreutils in its
+  # PATH. Since root scripts are executed in a blank environment, even
+  # things like `ls` or `echo` will be missing.
+  shellScript = name: text:
+    writeScript name ''
+      #!${stdenv.shell}
+      set -e
+      export PATH=${coreutils}/bin:/bin
+      ${text}
+    '';
+
+  # Create a "layer" (set of files).
+  mkPureLayer = {
+    # Name of the layer
+    name,
+    # JSON containing configuration and metadata for this layer.
+    baseJson,
+    # Files to add to the layer.
+    contents ? null,
+    # Additional commands to run on the layer before it is tar'd up.
+    extraCommands ? ""
+  }:
+    runCommand "docker-layer-${name}" {
       inherit baseJson contents extraCommands;
 
-      buildInputs = [ jshon ];
-    } ''
+      buildInputs = [ jshon rsync ];
+    }
+    ''
       mkdir layer
-      if [ -n "$contents" ]; then
-        echo Adding contents
-        for c in $contents; do
-          cp -drf $c/* layer/
-          chmod -R ug+w layer/
+      if [[ -n "$contents" ]]; then
+        echo "Adding contents..."
+        for item in $contents; do
+          echo "Adding $item"
+          rsync -a $item/ layer/
         done
+      else
+        echo "No contents to add to layer."
+      fi
+
+      if [[ -n $extraCommands ]]; then
+        (cd layer; eval "$extraCommands")
       fi
 
-      pushd layer
-      ${extraCommands}
-      popd
-      
-      echo Packing layer
+      # Tar up the layer and throw it into 'layer.tar'.
+      echo "Packing layer..."
       mkdir $out
       tar -C layer --mtime=0 -cf $out/layer.tar .
-      ts=$(${tarsum} < $out/layer.tar)
-      cat ${baseJson} | jshon -s "$ts" -i checksum > $out/json
+
+      # Compute a checksum of the tarball.
+      echo "Computing layer checksum..."
+      tarsum=$(${tarsum} < $out/layer.tar)
+
+      # Add a 'checksum' field to the JSON, with the value set to the
+      # checksum of the tarball.
+      cat ${baseJson} | jshon -s "$tarsum" -i checksum > $out/json
+
+      # Indicate to docker that we're using schema version 1.0.
       echo -n "1.0" > $out/VERSION
+
+      echo "Finished building layer '${name}'"
     '';
 
-  mkRootLayer = { runAsRoot, baseJson, fromImage ? null, fromImageName ? null, fromImageTag ? null
-                , diskSize ? 1024, contents ? null, extraCommands ? "" }:
-    let runAsRootScript = writeScript "run-as-root.sh" runAsRoot;
+  # Make a "root" layer; required if we need to execute commands as a
+  # privileged user on the image. The commands themselves will be
+  # performed in a virtual machine sandbox.
+  mkRootLayer = {
+    # Name of the image.
+    name,
+    # Script to run as root. Bash.
+    runAsRoot,
+    # Files to add to the layer. If null, an empty layer will be created.
+    contents ? null,
+    # JSON containing configuration and metadata for this layer.
+    baseJson,
+    # Existing image onto which to append the new layer.
+    fromImage ? null,
+    # Name of the image we're appending onto.
+    fromImageName ? null,
+    # Tag of the image we're appending onto.
+    fromImageTag ? null,
+    # How much disk to allocate for the temporary virtual machine.
+    diskSize ? 1024,
+    # Commands (bash) to run on the layer; these do not require sudo.
+    extraCommands ? ""
+  }:
+    # Generate an executable script from the `runAsRoot` text.
+    let runAsRootScript = shellScript "run-as-root.sh" runAsRoot;
     in runWithOverlay {
-      name = "docker-layer";
-      
+      name = "docker-layer-${name}";
+
       inherit fromImage fromImageName fromImageTag diskSize;
 
-      preMount = lib.optionalString (contents != null) ''
-        echo Adding contents
-        for c in ${builtins.toString contents}; do
-          cp -drf $c/* layer/
-          chmod -R ug+w layer/
+      preMount = lib.optionalString (contents != null && contents != []) ''
+        echo "Adding contents..."
+        for item in ${toString contents}; do
+          echo "Adding $item..."
+          rsync -a $item/ layer/
         done
       '';
 
       postMount = ''
-        mkdir -p mnt/{dev,proc,sys,nix/store}
+        mkdir -p mnt/{dev,proc,sys} mnt${storeDir}
+
+        # Mount /dev, /sys and the nix store as shared folders.
         mount --rbind /dev mnt/dev
         mount --rbind /sys mnt/sys
-        mount --rbind /nix/store mnt/nix/store
+        mount --rbind ${storeDir} mnt${storeDir}
 
+        # Execute the run as root script. See 'man unshare' for
+        # details on what's going on here; basically this command
+        # means that the runAsRootScript will be executed in a nearly
+        # completely isolated environment.
         unshare -imnpuf --mount-proc chroot mnt ${runAsRootScript}
-        umount -R mnt/dev mnt/sys mnt/nix/store
-        rmdir --ignore-fail-on-non-empty mnt/dev mnt/proc mnt/sys mnt/nix/store mnt/nix
+
+        # Unmount directories and remove them.
+        umount -R mnt/dev mnt/sys mnt${storeDir}
+        rmdir --ignore-fail-on-non-empty \
+          mnt/dev mnt/proc mnt/sys mnt${storeDir} \
+          mnt$(dirname ${storeDir})
       '';
- 
+
       postUmount = ''
-        pushd layer
-        ${extraCommands}
-        popd
+        (cd layer; eval "${extraCommands}")
 
-        echo Packing layer
+        echo "Packing layer..."
         mkdir $out
         tar -C layer --mtime=0 -cf $out/layer.tar .
+
+        # Compute the tar checksum and add it to the output json.
+        echo "Computing checksum..."
         ts=$(${tarsum} < $out/layer.tar)
         cat ${baseJson} | jshon -s "$ts" -i checksum > $out/json
+        # Indicate to docker that we're using schema version 1.0.
         echo -n "1.0" > $out/VERSION
+
+        echo "Finished building layer '${name}'"
       '';
     };
 
@@ -229,116 +359,144 @@ EOF
   # 4. compute the layer id
   # 5. put the layer in the image
   # 6. repack the image
-  buildImage = args@{ name, tag ? "latest"
-               , fromImage ? null, fromImageName ? null, fromImageTag ? null
-               , contents ? null, config ? null, runAsRoot ? null
-               , diskSize ? 1024, extraCommands ? "" }:
+  buildImage = args@{
+    # Image name.
+    name,
+    # Image tag.
+    tag ? "latest",
+    # Parent image, to append to.
+    fromImage ? null,
+    # Name of the parent image; will be read from the image otherwise.
+    fromImageName ? null,
+    # Tag of the parent image; will be read from the image otherwise.
+    fromImageTag ? null,
+    # Files to put on the image (a nix store path or list of paths).
+    contents ? null,
+    # Docker config; e.g. what command to run on the container.
+    config ? null,
+    # Optional bash script to run on the files prior to fixturizing the layer.
+    extraCommands ? "",
+    # Optional bash script to run as root on the image when provisioning.
+    runAsRoot ? null,
+    # Size of the virtual machine disk to provision when building the image.
+    diskSize ? 1024,
+  }:
 
     let
-
       baseName = baseNameOf name;
 
+      # Create a JSON blob of the configuration. Set the date to unix zero.
       baseJson = writeText "${baseName}-config.json" (builtins.toJSON {
-          created = "1970-01-01T00:00:01Z";
-          architecture = "amd64";
-          os = "linux";
-          config = config;
+        created = "1970-01-01T00:00:01Z";
+        architecture = "amd64";
+        os = "linux";
+        config = config;
       });
 
-      layer = (if runAsRoot == null
-               then mkPureLayer { inherit baseJson contents extraCommands; }
-               else mkRootLayer { inherit baseJson fromImage fromImageName fromImageTag contents runAsRoot diskSize extraCommands; });
-      result = runCommand "${baseName}.tar.gz" {
+      layer =
+        if runAsRoot == null
+        then mkPureLayer { inherit name baseJson contents extraCommands; }
+        else mkRootLayer { inherit name baseJson fromImage fromImageName
+                                   fromImageTag contents runAsRoot diskSize
+                                   extraCommands; };
+      result = runCommand "docker-image-${baseName}.tar.gz" {
         buildInputs = [ jshon pigz coreutils findutils ];
-
         imageName = name;
         imageTag = tag;
         inherit fromImage baseJson;
-
         layerClosure = writeReferencesToFile layer;
-
-        passthru = {
-          buildArgs = args;
-        };
+        passthru.buildArgs = args;
+        passthru.layer = layer;
       } ''
         # Print tar contents:
         # 1: Interpreted as relative to the root directory
         # 2: With no trailing slashes on directories
-        # This is useful for ensuring that the output matches the values generated by the "find" command
+        # This is useful for ensuring that the output matches the
+        # values generated by the "find" command
         ls_tar() {
-            for f in $(tar -tf $1 | xargs realpath -ms --relative-to=.); do
-                if [ "$f" != "." ]; then
-                    echo "/$f"
-                fi
-            done
+          for f in $(tar -tf $1 | xargs realpath -ms --relative-to=.); do
+            if [[ "$f" != "." ]]; then
+              echo "/$f"
+            fi
+          done
         }
-      
+
         mkdir image
         touch baseFiles
-        if [ -n "$fromImage" ]; then
-          echo Unpacking base image
+        if [[ -n "$fromImage" ]]; then
+          echo "Unpacking base image..."
           tar -C image -xpf "$fromImage"
-          
-          if [ -z "$fromImageName" ]; then
+
+          if [[ -z "$fromImageName" ]]; then
             fromImageName=$(jshon -k < image/repositories|head -n1)
           fi
-          if [ -z "$fromImageTag" ]; then
-            fromImageTag=$(jshon -e $fromImageName -k < image/repositories|head -n1)
+          if [[ -z "$fromImageTag" ]]; then
+            fromImageTag=$(jshon -e $fromImageName -k \
+                           < image/repositories|head -n1)
           fi
-          parentID=$(jshon -e $fromImageName -e $fromImageTag -u < image/repositories)
-          
+          parentID=$(jshon -e $fromImageName -e $fromImageTag -u \
+                     < image/repositories)
+
           for l in image/*/layer.tar; do
-            ls_tar $l >> baseFiles
+            ls_tar image/*/layer.tar >> baseFiles
           done
         fi
 
         chmod -R ug+rw image
-        
+
         mkdir temp
         cp ${layer}/* temp/
         chmod ug+w temp/*
 
+        echo "$(dirname ${storeDir})" >> layerFiles
+        echo '${storeDir}' >> layerFiles
         for dep in $(cat $layerClosure); do
-          find $dep -path "${layer}" -prune -o -print >> layerFiles
+          find $dep >> layerFiles
         done
 
-        if [ -s layerFiles ]; then
-          # FIXME: might not be /nix/store
-          echo '/nix' >> layerFiles
-          echo '/nix/store' >> layerFiles
-        fi
-
-        echo Adding layer
+        echo "Adding layer..."
+        # Record the contents of the tarball with ls_tar.
         ls_tar temp/layer.tar >> baseFiles
-        comm <(sort -u baseFiles) <(sort -u layerFiles) -1 -3 > newFiles
-        tar -rpf temp/layer.tar --mtime=0 --no-recursion --files-from newFiles 2>/dev/null || true
 
-        echo Adding meta
-        
-        if [ -n "$parentID" ]; then
+        # Get the files in the new layer which were *not* present in
+        # the old layer, and record them as newFiles.
+        comm <(sort -n baseFiles|uniq) \
+             <(sort -n layerFiles|uniq|grep -v ${layer}) -1 -3 > newFiles
+        # Append the new files to the layer.
+        tar -rpf temp/layer.tar --mtime=0 --no-recursion --files-from newFiles
+
+        echo "Adding meta..."
+
+        # If we have a parentID, add it to the json metadata.
+        if [[ -n "$parentID" ]]; then
           cat temp/json | jshon -s "$parentID" -i parent > tmpjson
           mv tmpjson temp/json
         fi
-        
+
+        # Take the sha256 sum of the generated json and use it as the layer ID.
+        # Compute the size and add it to the json under the 'Size' field.
         layerID=$(sha256sum temp/json|cut -d ' ' -f 1)
         size=$(stat --printf="%s" temp/layer.tar)
         cat temp/json | jshon -s "$layerID" -i id -n $size -i Size > tmpjson
         mv tmpjson temp/json
 
+        # Use the temp folder we've been working on to create a new image.
         mv temp image/$layerID
-        
+
+        # Store the json under the name image/repositories.
         jshon -n object \
           -n object -s "$layerID" -i "$imageTag" \
           -i "$imageName" > image/repositories
 
+        # Make the image read-only.
         chmod -R a-w image
 
-        echo Cooking the image
+        echo "Cooking the image..."
         tar -C image --mtime=0 -c . | pigz -nT > $out
+
+        echo "Finished."
       '';
 
     in
-
-      result;
-
+    result;
 }
diff --git a/pkgs/build-support/docker/examples.nix b/pkgs/build-support/docker/examples.nix
new file mode 100644
index 000000000000..05b4a9b4f2d2
--- /dev/null
+++ b/pkgs/build-support/docker/examples.nix
@@ -0,0 +1,108 @@
+# Examples of using the docker tools to build packages.
+#
+# This file defines several docker images. In order to use an image,
+# build its derivation with `nix-build`, and then load the result with
+# `docker load`. For example:
+#
+#  $ nix-build '<nixpkgs>' -A dockerTools.examples.redis
+#  $ docker load < result
+
+{ pkgs, buildImage, pullImage, shadowSetup }:
+
+rec {
+  # 1. basic example
+  bash = buildImage {
+    name = "bash";
+    contents = pkgs.bashInteractive;
+  };
+
+  # 2. service example, layered on another image
+  redis = buildImage {
+    name = "redis";
+    tag = "latest";
+
+    # for example's sake, we can layer redis on top of bash or debian
+    fromImage = bash;
+    # fromImage = debian;
+
+    contents = pkgs.redis;
+    runAsRoot = ''
+      mkdir -p /data
+    '';
+
+    config = {
+      Cmd = [ "/bin/redis-server" ];
+      WorkingDir = "/data";
+      Volumes = {
+        "/data" = {};
+      };
+    };
+  };
+
+  # 3. another service example
+  nginx = let
+    nginxPort = "80";
+    nginxConf = pkgs.writeText "nginx.conf" ''
+      user nginx nginx;
+      daemon off;
+      error_log /dev/stdout info;
+      pid /dev/null;
+      events {}
+      http {
+        access_log /dev/stdout;
+        server {
+          listen ${nginxPort};
+          index index.html;
+          location / {
+            root ${nginxWebRoot};
+          }
+        }
+      }
+    '';
+    nginxWebRoot = pkgs.writeTextDir "index.html" ''
+      <html><body><h1>Hello from NGINX</h1></body></html>
+    '';
+  in
+  buildImage {
+    name = "nginx-container";
+    contents = pkgs.nginx;
+
+    runAsRoot = ''
+      #!${pkgs.stdenv.shell}
+      ${shadowSetup}
+      groupadd --system nginx
+      useradd --system --gid nginx nginx
+    '';
+
+    config = {
+      Cmd = [ "nginx" "-c" nginxConf ];
+      ExposedPorts = {
+        "${nginxPort}/tcp" = {};
+      };
+    };
+  };
+
+  # 4. example of pulling an image. could be used as a base for other images
+  #
+  # ***** Currently broken, getting 404s. Perhaps the docker API has changed?
+  #
+  #
+  # debian = pullImage {
+  #   imageName = "debian";
+  #   imageTag = "jessie";
+  #   # this hash will need change if the tag is updated at docker hub
+  #   sha256 = "18kd495lc2k35h03bpcbdjnix17nlqbwf6nmq3sb161blf0dk14q";
+  # };
+
+  # 5. example of multiple contents, emacs and vi happily coexisting
+  editors = buildImage {
+    name = "editors";
+    contents = [
+      pkgs.coreutils
+      pkgs.bash
+      pkgs.emacs
+      pkgs.vim
+      pkgs.nano
+    ];
+  };
+}
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix
index 245d0bebb45d..47f61ab64d61 100644
--- a/pkgs/build-support/vm/default.nix
+++ b/pkgs/build-support/vm/default.nix
@@ -1,6 +1,7 @@
 { pkgs
 , kernel ? pkgs.linux
 , img ? "bzImage"
+, storeDir ? builtins.storeDir
 , rootModules ?
     [ "virtio_pci" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" "rtc_cmos" ]
 }:
@@ -128,8 +129,8 @@ rec {
     mount -t devpts none /fs/dev/pts
 
     echo "mounting Nix store..."
-    mkdir -p /fs/nix/store
-    mount -t 9p store /fs/nix/store -o trans=virtio,version=9p2000.L,cache=loose
+    mkdir -p /fs${storeDir}
+    mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,cache=loose
 
     mkdir -p /fs/tmp /fs/run /fs/var
     mount -t tmpfs -o "mode=1777" none /fs/tmp
@@ -172,7 +173,7 @@ rec {
     # apparent KVM > 1.5.2 bug.
     ${pkgs.utillinux}/bin/hwclock -s
 
-    export NIX_STORE=/nix/store
+    export NIX_STORE=${storeDir}
     export NIX_BUILD_TOP=/tmp
     export TMPDIR=/tmp
     export PATH=/empty
@@ -220,7 +221,7 @@ rec {
       ${lib.optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} \
       -nographic -no-reboot \
       -device virtio-rng-pci \
-      -virtfs local,path=/nix/store,security_model=none,mount_tag=store \
+      -virtfs local,path=${storeDir},security_model=none,mount_tag=store \
       -virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \
       -drive file=$diskImage,if=virtio,cache=unsafe,werror=report \
       -kernel ${kernel}/${img} \
@@ -298,7 +299,7 @@ rec {
 
   /* Run a derivation in a Linux virtual machine (using Qemu/KVM).  By
      default, there is no disk image; the root filesystem is a tmpfs,
-     and /nix/store is shared with the host (via the 9P protocol).
+     and the nix store is shared with the host (via the 9P protocol).
      Thus, any pure Nix derivation should run unmodified, e.g. the
      call
 
@@ -434,8 +435,8 @@ rec {
         chroot=$(type -tP chroot)
 
         # Make the Nix store available in /mnt, because that's where the RPMs live.
-        mkdir -p /mnt/nix/store
-        ${utillinux}/bin/mount -o bind /nix/store /mnt/nix/store
+        mkdir -p /mnt${storeDir}
+        ${utillinux}/bin/mount -o bind ${storeDir} /mnt${storeDir}
 
         # Newer distributions like Fedora 18 require /lib etc. to be
         # symlinked to /usr.
@@ -474,7 +475,7 @@ rec {
 
         rm /mnt/.debug
 
-        ${utillinux}/bin/umount /mnt/nix/store /mnt/tmp ${lib.optionalString unifiedSystemDir "/mnt/proc"}
+        ${utillinux}/bin/umount /mnt${storeDir} /mnt/tmp ${lib.optionalString unifiedSystemDir "/mnt/proc"}
         ${utillinux}/bin/umount /mnt
       '';
 
@@ -537,8 +538,7 @@ rec {
 
       # Hacky: RPM looks for <basename>.spec inside the tarball, so
       # strip off the hash.
-      stripHash "$src"
-      srcName="$strippedName"
+      srcName="$(stripHash "$src")"
       cp "$src" "$srcName" # `ln' doesn't work always work: RPM requires that the file is owned by root
 
       export HOME=/tmp/home
@@ -605,8 +605,8 @@ rec {
         done
 
         # Make the Nix store available in /mnt, because that's where the .debs live.
-        mkdir -p /mnt/inst/nix/store
-        ${utillinux}/bin/mount -o bind /nix/store /mnt/inst/nix/store
+        mkdir -p /mnt/inst${storeDir}
+        ${utillinux}/bin/mount -o bind ${storeDir} /mnt/inst${storeDir}
         ${utillinux}/bin/mount -o bind /proc /mnt/proc
         ${utillinux}/bin/mount -o bind /dev /mnt/dev
 
@@ -654,7 +654,7 @@ rec {
 
         rm /mnt/.debug
 
-        ${utillinux}/bin/umount /mnt/inst/nix/store
+        ${utillinux}/bin/umount /mnt/inst${storeDir}
         ${utillinux}/bin/umount /mnt/proc
         ${utillinux}/bin/umount /mnt/dev
         ${utillinux}/bin/umount /mnt
diff --git a/pkgs/data/fonts/droid/default.nix b/pkgs/data/fonts/droid/default.nix
index 784dfe710078..8051606632df 100644
--- a/pkgs/data/fonts/droid/default.nix
+++ b/pkgs/data/fonts/droid/default.nix
@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
   sourceRoot = "./";
 
   unpackCmd = ''
-    ttfName=$(basename $(stripHash $curSrc; echo $strippedName))
+    ttfName=$(basename $(stripHash $curSrc))
     cp $curSrc ./$ttfName
   '';
 
diff --git a/pkgs/data/fonts/overpass/default.nix b/pkgs/data/fonts/overpass/default.nix
new file mode 100644
index 000000000000..d441ac514d37
--- /dev/null
+++ b/pkgs/data/fonts/overpass/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation rec {
+  name = "overpass-${version}";
+  version = "2.1";
+
+  src = fetchurl {
+    url = "https://github.com/RedHatBrand/overpass/releases/download/2.1/overpass-fonts-ttf-2.1.zip";
+    sha256 = "1kd7vbqffp5988j3p4zxkxajdmfviyv4y6rzk7jazg81xcsxicwf";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  phases = [ "unpackPhase" "installPhase" ];
+
+  installPhase = ''
+    mkdir -p $out/share/doc/${name}
+    mkdir -p $out/share/fonts/truetype
+    cp -v *.ttf $out/share/fonts/truetype
+    cp -v LICENSE.md README.md $out/share/doc/${name}
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://overpassfont.org/;
+    description = "Font heavily inspired by Highway Gothic";
+    license = licenses.ofl;
+    platforms = platforms.all;
+    maintainers = [ maintainers.rycee ];
+  };
+}
diff --git a/pkgs/data/fonts/roboto-mono/default.nix b/pkgs/data/fonts/roboto-mono/default.nix
index 451725a6d802..e9eff414bc1d 100644
--- a/pkgs/data/fonts/roboto-mono/default.nix
+++ b/pkgs/data/fonts/roboto-mono/default.nix
@@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
   sourceRoot = "./";
 
   unpackCmd = ''
-    ttfName=$(basename $(stripHash $curSrc; echo $strippedName))
+    ttfName=$(basename $(stripHash $curSrc))
     cp $curSrc ./$ttfName
   '';
 
diff --git a/pkgs/data/fonts/roboto-slab/default.nix b/pkgs/data/fonts/roboto-slab/default.nix
index ade9fd2350e5..5a8a3f3c1201 100644
--- a/pkgs/data/fonts/roboto-slab/default.nix
+++ b/pkgs/data/fonts/roboto-slab/default.nix
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
   sourceRoot = "./";
 
   unpackCmd = ''
-    ttfName=$(basename $(stripHash $curSrc; echo $strippedName))
+    ttfName=$(basename $(stripHash $curSrc))
     cp $curSrc ./$ttfName
   '';
 
diff --git a/pkgs/data/icons/arc-icon-theme/default.nix b/pkgs/data/icons/arc-icon-theme/default.nix
index 07900eebeefa..760329a94bfa 100644
--- a/pkgs/data/icons/arc-icon-theme/default.nix
+++ b/pkgs/data/icons/arc-icon-theme/default.nix
@@ -3,13 +3,13 @@
 stdenv.mkDerivation rec {
   name = "${package-name}-${version}";
   package-name = "arc-icon-theme";
-  version = "2016-06-06";
+  version = "2016-07-07";
 
   src = fetchFromGitHub {
     owner = "horst3180";
     repo = package-name;
-    rev = "69da5eed0761237fd287ea2fc95c708353ccc332";
-    sha256 = "04ym3ix2cpjh1q7lwvhl578pv41mn9zsadlsygl0nck8yd22widq";
+    rev = "664c05e723ac2971feb123d7baca3d298248e7f9";
+    sha256 = "10vicnrv2v7y4capvllaz9x3nzjkjj9fs1dspjjjg6if3gcif7m4";
   };
 
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/pkgs/data/icons/elementary-icon-theme/default.nix b/pkgs/data/icons/elementary-icon-theme/default.nix
index 19b2230eaa8d..b15e8dea5bc8 100644
--- a/pkgs/data/icons/elementary-icon-theme/default.nix
+++ b/pkgs/data/icons/elementary-icon-theme/default.nix
@@ -1,29 +1,32 @@
-{ stdenv, fetchzip }:
+{ stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  version = "3.2.2";
+  version = "4.0.1";
 
   package-name = "elementary-icon-theme";
 
   name = "${package-name}-${version}";
 
-  src = fetchzip {
-    url = "https://launchpad.net/elementaryicons/3.x/${version}/+download/elementary-icon-theme-${version}.tar.xz";
-    sha256 = "0b6sgvkzc5h9zm3la6f0ngs9pfjrsj318qcynxd3yydb50cd3hnf";
+  src = fetchurl {
+    url = "https://launchpad.net/elementaryicons/4.x/${version}/+download/${name}.tar.xz";
+    sha256 = "0cbgbd9fqxk6rbsrj0gbh1rcapkkdlaig79kilq798v94jfdskrl";
   };
 
   dontBuild = true;
 
   installPhase = ''
-    install -dm 755 $out/share/icons
+    install -dm 755 $out/share/{icons,doc/$name}
     cp -dr --no-preserve='ownership' . $out/share/icons/Elementary/
+    mv $out/share/icons/Elementary/{AUTHORS,CONTRIBUTORS,README.md} \
+      $out/share/doc/$name/
+    rm $out/share/icons/Elementary/{COPYING,pre-commit}
   '';
 
   meta = with stdenv.lib; {
-  description = "Elementary icon theme";
-  homepage = "https://launchpad.net/elementaryicons";
-  license = licenses.gpl3;
-  platforms = platforms.all;
-  maintainers = with maintainers; [ simonvandel ];
+    description = "Elementary icon theme";
+    homepage = "https://launchpad.net/elementaryicons";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ simonvandel ];
   };
 }
diff --git a/pkgs/data/icons/faba-icon-theme/default.nix b/pkgs/data/icons/faba-icon-theme/default.nix
index b83abbe7e80c..37f46060ae31 100644
--- a/pkgs/data/icons/faba-icon-theme/default.nix
+++ b/pkgs/data/icons/faba-icon-theme/default.nix
@@ -3,13 +3,13 @@
 stdenv.mkDerivation rec {
   name = "${package-name}-${version}";
   package-name = "faba-icon-theme";
-  version = "2016-06-02";
+  version = "2016-09-13";
 
   src = fetchFromGitHub {
     owner = "moka-project";
     repo = package-name;
-    rev = "e50649d0171fd8cce42404c7c5002d77710ffcfc";
-    sha256 = "1fn969a6l58asnl9181c2z1fsj4dybl2mgbcpwig20bri6q7yz20";
+    rev = "00431894bce5fb1b8caccaee064788996be228a7";
+    sha256 = "0hif030pd4w3s851k0s65w0mf2pik10ha25ycpsv91gpbgarqcns";
   };
 
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/pkgs/data/icons/faba-mono-icons/default.nix b/pkgs/data/icons/faba-mono-icons/default.nix
index 16fa63c5424c..3a871e86d9d1 100644
--- a/pkgs/data/icons/faba-mono-icons/default.nix
+++ b/pkgs/data/icons/faba-mono-icons/default.nix
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
   version = "2016-04-30";
 
   src = fetchFromGitHub {
-    owner = "moka-project";
+    owner = "snwh";
     repo = package-name;
     rev = "2006c5281eb988c799068734f289a85443800cda";
     sha256 = "0nisfl92y6hrbakp9qxi0ygayl6avkzrhwirg6854bwqjy2dvjv9";
diff --git a/pkgs/data/icons/maia-icon-theme/default.nix b/pkgs/data/icons/maia-icon-theme/default.nix
index 32682a750101..f4f81f8de8be 100644
--- a/pkgs/data/icons/maia-icon-theme/default.nix
+++ b/pkgs/data/icons/maia-icon-theme/default.nix
@@ -1,21 +1,24 @@
 { stdenv, fetchFromGitHub }:
 
-stdenv.mkDerivation {
-  name = "maia-icon-theme";
+stdenv.mkDerivation rec {
+  name = "maia-icon-theme-${version}";
+  version = "2016-09-16";
 
   src = fetchFromGitHub {
     owner = "manjaro";
     repo = "artwork-maia";
-    rev = "23235fa56e6111d30e9f92576030cc855a0facbe";
-    sha256 = "1d5bv13gds1nx88pc6a9gkrz1lb8sji0wcc5h3bf4mjw0q072nfr";
+    rev = "f6718cd9c383adb77af54b694c47efa4d581f5b5";
+    sha256 = "0f9l3k9abgg8islzddrxgbxaw6vbai5bvz5qi1v2fzir7ykx7bgj";
   };
 
   dontBuild = true;
   
   installPhase = ''
     install -dm 755 $out/share/icons
-    rm icons/CMakeLists.txt
-    cp -dr --no-preserve='ownership' icons $out/share/icons/Maia
+    for f in "" "-dark"; do
+      rm icons$f/CMakeLists.txt
+      cp -dr --no-preserve='ownership' icons$f $out/share/icons/maia$f
+    done
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/data/icons/moka-icon-theme/default.nix b/pkgs/data/icons/moka-icon-theme/default.nix
index 4d98a50c0c4b..0ffe2411c4fa 100644
--- a/pkgs/data/icons/moka-icon-theme/default.nix
+++ b/pkgs/data/icons/moka-icon-theme/default.nix
@@ -3,13 +3,13 @@
 stdenv.mkDerivation rec {
   name = "${package-name}-${version}";
   package-name = "moka-icon-theme";
-  version = "2016-06-07";
+  version = "2016-10-06";
 
   src = fetchFromGitHub {
-    owner = "moka-project";
+    owner = "snwh";
     repo = package-name;
-    rev = "a03d14e30dbdf05e8ea904994b8081ad0824e155";
-    sha256 = "1j1cnrrg0gfr4vfzxlabrv8090fg4yni99g61s82vnyszkiy1rcm";
+    rev = "50894ee9411721649019cd168b8ae2c85f4b5cf0";
+    sha256 = "1dlpsgqsn731ra5drkx72wljcgv1zydgldy4nn5bbia9s5w8mfgs";
   };
 
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/pkgs/data/icons/numix-icon-theme-circle/default.nix b/pkgs/data/icons/numix-icon-theme-circle/default.nix
index 414360f2d7a4..5c7464098adb 100644
--- a/pkgs/data/icons/numix-icon-theme-circle/default.nix
+++ b/pkgs/data/icons/numix-icon-theme-circle/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchFromGitHub, numix-icon-theme }:
 
 stdenv.mkDerivation rec {
-  version = "2016-06-10";
+  version = "2016-09-27";
 
   package-name = "numix-icon-theme-circle";
   
@@ -10,8 +10,8 @@ stdenv.mkDerivation rec {
   src = fetchFromGitHub {
     owner = "numixproject";
     repo = package-name;
-    rev = "577b8a2a8dd6429f7d3df37b15d9fd7fcbb58d56";
-    sha256 = "1zx26ng6z45j1yff2m0cng4nffk8swdq1pya1l2dm7841mx5ram4";
+    rev = "481bc1100f01e25e92deb7facf61436b27f9ca8a";
+    sha256 = "0fkr7w6z6sz5yblgshr3qr2bszia6dsjszv3gmcbi2xqvjjd8wij";
   };
 
   buildInputs = [ numix-icon-theme ];
diff --git a/pkgs/data/icons/numix-icon-theme/default.nix b/pkgs/data/icons/numix-icon-theme/default.nix
index 735d1544cf55..be224f418e80 100644
--- a/pkgs/data/icons/numix-icon-theme/default.nix
+++ b/pkgs/data/icons/numix-icon-theme/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchFromGitHub }:
 
 stdenv.mkDerivation rec {
-  version = "2016-06-10";
+  version = "2016-10-05";
 
   package-name = "numix-icon-theme";
 
@@ -10,8 +10,8 @@ stdenv.mkDerivation rec {
   src = fetchFromGitHub {
     owner = "numixproject";
     repo = package-name;
-    rev = "8196e9eaa5a60b5c02a9e37a4ca768b07966b41f";
-    sha256 = "0cyv0r66vil54y6w317msddq2fjs9zhrdx17m3bx85xpqz67zq5i";
+    rev = "e03eb71454c176a98733eafa268ff79995f8159d";
+    sha256 = "1f8prwq9zvzfk0ncwzbrwkpjggc8nadny81dqv1cr0014jc85bxi";
   };
 
   dontBuild = true;
diff --git a/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/builder.sh b/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/builder.sh
index 70fd729297c0..939305d486a7 100644
--- a/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/builder.sh
+++ b/pkgs/data/sgml+xml/schemas/xml-dtd/docbook-ebnf/builder.sh
@@ -3,5 +3,4 @@ source $stdenv/setup
 mkdir -p $out/xml/dtd/docbook-ebnf
 cd $out/xml/dtd/docbook-ebnf
 cp -p $dtd dbebnf.dtd
-stripHash $catalog
-cp -p $catalog $strippedName
+cp -p $catalog $(stripHash $catalog)
diff --git a/pkgs/desktops/enlightenment/enlightenment.nix b/pkgs/desktops/enlightenment/enlightenment.nix
index f4ff94ad088e..e3d676fd4f6e 100644
--- a/pkgs/desktops/enlightenment/enlightenment.nix
+++ b/pkgs/desktops/enlightenment/enlightenment.nix
@@ -4,18 +4,20 @@ mesa_glu , xkeyboard_config }:
 
 stdenv.mkDerivation rec {
   name = "enlightenment-${version}";
-  version = "0.21.2";
+  version = "0.21.3";
 
   src = fetchurl {
     url = "http://download.enlightenment.org/rel/apps/enlightenment/${name}.tar.xz";
-    sha256 = "0fi5dxrprnvhnn2y51gnfpsjj44snriqi20k20a73vhaqxfn8xx8";
+    sha256 = "1ljzcq775njhbcaj8vdnypf2rgc6yqqdwfkf7c22603qvv9if1dr";
   };
 
   nativeBuildInputs = [ pkgconfig ];
 
-  buildInputs = [ efl libXdmcp libxcb
-    xcbutilkeysyms libXrandr libffi pam alsaLib luajit bzip2
-    libpthreadstubs gdbm ] ++ stdenv.lib.optionals stdenv.isLinux [ libcap ];
+  buildInputs = [
+    efl libXdmcp libxcb xcbutilkeysyms libXrandr libffi pam alsaLib
+    luajit bzip2 libpthreadstubs gdbm
+  ] ++
+    stdenv.lib.optionals stdenv.isLinux [ libcap ];
 
   NIX_CFLAGS_COMPILE = [
     "-I${efl}/include/ecore-imf-1"
@@ -49,11 +51,11 @@ stdenv.mkDerivation rec {
     ln -sv /var/setuid-wrappers/e_freqset $CPUFREQ_DIRPATH/freqset
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "The Compositing Window Manager and Desktop Shell";
     homepage = http://enlightenment.org/;
-    maintainers = with stdenv.lib.maintainers; [ matejc tstrobel ftrvxmtrx ];
-    platforms = stdenv.lib.platforms.linux;
-    license = stdenv.lib.licenses.bsd2;
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ matejc tstrobel ftrvxmtrx romildo ];
   };
 }
diff --git a/pkgs/desktops/gnome-3/3.20/core/epiphany/default.nix b/pkgs/desktops/gnome-3/3.20/core/epiphany/default.nix
index d50036a597e6..13efcd613928 100644
--- a/pkgs/desktops/gnome-3/3.20/core/epiphany/default.nix
+++ b/pkgs/desktops/gnome-3/3.20/core/epiphany/default.nix
@@ -18,7 +18,8 @@ stdenv.mkDerivation rec {
                   webkitgtk libsoup libsecret gnome_desktop libnotify libtool
                   sqlite isocodes nss itstool p11_kit nspr icu gnome3.yelp_tools
                   gdk_pixbuf gnome3.defaultIconTheme librsvg which gnome_common
-                  gcr avahi gnome3.gsettings_desktop_schemas gnome3.dconf ];
+                  gcr avahi gnome3.gsettings_desktop_schemas gnome3.dconf
+                  gnome3.glib_networking ];
 
   NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss -I${glib.dev}/include/gio-unix-2.0";
 
diff --git a/pkgs/desktops/kde-5/plasma/fetch.sh b/pkgs/desktops/kde-5/plasma/fetch.sh
index 62504f7b5d93..5a19edffe9b7 100644
--- a/pkgs/desktops/kde-5/plasma/fetch.sh
+++ b/pkgs/desktops/kde-5/plasma/fetch.sh
@@ -1 +1 @@
-WGET_ARGS=( http://download.kde.org/stable/plasma/5.8.0/ -A '*.tar.xz' )
+WGET_ARGS=( http://download.kde.org/stable/plasma/5.8.1/ -A '*.tar.xz' )
diff --git a/pkgs/desktops/kde-5/plasma/srcs.nix b/pkgs/desktops/kde-5/plasma/srcs.nix
index 1a9b04ce9a62..8ff8f210315b 100644
--- a/pkgs/desktops/kde-5/plasma/srcs.nix
+++ b/pkgs/desktops/kde-5/plasma/srcs.nix
@@ -3,323 +3,323 @@
 
 {
   bluedevil = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/bluedevil-5.8.0.tar.xz";
-      sha256 = "1rpabb4ccjrzql3r3w88jx847cqqg31nppzvaacdvz9g4c648652";
-      name = "bluedevil-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/bluedevil-5.8.1.tar.xz";
+      sha256 = "0j2mrx2qchcl1s13j3bhqrbgx7myq901clb20x4v9bfdcv1j9cp1";
+      name = "bluedevil-5.8.1.tar.xz";
     };
   };
   breeze = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/breeze-5.8.0.tar.xz";
-      sha256 = "0g45vq6pczy0dmim0h8nzi3amhyps03a8y5ajyv4i77drk5ccc0n";
-      name = "breeze-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/breeze-5.8.1.tar.xz";
+      sha256 = "1s9z8j4jzs951yv1742lq5yh4pz82rkc1d80d7q2yh6964ck733p";
+      name = "breeze-5.8.1.tar.xz";
     };
   };
   breeze-grub = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/breeze-grub-5.8.0.tar.xz";
-      sha256 = "1zja3m6hnmmax8p1lh0ygapp3inbydxr98rabcrb8yzkasz95xsf";
-      name = "breeze-grub-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/breeze-grub-5.8.1.tar.xz";
+      sha256 = "1d3skcj2yg82f5nqghpz9nbz1yb0b5kps3lf28hsq2k2vpqrp4mc";
+      name = "breeze-grub-5.8.1.tar.xz";
     };
   };
   breeze-gtk = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/breeze-gtk-5.8.0.tar.xz";
-      sha256 = "1lzhaw8rml5cpd965zdj9n1xw9w965rl0yq1xwbsyad7qln864n3";
-      name = "breeze-gtk-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/breeze-gtk-5.8.1.tar.xz";
+      sha256 = "0nmf6h9kvq5l73yqri3xvldyw669a3rgbjmjizzq1qisri3y0qsz";
+      name = "breeze-gtk-5.8.1.tar.xz";
     };
   };
   breeze-plymouth = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/breeze-plymouth-5.8.0.tar.xz";
-      sha256 = "0p0dg97f94n59918jg4hr8z0hfsv46s1iz0gcgwy6v3s7jhl0cy8";
-      name = "breeze-plymouth-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/breeze-plymouth-5.8.1.tar.xz";
+      sha256 = "149af4ja38h9sln7sfi05zxwnd8whhmp849zyxgbvdrjc3xxsvcz";
+      name = "breeze-plymouth-5.8.1.tar.xz";
     };
   };
   discover = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/discover-5.8.0.tar.xz";
-      sha256 = "0wxa5w9rys5w4mr81cr7z0n721lp1hyl9ab006drszbdsqb512kb";
-      name = "discover-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/discover-5.8.1.tar.xz";
+      sha256 = "01njqp15qlqvkppn83m2y0yf64v53378f7l2zkzcyxx00pvq2ivk";
+      name = "discover-5.8.1.tar.xz";
     };
   };
   kactivitymanagerd = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kactivitymanagerd-5.8.0.tar.xz";
-      sha256 = "1hjfyw5r6fzl8q07rlnzca59lh9229w30hb7v3m3nz9fi0jksxwy";
-      name = "kactivitymanagerd-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kactivitymanagerd-5.8.1.tar.xz";
+      sha256 = "0pdr4m9qm62v7qansax1jl8va9j4iarmw0iw4cm60m7g6z1aaf4m";
+      name = "kactivitymanagerd-5.8.1.tar.xz";
     };
   };
   kde-cli-tools = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kde-cli-tools-5.8.0.tar.xz";
-      sha256 = "19i8wycgsk7yqv7scmwnnd0cridnvg6v8p5jj5x98bc9z1g2jqc5";
-      name = "kde-cli-tools-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kde-cli-tools-5.8.1.tar.xz";
+      sha256 = "1bvirh2cbp8cmqrm9h1kdpjdrzbbl9nxsgwh3fw7374k3lsiry01";
+      name = "kde-cli-tools-5.8.1.tar.xz";
     };
   };
   kdecoration = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kdecoration-5.8.0.tar.xz";
-      sha256 = "0gab3lpg5p156628wy04svbyj81jwpq133bbycrc97k281m2nppr";
-      name = "kdecoration-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kdecoration-5.8.1.tar.xz";
+      sha256 = "09d59f10jsvhsh8dwnz9vd4ngiy22si5wcpj0idml4xvkq1sn1gj";
+      name = "kdecoration-5.8.1.tar.xz";
     };
   };
   kde-gtk-config = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kde-gtk-config-5.8.0.tar.xz";
-      sha256 = "1b3ncnil4yhwnms53gl7nds3ggjhq6zi0j5hdik829wmplxrh8ac";
-      name = "kde-gtk-config-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kde-gtk-config-5.8.1.tar.xz";
+      sha256 = "1yz9abniqjsp8xc4dndcsbvjigff10787fflwczz4f48is611s3f";
+      name = "kde-gtk-config-5.8.1.tar.xz";
     };
   };
   kdeplasma-addons = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kdeplasma-addons-5.8.0.tar.xz";
-      sha256 = "0sf7f3by07g3w7jf13z7yspqjf14dj7z5p0g8lvks3xsikf74vkc";
-      name = "kdeplasma-addons-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kdeplasma-addons-5.8.1.tar.xz";
+      sha256 = "1148kxdkrdyspy5y3wbs4l7asig4imjjlmssn5g0p8h3q8ag8lbx";
+      name = "kdeplasma-addons-5.8.1.tar.xz";
     };
   };
   kgamma5 = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kgamma5-5.8.0.tar.xz";
-      sha256 = "146jd594byzi2gxvr1iy85p34y8yw04qi5ja9bcpcfzz7m7jwa41";
-      name = "kgamma5-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kgamma5-5.8.1.tar.xz";
+      sha256 = "1v390jlfd56v2pins903yx3z4i32dkjf4cg48ah66shxqp2lr55g";
+      name = "kgamma5-5.8.1.tar.xz";
     };
   };
   khotkeys = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/khotkeys-5.8.0.tar.xz";
-      sha256 = "06sc7s8dim4c55l5m8algxpw3g75lx3mdx9p46pxv5gppg3zlgg1";
-      name = "khotkeys-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/khotkeys-5.8.1.tar.xz";
+      sha256 = "1g3qd9v2mxi8a9556x8hrj30d0wcv0bqr414zxl631c8sm0rwami";
+      name = "khotkeys-5.8.1.tar.xz";
     };
   };
   kinfocenter = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kinfocenter-5.8.0.tar.xz";
-      sha256 = "02jrs9c7k8fsz0mvmsj5ammvwm4rxj8835zi0sh427h8l8vs5n6z";
-      name = "kinfocenter-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kinfocenter-5.8.1.tar.xz";
+      sha256 = "0iarh97wpq0l5llasb2ikd2f53v41rilj4f6qj1flmxligs4pwdd";
+      name = "kinfocenter-5.8.1.tar.xz";
     };
   };
   kmenuedit = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kmenuedit-5.8.0.tar.xz";
-      sha256 = "0ih4qmijnfvs5dp9m8pbr93d3mxvw9bhninfv7m3h0ngkxqwxwfn";
-      name = "kmenuedit-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kmenuedit-5.8.1.tar.xz";
+      sha256 = "128cqnxw6rkb378p05s33i7yyz6yydnfdbf462ngiq628n6aqvrp";
+      name = "kmenuedit-5.8.1.tar.xz";
     };
   };
   kscreen = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kscreen-5.8.0.tar.xz";
-      sha256 = "19p1rfqir59hd8ww8x78m6kgky7n82w0s0gw15404p6wk25nvyzx";
-      name = "kscreen-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kscreen-5.8.1.tar.xz";
+      sha256 = "0m9ddmp4vi38vkzik8bi5mir1mw66il2dfrf77h7amwfsnkicvfi";
+      name = "kscreen-5.8.1.tar.xz";
     };
   };
   kscreenlocker = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kscreenlocker-5.8.0.tar.xz";
-      sha256 = "1hr0cqi2zhrq3crs4j9zh10nr7xmnw1bp9nvm1v1psrrg5wilxzw";
-      name = "kscreenlocker-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kscreenlocker-5.8.1.tar.xz";
+      sha256 = "08ibp746w1xp6p5ccyl0p16giwcfrvq3nakwhwvhlwh0lirgvlrh";
+      name = "kscreenlocker-5.8.1.tar.xz";
     };
   };
   ksshaskpass = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/ksshaskpass-5.8.0.tar.xz";
-      sha256 = "1lklixan8c80yj02rgazr70x20zfh8lrjmimwismdrmvxpadn7sb";
-      name = "ksshaskpass-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/ksshaskpass-5.8.1.tar.xz";
+      sha256 = "0yma28axv91zl0zjanrnwjjws9l187l6m4cjshy4ai77prcyzlqn";
+      name = "ksshaskpass-5.8.1.tar.xz";
     };
   };
   ksysguard = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/ksysguard-5.8.0.tar.xz";
-      sha256 = "1cq6gxwpihfip7wxjlja7ha0pknsn8x8rkpcq3lb28pap88g54fz";
-      name = "ksysguard-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/ksysguard-5.8.1.tar.xz";
+      sha256 = "1msrxhlln561y78gi6rdqzkv9sc0pk3w0znca9fjlsnacl7dbcn9";
+      name = "ksysguard-5.8.1.tar.xz";
     };
   };
   kwallet-pam = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kwallet-pam-5.8.0.tar.xz";
-      sha256 = "10rqfqavawnp6hdqfpv3zwnaw1g8f5zakfirm3aym5w2lllrdydh";
-      name = "kwallet-pam-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kwallet-pam-5.8.1.tar.xz";
+      sha256 = "1nl0lb71s2sqhdplyfn5xl01q8zrqj544vlmjd2vc1a18p6qlkcy";
+      name = "kwallet-pam-5.8.1.tar.xz";
     };
   };
   kwayland-integration = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kwayland-integration-5.8.0.tar.xz";
-      sha256 = "0pypjbvg2v4f4gsr9pq3w6y5mnlrcd3sjh1wwnad6shcrwkpy8vq";
-      name = "kwayland-integration-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kwayland-integration-5.8.1.tar.xz";
+      sha256 = "1qwdlv7k6r7rzzihvmfhp4bsnz0nlfbi70fxxkdxdr49k1wqhxih";
+      name = "kwayland-integration-5.8.1.tar.xz";
     };
   };
   kwin = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kwin-5.8.0.tar.xz";
-      sha256 = "17lr1ffwmyndqglhk9c3hi2r4kyr86696p15ir33rplzjnki15qc";
-      name = "kwin-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kwin-5.8.1.tar.xz";
+      sha256 = "0b1p6vz87ffy30ja5nz9n1q0i1nhjllcr0rfqnwa1b6wkiv7dabl";
+      name = "kwin-5.8.1.tar.xz";
     };
   };
   kwrited = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/kwrited-5.8.0.tar.xz";
-      sha256 = "10iffb1agqrsy214zpf2ax6ak5ahb6c5p8ik0ar52iwmgxrxkicf";
-      name = "kwrited-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/kwrited-5.8.1.tar.xz";
+      sha256 = "0sk7lwrwl7h174x7bips9a4nzb4wrfqyby0whp8qjpxq891cxbgy";
+      name = "kwrited-5.8.1.tar.xz";
     };
   };
   libkscreen = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/libkscreen-5.8.0.tar.xz";
-      sha256 = "0bzqdcfibw1zw7nmgsqg9sn9pgcsp5yx53dd4phin741iqafwqm9";
-      name = "libkscreen-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/libkscreen-5.8.1.tar.xz";
+      sha256 = "1pgpn49vgjx9ydqvnvvrs87sjc7zkfcyddw00270m6pk76zcxvc4";
+      name = "libkscreen-5.8.1.tar.xz";
     };
   };
   libksysguard = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/libksysguard-5.8.0.tar.xz";
-      sha256 = "0h6m2dj8dml98rgq1va8xpyndwq7bj0q0z97644cpiw0sv00cg66";
-      name = "libksysguard-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/libksysguard-5.8.1.tar.xz";
+      sha256 = "1l9gwirs6b3iingq6fcv3yfhkqifjwwg0vwpz9041rj4rry4h73p";
+      name = "libksysguard-5.8.1.tar.xz";
     };
   };
   milou = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/milou-5.8.0.tar.xz";
-      sha256 = "0ahjc28zmdnp4h86929m2719fwbldcj772axbkbz6riljdbhaw4v";
-      name = "milou-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/milou-5.8.1.tar.xz";
+      sha256 = "0znxcmm0h3ghzy22bpcca3jkxypq9zhlwbka4a7skw7ckl55xszm";
+      name = "milou-5.8.1.tar.xz";
     };
   };
   oxygen = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/oxygen-5.8.0.tar.xz";
-      sha256 = "1snvc7j8bz1f12yx21s2i6lcspwv7apwrrjm90pxyk4mk7lhgmm0";
-      name = "oxygen-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/oxygen-5.8.1.tar.xz";
+      sha256 = "0fbj96614f59xkl7ia3k810in793jkmqmzb5csmng19qw1qjg5wk";
+      name = "oxygen-5.8.1.tar.xz";
     };
   };
   plasma-desktop = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/plasma-desktop-5.8.0.tar.xz";
-      sha256 = "1isbgbm12prffkb0bhx1mkr45dng3il0x5mhhm54cnkgn4g6nclb";
-      name = "plasma-desktop-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/plasma-desktop-5.8.1.tar.xz";
+      sha256 = "1da96cy3pkryhff6f5cnyvvicz8brjjjh17k0rg5vbrd53zgsz4r";
+      name = "plasma-desktop-5.8.1.tar.xz";
     };
   };
   plasma-integration = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/plasma-integration-5.8.0.tar.xz";
-      sha256 = "1k776ybz8wd37c283fgnnrvpl573bgwicvgjbfns1127bzybqgy7";
-      name = "plasma-integration-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/plasma-integration-5.8.1.tar.xz";
+      sha256 = "1xfc7nn5gcfccmby7ivwh7clrk1z4k8m1qag14r1rxfv8gnswm67";
+      name = "plasma-integration-5.8.1.tar.xz";
     };
   };
   plasma-nm = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/plasma-nm-5.8.0.tar.xz";
-      sha256 = "1hvzq96xw6f6j637fhaml4n8xv7gp3cif86h9gmxnbqczdfx617r";
-      name = "plasma-nm-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/plasma-nm-5.8.1.tar.xz";
+      sha256 = "0v34nvc004zini3i3ya9xw6cvyyh3r7i7z2kijjaqi70vnhx1dp6";
+      name = "plasma-nm-5.8.1.tar.xz";
     };
   };
   plasma-pa = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/plasma-pa-5.8.0.tar.xz";
-      sha256 = "0jgsadzdrlyrq8hagqi5m1mr7hmsmjz33vg508a3b7390mwfw8ah";
-      name = "plasma-pa-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/plasma-pa-5.8.1.tar.xz";
+      sha256 = "1dhqljwn1ihr4wj4785ggja6gvjm5cwfyc5gvmkvb2ls226k2ihb";
+      name = "plasma-pa-5.8.1.tar.xz";
     };
   };
   plasma-sdk = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/plasma-sdk-5.8.0.tar.xz";
-      sha256 = "1ncp858cq5nad5n16r1wfk2fg2m30mlaw3hs343rbw81139386m5";
-      name = "plasma-sdk-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/plasma-sdk-5.8.1.tar.xz";
+      sha256 = "0gav6b7bnxl9myf440lygiaymj8jmj6b5mf2nr4vnibymiiq6asm";
+      name = "plasma-sdk-5.8.1.tar.xz";
     };
   };
   plasma-tests = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/plasma-tests-5.8.0.tar.xz";
-      sha256 = "1xacmw8mv3yymz8xj1r37sphrds8y2hsjixali28i7n0njqbx400";
-      name = "plasma-tests-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/plasma-tests-5.8.1.tar.xz";
+      sha256 = "1g5cx7vbghw2av7c943whgmsasgw612ccb9nl5kdfb0g0icpxalk";
+      name = "plasma-tests-5.8.1.tar.xz";
     };
   };
   plasma-workspace = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/plasma-workspace-5.8.0.tar.xz";
-      sha256 = "06dklafkszn0rfm980mixr5kh4p40ybk63my3ayn6y7fd4n1anrn";
-      name = "plasma-workspace-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/plasma-workspace-5.8.1.tar.xz";
+      sha256 = "0p7d9a612qqhfm296gg2qda4cqnqy51znbapddyra5dq9ywkhnn0";
+      name = "plasma-workspace-5.8.1.tar.xz";
     };
   };
   plasma-workspace-wallpapers = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/plasma-workspace-wallpapers-5.8.0.tar.xz";
-      sha256 = "1nf7ggwpakn14ash0ymmi05ld2wns6bk189845f89cy763ssx52g";
-      name = "plasma-workspace-wallpapers-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/plasma-workspace-wallpapers-5.8.1.tar.xz";
+      sha256 = "17xz75pfpgyzynjy7n1bdm2cnbqyrqhi0d7b4ghpvygg0m1iba9s";
+      name = "plasma-workspace-wallpapers-5.8.1.tar.xz";
     };
   };
   polkit-kde-agent = {
-    version = "1-5.8.0";
+    version = "1-5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/polkit-kde-agent-1-5.8.0.tar.xz";
-      sha256 = "0x5sdgbq9jj2z4wdgx6v47d9004srqfvnl0bvmzml53mzyrh07kx";
-      name = "polkit-kde-agent-1-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/polkit-kde-agent-1-5.8.1.tar.xz";
+      sha256 = "1q5wfr308ayqarvq0fr049aqfwz36hyx8wl7pirllralnz2wmvgv";
+      name = "polkit-kde-agent-1-5.8.1.tar.xz";
     };
   };
   powerdevil = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/powerdevil-5.8.0.tar.xz";
-      sha256 = "03l1c1x6a0xhvh4xswv2lwpk7kjl86i5mc3afsx8zp8h59wfg1w1";
-      name = "powerdevil-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/powerdevil-5.8.1.tar.xz";
+      sha256 = "0qkmdnck3im0wd1v9a24p8pxwxi38x7kx1a4z8zddsd8pd8d8sjv";
+      name = "powerdevil-5.8.1.tar.xz";
     };
   };
   sddm-kcm = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/sddm-kcm-5.8.0.tar.xz";
-      sha256 = "0in5s7h860vn12w8i55bzxw5hv6bnhp3zapbbf1jpgvwixhx8bkf";
-      name = "sddm-kcm-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/sddm-kcm-5.8.1.tar.xz";
+      sha256 = "0kflarcq3q1gbd1blxpspq918cyxxwyigwv8jsmr29yfx947ik17";
+      name = "sddm-kcm-5.8.1.tar.xz";
     };
   };
   systemsettings = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/systemsettings-5.8.0.tar.xz";
-      sha256 = "0kf671hpj42ps27clsc90fj2ndiv3q45y76fc09wv4say351kz1c";
-      name = "systemsettings-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/systemsettings-5.8.1.tar.xz";
+      sha256 = "04f0z4gq7zyyljb84na184q1wn6mkr9mg06mfv9zkbamsfaiazd8";
+      name = "systemsettings-5.8.1.tar.xz";
     };
   };
   user-manager = {
-    version = "5.8.0";
+    version = "5.8.1";
     src = fetchurl {
-      url = "${mirror}/stable/plasma/5.8.0/user-manager-5.8.0.tar.xz";
-      sha256 = "0zyg8i9igya3j80pz6lj3wav894z0f1j34aysixm5lc7pakghkg6";
-      name = "user-manager-5.8.0.tar.xz";
+      url = "${mirror}/stable/plasma/5.8.1/user-manager-5.8.1.tar.xz";
+      sha256 = "1bccibypnv58gkmh895w1b9lnmhwda1kypxbd34b9hcldq1dgag7";
+      name = "user-manager-5.8.1.tar.xz";
     };
   };
 }
diff --git a/pkgs/desktops/lxqt/default.nix b/pkgs/desktops/lxqt/default.nix
index 82fc639af2d3..981503cab95a 100644
--- a/pkgs/desktops/lxqt/default.nix
+++ b/pkgs/desktops/lxqt/default.nix
@@ -59,6 +59,7 @@ let
     compton-conf = callPackage ./optional/compton-conf { };
     obconf-qt = callPackage ./optional/obconf-qt { };
     lximage-qt = callPackage ./optional/lximage-qt { };
+    qps = callPackage ./optional/qps { };
    
   };
 
diff --git a/pkgs/desktops/lxqt/optional/qps/default.nix b/pkgs/desktops/lxqt/optional/qps/default.nix
new file mode 100644
index 000000000000..d39341eb05d0
--- /dev/null
+++ b/pkgs/desktops/lxqt/optional/qps/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchFromGitHub, cmake, qt5, makeDesktopItem }:
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "qps";
+  version = "1.10.16";
+
+  srcs = fetchFromGitHub {
+    owner = "QtDesktop";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1s6hvqfv9hv1cl5pfsmghqn1zqhibr4plq3glzgd8s7swwdnsvjj";
+  };
+
+  desktopItem = makeDesktopItem {
+    name = "qps";
+    exec = "qps";
+    icon = "qps";
+    comment = "Visual process manager - Qt version of ps/top";
+    desktopName = "qps";
+    genericName = meta.description;
+    categories = "System;";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ qt5.qtbase qt5.qtx11extras ];
+
+  installPhase = ''
+    mkdir -p $out/{bin,share/{man/man1,doc,icons}}
+    cp -a src/qps $out/bin/
+    cp -a ../README.md $out/share/doc/
+    cp -a ../qps.1 $out/share/man/man1/
+    cp -a ../icon/icon.xpm $out/share/icons/qps.xpm
+    ln -sv "${desktopItem}/share/applications" $out/share/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "The Qt process manager";
+    homepage = https://github.com/QtDesktop/qps;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ romildo ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/pkgs/development/arduino/arduino-core/downloads.nix b/pkgs/development/arduino/arduino-core/downloads.nix
index c4cf99f072ba..9d3ed56bee99 100644
--- a/pkgs/development/arduino/arduino-core/downloads.nix
+++ b/pkgs/development/arduino/arduino-core/downloads.nix
@@ -85,7 +85,7 @@
     url = "http://downloads.arduino.cc/tools/arduino-builder-linux32-1.3.21_r1.tar.bz2";
     sha256 = "1prfwb5scprvd74gihd78ibsdy3806b0fsjhgyj9in4w1q8s3dxj";
   };
-  "build/linux/avr-gcc-4.9.2-arduino5-i686-pc-linux-gnu.tar.bz2" = fetchurl {
+  "build/linux/avr-gcc-4.9.2-atmel3.5.3-arduino2-i686-pc-linux-gnu.tar.bz2" = fetchurl {
     url = "http://downloads.arduino.cc/tools/avr-gcc-4.9.2-atmel3.5.3-arduino2-i686-pc-linux-gnu.tar.bz2";
     sha256 = "0s7chsp1jyk477zvfaraf0yacvlzahkwqxpws4k0kjadghg9a27i";
   };
diff --git a/pkgs/development/compilers/ghcjs/default.nix b/pkgs/development/compilers/ghcjs/default.nix
index 9b1a377fd8b8..565215f474ea 100644
--- a/pkgs/development/compilers/ghcjs/default.nix
+++ b/pkgs/development/compilers/ghcjs/default.nix
@@ -176,5 +176,4 @@ in mkDerivation (rec {
   license = stdenv.lib.licenses.bsd3;
   platforms = ghc.meta.platforms;
   maintainers = with stdenv.lib.maintainers; [ jwiegley cstrahan ];
-  broken = true;   # See http://hydra.nixos.org/build/41499439, for example.
 })
diff --git a/pkgs/development/compilers/llvm/3.7/llvm.nix b/pkgs/development/compilers/llvm/3.7/llvm.nix
index cc65c69927c5..ae9ba62a04ce 100644
--- a/pkgs/development/compilers/llvm/3.7/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.7/llvm.nix
@@ -35,6 +35,18 @@ in stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ ncurses zlib ];
 
+  # The goal here is to disable LLVM bindings (currently go and ocaml) regardless
+  # of whether the impure CMake search sheananigans find the compilers in global
+  # paths. This mostly exists because sandbox builds don't work very well on Darwin
+  # and sometimes you get weird behavior if CMake finds go in your system path.
+  # This would be far prettier if there were a CMake option to just disable bindings
+  # but from what I can tell, there isn't such a thing. The file in question only
+  # contains `if(WIN32)` conditions to check whether to disable bindings, so making
+  # those always succeed has the net effect of disabling all bindings.
+  prePatch = ''
+    substituteInPlace cmake/config-ix.cmake --replace "if(WIN32)" "if(1)"
+  '';
+
   # hacky fix: created binaries need to be run before installation
   preBuild = ''
     mkdir -p $out/
diff --git a/pkgs/development/compilers/llvm/3.8/clang/default.nix b/pkgs/development/compilers/llvm/3.8/clang/default.nix
index d0d5a2dea142..6052246dad07 100644
--- a/pkgs/development/compilers/llvm/3.8/clang/default.nix
+++ b/pkgs/development/compilers/llvm/3.8/clang/default.nix
@@ -6,7 +6,7 @@ let
     name = "clang-${version}";
 
     unpackPhase = ''
-      unpackFile ${fetch "cfe" "1ybcac8hlr9vl3wg8s4v6cp0c0qgqnwprsv85lihbkq3vqv94504"}
+      unpackFile ${fetch "cfe" "1prc72xmkgx8wrzmrr337776676nhsp1qd3mw2bvb22bzdnq7lsc"}
       mv cfe-${version}.src clang
       sourceRoot=$PWD/clang
       unpackFile ${clang-tools-extra_src}
diff --git a/pkgs/development/compilers/llvm/3.8/default.nix b/pkgs/development/compilers/llvm/3.8/default.nix
index a2a702a617ee..df1a775ef968 100644
--- a/pkgs/development/compilers/llvm/3.8/default.nix
+++ b/pkgs/development/compilers/llvm/3.8/default.nix
@@ -2,7 +2,7 @@
 let
   callPackage = newScope (self // { inherit stdenv isl version fetch; });
 
-  version = "3.8.0";
+  version = "3.8.1";
 
   fetch = fetch_v version;
   fetch_v = ver: name: sha256: fetchurl {
@@ -10,8 +10,8 @@ let
     inherit sha256;
   };
 
-  compiler-rt_src = fetch "compiler-rt" "1c2nkp9563873ffz22qmhc0wakgj428pch8rmhym8agjamz3ily8";
-  clang-tools-extra_src = fetch "clang-tools-extra" "1i0yrgj8qrzjjswraz0i55lg92ljpqhvjr619d268vka208aigdg";
+  compiler-rt_src = fetch "compiler-rt" "0p0y85c7izndbpg2l816z7z7558axq11d5pwkm4h11sdw7d13w0d";
+  clang-tools-extra_src = fetch "clang-tools-extra" "15n39r4ssphpaq4a0wzyjm7ilwxb0bch6nrapy8c5s8d49h5qjk6";
 
   self = {
     llvm = callPackage ./llvm.nix {
diff --git a/pkgs/development/compilers/llvm/3.8/libc++/default.nix b/pkgs/development/compilers/llvm/3.8/libc++/default.nix
index deeedaad5bfd..15f7ee1e3e4a 100644
--- a/pkgs/development/compilers/llvm/3.8/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/3.8/libc++/default.nix
@@ -3,7 +3,7 @@
 stdenv.mkDerivation rec {
   name = "libc++-${version}";
 
-  src = fetch "libcxx" "0yr3fh8vj38289b9cwk37zsy7x98dcd3kjy7xxy8mg20p48lb01n";
+  src = fetch "libcxx" "1k7f9qk5bgwa02ksh6yr9hccwcbhmcdzl1fpbdw6s2c89iwg7mvp";
 
   postUnpack = ''
     unpackFile ${libcxxabi.src}
diff --git a/pkgs/development/compilers/llvm/3.8/libc++abi.nix b/pkgs/development/compilers/llvm/3.8/libc++abi.nix
index fdbc002688e9..61ff6341c30a 100644
--- a/pkgs/development/compilers/llvm/3.8/libc++abi.nix
+++ b/pkgs/development/compilers/llvm/3.8/libc++abi.nix
@@ -3,7 +3,7 @@
 stdenv.mkDerivation {
   name = "libc++abi-${version}";
 
-  src = fetch "libcxxabi" "0175rv2ynkklbg96kpw13iwhnzyrlw3r12f4h09p9v7nmxqhivn5";
+  src = fetch "libcxxabi" "1qfs2iis1i0ppv11jndc98cvd7s25pj46pq2sfyldmzswdxmzdg1";
 
   buildInputs = [ cmake ] ++ stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
 
diff --git a/pkgs/development/compilers/llvm/3.8/lldb.nix b/pkgs/development/compilers/llvm/3.8/lldb.nix
index d578d7ca70a4..568476e44ac2 100644
--- a/pkgs/development/compilers/llvm/3.8/lldb.nix
+++ b/pkgs/development/compilers/llvm/3.8/lldb.nix
@@ -15,7 +15,7 @@
 stdenv.mkDerivation {
   name = "lldb-${version}";
 
-  src = fetch "lldb" "0dasg12gf5crrd9pbi5rd1y8vwlgqp8nxgw9g4z47w3x2i28zxp3";
+  src = fetch "lldb" "18z8vhfgh4m57hl66i83cp4d4mv3i86z2hjhbp5rvqs7d88li49l";
 
   postUnpack = ''
     # Hack around broken standalone builf as of 3.8
@@ -25,12 +25,9 @@ stdenv.mkDerivation {
     cp "$(ls -d llvm-*.src)/lib/Support/regex_impl.h" "$srcDir/tools/lib/Support/"
   '';
 
-  buildInputs = [ cmake python which swig ncurses zlib libedit ];
+  buildInputs = [ cmake python which swig ncurses zlib libedit llvm ];
 
-  preConfigure = ''
-    export CXXFLAGS="-pthread"
-    export LDFLAGS="-ldl"
-  '';
+  hardeningDisable = [ "format" ];
 
   cmakeFlags = [
     "-DLLDB_PATH_TO_LLVM_BUILD=${llvm}"
diff --git a/pkgs/development/compilers/llvm/3.8/llvm.nix b/pkgs/development/compilers/llvm/3.8/llvm.nix
index fc29d00a5245..6112228bf4fc 100644
--- a/pkgs/development/compilers/llvm/3.8/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.8/llvm.nix
@@ -18,7 +18,7 @@
 }:
 
 let
-  src = fetch "llvm" "0ikfq0gxac8xpvxj23l4hk8f12ydx48fljgrz1gl9xp0ks704nsm";
+  src = fetch "llvm" "1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf";
 in stdenv.mkDerivation rec {
   name = "llvm-${version}";
 
diff --git a/pkgs/development/compilers/pakcs/case-insensitive.patch b/pkgs/development/compilers/pakcs/case-insensitive.patch
new file mode 100644
index 000000000000..e46558c25208
--- /dev/null
+++ b/pkgs/development/compilers/pakcs/case-insensitive.patch
@@ -0,0 +1,19 @@
+--- www/Makefile.orig	2016-10-10 21:04:36.000000000 +0300
++++ pakcs-1.14.0/www/Makefile	2016-10-10 21:07:56.000000000 +0300
+@@ -6,7 +6,7 @@ all: submitform Registry
+ submitform: SubmitForm.curry $(LIBDIR)/HtmlCgi.curry \
+ 	    $(LIBDIR)/NamedSocket.curry $(LIBDIR)/CPNS.curry
+ 	$(REPL) $(REPL_OPTS) :load SubmitForm :save :q
+-	mv SubmitForm submitform
++	mv SubmitForm submitform.orig && mv submitform.orig submitform
+ 
+ Registry: Registry.curry $(LIBDIR)/HtmlCgi.curry
+ 	$(REPL) $(REPL_OPTS) :load Registry :save :q
+--- currytools/erd2curry/Makefile.orig	2016-10-10 21:13:49.000000000 +0300
++++ pakcs-1.14.0/currytools/erd2curry/Makefile	2016-10-10 21:21:14.000000000 +0300
+@@ -32,4 +32,4 @@ uninstall: clean
+ erd2curry: $(DEPS)
+ 	# create saved state for top-level function "main":
+ 	$(REPL) $(REPL_OPTS) :load ERD2Curry :save "main \"$(CURDIR)\"" :q
+-	mv ERD2Curry $@
++	mv ERD2Curry $@.orig && mv $@.orig $@
diff --git a/pkgs/development/compilers/pakcs/default.nix b/pkgs/development/compilers/pakcs/default.nix
index 92b916ccb8e1..ca790d027e03 100644
--- a/pkgs/development/compilers/pakcs/default.nix
+++ b/pkgs/development/compilers/pakcs/default.nix
@@ -82,7 +82,10 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ swiPrologLocked makeWrapper glibcLocales rlwrap tk which ];
 
-  patches = [ ./adjust-buildsystem.patch ];
+  patches = [
+    ./adjust-buildsystem.patch
+    ./case-insensitive.patch
+  ];
 
   configurePhase = ''
     # Phony HOME.
@@ -151,6 +154,6 @@ stdenv.mkDerivation rec {
     '';
 
     maintainers = [ stdenv.lib.maintainers.gnidorah ];
-    platforms = stdenv.lib.platforms.linux;
+    platforms = stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/compilers/ponyc/pony-stable.nix b/pkgs/development/compilers/ponyc/pony-stable.nix
new file mode 100644
index 000000000000..cd4859acec21
--- /dev/null
+++ b/pkgs/development/compilers/ponyc/pony-stable.nix
@@ -0,0 +1,26 @@
+{stdenv, fetchFromGitHub, ponyc }:
+
+stdenv.mkDerivation {
+  name = "pony-stable-2016-10-10";
+
+  src = fetchFromGitHub {
+    owner = "jemc";
+    repo = "pony-stable";
+    rev = "fdefa26fed93f4ff81c323f29abd47813c515703";
+    sha256 = "16inavy697icgryyvn9gcylgh639xxs7lnbrqdzcryvh0ck15qxk";
+  };
+
+  buildInputs = [ ponyc ];
+
+  installPhase = ''
+    make prefix=$out install
+  '';
+
+  meta = {
+    description = "A simple dependency manager for the Pony language.";
+    homepage = http://www.ponylang.org;
+    license = stdenv.lib.licenses.bsd2;
+    maintainers = [ stdenv.lib.maintainers.dipinhora ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix
index e7cc7b15627e..454b67b8151b 100644
--- a/pkgs/development/compilers/rust/bootstrap.nix
+++ b/pkgs/development/compilers/rust/bootstrap.nix
@@ -17,13 +17,13 @@ let
   # fetch hashes by running `print-hashes.sh 1.9.0`
   bootstrapHash =
     if stdenv.system == "i686-linux"
-    then "be93dd2b80a97f2877679950d56990628c6547b953294f16bf6d69c18a39edc0"
+    then "f5a3f5d53defe827a71447b1a0e7a656394b87ee23e009d7bf73a0277c1b5ac2"
     else if stdenv.system == "x86_64-linux"
-    then "f189303d52b37c8bb694b9d9739ae73ffa926cbdeffde1d5d6a5c6e811940293"
+    then "f4ebbd6d9494cb8fa6c410cb58954e1913546c2bca8963faebc424591547d83f"
     else if stdenv.system == "i686-darwin"
-    then "40d4782a58dd5bef22dbbaa7a363f3b42f844628db07205f6435ac934f350061"
+    then "bf07182bc362985fcdd48af905cdb559e20c68518cd71dabec3c30b78ca8a94a"
     else if stdenv.system == "x86_64-darwin"
-    then "4bb71249f4afd7cee07f63d681f9fcb1b525ee3dfd49722adab7a40024e45af7"
+    then "2cdbc47438dc86ecaf35298317b77d735956eb160862e3f6d0fda0da656ecc35"
     else throw "missing boostrap hash for platform ${stdenv.system}";
 
   needsPatchelf = stdenv.isLinux;
@@ -33,7 +33,7 @@ let
      sha256 = bootstrapHash;
   };
 
-  version = "1.10.0";
+  version = "1.11.0";
 in
 
 rec {
diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix
index b7e992c916d3..1dbc6c13e0bf 100644
--- a/pkgs/development/compilers/rust/default.nix
+++ b/pkgs/development/compilers/rust/default.nix
@@ -7,12 +7,12 @@ in
 
 rec {
   rustc = callPackage ./rustc.nix {
-    shortVersion = "1.11.0";
+    shortVersion = "1.12.0";
     isRelease = true;
     forceBundledLLVM = false;
     configureFlags = [ "--release-channel=stable" ];
-    srcRev = "9b21dcd6a89f38e8ceccb2ede8c9027cb409f6e3";
-    srcSha = "12djpxhwqvq3262ai9vd096bvriynci2mrwn0dfjrd0w6s0i8viy";
+    srcRev = "3191fbae9da539442351f883bdabcad0d72efcb6";
+    srcSha = "1mpw6c5jfxy60g786wl8g0ncwikqfbcj67jrdpj3jacywxsxzlby";
 
     patches = [
       ./patches/disable-lockfile-check.patch
@@ -25,10 +25,10 @@ rec {
   };
 
   cargo = callPackage ./cargo.nix rec {
-    version = "0.12.0";
-    srcRev = "6b98d1f8abf5b33c1ca2771d3f5f3bafc3407b93";
-    srcSha = "0pq6l3yzmh2il6320f6501hvp9iikdxzl34i5b52v93ncpim36bk";
-    depsSha256 = "1jrwzm9fd15kf2d5zb17q901hx32h711ivcwdpxpmzwq08sjlcvl";
+    version = "0.13.0";
+    srcRev = "109cb7c33d426044d141457049bd0fffaca1327c";
+    srcSha = "0p79m7hpzjh36l4fc6a59h6r8yz6qafjcdg5v1yb7bac9m2wi7vs";
+    depsSha256 = "1cwp4p8b985fj8j2qmgsi2mpp51rdpwzm9qa60760nrry1fy624z";
 
     inherit rustc; # the rustc that will be wrapped by cargo
     inherit rustPlatform; # used to build cargo
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix
index 44964f53a44c..e1bff12f398e 100644
--- a/pkgs/development/compilers/rust/rustc.nix
+++ b/pkgs/development/compilers/rust/rustc.nix
@@ -90,6 +90,9 @@ stdenv.mkDerivation {
     # Disable fragile linker-output-non-utf8 test
     rm -vr src/test/run-make/linker-output-non-utf8/
 
+    # Remove test targeted at LLVM 3.9 - https://github.com/rust-lang/rust/issues/36835
+    rm -vr src/test/run-pass/issue-36023.rs
+
     # Useful debugging parameter
     # export VERBOSE=1
   '' +
diff --git a/pkgs/development/compilers/swi-prolog/default.nix b/pkgs/development/compilers/swi-prolog/default.nix
index b6d6388c74b9..79f7e5256b21 100644
--- a/pkgs/development/compilers/swi-prolog/default.nix
+++ b/pkgs/development/compilers/swi-prolog/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, gmp, readline, openssl, libjpeg, unixODBC, zlib
 , libXinerama, libXft, libXpm, libSM, libXt, freetype, pkgconfig
-, fontconfig
+, fontconfig, makeWrapper ? stdenv.isDarwin
 }:
 
 let
@@ -15,7 +15,8 @@ stdenv.mkDerivation {
   };
 
   buildInputs = [ gmp readline openssl libjpeg unixODBC libXinerama
-    libXft libXpm libSM libXt zlib freetype pkgconfig fontconfig ];
+    libXft libXpm libSM libXt zlib freetype pkgconfig fontconfig ]
+  ++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
 
   hardeningDisable = [ "format" ];
 
@@ -23,12 +24,24 @@ stdenv.mkDerivation {
 
   buildFlags = "world";
 
+  # For macOS: still not fixed in upstream: "abort trap 6" when called
+  # through symlink, so wrap binary.
+  # We reinvent wrapProgram here but omit argv0 pass in order to not
+  # break PAKCS package build. This is also safe for SWI-Prolog, since
+  # there is no wrapping environment and hence no need to spoof $0
+  postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
+    local prog="$out/bin/swipl"
+    local hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped
+    mv $prog $hidden
+    makeWrapper $hidden $prog
+  '';
+
   meta = {
     homepage = http://www.swi-prolog.org/;
     description = "A Prolog compiler and interpreter";
     license = "LGPL";
 
-    platforms = stdenv.lib.platforms.linux;
+    platforms = stdenv.lib.platforms.unix;
     maintainers = [ stdenv.lib.maintainers.peti ];
   };
 }
diff --git a/pkgs/development/compilers/vala/0.23.nix b/pkgs/development/compilers/vala/0.23.nix
deleted file mode 100644
index 13b9c5f39832..000000000000
--- a/pkgs/development/compilers/vala/0.23.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
-, glib, libiconv, libintlOrEmpty
-}:
-
-let
-  major = "0.23";
-  minor = "2";
-  sha256 = "0g22ss9qbm3fqhx4fxhsyfmdc5g1hgdw4dz9d37f4489kl0qf8pl";
-in
-stdenv.mkDerivation rec {
-  name = "vala-${major}.${minor}";
-
-  meta = {
-    description = "Compiler for GObject type system";
-    homepage = "http://live.gnome.org/Vala";
-    license = stdenv.lib.licenses.lgpl21Plus;
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ antono ];
-  };
-
-  src = fetchurl {
-    url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
-    inherit sha256;
-  };
-
-  nativeBuildInputs = [ pkgconfig flex bison libxslt ];
-
-  buildInputs = [ glib libiconv ]
-    ++ libintlOrEmpty;
-}
diff --git a/pkgs/development/compilers/vala/0.26.nix b/pkgs/development/compilers/vala/0.26.nix
deleted file mode 100644
index 78cb850c3565..000000000000
--- a/pkgs/development/compilers/vala/0.26.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
-, glib, libiconv, libintlOrEmpty
-}:
-
-let
-  major = "0.26";
-  minor = "2";
-  sha256 = "37f13f430c56a93b6dac85239084681fd8f31c407d386809c43bc2f2836e03c4";
-in
-stdenv.mkDerivation rec {
-  name = "vala-${major}.${minor}";
-
-  meta = {
-    description = "Compiler for GObject type system";
-    homepage = "http://live.gnome.org/Vala";
-    license = stdenv.lib.licenses.lgpl21Plus;
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ antono lethalman ];
-  };
-
-  src = fetchurl {
-    url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
-    inherit sha256;
-  };
-
-  nativeBuildInputs = [ pkgconfig flex bison libxslt ];
-
-  buildInputs = [ glib libiconv ]
-    ++ libintlOrEmpty;
-}
diff --git a/pkgs/development/compilers/vala/0.28.nix b/pkgs/development/compilers/vala/0.28.nix
deleted file mode 100644
index caec4fda8873..000000000000
--- a/pkgs/development/compilers/vala/0.28.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
-, glib, libiconv, libintlOrEmpty
-}:
-
-let
-  major = "0.28";
-  minor = "0";
-  sha256 = "0zwpzhkhfk3piya14m7p2hl2vaabahprphppfm46ci91z39kp7hd";
-in
-stdenv.mkDerivation rec {
-  name = "vala-${major}.${minor}";
-
-  meta = {
-    description = "Compiler for GObject type system";
-    homepage = "http://live.gnome.org/Vala";
-    license = stdenv.lib.licenses.lgpl21Plus;
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ antono lethalman ];
-  };
-
-  src = fetchurl {
-    url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
-    inherit sha256;
-  };
-
-  nativeBuildInputs = [ pkgconfig flex bison libxslt ];
-
-  buildInputs = [ glib libiconv ]
-    ++ libintlOrEmpty;
-}
diff --git a/pkgs/development/compilers/vala/0.32.nix b/pkgs/development/compilers/vala/0.32.nix
deleted file mode 100644
index 202b9fff6c80..000000000000
--- a/pkgs/development/compilers/vala/0.32.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
-, glib, libiconv, libintlOrEmpty
-}:
-
-let
-  major = "0.32";
-  minor = "1";
-  sha256 = "1ab1l44abf9fj1wznzq5956431ia136rl5049cggnk5393jlf3fx";
-in
-stdenv.mkDerivation rec {
-  name = "vala-${major}.${minor}";
-
-  meta = {
-    description = "Compiler for GObject type system";
-    homepage = "http://live.gnome.org/Vala";
-    license = stdenv.lib.licenses.lgpl21Plus;
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ antono lethalman ];
-  };
-
-  src = fetchurl {
-    url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
-    inherit sha256;
-  };
-
-  nativeBuildInputs = [ pkgconfig flex bison libxslt ];
-
-  buildInputs = [ glib libiconv ]
-    ++ libintlOrEmpty;
-
-}
diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix
new file mode 100644
index 000000000000..b0153a754032
--- /dev/null
+++ b/pkgs/development/compilers/vala/default.nix
@@ -0,0 +1,61 @@
+{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
+, glib, libiconv, libintlOrEmpty
+}:
+
+let
+  generic = { major, minor, sha256 }:
+  stdenv.mkDerivation rec {
+    name = "vala-${major}.${minor}";
+
+    src = fetchurl {
+      url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
+      inherit sha256;
+    };
+
+    nativeBuildInputs = [ pkgconfig flex bison libxslt ];
+
+    buildInputs = [ glib libiconv ] ++ libintlOrEmpty;
+
+    meta = with stdenv.lib; {
+      description = "Compiler for GObject type system";
+      homepage = "http://live.gnome.org/Vala";
+      license = licenses.lgpl21Plus;
+      platforms = platforms.unix;
+      maintainers = with maintainers; [ antono lethalman peterhoeg ];
+    };
+  };
+
+in rec {
+
+  vala_0_23 = generic {
+    major   = "0.23";
+    minor   = "2";
+    sha256  = "0g22ss9qbm3fqhx4fxhsyfmdc5g1hgdw4dz9d37f4489kl0qf8pl";
+  };
+
+  vala_0_26 = generic {
+    major   = "0.26";
+    minor   = "2";
+    sha256  = "1i03ds1z5hivqh4nhf3x80fg7n0zd22908w5minkpaan1i1kzw9p";
+  };
+
+  vala_0_28 = generic {
+    major   = "0.28";
+    minor   = "0";
+    sha256  = "0zwpzhkhfk3piya14m7p2hl2vaabahprphppfm46ci91z39kp7hd";
+  };
+
+  vala_0_32 = generic {
+    major   = "0.32";
+    minor   = "1";
+    sha256  = "1ab1l44abf9fj1wznzq5956431ia136rl5049cggnk5393jlf3fx";
+  };
+
+  vala_0_34 = generic {
+    major   = "0.34";
+    minor   = "1";
+    sha256  = "16cjybjw100qps6jg0jdyjh8hndz8a876zmxpybnf30a8vygrk7m";
+  };
+
+  vala = vala_0_34;
+}
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index be7cf7302b70..fa84e5ce508e 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -43,7 +43,7 @@ self: super: {
     src = pkgs.fetchFromGitHub {
       owner = "joeyh";
       repo = "git-annex";
-      sha256 = "11xgnryvwh3a1dcd5bczrh6wwf23xa74p31cqvnhf2s6q8cb0aai";
+      sha256 = "1j29ydbw86j3qd4qb4l348pcnjd24irgdra9ss2afi6w2pn60yjn";
       rev = drv.version;
     };
     doCheck = false;  # version 6.20160907 has a test suite failure; reported upstream
diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix
index 00f6f3770d5f..c06e0f7d11b1 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix
@@ -168,6 +168,7 @@ self: super: {
 
   # haddock-api >= 2.17 is GHC 8.0 only
   haddock-api = self.haddock-api_2_16_1;
+  haddock-library = self.haddock-library_1_2_1;
 
   # lens-family-th >= 0.5.0.0 is GHC 8.0 only
   lens-family-th = self.lens-family-th_0_4_1_0;
diff --git a/pkgs/development/haskell-modules/configuration-ghcjs.nix b/pkgs/development/haskell-modules/configuration-ghcjs.nix
index 5c7e42a59a7a..c97296cd5bad 100644
--- a/pkgs/development/haskell-modules/configuration-ghcjs.nix
+++ b/pkgs/development/haskell-modules/configuration-ghcjs.nix
@@ -129,4 +129,5 @@ self: super:
   # triggers an internal pattern match failure in haddock
   # https://github.com/haskell/haddock/issues/553
   wai = dontHaddock super.wai;
+  cereal = addBuildDepend super.cereal [ self.fail ];
 }
diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
index e334fa526971..4daacce63760 100644
--- a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
+++ b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
@@ -32,7 +32,7 @@ core-packages:
   - xhtml-3000.2.1
 
 default-package-overrides:
-  # LTS Haskell 7.2
+  # LTS Haskell 7.3
   - abstract-deque ==0.3
   - abstract-par ==0.3.3
   - AC-Vector ==2.3.2
@@ -138,7 +138,7 @@ default-package-overrides:
   - ansi-wl-pprint ==0.6.7.3
   - ansigraph ==0.2.0.0
   - api-field-json-th ==0.1.0.1
-  - app-settings ==0.2.0.7
+  - app-settings ==0.2.0.8
   - appar ==0.1.4
   - apply-refact ==0.3.0.0
   - arbtt ==0.9.0.10
@@ -164,7 +164,7 @@ default-package-overrides:
   - auto ==0.4.3.0
   - auto-update ==0.1.4
   - autoexporter ==0.2.2
-  - aws ==0.14.0
+  - aws ==0.14.1
   - b9 ==0.5.21
   - bake ==0.4
   - bank-holidays-england ==0.1.0.5
@@ -195,7 +195,7 @@ default-package-overrides:
   - binary-tagged ==0.1.4.0
   - binary-typed ==1.0
   - bindings-DSL ==1.0.23
-  - bindings-GLFW ==3.1.2.1
+  - bindings-GLFW ==3.1.2.2
   - bindings-libzip ==1.0.1
   - bioace ==0.0.1
   - bioalign ==0.0.5
@@ -248,7 +248,7 @@ default-package-overrides:
   - bytestring-conversion ==0.3.1
   - bytestring-handle ==0.1.0.4
   - bytestring-lexing ==0.5.0.2
-  - bytestring-progress ==1.0.6
+  - bytestring-progress ==1.0.7
   - bytestring-tree-builder ==0.2.7.1
   - bytestring-trie ==0.2.4.1
   - bzlib ==0.5.0.5
@@ -261,10 +261,11 @@ default-package-overrides:
   - cabal-install ==1.24.0.0
   - cabal-rpm ==0.10.0
   - cabal-sort ==0.0.5.3
-  - cabal-src ==0.3.0.1
+  - cabal-src ==0.3.0.2
   - cache ==0.1.0.0
   - cacophony ==0.8.0
   - cairo ==0.13.3.0
+  - call-stack ==0.1.0
   - camfort ==0.900
   - carray ==0.1.6.5
   - cartel ==0.18.0.2
@@ -311,10 +312,10 @@ default-package-overrides:
   - classy-prelude-conduit ==1.0.0
   - classy-prelude-yesod ==1.0.0
   - clay ==0.11
-  - clckwrks ==0.23.19.1
+  - clckwrks ==0.23.19.2
   - clckwrks-cli ==0.2.16
   - clckwrks-plugin-media ==0.6.16
-  - clckwrks-plugin-page ==0.4.3.4
+  - clckwrks-plugin-page ==0.4.3.5
   - clckwrks-theme-bootstrap ==0.4.2
   - cli ==0.1.2
   - clientsession ==0.9.1.2
@@ -344,7 +345,7 @@ default-package-overrides:
   - concurrent-output ==1.7.7
   - concurrent-supply ==0.1.8
   - conduit ==1.2.8
-  - conduit-combinators ==1.0.8
+  - conduit-combinators ==1.0.8.1
   - conduit-extra ==1.1.13.3
   - conduit-iconv ==0.1.1.1
   - conduit-parse ==0.1.2.0
@@ -451,7 +452,7 @@ default-package-overrides:
   - directory-tree ==0.12.1
   - discount ==0.1.1
   - disk-free-space ==0.1.0.1
-  - distributed-closure ==0.3.2.0
+  - distributed-closure ==0.3.3.0
   - distributed-static ==0.3.5.0
   - distribution-nixpkgs ==1.0.0.1
   - distributive ==0.5.0.2
@@ -545,7 +546,7 @@ default-package-overrides:
   - fay-text ==0.3.2.2
   - fay-uri ==0.2.0.0
   - fb ==1.0.13
-  - fclabels ==2.0.3
+  - fclabels ==2.0.3.1
   - feature-flags ==0.1.0.1
   - feed ==0.3.11.1
   - FenwickTree ==0.1.2.1
@@ -571,8 +572,8 @@ default-package-overrides:
   - fmlist ==0.9
   - fn ==0.3.0.1
   - focus ==0.1.5
-  - fold-debounce ==0.2.0.2
-  - fold-debounce-conduit ==0.1.0.2
+  - fold-debounce ==0.2.0.3
+  - fold-debounce-conduit ==0.1.0.4
   - foldl ==1.2.1
   - FontyFruity ==0.5.3.2
   - force-layout ==0.4.0.5
@@ -643,9 +644,9 @@ default-package-overrides:
   - gitson ==0.5.2
   - gl ==0.7.8.1
   - glabrous ==0.1.2.0
-  - GLFW-b ==1.4.8.0
+  - GLFW-b ==1.4.8.1
   - glib ==0.13.4.0
-  - Glob ==0.7.11
+  - Glob ==0.7.12
   - gloss ==1.10.2.3
   - gloss-rendering ==1.10.3.3
   - GLURaw ==2.0.0.2
@@ -779,9 +780,9 @@ default-package-overrides:
   - HandsomeSoup ==0.4.2
   - handwriting ==0.1.0.3
   - hapistrano ==0.2.1.2
-  - happstack-authenticate ==2.3.4.4
+  - happstack-authenticate ==2.3.4.5
   - happstack-clientsession ==7.3.1
-  - happstack-hsp ==7.3.7
+  - happstack-hsp ==7.3.7.1
   - happstack-jmacro ==7.0.11
   - happstack-server ==7.4.6.2
   - happstack-server-tls ==7.1.6.2
@@ -808,7 +809,7 @@ default-package-overrides:
   - HaskellNet-SSL ==0.3.3.0
   - haskintex ==0.6.0.1
   - haskoin-core ==0.4.0
-  - hasql ==0.19.15.1
+  - hasql ==0.19.15.2
   - hastache ==0.6.1
   - hasty-hamiltonian ==1.1.3
   - HaTeX ==3.17.0.2
@@ -824,7 +825,7 @@ default-package-overrides:
   - heap ==1.0.3
   - heaps ==0.3.3
   - hebrew-time ==0.1.1
-  - hedis ==0.9.3
+  - hedis ==0.9.4
   - here ==1.2.8
   - heredoc ==0.2.0.0
   - hex ==0.1.2
@@ -843,7 +844,7 @@ default-package-overrides:
   - histogram-fill ==0.8.4.1
   - hit ==0.6.3
   - hjsmin ==0.2.0.2
-  - hjsonpointer ==1.0.0.0
+  - hjsonpointer ==1.0.0.1
   - hjsonschema ==1.1.0.1
   - hledger ==0.27.1
   - hledger-interest ==1.4.4
@@ -891,13 +892,13 @@ default-package-overrides:
   - hsemail ==1.7.7
   - HSet ==0.0.0
   - hset ==2.2.0
-  - hsexif ==0.6.0.8
+  - hsexif ==0.6.0.9
   - hsignal ==0.2.7.4
   - hslogger ==1.2.10
   - hslua ==0.4.1
   - hsndfile ==0.8.0
   - hsndfile-vector ==0.5.2
-  - HsOpenSSL ==0.11.1.1
+  - HsOpenSSL ==0.11.2.4
   - HsOpenSSL-x509-system ==0.1.0.3
   - hsp ==0.10.0
   - hspec ==2.2.3
@@ -1026,7 +1027,7 @@ default-package-overrides:
   - jose ==0.4.0.3
   - jose-jwt ==0.7.3
   - js-flot ==0.8.3
-  - js-jquery ==3.1.0
+  - js-jquery ==3.1.1
   - json ==0.9.1
   - json-autotype ==1.0.14
   - json-rpc-generic ==0.2.1.2
@@ -1048,7 +1049,7 @@ default-package-overrides:
   - kraken ==0.0.3
   - lackey ==0.4.1
   - language-c ==0.5.0
-  - language-c-quote ==0.11.6.3
+  - language-c-quote ==0.11.7
   - language-dockerfile ==0.3.4.0
   - language-ecmascript ==0.17.1.0
   - language-fortran ==0.5.1
@@ -1155,7 +1156,7 @@ default-package-overrides:
   - monad-extras ==0.5.11
   - monad-http ==0.1.0.0
   - monad-journal ==0.7.2
-  - monad-logger ==0.3.19
+  - monad-logger ==0.3.20
   - monad-logger-json ==0.1.0.0
   - monad-logger-prefix ==0.1.6
   - monad-logger-syslog ==0.1.2.0
@@ -1183,7 +1184,7 @@ default-package-overrides:
   - mono-traversable-instances ==0.1.0.0
   - monoid-extras ==0.4.2
   - monoid-subclasses ==0.4.2.1
-  - monoidal-containers ==0.3.0.0
+  - monoidal-containers ==0.3.0.1
   - morte ==1.6.2
   - mountpoints ==1.0.2
   - mtl ==2.2.1
@@ -1256,7 +1257,7 @@ default-package-overrides:
   - opaleye-trans ==0.3.3
   - open-browser ==0.2.1.0
   - OpenGL ==3.0.1.0
-  - OpenGLRaw ==3.2.2.0
+  - OpenGLRaw ==3.2.3.0
   - openpgp-asciiarmor ==0.1
   - opensource ==0.1.0.0
   - openssl-streams ==1.2.1.0
@@ -1354,7 +1355,7 @@ default-package-overrides:
   - polyparse ==1.12
   - posix-realtime ==0.0.0.4
   - post-mess-age ==0.2.1.0
-  - postgresql-binary ==0.9.1
+  - postgresql-binary ==0.9.1.1
   - postgresql-libpq ==0.9.2.0
   - postgresql-query ==3.0.1
   - postgresql-schema ==0.1.10
@@ -1446,7 +1447,7 @@ default-package-overrides:
   - reform-blaze ==0.2.4.1
   - reform-hamlet ==0.0.5.1
   - reform-happstack ==0.2.5.1
-  - reform-hsp ==0.2.7
+  - reform-hsp ==0.2.7.1
   - RefSerialize ==0.3.1.4
   - regex-applicative ==0.3.3
   - regex-applicative-text ==0.1.0.1
@@ -1479,7 +1480,7 @@ default-package-overrides:
   - rest-stringmap ==0.2.0.6
   - rest-types ==1.14.1.1
   - rest-wai ==0.2.0.1
-  - result ==0.2.5.1
+  - result ==0.2.6.0
   - rethinkdb ==2.2.0.7
   - rethinkdb-client-driver ==0.0.23
   - retry ==0.7.4.1
@@ -1532,7 +1533,7 @@ default-package-overrides:
   - servant-js ==0.8.1
   - servant-JuicyPixels ==0.3.0.2
   - servant-lucid ==0.7.1
-  - servant-mock ==0.8.1
+  - servant-mock ==0.8.1.1
   - servant-purescript ==0.3.1.5
   - servant-server ==0.8.1
   - servant-subscriber ==0.5.0.2
@@ -1554,7 +1555,7 @@ default-package-overrides:
   - shakespeare ==2.0.11.1
   - shell-conduit ==4.5.2
   - ShellCheck ==0.4.4
-  - shelly ==1.6.8
+  - shelly ==1.6.8.1
   - shortcut-links ==0.4.2.0
   - should-not-typecheck ==2.1.0
   - show-type ==0.1.1
@@ -1629,7 +1630,7 @@ default-package-overrides:
   - stm-delay ==0.1.1.1
   - stm-stats ==0.2.0.0
   - STMonadTrans ==0.3.3
-  - stopwatch ==0.1.0.2
+  - stopwatch ==0.1.0.3
   - storable-complex ==0.2.2
   - storable-endian ==0.2.5
   - storable-record ==0.0.3.1
@@ -1661,7 +1662,7 @@ default-package-overrides:
   - svg-tree ==0.5.1.2
   - SVGFonts ==1.5.0.1
   - swagger ==0.2.2
-  - swagger2 ==2.1.2.1
+  - swagger2 ==2.1.3
   - syb ==0.6
   - syb-with-class ==0.6.1.7
   - symbol ==0.2.4
@@ -1704,7 +1705,7 @@ default-package-overrides:
   - terminal-progress-bar ==0.0.1.4
   - terminal-size ==0.3.2.1
   - terminfo ==0.4.0.2
-  - test-fixture ==0.4.0.0
+  - test-fixture ==0.4.1.0
   - test-framework ==0.8.1.1
   - test-framework-hunit ==0.3.0.2
   - test-framework-quickcheck2 ==0.3.0.3
@@ -1903,7 +1904,7 @@ default-package-overrides:
   - weigh ==0.0.3
   - werewolf ==1.5.1.1
   - werewolf-slack ==1.0.2.0
-  - wikicfp-scraper ==0.1.0.3
+  - wikicfp-scraper ==0.1.0.4
   - Win32 ==2.3.1.1
   - Win32-extras ==0.2.0.1
   - Win32-notify ==0.3.0.1
@@ -1926,9 +1927,9 @@ default-package-overrides:
   - wuss ==1.1.1
   - X11 ==1.6.1.2
   - x509 ==1.6.4
-  - x509-store ==1.6.1
-  - x509-system ==1.6.3
-  - x509-validation ==1.6.4
+  - x509-store ==1.6.2
+  - x509-system ==1.6.4
+  - x509-validation ==1.6.5
   - Xauth ==0.1
   - xdcc ==1.1.3
   - xdg-basedir ==0.2.2
@@ -1962,7 +1963,7 @@ default-package-overrides:
   - yesod-auth-basic ==0.1.0.2
   - yesod-auth-hashdb ==1.5.1.3
   - yesod-auth-oauth2 ==0.2.2
-  - yesod-bin ==1.4.18.5
+  - yesod-bin ==1.4.18.7
   - yesod-core ==1.4.25
   - yesod-eventsource ==1.4.0.1
   - yesod-fay ==0.8.0
@@ -1971,7 +1972,7 @@ default-package-overrides:
   - yesod-form-richtext ==0.1.0.0
   - yesod-gitrepo ==0.2.1.0
   - yesod-gitrev ==0.1.0.0
-  - yesod-job-queue ==0.3.0.0
+  - yesod-job-queue ==0.3.0.1
   - yesod-newsfeed ==1.6
   - yesod-persistent ==1.4.0.6
   - yesod-sitemap ==1.4.0.1
@@ -2010,6 +2011,7 @@ extra-packages:
   - haddock < 2.17                      # required on GHC 7.10.x
   - haddock-api == 2.15.*               # required on GHC 7.8.x
   - haddock-api == 2.16.*               # required on GHC 7.10.x
+  - haddock-library == 1.2.*            # required for haddock-api-2.16.x
   - hoogle < 5                          # required by current implementation of ghcWithHoogle
   - mtl < 2.2                           # newer versions require transformers > 0.4.x, which we cannot provide in GHC 7.8.x
   - mtl-prelude < 2                     # required for to build postgrest on mtl 2.1.x platforms
@@ -2110,6 +2112,7 @@ dont-distribute-packages:
   cufft:                                        [ i686-linux, x86_64-linux, x86_64-darwin ]
   gloss-raster-accelerate:                      [ i686-linux, x86_64-linux, x86_64-darwin ]
   libnvvm:                                      [ i686-linux, x86_64-linux, x86_64-darwin ]
+  nvvm:                                         [ i686-linux, x86_64-linux, x86_64-darwin ]
   Obsidian:                                     [ i686-linux, x86_64-linux, x86_64-darwin ]
   patch-image:                                  [ i686-linux, x86_64-linux, x86_64-darwin ]
   yices-easy:                                   [ i686-linux, x86_64-linux, x86_64-darwin ]
diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index 8d861b98a7c0..d18f4ca5125b 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -2421,8 +2421,8 @@ self: {
     ({ mkDerivation, base, lens, linear, template-haskell }:
      mkDerivation {
        pname = "Cartesian";
-       version = "0.5.0.0";
-       sha256 = "4d0438724a9a9ed57d8c40ffd466ab74a3c35858698d5fd424322b7735bbd137";
+       version = "0.6.0.0";
+       sha256 = "74f6d388bf6cc91f1bde2677fe53b9e429d1cad3f84e9514854828bb40524dbc";
        libraryHaskellDepends = [ base lens linear template-haskell ];
        description = "Coordinate systems";
        license = stdenv.lib.licenses.mit;
@@ -3616,6 +3616,22 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "DataIndex" = callPackage
+    ({ mkDerivation, base, tasty, tasty-hspec }:
+     mkDerivation {
+       pname = "DataIndex";
+       version = "0.1.1";
+       sha256 = "60dda6e5fafec65578339f9e3ac21dda26b44c4fbc1fad83bd866b81f21bedf3";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [ base ];
+       executableHaskellDepends = [ base ];
+       testHaskellDepends = [ base tasty tasty-hspec ];
+       homepage = "https://github.com/yuhangwang/DataIndex#readme";
+       description = "A package for adding index column to data files";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
   "DataTreeView" = callPackage
     ({ mkDerivation, base, bytestring, containers, deepseq, glib, gtk
      , lifted-base, ListLike, MissingH, monad-control, mtl, syb
@@ -5048,6 +5064,22 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "Files" = callPackage
+    ({ mkDerivation, base, hspec }:
+     mkDerivation {
+       pname = "Files";
+       version = "0.1.1.0";
+       sha256 = "76171c4e0b341ee54297279be1345181e4532ece6455580d03f81900fd33949e";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [ base ];
+       executableHaskellDepends = [ base ];
+       testHaskellDepends = [ base hspec ];
+       homepage = "https://github.com/yuhangwang/Files#readme";
+       description = "File content extraction/rearrangement";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
   "Finance-Quote-Yahoo" = callPackage
     ({ mkDerivation, base, bytestring, http-conduit, network
      , old-locale, time
@@ -5490,24 +5522,6 @@ self: {
      }:
      mkDerivation {
        pname = "GLFW-b";
-       version = "1.4.8.0";
-       sha256 = "4e88c518d527e28606c9f150c74ace2e350bbb5630d51e4f365a13b2c14ef4ef";
-       revision = "1";
-       editedCabalFile = "f686b01337a2a511c3c6819d07dda3cb604ee44647a4b3dbde3bff24470a2836";
-       libraryHaskellDepends = [ base bindings-GLFW ];
-       testHaskellDepends = [
-         base bindings-GLFW HUnit test-framework test-framework-hunit
-       ];
-       description = "Bindings to GLFW OpenGL library";
-       license = stdenv.lib.licenses.bsd3;
-     }) {};
-
-  "GLFW-b_1_4_8_1" = callPackage
-    ({ mkDerivation, base, bindings-GLFW, HUnit, test-framework
-     , test-framework-hunit
-     }:
-     mkDerivation {
-       pname = "GLFW-b";
        version = "1.4.8.1";
        sha256 = "438a49ec5cf6cbda95966fcc42750b9245f54fe7daf69a6493e7703c3f178ae9";
        libraryHaskellDepends = [ base bindings-GLFW ];
@@ -5516,7 +5530,6 @@ self: {
        ];
        description = "Bindings to GLFW OpenGL library";
        license = stdenv.lib.licenses.bsd3;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "GLFW-b-demo" = callPackage
@@ -6063,8 +6076,8 @@ self: {
      }:
      mkDerivation {
        pname = "Glob";
-       version = "0.7.11";
-       sha256 = "0a23f90be0e6a7129efef83716ce1ccd8f48f3c17063aff663232f8eaa18c377";
+       version = "0.7.12";
+       sha256 = "c7ca5459b2d98ae9f5db56351a512680c4375cfdf907073848aaf15d6b92c175";
        libraryHaskellDepends = [
          base containers directory dlist filepath transformers
          transformers-compat
@@ -6331,12 +6344,18 @@ self: {
      }) {};
 
   "GroteTrap" = callPackage
-    ({ mkDerivation, base, mtl, parsec, QuickCheck, syb }:
+    ({ mkDerivation, base, mtl, parsec, QuickCheck, syb, test-framework
+     , test-framework-quickcheck2
+     }:
      mkDerivation {
        pname = "GroteTrap";
-       version = "0.5.1";
-       sha256 = "f38863a54d907ec32193f0a2be684fe184b7b0d34cd58d6d5bed2aa5ee30318c";
-       libraryHaskellDepends = [ base mtl parsec QuickCheck syb ];
+       version = "0.5.2";
+       sha256 = "9c5197b6db4257c9def0f6f10c777dbe47ac73b3fd1864042b2ea9aa645ae270";
+       libraryHaskellDepends = [ base mtl parsec syb ];
+       testHaskellDepends = [
+         base mtl parsec QuickCheck test-framework
+         test-framework-quickcheck2
+       ];
        homepage = "http://www.haskell.org/haskellwiki/GroteTrap";
        description = "Parser and selection library for expression languages";
        license = stdenv.lib.licenses.bsd3;
@@ -8031,6 +8050,20 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "HUnit_1_4_0_0" = callPackage
+    ({ mkDerivation, base, call-stack, deepseq, filepath }:
+     mkDerivation {
+       pname = "HUnit";
+       version = "1.4.0.0";
+       sha256 = "dce3bd1ac11ed34e0181f39aba16cb6ff0f5005f663bbe37e6ab0162dcf3ec95";
+       libraryHaskellDepends = [ base call-stack deepseq ];
+       testHaskellDepends = [ base call-stack deepseq filepath ];
+       homepage = "https://github.com/hspec/HUnit#readme";
+       description = "A unit testing framework for Haskell";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "HUnit-Diff" = callPackage
     ({ mkDerivation, ansi-terminal, base, Diff, groom, HUnit }:
      mkDerivation {
@@ -9187,35 +9220,12 @@ self: {
 
   "HsOpenSSL" = callPackage
     ({ mkDerivation, base, bytestring, HUnit, integer-gmp, network
-     , old-locale, openssl, test-framework, test-framework-hunit, time
-     }:
-     mkDerivation {
-       pname = "HsOpenSSL";
-       version = "0.11.1.1";
-       sha256 = "4a61e074e968a9863e0f3440b3be8ac131457b3d34eb983ca8102122d8ebc4c1";
-       revision = "1";
-       editedCabalFile = "be351c277db7ddbc2ece8fb2d10b8f1f686b91000a552dd9d8155b79f8db9a5f";
-       libraryHaskellDepends = [
-         base bytestring integer-gmp network old-locale time
-       ];
-       librarySystemDepends = [ openssl ];
-       testHaskellDepends = [
-         base bytestring HUnit test-framework test-framework-hunit
-       ];
-       homepage = "https://github.com/phonohawk/HsOpenSSL";
-       description = "Partial OpenSSL binding for Haskell";
-       license = stdenv.lib.licenses.publicDomain;
-       hydraPlatforms = stdenv.lib.platforms.none;
-     }) {inherit (pkgs) openssl;};
-
-  "HsOpenSSL_0_11_2_2" = callPackage
-    ({ mkDerivation, base, bytestring, HUnit, integer-gmp, network
      , openssl, test-framework, test-framework-hunit, time
      }:
      mkDerivation {
        pname = "HsOpenSSL";
-       version = "0.11.2.2";
-       sha256 = "d7b19140117600ad8a423008ad951d5458430530339edda415bec948506c006a";
+       version = "0.11.2.4";
+       sha256 = "9c38800459534966f12bf25380844c4d26fead17af4d0a8773a95e2c9e3bc1b8";
        libraryHaskellDepends = [
          base bytestring integer-gmp network time
        ];
@@ -9827,8 +9837,8 @@ self: {
      }:
      mkDerivation {
        pname = "JsonGrammar";
-       version = "1.0.4";
-       sha256 = "cb411635c4f9e30e0e59ed4a0b3294b5df78ccd70dc646a0eb896a56451e72bd";
+       version = "1.0.5";
+       sha256 = "25a476a80407037b8d951a1994186f8a6ec4883414fd4ad04b64425c59f2e18a";
        libraryHaskellDepends = [
          aeson attoparsec base bytestring containers language-typescript mtl
          stack-prism text unordered-containers vector
@@ -12612,8 +12622,8 @@ self: {
      }:
      mkDerivation {
        pname = "OpenGLRaw";
-       version = "3.2.2.0";
-       sha256 = "65df144730044166fd8ea2f81470d71e6c5026a7c31df6be45aac9e6ddf93771";
+       version = "3.2.3.0";
+       sha256 = "e64cb1b8ea0f87857e44396fb948751bdcace2a1c924875c8aa91b20e4d90ba3";
        libraryHaskellDepends = [
          base bytestring containers fixed half text transformers
        ];
@@ -19716,7 +19726,7 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "aeson_1_0_1_0" = callPackage
+  "aeson_1_0_2_0" = callPackage
     ({ mkDerivation, attoparsec, base, base-compat, base-orphans
      , bytestring, containers, deepseq, dlist, generic-deriving
      , ghc-prim, hashable, hashable-time, HUnit, QuickCheck
@@ -19726,10 +19736,8 @@ self: {
      }:
      mkDerivation {
        pname = "aeson";
-       version = "1.0.1.0";
-       sha256 = "6053851a44bb858691cfd991bf7ba2a0e151ae574fdd3ce3aeea33e1b2855c5f";
-       revision = "2";
-       editedCabalFile = "1eaf2760bd461425b2cd8b9c749dc371bde7dbe2d913fce57fab1ef5cf3dba1b";
+       version = "1.0.2.0";
+       sha256 = "c265f138a906caebeb8d539b9acf6006a7d2edcc2912e6346f0fb158b2135b6f";
        libraryHaskellDepends = [
          attoparsec base base-compat bytestring containers deepseq dlist
          ghc-prim hashable scientific tagged template-haskell text time
@@ -20820,6 +20828,27 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "alex_3_2_0" = callPackage
+    ({ mkDerivation, array, base, containers, directory, happy, process
+     , QuickCheck
+     }:
+     mkDerivation {
+       pname = "alex";
+       version = "3.2.0";
+       sha256 = "8034ef1e7f66145295a5b0e70de5b6caa409e36888fe4123d0e022aac97a4d92";
+       isLibrary = false;
+       isExecutable = true;
+       executableHaskellDepends = [
+         array base containers directory QuickCheck
+       ];
+       executableToolDepends = [ happy ];
+       testHaskellDepends = [ base process ];
+       homepage = "http://www.haskell.org/alex/";
+       description = "Alex is a tool for generating lexical analysers in Haskell";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "alex-meta" = callPackage
     ({ mkDerivation, alex, array, base, containers, happy
      , haskell-src-meta, QuickCheck, template-haskell
@@ -23953,8 +23982,8 @@ self: {
      }:
      mkDerivation {
        pname = "app-settings";
-       version = "0.2.0.7";
-       sha256 = "bd6a675de64863a61459670cb8469c629273d3d43b515b6f7e34cc146a07f9f8";
+       version = "0.2.0.8";
+       sha256 = "b31c0da1a2bde88f1e366dda17703c62ddc7ed97740221bc90f4aaaa483fea68";
        libraryHaskellDepends = [
          base containers directory mtl parsec text
        ];
@@ -26613,8 +26642,8 @@ self: {
      }:
      mkDerivation {
        pname = "aws";
-       version = "0.14.0";
-       sha256 = "b5b959f9b0ae8c07baf91e067b4005dc554d76c1ab15d019f13a4dc88a8a813e";
+       version = "0.14.1";
+       sha256 = "6a2079853ddc781b46fe3ddce31e88c0b6b2441f458141bca3cd1c7216cbe579";
        libraryHaskellDepends = [
          aeson attoparsec base base16-bytestring base64-bytestring
          blaze-builder byteable bytestring case-insensitive cereal conduit
@@ -29435,33 +29464,6 @@ self: {
      }:
      mkDerivation {
        pname = "bindings-GLFW";
-       version = "3.1.2.1";
-       sha256 = "083cea7d2262aecd8a80f74d80c82c2aaa84cf80e960d456e8e34fc38398decb";
-       revision = "1";
-       editedCabalFile = "d215ed7ea8c1d6879f877e446ce3e3ab78d7721ab9e6fbb4d8e91cf004b4cda3";
-       libraryHaskellDepends = [ base bindings-DSL template-haskell ];
-       librarySystemDepends = [
-         libX11 libXcursor libXext libXfixes libXi libXinerama libXrandr
-         libXxf86vm mesa
-       ];
-       testHaskellDepends = [
-         base HUnit test-framework test-framework-hunit
-       ];
-       description = "Low-level bindings to GLFW OpenGL library";
-       license = stdenv.lib.licenses.bsd3;
-     }) {inherit (pkgs.xorg) libX11; inherit (pkgs.xorg) libXcursor; 
-         inherit (pkgs.xorg) libXext; inherit (pkgs.xorg) libXfixes; 
-         inherit (pkgs.xorg) libXi; inherit (pkgs.xorg) libXinerama; 
-         inherit (pkgs.xorg) libXrandr; inherit (pkgs.xorg) libXxf86vm; 
-         inherit (pkgs) mesa;};
-
-  "bindings-GLFW_3_1_2_2" = callPackage
-    ({ mkDerivation, base, bindings-DSL, HUnit, libX11, libXcursor
-     , libXext, libXfixes, libXi, libXinerama, libXrandr, libXxf86vm
-     , mesa, template-haskell, test-framework, test-framework-hunit
-     }:
-     mkDerivation {
-       pname = "bindings-GLFW";
        version = "3.1.2.2";
        sha256 = "537385a35b0ca0f6980f9a785434dcca5e0f8b75475dafa2e9c9d719dd503fc9";
        libraryHaskellDepends = [ base bindings-DSL template-haskell ];
@@ -29474,7 +29476,6 @@ self: {
        ];
        description = "Low-level bindings to GLFW OpenGL library";
        license = stdenv.lib.licenses.bsd3;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {inherit (pkgs.xorg) libX11; inherit (pkgs.xorg) libXcursor; 
          inherit (pkgs.xorg) libXext; inherit (pkgs.xorg) libXfixes; 
          inherit (pkgs.xorg) libXi; inherit (pkgs.xorg) libXinerama; 
@@ -30345,30 +30346,31 @@ self: {
 
   "bioinformatics-toolkit" = callPackage
     ({ mkDerivation, aeson, aeson-pretty, base, binary, bytestring
-     , bytestring-lexing, clustering, colour, conduit
+     , bytestring-lexing, case-insensitive, clustering, colour, conduit
      , conduit-combinators, containers, data-default-class
-     , double-conversion, hexpat, http-conduit, IntervalMap, matrices
-     , mtl, optparse-applicative, palette, parallel, primitive, random
-     , samtools, shelly, split, statistics, tasty, tasty-golden
-     , tasty-hunit, text, transformers, unordered-containers, vector
-     , vector-algorithms, word8
+     , double-conversion, hexpat, http-conduit, IntervalMap
+     , math-functions, matrices, mtl, optparse-applicative, palette
+     , parallel, primitive, random, samtools, shelly, split, statistics
+     , tasty, tasty-golden, tasty-hunit, text, transformers
+     , unordered-containers, vector, vector-algorithms, word8
      }:
      mkDerivation {
        pname = "bioinformatics-toolkit";
-       version = "0.2.2";
-       sha256 = "df424767fad8d8df0cf70581fc2b478fcbba30bbde71545d9bdce44ec8c2989e";
+       version = "0.2.3";
+       sha256 = "e83249daa14c7d71319fc167288f791ba3045d43a5fbe9f43ef64eaa918ff2f9";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
          aeson aeson-pretty base binary bytestring bytestring-lexing
-         clustering colour conduit-combinators containers data-default-class
-         double-conversion hexpat http-conduit IntervalMap matrices mtl
-         palette parallel primitive samtools split statistics text
-         transformers unordered-containers vector vector-algorithms word8
+         case-insensitive clustering colour conduit-combinators containers
+         data-default-class double-conversion hexpat http-conduit
+         IntervalMap math-functions matrices mtl palette parallel primitive
+         samtools split statistics text transformers unordered-containers
+         vector vector-algorithms word8
        ];
        executableHaskellDepends = [
-         base bytestring clustering data-default-class optparse-applicative
-         shelly split text
+         base bytestring clustering data-default-class double-conversion
+         optparse-applicative shelly split text
        ];
        testHaskellDepends = [
          base bytestring conduit conduit-combinators data-default-class
@@ -30611,6 +30613,32 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "bitcoin-payment-channel_0_4_0_1" = callPackage
+    ({ mkDerivation, aeson, base, base16-bytestring, base64-bytestring
+     , bytestring, cereal, errors, haskoin-core, hexstring, QuickCheck
+     , scientific, string-conversions, text, time
+     }:
+     mkDerivation {
+       pname = "bitcoin-payment-channel";
+       version = "0.4.0.1";
+       sha256 = "98f5f1bd94d6c828404f5fdda6976cffb226bcbfd8321d73e7eb0367c6442f62";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         aeson base base16-bytestring base64-bytestring bytestring cereal
+         errors haskoin-core hexstring scientific string-conversions text
+         time
+       ];
+       executableHaskellDepends = [
+         aeson base base16-bytestring base64-bytestring bytestring cereal
+         haskoin-core hexstring QuickCheck string-conversions text time
+       ];
+       homepage = "https://github.com/runeksvendsen/bitcoin-payment-channel";
+       description = "Library for working with Bitcoin payment channels";
+       license = stdenv.lib.licenses.publicDomain;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "bitcoin-rpc" = callPackage
     ({ mkDerivation, aeson, attoparsec, base, bytestring, cereal
      , containers, ghc-prim, HTTP, HUnit, mtl, network, QuickCheck
@@ -32012,8 +32040,8 @@ self: {
      }:
      mkDerivation {
        pname = "bookkeeper";
-       version = "0.2.2.0";
-       sha256 = "713c92318b14a7592a83ccc7fc575ee709c73ccd9c93e9e418bca8c2a1a5b219";
+       version = "0.2.3";
+       sha256 = "7aa2a2a42ed03eee2eccc96ed63cfa3b090f55dd432936dc801cd331b684f5b6";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -32239,8 +32267,8 @@ self: {
     ({ mkDerivation, base, gtk, transformers, X11 }:
      mkDerivation {
        pname = "boring-window-switcher";
-       version = "0.1.0.0";
-       sha256 = "8f09a9dca17f7b9275adb05a1e45e0a2571f25c5654566ccaf18dc792322737c";
+       version = "0.1.0.1";
+       sha256 = "4d966b56d3a6badb666c8947df23557db9544e469514d0a5b68934c644f5645b";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [ base gtk transformers X11 ];
@@ -32555,8 +32583,8 @@ self: {
      }:
      mkDerivation {
        pname = "brick";
-       version = "0.10";
-       sha256 = "f5529a49c24a9f4a0714579eb6b86b7b324515f7bb925fb1e75ab533442aad53";
+       version = "0.11";
+       sha256 = "783192383bf8c2887a5b99aca4c8ec48a6ba91f3ee11591a7d8d98734eead2a5";
        libraryHaskellDepends = [
          base containers contravariant data-default deepseq microlens
          microlens-mtl microlens-th template-haskell text text-zipper
@@ -33433,21 +33461,6 @@ self: {
     ({ mkDerivation, base, bytestring, terminal-progress-bar, time }:
      mkDerivation {
        pname = "bytestring-progress";
-       version = "1.0.6";
-       sha256 = "0dd48b6ea4c5bb6398af04b877259e6ec3b0994aa7760a01e552e7db0121dede";
-       libraryHaskellDepends = [
-         base bytestring terminal-progress-bar time
-       ];
-       homepage = "http://github.com/acw/bytestring-progress";
-       description = "A library for tracking the consumption of a lazy ByteString";
-       license = stdenv.lib.licenses.bsd3;
-       hydraPlatforms = stdenv.lib.platforms.none;
-     }) {};
-
-  "bytestring-progress_1_0_7" = callPackage
-    ({ mkDerivation, base, bytestring, terminal-progress-bar, time }:
-     mkDerivation {
-       pname = "bytestring-progress";
        version = "1.0.7";
        sha256 = "97b0950b6dff0154aa463f1e2921dc560478e1156e482bd5bde8a62bd3f83730";
        libraryHaskellDepends = [
@@ -33913,8 +33926,8 @@ self: {
      }:
      mkDerivation {
        pname = "cabal-debian";
-       version = "4.32.5";
-       sha256 = "7e78c2ed2fbb2ea57bef4eb4a8b8b1a1b8b741097132759eb28353124711d24e";
+       version = "4.33";
+       sha256 = "ae69fd45365f670b3d36274884b1a7d1b1ec0429f7775ee79d5d813d82e93193";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -33927,10 +33940,6 @@ self: {
        executableHaskellDepends = [
          base Cabal debian lens mtl pretty Unixutils
        ];
-       testHaskellDepends = [
-         base Cabal containers debian Diff directory filepath hsemail HUnit
-         lens pretty process text
-       ];
        homepage = "https://github.com/ddssff/cabal-debian";
        description = "Create a Debianization for a Cabal package";
        license = stdenv.lib.licenses.bsd3;
@@ -34428,8 +34437,8 @@ self: {
      }:
      mkDerivation {
        pname = "cabal-src";
-       version = "0.3.0.1";
-       sha256 = "80effd26be00526fa876b6ab9c64e1b7f3e576f9064175d15ff689a7a0fa8a4c";
+       version = "0.3.0.2";
+       sha256 = "49616c6e93f0e6df7204f97c7903b52c62b76b29368c697fd65af79be66bede6";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -35055,8 +35064,8 @@ self: {
      }:
      mkDerivation {
        pname = "calculator";
-       version = "0.4.1.1";
-       sha256 = "9601f78d63c42c7382990d33ca475a947f8d8317d6dbf47819345693fdb4442d";
+       version = "0.4.1.2";
+       sha256 = "a96befbbc0d91c7f141a99f44f5eda56651383481b16bea0356758b8f1dfd21d";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -37451,6 +37460,25 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "chitauri" = callPackage
+    ({ mkDerivation, base, digits, either-unwrap, generic-trie
+     , haskeline, parsec
+     }:
+     mkDerivation {
+       pname = "chitauri";
+       version = "0.1.0.1";
+       sha256 = "ebb349aa92c3c2e9d326f42b6d47769aaa57b9ea21b77ade24326be86f8d2445";
+       isLibrary = false;
+       isExecutable = true;
+       executableHaskellDepends = [
+         base digits either-unwrap generic-trie haskeline parsec
+       ];
+       testHaskellDepends = [ base ];
+       homepage = "https://github.com/marcusbuffett/chitauri";
+       description = "Helper for the Major System";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "chorale" = callPackage
     ({ mkDerivation, base, containers, HUnit, ieee754, QuickCheck, safe
      , test-framework, test-framework-hunit, test-framework-quickcheck2
@@ -38485,8 +38513,8 @@ self: {
      }:
      mkDerivation {
        pname = "clckwrks";
-       version = "0.23.19.1";
-       sha256 = "37798295b8a227277b4531c9899722fda57b65bf7f191844656a7652b5026e83";
+       version = "0.23.19.2";
+       sha256 = "1453a56daccb669931ef6c1a1e6311abc6fef28341c9c75de0fcc34e03e4fb84";
        libraryHaskellDepends = [
          acid-state aeson aeson-qq attoparsec base blaze-html bytestring
          cereal containers directory filepath happstack-authenticate
@@ -38631,8 +38659,8 @@ self: {
      }:
      mkDerivation {
        pname = "clckwrks-plugin-page";
-       version = "0.4.3.4";
-       sha256 = "8c2667447c59c57d02a911ea858d9b9ea73dfc87a9aba3a11389c67a423b60e7";
+       version = "0.4.3.5";
+       sha256 = "fb52a13751c322fde387786e93fdd41e4bb5a6019136fd8daa9d622d15e5d498";
        libraryHaskellDepends = [
          acid-state aeson attoparsec base clckwrks containers directory
          filepath happstack-hsp happstack-server hsp hsx2hs ixset mtl
@@ -38671,8 +38699,8 @@ self: {
      }:
      mkDerivation {
        pname = "clckwrks-theme-clckwrks";
-       version = "0.5.2";
-       sha256 = "53182128e49924132191d6d607e7088f92367a10ab31d38b5e4a1d8a2471ed1c";
+       version = "0.5.2.1";
+       sha256 = "67ea142d0d66357957589bfa29148398799b1771452dd706b9f73a75ced6f392";
        libraryHaskellDepends = [
          base clckwrks containers happstack-authenticate hsp hsx2hs mtl text
          web-plugins
@@ -39288,8 +39316,8 @@ self: {
      }:
      mkDerivation {
        pname = "cmark-sections";
-       version = "0.1.0.0";
-       sha256 = "17ce46b79d6261357d390bac6a62da8de76d2e264e4fef6dc5d65dddc6689f06";
+       version = "0.1.0.1";
+       sha256 = "4df6ea052023b545da67a38311b69c751e1372515799b6ff88163b12f38ddf00";
        libraryHaskellDepends = [
          base base-prelude cmark containers microlens split text
        ];
@@ -41390,34 +41418,6 @@ self: {
      }:
      mkDerivation {
        pname = "conduit-combinators";
-       version = "1.0.8";
-       sha256 = "c486be3d35d85ca697beffce0ef68ae28c1c4fb94e3884f4cfb6df5ecb5ad04b";
-       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;
-     }) {};
-
-  "conduit-combinators_1_0_8_1" = 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.0.8.1";
        sha256 = "cf347790f173dce64ebf7ef1b364686fee2d890bfa38caa9145494a5909a7637";
        libraryHaskellDepends = [
@@ -41434,7 +41434,6 @@ self: {
        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
@@ -42004,8 +42003,8 @@ self: {
     ({ mkDerivation, base, tagged, void }:
      mkDerivation {
        pname = "constrained-categories";
-       version = "0.3.0.0";
-       sha256 = "71bd103c5c3fa5faaf3c727fd42e9202ed6798c0cd7fb143ab9baa2e7dae5bc2";
+       version = "0.3.0.1";
+       sha256 = "a21cb119f0eda4631e89e3b1d8210bc623ea12e721f5c415d8ada410081aea7d";
        libraryHaskellDepends = [ base tagged void ];
        homepage = "https://github.com/leftaroundabout/constrained-categories";
        description = "Constrained clones of the category-theory type classes, using ConstraintKinds";
@@ -43376,15 +43375,16 @@ self: {
      }) {};
 
   "cplex-hs" = callPackage
-    ({ mkDerivation, base, containers, cplex, mtl, primitive
-     , transformers, vector
+    ({ mkDerivation, base, containers, cplex, hashable, mtl, primitive
+     , transformers, unordered-containers, vector
      }:
      mkDerivation {
        pname = "cplex-hs";
-       version = "0.3.0.0";
-       sha256 = "56afdd13c508767615baa4a529fab0eebc73cd679ac040ef1592023489c42355";
+       version = "0.4.0.4";
+       sha256 = "2c9e5f8719d53ffb0121a2c88e5bb43a627a54de3ce3028713c0f8426ba175eb";
        libraryHaskellDepends = [
-         base containers mtl primitive transformers vector
+         base containers hashable mtl primitive transformers
+         unordered-containers vector
        ];
        librarySystemDepends = [ cplex ];
        homepage = "https://github.com/stefan-j/cplex-haskell";
@@ -44875,8 +44875,8 @@ self: {
      }:
      mkDerivation {
        pname = "cryptonite-openssl";
-       version = "0.1";
-       sha256 = "0a06b7903b069d17203f4d485033bcc7334c4cbdb478b43cbd321083de133964";
+       version = "0.2";
+       sha256 = "bbf6787c33edb287359fc48802512ab2d5c95b02bd6c1a759d7f9bc157703fcb";
        libraryHaskellDepends = [ base bytestring memory ];
        librarySystemDepends = [ openssl ];
        testHaskellDepends = [
@@ -45372,16 +45372,18 @@ self: {
      }) {};
 
   "cuda" = callPackage
-    ({ mkDerivation, base, bytestring, c2hs, pretty, template-haskell
+    ({ mkDerivation, base, bytestring, c2hs, Cabal, directory, filepath
+     , pretty, template-haskell
      }:
      mkDerivation {
        pname = "cuda";
-       version = "0.7.0.0";
-       sha256 = "b51b6da7f1aad9c1c2abacb6c45cc5efbd7fc7ddb4c1245de12bf7b0b0777ba6";
+       version = "0.7.5.0";
+       sha256 = "125ce9d7d8e782272ed0a00b0a15ee2273477c4a9f1aa34e86220f2ab4573e6b";
        revision = "1";
-       editedCabalFile = "1ff19bb4645ce9ba77b84189c8b6e44fb635d1c8b3a5c7560c8633ee2005f37e";
+       editedCabalFile = "9abe02e16497b7969918e53356b456f650ca1d11927fc9f37980c2da9141dee1";
        isLibrary = true;
        isExecutable = true;
+       setupHaskellDepends = [ base Cabal directory filepath ];
        libraryHaskellDepends = [ base bytestring template-haskell ];
        libraryToolDepends = [ c2hs ];
        executableHaskellDepends = [ base pretty ];
@@ -45542,6 +45544,19 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "curryrs" = callPackage
+    ({ mkDerivation, base, mtl, tasty, tasty-hunit }:
+     mkDerivation {
+       pname = "curryrs";
+       version = "0.1.0.0";
+       sha256 = "428b80a547271ac00a78a78c457ff827085514e80ff89286d83bb3d4cf3aae42";
+       libraryHaskellDepends = [ base mtl ];
+       testHaskellDepends = [ base tasty tasty-hunit ];
+       homepage = "https://github.com/mgattozzi/curryrs#readme";
+       description = "Easy to use FFI Bridge for using Rust in Haskell";
+       license = "unknown";
+     }) {};
+
   "cursedcsv" = callPackage
     ({ mkDerivation, base, bytestring, csv-enumerator, enumerator
      , hscurses, mtl, natural-sort, parseargs, regex-tdfa, safe, unix
@@ -48625,8 +48640,8 @@ self: {
      }:
      mkDerivation {
        pname = "debian";
-       version = "3.89";
-       sha256 = "ec0da528635c8438f26f29a60f12c3ff606ec696ab641cf40b56b1d5ec92401c";
+       version = "3.91.1";
+       sha256 = "0624b718aec8e1d28fdf4d471c1236a66099555ac22858dbe49a7ee00f9b25e6";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -51005,18 +51020,18 @@ self: {
      }) {};
 
   "digit" = callPackage
-    ({ mkDerivation, base, directory, doctest, filepath, lens, parsec
-     , parsers, QuickCheck, semigroups, template-haskell
+    ({ mkDerivation, base, directory, doctest, filepath, lens, papa
+     , parsec, parsers, QuickCheck, semigroups, template-haskell
      }:
      mkDerivation {
        pname = "digit";
-       version = "0.2.8";
-       sha256 = "d0dd0056edc862542d8ae07cf5e8ffd48b62e3f9d08ca035dfc737885d6684dd";
+       version = "0.2.9";
+       sha256 = "2fa2ac71a50a23c289f1fd4962836984d7766f9dcce5fb33eeb26b22ff8715f9";
        libraryHaskellDepends = [
-         base lens parsec parsers semigroups template-haskell
+         base lens papa parsers semigroups template-haskell
        ];
        testHaskellDepends = [
-         base directory doctest filepath QuickCheck template-haskell
+         base directory doctest filepath parsec QuickCheck template-haskell
        ];
        homepage = "https://github.com/NICTA/digit";
        description = "A data-type representing digits 0-9 and other combinations";
@@ -51595,23 +51610,6 @@ self: {
      }:
      mkDerivation {
        pname = "distributed-closure";
-       version = "0.3.2.0";
-       sha256 = "7ca5b418d086c00e4646683010453b665b5b4f3921a9ca478c7afd91e331ea7d";
-       libraryHaskellDepends = [
-         base binary bytestring constraints syb template-haskell
-       ];
-       testHaskellDepends = [ base binary hspec QuickCheck ];
-       homepage = "https://github.com/tweag/distributed-closure";
-       description = "Serializable closures for distributed programming";
-       license = stdenv.lib.licenses.bsd3;
-     }) {};
-
-  "distributed-closure_0_3_3_0" = callPackage
-    ({ mkDerivation, base, binary, bytestring, constraints, hspec
-     , QuickCheck, syb, template-haskell
-     }:
-     mkDerivation {
-       pname = "distributed-closure";
        version = "0.3.3.0";
        sha256 = "bc675fd3b93c7e51a923969220821ea1676c639ff9fd4e742bd864e90f2e368f";
        libraryHaskellDepends = [
@@ -51621,7 +51619,6 @@ self: {
        homepage = "https://github.com/tweag/distributed-closure";
        description = "Serializable closures for distributed programming";
        license = stdenv.lib.licenses.bsd3;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "distributed-process" = callPackage
@@ -51948,6 +51945,8 @@ self: {
        pname = "distributed-process-simplelocalnet";
        version = "0.2.3.2";
        sha256 = "c3351cf8a782dda756689b3747ede1e3879dcb913a07065eb4ec0052a963825f";
+       revision = "1";
+       editedCabalFile = "6cc30bffb992a3af6027e6563720ab3b6a994037066125ffde7024081b58c8e7";
        libraryHaskellDepends = [
          base binary bytestring containers data-accessor distributed-process
          network network-multicast network-transport network-transport-tcp
@@ -53973,8 +53972,8 @@ self: {
     ({ mkDerivation, base, containers, template-haskell, unix }:
      mkDerivation {
        pname = "dynamic-linker-template";
-       version = "0.1.0.4";
-       sha256 = "f865165fccac573099181bb1fd5f834c261894a2a7c2f8bd9bfa1645ee446d10";
+       version = "0.1.1.0";
+       sha256 = "1f9b2cb753c8cf649c08ca46a81d8e7dbf46d8be0a9962ced9c679530a3ef3a9";
        libraryHaskellDepends = [ base containers template-haskell unix ];
        homepage = "http://github.com/hsyl20/dynamic-linker-template";
        description = "Automatically derive dynamic linking methods from a data type";
@@ -56392,12 +56391,15 @@ self: {
      }:
      mkDerivation {
        pname = "epub-metadata";
-       version = "4.3";
-       sha256 = "d33be727a9e75fbbba889cd7fe6f502005d809c60720a2544b13bbadbdab853f";
+       version = "4.4";
+       sha256 = "ca4f9ff02676a1abcbe5433deb655747a11f28e8f4dfcb4b94d7a073ab50bb62";
+       isLibrary = true;
+       isExecutable = true;
        libraryHaskellDepends = [
          base bytestring containers directory filepath hxt mtl regex-compat
          zip-archive
        ];
+       executableHaskellDepends = [ base mtl ];
        testHaskellDepends = [
          base bytestring directory filepath HUnit hxt mtl regex-compat
          zip-archive
@@ -56848,6 +56850,23 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "escape-artist" = callPackage
+    ({ mkDerivation, base, bytestring, hspec, QuickCheck, silently
+     , text
+     }:
+     mkDerivation {
+       pname = "escape-artist";
+       version = "1.0.0";
+       sha256 = "50bd3a9b1e8773abff8d2a863c014978a74f3d4cd17a0c14cd8f4fdfb5740c7e";
+       libraryHaskellDepends = [ base bytestring text ];
+       testHaskellDepends = [
+         base bytestring hspec QuickCheck silently text
+       ];
+       homepage = "https://github.com/EarthCitizen/escape-artist#readme";
+       description = "ANSI Escape Sequence Text Decoration Made Easy";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "esotericbot" = callPackage
     ({ mkDerivation, attoparsec, base, bytestring, containers
      , directory, fgl, mtl, network, stm, stream-fusion, tuple, unix
@@ -57241,6 +57260,22 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "event-transformer" = callPackage
+    ({ mkDerivation, base, transformers }:
+     mkDerivation {
+       pname = "event-transformer";
+       version = "0.1.0.0";
+       sha256 = "98eabb7332a88d39fcf8c208bb9890c692e49601674112c117d6eb8d4085436e";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [ base transformers ];
+       executableHaskellDepends = [ base ];
+       testHaskellDepends = [ base ];
+       homepage = "https://github.com/schell/event-transformer#readme";
+       description = "Initial project template from stack";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "eventloop" = callPackage
     ({ mkDerivation, aeson, base, bytestring, concurrent-utilities
      , deepseq, network, stm, suspend, text, timers, websockets
@@ -57306,24 +57341,24 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "eventstore_0_13_1_6" = callPackage
-    ({ mkDerivation, aeson, array, async, base, cereal, classy-prelude
+  "eventstore_0_13_1_7" = callPackage
+    ({ mkDerivation, aeson, array, base, cereal, classy-prelude
      , connection, containers, dns, dotnet-timespan, http-client
      , protobuf, random, semigroups, stm, tasty, tasty-hunit, text, time
      , unordered-containers, uuid
      }:
      mkDerivation {
        pname = "eventstore";
-       version = "0.13.1.6";
-       sha256 = "5d5b966a6852d94764712b137e6f8a4c90fd15cc700b1f8e0d5b184301664ad1";
+       version = "0.13.1.7";
+       sha256 = "a0c6ea5e91f56dc8027bb34825c1382c31cd26ac291c5a7c988bec0681c5e8d8";
        libraryHaskellDepends = [
          aeson array base cereal classy-prelude connection containers dns
          dotnet-timespan http-client protobuf random semigroups stm time
          unordered-containers uuid
        ];
        testHaskellDepends = [
-         aeson async base connection dotnet-timespan stm tasty tasty-hunit
-         text time
+         aeson base classy-prelude connection dotnet-timespan stm tasty
+         tasty-hunit text time uuid
        ];
        homepage = "http://github.com/YoEight/eventstore";
        description = "EventStore TCP Client";
@@ -58296,23 +58331,25 @@ self: {
      }) {};
 
   "factory" = callPackage
-    ({ mkDerivation, array, base, Cabal, containers, deepseq, parallel
-     , primes, QuickCheck, random, toolshed
+    ({ mkDerivation, array, base, Cabal, containers, data-default
+     , deepseq, parallel, primes, QuickCheck, random, toolshed
      }:
      mkDerivation {
        pname = "factory";
-       version = "0.2.1.2";
-       sha256 = "0d8d4c53c948e1e577a2813c6c512bb25615dfad790839414705b53ed5b402bd";
+       version = "0.2.2.1";
+       sha256 = "609110e81f03977ae089b8b5237339543d0023c8f02f5c16415ed79b4f9ca597";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
-         array base containers deepseq parallel primes random toolshed
+         array base containers data-default deepseq parallel primes random
+         toolshed
        ];
        executableHaskellDepends = [
-         array base Cabal containers deepseq random toolshed
+         array base Cabal containers data-default deepseq random toolshed
        ];
        testHaskellDepends = [
-         array base containers deepseq primes QuickCheck random toolshed
+         array base containers data-default deepseq primes QuickCheck random
+         toolshed
        ];
        homepage = "http://functionalley.eu/Factory/factory.html";
        description = "Rational arithmetic in an irrational world";
@@ -58352,16 +58389,17 @@ self: {
      }) {};
 
   "fadno-braids" = callPackage
-    ({ mkDerivation, base, containers, diagrams, diagrams-lib
-     , diagrams-rasterific, lens, transformers-compat
+    ({ mkDerivation, base, containers, data-default, diagrams
+     , diagrams-lib, diagrams-rasterific, lens, random
+     , transformers-compat
      }:
      mkDerivation {
        pname = "fadno-braids";
-       version = "0.0.2";
-       sha256 = "1d874bef4fa5c693e3b5aac15f239a2d4862b7c342ea96fe24c476d1511644a9";
+       version = "0.0.5";
+       sha256 = "97f99926a2481fc9a0964b35b377ee206623d087b36a842fcbf66541890d39d8";
        libraryHaskellDepends = [
-         base containers diagrams diagrams-lib diagrams-rasterific lens
-         transformers-compat
+         base containers data-default diagrams diagrams-lib
+         diagrams-rasterific lens random transformers-compat
        ];
        homepage = "http://github.com/slpopejoy/";
        description = "Braid representations in Haskell";
@@ -58369,6 +58407,21 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "fadno-xml" = callPackage
+    ({ mkDerivation, base, containers, Decimal, lens, mtl, parsec, xml
+     }:
+     mkDerivation {
+       pname = "fadno-xml";
+       version = "1.0.3";
+       sha256 = "714e0e438827c4fee58fdced7cd018490f37705e830da428f77d58fa8268cccf";
+       libraryHaskellDepends = [
+         base containers Decimal lens mtl parsec xml
+       ];
+       homepage = "http://github.com/slpopejoy/fadno-xml";
+       description = "XML/XSD combinators/schemas/codegen";
+       license = stdenv.lib.licenses.bsd2;
+     }) {};
+
   "fail" = callPackage
     ({ mkDerivation }:
      mkDerivation {
@@ -59079,8 +59132,8 @@ self: {
      }:
      mkDerivation {
        pname = "fclabels";
-       version = "2.0.3";
-       sha256 = "b43e4dcc9000be435145b13b97e0997ec1fb8291ec0af8f18cf2a2b696d9ce43";
+       version = "2.0.3.1";
+       sha256 = "b993e35fd89945669c8b3cd95fa9dee618eb6a5256f8909ccbdc8ec713f75c8b";
        libraryHaskellDepends = [ base mtl template-haskell transformers ];
        testHaskellDepends = [
          base HUnit mtl template-haskell transformers
@@ -59192,8 +59245,8 @@ self: {
        pname = "feed";
        version = "0.3.11.1";
        sha256 = "ed04d0fc120a4b1b47c7675d395afbb419506431bc6f8e0f2c382c73a4afc983";
-       revision = "2";
-       editedCabalFile = "a59224b7f2b31906c2decebe084684888ce6319e04645791378e385741e36e28";
+       revision = "3";
+       editedCabalFile = "0baffc9bcab66296a904d211d4254f625811dc28eda4f1be0692cc2b219a6bdd";
        libraryHaskellDepends = [
          base old-locale old-time time time-locale-compat utf8-string xml
        ];
@@ -60271,19 +60324,21 @@ self: {
      }) {};
 
   "fishfood" = callPackage
-    ({ mkDerivation, base, Cabal, containers, directory, factory, mtl
-     , QuickCheck, toolshed
+    ({ mkDerivation, base, Cabal, containers, data-default, directory
+     , factory, mtl, QuickCheck, toolshed
      }:
      mkDerivation {
        pname = "fishfood";
-       version = "0.0.1.5";
-       sha256 = "58fa4da2e7437ba36be2027a9bcd73cc9aceb180599b59b65a771ac3d9155271";
+       version = "0.0.1.6";
+       sha256 = "45cca62a88480b05249d206b4090f310531da036477600843675565f32b3de05";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
-         base Cabal containers directory factory mtl toolshed
+         base Cabal containers data-default directory factory mtl toolshed
+       ];
+       executableHaskellDepends = [
+         base Cabal data-default mtl toolshed
        ];
-       executableHaskellDepends = [ base Cabal mtl toolshed ];
        testHaskellDepends = [
          base Cabal containers mtl QuickCheck toolshed
        ];
@@ -60331,8 +60386,8 @@ self: {
     ({ mkDerivation, base, cmdargs, leancheck, template-haskell }:
      mkDerivation {
        pname = "fitspec";
-       version = "0.3.1";
-       sha256 = "f22aa02f95b2b7d67a7c9b32303a75be139302a99c74524de1538a26f31411fb";
+       version = "0.4.0";
+       sha256 = "73dae591138ff5390be2b7f373a4f3bed89d4d39d26ac665f5f8cf5326aad5da";
        libraryHaskellDepends = [
          base cmdargs leancheck template-haskell
        ];
@@ -61172,15 +61227,15 @@ self: {
 
   "fltkhs" = callPackage
     ({ mkDerivation, base, bytestring, c2hs, directory, filepath, mtl
-     , parsec
+     , parsec, text
      }:
      mkDerivation {
        pname = "fltkhs";
-       version = "0.4.1.0";
-       sha256 = "2a721e193ae591e28e96ea55a25dd70f24f388cf6481b4c1c9aede12260d7bb4";
+       version = "0.5.0.0";
+       sha256 = "95590b3e27edd3b79a33dd872a5c7a3d6f4a436db63eea7fe282066e1319f506";
        isLibrary = true;
        isExecutable = true;
-       libraryHaskellDepends = [ base bytestring ];
+       libraryHaskellDepends = [ base bytestring text ];
        libraryToolDepends = [ c2hs ];
        executableHaskellDepends = [ base directory filepath mtl parsec ];
        homepage = "http://github.com/deech/fltkhs";
@@ -61394,8 +61449,8 @@ self: {
      }:
      mkDerivation {
        pname = "fold-debounce";
-       version = "0.2.0.2";
-       sha256 = "971be718a834d0a18fb3b36b20faf2efbaadb8dd3a600c879909aca1e36778d2";
+       version = "0.2.0.3";
+       sha256 = "ca5eaa3ea7eea742c961df63249920021824a949c879053ff34bdeef4fb7a7af";
        libraryHaskellDepends = [
          base data-default-class stm stm-delay time
        ];
@@ -61411,8 +61466,8 @@ self: {
      }:
      mkDerivation {
        pname = "fold-debounce-conduit";
-       version = "0.1.0.2";
-       sha256 = "33853bcf36dd89e8a51fdaeb6d78fffd6b3a5fb853f7b0f4f7add8e65ff07b50";
+       version = "0.1.0.4";
+       sha256 = "fb1e937a3e1a78982df53d62ad55c1cd2b79f5ac9c18c56df436435829efa7cc";
        libraryHaskellDepends = [
          base conduit fold-debounce resourcet stm transformers
          transformers-base
@@ -62375,8 +62430,8 @@ self: {
      }:
      mkDerivation {
        pname = "freddy";
-       version = "0.1.0.0";
-       sha256 = "5513ee3231f1b5cb407d13dd8ea153f2737b25f0270eb12b304ffee56cda275a";
+       version = "0.1.2.0";
+       sha256 = "c2644b80d5d4592b4703cd404828ff8a5e4a1e62638eb9d305d4127f8934b951";
        libraryHaskellDepends = [
          amqp base broadcast-chan bytestring data-default random text uuid
        ];
@@ -62445,18 +62500,18 @@ self: {
     ({ mkDerivation, array, base, boundingboxes, colors, containers
      , control-bool, directory, filepath, free, freetype2, GLFW-b
      , hashable, JuicyPixels, JuicyPixels-util, lens, linear, mtl
-     , OpenGL, OpenGLRaw, random, reflection, template-haskell
+     , OpenGL, OpenGLRaw, random, reflection, StateVar, template-haskell
      , transformers, vector, void
      }:
      mkDerivation {
        pname = "free-game";
-       version = "1.1.81";
-       sha256 = "d7ef4867a906db76e2342a2c27012d8d1b6f6d86fd409b974c8cad0cce4c14fd";
+       version = "1.1.90";
+       sha256 = "645706706f3afe39d55d8f7405e1186a71952bc96023d3272ddf4bd992bcebc5";
        libraryHaskellDepends = [
          array base boundingboxes colors containers control-bool directory
          filepath free freetype2 GLFW-b hashable JuicyPixels
          JuicyPixels-util lens linear mtl OpenGL OpenGLRaw random reflection
-         template-haskell transformers vector void
+         StateVar template-haskell transformers vector void
        ];
        homepage = "https://github.com/fumieval/free-game";
        description = "Create games for free";
@@ -64611,6 +64666,8 @@ self: {
        pname = "generics-sop-lens";
        version = "0.1.2.0";
        sha256 = "bafd04f0238e19d73da60ae018c1c82cb3e4be49990c61a6049dec2dafff40f6";
+       revision = "1";
+       editedCabalFile = "6ea2756e5e916c6a7d24f7d261bb0bf27925b8d8dd30332df4a053160596afcc";
        libraryHaskellDepends = [ base generics-sop lens ];
        homepage = "https://github.com/phadej/generics-sop-lens#readme";
        description = "Lenses for types in generics-sop";
@@ -66091,8 +66148,8 @@ self: {
     ({ mkDerivation, base, ghcjs-dom-jsaddle, text, transformers }:
      mkDerivation {
        pname = "ghcjs-dom";
-       version = "0.4.0.0";
-       sha256 = "a21735e316465e7d11e38443edcd5b07b4bef6aabdfac84dca6ca5f67f01d02e";
+       version = "0.4.1.0";
+       sha256 = "aa3c9e44ae5ff47b224c8624ea8131cfb02d54f8d7d98935e649a8011f3593c8";
        libraryHaskellDepends = [
          base ghcjs-dom-jsaddle text transformers
        ];
@@ -66121,8 +66178,8 @@ self: {
     ({ mkDerivation, jsaddle-dom }:
      mkDerivation {
        pname = "ghcjs-dom-jsaddle";
-       version = "0.4.0.0";
-       sha256 = "b5e5737fa1c41b72c2c2fc99df2deb715d6088f5d9ac149f95b930b42cc7dff7";
+       version = "0.4.1.0";
+       sha256 = "e9906ab7606eb22dbb7e48147e1602f0bb62787f3baacda79550d3e9225c14d8";
        libraryHaskellDepends = [ jsaddle-dom ];
        doHaddock = false;
        description = "DOM library that supports both GHCJS and GHC using jsaddle";
@@ -66134,8 +66191,8 @@ self: {
     ({ mkDerivation }:
      mkDerivation {
        pname = "ghcjs-dom-jsffi";
-       version = "0.4.0.0";
-       sha256 = "d405a444dd65233e1006c2b4a41e81320a1f05300c72602abee3bd4ef0f7347f";
+       version = "0.4.1.0";
+       sha256 = "5cf3d984c17817d0104d7792003d14fd21978571a7b3c977edbd266c8a68c1fe";
        isLibrary = false;
        isExecutable = false;
        description = "DOM library using JSFFI and GHCJS";
@@ -67397,8 +67454,8 @@ self: {
      }:
      mkDerivation {
        pname = "git-annex";
-       version = "6.20160923";
-       sha256 = "964235a358814e081cf4a5d8dab798faacb1dabe5fc714ac6687b135e30fd93d";
+       version = "6.20161012";
+       sha256 = "38dab20236f36780278d49a345fb8850305e994d6c83ff010b4d9fd04cd85cdc";
        configureFlags = [
          "-fassistant" "-fcryptonite" "-fdbus" "-fdesktopnotify" "-fdns"
          "-ffeed" "-finotify" "-fpairing" "-fproduction" "-fquvi" "-fs3"
@@ -68429,25 +68486,25 @@ self: {
 
   "glirc" = callPackage
     ({ mkDerivation, async, attoparsec, base, bytestring, Cabal
-     , config-value, connection, containers, data-default-class
-     , directory, filepath, gitrev, hashable, HUnit, irc-core
+     , config-value, containers, data-default-class, directory, filepath
+     , gitrev, hashable, hookup, HsOpenSSL, HUnit, irc-core
      , kan-extensions, lens, memory, network, process, regex-tdfa, socks
-     , split, stm, text, time, tls, transformers, unix
-     , unordered-containers, vector, vty, x509, x509-store, x509-system
+     , split, stm, text, time, transformers, unix, unordered-containers
+     , vector, vty
      }:
      mkDerivation {
        pname = "glirc";
-       version = "2.19";
-       sha256 = "29d6fdddb6044de9815dfa20ecea1265d0b707af5aded6cb69a64457653a93c6";
+       version = "2.20.1";
+       sha256 = "1ddfb3fea3ccb962abacdd5556116ba0799a836201a757fb185abc641800f08d";
        isLibrary = true;
        isExecutable = true;
        setupHaskellDepends = [ base Cabal filepath ];
        libraryHaskellDepends = [
-         async attoparsec base bytestring config-value connection containers
-         data-default-class directory filepath gitrev hashable irc-core
-         kan-extensions lens memory network process regex-tdfa socks split
-         stm text time tls transformers unix unordered-containers vector vty
-         x509 x509-store x509-system
+         async attoparsec base bytestring config-value containers
+         data-default-class directory filepath gitrev hashable hookup
+         HsOpenSSL irc-core kan-extensions lens memory network process
+         regex-tdfa socks split stm text time transformers unix
+         unordered-containers vector vty
        ];
        executableHaskellDepends = [
          base data-default-class lens text vty
@@ -74212,6 +74269,24 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "haddock-library_1_2_1" = callPackage
+    ({ mkDerivation, base, base-compat, bytestring, deepseq, hspec
+     , QuickCheck, transformers
+     }:
+     mkDerivation {
+       pname = "haddock-library";
+       version = "1.2.1";
+       sha256 = "0fb1a09d2b6f5339bc008a8ebf6519f22d27f65cfcc682488a7b67e8ee151056";
+       libraryHaskellDepends = [ base bytestring deepseq transformers ];
+       testHaskellDepends = [
+         base base-compat bytestring deepseq hspec QuickCheck transformers
+       ];
+       homepage = "http://www.haskell.org/haddock/";
+       description = "Library exposing some functionality of Haddock";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "haddock-library" = callPackage
     ({ mkDerivation, base, base-compat, bytestring, deepseq, hspec
      , QuickCheck, transformers
@@ -75564,8 +75639,8 @@ self: {
      }:
      mkDerivation {
        pname = "happstack-authenticate";
-       version = "2.3.4.4";
-       sha256 = "7c48c45dd4e67101fa098b9cdd5b2e11853da0253cfefe2e9f1a773e13094a59";
+       version = "2.3.4.5";
+       sha256 = "65553a742d47f7209e0f42234c2e6f790a98f68386eea108a42b9c3a46fc4cd2";
        libraryHaskellDepends = [
          acid-state aeson authenticate base base64-bytestring boomerang
          bytestring containers data-default email-validate filepath
@@ -75810,8 +75885,8 @@ self: {
      }:
      mkDerivation {
        pname = "happstack-hsp";
-       version = "7.3.7";
-       sha256 = "fe82bc53c2738a9f502f6c42500e690d04dbf3dd9811ba4140b3d8cdf6adb1f7";
+       version = "7.3.7.1";
+       sha256 = "bbc884e4a5ca78faf08e17799c1d037622e377915ece889674004e0e54109617";
        libraryHaskellDepends = [
          base bytestring happstack-server harp hsp hsx2hs mtl syb text
          utf8-string
@@ -77332,6 +77407,20 @@ self: {
        license = stdenv.lib.licenses.lgpl21;
      }) {inherit (pkgs) glib;};
 
+  "haskell-gi-base_0_19" = callPackage
+    ({ mkDerivation, base, bytestring, containers, glib, text }:
+     mkDerivation {
+       pname = "haskell-gi-base";
+       version = "0.19";
+       sha256 = "ff3241d123a03e486ea0b6cb10b36262bfcd90411ac19859aa5c08f60dfe2af9";
+       libraryHaskellDepends = [ base bytestring containers text ];
+       libraryPkgconfigDepends = [ glib ];
+       homepage = "https://github.com/haskell-gi/haskell-gi-base";
+       description = "Foundation for libraries generated by haskell-gi";
+       license = stdenv.lib.licenses.lgpl21;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {inherit (pkgs) glib;};
+
   "haskell-google-trends" = callPackage
     ({ mkDerivation, base, bytestring, haskell-fake-user-agent, lens
      , regex-base, regex-posix, tagsoup, text, wreq
@@ -77610,6 +77699,26 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "haskell-packages_0_5" = callPackage
+    ({ mkDerivation, aeson, base, bytestring, Cabal, containers
+     , deepseq, directory, filepath, haskell-src-exts, hse-cpp, mtl
+     , optparse-applicative, tagged, transformers, transformers-compat
+     }:
+     mkDerivation {
+       pname = "haskell-packages";
+       version = "0.5";
+       sha256 = "c61f282e6425ba506e5bd288462e63ec14c13d28b1d1d6e9e989198acbffd02c";
+       libraryHaskellDepends = [
+         aeson base bytestring Cabal containers deepseq directory filepath
+         haskell-src-exts hse-cpp mtl optparse-applicative tagged
+         transformers transformers-compat
+       ];
+       homepage = "http://documentup.com/haskell-suite/haskell-packages";
+       description = "Haskell suite library for package management and integration with Cabal";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "haskell-pdf-presenter" = callPackage
     ({ mkDerivation, base, bytestring, cairo, containers, directory
      , filepath, glib, gtk, old-locale, poppler, template-haskell, time
@@ -77973,8 +78082,8 @@ self: {
      }:
      mkDerivation {
        pname = "haskell-tools-ast";
-       version = "0.1.3.0";
-       sha256 = "af93c177b3abd37fd5a5891417745d3ff2d0068877a720fd7b8a6b8ec1503919";
+       version = "0.2.0.0";
+       sha256 = "146c5b9501b6ee3d48085531afdca768f25448771ab1f35565dd336b22e3421b";
        libraryHaskellDepends = [
          base ghc mtl references template-haskell uniplate
        ];
@@ -77991,8 +78100,8 @@ self: {
      }:
      mkDerivation {
        pname = "haskell-tools-ast-fromghc";
-       version = "0.1.3.0";
-       sha256 = "4e58dabaf0ebaa645cdee231db480f7e83d7399808f91fdacd5b1bc6ca60e6c9";
+       version = "0.2.0.0";
+       sha256 = "f603ff60149bea2a85c2fa0c6d83acb3545c365ab26dadb2eafe5012d889ede6";
        libraryHaskellDepends = [
          base bytestring containers ghc haskell-tools-ast mtl references
          safe split template-haskell uniplate
@@ -78009,8 +78118,8 @@ self: {
      }:
      mkDerivation {
        pname = "haskell-tools-ast-gen";
-       version = "0.1.3.0";
-       sha256 = "e46579666308e844f9df962ec8dadcf0051fec170283eafa3dc087331d3862e5";
+       version = "0.2.0.0";
+       sha256 = "734e462a7af5cfe15560c77bde51e7111bf771621f5fb02c01bb8e26dba93170";
        libraryHaskellDepends = [
          base containers ghc haskell-tools-ast haskell-tools-ast-trf mtl
          references
@@ -78022,16 +78131,15 @@ self: {
      }) {};
 
   "haskell-tools-ast-trf" = callPackage
-    ({ mkDerivation, base, containers, ghc, haskell-tools-ast, MissingH
-     , mtl, references, uniplate
+    ({ mkDerivation, base, containers, ghc, haskell-tools-ast, mtl
+     , references, uniplate
      }:
      mkDerivation {
        pname = "haskell-tools-ast-trf";
-       version = "0.1.3.0";
-       sha256 = "7b9de75660f093456d6f58cc6e4831db4aa5caa66deb3b4d084bed1dffa2b843";
+       version = "0.2.0.0";
+       sha256 = "4dfc8d6a80c392c82063b720723634780af9a53535928274c863ab4c66353677";
        libraryHaskellDepends = [
-         base containers ghc haskell-tools-ast MissingH mtl references
-         uniplate
+         base containers ghc haskell-tools-ast mtl references uniplate
        ];
        homepage = "https://github.com/nboldi/haskell-tools";
        description = "Conversions on Haskell-Tools AST to prepare for refactorings";
@@ -78039,14 +78147,60 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "haskell-tools-cli" = callPackage
+    ({ mkDerivation, base, containers, directory, ghc, ghc-paths
+     , haskell-tools-ast, haskell-tools-prettyprint
+     , haskell-tools-refactor, mtl, references, split
+     }:
+     mkDerivation {
+       pname = "haskell-tools-cli";
+       version = "0.2.0.0";
+       sha256 = "fb59c74aae296cf598e7dd19634aa57037966e4a3cace373ed6abd449229f44d";
+       isLibrary = false;
+       isExecutable = true;
+       executableHaskellDepends = [
+         base containers directory ghc ghc-paths haskell-tools-ast
+         haskell-tools-prettyprint haskell-tools-refactor mtl references
+         split
+       ];
+       homepage = "https://github.com/haskell-tools/haskell-tools";
+       description = "Command-line frontend for Haskell-tools Refact";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
+  "haskell-tools-demo" = callPackage
+    ({ mkDerivation, aeson, base, bytestring, containers, directory
+     , filepath, ghc, ghc-paths, haskell-tools-ast
+     , haskell-tools-ast-fromghc, haskell-tools-ast-trf
+     , haskell-tools-prettyprint, haskell-tools-refactor, http-types
+     , mtl, references, transformers, wai, wai-websockets, warp
+     , websockets
+     }:
+     mkDerivation {
+       pname = "haskell-tools-demo";
+       version = "0.2.0.0";
+       sha256 = "2c70c5dc92fd4ce296a6035a7a4d2471cbc372a4dcf5735590082cbd9e926dd4";
+       isLibrary = false;
+       isExecutable = true;
+       executableHaskellDepends = [
+         aeson base bytestring containers directory filepath ghc ghc-paths
+         haskell-tools-ast haskell-tools-ast-fromghc haskell-tools-ast-trf
+         haskell-tools-prettyprint haskell-tools-refactor http-types mtl
+         references transformers wai wai-websockets warp websockets
+       ];
+       homepage = "https://github.com/haskell-tools/haskell-tools";
+       description = "A web-based demo for Haskell-tools Refactor";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "haskell-tools-prettyprint" = callPackage
     ({ mkDerivation, base, containers, ghc, haskell-tools-ast
      , haskell-tools-ast-trf, mtl, references, split
      }:
      mkDerivation {
        pname = "haskell-tools-prettyprint";
-       version = "0.1.3.0";
-       sha256 = "0163779686402c6592dc969d4caeb680b4e6a2957149281e1240ff16695041ac";
+       version = "0.2.0.0";
+       sha256 = "ae846bb46ae3c42de8393eb1341b66d654f3a672f3ec7fc0bac3c24d0dbdd76e";
        libraryHaskellDepends = [
          base containers ghc haskell-tools-ast haskell-tools-ast-trf mtl
          references split
@@ -78058,21 +78212,28 @@ self: {
      }) {};
 
   "haskell-tools-refactor" = callPackage
-    ({ mkDerivation, base, containers, directory, either, filepath, ghc
-     , ghc-paths, haskell-tools-ast, haskell-tools-ast-fromghc
-     , haskell-tools-ast-gen, haskell-tools-ast-trf
-     , haskell-tools-prettyprint, mtl, references, split
-     , template-haskell, time, transformers, uniplate
+    ({ mkDerivation, base, Cabal, containers, directory, either
+     , filepath, ghc, ghc-paths, haskell-tools-ast
+     , haskell-tools-ast-fromghc, haskell-tools-ast-gen
+     , haskell-tools-ast-trf, haskell-tools-prettyprint, HUnit, mtl
+     , polyparse, references, split, template-haskell, time
+     , transformers, uniplate
      }:
      mkDerivation {
        pname = "haskell-tools-refactor";
-       version = "0.1.3.0";
-       sha256 = "a8a527a9a9b036f7dd7b761817c5844ac6750e3959bc46377ca5f26808e326a4";
+       version = "0.2.0.0";
+       sha256 = "1572b88c516512d5d5cb2c94f25ef90cc17dac8db121f374551f4eabc9979723";
        libraryHaskellDepends = [
-         base containers directory either filepath ghc ghc-paths
+         base Cabal containers directory filepath ghc ghc-paths
          haskell-tools-ast haskell-tools-ast-fromghc haskell-tools-ast-gen
          haskell-tools-ast-trf haskell-tools-prettyprint mtl references
-         split template-haskell time transformers uniplate
+         split template-haskell transformers uniplate
+       ];
+       testHaskellDepends = [
+         base Cabal containers directory either filepath ghc ghc-paths
+         haskell-tools-ast haskell-tools-ast-fromghc haskell-tools-ast-gen
+         haskell-tools-ast-trf haskell-tools-prettyprint HUnit mtl polyparse
+         references split template-haskell time transformers uniplate
        ];
        homepage = "https://github.com/haskell-tools/haskell-tools";
        description = "Refactoring Tool for Haskell";
@@ -79289,35 +79450,6 @@ self: {
      }:
      mkDerivation {
        pname = "hasql";
-       version = "0.19.15.1";
-       sha256 = "5285147d09d044dea3fa1e9579e436ce8347f41a8b3d3c8da5d2e5d1f7c21421";
-       libraryHaskellDepends = [
-         aeson attoparsec base base-prelude bytestring
-         bytestring-tree-builder contravariant contravariant-extras
-         data-default-class dlist either hashable hashtables loch-th mtl
-         placeholders postgresql-binary postgresql-libpq profunctors
-         scientific semigroups text time transformers uuid vector
-       ];
-       testHaskellDepends = [
-         data-default-class QuickCheck quickcheck-instances rebase tasty
-         tasty-hunit tasty-quickcheck tasty-smallcheck
-       ];
-       homepage = "https://github.com/nikita-volkov/hasql";
-       description = "An efficient PostgreSQL driver and a flexible mapping API";
-       license = stdenv.lib.licenses.mit;
-     }) {};
-
-  "hasql_0_19_15_2" = callPackage
-    ({ mkDerivation, aeson, attoparsec, base, base-prelude, bytestring
-     , bytestring-tree-builder, contravariant, contravariant-extras
-     , data-default-class, dlist, either, hashable, hashtables, loch-th
-     , mtl, placeholders, postgresql-binary, postgresql-libpq
-     , profunctors, QuickCheck, quickcheck-instances, rebase, scientific
-     , semigroups, tasty, tasty-hunit, tasty-quickcheck
-     , tasty-smallcheck, text, time, transformers, uuid, vector
-     }:
-     mkDerivation {
-       pname = "hasql";
        version = "0.19.15.2";
        sha256 = "b025bd613d23444f18f1196ca51fb2bdbb4b10bf779c1db85685eeb755c8bb34";
        libraryHaskellDepends = [
@@ -79334,7 +79466,6 @@ self: {
        homepage = "https://github.com/nikita-volkov/hasql";
        description = "An efficient PostgreSQL driver and a flexible mapping API";
        license = stdenv.lib.licenses.mit;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "hasql-backend" = callPackage
@@ -80989,8 +81120,8 @@ self: {
      }:
      mkDerivation {
        pname = "hedis";
-       version = "0.9.3";
-       sha256 = "2d3748fe7c88b3b7341e6fdd3632c4594b01e7c5fe7c395ea5fc74235e1f92d0";
+       version = "0.9.4";
+       sha256 = "15935228da585669041395cac32c8e570ea4efa122b0ae9f71fa1a0c129f70d1";
        libraryHaskellDepends = [
          async base bytestring bytestring-lexing deepseq mtl network
          resource-pool scanner stm text time unordered-containers vector
@@ -83876,19 +84007,19 @@ self: {
      }) {};
 
   "hjsonpointer" = callPackage
-    ({ mkDerivation, aeson, base, hspec, http-types, HUnit, QuickCheck
-     , text, unordered-containers, vector
+    ({ mkDerivation, aeson, base, hspec, http-types, QuickCheck, text
+     , unordered-containers, vector
      }:
      mkDerivation {
        pname = "hjsonpointer";
-       version = "1.0.0.0";
-       sha256 = "0ba6ab283e9d465de61c1d171e7c78c78c5e06b061c125a63e2eee0201a01739";
+       version = "1.0.0.1";
+       sha256 = "e438e501f48cadbe7352cf0fc93b5fb744c99acba465f7280afdb0d3c504713f";
        libraryHaskellDepends = [
          aeson base QuickCheck text unordered-containers vector
        ];
        testHaskellDepends = [
-         aeson base hspec http-types HUnit QuickCheck text
-         unordered-containers vector
+         aeson base hspec http-types QuickCheck text unordered-containers
+         vector
        ];
        homepage = "https://github.com/seagreen/hjsonpointer";
        description = "JSON Pointer library";
@@ -83922,27 +84053,26 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
-  "hjsonschema_1_2_0_0" = callPackage
+  "hjsonschema_1_2_0_1" = callPackage
     ({ mkDerivation, aeson, async, base, bytestring, containers
-     , directory, file-embed, filepath, hjsonpointer, http-client
-     , http-types, HUnit, pcre-heavy, profunctors, QuickCheck
-     , scientific, semigroups, tasty, tasty-hunit, tasty-quickcheck
-     , text, unordered-containers, vector, wai-app-static, warp
+     , directory, file-embed, filepath, hjsonpointer, hspec, http-client
+     , http-types, pcre-heavy, profunctors, QuickCheck, scientific
+     , semigroups, text, unordered-containers, vector, wai-app-static
+     , warp
      }:
      mkDerivation {
        pname = "hjsonschema";
-       version = "1.2.0.0";
-       sha256 = "b1cf328125087627be0afb969c4024e5fb4bee8a4990078f2371dc8f31c7ada1";
+       version = "1.2.0.1";
+       sha256 = "85df5af566ed80b814b5b1757dee2acbde8f0c979747b34d28094552dcf5a960";
        libraryHaskellDepends = [
          aeson base bytestring containers file-embed filepath hjsonpointer
          http-client http-types pcre-heavy profunctors QuickCheck scientific
          semigroups text unordered-containers vector
        ];
        testHaskellDepends = [
-         aeson async base bytestring directory filepath hjsonpointer HUnit
-         profunctors QuickCheck semigroups tasty tasty-hunit
-         tasty-quickcheck text unordered-containers vector wai-app-static
-         warp
+         aeson async base bytestring directory filepath hjsonpointer hspec
+         profunctors QuickCheck semigroups text unordered-containers vector
+         wai-app-static warp
        ];
        homepage = "https://github.com/seagreen/hjsonschema";
        description = "JSON Schema library";
@@ -85915,6 +86045,24 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "hookup" = callPackage
+    ({ mkDerivation, base, bytestring, HsOpenSSL, HsOpenSSL-x509-system
+     , network, openssl, socks, template-haskell
+     }:
+     mkDerivation {
+       pname = "hookup";
+       version = "0.1.0.0";
+       sha256 = "0b321b470cb66f8b0d1611cbe26ec6d0c8904f984456bd2fbe292fb2efd8a580";
+       libraryHaskellDepends = [
+         base bytestring HsOpenSSL HsOpenSSL-x509-system network socks
+         template-haskell
+       ];
+       librarySystemDepends = [ openssl ];
+       homepage = "https://github.com/glguy/irc-core";
+       description = "Abstraction over creating network connections with SOCKS5 and TLS";
+       license = stdenv.lib.licenses.isc;
+     }) {inherit (pkgs) openssl;};
+
   "hoopl_3_10_2_1" = callPackage
     ({ mkDerivation, base, containers, filepath, mtl, parsec
      , test-framework, test-framework-hunit
@@ -88727,6 +88875,18 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "hse-cpp_0_2" = callPackage
+    ({ mkDerivation, base, cpphs, haskell-src-exts }:
+     mkDerivation {
+       pname = "hse-cpp";
+       version = "0.2";
+       sha256 = "eeb0168c00bf5dd2975faf3f5915035c73b40063b1f315ce3fd58f66a6ae4b4c";
+       libraryHaskellDepends = [ base cpphs haskell-src-exts ];
+       description = "Preprocess+parse haskell code";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "hsebaysdk" = callPackage
     ({ mkDerivation, aeson, base, bytestring, http-client, http-types
      , text, time, transformers, unordered-containers
@@ -88825,8 +88985,8 @@ self: {
      }:
      mkDerivation {
        pname = "hsexif";
-       version = "0.6.0.8";
-       sha256 = "ad7644484993252ae6eec48e7d9b583ac0f311737068a35ea43781adc61c7590";
+       version = "0.6.0.9";
+       sha256 = "411c9ff2fc0a0c4bbb28691085887a0f7ebffd2d2c589df763b1104135adc404";
        libraryHaskellDepends = [
          base binary bytestring containers iconv text time
        ];
@@ -89035,8 +89195,8 @@ self: {
     ({ mkDerivation, base, directory, filepath }:
      mkDerivation {
        pname = "hsinstall";
-       version = "1.0";
-       sha256 = "198fd23264669c03fcca24a1fbbd898ae30e40ab188375d22f9b26c4ff96e378";
+       version = "1.4";
+       sha256 = "d0be47492395a079e447bcebd54f63522b6f957c51bee9f78b5d4cddaa548869";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [ base directory filepath ];
@@ -89505,6 +89665,8 @@ self: {
        pname = "hspec";
        version = "2.2.3";
        sha256 = "511e994ee86d85c610bf20a3eb8309e79816e984dc46f4d0f95bd7dc676f6210";
+       revision = "1";
+       editedCabalFile = "8e446bc3a3332ce9d5dc255a32682b735c8352b187e71f228f529e2fa79e6473";
        libraryHaskellDepends = [
          base hspec-core hspec-discover hspec-expectations HUnit QuickCheck
          transformers
@@ -89517,22 +89679,23 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
-  "hspec_2_2_4" = callPackage
-    ({ mkDerivation, base, directory, hspec-core, hspec-discover
-     , hspec-expectations, hspec-meta, HUnit, QuickCheck, stringbuilder
-     , transformers
+  "hspec_2_3_1" = callPackage
+    ({ mkDerivation, base, call-stack, directory, hspec-core
+     , hspec-discover, hspec-expectations, hspec-meta, HUnit, QuickCheck
+     , stringbuilder, transformers
      }:
      mkDerivation {
        pname = "hspec";
-       version = "2.2.4";
-       sha256 = "724b0af9c871711f10a414d335a2ed0caabb94efb8576f94b43386b7f103c9b1";
+       version = "2.3.1";
+       sha256 = "62b501f1150c40d65836bef9cafcd427390db9dc48c9a3aa7d4633ea6cc7b22c";
        libraryHaskellDepends = [
-         base hspec-core hspec-discover hspec-expectations HUnit QuickCheck
-         transformers
+         base call-stack hspec-core hspec-discover hspec-expectations HUnit
+         QuickCheck transformers
        ];
        testHaskellDepends = [
-         base directory hspec-core hspec-discover hspec-expectations
-         hspec-meta HUnit QuickCheck stringbuilder transformers
+         base call-stack directory hspec-core hspec-discover
+         hspec-expectations hspec-meta HUnit QuickCheck stringbuilder
+         transformers
        ];
        homepage = "http://hspec.github.io/";
        description = "A Testing Framework for Haskell";
@@ -89594,6 +89757,8 @@ self: {
        pname = "hspec-core";
        version = "2.2.3";
        sha256 = "01fa6959921ae0ed3de5e3f612451fe788800f9670c7f425a241f5f0dec99652";
+       revision = "1";
+       editedCabalFile = "9ff10012fa0457540d12846b875dd747a73a65aa8ba08876c473f42b7ac27c07";
        libraryHaskellDepends = [
          ansi-terminal async base deepseq hspec-expectations HUnit
          QuickCheck quickcheck-io random setenv tf-random time transformers
@@ -89608,24 +89773,25 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
-  "hspec-core_2_2_4" = callPackage
-    ({ mkDerivation, ansi-terminal, async, base, deepseq
+  "hspec-core_2_3_1" = 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
      }:
      mkDerivation {
        pname = "hspec-core";
-       version = "2.2.4";
-       sha256 = "328ac2525b9eb0fe4807d5ae10fe2d846220f9a8b5ac6b5d316e1bea9e2d0475";
+       version = "2.3.1";
+       sha256 = "3136a34ae0ff45aec4449b1aab90a9dbb61ae57d7adfa4ef567eb39728fd9008";
        libraryHaskellDepends = [
-         ansi-terminal async base deepseq hspec-expectations HUnit
-         QuickCheck quickcheck-io random setenv tf-random time transformers
+         ansi-terminal async base call-stack deepseq hspec-expectations
+         HUnit QuickCheck quickcheck-io random setenv tf-random time
+         transformers
        ];
        testHaskellDepends = [
-         ansi-terminal async base deepseq hspec-expectations hspec-meta
-         HUnit process QuickCheck quickcheck-io random setenv silently
-         tf-random time transformers
+         ansi-terminal async base call-stack deepseq hspec-expectations
+         hspec-meta HUnit process QuickCheck quickcheck-io random setenv
+         silently tf-random time transformers
        ];
        homepage = "http://hspec.github.io/";
        description = "A Testing Framework for Haskell";
@@ -89649,12 +89815,12 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
-  "hspec-discover_2_2_4" = callPackage
+  "hspec-discover_2_3_1" = callPackage
     ({ mkDerivation, base, directory, filepath, hspec-meta }:
      mkDerivation {
        pname = "hspec-discover";
-       version = "2.2.4";
-       sha256 = "bb8ddb3c53d4c0cc3829c60d9b848aa19d843b19f22ef26355a12fb0d1e2e7af";
+       version = "2.3.1";
+       sha256 = "3c8fa99104ca21a6aa247d4b9db9211b2cf800d48f61e6396c184aaff8d92d97";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [ base directory filepath ];
@@ -89678,6 +89844,20 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "hspec-expectations_0_8_0" = callPackage
+    ({ mkDerivation, base, call-stack, HUnit, nanospec }:
+     mkDerivation {
+       pname = "hspec-expectations";
+       version = "0.8.0";
+       sha256 = "e861250530897df93716a198b147f2cf90e02c34149bef3c41584ba0c90d4baa";
+       libraryHaskellDepends = [ base call-stack HUnit ];
+       testHaskellDepends = [ base call-stack HUnit nanospec ];
+       homepage = "https://github.com/hspec/hspec-expectations#readme";
+       description = "Catchy combinators for HUnit";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "hspec-expectations-lens" = callPackage
     ({ mkDerivation, base, hspec, hspec-expectations, HUnit, lens
      , silently
@@ -89829,6 +90009,8 @@ self: {
        pname = "hspec-megaparsec";
        version = "0.2.1";
        sha256 = "6474bc9a4d77cf68c4415bfa2d76da77ece418d6570429ca6c8b68eb7463de6b";
+       revision = "1";
+       editedCabalFile = "8d7144767ad65f8686ebcf3f6181e870a832dbc7613b53b13069ddf677ba86c9";
        libraryHaskellDepends = [
          base containers hspec-expectations megaparsec
        ];
@@ -89848,6 +90030,8 @@ self: {
        pname = "hspec-megaparsec";
        version = "0.3.0";
        sha256 = "00baf799a21404108f2861ad42649a014c283dafcbc454875e1f50eb9af3d2ed";
+       revision = "1";
+       editedCabalFile = "2f5da90f1a6d9efbbcbec8e8570bcbf30749d620b911e6b1fe6f466653203768";
        libraryHaskellDepends = [
          base containers hspec-expectations megaparsec
        ];
@@ -89881,6 +90065,34 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "hspec-meta_2_3_1" = callPackage
+    ({ mkDerivation, ansi-terminal, async, base, call-stack, deepseq
+     , directory, filepath, hspec-expectations, HUnit, QuickCheck
+     , quickcheck-io, random, setenv, time, transformers
+     }:
+     mkDerivation {
+       pname = "hspec-meta";
+       version = "2.3.1";
+       sha256 = "ec482dc49765d88de40064e02307f8d9dea3ba1caec38047869a7974f1487f95";
+       revision = "1";
+       editedCabalFile = "36a143859e8b1e1c8f07c5dc29b822a1676cd8e5d1b1ac85282bf8ddfc4394a4";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         ansi-terminal async base call-stack deepseq hspec-expectations
+         HUnit QuickCheck quickcheck-io random setenv time transformers
+       ];
+       executableHaskellDepends = [
+         ansi-terminal async base call-stack deepseq directory filepath
+         hspec-expectations HUnit QuickCheck quickcheck-io random setenv
+         time transformers
+       ];
+       homepage = "http://hspec.github.io/";
+       description = "A version of Hspec which is used to test Hspec itself";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "hspec-monad-control" = callPackage
     ({ mkDerivation, base, hspec-core, monad-control, transformers
      , transformers-base
@@ -90118,6 +90330,31 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "hspec-wai_0_8_0" = callPackage
+    ({ mkDerivation, base, base-compat, bytestring, case-insensitive
+     , hspec, hspec-core, hspec-expectations, http-types, QuickCheck
+     , text, transformers, wai, wai-extra
+     }:
+     mkDerivation {
+       pname = "hspec-wai";
+       version = "0.8.0";
+       sha256 = "8b7ee2cf41bd29cc674da762a46b928557a4c42df564e2a9427b1526273a1141";
+       libraryHaskellDepends = [
+         base base-compat bytestring case-insensitive hspec-core
+         hspec-expectations http-types QuickCheck text transformers wai
+         wai-extra
+       ];
+       testHaskellDepends = [
+         base base-compat bytestring case-insensitive hspec hspec-core
+         hspec-expectations http-types QuickCheck text transformers wai
+         wai-extra
+       ];
+       homepage = "https://github.com/hspec/hspec-wai#readme";
+       description = "Experimental Hspec support for testing WAI applications";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "hspec-wai-json" = callPackage
     ({ mkDerivation, aeson, aeson-qq, base, bytestring
      , case-insensitive, hspec, hspec-wai, template-haskell
@@ -90136,6 +90373,25 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "hspec-wai-json_0_8_0" = callPackage
+    ({ mkDerivation, aeson, aeson-qq, base, bytestring
+     , case-insensitive, hspec, hspec-wai, template-haskell
+     }:
+     mkDerivation {
+       pname = "hspec-wai-json";
+       version = "0.8.0";
+       sha256 = "4679308198b7b247094696da5524e50e1dbc92da49bdd44627c105ccdf6b86e8";
+       libraryHaskellDepends = [
+         aeson aeson-qq base bytestring case-insensitive hspec-wai
+         template-haskell
+       ];
+       testHaskellDepends = [ base hspec hspec-wai ];
+       homepage = "https://github.com/hspec/hspec-wai#readme";
+       description = "Testing JSON APIs with hspec-wai";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "hspec-webdriver" = callPackage
     ({ mkDerivation, aeson, base, data-default, hashable, hspec
      , hspec-core, HUnit, lifted-base, stm, text, transformers
@@ -90660,6 +90916,30 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "hstox" = callPackage
+    ({ mkDerivation, async, base, base16-bytestring, binary
+     , binary-bits, bytestring, containers, data-msgpack, hspec
+     , integer-gmp, iproute, network, network-msgpack-rpc, process
+     , QuickCheck, saltine, tagged, text, transformers
+     }:
+     mkDerivation {
+       pname = "hstox";
+       version = "0.0.1";
+       sha256 = "6d62ca0a9f393f731f168457a1fd24ab6ea3a9fee721676323cc592c519a2e0a";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         base base16-bytestring binary binary-bits bytestring containers
+         data-msgpack hspec integer-gmp iproute network network-msgpack-rpc
+         QuickCheck saltine tagged text transformers
+       ];
+       executableHaskellDepends = [ base process ];
+       testHaskellDepends = [ async base ];
+       homepage = "http://hstox.github.io";
+       description = "A Tox protocol implementation in Haskell";
+       license = stdenv.lib.licenses.agpl3;
+     }) {};
+
   "hstradeking" = callPackage
     ({ mkDerivation, aeson, attoparsec, base, bytestring
      , case-insensitive, conduit, configurator, containers, hoauth
@@ -90843,6 +91123,26 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "hsx2hs_0_14_0" = callPackage
+    ({ mkDerivation, base, bytestring, haskell-src-exts
+     , haskell-src-meta, mtl, template-haskell, utf8-string
+     }:
+     mkDerivation {
+       pname = "hsx2hs";
+       version = "0.14.0";
+       sha256 = "987e6ce1eb612680dd3668a5f3347a6be9f6a78c54dbf5e3aabc0f8b4f991170";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         base bytestring haskell-src-exts haskell-src-meta mtl
+         template-haskell utf8-string
+       ];
+       homepage = "https://github.com/seereason/hsx2hs";
+       description = "HSX (Haskell Source with XML) allows literal XML syntax in Haskell source code";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "hsyscall" = callPackage
     ({ mkDerivation, base }:
      mkDerivation {
@@ -93038,17 +93338,17 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "hw-prim_0_3_0_3" = callPackage
-    ({ mkDerivation, base, bytestring, deepseq, hspec, QuickCheck
-     , random, vector
+  "hw-prim_0_3_0_4" = callPackage
+    ({ mkDerivation, base, bytestring, hspec, QuickCheck, random
+     , vector
      }:
      mkDerivation {
        pname = "hw-prim";
-       version = "0.3.0.3";
-       sha256 = "7abc9b3a3125dce061c89f9948302ed13c6c0eab3b64236157ae81d33ed09372";
+       version = "0.3.0.4";
+       sha256 = "7ca79714de0458c5506fc5b73a5c7a6702beed53a8cb484cd0287ae49d7ffb40";
        isLibrary = true;
        isExecutable = true;
-       libraryHaskellDepends = [ base bytestring deepseq random vector ];
+       libraryHaskellDepends = [ base bytestring vector ];
        executableHaskellDepends = [ base ];
        testHaskellDepends = [
          base bytestring hspec QuickCheck random vector
@@ -93936,8 +94236,8 @@ self: {
      }:
      mkDerivation {
        pname = "hylolib";
-       version = "1.5.1";
-       sha256 = "890f96a9217842911d4a3ba5a9600810be72947e25f24b9e29ca8e3b7b306882";
+       version = "1.5.2";
+       sha256 = "6aa2533ab21c08b9d55036d67c6a10f6836f42dbeabe18673bfda28f764d7082";
        libraryHaskellDepends = [
          array base containers mtl pretty random uniplate
        ];
@@ -96314,8 +96614,8 @@ self: {
        pname = "insert-ordered-containers";
        version = "0.1.0.1";
        sha256 = "4905e5d128c19887a79b281150acb16cb3b043ab2c5a7788b0151ba7d46b900a";
-       revision = "2";
-       editedCabalFile = "45eb329a4ace69cd003e0eafa048cbdb3b34f17e0f835ff0f1e1bc6ac90b33dd";
+       revision = "3";
+       editedCabalFile = "c81fa69aa035ad468b45c812c16b80bc70020b05bf2d4a8298c90b4f772c98b1";
        libraryHaskellDepends = [
          aeson base base-compat hashable lens semigroupoids semigroups text
          transformers unordered-containers
@@ -96339,8 +96639,8 @@ self: {
        pname = "insert-ordered-containers";
        version = "0.2.0.0";
        sha256 = "0353fcf5c58e9ed3fe33ddc3f57bfb2faccaa4d61fbf832f7fc2bfbe2c30d02e";
-       revision = "1";
-       editedCabalFile = "2775fc971c86a62caa0590f0f8c5ea74c3c4b59c96f9c45b0bcbc1760bc438e7";
+       revision = "3";
+       editedCabalFile = "66f19e15a4787bbad6c85303e5ae7ba0912d2db8b18b500e5e6e437156e53d2a";
        libraryHaskellDepends = [
          aeson base base-compat hashable lens semigroupoids semigroups text
          transformers unordered-containers
@@ -97347,6 +97647,18 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "ip2location" = callPackage
+    ({ mkDerivation, base, binary, bytestring, iproute }:
+     mkDerivation {
+       pname = "ip2location";
+       version = "8.0.4";
+       sha256 = "047e160706a8ab86a0800f9535a18af28e8257efa16e8ccac577d934bf293e3b";
+       libraryHaskellDepends = [ base binary bytestring iproute ];
+       homepage = "http://www.ip2location.com";
+       description = "IP2Location Haskell package for IP geolocation";
+       license = stdenv.lib.licenses.lgpl3;
+     }) {};
+
   "ip6addr" = callPackage
     ({ mkDerivation, base, cmdargs, IPv6Addr, text }:
      mkDerivation {
@@ -99273,20 +99585,6 @@ self: {
     ({ mkDerivation, base, HTTP }:
      mkDerivation {
        pname = "js-jquery";
-       version = "3.1.0";
-       sha256 = "a8db825d7740f18db4c3bad92db18e840913e1444f2d43e409dc5df691a7d3a2";
-       libraryHaskellDepends = [ base ];
-       testHaskellDepends = [ base HTTP ];
-       doCheck = false;
-       homepage = "https://github.com/ndmitchell/js-jquery#readme";
-       description = "Obtain minified jQuery code";
-       license = stdenv.lib.licenses.mit;
-     }) {};
-
-  "js-jquery_3_1_1" = callPackage
-    ({ mkDerivation, base, HTTP }:
-     mkDerivation {
-       pname = "js-jquery";
        version = "3.1.1";
        sha256 = "d72f67d72bd71d675bcdc75dd280c4a27d90784eb51c661a3da567e0186f2a04";
        libraryHaskellDepends = [ base ];
@@ -99295,23 +99593,22 @@ self: {
        homepage = "https://github.com/ndmitchell/js-jquery#readme";
        description = "Obtain minified jQuery code";
        license = stdenv.lib.licenses.mit;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "jsaddle" = callPackage
     ({ mkDerivation, aeson, base, bytestring, containers, doctest
      , filepath, http-types, lens, primitive, process, QuickCheck, stm
-     , template-haskell, text, transformers, vector, wai, wai-app-static
-     , wai-websockets, warp, websockets
+     , template-haskell, text, time, transformers, vector, wai
+     , wai-app-static, wai-websockets, warp, websockets
      }:
      mkDerivation {
        pname = "jsaddle";
-       version = "0.5.0.1";
-       sha256 = "0e69a4c59be060a7026dc322741f5c3d3245d17a795ce02ebb08fecf97692862";
+       version = "0.5.1.0";
+       sha256 = "b97d31c176d1862103cabd8fe948c059f04de5c4ca4e4404001625827a5a506c";
        libraryHaskellDepends = [
          aeson base bytestring containers filepath http-types lens primitive
-         process stm template-haskell text transformers wai wai-app-static
-         wai-websockets warp websockets
+         process stm template-haskell text time transformers wai
+         wai-app-static wai-websockets warp websockets
        ];
        testHaskellDepends = [
          base bytestring doctest filepath http-types process QuickCheck text
@@ -99328,8 +99625,8 @@ self: {
      }:
      mkDerivation {
        pname = "jsaddle-dom";
-       version = "0.4.0.0";
-       sha256 = "c4e9624ebebd0815a8715753ba1a179ba469f61915d8b45b468e5deb55ab5b77";
+       version = "0.4.1.0";
+       sha256 = "c9038d2d124dfd330112470caee81a69b3918de186135f0c24525f4f81ec1b74";
        libraryHaskellDepends = [
          base base-compat jsaddle lens text transformers
        ];
@@ -100082,8 +100379,8 @@ self: {
      }:
      mkDerivation {
        pname = "jsonschema-gen";
-       version = "0.3.0.1";
-       sha256 = "4dec2d9f267920de58bc446e4c54ff56f42ff8002493aea5b5f64a188f320ca2";
+       version = "0.4.0.0";
+       sha256 = "c456517514189da2cc725819515e6f54f7f02bc5c9aecbe43759e9e38e42174f";
        libraryHaskellDepends = [
          aeson base bytestring containers scientific tagged text time
          unordered-containers vector
@@ -101294,12 +101591,12 @@ self: {
      }:
      mkDerivation {
        pname = "keysafe";
-       version = "0.20160927";
-       sha256 = "dd50b8971f0f54a9cc67096db78d3c2a7c63ac59ba9c91ef2edf063dff100623";
+       version = "0.20161006";
+       sha256 = "ae5d4445467d7f381a2c8ecd2142d64c31f1697418c5892b2f0e50f1857e034e";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
-         aeson async base binary bloomfilter bytestring containers
+         aeson argon2 async base binary bloomfilter bytestring containers
          crypto-random deepseq directory disk-free-space exceptions
          fast-logger filepath http-client lifted-base MonadRandom network
          optparse-applicative process raaz random random-shuffle readline
@@ -101307,12 +101604,11 @@ self: {
          socks split stm text time token-bucket transformers
          unbounded-delays unix unix-compat utf8-string wai warp zxcvbn-c
        ];
-       executableSystemDepends = [ argon2 ];
        homepage = "https://joeyh.name/code/keysafe/";
        description = "back up a secret key securely to the cloud";
        license = stdenv.lib.licenses.agpl3;
        hydraPlatforms = stdenv.lib.platforms.none;
-     }) {argon2 = null;};
+     }) {};
 
   "keystore" = callPackage
     ({ mkDerivation, aeson, aeson-pretty, ansi-wl-pprint, api-tools
@@ -101574,14 +101870,15 @@ self: {
 
   "knead" = callPackage
     ({ mkDerivation, base, llvm-extra, llvm-tf, storable-record
-     , storable-tuple, utility-ht
+     , storable-tuple, transformers, utility-ht
      }:
      mkDerivation {
        pname = "knead";
-       version = "0.2";
-       sha256 = "3a4b110042f0a6080ef36597fca2498daad8800bb054856aaa480885d6670803";
+       version = "0.2.0.1";
+       sha256 = "767515c8db0abff908d927354a027cb4f2cac929cb768302ba3900c050ad945c";
        libraryHaskellDepends = [
-         base llvm-extra llvm-tf storable-record storable-tuple utility-ht
+         base llvm-extra llvm-tf storable-record storable-tuple transformers
+         utility-ht
        ];
        homepage = "http://hub.darcs.net/thielema/knead/";
        description = "Repa array processing using LLVM JIT";
@@ -101593,8 +101890,8 @@ self: {
     ({ mkDerivation, base, knead, llvm-extra, llvm-tf, utility-ht }:
      mkDerivation {
        pname = "knead-arithmetic";
-       version = "0.0";
-       sha256 = "64ffb6727d9848a04f7287a4ee7954f9150af18b8bd1ac4b475ae15c540e7f3e";
+       version = "0.0.0.1";
+       sha256 = "7ed408c73d015d564af551611e9a28784afa6bd4d012a7a03b0fb44b0886b928";
        libraryHaskellDepends = [
          base knead llvm-extra llvm-tf utility-ht
        ];
@@ -102867,31 +103164,6 @@ self: {
      }:
      mkDerivation {
        pname = "language-c-quote";
-       version = "0.11.6.3";
-       sha256 = "1dea4102addfaa4744b7dc110f2e842a11511dc4da72814222be4a954a721a2b";
-       libraryHaskellDepends = [
-         array base bytestring containers exception-mtl
-         exception-transformers filepath haskell-src-meta mainland-pretty
-         mtl srcloc syb symbol template-haskell
-       ];
-       libraryToolDepends = [ alex happy ];
-       testHaskellDepends = [
-         base bytestring HUnit mainland-pretty srcloc symbol test-framework
-         test-framework-hunit
-       ];
-       homepage = "http://www.drexel.edu/~mainland/";
-       description = "C/CUDA/OpenCL/Objective-C quasiquoting library";
-       license = stdenv.lib.licenses.bsd3;
-     }) {};
-
-  "language-c-quote_0_11_7" = callPackage
-    ({ mkDerivation, alex, array, base, bytestring, containers
-     , exception-mtl, exception-transformers, filepath, happy
-     , haskell-src-meta, HUnit, mainland-pretty, mtl, srcloc, syb
-     , symbol, template-haskell, test-framework, test-framework-hunit
-     }:
-     mkDerivation {
-       pname = "language-c-quote";
        version = "0.11.7";
        sha256 = "d35d3b22cc12ed6e7b1036401d394f0a55c9b278e807144f64d0eca41121a230";
        libraryHaskellDepends = [
@@ -102907,7 +103179,6 @@ self: {
        homepage = "http://www.drexel.edu/~mainland/";
        description = "C/CUDA/OpenCL/Objective-C quasiquoting library";
        license = stdenv.lib.licenses.bsd3;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "language-cil" = callPackage
@@ -103019,8 +103290,8 @@ self: {
        pname = "language-ecmascript";
        version = "0.17.1.0";
        sha256 = "df1e3f0d3096d522f278c644d3efbedabee29e2babfdf9d497287550f017883e";
-       revision = "1";
-       editedCabalFile = "cc53ef169189e8475dadb6888489edd74490ce82880e44b131fe15e7b5f0236e";
+       revision = "2";
+       editedCabalFile = "c65730a251b7051a95c3ce313b16502830d2685fb7f88eabde1f323b388acd72";
        libraryHaskellDepends = [
          base containers data-default-class Diff mtl parsec QuickCheck
          template-haskell testing-feat uniplate wl-pprint
@@ -103730,8 +104001,8 @@ self: {
      }:
      mkDerivation {
        pname = "large-hashable";
-       version = "0.1.0.1";
-       sha256 = "c9ef2847d8f91fd72b45922c3f8ca58bd07fc2aa3b8248f02e34f44c801a7072";
+       version = "0.1.0.3";
+       sha256 = "ece9da94f91dfb97f3507035f280fe89a9bed50cf1071aae1afbd5d288682d89";
        libraryHaskellDepends = [
          aeson base base16-bytestring bytes bytestring containers scientific
          strict template-haskell text time transformers unordered-containers
@@ -104246,8 +104517,8 @@ self: {
     ({ mkDerivation, base, template-haskell }:
      mkDerivation {
        pname = "leancheck";
-       version = "0.5.0";
-       sha256 = "191b704dd7bb74e6ee23aecad3a9f267867908f5594b809755273950d6d516b8";
+       version = "0.6.0";
+       sha256 = "15651a9e1bb9b20e805a012be57082c5e2c1f59dde51c25f9fb88299150853ed";
        libraryHaskellDepends = [ base template-haskell ];
        testHaskellDepends = [ base template-haskell ];
        homepage = "https://github.com/rudymatela/leancheck#readme";
@@ -104541,6 +104812,41 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "lens_4_15_1" = callPackage
+    ({ mkDerivation, array, base, base-orphans, bifunctors, bytestring
+     , comonad, containers, contravariant, deepseq, directory
+     , distributive, doctest, exceptions, filepath, free
+     , generic-deriving, ghc-prim, hashable, hlint, HUnit
+     , kan-extensions, mtl, nats, parallel, profunctors, QuickCheck
+     , reflection, semigroupoids, semigroups, simple-reflect, tagged
+     , template-haskell, test-framework, test-framework-hunit
+     , test-framework-quickcheck2, test-framework-th, text, transformers
+     , transformers-compat, unordered-containers, vector, void
+     }:
+     mkDerivation {
+       pname = "lens";
+       version = "4.15.1";
+       sha256 = "5cfaa64cb1b9787193c2247a1ed1c248104ba5fadb91cec6432e648e41b1bea6";
+       libraryHaskellDepends = [
+         array base base-orphans bifunctors bytestring comonad containers
+         contravariant distributive exceptions filepath free ghc-prim
+         hashable kan-extensions mtl parallel profunctors reflection
+         semigroupoids semigroups tagged template-haskell text transformers
+         transformers-compat unordered-containers vector void
+       ];
+       testHaskellDepends = [
+         base bytestring containers deepseq directory doctest filepath
+         generic-deriving hlint HUnit mtl nats parallel QuickCheck
+         semigroups simple-reflect test-framework test-framework-hunit
+         test-framework-quickcheck2 test-framework-th text transformers
+         unordered-containers vector
+       ];
+       homepage = "http://github.com/ekmett/lens/";
+       description = "Lenses, Folds and Traversals";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "lens-action" = callPackage
     ({ mkDerivation, base, comonad, contravariant, directory, doctest
      , filepath, lens, mtl, profunctors, semigroupoids, semigroups
@@ -105525,12 +105831,12 @@ self: {
      }) {};
 
   "libroman" = callPackage
-    ({ mkDerivation, base, hspec, markdown-unlit, QuickCheck, split }:
+    ({ mkDerivation, base, hspec, QuickCheck, split }:
      mkDerivation {
        pname = "libroman";
-       version = "3.1.0";
-       sha256 = "8b083c38b589a229bd86f010038a103285f6073ce4955a6ec58087cbf86d3add";
-       libraryHaskellDepends = [ base markdown-unlit split ];
+       version = "3.1.1";
+       sha256 = "f1c3f44561c9478072578dca2729ee6b31cb29589024bb8a6f4483243639cf87";
+       libraryHaskellDepends = [ base split ];
        testHaskellDepends = [ base hspec QuickCheck ];
        homepage = "https://ahakki.xyz";
        description = "Use Roman Numerals as a Numeric Datatype (sort of)";
@@ -105648,8 +105954,8 @@ self: {
     ({ mkDerivation, base, c2hs, libvirt, syb, unix }:
      mkDerivation {
        pname = "libvirt-hs";
-       version = "0.2.0";
-       sha256 = "52549a02bb9c736eb55e89c5353da74397a981ce990f1cb32eea1f98c8bd26a8";
+       version = "0.2.1";
+       sha256 = "bdcdc7cc53ad2dfaa08513c163e72044d9bbd125afe0551fa0aa78ddfd5b740a";
        libraryHaskellDepends = [ base syb unix ];
        libraryPkgconfigDepends = [ libvirt ];
        libraryToolDepends = [ c2hs ];
@@ -107525,8 +107831,8 @@ self: {
     ({ mkDerivation, base, containers, monadLib, pretty }:
      mkDerivation {
        pname = "llvm-pretty";
-       version = "0.4.0.1";
-       sha256 = "637506a2356076fefbf7515baa4c19ef2828fc404ab3c0ae0f9b1b2d5f04a42b";
+       version = "0.5";
+       sha256 = "d38228d980ad1fc0b833cf5daa0e78ce981c102a6ad7cad16bed2761f98cbb19";
        libraryHaskellDepends = [ base containers monadLib pretty ];
        description = "A pretty printing library inspired by the llvm binding";
        license = stdenv.lib.licenses.bsd3;
@@ -107539,8 +107845,8 @@ self: {
      }:
      mkDerivation {
        pname = "llvm-pretty-bc-parser";
-       version = "0.2.1.0";
-       sha256 = "2d852be9dc0aa29d7a3c898486a201748c2f1a0276393a1f156e624eee108a8a";
+       version = "0.3.0.0";
+       sha256 = "7873abf8b3acbc679642f2f1c2d639db91c084a2a97546037f049735536dfb81";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -107615,6 +107921,29 @@ self: {
        license = stdenv.lib.licenses.bsd2;
      }) {inherit (pkgs) lmdb;};
 
+  "lmdb-high-level" = callPackage
+    ({ mkDerivation, base, bytestring, containers, directory, ghc-prim
+     , HUnit, lmdb, pipes, primitive, QuickCheck, random, test-framework
+     , test-framework-hunit, test-framework-quickcheck2, text
+     , transformers, vector
+     }:
+     mkDerivation {
+       pname = "lmdb-high-level";
+       version = "0.1";
+       sha256 = "cf066a0db4893cd056642d58c7c288c74dcd87dacfaac93a6d342a2b0084a10d";
+       libraryHaskellDepends = [
+         base bytestring ghc-prim lmdb pipes primitive text transformers
+         vector
+       ];
+       testHaskellDepends = [
+         base bytestring containers directory HUnit pipes QuickCheck random
+         test-framework test-framework-hunit test-framework-quickcheck2 text
+       ];
+       homepage = "https://github.com/andrewthad/lmdb-high-level";
+       description = "Higher level API for working with LMDB";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "lmonad" = callPackage
     ({ mkDerivation, base, containers, exceptions, HUnit, monad-control
      , transformers, transformers-base
@@ -108018,8 +108347,8 @@ self: {
      }:
      mkDerivation {
        pname = "logging-effect";
-       version = "1.0.1";
-       sha256 = "8a27b42451dbcda3faba5db20c275061f8133441b09b0138ac36037ff0108af1";
+       version = "1.1.0";
+       sha256 = "51275afa770efb4bef3bea13fb294eeb9f7b7ca8186879d49dfa4b2cdcfbdb48";
        libraryHaskellDepends = [
          async base exceptions free monad-control mtl stm stm-delay text
          time transformers transformers-base wl-pprint-text
@@ -108632,6 +108961,8 @@ self: {
        pname = "lrucaching";
        version = "0.3.0";
        sha256 = "7e699143604a50f597ba4b7877fecd04e6c23bcb303fac4831056966bd521a7f";
+       revision = "1";
+       editedCabalFile = "fc9c55f797b467e6ff5dc701de45e7480a8e60cb5e3aea0ceb458807c7a15aff";
        libraryHaskellDepends = [
          base base-compat deepseq hashable psqueues vector
        ];
@@ -110416,6 +110747,31 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "markdown_0_1_15" = callPackage
+    ({ mkDerivation, attoparsec, base, blaze-html, blaze-markup
+     , conduit, conduit-extra, containers, data-default, directory
+     , filepath, hspec, text, transformers, xml-conduit, xml-types
+     , xss-sanitize
+     }:
+     mkDerivation {
+       pname = "markdown";
+       version = "0.1.15";
+       sha256 = "5bf44c4a0df5a9c43dc7fcac86cbbd586c703e1a5f8ba6a77ea8f8207152e628";
+       libraryHaskellDepends = [
+         attoparsec base blaze-html blaze-markup conduit conduit-extra
+         containers data-default text transformers xml-conduit xml-types
+         xss-sanitize
+       ];
+       testHaskellDepends = [
+         base blaze-html conduit conduit-extra containers directory filepath
+         hspec text transformers
+       ];
+       homepage = "https://github.com/snoyberg/markdown";
+       description = "Convert Markdown to HTML, with XSS protection";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "markdown-kate" = callPackage
     ({ mkDerivation, attoparsec, attoparsec-conduit, base, blaze-html
      , conduit, containers, data-default, highlighting-kate, hspec
@@ -111450,15 +111806,17 @@ self: {
        license = stdenv.lib.licenses.bsd2;
      }) {};
 
-  "megaparsec_5_1_1" = callPackage
+  "megaparsec_5_1_2" = callPackage
     ({ mkDerivation, base, bytestring, containers, deepseq, exceptions
      , hspec, hspec-expectations, mtl, QuickCheck, scientific, text
      , transformers
      }:
      mkDerivation {
        pname = "megaparsec";
-       version = "5.1.1";
-       sha256 = "8c6d5aa6e90e56bed036d0a00e43e964bd204c0ea8da962594e8b1b9556b7aa2";
+       version = "5.1.2";
+       sha256 = "ecb943979f8078a0f6e3bf8db2232d91cb1224768aa8ea0b8fc577af24b36ccd";
+       revision = "1";
+       editedCabalFile = "5286fd0b0f2edd01ca06e4cc1f814eedf81365c8b7b36cf3023128f75fadbc54";
        libraryHaskellDepends = [
          base bytestring containers deepseq exceptions mtl QuickCheck
          scientific text transformers
@@ -113318,8 +113676,8 @@ self: {
     ({ mkDerivation, base, bytestring, cereal, network, transformers }:
      mkDerivation {
        pname = "modbus-tcp";
-       version = "0.2";
-       sha256 = "85bc2678704b0e573a4c4bc1672f76cdca1c9febd50dc9a40ffa6aa097361aeb";
+       version = "0.2.1";
+       sha256 = "b235be55c9efcb4796ba7bfd11e6592ecb0dbbbf814aff4ebe33314b0caf51b8";
        libraryHaskellDepends = [
          base bytestring cereal network transformers
        ];
@@ -113605,8 +113963,8 @@ self: {
      }:
      mkDerivation {
        pname = "mollie-api-haskell";
-       version = "0.1.0.1";
-       sha256 = "a23421f8c7a8c3ed21f8742a8ec5072c7381e4d3e65c3c4ebf30e5fa7e2f5a20";
+       version = "0.1.0.2";
+       sha256 = "2d4813f1e3eb4c4996f52012075f084d69bac4b3f52bc05bad8107718860e255";
        libraryHaskellDepends = [
          aeson base bytestring HsOpenSSL http-client http-client-openssl
          http-types mtl text time
@@ -113958,28 +114316,6 @@ self: {
      }:
      mkDerivation {
        pname = "monad-logger";
-       version = "0.3.19";
-       sha256 = "a7b74d8df0db08e3ab231cba649febac0599b4b6b6bbe03828914669d1b085f0";
-       libraryHaskellDepends = [
-         base blaze-builder bytestring conduit conduit-extra exceptions
-         fast-logger lifted-base monad-control monad-loops mtl resourcet stm
-         stm-chans template-haskell text transformers transformers-base
-         transformers-compat
-       ];
-       homepage = "https://github.com/kazu-yamamoto/logger";
-       description = "A class of monads which can log messages";
-       license = stdenv.lib.licenses.mit;
-     }) {};
-
-  "monad-logger_0_3_20" = callPackage
-    ({ mkDerivation, base, blaze-builder, bytestring, conduit
-     , conduit-extra, exceptions, fast-logger, lifted-base
-     , monad-control, monad-loops, mtl, resourcet, stm, stm-chans
-     , template-haskell, text, transformers, transformers-base
-     , transformers-compat
-     }:
-     mkDerivation {
-       pname = "monad-logger";
        version = "0.3.20";
        sha256 = "58be0b1e04d1cce4a40e9502448de8ae2c72eff98a6c173539653bacbb3c9fe9";
        libraryHaskellDepends = [
@@ -113991,7 +114327,6 @@ self: {
        homepage = "https://github.com/kazu-yamamoto/logger";
        description = "A class of monads which can log messages";
        license = stdenv.lib.licenses.mit;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "monad-logger-json" = callPackage
@@ -114903,19 +115238,19 @@ self: {
   "monky" = callPackage
     ({ mkDerivation, base, bytestring, cereal, composition, containers
      , directory, env-locale, formatting, mtl, netlink, network
-     , optparse-applicative, process, statvfs, stm, template-haskell
-     , text, time, transformers, unix
+     , optparse-applicative, process, pulseaudio, statvfs, stm
+     , template-haskell, text, time, transformers, unix
      }:
      mkDerivation {
        pname = "monky";
-       version = "2.0.1.0";
-       sha256 = "8cd4fd086f4c3719af8c57d668ac0c7eb89a946a306b87485c267225546ec288";
+       version = "2.1.0.0";
+       sha256 = "044ea050aa7be67209652fb1a8cca97ad017a2effcdd41432c959a1b840439d0";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
          base bytestring cereal composition containers directory env-locale
-         formatting mtl netlink network statvfs stm template-haskell text
-         time transformers unix
+         formatting mtl netlink network pulseaudio statvfs stm
+         template-haskell text time transformers unix
        ];
        executableHaskellDepends = [
          base containers directory mtl optparse-applicative process unix
@@ -115094,8 +115429,8 @@ self: {
      }:
      mkDerivation {
        pname = "monoidal-containers";
-       version = "0.3.0.0";
-       sha256 = "b9e2a70f92831aac6ac2216d79c319893514fce182439c40e5e33daf65499c55";
+       version = "0.3.0.1";
+       sha256 = "fa2a46695ae71aa24338960f06cd8fc440f295e1854ef9f2c5ffdc3e8b5da49c";
        libraryHaskellDepends = [
          base containers deepseq hashable lens newtype unordered-containers
        ];
@@ -118547,8 +118882,8 @@ self: {
      }:
      mkDerivation {
        pname = "netwire-input-javascript";
-       version = "0.0.1";
-       sha256 = "1a42871c804d946290aa3139febe82394a35ae04fd3cc3fa958152e5647085a3";
+       version = "0.0.2";
+       sha256 = "fa967e5c07dc504e38fd85facaa996b32021b4e51d33bdc3a423b4424eb672bf";
        libraryHaskellDepends = [
          base containers ghcjs-base netwire netwire-input transformers
        ];
@@ -119680,12 +120015,14 @@ self: {
      }) {};
 
   "ngx-export" = callPackage
-    ({ mkDerivation, base, bytestring, template-haskell }:
+    ({ mkDerivation, async, base, bytestring, template-haskell, unix }:
      mkDerivation {
        pname = "ngx-export";
-       version = "0.1.1.0";
-       sha256 = "bd5730abe51fa7ffab62f8d9bf52a3a0394945358f163606b23a9f8691cb3192";
-       libraryHaskellDepends = [ base bytestring template-haskell ];
+       version = "0.2.0.0";
+       sha256 = "fce59fdf3b552509a291d50c485a5847a28cfd6f6199158c2621a13f07ddd26c";
+       libraryHaskellDepends = [
+         async base bytestring template-haskell unix
+       ];
        homepage = "http://github.com/lyokha/nginx-haskell-module";
        description = "Helper module for Nginx haskell module";
        license = stdenv.lib.licenses.bsd3;
@@ -120920,6 +121257,23 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "nvvm" = callPackage
+    ({ mkDerivation, base, bytestring, c2hs, Cabal, cuda, directory
+     , filepath, template-haskell
+     }:
+     mkDerivation {
+       pname = "nvvm";
+       version = "0.7.5.0";
+       sha256 = "ccd9efb4f1f97318e98d3ad363810d2fd4780992c37fc92d7e526b3af8f59c85";
+       setupHaskellDepends = [ base Cabal directory filepath ];
+       libraryHaskellDepends = [ base bytestring cuda template-haskell ];
+       libraryToolDepends = [ c2hs ];
+       homepage = "https://github.com/tmcdonell/nvvm";
+       description = "FFI bindings to NVVM";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "nyan" = callPackage
     ({ mkDerivation, base, bytestring, mtl, ncurses, text }:
      mkDerivation {
@@ -124606,6 +124960,22 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "parsec-free" = callPackage
+    ({ mkDerivation, base, bytestring, containers, free, lens, mtl
+     , parsec, text, transformers
+     }:
+     mkDerivation {
+       pname = "parsec-free";
+       version = "3.1.11.6";
+       sha256 = "10e0af2e1c16447494649442bd5fea121e51d0637d4a92b4e215ad076f076c09";
+       libraryHaskellDepends = [
+         base bytestring containers free lens mtl parsec text transformers
+       ];
+       homepage = "https://github.com/jwiegley/parsec-free";
+       description = "Parsec API encoded as a deeply-embedded DSL, for debugging and analysis";
+       license = stdenv.lib.licenses.mit;
+     }) {};
+
   "parsec-numbers" = callPackage
     ({ mkDerivation, base, parsec }:
      mkDerivation {
@@ -124953,8 +125323,8 @@ self: {
     ({ mkDerivation, base, template-haskell }:
      mkDerivation {
        pname = "partial-isomorphisms";
-       version = "0.2";
-       sha256 = "fd92b4a0e8346802e02423344fff6ce1817f14de0f0950f4b839c5735be8b472";
+       version = "0.2.2";
+       sha256 = "f6ee216db7be14d497c428562c83423a5d2579c86b70b822996bde28c196569c";
        libraryHaskellDepends = [ base template-haskell ];
        homepage = "http://www.informatik.uni-marburg.de/~rendel/unparse";
        description = "Partial isomorphisms";
@@ -126077,8 +126447,8 @@ self: {
      }:
      mkDerivation {
        pname = "period";
-       version = "0.1.0.3";
-       sha256 = "d5f9c9e798341990e186f98330244f22a875e87a600098666f81438b69f15ab3";
+       version = "0.1.0.4";
+       sha256 = "f1f0d37ee4e6e31fc448e6f552105d20c3a9359f8af8780d52eeb980d313715c";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -127043,8 +127413,8 @@ self: {
     ({ mkDerivation, base, bytestring, text }:
      mkDerivation {
        pname = "phaser";
-       version = "0.1.0.0";
-       sha256 = "6cb8dfd56d6d464f63962f5799485aef05c97da0868d21ffe0ce95e323b8a323";
+       version = "0.1.1.0";
+       sha256 = "54ecb42b832a83dba458c0974c07ce956e274d579b72aa7ba3e85fee039b063e";
        libraryHaskellDepends = [ base bytestring text ];
        homepage = "https://github.com/quickdudley/phaser";
        description = "Incremental multiple pass parser library";
@@ -127117,8 +127487,8 @@ self: {
      }:
      mkDerivation {
        pname = "phoityne-vscode";
-       version = "0.0.9.0";
-       sha256 = "6161c3b669536f6701aa1e5a03745ab5d2aaf06ce45e463282a027a177f7cde7";
+       version = "0.0.10.0";
+       sha256 = "6c002069fa4416c1767affe099102a031e495e74f7ff904ed3d14eef74335916";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -127127,7 +127497,7 @@ self: {
          HStringTemplate MissingH mtl parsec process resourcet safe split
          text transformers
        ];
-       homepage = "https://sites.google.com/site/phoityne/vscode";
+       homepage = "https://github.com/phoityne/phoityne-vscode";
        description = "ghci debug viewer on Visual Studio Code";
        license = stdenv.lib.licenses.bsd3;
      }) {};
@@ -127369,6 +127739,21 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "picedit" = callPackage
+    ({ mkDerivation, base, cli, hmatrix, JuicyPixels, vector }:
+     mkDerivation {
+       pname = "picedit";
+       version = "0.1.1.0";
+       sha256 = "4219089f3375925f413111d05ce9087b1f4aca01f43d64ddd3fc2931c52d7740";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [ base hmatrix JuicyPixels vector ];
+       executableHaskellDepends = [ base cli ];
+       homepage = "https://github.com/mdibaiee/picedit#readme";
+       description = "simple image manipulation functions";
+       license = stdenv.lib.licenses.gpl3;
+     }) {};
+
   "picologic" = callPackage
     ({ mkDerivation, base, containers, mtl, parsec, picosat, pretty
      , QuickCheck
@@ -128513,8 +128898,8 @@ self: {
      }:
      mkDerivation {
        pname = "pipes-zlib";
-       version = "0.4.4";
-       sha256 = "39de93960e739e386990044737de0734a1f4d9c925ca7f085a74dbfb127ebd64";
+       version = "0.4.4.1";
+       sha256 = "8fac1e12a651bfbbddf0395401d712bcceda156f5aad1a263b650200c682bde9";
        libraryHaskellDepends = [
          base bytestring pipes streaming-commons transformers
        ];
@@ -128894,8 +129279,8 @@ self: {
      }:
      mkDerivation {
        pname = "plot-gtk-ui";
-       version = "0.3.0.1";
-       sha256 = "41c788c5093333bcc9b320bd21dc3e43f8677d9f5d94a66b106fc303649a5b79";
+       version = "0.3.0.2";
+       sha256 = "e7e89440798058ef082dc268795a482b9462d21ff08336bb8517b6830c0518da";
        libraryHaskellDepends = [
          base cairo colour fixed-vector gtk hmatrix plot text vector
        ];
@@ -129646,6 +130031,30 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "pomohoro" = callPackage
+    ({ mkDerivation, base, configurator, dbus, directory, fdo-notify
+     , hdaemonize, hspec, network, optparse-applicative, protolude, text
+     , time
+     }:
+     mkDerivation {
+       pname = "pomohoro";
+       version = "0.1.2.4";
+       sha256 = "b63883fb9e820b7580a57bee84e3353a844964785e1da82406cb5643451e4a19";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         base configurator dbus directory fdo-notify network protolude text
+         time
+       ];
+       executableHaskellDepends = [
+         base hdaemonize optparse-applicative protolude text time
+       ];
+       testHaskellDepends = [ base hspec protolude ];
+       homepage = "https://github.com/kqr/pomohoro#readme";
+       description = "Initial project template from stack";
+       license = stdenv.lib.licenses.isc;
+     }) {};
+
   "ponder" = callPackage
     ({ mkDerivation, base, mtl }:
      mkDerivation {
@@ -130142,34 +130551,6 @@ self: {
      }:
      mkDerivation {
        pname = "postgresql-binary";
-       version = "0.9.1";
-       sha256 = "3b3bc4ecdc145e18e88775fbc0989f5bc5c94e58b6603cccfc024c10a423a109";
-       libraryHaskellDepends = [
-         aeson base base-prelude binary-parser bytestring foldl loch-th
-         placeholders scientific text time transformers uuid vector
-       ];
-       testHaskellDepends = [
-         aeson base bytestring conversion conversion-bytestring
-         conversion-text either json-ast loch-th placeholders
-         postgresql-libpq QuickCheck quickcheck-instances rebase scientific
-         tasty tasty-hunit tasty-quickcheck tasty-smallcheck text time
-         transformers uuid vector
-       ];
-       homepage = "https://github.com/nikita-volkov/postgresql-binary";
-       description = "Encoders and decoders for the PostgreSQL's binary format";
-       license = stdenv.lib.licenses.mit;
-     }) {};
-
-  "postgresql-binary_0_9_1_1" = callPackage
-    ({ mkDerivation, aeson, base, base-prelude, binary-parser
-     , bytestring, conversion, conversion-bytestring, conversion-text
-     , either, foldl, json-ast, loch-th, placeholders, postgresql-libpq
-     , QuickCheck, quickcheck-instances, rebase, scientific, tasty
-     , tasty-hunit, tasty-quickcheck, tasty-smallcheck, text, time
-     , transformers, uuid, vector
-     }:
-     mkDerivation {
-       pname = "postgresql-binary";
        version = "0.9.1.1";
        sha256 = "e9aeb3abc2e191ecde5f6112221fe0957364c72779dbcbe8eba6bc5c830ddac2";
        libraryHaskellDepends = [
@@ -130186,7 +130567,6 @@ self: {
        homepage = "https://github.com/nikita-volkov/postgresql-binary";
        description = "Encoders and decoders for the PostgreSQL's binary format";
        license = stdenv.lib.licenses.mit;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "postgresql-config" = callPackage
@@ -132523,8 +132903,8 @@ self: {
      }:
      mkDerivation {
        pname = "proto-lens";
-       version = "0.1.0.3";
-       sha256 = "86657eec7852538ca287fbddf2e33fb14be1153b87d28567cb92c8a31b1ac8ab";
+       version = "0.1.0.4";
+       sha256 = "2d4d1fc8fea2aae5bec2da31f64cac3a9ed11608628fde9f549b46476d51000e";
        libraryHaskellDepends = [
          attoparsec base bytestring containers data-default-class
          lens-family parsec pretty text transformers void
@@ -132559,8 +132939,8 @@ self: {
      }:
      mkDerivation {
        pname = "proto-lens-combinators";
-       version = "0.1.0.2";
-       sha256 = "6ca43460e627f46944cf9b66e831f1e6997ef24fe5a7568a0e665987f1ecc077";
+       version = "0.1.0.4";
+       sha256 = "3d153caff241c45097d2acac97176d2dc54af626b4895678f51069ce7ceb66fb";
        libraryHaskellDepends = [
          base data-default-class lens-family proto-lens proto-lens-protoc
          transformers
@@ -132597,8 +132977,8 @@ self: {
      }:
      mkDerivation {
        pname = "proto-lens-protoc";
-       version = "0.1.0.3";
-       sha256 = "d1d84c93a62e00338e32224d3a1fbc448a8df4084aa42e1eb12a5f113cbd1a40";
+       version = "0.1.0.4";
+       sha256 = "bb5f04069ae2fd5d7a429523434be7c1c5e2a279a49394bf27d4a212b35d3e62";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -132770,6 +133150,24 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "protolude_0_1_8" = callPackage
+    ({ mkDerivation, async, base, bytestring, containers, deepseq
+     , ghc-prim, mtl, safe, stm, text, transformers
+     }:
+     mkDerivation {
+       pname = "protolude";
+       version = "0.1.8";
+       sha256 = "014d3a551d4e0929df615ff2df7e0215d67e34af8f03928e98bbaffec98860bc";
+       libraryHaskellDepends = [
+         async base bytestring containers deepseq ghc-prim mtl safe stm text
+         transformers
+       ];
+       homepage = "https://github.com/sdiehl/protolude";
+       description = "A sensible set of defaults for writing custom Preludes";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "proton-haskell" = callPackage
     ({ mkDerivation, base, containers, directory, filepath, HUnit
      , test-framework, test-framework-hunit
@@ -136253,17 +136651,17 @@ self: {
     ({ mkDerivation, alsa-core, alsa-seq, base, containers
      , data-accessor, data-accessor-transformers, event-list
      , extensible-exceptions, midi, midi-alsa, non-negative, random
-     , reactive-banana, transformers, utility-ht
+     , reactive-banana, reactive-midyim, transformers, utility-ht
      }:
      mkDerivation {
        pname = "reactive-balsa";
-       version = "0.1.1";
-       sha256 = "7664870dd5ba4c3345e79dc06dcec64b512a13fa0c8fa2f4258b77bf652e6692";
+       version = "0.2.0.1";
+       sha256 = "42ea83a158dee24bbe3a031d4222e195cf0b1844cba5b63c82173b261bfc5a71";
        libraryHaskellDepends = [
          alsa-core alsa-seq base containers data-accessor
          data-accessor-transformers event-list extensible-exceptions midi
-         midi-alsa non-negative random reactive-banana transformers
-         utility-ht
+         midi-alsa non-negative random reactive-banana reactive-midyim
+         transformers utility-ht
        ];
        homepage = "http://www.haskell.org/haskellwiki/Reactive-balsa";
        description = "Programmatically edit MIDI events via ALSA and reactive-banana";
@@ -136410,6 +136808,44 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "reactive-jack" = callPackage
+    ({ mkDerivation, base, containers, data-accessor, event-list
+     , explicit-exception, extensible-exceptions, jack, midi
+     , non-negative, random, reactive-banana, reactive-midyim
+     , transformers, utility-ht
+     }:
+     mkDerivation {
+       pname = "reactive-jack";
+       version = "0.2.0.1";
+       sha256 = "8facc607ec889c7a871cd61975d7e4e0760b0064583ad1a0da938fe4fcd702cd";
+       libraryHaskellDepends = [
+         base containers data-accessor event-list explicit-exception
+         extensible-exceptions jack midi non-negative random reactive-banana
+         reactive-midyim transformers utility-ht
+       ];
+       homepage = "http://www.haskell.org/haskellwiki/Reactive-balsa";
+       description = "Process MIDI events via reactive-banana and JACK";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
+  "reactive-midyim" = callPackage
+    ({ mkDerivation, base, containers, data-accessor
+     , data-accessor-transformers, event-list, midi, non-negative
+     , random, reactive-banana, transformers, utility-ht
+     }:
+     mkDerivation {
+       pname = "reactive-midyim";
+       version = "0.2.1";
+       sha256 = "3d8180f416b2efd948d067d9c5c1cdcb2c8b6933093435e55e02a7e63425669c";
+       libraryHaskellDepends = [
+         base containers data-accessor data-accessor-transformers event-list
+         midi non-negative random reactive-banana transformers utility-ht
+       ];
+       homepage = "http://www.haskell.org/haskellwiki/Reactive-balsa";
+       description = "Process MIDI events via reactive-banana";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "reactive-thread" = callPackage
     ({ mkDerivation, base, monad-parallel, SDL, stm, transformers }:
      mkDerivation {
@@ -137532,8 +137968,8 @@ self: {
     ({ mkDerivation, base, hsp, hsx2hs, reform, text }:
      mkDerivation {
        pname = "reform-hsp";
-       version = "0.2.7";
-       sha256 = "20ce1d81a4b2db93da55223037e0c2ee7841d5844fab9c67e4158bd9a70ee574";
+       version = "0.2.7.1";
+       sha256 = "48edd2a1322bacfb2d8574222c194cfa4ffdce135f4dff851d9d5e6fe3008d20";
        libraryHaskellDepends = [ base hsp hsx2hs reform text ];
        homepage = "http://www.happstack.com/";
        description = "Add support for using HSP with Reform";
@@ -137916,20 +138352,23 @@ self: {
      }) {};
 
   "regexchar" = callPackage
-    ({ mkDerivation, array, base, Cabal, containers, parallel, parsec
-     , QuickCheck, regex-base, regex-posix, regexdot, toolshed
+    ({ mkDerivation, array, base, Cabal, containers, data-default
+     , parallel, parsec, QuickCheck, regex-base, regex-posix, regexdot
+     , toolshed
      }:
      mkDerivation {
        pname = "regexchar";
-       version = "0.9.0.13";
-       sha256 = "6ad4cfa40156d9a26b8a3c023feb757ad3be217a9f64c1ab40a984118959b79b";
+       version = "0.9.0.14";
+       sha256 = "7de1d64126bc9205b569c8cda5b06b0bbebc1bed6a47c4bf8a84c24fc8255242";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
-         array base containers parsec regex-base regexdot toolshed
+         array base containers data-default parsec regex-base regexdot
+         toolshed
        ];
        executableHaskellDepends = [
-         base Cabal parallel regex-base regex-posix regexdot toolshed
+         base Cabal data-default parallel regex-base regex-posix regexdot
+         toolshed
        ];
        testHaskellDepends = [ base QuickCheck regexdot toolshed ];
        homepage = "http://functionalley.eu/RegExChar/regExChar.html";
@@ -137939,12 +138378,16 @@ self: {
      }) {};
 
   "regexdot" = callPackage
-    ({ mkDerivation, base, deepseq, parallel, parsec, toolshed }:
+    ({ mkDerivation, base, data-default, deepseq, parallel, parsec
+     , toolshed
+     }:
      mkDerivation {
        pname = "regexdot";
-       version = "0.11.1.2";
-       sha256 = "c8f0ce31ae36d1f181a9c5a863967397b6431ec2436442869670468b039ebf9c";
-       libraryHaskellDepends = [ base deepseq parallel parsec toolshed ];
+       version = "0.12.0.1";
+       sha256 = "b96d630861eb7028b560a43e4b5e89f8ae9e65cd6c193a7762d5d3b95ea66064";
+       libraryHaskellDepends = [
+         base data-default deepseq parallel parsec toolshed
+       ];
        homepage = "http://functionalley.eu/RegExDot/regExDot.html";
        description = "A polymorphic, POSIX, extended regex-engine";
        license = "GPL";
@@ -139446,8 +139889,8 @@ self: {
        pname = "rest-core";
        version = "0.39";
        sha256 = "d760d0547fc1a99cd949dde08b7945fb93af24f4e55d45ecf410c352d5005404";
-       revision = "1";
-       editedCabalFile = "49f387b0ae7279cc04bbb7975b729df487a3670e1dab896239359f5073f5f158";
+       revision = "2";
+       editedCabalFile = "62fec3ffbc0dfaf26d82ad0689dfe74384f2e565ec0c2bff897cd4c71be74583";
        libraryHaskellDepends = [
          aeson aeson-utils base base-compat bytestring case-insensitive
          errors fclabels hxt hxt-pickle-utils json-schema mtl mtl-compat
@@ -139527,6 +139970,8 @@ self: {
        pname = "rest-gen";
        version = "0.20.0.0";
        sha256 = "81a9486136f91773371858f9d3e248b80458e7d55aab11f17cc158c3ce68d542";
+       revision = "1";
+       editedCabalFile = "32caced8ad0a5273fc9c13ae65f75a37b790ad430d3923febf567616f5eb8e95";
        libraryHaskellDepends = [
          aeson base base-compat blaze-html Cabal code-builder directory
          fclabels filepath hashable haskell-src-exts HStringTemplate hxt
@@ -139691,19 +140136,6 @@ self: {
     ({ mkDerivation, base, bifunctors, keys, mtl, transformers }:
      mkDerivation {
        pname = "result";
-       version = "0.2.5.1";
-       sha256 = "090a6c4e797ff408df1fcbd55877f1e94749beb3b65dc4260e75ef9c3a576b18";
-       libraryHaskellDepends = [ base bifunctors keys mtl transformers ];
-       testHaskellDepends = [ base ];
-       homepage = "https://github.com/srijs/haskell-result";
-       description = "Encode success or at least one error";
-       license = stdenv.lib.licenses.mit;
-     }) {};
-
-  "result_0_2_6_0" = callPackage
-    ({ mkDerivation, base, bifunctors, keys, mtl, transformers }:
-     mkDerivation {
-       pname = "result";
        version = "0.2.6.0";
        sha256 = "f526d97cdab851f24e215e346f6d54d3a504a6ac5d9264f580c4f72d606178c5";
        libraryHaskellDepends = [ base bifunctors keys mtl transformers ];
@@ -139711,7 +140143,6 @@ self: {
        homepage = "https://github.com/srijs/haskell-result";
        description = "Encode success or at least one error";
        license = stdenv.lib.licenses.mit;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "resumable-exceptions" = callPackage
@@ -144449,8 +144880,8 @@ self: {
      }:
      mkDerivation {
        pname = "separated";
-       version = "0.1.1";
-       sha256 = "45387b37801c72a4ac0d8e77aac542df74e9f8181c15e65e16e14887ea52c567";
+       version = "0.1.2";
+       sha256 = "955cd8d5a41804dd32918ffdd3175d16c9274a120f7beaa7eef871b8af590443";
        libraryHaskellDepends = [
          base bifunctors lens papa semigroupoids semigroups
        ];
@@ -144814,7 +145245,7 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "servant_0_9" = callPackage
+  "servant_0_9_0_1" = callPackage
     ({ mkDerivation, aeson, attoparsec, base, base-compat, bytestring
      , case-insensitive, directory, doctest, filemanip, filepath, hspec
      , http-api-data, http-media, http-types, mmorph, mtl, network-uri
@@ -144823,8 +145254,8 @@ self: {
      }:
      mkDerivation {
        pname = "servant";
-       version = "0.9";
-       sha256 = "ad744b7b1f832831c01aab4afcc445df02046a68114a4bb40a50f2d34008011d";
+       version = "0.9.0.1";
+       sha256 = "997fa97c5e84f6a16ff7ec3390510ae8d83bca4d7680f3427060f6bad7daa34e";
        libraryHaskellDepends = [
          aeson attoparsec base base-compat bytestring case-insensitive
          http-api-data http-media http-types mmorph mtl network-uri
@@ -144891,6 +145322,42 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "servant-auth" = callPackage
+    ({ mkDerivation, base, doctest, Glob, hspec, QuickCheck, yaml }:
+     mkDerivation {
+       pname = "servant-auth";
+       version = "0.2.0.0";
+       sha256 = "5743a4ac6da19e77c13d0ce02e95eff196932f789ae1bf73a711a1b2f0ed545c";
+       libraryHaskellDepends = [ base ];
+       testHaskellDepends = [ base doctest Glob hspec QuickCheck yaml ];
+       homepage = "http://github.com/plow-technologies/servant-auth#readme";
+       description = "Authentication combinators for servant";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
+  "servant-auth-client" = callPackage
+    ({ mkDerivation, aeson, base, bytestring, doctest, Glob, hspec
+     , http-client, http-types, jose, QuickCheck, servant, servant-auth
+     , servant-auth-server, servant-client, servant-server, text, time
+     , transformers, wai, warp, yaml
+     }:
+     mkDerivation {
+       pname = "servant-auth-client";
+       version = "0.2.0.0";
+       sha256 = "276fe75aefe7686729883186125a7931ed07a8a593fb59aeea1a71b8461a46f2";
+       libraryHaskellDepends = [
+         base bytestring servant servant-auth servant-client text
+       ];
+       testHaskellDepends = [
+         aeson base bytestring doctest Glob hspec http-client http-types
+         jose QuickCheck servant servant-auth servant-auth-server
+         servant-client servant-server text time transformers wai warp yaml
+       ];
+       homepage = "http://github.com/plow-technologies/servant-auth#readme";
+       description = "servant-client/servant-auth compatibility";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "servant-auth-cookie" = callPackage
     ({ mkDerivation, base, base64-bytestring, blaze-builder, blaze-html
      , blaze-markup, bytestring, cereal, cookie, cryptonite
@@ -144949,6 +145416,26 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "servant-auth-docs" = callPackage
+    ({ mkDerivation, base, doctest, Glob, hspec, lens, QuickCheck
+     , servant, servant-auth, servant-docs, text, yaml
+     }:
+     mkDerivation {
+       pname = "servant-auth-docs";
+       version = "0.2.0.0";
+       sha256 = "8a4c47b9804b1d9d60304247d66315ae3d789597d979570e4783a161bc84ced9";
+       libraryHaskellDepends = [
+         base lens servant servant-auth servant-docs text
+       ];
+       testHaskellDepends = [
+         base doctest Glob hspec lens QuickCheck servant servant-auth
+         servant-docs text yaml
+       ];
+       homepage = "http://github.com/plow-technologies/servant-auth#readme";
+       description = "servant-docs/servant-auth compatibility";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "servant-auth-hmac" = callPackage
     ({ mkDerivation, aeson, attoparsec, base, base64-bytestring
      , blaze-html, blaze-markup, bytestring, case-insensitive, cereal
@@ -144985,6 +145472,44 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "servant-auth-server" = callPackage
+    ({ mkDerivation, aeson, base, base64-bytestring, blaze-builder
+     , bytestring, case-insensitive, cookie, crypto-api
+     , data-default-class, entropy, hspec, http-api-data, http-client
+     , http-types, jose, lens, lens-aeson, markdown-unlit, monad-time
+     , mtl, QuickCheck, servant-auth, servant-server, text, time
+     , transformers, unordered-containers, wai, warp, wreq
+     }:
+     mkDerivation {
+       pname = "servant-auth-server";
+       version = "0.2.0.0";
+       sha256 = "e021d5fc4983eddd145fcb95e7f317534b7742fdf164b43d6735cbfe1412aa61";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         aeson base base64-bytestring blaze-builder bytestring
+         case-insensitive cookie crypto-api data-default-class entropy
+         http-api-data jose lens monad-time mtl servant-auth servant-server
+         text time unordered-containers wai
+       ];
+       executableHaskellDepends = [
+         aeson base base64-bytestring blaze-builder bytestring
+         case-insensitive cookie crypto-api data-default-class entropy
+         http-api-data jose lens markdown-unlit monad-time mtl servant-auth
+         servant-server text time transformers unordered-containers wai warp
+       ];
+       testHaskellDepends = [
+         aeson base base64-bytestring blaze-builder bytestring
+         case-insensitive cookie crypto-api data-default-class entropy hspec
+         http-api-data http-client http-types jose lens lens-aeson
+         monad-time mtl QuickCheck servant-auth servant-server text time
+         unordered-containers wai warp wreq
+       ];
+       homepage = "http://github.com/plow-technologies/servant-auth#readme";
+       description = "servant-server/servant-auth compatibility";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "servant-auth-token" = callPackage
     ({ mkDerivation, aeson-injector, base, bytestring, containers, mtl
      , persistent, persistent-postgresql, persistent-template
@@ -145080,7 +145605,7 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "servant-client_0_9" = callPackage
+  "servant-client_0_9_0_1" = callPackage
     ({ mkDerivation, aeson, attoparsec, base, base64-bytestring
      , bytestring, deepseq, exceptions, hspec, http-api-data
      , http-client, http-client-tls, http-media, http-types, HUnit, mtl
@@ -145090,8 +145615,8 @@ self: {
      }:
      mkDerivation {
        pname = "servant-client";
-       version = "0.9";
-       sha256 = "4a87218a164fef1b887b4978f03dda7fb24fcf9570a691893777bd3f3ba11b43";
+       version = "0.9.0.1";
+       sha256 = "3d962e54309bf67bea62178873d5840874bc78f58149b9c6c6d9cb6e5a8563e8";
        libraryHaskellDepends = [
          aeson attoparsec base base64-bytestring bytestring exceptions
          http-api-data http-client http-client-tls http-media http-types mtl
@@ -145160,7 +145685,7 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
-  "servant-docs_0_9" = callPackage
+  "servant-docs_0_9_0_1" = callPackage
     ({ mkDerivation, aeson, aeson-pretty, base, bytestring
      , case-insensitive, control-monad-omega, hashable, hspec
      , http-media, http-types, lens, servant, string-conversions, text
@@ -145168,8 +145693,8 @@ self: {
      }:
      mkDerivation {
        pname = "servant-docs";
-       version = "0.9";
-       sha256 = "4ecb64260c6028b344dab69ea47a8cc25cb76e65734220bb543bb422b9d926a8";
+       version = "0.9.0.1";
+       sha256 = "a93955e71706421dcd82a6f7aafb0d599cd736c09b065bd4cad26159c6aac54e";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -145269,12 +145794,12 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "servant-foreign_0_9" = callPackage
+  "servant-foreign_0_9_0_1" = callPackage
     ({ mkDerivation, base, hspec, http-types, lens, servant, text }:
      mkDerivation {
        pname = "servant-foreign";
-       version = "0.9";
-       sha256 = "80a576f018ee7ad0520a6c91bf814b978920d217c50da7e90139008384eec1c8";
+       version = "0.9.0.1";
+       sha256 = "133429124fa786185b2511150cf8b50779b1c23d41cd3d624877f1d40757c8a5";
        libraryHaskellDepends = [ base http-types lens servant text ];
        testHaskellDepends = [ base hspec ];
        description = "Helpers for generating clients for servant APIs in any programming language";
@@ -145403,6 +145928,8 @@ self: {
        pname = "servant-js";
        version = "0.9";
        sha256 = "7a4b5055029c327f6bb90b8283a655ab0f3cc2da426ee94ec1b5d8d4eade6c34";
+       revision = "1";
+       editedCabalFile = "5d19fb0f6529051622c12e8e55fa32123f36a5d1b45a229a822e2ea7c409df1b";
        libraryHaskellDepends = [
          base base-compat charset lens servant servant-foreign text
        ];
@@ -145437,8 +145964,8 @@ self: {
      }:
      mkDerivation {
        pname = "servant-matrix-param";
-       version = "0.2";
-       sha256 = "22e8bc5a2109066c26ec2bca18bd349509cfe8cd35ff7507bd6f2536f9544bd0";
+       version = "0.3";
+       sha256 = "8b74bc16a7948862e509dc5692989de8e471be4b8933f4e2152a9d4b575c2997";
        libraryHaskellDepends = [ base servant ];
        testHaskellDepends = [
          aeson base bytestring containers doctest hspec http-types servant
@@ -145456,10 +145983,10 @@ self: {
      }:
      mkDerivation {
        pname = "servant-mock";
-       version = "0.8.1";
-       sha256 = "eb4a6a488ca70c2448b61c6ca373eaf97f4399c75d4e51ccefff502a0f6ba4fb";
+       version = "0.8.1.1";
+       sha256 = "d7371a5899460bc6e86b003afbbf92f4609bd94299f0bbc89d14cd9212d7197d";
        revision = "1";
-       editedCabalFile = "e32244bba9aa6868c877a4853e420ecbe6effa2e245ecc0ffd4935efd270d751";
+       editedCabalFile = "2041a7472f709520506daed1a5bec13dd527851becddd34ae7c7dbf59725db4d";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -145580,21 +146107,21 @@ self: {
 
   "servant-quickcheck" = callPackage
     ({ mkDerivation, aeson, base, base-compat, bytestring
-     , case-insensitive, data-default-class, hspec, hspec-core
+     , case-insensitive, clock, data-default-class, hspec, hspec-core
      , http-client, http-media, http-types, mtl, pretty, process
      , QuickCheck, quickcheck-io, servant, servant-client
-     , servant-server, split, string-conversions, temporary, text
+     , servant-server, split, string-conversions, temporary, text, time
      , transformers, warp
      }:
      mkDerivation {
        pname = "servant-quickcheck";
-       version = "0.0.2.0";
-       sha256 = "27ea056c0193268a987e7a07700afe754d5bf2027a71244988c2b125b308a055";
+       version = "0.0.2.1";
+       sha256 = "4ac4467627724f118c1d735724b961a5b69d79f83b67d94b6cb60acef950e84d";
        libraryHaskellDepends = [
-         aeson base base-compat bytestring case-insensitive
+         aeson base base-compat bytestring case-insensitive clock
          data-default-class hspec http-client http-media http-types mtl
          pretty process QuickCheck servant servant-client servant-server
-         split string-conversions temporary text warp
+         split string-conversions temporary text time warp
        ];
        testHaskellDepends = [
          base base-compat hspec hspec-core http-client QuickCheck
@@ -145695,7 +146222,7 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
-  "servant-server_0_9" = callPackage
+  "servant-server_0_9_0_1" = callPackage
     ({ mkDerivation, aeson, attoparsec, base, base-compat
      , base64-bytestring, bytestring, containers, directory, doctest
      , exceptions, filemanip, filepath, hspec, hspec-wai, http-api-data
@@ -145706,8 +146233,8 @@ self: {
      }:
      mkDerivation {
        pname = "servant-server";
-       version = "0.9";
-       sha256 = "f8345134d641fd48612c6f9fca432ee7210e85ad3087e1b641d6967f5beeefac";
+       version = "0.9.0.1";
+       sha256 = "c353df6cdfe2d97648ea3e912dfa61a62d567b9b7431a037bab2b08ccdfade70";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -145831,8 +146358,8 @@ self: {
        pname = "servant-swagger";
        version = "1.1.2";
        sha256 = "1aa55cdf092189fed02e5d5bddf052eafafd23df54e0671ec32adc5ac4c8c47e";
-       revision = "1";
-       editedCabalFile = "d15b7ec23a1f97339f7ee7eda84370e9300a5f838a14e7b23ada1544635a14f5";
+       revision = "2";
+       editedCabalFile = "1b4ce7e527556edbd2f07fe420fe82a482d7d2b6ce264606c2e34f0e0270c081";
        libraryHaskellDepends = [
          aeson base bytestring hspec http-media insert-ordered-containers
          lens QuickCheck servant swagger2 text unordered-containers
@@ -145858,8 +146385,8 @@ self: {
        pname = "servant-swagger-ui";
        version = "0.2.0.2.1.5";
        sha256 = "57fa0b9d8a46482051f3e2bcab7c513adec07450b3fb6bb00281758f99922d57";
-       revision = "1";
-       editedCabalFile = "e1867331a9a65e6a0cd1da55f2f4f2855b90d9a5a4eafc470afc8a8429338ffe";
+       revision = "2";
+       editedCabalFile = "cd0f97ba669671dd13af499483c4e0262e7fd032a50e97396dc56bec8256c869";
        libraryHaskellDepends = [
          base blaze-markup bytestring directory file-embed filepath
          http-media servant servant-blaze servant-server servant-swagger
@@ -147200,34 +147727,6 @@ self: {
      }:
      mkDerivation {
        pname = "shelly";
-       version = "1.6.8";
-       sha256 = "d3d628d0ea5f147086975bd2d26d7eb2321405cadd98ff1c7f8e6bb88abce12d";
-       libraryHaskellDepends = [
-         async base bytestring containers directory enclosed-exceptions
-         exceptions lifted-async lifted-base monad-control mtl process
-         system-fileio system-filepath text time transformers
-         transformers-base unix-compat
-       ];
-       testHaskellDepends = [
-         async base bytestring containers directory enclosed-exceptions
-         exceptions hspec HUnit lifted-async lifted-base monad-control mtl
-         process system-fileio system-filepath text time transformers
-         transformers-base unix-compat
-       ];
-       homepage = "https://github.com/yesodweb/Shelly.hs";
-       description = "shell-like (systems) programming in Haskell";
-       license = stdenv.lib.licenses.bsd3;
-     }) {};
-
-  "shelly_1_6_8_1" = callPackage
-    ({ mkDerivation, async, base, bytestring, containers, directory
-     , enclosed-exceptions, exceptions, hspec, HUnit, lifted-async
-     , lifted-base, monad-control, mtl, process, system-fileio
-     , system-filepath, text, time, transformers, transformers-base
-     , unix-compat
-     }:
-     mkDerivation {
-       pname = "shelly";
        version = "1.6.8.1";
        sha256 = "e5a32f7552779667d1f0164d271e99c9ddcabdf1a7a1503cd6fc8ba0bb4445cd";
        libraryHaskellDepends = [
@@ -147245,7 +147744,6 @@ self: {
        homepage = "https://github.com/yesodweb/Shelly.hs";
        description = "shell-like (systems) programming in Haskell";
        license = stdenv.lib.licenses.bsd3;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "shelly-extra" = callPackage
@@ -147265,6 +147763,24 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "shentong" = callPackage
+    ({ mkDerivation, base, bytestring, hashmap, mtl, parallel, text
+     , time, uniplate, unordered-containers, vector
+     }:
+     mkDerivation {
+       pname = "shentong";
+       version = "0.3.1";
+       sha256 = "b751f79e565899e36b71c6b31a51adb46fd61899b3cdadbb05631d03514bb523";
+       isLibrary = false;
+       isExecutable = true;
+       executableHaskellDepends = [
+         base bytestring hashmap mtl parallel text time uniplate
+         unordered-containers vector
+       ];
+       description = "A Haskell implementation of the Shen programming language";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "shine" = callPackage
     ({ mkDerivation, base, ghcjs-dom, ghcjs-prim, keycode, mtl, time
      , transformers
@@ -147486,6 +148002,33 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "sibe" = callPackage
+    ({ mkDerivation, base, Chart, Chart-cairo, containers
+     , data-default-class, deepseq, directory, hmatrix, JuicyPixels
+     , lens, random, random-shuffle, regex-base, regex-pcre, split
+     , stemmer, text, vector
+     }:
+     mkDerivation {
+       pname = "sibe";
+       version = "0.1.0.0";
+       sha256 = "456846a9c4bcd467e9f95899677d216d21bf94e0d51b70e22b173272526a8db8";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         base Chart Chart-cairo containers data-default-class deepseq
+         hmatrix lens random random-shuffle regex-base regex-pcre split
+         stemmer text vector
+       ];
+       executableHaskellDepends = [
+         base Chart Chart-cairo containers data-default-class directory
+         hmatrix JuicyPixels random random-shuffle split vector
+       ];
+       testHaskellDepends = [ base hmatrix ];
+       homepage = "https://github.com/mdibaiee/sibe";
+       description = "Initial project template from stack";
+       license = stdenv.lib.licenses.gpl3;
+     }) {};
+
   "sieve" = callPackage
     ({ mkDerivation, base }:
      mkDerivation {
@@ -148277,8 +148820,8 @@ self: {
      }:
      mkDerivation {
        pname = "simple-tar";
-       version = "0.5";
-       sha256 = "06b1ce56dc971aad0f52c5e7d27fb4d64aca83e018c6fc2e227a65dc5bc1a247";
+       version = "0.5.1";
+       sha256 = "d53ea4544827bfb99f8f79ddfca3888b642f8cb67d43616b7cbdcb0ca1da0e5f";
        libraryHaskellDepends = [
          base bytestring cereal containers filepath time
        ];
@@ -150673,26 +151216,26 @@ self: {
 
   "snaplet-sqlite-simple" = callPackage
     ({ mkDerivation, aeson, base, bytestring, clientsession
-     , configurator, containers, direct-sqlite, directory, errors, HUnit
-     , lens, MonadCatchIO-transformers, mtl, SafeSemaphore, snap
+     , configurator, containers, direct-sqlite, directory, errors
+     , exceptions, HUnit, lens, lifted-base, monad-control, mtl, snap
      , snap-core, sqlite-simple, stm, test-framework
-     , test-framework-hunit, text, time, transformers
+     , test-framework-hunit, text, time, transformers, transformers-base
      , unordered-containers
      }:
      mkDerivation {
        pname = "snaplet-sqlite-simple";
-       version = "0.4.8.3";
-       sha256 = "a3dbe2a2a3f8301454dba81fe0d46081844b76eaef49b3fa609cb0a1d39e8059";
+       version = "1.0.0.0";
+       sha256 = "d787e7cadbabb380ac4a889d9d21ca1e94ead91ef0864788471d1a62f7189f38";
        libraryHaskellDepends = [
          aeson base bytestring clientsession configurator direct-sqlite lens
-         MonadCatchIO-transformers mtl snap sqlite-simple text transformers
-         unordered-containers
+         lifted-base monad-control mtl snap sqlite-simple text transformers
+         transformers-base unordered-containers
        ];
        testHaskellDepends = [
          aeson base bytestring clientsession configurator containers
-         directory errors HUnit lens MonadCatchIO-transformers mtl
-         SafeSemaphore snap snap-core sqlite-simple stm test-framework
-         test-framework-hunit text time transformers unordered-containers
+         directory errors exceptions HUnit lens mtl snap snap-core
+         sqlite-simple stm test-framework test-framework-hunit text time
+         transformers unordered-containers
        ];
        homepage = "https://github.com/nurpax/snaplet-sqlite-simple";
        description = "sqlite-simple snaplet for the Snap Framework";
@@ -152657,6 +153200,19 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "sqlite-simple-errors" = callPackage
+    ({ mkDerivation, base, mtl, parsec, sqlite-simple, text }:
+     mkDerivation {
+       pname = "sqlite-simple-errors";
+       version = "0.3.0.0";
+       sha256 = "0d8cb4b9b51aeadc6daf112ae75b2b38a13f2da2fba574c2b4d2fafa18600c9d";
+       libraryHaskellDepends = [ base parsec sqlite-simple text ];
+       testHaskellDepends = [ base mtl sqlite-simple text ];
+       homepage = "https://github.com/caneroj1/sqlite-simple-errors";
+       description = "Wrapper around errors from sqlite-simple";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "sqlite-simple-typed" = callPackage
     ({ mkDerivation, base, haskell-src-meta, sqlite, sqlite-simple
      , template-haskell, typedquery, utf8-string
@@ -152688,20 +153244,20 @@ self: {
      }) {};
 
   "squeeze" = callPackage
-    ({ mkDerivation, base, Cabal, directory, factory, filepath, mtl
-     , QuickCheck, random, toolshed
+    ({ mkDerivation, base, Cabal, data-default, directory, factory
+     , filepath, mtl, QuickCheck, random, toolshed
      }:
      mkDerivation {
        pname = "squeeze";
-       version = "1.0.4.8";
-       sha256 = "9d67bb75f209427f4866ad9835b67e8057e2275349a1ef8f820ebbdbafcaf190";
+       version = "1.0.4.12";
+       sha256 = "9bf9f143c022d366144e1b4dd6f00b5c627aef88ffecbab7f5c453311f87049c";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
-         base Cabal directory factory filepath mtl toolshed
+         base Cabal data-default directory factory filepath mtl toolshed
        ];
        executableHaskellDepends = [
-         base Cabal factory filepath mtl random toolshed
+         base Cabal data-default factory filepath mtl random toolshed
        ];
        testHaskellDepends = [ base factory QuickCheck toolshed ];
        homepage = "http://functionalley.eu/Squeeze/squeeze.html";
@@ -153146,8 +153702,8 @@ self: {
      }:
      mkDerivation {
        pname = "stack-prism";
-       version = "0.1.5";
-       sha256 = "ead22ecccaa5110b9ceba98077a5101e97ac21675f9d74ff01df4a01cd41540f";
+       version = "0.1.6";
+       sha256 = "493ac24313cdcaf64e86cd5e8081fcb2ffda5048278057ca9d803c7939949ddb";
        libraryHaskellDepends = [
          base profunctors tagged template-haskell transformers
        ];
@@ -153972,6 +154528,19 @@ self: {
        license = stdenv.lib.licenses.publicDomain;
      }) {};
 
+  "stb-image-redux" = callPackage
+    ({ mkDerivation, base, hspec, QuickCheck, vector }:
+     mkDerivation {
+       pname = "stb-image-redux";
+       version = "0.1.0.3";
+       sha256 = "7a3519a1832f39b3d621207cddd679e7e8bb4f1057f33bfd170de2d3e07313b7";
+       libraryHaskellDepends = [ base vector ];
+       testHaskellDepends = [ base hspec QuickCheck vector ];
+       homepage = "https://github.com/sasinestro/stb-image-redux#readme";
+       description = "Image loading and writing microlibrary";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "stb-truetype" = callPackage
     ({ mkDerivation, array, base, bytestring, containers }:
      mkDerivation {
@@ -154504,8 +155073,8 @@ self: {
     ({ mkDerivation, base, clock, hspec, transformers }:
      mkDerivation {
        pname = "stopwatch";
-       version = "0.1.0.2";
-       sha256 = "f9f0897702a3b5cb3cd7ef8960caa4733fef3273dab0c91f6f6da3d956e0489b";
+       version = "0.1.0.3";
+       sha256 = "0ddeaefab7989bd5fc5c5e45c769806630da7be0e699f36e4ada6e6d91c5026e";
        libraryHaskellDepends = [ base clock transformers ];
        testHaskellDepends = [ base clock hspec ];
        homepage = "https://github.com/debug-ito/stopwatch";
@@ -156256,6 +156825,23 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "svg-builder_0_1_0_2" = callPackage
+    ({ mkDerivation, base, blaze-builder, bytestring, hashable, text
+     , unordered-containers
+     }:
+     mkDerivation {
+       pname = "svg-builder";
+       version = "0.1.0.2";
+       sha256 = "81490cf0c843d6d7795ba32ac6cb05acf4a92431fe7702aa634ec52d60bfee54";
+       libraryHaskellDepends = [
+         base blaze-builder bytestring hashable text unordered-containers
+       ];
+       homepage = "http://github.com/jeffreyrosenbluth/svg-builder.git";
+       description = "DSL for building SVG";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "svg-tree" = callPackage
     ({ mkDerivation, attoparsec, base, bytestring, containers
      , JuicyPixels, lens, linear, mtl, scientific, text, transformers
@@ -156425,33 +157011,6 @@ self: {
      , containers, doctest, generics-sop, Glob, hashable, hspec
      , http-media, HUnit, insert-ordered-containers, lens, mtl, network
      , QuickCheck, scientific, template-haskell, text, time
-     , transformers, unordered-containers, vector
-     }:
-     mkDerivation {
-       pname = "swagger2";
-       version = "2.1.2.1";
-       sha256 = "112b053db3cbeeeea9c7b43cb0f07a6ea9f73715ac5883b2eee9c2855c444930";
-       libraryHaskellDepends = [
-         aeson base base-compat containers generics-sop hashable http-media
-         insert-ordered-containers lens mtl network scientific
-         template-haskell text time transformers unordered-containers vector
-       ];
-       testHaskellDepends = [
-         aeson aeson-qq base base-compat bytestring containers doctest Glob
-         hashable hspec HUnit insert-ordered-containers lens mtl QuickCheck
-         text time unordered-containers vector
-       ];
-       homepage = "https://github.com/GetShopTV/swagger2";
-       description = "Swagger 2.0 data model";
-       license = stdenv.lib.licenses.bsd3;
-       hydraPlatforms = stdenv.lib.platforms.none;
-     }) {};
-
-  "swagger2_2_1_3" = callPackage
-    ({ mkDerivation, aeson, aeson-qq, base, base-compat, bytestring
-     , containers, doctest, generics-sop, Glob, hashable, hspec
-     , http-media, HUnit, insert-ordered-containers, lens, mtl, network
-     , QuickCheck, scientific, template-haskell, text, time
      , transformers, unordered-containers, uuid-types, vector
      }:
      mkDerivation {
@@ -156889,8 +157448,8 @@ self: {
      }:
      mkDerivation {
        pname = "syntactic";
-       version = "3.6.1";
-       sha256 = "392cd247b191958cdc4470e79799f923297d73d74ffeb93162a36e4c46b10305";
+       version = "3.6.2";
+       sha256 = "f110ce1a2d5029756c6388666a4d817c4c739665c1c2cea718858302b2f07a73";
        libraryHaskellDepends = [
          base constraints containers data-hash deepseq mtl syb
          template-haskell tree-view
@@ -159033,9 +159592,12 @@ self: {
     ({ mkDerivation, base, containers, HUnit }:
      mkDerivation {
        pname = "tce-conf";
-       version = "1.1";
-       sha256 = "d0dedf6185791d9808e57bf2f0a28f4164b1f285bde2f45c2b039da572ca7cb0";
+       version = "1.3";
+       sha256 = "b051843bb941ed137242edfcfb28b1c15083951272fe292e82c140c9e1ad26a2";
+       isLibrary = true;
+       isExecutable = true;
        libraryHaskellDepends = [ base containers ];
+       executableHaskellDepends = [ base containers ];
        testHaskellDepends = [ base containers HUnit ];
        homepage = "http://hub.darcs.net/dino/tce-conf";
        description = "Very simple config file reading";
@@ -159827,8 +160389,8 @@ self: {
      }:
      mkDerivation {
        pname = "test-fixture";
-       version = "0.4.0.0";
-       sha256 = "0601604365bec95ab5407051410f7a857ae19dc6c25fad8bc004756aca02dff0";
+       version = "0.4.1.0";
+       sha256 = "bddd2b518151218d9848b46f233c70719711a45fd7357ecc3a5eb1d551d437a4";
        libraryHaskellDepends = [ base data-default mtl template-haskell ];
        testHaskellDepends = [
          base hspec hspec-discover mtl transformers
@@ -159897,6 +160459,8 @@ self: {
        pname = "test-framework-hunit";
        version = "0.3.0.2";
        sha256 = "95cb8ee02a850b164bfdabdf4dbc839d621361f3ac770ad21ea43a8bde360bf8";
+       revision = "1";
+       editedCabalFile = "50dfa482f626505b45ab433d0110f275e314f872a198b5fc24d1a640af755880";
        libraryHaskellDepends = [
          base extensible-exceptions HUnit test-framework
        ];
@@ -160699,6 +161263,20 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "text-metrics_0_2_0" = callPackage
+    ({ mkDerivation, base, hspec, QuickCheck, text }:
+     mkDerivation {
+       pname = "text-metrics";
+       version = "0.2.0";
+       sha256 = "082304ce14ac6182cbb93f51207d90b91d104e5d1fc1b17bbe1c9280ebffe43a";
+       libraryHaskellDepends = [ base text ];
+       testHaskellDepends = [ base hspec QuickCheck text ];
+       homepage = "https://github.com/mrkkrp/text-metrics";
+       description = "Calculate various string metrics efficiently";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "text-normal" = callPackage
     ({ mkDerivation, base, deepseq, hspec, QuickCheck
      , quickcheck-instances, text, text-icu
@@ -161012,6 +161590,23 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "textlocal" = callPackage
+    ({ mkDerivation, aeson, base, bytestring, http-client
+     , http-client-tls, http-conduit, text, unix-time
+     }:
+     mkDerivation {
+       pname = "textlocal";
+       version = "0.1.0.3";
+       sha256 = "56237c4982513680358a13d5bba261e55ce4ec2346e402b8ba438f7a11d06e1c";
+       libraryHaskellDepends = [
+         aeson base bytestring http-client http-client-tls http-conduit text
+         unix-time
+       ];
+       homepage = "https://github.com/just-chow/textlocal";
+       description = "Haskell wrapper for textlocal SMS gateway";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "textmatetags" = callPackage
     ({ mkDerivation, base, haskell98, process }:
      mkDerivation {
@@ -163490,17 +164085,18 @@ self: {
      }) {};
 
   "toolshed" = callPackage
-    ({ mkDerivation, array, base, containers, deepseq, directory
-     , filepath, QuickCheck, random
+    ({ mkDerivation, array, base, containers, data-default, deepseq
+     , directory, filepath, HUnit, QuickCheck, random
      }:
      mkDerivation {
        pname = "toolshed";
-       version = "0.16.0.0";
-       sha256 = "bf19c993d987d9024aced25f3aeab1732ffe935c76daf276e147668f1c8fa244";
+       version = "0.17.0.2";
+       sha256 = "23d5c90cc0677239deec4b21c4aa8cd3d2477ba310abd39bed646cda10799e81";
        libraryHaskellDepends = [
-         array base containers deepseq directory filepath QuickCheck random
+         array base containers data-default deepseq directory filepath
+         QuickCheck random
        ];
-       testHaskellDepends = [ base containers QuickCheck random ];
+       testHaskellDepends = [ base containers HUnit QuickCheck random ];
        homepage = "http://functionalley.eu";
        description = "Ill-defined library";
        license = "GPL";
@@ -164311,6 +164907,18 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "tree-view_0_5" = callPackage
+    ({ mkDerivation, base, containers, mtl }:
+     mkDerivation {
+       pname = "tree-view";
+       version = "0.5";
+       sha256 = "2d0046df6a78bfc57c7d11736d3baf6e1e427e8eb944f408b80a9195b062dcab";
+       libraryHaskellDepends = [ base containers mtl ];
+       description = "Render trees as foldable HTML and Unicode art";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "treemap" = callPackage
     ({ mkDerivation, base, containers, deepseq, semigroups, strict
      , tasty, tasty-hunit, text, transformers
@@ -164877,6 +165485,20 @@ self: {
        hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
+  "tuntap-simple" = callPackage
+    ({ mkDerivation, base, ioctl }:
+     mkDerivation {
+       pname = "tuntap-simple";
+       version = "0.1.0.0";
+       sha256 = "cecb67220c3818d989c8939df10f89e9cf4987e4a7e67b7b6202ccf997c3af8c";
+       revision = "2";
+       editedCabalFile = "28866402f6b3961fe4808afe7d02e3cd3b5d73d99ec02aec67f2bd205dd94a96";
+       libraryHaskellDepends = [ base ioctl ];
+       homepage = "https://github.com/riaqn/tuntap-simple#readme";
+       description = "A simple tun/tap library";
+       license = stdenv.lib.licenses.bsd3;
+     }) {};
+
   "tup-functor" = callPackage
     ({ mkDerivation, base, cpphs, haskell-src-exts, parsec2 }:
      mkDerivation {
@@ -165578,6 +166200,27 @@ self: {
        license = stdenv.lib.licenses.mit;
      }) {};
 
+  "twitter-feed_0_2_0_10" = callPackage
+    ({ mkDerivation, aeson, authenticate-oauth, base, bytestring
+     , containers, http-conduit, HUnit, test-framework
+     , test-framework-hunit
+     }:
+     mkDerivation {
+       pname = "twitter-feed";
+       version = "0.2.0.10";
+       sha256 = "8dc2ea040a332086588b8e314bd3ba389446e1e7d8746d1fca188e01c9005de0";
+       libraryHaskellDepends = [
+         aeson authenticate-oauth base bytestring http-conduit
+       ];
+       testHaskellDepends = [
+         base containers HUnit test-framework test-framework-hunit
+       ];
+       homepage = "https://github.com/stackbuilders/twitter-feed";
+       description = "Client for fetching Twitter timeline via Oauth";
+       license = stdenv.lib.licenses.mit;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "twitter-types" = callPackage
     ({ mkDerivation, aeson, attoparsec, base, bytestring, derive
      , directory, filepath, HUnit, old-locale, QuickCheck
@@ -170889,6 +171532,43 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "vty_5_11_1" = 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
+     , test-framework-smallcheck, text, transformers, unix, utf8-string
+     , vector
+     }:
+     mkDerivation {
+       pname = "vty";
+       version = "5.11.1";
+       sha256 = "4d6fa0bd9ad3f53c87cca1d02dab246326a9d79737b4861674ba4ff68646d23a";
+       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
+       ];
+       executableHaskellDepends = [
+         base containers data-default 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
+         test-framework-hunit test-framework-smallcheck text unix
+         utf8-string vector
+       ];
+       homepage = "https://github.com/coreyoconnor/vty";
+       description = "A simple terminal UI library";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "vty-examples" = callPackage
     ({ mkDerivation, array, base, bytestring, Cabal, containers
      , data-default, deepseq, lens, mtl, parallel, parsec, QuickCheck
@@ -170914,8 +171594,8 @@ self: {
     ({ mkDerivation, base, vty }:
      mkDerivation {
        pname = "vty-menu";
-       version = "0.0.3";
-       sha256 = "71618d00d34595c96b6cd42704f72ce37d3e17d4651656037938a0c1079966aa";
+       version = "0.0.4";
+       sha256 = "853a7acf66a6eb0fba1c35b5da1053fed7046b8cf0091556a5c35f9dd29a9c48";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [ base vty ];
@@ -171983,6 +172663,28 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "wai-middleware-static_0_8_1" = callPackage
+    ({ mkDerivation, base, bytestring, containers, cryptonite
+     , directory, expiring-cache-map, filepath, hpc-coveralls
+     , http-types, memory, mime-types, mtl, old-locale, semigroups, text
+     , time, wai
+     }:
+     mkDerivation {
+       pname = "wai-middleware-static";
+       version = "0.8.1";
+       sha256 = "e0b5f13f410f81897759acf43198a08101d2af4c9d506164367c7d1a96d55375";
+       libraryHaskellDepends = [
+         base bytestring containers cryptonite directory expiring-cache-map
+         filepath http-types memory mime-types mtl old-locale semigroups
+         text time wai
+       ];
+       testHaskellDepends = [ base hpc-coveralls ];
+       homepage = "https://github.com/scotty-web/wai-middleware-static";
+       description = "WAI middleware that serves requests to static files";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "wai-middleware-static-caching" = callPackage
     ({ mkDerivation, base, base16-bytestring, bytestring, containers
      , cryptohash, directory, expiring-cache-map, filepath, http-types
@@ -173792,8 +174494,8 @@ self: {
      }:
      mkDerivation {
        pname = "wikicfp-scraper";
-       version = "0.1.0.3";
-       sha256 = "cec3675a09151052751110ed3637eae40a7e18cdcd17127d353e6e10582e3a1e";
+       version = "0.1.0.4";
+       sha256 = "57c916f27a4e4a7f2b6aad3d60d91aff9ea4a1981ad145bc4f1e2062e76e970f";
        libraryHaskellDepends = [
          attoparsec base bytestring scalpel text time
        ];
@@ -173830,8 +174532,8 @@ self: {
      }:
      mkDerivation {
        pname = "wild-bind";
-       version = "0.1.0.1";
-       sha256 = "98d421c93d2a9e3834a29059fe0bda4accd20fbe45aad60ac71dd753eced76e4";
+       version = "0.1.0.2";
+       sha256 = "472a0bec3129e8b0ea60170e0535e602030e1d68c39bfd405c71b246c5211522";
        libraryHaskellDepends = [ base containers text transformers ];
        testHaskellDepends = [
          base hspec microlens QuickCheck stm transformers
@@ -173880,8 +174582,8 @@ self: {
      }:
      mkDerivation {
        pname = "wild-bind-x11";
-       version = "0.1.0.1";
-       sha256 = "1ff56f1610132fa3671577c88d5cd5117a99b7ee6b8d589317fba4ad054820ba";
+       version = "0.1.0.2";
+       sha256 = "dd31ca0fff07e5976076ed092ffb261ca438240fa33b25ba5ec3de66dcfd6d2d";
        libraryHaskellDepends = [
          base containers fold-debounce stm text transformers wild-bind X11
        ];
@@ -174618,8 +175320,8 @@ self: {
      }:
      mkDerivation {
        pname = "wrecker";
-       version = "0.1.3.0";
-       sha256 = "d0d0c6c8bb7ec1c998a073094ad3c93894c5b2486ba8f01c7be0c47ebc8ca95a";
+       version = "0.1.3.3";
+       sha256 = "be69fcac9665d15256247f674649a3f3b302e4c87184dd82500265722270e4ad";
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [
@@ -174635,12 +175337,12 @@ self: {
        executableHaskellDepends = [
          aeson aeson-qq base bytestring connection http-client immortal lens
          markdown-unlit network next-ref optparse-applicative scotty text
-         wai warp wreq
+         transformers wai warp wreq
        ];
        testHaskellDepends = [
          aeson aeson-qq base bytestring connection hspec hspec-discover
          http-client immortal markdown-unlit network next-ref scotty text
-         unordered-containers wai warp wreq
+         transformers unordered-containers wai warp wreq
        ];
        homepage = "https://github.com/skedgeme/wrecker#readme";
        description = "An HTTP Performance Benchmarker";
@@ -175195,23 +175897,6 @@ self: {
 
   "x509-store" = callPackage
     ({ mkDerivation, asn1-encoding, asn1-types, base, bytestring
-     , containers, cryptonite, mtl, pem, x509
-     }:
-     mkDerivation {
-       pname = "x509-store";
-       version = "1.6.1";
-       sha256 = "83d69d2f5ce39fceaeca8e4dcc6d9ebe8a8e94f55d9c23b06cc7a58844e94b05";
-       libraryHaskellDepends = [
-         asn1-encoding asn1-types base bytestring containers cryptonite mtl
-         pem x509
-       ];
-       homepage = "http://github.com/vincenthz/hs-certificate";
-       description = "X.509 collection accessing and storing methods";
-       license = stdenv.lib.licenses.bsd3;
-     }) {};
-
-  "x509-store_1_6_2" = callPackage
-    ({ mkDerivation, asn1-encoding, asn1-types, base, bytestring
      , containers, cryptonite, directory, filepath, mtl, pem, x509
      }:
      mkDerivation {
@@ -175225,7 +175910,6 @@ self: {
        homepage = "http://github.com/vincenthz/hs-certificate";
        description = "X.509 collection accessing and storing methods";
        license = stdenv.lib.licenses.bsd3;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "x509-system" = callPackage
@@ -175234,23 +175918,6 @@ self: {
      }:
      mkDerivation {
        pname = "x509-system";
-       version = "1.6.3";
-       sha256 = "24237c3df1bf692fcf7bade432970ee2eb06db7437fa0e95986ef7535a68f6e0";
-       libraryHaskellDepends = [
-         base bytestring containers directory filepath mtl pem process x509
-         x509-store
-       ];
-       homepage = "http://github.com/vincenthz/hs-certificate";
-       description = "Handle per-operating-system X.509 accessors and storage";
-       license = stdenv.lib.licenses.bsd3;
-     }) {};
-
-  "x509-system_1_6_4" = callPackage
-    ({ mkDerivation, base, bytestring, containers, directory, filepath
-     , mtl, pem, process, x509, x509-store
-     }:
-     mkDerivation {
-       pname = "x509-system";
        version = "1.6.4";
        sha256 = "d98ef028855ad73a872ed86026f205aba383378bf1e63462c5d3e4733b60ff4c";
        libraryHaskellDepends = [
@@ -175260,7 +175927,6 @@ self: {
        homepage = "http://github.com/vincenthz/hs-certificate";
        description = "Handle per-operating-system X.509 accessors and storage";
        license = stdenv.lib.licenses.bsd3;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "x509-util" = callPackage
@@ -175290,25 +175956,6 @@ self: {
      }:
      mkDerivation {
        pname = "x509-validation";
-       version = "1.6.4";
-       sha256 = "ad14ca56c70964fee09a5ff06f738ea7bdff599be27baed24a35115efc5967a4";
-       libraryHaskellDepends = [
-         asn1-encoding asn1-types base byteable bytestring containers
-         cryptonite data-default-class hourglass memory mtl pem x509
-         x509-store
-       ];
-       homepage = "http://github.com/vincenthz/hs-certificate";
-       description = "X.509 Certificate and CRL validation";
-       license = stdenv.lib.licenses.bsd3;
-     }) {};
-
-  "x509-validation_1_6_5" = callPackage
-    ({ mkDerivation, asn1-encoding, asn1-types, base, byteable
-     , bytestring, containers, cryptonite, data-default-class, hourglass
-     , memory, mtl, pem, x509, x509-store
-     }:
-     mkDerivation {
-       pname = "x509-validation";
        version = "1.6.5";
        sha256 = "d1f73197677b6d19795fc80e4a1fa93e810d567ee4e3edc74e841b3eb20e1ca4";
        libraryHaskellDepends = [
@@ -175319,7 +175966,6 @@ self: {
        homepage = "http://github.com/vincenthz/hs-certificate";
        description = "X.509 Certificate and CRL validation";
        license = stdenv.lib.licenses.bsd3;
-       hydraPlatforms = stdenv.lib.platforms.none;
      }) {};
 
   "x86-64bit" = callPackage
@@ -176481,6 +177127,8 @@ self: {
        pname = "xmlhtml";
        version = "0.2.3.5";
        sha256 = "e333a1c7afd5068b60b143457fea7325a34408cc65b3ac55f5b342eb0274b06d";
+       revision = "1";
+       editedCabalFile = "6a4d1fc061c4dd01628d762d947e63619a25714aa0dd36b6fe674a7ec62b9045";
        libraryHaskellDepends = [
          base blaze-builder blaze-html blaze-markup bytestring containers
          parsec text unordered-containers
@@ -177178,6 +177826,29 @@ self: {
        license = stdenv.lib.licenses.bsd3;
      }) {};
 
+  "yahoo-finance-api_0_2_0_0" = callPackage
+    ({ mkDerivation, aeson, base, doctest, either, Glob, hspec
+     , http-api-data, http-client, http-client-tls, mtl, safe, servant
+     , servant-client, text, time, transformers, vector
+     }:
+     mkDerivation {
+       pname = "yahoo-finance-api";
+       version = "0.2.0.0";
+       sha256 = "a2d01a542ca627abe791d95d7e38234f731a356aa9f6e2d0f81c7df050bff3c7";
+       libraryHaskellDepends = [
+         aeson base either http-api-data http-client mtl servant
+         servant-client text time transformers vector
+       ];
+       testHaskellDepends = [
+         base doctest either Glob hspec http-client http-client-tls mtl safe
+         servant servant-client
+       ];
+       homepage = "https://github.com/cdepillabout/yahoo-finance-api";
+       description = "Read quotes from Yahoo Finance API";
+       license = stdenv.lib.licenses.bsd3;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "yahoo-finance-conduit" = callPackage
     ({ mkDerivation, attoparsec, base, cassava, conduit, lens, mtl
      , text, vector, wreq
@@ -178144,8 +178815,8 @@ self: {
      }:
      mkDerivation {
        pname = "yesod-bin";
-       version = "1.4.18.5";
-       sha256 = "80dff2cb2a45def4e0479d7a9c01cd468e5f324696770e2f27be509073193cd8";
+       version = "1.4.18.7";
+       sha256 = "ff75fc8bc7b37d6960436dab4a97697bc172d5092f5125b23791c8efdd01ed96";
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
@@ -178616,17 +179287,18 @@ self: {
      }) {};
 
   "yesod-job-queue" = callPackage
-    ({ mkDerivation, aeson, api-field-json-th, base, bytestring
-     , classy-prelude-yesod, cron, file-embed, hedis, lens, monad-logger
-     , stm, text, time, uuid, yesod
+    ({ mkDerivation, aeson, api-field-json-th, base, bytestring, cron
+     , file-embed, hedis, lens, monad-control, monad-logger, stm, text
+     , time, transformers, uuid, yesod, yesod-core, yesod-persistent
      }:
      mkDerivation {
        pname = "yesod-job-queue";
-       version = "0.3.0.0";
-       sha256 = "34da4826fd12624cf0d93f72e16a7722cc7510dcf37381bed89cc8bfabe42912";
+       version = "0.3.0.1";
+       sha256 = "a58805e218e5b0e6c623a5447f06484004d72a357f4b2e30d476da56618b734f";
        libraryHaskellDepends = [
-         aeson api-field-json-th base bytestring classy-prelude-yesod cron
-         file-embed hedis lens monad-logger stm text time uuid yesod
+         aeson api-field-json-th base bytestring cron file-embed hedis lens
+         monad-control monad-logger stm text time transformers uuid yesod
+         yesod-core yesod-persistent
        ];
        testHaskellDepends = [ base ];
        homepage = "https://github.com/nakaji-dayo/yesod-job-queue#readme";
@@ -179539,21 +180211,23 @@ self: {
        license = stdenv.lib.licenses.gpl2;
      }) {};
 
-  "yi_0_13_0_2" = callPackage
-    ({ mkDerivation, base, mtl, yi-core, yi-frontend-vty
-     , yi-keymap-emacs, yi-misc-modes, yi-mode-haskell
-     , yi-mode-javascript
+  "yi_0_13_1" = callPackage
+    ({ mkDerivation, base, microlens-platform, mtl
+     , optparse-applicative, yi-core, yi-frontend-pango, yi-frontend-vty
+     , yi-keymap-emacs, yi-keymap-vim, yi-misc-modes, yi-mode-haskell
+     , yi-mode-javascript, yi-rope
      }:
      mkDerivation {
        pname = "yi";
-       version = "0.13.0.2";
-       sha256 = "d352d9db13684dc2625c7197678198f8646af8697987e453e7662f33a6ffe279";
+       version = "0.13.1";
+       sha256 = "78e1140fd9d4ca2f880bb621c18325845dfbc54a9a213cf1fb7715c6741c4c08";
        configureFlags = [ "-fpango" "-fvty" ];
        isLibrary = false;
        isExecutable = true;
        executableHaskellDepends = [
-         base mtl yi-core yi-frontend-vty yi-keymap-emacs yi-misc-modes
-         yi-mode-haskell yi-mode-javascript
+         base microlens-platform mtl optparse-applicative yi-core
+         yi-frontend-pango yi-frontend-vty yi-keymap-emacs yi-keymap-vim
+         yi-misc-modes yi-mode-haskell yi-mode-javascript yi-rope
        ];
        homepage = "https://github.com/yi-editor/yi#readme";
        description = "Yi editor";
@@ -179593,8 +180267,8 @@ self: {
      }:
      mkDerivation {
        pname = "yi-core";
-       version = "0.13.0.2";
-       sha256 = "c23a5a0bafeed12e9374d6c065c19eff8938a6798fbb83f51509cd1c2e1b89d4";
+       version = "0.13.1";
+       sha256 = "df42e9b6bd3d2546ef972e088734a9d2394617cef4d63512c8a24cdb8396062e";
        libraryHaskellDepends = [
          array attoparsec base binary bytestring containers data-default
          directory dlist dynamic-state dyre exceptions filepath hashable
@@ -179636,8 +180310,8 @@ self: {
      }:
      mkDerivation {
        pname = "yi-frontend-pango";
-       version = "0.13.0.2";
-       sha256 = "db59fae93027466fde5eafc93c3809e78c82bdd176ca2c03c8799210fd681933";
+       version = "0.13.1";
+       sha256 = "897fae1674b6564ce54ad016a2e35e1cd771cc16f464933a6dc9fcc63ff3b279";
        libraryHaskellDepends = [
          base containers filepath glib gtk microlens-platform mtl
          oo-prototypes pango pointedlist text transformers-base yi-core
@@ -179655,8 +180329,8 @@ self: {
      }:
      mkDerivation {
        pname = "yi-frontend-vty";
-       version = "0.13.0.2";
-       sha256 = "8cb5c1d11d26ce5bf4578719311f10a9b293388ef44b74c0e630a526f26f49b7";
+       version = "0.13.1";
+       sha256 = "38dc95447ea4baf8780ad21f6bdd8f1bfe6883e23baf2993d8c026782d51d06e";
        libraryHaskellDepends = [
          base containers data-default dlist microlens-platform pointedlist
          stm text vty yi-core yi-language
@@ -179702,8 +180376,8 @@ self: {
      }:
      mkDerivation {
        pname = "yi-ireader";
-       version = "0.13.0.2";
-       sha256 = "3a957d1bae944213ab0ceb773cab65151df10114817eb0dec83e94b35a51a7af";
+       version = "0.13.1";
+       sha256 = "222212c92f7271f62dd297a4298ec51b326c08bcbe515e97ede3a9fd4cc23131";
        libraryHaskellDepends = [
          base binary bytestring containers data-default microlens-platform
          text yi-core yi-language yi-rope
@@ -179719,8 +180393,8 @@ self: {
      }:
      mkDerivation {
        pname = "yi-keymap-cua";
-       version = "0.13.0.2";
-       sha256 = "04c0c801acdf5bb19ffa215ca56ab422b64b8baf4fad211a57162b6d49390df5";
+       version = "0.13.1";
+       sha256 = "2f35799c34970675b0f381db7d5ba77b32ad05f76ee21d30fe8233599f02c38a";
        libraryHaskellDepends = [
          base microlens-platform text yi-core yi-keymap-emacs yi-rope
        ];
@@ -179737,8 +180411,8 @@ self: {
      }:
      mkDerivation {
        pname = "yi-keymap-emacs";
-       version = "0.13.0.2";
-       sha256 = "b8c30daffe5bc16bfda46930409b51cb7fb6309d2639df7bea1a55e91bd30c72";
+       version = "0.13.1";
+       sha256 = "dcb51f973325e9c7dfc6db781886ecd4b7f4761a8d1a88b1443ab457b4bf3f3d";
        libraryHaskellDepends = [
          base containers filepath Hclip microlens-platform mtl oo-prototypes
          semigroups text transformers-base yi-core yi-language yi-misc-modes
@@ -179759,8 +180433,8 @@ self: {
      }:
      mkDerivation {
        pname = "yi-keymap-vim";
-       version = "0.13.0.2";
-       sha256 = "41273f20b52ea612b829f3c85d63f521eab1c87e204d684f0e351e2ce3faf621";
+       version = "0.13.1";
+       sha256 = "16913f6be574a6a4705dc3736fdfe7a3b3f4e3f4e1127d846fe510495410d85b";
        libraryHaskellDepends = [
          attoparsec base binary containers data-default directory filepath
          Hclip microlens-platform mtl oo-prototypes pointedlist safe
@@ -179805,7 +180479,7 @@ self: {
        license = stdenv.lib.licenses.gpl2;
      }) {};
 
-  "yi-language_0_13_0_2" = callPackage
+  "yi-language_0_13_1" = callPackage
     ({ mkDerivation, alex, array, base, binary, containers
      , data-default, hashable, microlens-platform, oo-prototypes
      , pointedlist, regex-base, regex-tdfa, tasty, tasty-hspec
@@ -179814,8 +180488,8 @@ self: {
      }:
      mkDerivation {
        pname = "yi-language";
-       version = "0.13.0.2";
-       sha256 = "30ea9d0e2233d110ffba7bc10ecdfa8b2cf0aaf13a400e57c2c0aca742b900fb";
+       version = "0.13.1";
+       sha256 = "22ab333ec6bbeba4da562996a4783f20437b2383639e5f1fa144d98369a6c747";
        libraryHaskellDepends = [
          array base binary containers data-default hashable
          microlens-platform oo-prototypes pointedlist regex-base regex-tdfa
@@ -179841,8 +180515,8 @@ self: {
      }:
      mkDerivation {
        pname = "yi-misc-modes";
-       version = "0.13.0.2";
-       sha256 = "681e77764274f0c68a491749171a9b7b0b3a696f05ddf1540bb986c5892b77cd";
+       version = "0.13.1";
+       sha256 = "12ebcb20d106dcab4da2588f0d8ef357cecea52a35ff1b6e1eb197287c58d06e";
        libraryHaskellDepends = [
          array base binary data-default filepath microlens-platform
          semigroups text yi-core yi-language yi-rope
@@ -179862,8 +180536,8 @@ self: {
      }:
      mkDerivation {
        pname = "yi-mode-haskell";
-       version = "0.13.0.2";
-       sha256 = "29882f295c6b29306e50a80138756d2af87b2c9eb8e61534c66d067b455966fd";
+       version = "0.13.1";
+       sha256 = "55e78a4323eec19aab49d473fa9b5a874cb56e8bbb137756b8048696b75bab9e";
        libraryHaskellDepends = [
          array base binary data-default microlens-platform text yi-core
          yi-language yi-rope
@@ -179886,8 +180560,8 @@ self: {
      }:
      mkDerivation {
        pname = "yi-mode-javascript";
-       version = "0.13.0.2";
-       sha256 = "e5ac7b9cec20f02289143868d4d877f5c9d2a7c303450562cb8e9f4a7c4c69c0";
+       version = "0.13.1";
+       sha256 = "fdbad8e3fc6de90aaade5cda3881d161284fcc97b6e88c493d0005eb3923b990";
        libraryHaskellDepends = [
          array base binary data-default dlist filepath microlens-platform
          mtl text yi-core yi-language yi-rope
@@ -179930,6 +180604,27 @@ self: {
        license = stdenv.lib.licenses.gpl2;
      }) {};
 
+  "yi-rope_0_8" = callPackage
+    ({ mkDerivation, base, binary, bytestring, charsetdetect-ae
+     , data-default, deepseq, fingertree, hspec, QuickCheck
+     , quickcheck-instances, text, text-icu
+     }:
+     mkDerivation {
+       pname = "yi-rope";
+       version = "0.8";
+       sha256 = "eacf45e10fe3ee541db2d44e2c5092a530087a84a608eff0f0348bf60f32144e";
+       libraryHaskellDepends = [
+         base binary bytestring charsetdetect-ae data-default deepseq
+         fingertree text text-icu
+       ];
+       testHaskellDepends = [
+         base hspec QuickCheck quickcheck-instances text
+       ];
+       description = "A rope data structure used by Yi";
+       license = stdenv.lib.licenses.gpl2;
+       hydraPlatforms = stdenv.lib.platforms.none;
+     }) {};
+
   "yi-snippet" = callPackage
     ({ mkDerivation, base, containers, yi, yi-rope }:
      mkDerivation {
diff --git a/pkgs/development/interpreters/mujs/default.nix b/pkgs/development/interpreters/mujs/default.nix
index 278191bf839f..b8359488725a 100644
--- a/pkgs/development/interpreters/mujs/default.nix
+++ b/pkgs/development/interpreters/mujs/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchgit, clang }:
 
 stdenv.mkDerivation rec {
-  name = "mujs-2016-02-22";
+  name = "mujs-2016-09-21";
 
   src = fetchgit {
     url = git://git.ghostscript.com/mujs.git;
-    rev  = "624f975aae6b451e35406d8cdde808626052ce2c";
-    sha256 = "0cab7x73v380wklpkbrc1k4iyh4q2jyx3zxbymlfi1spmrpn6skl";
+    rev  = "5c337af4b3df80cf967e4f9f6a21522de84b392a";
+    sha256 = "1x5g6nycggc83md2dbr2nahjbkkmmn64bg25a8hih7z72sw41dgw";
   };
 
   buildInputs = [ clang ];
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix
index f79ef61d36a2..ae8256dfaeaf 100644
--- a/pkgs/development/interpreters/php/default.nix
+++ b/pkgs/development/interpreters/php/default.nix
@@ -271,7 +271,7 @@ let
         done
 
         [[ -z "$libxml2" ]] || export PATH=$PATH:$libxml2/bin
-        ./configure --with-config-file-scan-dir=/etc --with-config-file-path=$out/etc --prefix=$out $configureFlags
+        ./configure --with-config-file-scan-dir=/etc/php.d --with-config-file-path=$out/etc --prefix=$out $configureFlags
       '';
 
       postInstall = ''
diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix
index 3f25640afeaa..1d2ee98bb857 100644
--- a/pkgs/development/interpreters/python/cpython/3.6/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix
@@ -25,7 +25,7 @@ with stdenv.lib;
 let
   majorVersion = "3.6";
   minorVersion = "0";
-  minorVersionSuffix = "b1";
+  minorVersionSuffix = "b2";
   pythonVersion = majorVersion;
   version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
   libPrefix = "python${majorVersion}";
@@ -56,7 +56,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
-    sha256 = "0hjdlwkjanjagz4qggbfgal8ggmas26mx2jlgjx1z2mzi950jfx8";
+    sha256 = "1sk990n2xm5vhn3ys2cp427dx0z14cx3sz1za5f2fcwrp524bz9s";
   };
 
   NIX_LDFLAGS = optionalString stdenv.isLinux "-lgcc_s";
diff --git a/pkgs/development/libraries/clutter-gst/default.nix b/pkgs/development/libraries/clutter-gst/default.nix
index c2bec3a7f1de..41c7f8db6d26 100644
--- a/pkgs/development/libraries/clutter-gst/default.nix
+++ b/pkgs/development/libraries/clutter-gst/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   major = "3.0";
-  minor = "18";
+  minor = "20";
   name = "clutter-gst-${major}.${minor}";
 
   src = fetchurl {
     url = "mirror://gnome/sources/clutter-gst/${major}/${name}.tar.xz";
-    sha256 = "14w0pi9myvcn1yxzmk9sk8dghj17m5ji3aqdpfjikk90c060vv0a";
+    sha256 = "1jb6q0f6vbh8nskz88siny70pm43wbnw2wzr2klsyb9axn3if0d0";
   };
 
   propagatedBuildInputs = [ clutter gtk3 glib cogl ];
diff --git a/pkgs/development/libraries/clutter-gtk/default.nix b/pkgs/development/libraries/clutter-gtk/default.nix
index a126f7709449..ef2ac6f93853 100644
--- a/pkgs/development/libraries/clutter-gtk/default.nix
+++ b/pkgs/development/libraries/clutter-gtk/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   major = "1.8";
-  minor = "0";
+  minor = "2";
   name = "clutter-gtk-${major}.${minor}";
 
   src = fetchurl {
     url = "mirror://gnome/sources/clutter-gtk/${major}/${name}.tar.xz";
-    sha256 = "07dzvx0b3fsswxnpxgk0adjgccnrvbxsd971naqwndnfivbgjbkl";
+    sha256 = "da27d486325490ad3f65d2abf9413aeb8b4a8f7b559e4b2f73567a5344a26b94";
   };
 
   propagatedBuildInputs = [ clutter gtk3 ];
diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix
index 550ec2bf5c31..0130ee2a014b 100644
--- a/pkgs/development/libraries/fontconfig/default.nix
+++ b/pkgs/development/libraries/fontconfig/default.nix
@@ -16,20 +16,14 @@ let
   configVersion = "2.11"; # bump whenever fontconfig breaks compatibility with older configurations
 in
 stdenv.mkDerivation rec {
-  name = "fontconfig-2.11.1";
+  name = "fontconfig-2.12.1";
 
   src = fetchurl {
     url = "http://fontconfig.org/release/${name}.tar.bz2";
-    sha256 = "16baa4g5lswkyjlyf1h5lwc0zjap7c4d8grw79349a5w6dsl8qnw";
+    sha256 = "1wy7svvp7df6bjpg1m5vizb3ngd7rhb20vpclv3x3qa71khs6jdl";
   };
 
   patches = [
-    (fetchpatch ({
-        url = "http://cgit.freedesktop.org/fontconfig/patch/?id=f44157c809d280e2a0ce87fb078fc4b278d24a67";
-        sha256 = "19s5irclg4irj2yxd7xw9yikbazs9263px8qbv4r21asw06nfalv";
-        name = "fc-cache-bug-77252.patch";
-      }
-    ))
     (substituteAll {
       src = ./config-compat.patch;
       inherit configVersion;
diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix
index 85446aae8ca9..f3db9bf59776 100644
--- a/pkgs/development/libraries/gdk-pixbuf/default.nix
+++ b/pkgs/development/libraries/gdk-pixbuf/default.nix
@@ -2,7 +2,7 @@
 , jasper, libintlOrEmpty, gobjectIntrospection, doCheck ? false }:
 
 let
-  ver_maj = "2.34";
+  ver_maj = "2.36";
   ver_min = "0";
 in
 stdenv.mkDerivation rec {
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnome/sources/gdk-pixbuf/${ver_maj}/${name}.tar.xz";
-    sha256 = "0yc8indbl3hf18z6x6kjg59xp9sngm1d8vmz4c7bs6g27qw5npnm";
+    sha256 = "85ab52ce9f2c26327141b3dcf21cca3da6a3f8de84b95fa1e727d8871a23245c";
   };
 
   outputs = [ "out" "dev" "devdoc" ];
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index c47a02ef5e47..710b65509959 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -43,7 +43,7 @@ let
   '';
 
   ver_maj = "2.50";
-  ver_min = "0";
+  ver_min = "1";
 in
 
 stdenv.mkDerivation rec {
@@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnome/sources/glib/${ver_maj}/${name}.tar.xz";
-    sha256 = "830b551fa626bda06e12729205b3c5bb0d82b924a8cf64d948945878f01b7d70";
+    sha256 = "2ef87a78f37c1eb5b95f4cc95efd5b66f69afad9c9c0899918d04659cf6df7dd";
   };
 
   patches = optional stdenv.isDarwin ./darwin-compilation.patch ++ optional doCheck ./skip-timer-test.patch;
diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix
index 551d18d17f19..8acc773a46c8 100644
--- a/pkgs/development/libraries/gpgme/default.nix
+++ b/pkgs/development/libraries/gpgme/default.nix
@@ -28,6 +28,9 @@ stdenv.mkDerivation rec {
     "--enable-fixed-path=${gpgStorePath}/bin"
   ];
 
+  NIX_CFLAGS_COMPILE =
+    with stdenv; lib.optional (system == "i686-linux") "-D_FILE_OFFSET_BITS=64";
+
   meta = with stdenv.lib; {
     homepage = "http://www.gnupg.org/related_software/gpgme";
     description = "Library for making GnuPG easier to use";
diff --git a/pkgs/development/libraries/gtkmm/2.x.nix b/pkgs/development/libraries/gtkmm/2.x.nix
index 422fdebd9c86..119e3f77f670 100644
--- a/pkgs/development/libraries/gtkmm/2.x.nix
+++ b/pkgs/development/libraries/gtkmm/2.x.nix
@@ -1,16 +1,14 @@
 { stdenv, fetchurl, pkgconfig, gtk2, glibmm, cairomm, pangomm, atkmm }:
 
 stdenv.mkDerivation rec {
-  name = "gtkmm-${minVer}.4";
+  name = "gtkmm-${minVer}.5";
   minVer = "2.24";
 
   src = fetchurl {
     url = "mirror://gnome/sources/gtkmm/${minVer}/${name}.tar.xz";
-    sha256 = "1vpmjqv0aqb1ds0xi6nigxnhlr0c74090xzi15b92amlzkrjyfj4";
+    sha256 = "0680a53b7bf90b4e4bf444d1d89e6df41c777e0bacc96e9c09fc4dd2f5fe6b72";
   };
 
-  patches = [ ./gtkmm-2.24.4-missing-operator.patch ];
-
   nativeBuildInputs = [pkgconfig];
 
   propagatedBuildInputs = [ glibmm gtk2 atkmm cairomm pangomm ];
diff --git a/pkgs/development/libraries/gtkmm/gtkmm-2.24.4-missing-operator.patch b/pkgs/development/libraries/gtkmm/gtkmm-2.24.4-missing-operator.patch
deleted file mode 100644
index c1e8cf59dde1..000000000000
--- a/pkgs/development/libraries/gtkmm/gtkmm-2.24.4-missing-operator.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- gtkmm-2.24.4/gtk/gtkmm/menushell.cc.orig	2016-08-26 21:55:08.858311055 +0000
-+++ gtkmm-2.24.4/gtk/gtkmm/menushell.cc	2016-08-26 21:55:33.206310578 +0000
-@@ -130,7 +130,7 @@ MenuList::iterator MenuList::insert(Menu
- {
-   const Glib::RefPtr<Gtk::MenuItem> item = element.get_child();
- 
--  g_return_val_if_fail(item != 0, position);
-+  g_return_val_if_fail(!!item, position);
-   g_return_val_if_fail(gparent() != 0, position);
- 
-   int pos = -1;
\ No newline at end of file
diff --git a/pkgs/development/libraries/gvfs/default.nix b/pkgs/development/libraries/gvfs/default.nix
index 5ef8bbac5d16..f225f34c3364 100644
--- a/pkgs/development/libraries/gvfs/default.nix
+++ b/pkgs/development/libraries/gvfs/default.nix
@@ -1,19 +1,19 @@
 { stdenv, fetchurl, pkgconfig, intltool, libtool
-, glib, dbus, udev, libgudev, udisks2, libgcrypt
+, glib, dbus, udev, libgudev, udisks2, libgcrypt, libcap, polkit
 , libgphoto2, avahi, libarchive, fuse, libcdio
 , libxml2, libxslt, docbook_xsl, samba, libmtp
-, gnomeSupport ? false, gnome, libgnome_keyring, makeWrapper }:
+, gnomeSupport ? false, gnome, makeWrapper }:
 
 let
-  ver_maj = "1.22";
-  version = "${ver_maj}.4";
+  ver_maj = "1.30";
+  version = "${ver_maj}.1";
 in
 stdenv.mkDerivation rec {
   name = "gvfs-${version}";
 
   src = fetchurl {
     url = "mirror://gnome/sources/gvfs/${ver_maj}/${name}.tar.xz";
-    sha256 = "57e33faad35aba72be3822099856aca847f391626cf3ec734b42e64ba31f6484";
+    sha256 = "e752e7bb46e64e4025f63428d4f5247e3e5c0d0b5eeb4f81dbf1cd7b75f59d7b";
   };
 
   nativeBuildInputs = [ pkgconfig intltool libtool ];
@@ -21,13 +21,15 @@ stdenv.mkDerivation rec {
   buildInputs =
     [ makeWrapper glib dbus udev libgudev udisks2 libgcrypt
       libgphoto2 avahi libarchive fuse libcdio
-      libxml2 libxslt docbook_xsl samba libmtp
+      libxml2 libxslt docbook_xsl samba libmtp libcap polkit
       # ToDo: a ligther version of libsoup to have FTP/HTTP support?
     ] ++ stdenv.lib.optionals gnomeSupport (with gnome; [
-      gtk libsoup libgnome_keyring gconf
+      gtk libsoup libgnome_keyring gconf gcr
       # ToDo: not working and probably useless until gnome3 from x-updates
     ]);
 
+  configureFlags = stdenv.lib.optional (!gnomeSupport) "--disable-gcr";
+
   enableParallelBuilding = true;
 
   # ToDo: one probably should specify schemas for samba and others here
diff --git a/pkgs/development/libraries/jansson/default.nix b/pkgs/development/libraries/jansson/default.nix
index a24005487bee..5a3085ba7285 100644
--- a/pkgs/development/libraries/jansson/default.nix
+++ b/pkgs/development/libraries/jansson/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl}:
 
 stdenv.mkDerivation rec {
-  name = "jansson-2.8";
+  name = "jansson-2.9";
 
   src = fetchurl {
     url = "http://www.digip.org/jansson/releases/${name}.tar.gz";
-    sha256 = "0v7v82mv7x44rpcxmrpnmb8hqimx67qwsp2cz9mv3y0f37iykwnf";
+    sha256 = "19fjgfwjfj99rqa3kf96x5rssj88siazggksgrikd6h4r9sd1l0a";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/libraries/kde-frameworks/kcoreaddons.nix b/pkgs/development/libraries/kde-frameworks/kcoreaddons.nix
index a3d5735ad274..91bfd28df4eb 100644
--- a/pkgs/development/libraries/kde-frameworks/kcoreaddons.nix
+++ b/pkgs/development/libraries/kde-frameworks/kcoreaddons.nix
@@ -1,8 +1,15 @@
-{ kdeFramework, lib, ecm, shared_mime_info }:
+{ kdeFramework, lib, fetchurl, ecm, shared_mime_info }:
 
 kdeFramework {
   name = "kcoreaddons";
   meta = { maintainers = [ lib.maintainers.ttuegel ]; };
+  patches = [
+    (fetchurl {
+      url = "https://packaging.neon.kde.org/frameworks/kcoreaddons.git/plain/debian/patches/0001-Fix-very-old-bug-when-we-remove-space-in-url-as-foo-.patch?id=ab7258dd8a87668ba63c585a69f41f291254aa43";
+      sha256 = "0svdqbikmslc0n2gdwwlbdyi61m5qgy0lxxv9iglbs3ja09xqs0p";
+      name = "kcoreaddons-CVE-2016-7966.patch";
+    })
+  ];
   nativeBuildInputs = [ ecm ];
   propagatedBuildInputs = [ shared_mime_info ];
 }
diff --git a/pkgs/development/libraries/libcaca/default.nix b/pkgs/development/libraries/libcaca/default.nix
index 5ff3157272ee..04e1af2326b6 100644
--- a/pkgs/development/libraries/libcaca/default.nix
+++ b/pkgs/development/libraries/libcaca/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses, zlib, imlib2, pkgconfig, libX11 }:
+{ stdenv, fetchurl, ncurses, zlib, imlib2, pkgconfig, libX11, libXext }:
 
 stdenv.mkDerivation rec {
   name = "libcaca-0.99.beta19";
@@ -13,7 +13,8 @@ stdenv.mkDerivation rec {
 
   outputs = [ "bin" "dev" "out" "man" ];
 
-  propagatedBuildInputs = [ ncurses zlib imlib2 pkgconfig libX11 ];
+  propagatedBuildInputs = [ ncurses zlib imlib2 pkgconfig libX11 ]
+   ++ stdenv.lib.optional stdenv.isDarwin libXext;
 
   postInstall = ''
     mkdir -p $dev/bin
diff --git a/pkgs/development/libraries/libcue/default.nix b/pkgs/development/libraries/libcue/default.nix
index a5ff8d409b2f..a1639397b5ea 100644
--- a/pkgs/development/libraries/libcue/default.nix
+++ b/pkgs/development/libraries/libcue/default.nix
@@ -1,12 +1,19 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchFromGitHub, cmake, bison, flex }:
 stdenv.mkDerivation rec {
-  name = "libcue-1.4.0";
-  src = fetchurl {
-    url = "mirror://sourceforge/libcue/${name}.tar.bz2";
-    sha256 = "17kjd7rjz1bvfn44n3n2bjb7a1ywd0yc0g4sqp5ihf9b5bn7cwlb";
+  name = "libcue-${version}";
+  version = "2.1.0";
+
+  src = fetchFromGitHub {
+    owner = "lipnitsk";
+    repo = "libcue";
+    rev = "v${version}";
+    sha256 = "14a84d6sq3yp8s8i05lxvifjpkgpjwfpchrqf3bbpbwa8gvrc0rj";
   };
+
+  nativeBuildInputs = [ cmake bison flex ];
+
   meta = {
-    description = "A library to parse a cue sheet";
+    description = "CUE Sheet Parser Library";
     longDescription = ''
       libcue is intended to parse a so called cue sheet from a char string or
       a file pointer. For handling of the parsed data a convenient API is
diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix
index 64cfb7d56cac..f2174470becf 100644
--- a/pkgs/development/libraries/libdrm/default.nix
+++ b/pkgs/development/libraries/libdrm/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev, valgrind }:
 
 stdenv.mkDerivation rec {
-  name = "libdrm-2.4.70";
+  name = "libdrm-2.4.71";
 
   src = fetchurl {
     url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
-    sha256 = "b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b";
+    sha256 = "c66287ddeee5f46ea8f8880b94b80acb3bbc33ba6321d17767eef145046df9b8";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/libdwarf/default.nix b/pkgs/development/libraries/libdwarf/default.nix
index ec10619ba567..9989990e35da 100644
--- a/pkgs/development/libraries/libdwarf/default.nix
+++ b/pkgs/development/libraries/libdwarf/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, libelf }:
 
 stdenv.mkDerivation rec {
-  name = "libdwarf-20160613";
+  name = "libdwarf-20161001";
 
   src = fetchurl {
     url = "http://www.prevanders.net/${name}.tar.gz";
-    sha256 = "1nfdfn5xf3n485pvpb853awyxxnvrg207i0wmrr7bhk8fcxdxbn0";
+    sha512 = "2c522ae0b6e2afffd09e2e79562987fd819b197c9bce4900b6a4fd176b5ff229e88c6b755cfbae7831e7160ddeb3bfe2afbf39d756d7e75ec31ace0668554048";
   };
 
   configureFlags = " --enable-shared --disable-nonshared";
diff --git a/pkgs/development/libraries/libgee/0.8.nix b/pkgs/development/libraries/libgee/0.8.nix
new file mode 100644
index 000000000000..aba06d861078
--- /dev/null
+++ b/pkgs/development/libraries/libgee/0.8.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, pkgconfig, glib }:
+
+let
+  ver_maj = "0.8";
+  ver_min = "6";
+in
+stdenv.mkDerivation rec {
+  name = "libgee-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "https://download.gnome.org/sources/libgee/${ver_maj}/${name}.tar.xz";
+    sha256 = "1mp3bfghc8qh2v8h2pfhksda22mgy2d5ygm1jr3bir544nr8i4fg";
+  };
+
+  buildInputs = [ glib ];
+  nativeBuildInputs = [ pkgconfig ];
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "Utility library providing GObject-based interfaces and classes for commonly used data structures";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    homepage = "http://live.gnome.org/Libgee";
+    maintainers = with maintainers; [ sternenseemann ];
+  };
+}
diff --git a/pkgs/development/libraries/libhttpseverywhere/default.nix b/pkgs/development/libraries/libhttpseverywhere/default.nix
new file mode 100644
index 000000000000..27891fc4e4a2
--- /dev/null
+++ b/pkgs/development/libraries/libhttpseverywhere/default.nix
@@ -0,0 +1,39 @@
+{stdenv, fetchFromGitHub, gnome3, glib, json_glib, libxml2, libarchive, libsoup, gobjectIntrospection, meson, ninja, pkgconfig,  valadoc}:
+
+stdenv.mkDerivation rec {
+  name = "libhttpseverywhere-${version}";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "grindhold";
+    repo  = "libhttpseverywhere";
+    rev = "${version}";
+    sha256 = "1b8bcg4jp2h3nwk1g7jgswsipqzkjq2gb017v07wb7nvl6kdi0rc";
+  };
+
+  nativeBuildInputs = [ gnome3.vala valadoc  gobjectIntrospection meson ninja pkgconfig ];
+  buildInputs = [ glib gnome3.libgee libxml2 json_glib libsoup libarchive ];
+
+  patches = [ ./meson.patch ];
+
+  configurePhase = ''
+    mkdir build
+    cd build
+    meson.py --prefix "$out" ..
+  '';
+
+  buildPhase = ''
+    ninja
+    ninja devhelp
+  '';
+
+  installPhase = "ninja install";
+
+  meta = {
+    description = "library to use HTTPSEverywhere in desktop applications";
+    homepage    = https://github.com/grindhold/libhttpseverywhere;
+    license     = stdenv.lib.licenses.lgpl3;
+    platforms   = stdenv.lib.platforms.linux;
+    maintainers = with stdenv.lib.maintainers; [ sternenseemann ];
+  };
+}
diff --git a/pkgs/development/libraries/libhttpseverywhere/meson.patch b/pkgs/development/libraries/libhttpseverywhere/meson.patch
new file mode 100644
index 000000000000..3a86bf6b8369
--- /dev/null
+++ b/pkgs/development/libraries/libhttpseverywhere/meson.patch
@@ -0,0 +1,13 @@
+diff --git a/meson.build b/meson.build
+index c20c2f9..f40bb2b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -19,7 +19,7 @@
+ # If not, see http://www.gnu.org/licenses/.
+ #*********************************************************************
+ 
+-project ('httpseverywhere', ['vala','c'])
++project ('httpseverywhere', 'vala','c')
+ 
+ pkgconfig = import('pkgconfig')
+ 
diff --git a/pkgs/development/libraries/libmikmod/default.nix b/pkgs/development/libraries/libmikmod/default.nix
index 806f0e9cd824..f6dc4b862921 100644
--- a/pkgs/development/libraries/libmikmod/default.nix
+++ b/pkgs/development/libraries/libmikmod/default.nix
@@ -4,10 +4,10 @@ let
   inherit (stdenv.lib) optional optionals optionalString;
 
 in stdenv.mkDerivation rec {
-  name = "libmikmod-3.3.7";
+  name = "libmikmod-3.3.10";
   src = fetchurl {
     url = "mirror://sourceforge/mikmod/${name}.tar.gz";
-    sha256 = "18nrkf5l50hfg0y50yxr7bvik9f002lhn8c00nbcp6dgm5011x2c";
+    sha256 = "0j7g4jpa2zgzw7x6s3rldypa7zlwjvn97rwx0sylx1iihhlzbcq0";
   };
 
   buildInputs = [ texinfo ]
diff --git a/pkgs/development/libraries/libmpcdec/default.nix b/pkgs/development/libraries/libmpcdec/default.nix
index 64cf460d75a0..084d7ba73704 100644
--- a/pkgs/development/libraries/libmpcdec/default.nix
+++ b/pkgs/development/libraries/libmpcdec/default.nix
@@ -1,13 +1,16 @@
-{stdenv, fetchurl}:
+{ stdenv, fetchurl }:
 
 stdenv.mkDerivation {
   name = "libmpcdec-1.2.6";
+
   src = fetchurl {
     url = http://files.musepack.net/source/libmpcdec-1.2.6.tar.bz2;
-    md5 = "7f7a060e83b4278acf4b77d7a7b9d2c0";
+    sha256 = "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab";
   };
 
   meta = {
+    description = "Musepack SV7 decoder library";
     platforms = stdenv.lib.platforms.unix;
+    license = stdenv.lib.licenses.bsd3;
   };
 }
diff --git a/pkgs/development/libraries/libsamplerate/default.nix b/pkgs/development/libraries/libsamplerate/default.nix
index d7cb741a042a..faeeb34d65dd 100644
--- a/pkgs/development/libraries/libsamplerate/default.nix
+++ b/pkgs/development/libraries/libsamplerate/default.nix
@@ -4,20 +4,18 @@ let
   inherit (stdenv.lib) optionals optionalString;
 
 in stdenv.mkDerivation rec {
-  name = "libsamplerate-0.1.8";
+  name = "libsamplerate-0.1.9";
 
   src = fetchurl {
     url = "http://www.mega-nerd.com/SRC/${name}.tar.gz";
-    sha256 = "01hw5xjbjavh412y63brcslj5hi9wdgkjd3h9csx5rnm8vglpdck";
+    sha256 = "1ha46i0nbibq0pl0pjwcqiyny4hj8lp1bnl4dpxm64zjw9lb2zha";
   };
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ libsndfile ]
     ++ optionals stdenv.isDarwin [ ApplicationServices CoreServices ];
 
-  # maybe interesting configure flags:
-  #--disable-fftw          disable usage of FFTW
-  #--disable-cpu-clip      disable tricky cpu specific clipper
+  configureFlags = [ "--disable-fftw" ];
 
   outputs = [ "bin" "dev" "out" ];
 
diff --git a/pkgs/development/libraries/libsodium/default.nix b/pkgs/development/libraries/libsodium/default.nix
index b0bef6149d55..e0ad21008046 100644
--- a/pkgs/development/libraries/libsodium/default.nix
+++ b/pkgs/development/libraries/libsodium/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "libsodium-1.0.10";
+  name = "libsodium-1.0.11";
 
   src = fetchurl {
     url = "https://download.libsodium.org/libsodium/releases/${name}.tar.gz";
-    sha256 = "1gn45g956lyz8l6iq187yc6l627vyivyp8qc5dkr6dnhdnlqddvi";
+    sha256 = "0rf7z6bgpnf8lyz8sph4h43fbb28pmj4dgybf0hsxxj97kdljid1";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/libsolv/default.nix b/pkgs/development/libraries/libsolv/default.nix
index cece520e3c58..480891e98af9 100644
--- a/pkgs/development/libraries/libsolv/default.nix
+++ b/pkgs/development/libraries/libsolv/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub, cmake, zlib, expat, rpm, db }:
 
 stdenv.mkDerivation rec {
-  rev  = "0.6.20";
+  rev  = "0.6.23";
   name = "libsolv-${rev}";
 
   src = fetchFromGitHub {
     inherit rev;
     owner  = "openSUSE";
     repo   = "libsolv";
-    sha256 = "1gammarbnjbbkw2vlgcj9ynp1kgi5nns6xcl6ab8b5i4zgq91v2p";
+    sha256 = "08ba7yx0br421lk6zf5mp0yl6nznkmc2vbka20qwm2lx5f0a25xg";
   };
 
   cmakeFlags = "-DENABLE_RPMMD=true -DENABLE_RPMDB=true -DENABLE_PUBKEY=true -DENABLE_RPMDB_BYRPMHEADER=true";
diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix
index 707129a16bb7..1489ab627742 100644
--- a/pkgs/development/libraries/libsoup/default.nix
+++ b/pkgs/development/libraries/libsoup/default.nix
@@ -4,15 +4,15 @@
 , libintlOrEmpty
 , intltool, python }:
 let
-  majorVersion = "2.54";
-  version = "${majorVersion}.1";
+  majorVersion = "2.56";
+  version = "${majorVersion}.0";
 in
 stdenv.mkDerivation {
   name = "libsoup-${version}";
 
   src = fetchurl {
     url = "mirror://gnome/sources/libsoup/${majorVersion}/libsoup-${version}.tar.xz";
-    sha256 = "0cyn5pq4xl1gb8413h2p4d5wrn558dc054zhwmk4swrl40ijrd27";
+    sha256 = "d8216b71de8247bc6f274ec054c08547b2e04369c1f8add713e9350c8ef81fe5";
   };
 
   prePatch = ''
diff --git a/pkgs/development/libraries/libuecc/default.nix b/pkgs/development/libraries/libuecc/default.nix
new file mode 100644
index 000000000000..3b45d4de8842
--- /dev/null
+++ b/pkgs/development/libraries/libuecc/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchgit, cmake }:
+
+stdenv.mkDerivation rec {
+  version = "7";
+  name = "libuecc-${version}";
+
+  src = fetchgit {
+    url = "git://git.universe-factory.net/libuecc";
+    rev = "refs/tags/v${version}";
+    sha256 = "1sm05aql75sh13ykgsv3ns4x4zzw9lvzid6misd22gfgf6r9n5fs";
+  };
+
+  buildInputs = [ cmake ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Very small Elliptic Curve Cryptography library";
+    homepage = https://git.universe-factory.net/libuecc;
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ fpletz ];
+  };
+}
diff --git a/pkgs/development/libraries/libunistring/default.nix b/pkgs/development/libraries/libunistring/default.nix
index 7f32f37a704d..5b9c8facdb14 100644
--- a/pkgs/development/libraries/libunistring/default.nix
+++ b/pkgs/development/libraries/libunistring/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
 
   patches = stdenv.lib.optional stdenv.isDarwin [ ./clang.patch ];
 
-  propagatedBuildInputs = [ libiconv ];
+  propagatedBuildInputs = stdenv.lib.optional (!stdenv.isLinux) libiconv;
 
   configureFlags = [
     "--with-libiconv-prefix=${libiconv}"
diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix
index 80f49c924829..ea89bb859e5f 100644
--- a/pkgs/development/libraries/openssl/default.nix
+++ b/pkgs/development/libraries/openssl/default.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchurl, perl
-, withCryptodev ? false, cryptodevHeaders }:
+, withCryptodev ? false, cryptodevHeaders
+, enableSSL2 ? false }:
 
 with stdenv.lib;
 
@@ -44,7 +45,7 @@ let
     ] ++ stdenv.lib.optionals withCryptodev [
       "-DHAVE_CRYPTODEV"
       "-DUSE_CRYPTODEV_DIGESTS"
-    ];
+    ] ++ stdenv.lib.optional enableSSL2 "enable-ssl2";
 
   makeFlags = [ "MANDIR=$(man)/share/man" ];
 
diff --git a/pkgs/development/libraries/pangomm/default.nix b/pkgs/development/libraries/pangomm/default.nix
index 0de99ece5c43..6850c13b44e9 100644
--- a/pkgs/development/libraries/pangomm/default.nix
+++ b/pkgs/development/libraries/pangomm/default.nix
@@ -2,14 +2,14 @@
 
 let
   ver_maj = "2.40";
-  ver_min = "0";
+  ver_min = "1";
 in
 stdenv.mkDerivation rec {
   name = "pangomm-${ver_maj}.${ver_min}";
 
   src = fetchurl {
     url = "mirror://gnome/sources/pangomm/${ver_maj}/${name}.tar.xz";
-    sha256 = "03fpqdjp7plybf4zsgszbm8yhgl28vmajzfpmaqcsmyfvjlszl3x";
+    sha256 = "9762ee2a2d5781be6797448d4dd2383ce14907159b30bc12bf6b08e7227be3af";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/libraries/quickder/default.nix b/pkgs/development/libraries/quickder/default.nix
new file mode 100644
index 000000000000..2ee3a61aacfc
--- /dev/null
+++ b/pkgs/development/libraries/quickder/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, fetchurl, hexio, python, which, asn2quickder, bash }:
+
+stdenv.mkDerivation rec {
+  pname = "quickder";
+  name = "${pname}-${version}";
+  version = "1.0-RC1";
+
+  src = fetchFromGitHub {
+    sha256 = "05gw5dqkw3l8kwwm0044zpxhcp7sxicx9wxbfyr49c91403p870w";
+    rev = "version-${version}";
+    owner = "vanrein";
+    repo = "quick-der";
+  };
+
+  buildInputs = [ which asn2quickder bash ];
+
+  patchPhase = ''
+    substituteInPlace Makefile \
+      --replace 'lib tool test rfc' 'lib test rfc'
+    substituteInPlace ./rfc/Makefile \
+      --replace 'ASN2QUICKDER_CMD = ' 'ASN2QUICKDER_CMD = ${asn2quickder}/bin/asn2quickder #'
+    '';
+
+  installFlags = "ASN2QUICKDER_DIR=${asn2quickder}/bin ASN2QUICKDER_CMD=${asn2quickder}/bin/asn2quickder";
+  installPhase = ''
+    mkdir -p $out/lib $out/man
+    make DESTDIR=$out PREFIX=/ all
+    make DESTDIR=$out PREFIX=/ install
+    '';
+
+  meta = with stdenv.lib; {
+    description = "Quick (and Easy) DER, a Library for parsing ASN.1";
+    homepage = https://github.com/vanrein/quick-der;
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ leenaars ];
+  };
+}
diff --git a/pkgs/development/libraries/unixODBC/default.nix b/pkgs/development/libraries/unixODBC/default.nix
index e40f362a3b10..99ab8a056162 100644
--- a/pkgs/development/libraries/unixODBC/default.nix
+++ b/pkgs/development/libraries/unixODBC/default.nix
@@ -15,6 +15,6 @@ stdenv.mkDerivation rec {
     description = "ODBC driver manager for Unix";
     homepage = http://www.unixodbc.org/;
     license = licenses.lgpl2;
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/uri/default.nix b/pkgs/development/libraries/uri/default.nix
new file mode 100644
index 000000000000..61ac651256a2
--- /dev/null
+++ b/pkgs/development/libraries/uri/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, cmake, doxygen }:
+
+stdenv.mkDerivation {
+  name = "uri-2016-09-04";
+
+  src = fetchFromGitHub {
+    owner = "cpp-netlib";
+    repo = "uri";
+    rev = "8b1eec80621ea7be1db3b28f1621e531cc72855c";
+    sha256 = "0f77y79b11pp31y0qpydki2nnxd6gpycp24fmrapi70fsni2ah0d";
+  };
+
+  buildInputs = [ cmake doxygen ];
+
+  cmakeFlags = [ "-DUri_BUILD_TESTS=OFF" "-DBUILD_SHARED_LIBS=ON" ];
+
+  postBuild = ''
+    make doc
+  '';
+
+  # https://github.com/cpp-netlib/uri/issues/90
+  postInstall = ''
+    mv $out/include $out/include2
+    mv $out/include2/include $out/
+    rmdir $out/include2
+    mkdir -p $out/share/doc
+    mv html $out/share/doc/uri
+  '';
+
+  meta = {
+    description = "C++ URI library";
+    homepage = http://cpp-netlib.org;
+    license = stdenv.lib.licenses.boost;
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/vaapi-intel/default.nix b/pkgs/development/libraries/vaapi-intel/default.nix
index 0bc3c196c460..922aed61ed6d 100644
--- a/pkgs/development/libraries/vaapi-intel/default.nix
+++ b/pkgs/development/libraries/vaapi-intel/default.nix
@@ -3,11 +3,11 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "libva-intel-driver-1.7.0";
+  name = "libva-intel-driver-1.7.2";
 
   src = fetchurl {
     url = "http://www.freedesktop.org/software/vaapi/releases/libva-intel-driver/${name}.tar.bz2";
-    sha256 = "032w8d0whymi5ac8fk7c5d8nnxxsjgwymw644g7gp959i73xc6cx";
+    sha256 = "1g371q9p31i57fkidjp2akvrbaadpyx3bwmg5kn72sc2mbv7p7h9";
   };
 
   patchPhase = ''
diff --git a/pkgs/development/libraries/webkitgtk/2.14.nix b/pkgs/development/libraries/webkitgtk/2.14.nix
index fca358ed4305..7439d72151dd 100644
--- a/pkgs/development/libraries/webkitgtk/2.14.nix
+++ b/pkgs/development/libraries/webkitgtk/2.14.nix
@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
 
   # XXX: WebKit2 missing include path for gst-plugins-base.
   # Filled: https://bugs.webkit.org/show_bug.cgi?id=148894
-  #NIX_CFLAGS_COMPILE = "-I${gst-plugins-base.dev}/include/gstreamer-1.0";
+  NIX_CFLAGS_COMPILE = "-I${gst-plugins-base.dev}/include/gstreamer-1.0";
 
   nativeBuildInputs = [
     cmake perl python ruby bison gperf sqlite
diff --git a/pkgs/development/libraries/zeroc-ice/default.nix b/pkgs/development/libraries/zeroc-ice/default.nix
index 144af122d73f..33c30a96251d 100644
--- a/pkgs/development/libraries/zeroc-ice/default.nix
+++ b/pkgs/development/libraries/zeroc-ice/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "zeroc-ice-${version}";
-  version = "3.6.1";
+  version = "3.6.3";
 
   src = fetchFromGitHub {
     owner = "zeroc-ice";
     repo = "ice";
     rev = "v${version}";
-    sha256 = "044511zbhwiach1867r3xjz8i4931wn7c1l3nz4kcpgks16kqhhz";
+    sha256 = "05xympbns32aalgcfcpxwfd7bvg343f16xpg6jv5s335ski3cjy2";
   };
 
   buildInputs = [ mcpp bzip2 expat openssl db5 ];
diff --git a/pkgs/development/mobile/androidenv/androidsdk.nix b/pkgs/development/mobile/androidenv/androidsdk.nix
index 0126d6981e72..a742386920bb 100644
--- a/pkgs/development/mobile/androidenv/androidsdk.nix
+++ b/pkgs/development/mobile/androidenv/androidsdk.nix
@@ -1,8 +1,9 @@
 { stdenv, stdenv_32bit, fetchurl, unzip, makeWrapper
-, platformTools, buildTools, support, supportRepository, platforms, sysimages, addons
+, platformTools, buildTools, support, supportRepository, platforms, sysimages, addons, sources
 , libX11, libXext, libXrender, libxcb, libXau, libXdmcp, libXtst, mesa, alsaLib
 , freetype, fontconfig, glib, gtk2, atk, file, jdk, coreutils, libpulseaudio, dbus
 , zlib, glxinfo, xkeyboardconfig
+, includeSources
 }:
 { platformVersions, abiVersions, useGoogleAPIs, useExtraSupportLibs ? false, useGooglePlayServices ? false }:
 
@@ -165,6 +166,22 @@ stdenv.mkDerivation rec {
       
     cd ../..
 
+    # Symlink required sources
+    mkdir -p sources
+    cd sources
+
+    ${if includeSources then
+        stdenv.lib.concatMapStrings (platformVersion:
+        if (builtins.hasAttr ("source_"+platformVersion) sources) then
+          let
+            source = builtins.getAttr ("source_"+platformVersion) sources;
+          in
+          "ln -s ${source}/* android-${platformVersion}\n"
+        else "") platformVersions
+      else ""}
+
+    cd ..
+
     # Symlink required platforms
    
     mkdir -p platforms
diff --git a/pkgs/development/mobile/androidenv/default.nix b/pkgs/development/mobile/androidenv/default.nix
index a21edcc06962..7ecb82ce4060 100644
--- a/pkgs/development/mobile/androidenv/default.nix
+++ b/pkgs/development/mobile/androidenv/default.nix
@@ -1,4 +1,4 @@
-{pkgs, pkgs_i686}:
+{pkgs, pkgs_i686, includeSources ? true}:
 
 rec {
   platformTools = import ./platform-tools.nix {
@@ -39,12 +39,16 @@ rec {
     inherit (pkgs) stdenv fetchurl unzip;
   };
 
+  sources = import ./sources.nix {
+    inherit (pkgs) stdenv fetchurl unzip;
+  };
+
   androidsdk = import ./androidsdk.nix {
     inherit (pkgs) stdenv fetchurl unzip makeWrapper;
     inherit (pkgs) zlib glxinfo freetype fontconfig glib gtk2 atk mesa file alsaLib jdk coreutils libpulseaudio dbus;
     inherit (pkgs.xorg) libX11 libXext libXrender libxcb libXau libXdmcp libXtst xkeyboardconfig;
     
-    inherit platformTools buildTools support supportRepository platforms sysimages addons;
+    inherit platformTools buildTools support supportRepository platforms sysimages addons sources includeSources;
     
     stdenv_32bit = pkgs_i686.stdenv;
   };
diff --git a/pkgs/development/mobile/androidenv/fetch.sh b/pkgs/development/mobile/androidenv/fetch.sh
index c14c060fc677..cd9f29a4c247 100755
--- a/pkgs/development/mobile/androidenv/fetch.sh
+++ b/pkgs/development/mobile/androidenv/fetch.sh
@@ -12,3 +12,4 @@ curl -o sys-img.xml       https://dl.google.com/android/repository/sys-img/andro
 ./generate-addons.sh
 ./generate-platforms.sh
 ./generate-sysimages.sh
+./generate-sources.sh
diff --git a/pkgs/development/mobile/androidenv/generate-sources.sh b/pkgs/development/mobile/androidenv/generate-sources.sh
new file mode 100755
index 000000000000..861fbbf9d2e6
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generate-sources.sh
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+xsltproc generate-sources.xsl repository-11.xml > sources.nix
diff --git a/pkgs/development/mobile/androidenv/generate-sources.xsl b/pkgs/development/mobile/androidenv/generate-sources.xsl
new file mode 100644
index 000000000000..ad76369b2be0
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/generate-sources.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:sdk="http://schemas.android.com/sdk/android/repository/11">
+
+  <xsl:output omit-xml-declaration="yes" indent="no" />
+
+  <xsl:template name="repository-url">
+    <xsl:variable name="raw-url" select="sdk:archives/sdk:archive/sdk:url"/>
+    <xsl:choose>
+      <xsl:when test="starts-with($raw-url, 'http')">
+        <xsl:value-of select="$raw-url"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>https://dl.google.com/android/repository/</xsl:text>
+        <xsl:value-of select="$raw-url"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="/sdk:sdk-repository">
+# This file is generated from generate-sources.sh. DO NOT EDIT.
+# Execute generate-sources.sh or fetch.sh to update the file.
+{stdenv, fetchurl, unzip}:
+
+let
+  buildSource = args:
+    stdenv.mkDerivation (args // {
+      buildInputs = [ unzip ];
+      buildCommand = ''
+        mkdir -p $out
+        cd $out
+        unzip $src
+    '';
+  });
+in
+{
+<xsl:for-each select="sdk:source"><xsl:sort select="sdk:api-level" data-type="number"/>
+  source_<xsl:value-of select="sdk:api-level" /> = buildSource {
+    name = "android-source-<xsl:value-of select="sdk:api-level" />";
+    src = fetchurl {
+      url = <xsl:call-template name="repository-url"/>;
+      sha1 = "<xsl:value-of select="sdk:archives/sdk:archive/sdk:checksum[@type='sha1']" />";
+    };
+    meta = {
+      description = "Source code for Android API <xsl:value-of select="sdk:api-level" />";
+    };
+  };
+</xsl:for-each>
+}
+</xsl:template>
+</xsl:stylesheet>
diff --git a/pkgs/development/mobile/androidenv/sources.nix b/pkgs/development/mobile/androidenv/sources.nix
new file mode 100644
index 000000000000..5bb7409c2c4e
--- /dev/null
+++ b/pkgs/development/mobile/androidenv/sources.nix
@@ -0,0 +1,140 @@
+
+# This file is generated from generate-sources.sh. DO NOT EDIT.
+# Execute generate-sources.sh or fetch.sh to update the file.
+{stdenv, fetchurl, unzip}:
+
+let
+  buildSource = args:
+    stdenv.mkDerivation (args // {
+      buildInputs = [ unzip ];
+      buildCommand = ''
+        mkdir -p $out
+        cd $out
+        unzip $src
+    '';
+  });
+in
+{
+
+  source_14 = buildSource {
+    name = "android-source-14";
+    src = fetchurl {
+      url = https://dl.google.com/android/repository/sources-14_r01.zip;
+      sha1 = "eaf4ed7dcac46e68516a1b4aa5b0d9e5a39a7555";
+    };
+    meta = {
+      description = "Source code for Android API 14";
+    };
+  };
+
+  source_15 = buildSource {
+    name = "android-source-15";
+    src = fetchurl {
+      url = https://dl.google.com/android/repository/sources-15_r02.zip;
+      sha1 = "e5992a5747c9590783fbbdd700337bf0c9f6b1fa";
+    };
+    meta = {
+      description = "Source code for Android API 15";
+    };
+  };
+
+  source_16 = buildSource {
+    name = "android-source-16";
+    src = fetchurl {
+      url = https://dl.google.com/android/repository/sources-16_r02.zip;
+      sha1 = "0f83c14ed333c45d962279ab5d6bc98a0269ef84";
+    };
+    meta = {
+      description = "Source code for Android API 16";
+    };
+  };
+
+  source_17 = buildSource {
+    name = "android-source-17";
+    src = fetchurl {
+      url = https://dl.google.com/android/repository/sources-17_r01.zip;
+      sha1 = "6f1f18cd2d2b1852d7f6892df9cee3823349d43a";
+    };
+    meta = {
+      description = "Source code for Android API 17";
+    };
+  };
+
+  source_18 = buildSource {
+    name = "android-source-18";
+    src = fetchurl {
+      url = https://dl.google.com/android/repository/sources-18_r01.zip;
+      sha1 = "8b49fdf7433f4881a2bfb559b5dd05d8ec65fb78";
+    };
+    meta = {
+      description = "Source code for Android API 18";
+    };
+  };
+
+  source_19 = buildSource {
+    name = "android-source-19";
+    src = fetchurl {
+      url = https://dl.google.com/android/repository/sources-19_r02.zip;
+      sha1 = "433a1d043ef77561571250e94cb7a0ef24a202e7";
+    };
+    meta = {
+      description = "Source code for Android API 19";
+    };
+  };
+
+  source_20 = buildSource {
+    name = "android-source-20";
+    src = fetchurl {
+      url = https://dl.google.com/android/repository/sources-20_r01.zip;
+      sha1 = "8da3e40f2625f9f7ef38b7e403f49f67226c0d76";
+    };
+    meta = {
+      description = "Source code for Android API 20";
+    };
+  };
+
+  source_21 = buildSource {
+    name = "android-source-21";
+    src = fetchurl {
+      url = https://dl.google.com/android/repository/sources-21_r01.zip;
+      sha1 = "137a5044915d32bea297a8c1552684802bbc2e25";
+    };
+    meta = {
+      description = "Source code for Android API 21";
+    };
+  };
+
+  source_22 = buildSource {
+    name = "android-source-22";
+    src = fetchurl {
+      url = https://dl.google.com/android/repository/sources-22_r01.zip;
+      sha1 = "98320e13976d11597a4a730a8d203ac9a03ed5a6";
+    };
+    meta = {
+      description = "Source code for Android API 22";
+    };
+  };
+
+  source_23 = buildSource {
+    name = "android-source-23";
+    src = fetchurl {
+      url = https://dl.google.com/android/repository/sources-23_r01.zip;
+      sha1 = "b0f15da2762b42f543c5e364c2b15b198cc99cc2";
+    };
+    meta = {
+      description = "Source code for Android API 23";
+    };
+  };
+
+  source_24 = buildSource {
+    name = "android-source-24";
+    src = fetchurl {
+      url = https://dl.google.com/android/repository/sources-24_r01.zip;
+      sha1 = "6b96115830a83d654479f32ce4b724ca9011148b";
+    };
+    meta = {
+      description = "Source code for Android API 24";
+    };
+  };
+
+}
diff --git a/pkgs/development/ocaml-modules/expat/default.nix b/pkgs/development/ocaml-modules/expat/default.nix
index 0ecb135b4e8f..5fcc317d9408 100644
--- a/pkgs/development/ocaml-modules/expat/default.nix
+++ b/pkgs/development/ocaml-modules/expat/default.nix
@@ -28,7 +28,8 @@ stdenv.mkDerivation rec {
     substituteInPlace "unittest.ml" \
       --replace "/home/maas/xml-samples/REC-xml-19980210.xml.txt" "${testcase}"
     substituteInPlace Makefile --replace "EXPAT_LIBDIR=/usr/local/lib" "EXPAT_LIBDIR=${expat.out}/lib" \
-    substituteInPlace Makefile --replace "EXPAT_INCDIR=/usr/local/include" "EXPAT_INCDIR=${expat.dev}/include" \
+      --replace "EXPAT_INCDIR=/usr/local/include" "EXPAT_INCDIR=${expat.dev}/include" \
+      --replace "gcc" "\$(CC)"
   '';
 
   configurePhase = "true";  	# Skip configure
diff --git a/pkgs/development/ocaml-modules/gapi-ocaml/default.nix b/pkgs/development/ocaml-modules/gapi-ocaml/default.nix
index 06a67e9cb8b6..224f3537a2e0 100644
--- a/pkgs/development/ocaml-modules/gapi-ocaml/default.nix
+++ b/pkgs/development/ocaml-modules/gapi-ocaml/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocurl, cryptokit, ocaml_extlib, yojson, ocamlnet, xmlm }:
+{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, ocurl, cryptokit, ocaml_extlib, yojson, ocamlnet, xmlm }:
 
 stdenv.mkDerivation rec {
   name = "gapi-ocaml-0.2.10";
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
     url = "https://forge.ocamlcore.org/frs/download.php/1601/${name}.tar.gz";
     sha256 = "0kg4j7dhr7jynpy8x53bflqjf78jyl14j414l6px34xz7c9qx5fl";
   };
-  buildInputs = [ ocaml findlib ];
+  buildInputs = [ ocaml findlib ocamlbuild ];
   propagatedBuildInputs = [ ocurl cryptokit ocaml_extlib yojson ocamlnet xmlm ];
 
   configurePhase = "ocaml setup.ml -configure --prefix $out";
diff --git a/pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix b/pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix
index e5efb786a943..9bc1cbb59e46 100644
--- a/pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix
+++ b/pkgs/development/ocaml-modules/janestreet/ppx-variants-conv.nix
@@ -1,10 +1,10 @@
 {stdenv, buildOcamlJane,
- ppx_core, ppx_tools, ppx_type_conv, sexplib}:
+ ppx_core, ppx_tools, ppx_type_conv, sexplib, variantslib}:
 
 buildOcamlJane rec {
   name = "ppx_variants_conv";
   hash = "0kgal8b9yh7wrd75hllb9fyl6zbksfnr9k7pykpzdm3js98dirhn";
-  propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv sexplib];
+  propagatedBuildInputs = [ ppx_core ppx_tools ppx_type_conv sexplib variantslib ];
 
   meta = with stdenv.lib; {
     description = "Generation of accessor and iteration functions for ocaml variant types";
diff --git a/pkgs/development/ocaml-modules/lambda-term/1.6.nix b/pkgs/development/ocaml-modules/lambda-term/1.6.nix
index 026f67d8ef44..4638748160a2 100644
--- a/pkgs/development/ocaml-modules/lambda-term/1.6.nix
+++ b/pkgs/development/ocaml-modules/lambda-term/1.6.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libev, ocaml, findlib, ocaml_lwt, ocaml_react, zed, camlp4 }:
+{ stdenv, fetchurl, libev, ocaml, findlib, ocamlbuild, ocaml_lwt, ocaml_react, zed, camlp4 }:
 
 stdenv.mkDerivation rec {
   version = "1.6";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "1rhfixdgpylxznf6sa9wr31wb4pjzpfn5mxhxqpbchmpl2afwa09";
   };
 
-  buildInputs = [ libev ocaml findlib ocaml_lwt ocaml_react ];
+  buildInputs = [ libev ocaml findlib ocamlbuild ocaml_lwt ocaml_react ];
 
   propagatedBuildInputs = [ camlp4 zed ];
 
diff --git a/pkgs/development/ocaml-modules/lambda-term/default.nix b/pkgs/development/ocaml-modules/lambda-term/default.nix
index 60afad57b57b..f66773d426af 100644
--- a/pkgs/development/ocaml-modules/lambda-term/default.nix
+++ b/pkgs/development/ocaml-modules/lambda-term/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libev, ocaml, findlib, ocaml_lwt, ocaml_react, zed }:
+{ stdenv, fetchurl, libev, ocaml, findlib, ocamlbuild, ocaml_lwt, ocaml_react, zed }:
 
 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01";
 
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "1kwpsqds51xmy3z3ddkam92hkl7arlzy9awhzsq62ysxcl91fb8m";
   };
 
-  buildInputs = [ libev ocaml findlib ocaml_react ];
+  buildInputs = [ libev ocaml findlib ocamlbuild ocaml_react ];
 
   propagatedBuildInputs = [ zed ocaml_lwt ];
 
diff --git a/pkgs/development/ocaml-modules/llvm/default.nix b/pkgs/development/ocaml-modules/llvm/default.nix
index 2f58c41ba355..351a773a6f7b 100644
--- a/pkgs/development/ocaml-modules/llvm/default.nix
+++ b/pkgs/development/ocaml-modules/llvm/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   configurePhase = ''
     mkdir build
     cd build
-    ../configure CC=gcc CXX=g++ --disable-compiler-version-checks --prefix=$out \
+    ../configure --disable-compiler-version-checks --prefix=$out \
     --disable-doxygen --disable-docs --with-ocaml-libdir=$OCAMLFIND_DESTDIR/llvm \
     --enable-static
     '';
diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix
index 4c99ff2b6859..9eeed1285dcc 100644
--- a/pkgs/development/ocaml-modules/lwt/default.nix
+++ b/pkgs/development/ocaml-modules/lwt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchzip, which, cryptopp, ocaml, findlib, ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, ocaml_text, glib, camlp4, ppx_tools }:
+{ stdenv, fetchzip, which, cryptopp, ocaml, findlib, ocamlbuild, ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, ocaml_text, glib, camlp4, ppx_tools }:
 
 let
   inherit (stdenv.lib) optional getVersion versionAtLeast;
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
     sha256 = "0gmhm282r8yi0gwcv0g2s7qchkfjmhqbqf4j9frlyv665ink9kxl";
   };
 
-  buildInputs = [ ocaml_oasis pkgconfig which cryptopp ocaml findlib glib ncurses camlp4 ppx_tools ];
+  buildInputs = [ ocaml_oasis pkgconfig which cryptopp ocaml findlib ocamlbuild glib ncurses camlp4 ppx_tools ];
 
   propagatedBuildInputs = [ ocaml_react ocaml_ssl ocaml_text libev ];
 
diff --git a/pkgs/development/ocaml-modules/markup/default.nix b/pkgs/development/ocaml-modules/markup/default.nix
index d4a38d9bd9e4..a177ae240d14 100644
--- a/pkgs/development/ocaml-modules/markup/default.nix
+++ b/pkgs/development/ocaml-modules/markup/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, uutf, lwt }:
+{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, uutf, lwt }:
 
 stdenv.mkDerivation rec {
   pname = "ocaml-markup";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "0d3wi22v7h0iqzq8dgl0g4fj2wb67gvmbzdckacifghinrx762k3";
     };
 
-  buildInputs = [ocaml findlib];
+  buildInputs = [ ocaml findlib ocamlbuild ];
 
   installPhase = "make ocamlfind-install";
   
diff --git a/pkgs/development/ocaml-modules/ocamlnet/default.nix b/pkgs/development/ocaml-modules/ocamlnet/default.nix
index 73351ea633f4..fc7640cc0c94 100644
--- a/pkgs/development/ocaml-modules/ocamlnet/default.nix
+++ b/pkgs/development/ocaml-modules/ocamlnet/default.nix
@@ -2,11 +2,11 @@
 , gnutls, nettle }:
 
 stdenv.mkDerivation {
-  name = "ocamlnet-4.1.1";
+  name = "ocamlnet-4.1.2";
 
   src = fetchurl {
-    url = http://download.camlcity.org/download/ocamlnet-4.1.1.tar.gz;
-    sha256 = "1z0j542dfzfimsn4asw1ycb4ww561pv92cz6s6kxazvgx60c5rb1";
+    url = http://download.camlcity.org/download/ocamlnet-4.1.2.tar.gz;
+    sha256 = "1n0l9zlq7dc5yr43bpa4a0b6bxj3iyjkadbb41g59zlwa8hkk34i";
   };
 
   buildInputs = [ ncurses ocaml findlib ocaml_pcre camlzip gnutls pkgconfig nettle ];
diff --git a/pkgs/development/ocaml-modules/react/default.nix b/pkgs/development/ocaml-modules/react/default.nix
index 66c2533853e6..2dffbcf440f9 100644
--- a/pkgs/development/ocaml-modules/react/default.nix
+++ b/pkgs/development/ocaml-modules/react/default.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = http://erratique.ch/software/react/releases/react-1.2.0.tbz;
-    sha256 = "1gymn8hy7ga0l9qymmb1jcnnkqvy7l2zr87xavzqz0dfi9ci8dm7";
+    sha256 = "0knhgbngphv5sp1yskfd97crf169qhpc0igr6w7vqw0q36lswyl8";
   };
 
   unpackCmd = "tar xjf $src";
diff --git a/pkgs/development/ocaml-modules/tyxml/default.nix b/pkgs/development/ocaml-modules/tyxml/default.nix
index 4f9644ea5be0..b8c415b75669 100644
--- a/pkgs/development/ocaml-modules/tyxml/default.nix
+++ b/pkgs/development/ocaml-modules/tyxml/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocaml_oasis, camlp4, uutf, markup, ppx_tools, re }:
+{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, ocaml_oasis, camlp4, uutf, markup, ppx_tools, re }:
 
 stdenv.mkDerivation rec {
   pname = "tyxml";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "1rz0f48x8p1m30723rn5v85pp7rd0spr04sd7gzryy99vn3ianga";
     };
 
-  buildInputs = [ocaml findlib camlp4];
+  buildInputs = [ ocaml findlib ocamlbuild camlp4 ];
 
   propagatedBuildInputs = [uutf re ppx_tools markup];
 
diff --git a/pkgs/development/r-modules/README.md b/pkgs/development/r-modules/README.md
index 3a88f45b4ccb..e384b375460a 100644
--- a/pkgs/development/r-modules/README.md
+++ b/pkgs/development/r-modules/README.md
@@ -29,6 +29,30 @@ profile. The set of available libraries can be discovered by running the
 command `nix-env -f "<nixpkgs>" -qaP -A rPackages`. The first column from that
 output is the name that has to be passed to rWrapper in the code snipped above.
 
+However, if you'd like to add a file to your project source to make the
+environment available for other contributors, you can create a `default.nix`
+file like so:
+```nix
+let
+  pkgs = import <nixpkgs> {};
+  stdenv = pkgs.stdenv;
+in with pkgs; {
+  myProject = stdenv.mkDerivation {
+    name = "myProject";
+    version = "1";
+    src = if pkgs.lib.inNixShell then null else nix;
+
+    buildInputs = with rPackages; [
+      R
+      ggplot2
+      knitr
+    ];
+  };
+}
+```
+and then run `nix-shell .` to be dropped into a shell with those packages
+available.
+
 ## Updating the package set
 
 ```bash
diff --git a/pkgs/development/ruby-modules/bundler-env/default.nix b/pkgs/development/ruby-modules/bundler-env/default.nix
index 56a3b371d1dc..57ca23d41436 100644
--- a/pkgs/development/ruby-modules/bundler-env/default.nix
+++ b/pkgs/development/ruby-modules/bundler-env/default.nix
@@ -6,7 +6,14 @@
 , tree
 }@defs:
 
-{ name, gemset, gemfile, lockfile, ruby ? defs.ruby, gemConfig ? defaultGemConfig
+{ name ? null
+, pname ? null
+, gemdir ? null
+, gemfile ? null
+, lockfile ? null
+, gemset ? null
+, ruby ? defs.ruby
+, gemConfig ? defaultGemConfig
 , postBuild ? null
 , document ? []
 , meta ? {}
@@ -16,54 +23,95 @@
 }@args:
 
 let
-  importedGemset = import gemset;
+  drvName =
+    if name != null then name
+    else if pname != null then "${toString pname}-${mainGem.version}"
+    else throw "bundlerEnv: either pname or name must be set";
+
+  mainGem =
+    if pname == null then null
+    else gems."${pname}" or (throw "bundlerEnv: gem ${pname} not found");
+
+  gemfile' =
+    if gemfile == null then gemdir + "/Gemfile"
+    else gemfile;
+
+  lockfile' =
+    if lockfile == null then gemdir + "/Gemfile.lock"
+    else lockfile;
+
+  gemset' =
+    if gemset == null then gemdir + "/gemset.nix"
+    else gemset;
+
+  importedGemset = import gemset';
+
   filteredGemset = (lib.filterAttrs (name: attrs:
     if (builtins.hasAttr "groups" attrs)
     then (builtins.any (gemGroup: builtins.any (group: group == gemGroup) groups) attrs.groups)
     else true
   ) importedGemset);
+
   applyGemConfigs = attrs:
     (if gemConfig ? "${attrs.gemName}"
     then attrs // gemConfig."${attrs.gemName}" attrs
     else attrs);
+
   configuredGemset = lib.flip lib.mapAttrs filteredGemset (name: attrs:
     applyGemConfigs (attrs // { inherit ruby; gemName = name; })
   );
+
   hasBundler = builtins.hasAttr "bundler" filteredGemset;
-  bundler = if hasBundler then gems.bundler else defs.bundler.override (attrs: { inherit ruby; });
+
+  bundler =
+    if hasBundler then gems.bundler
+    else defs.bundler.override (attrs: { inherit ruby; });
+
   gems = lib.flip lib.mapAttrs configuredGemset (name: attrs:
     buildRubyGem ((removeAttrs attrs ["source"]) // attrs.source // {
       inherit ruby;
       gemName = name;
       gemPath = map (gemName: gems."${gemName}") (attrs.dependencies or []);
     }));
+
   # We have to normalize the Gemfile.lock, otherwise bundler tries to be
   # helpful by doing so at run time, causing executables to immediately bail
   # out. Yes, I'm serious.
   confFiles = runCommand "gemfile-and-lockfile" {} ''
     mkdir -p $out
-    cp ${gemfile} $out/Gemfile
-    cp ${lockfile} $out/Gemfile.lock
+    cp ${gemfile'} $out/Gemfile
+    cp ${lockfile'} $out/Gemfile.lock
   '';
+
   envPaths = lib.attrValues gems ++ lib.optional (!hasBundler) bundler;
+
+  binPaths = if mainGem != null then [ mainGem ] else envPaths;
+
   bundlerEnv = buildEnv {
-    inherit name ignoreCollisions;
+    inherit ignoreCollisions;
+
+    name = drvName;
+
     paths = envPaths;
     pathsToLink = [ "/lib" ];
+
     postBuild = ''
       ${ruby}/bin/ruby ${./gen-bin-stubs.rb} \
         "${ruby}/bin/ruby" \
         "${confFiles}/Gemfile" \
         "$out/${ruby.gemPath}" \
         "${bundler}/${ruby.gemPath}" \
-        ${lib.escapeShellArg envPaths} \
+        ${lib.escapeShellArg binPaths} \
         ${lib.escapeShellArg groups}
     '' + lib.optionalString (postBuild != null) postBuild;
+
+    meta = { platforms = ruby.meta.platforms; } // meta;
+
     passthru = rec {
-      inherit ruby bundler meta gems;
+      inherit ruby bundler gems;
 
       wrappedRuby = stdenv.mkDerivation {
-        name = "wrapped-ruby-${name}";
+        name = "wrapped-ruby-${drvName}";
         nativeBuildInputs = [ makeWrapper ];
         buildCommand = ''
           mkdir -p $out/bin
@@ -87,7 +135,7 @@ let
           require 'bundler/setup'
         '';
         in stdenv.mkDerivation {
-          name = "interactive-${name}-environment";
+          name = "interactive-${drvName}-environment";
           nativeBuildInputs = [ wrappedRuby bundlerEnv ];
           shellHook = ''
             export OLD_IRBRC="$IRBRC"
@@ -102,7 +150,5 @@ let
         };
     };
   };
-
 in
-
-bundlerEnv
+  bundlerEnv
diff --git a/pkgs/development/tools/asn2quickder/default.nix b/pkgs/development/tools/asn2quickder/default.nix
new file mode 100644
index 000000000000..69051714ab4c
--- /dev/null
+++ b/pkgs/development/tools/asn2quickder/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, pythonPackages, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "asn2quickder";
+  name = "${pname}-${version}";
+  version = "0.7-RC1";
+
+  src = fetchFromGitHub {
+    sha256 = "0ynajhbml28m4ipbj5mscjcv6g1a7frvxfimxh813rhgl0w3sgq8";
+    rev = "version-${version}";
+    owner = "vanrein";
+    repo = "${pname}";
+  };
+
+  propagatedBuildInputs = with pythonPackages; [ pyparsing makeWrapper ];
+
+  patchPhase = with pythonPackages; ''
+    substituteInPlace Makefile \
+      --replace '..' '..:$(DESTDIR)/${python.sitePackages}:${pythonPackages.pyparsing}/${python.sitePackages}' \
+    '';
+
+  installPhase = ''
+    mkdir -p $out/${pythonPackages.python.sitePackages}/
+    mkdir -p $out/bin $out/lib $out/sbin $out/man
+    make DESTDIR=$out PREFIX=/ all
+    make DESTDIR=$out PREFIX=/ install
+    '';
+
+  meta = with stdenv.lib; {
+    description = "An ASN.1 compiler with a backend for Quick DER";
+    homepage = https://github.com/vanrein/asn2quickder;
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ leenaars ];
+  };
+}
diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix
index 002d3bde201e..5d57c9b4579a 100644
--- a/pkgs/development/tools/build-managers/bazel/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/default.nix
@@ -1,35 +1,70 @@
-{ stdenv, fetchFromGitHub, jdk, zip, zlib, protobuf3_0, pkgconfig, libarchive, unzip, which, makeWrapper }:
-stdenv.mkDerivation rec {
-  version = "0.3.1";
-  name = "bazel-${version}";
-
-  src = fetchFromGitHub {
-    owner = "google";
-    repo = "bazel";
-    rev = version;
-    sha256 = "1cm8zjxf8y3ai6h9wndxvflfsijjqhg87fll9ar7ff0hbbbdf6l5";
+{ stdenv, fetchFromGitHub, buildFHSUserEnv, writeScript, jdk, zip, unzip,
+  which, makeWrapper, binutils }:
+
+let
+
+  version = "0.3.2";
+
+  meta = with stdenv.lib; {
+    homepage = http://github.com/bazelbuild/bazel/;
+    description = "Build tool that builds code quickly and reliably";
+    license = licenses.asl20;
+    maintainers = [ maintainers.philandstuff ];
+    platforms = platforms.linux;
   };
 
-  buildInputs = [ pkgconfig protobuf3_0 zlib zip libarchive unzip which makeWrapper jdk ];
+  bootstrapEnv = buildFHSUserEnv {
+    name = "bazel-bootstrap-env";
 
-  buildPhase = ''
-    export LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib ]}"
+    targetPkgs = pkgs: [ ];
 
-    bash compile.sh
-  '';
+    inherit meta;
+  };
 
-  installPhase = ''
-    mkdir -p $out/bin $out/share
-    cp -R output $out/share/bazel
-    ln -s $out/share/bazel/bazel $out/bin/bazel
-    wrapProgram $out/bin/bazel --set JAVA_HOME "${jdk.home}"
-  '';
+  bazelBinary = stdenv.mkDerivation rec {
+    name = "bazel-${version}";
 
-  meta = {
-    homepage = http://github.com/google/bazel/;
-    description = "Build tool that builds code quickly and reliably";
-    license = stdenv.lib.licenses.asl20;
-    maintainers = [ stdenv.lib.maintainers.philandstuff ];
-    platforms = [ "x86_64-linux" ];
+    src = fetchFromGitHub {
+      owner = "bazelbuild";
+      repo = "bazel";
+      rev = version;
+      sha256 = "085cjz0qhm4a12jmhkjd9w3ic4a67035j01q111h387iklvgn6xg";
+    };
+    patches = [ ./java_stub_template.patch ];
+
+    packagesNotFromEnv = [
+        stdenv.cc stdenv.cc.cc.lib jdk which zip unzip binutils ];
+    buildInputs = packagesNotFromEnv ++ [ bootstrapEnv makeWrapper ];
+
+    buildTimeBinPath = stdenv.lib.makeBinPath packagesNotFromEnv;
+    buildTimeLibPath = stdenv.lib.makeLibraryPath packagesNotFromEnv;
+
+    runTimeBinPath = stdenv.lib.makeBinPath [ jdk stdenv.cc.cc ];
+    runTimeLibPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib ];
+
+    buildWrapper = writeScript "build-wrapper.sh" ''
+      #! ${stdenv.shell} -e
+      export PATH="${buildTimeBinPath}:$PATH"
+      export LD_LIBRARY_PATH="${buildTimeLibPath}:$LD_LIBRARY_PATH"
+      ./compile.sh
+    '';
+
+    buildPhase = ''
+      bazel-bootstrap-env ${buildWrapper}
+    '';
+
+    installPhase = ''
+      mkdir -p $out/bin
+      cp output/bazel $out/bin/
+      wrapProgram $out/bin/bazel \
+          --suffix PATH ":" "${runTimeBinPath}" \
+          --suffix LD_LIBRARY_PATH ":" "${runTimeLibPath}"
+    '';
+
+    dontStrip = true;
+    dontPatchELF = true;
+
+    inherit meta;
   };
-}
+
+in bazelBinary
diff --git a/pkgs/development/tools/build-managers/bazel/java_stub_template.patch b/pkgs/development/tools/build-managers/bazel/java_stub_template.patch
new file mode 100644
index 000000000000..4e456a78d800
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bazel/java_stub_template.patch
@@ -0,0 +1,16 @@
+commit 5525326e3287243e0e7417de96bf7d58d04b4c8b
+Author: Irene Knapp <ireneista@google.com>
+Date:   Sat Oct 8 19:36:12 2016 -0700
+
+    Change #!/bin/bash to #!/usr/bin/env bash.
+
+diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt
+index f77051f..fbf367a 100644
+--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt
++++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt
+@@ -1,4 +1,4 @@
+-#!/bin/bash --posix
++#!/usr/bin/env bash
+ # Copyright 2014 The Bazel Authors. All rights reserved.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pkgs/development/tools/build-managers/buildbot/default.nix b/pkgs/development/tools/build-managers/buildbot/default.nix
index 4431105d18f8..d16b83a2831c 100644
--- a/pkgs/development/tools/build-managers/buildbot/default.nix
+++ b/pkgs/development/tools/build-managers/buildbot/default.nix
@@ -1,16 +1,12 @@
-{ stdenv
-, pythonPackages
-, fetchurl
-, plugins ? []
-}:
+{ stdenv, pythonPackages, fetchurl, coreutils, plugins ? [] }:
 
 pythonPackages.buildPythonApplication (rec {
   name = "${pname}-${version}";
   pname = "buildbot";
-  version = "0.9.0rc3";
+  version = "0.9.0rc4";
   src = fetchurl {
     url = "mirror://pypi/b/${pname}/${name}.tar.gz";
-    sha256 = "18238n9l0pfivb23csy5lnkx91fcm4jgmhxn03f2nfnp00rlppzb";
+    sha256 = "16bnrr5qkfpnby9sw9azcagnw0ybi7d8bpdlga2a4c61jg2d5dnc";
   };
 
   buildInputs = with pythonPackages; [
@@ -61,16 +57,17 @@ pythonPackages.buildPythonApplication (rec {
   preInstall = ''
     # writes out a file that can't be read properly
     sed -i.bak -e '69,84d' buildbot/test/unit/test_www_config.py
+
+    # re-hardcode path to tail
+    sed -i.bak 's|/usr/bin/tail|${coreutils}/bin/tail|' buildbot/scripts/logwatcher.py
   '';
 
   postFixup = ''
-    buildPythonPath "$out"
-    patchPythonScript "$out/bin/buildbot"
     mv -v $out/bin/buildbot $out/bin/.wrapped-buildbot
-    echo "#!/bin/bash" > $out/bin/buildbot
-    echo "export PYTHONPATH=$out/lib/python2.7/site-packages:$PYTHONPATH" >> $out/bin/buildbot
+    echo "#!/bin/sh" > $out/bin/buildbot
+    echo "export PYTHONPATH=$PYTHONPATH" >> $out/bin/buildbot
     echo "exec $out/bin/.wrapped-buildbot \"\$@\"" >> $out/bin/buildbot
-    chmod -c 755 $out/bin/buildbot
+    chmod -c 555 $out/bin/buildbot
   '';
 
   meta = with stdenv.lib; {
@@ -78,5 +75,6 @@ pythonPackages.buildPythonApplication (rec {
     description = "Continuous integration system that automates the build/test cycle";
     maintainers = with maintainers; [ nand0p ryansydnor ];
     platforms = platforms.all;
+    license = licenses.gpl2;
   };
 })
diff --git a/pkgs/development/tools/build-managers/buildbot/plugins.nix b/pkgs/development/tools/build-managers/buildbot/plugins.nix
index 384452e27d9c..09f8b1e750a5 100644
--- a/pkgs/development/tools/build-managers/buildbot/plugins.nix
+++ b/pkgs/development/tools/build-managers/buildbot/plugins.nix
@@ -1,17 +1,14 @@
-{ stdenv
-, fetchurl
-, pythonPackages
-}:
+{ stdenv, fetchurl, pythonPackages }:
 
 let
   buildbot-pkg = pythonPackages.buildPythonPackage rec {
     name = "${pname}-${version}";
     pname = "buildbot-pkg";
-    version = "0.9.0rc3";
+    version = "0.9.0rc4";
 
     src = fetchurl {
       url = "mirror://pypi/b/${pname}/${name}.tar.gz";
-      sha256 = "0a05dgc5nn6sx3nicfvqwar9iy8yxhq92688dhs5p6mzjxaprlxm";
+      sha256 = "0dfdyc3x0926dynzdl9w7z0p84w287l362mxdl3r6wl87gkisr10";
     };
 
     propagatedBuildInputs = with pythonPackages; [ setuptools ];
@@ -21,6 +18,7 @@ let
       description = "Buildbot Packaging Helper";
       maintainers = with maintainers; [ nand0p ryansydnor ];
       platforms = platforms.all;
+      license = licenses.gpl2;
     };
   };
 
@@ -29,13 +27,14 @@ in {
   www = pythonPackages.buildPythonPackage rec {
     name = "${pname}-${version}";
     pname = "buildbot_www";
-    version = "0.9.0rc3";
+    version = "0.9.0rc4";
 
     # NOTE: wheel is used due to buildbot circular dependency
     format = "wheel";
+
     src = fetchurl {
-      url = "https://pypi.python.org/packages/93/1e/09e329fc831ae4f5be05eb3363c9028ab7e26e9c7e5d89e3aa66c3f25d9d/${name}-py2-none-any.whl";
-      sha256 = "0fy2v7y1kc53zm67ddx85yz5qh4b7hmcbfzmsziiv9n83a0qh1i6";
+      url = "https://pypi.python.org/packages/78/45/b43bd85695cd0178f8bac9c3b394062e9eb46f489b655c11e950e54278a2/${name}-py2-none-any.whl";
+      sha256 = "0ixi0y0jhbql55swsvy0jin1v6xf4q4mw9p5n9sll2h10lyp9h0p";
     };
 
     propagatedBuildInputs = [ buildbot-pkg ];
@@ -45,17 +44,18 @@ in {
       description = "Buildbot UI";
       maintainers = with maintainers; [ nand0p ryansydnor ];
       platforms = platforms.all;
+      license = licenses.gpl2;
     };
   };
 
   console-view = pythonPackages.buildPythonPackage rec {
     name = "${pname}-${version}";
     pname = "buildbot-console-view";
-    version = "0.9.0rc3";
+    version = "0.9.0rc4";
 
     src = fetchurl {
       url = "mirror://pypi/b/${pname}/${name}.tar.gz";
-      sha256 = "09yfqrnwfambg1j4x7ywnjg4xfhvv6f242zzh35fwj64cnqmqx07";
+      sha256 = "1fig635yg5dgn239g9wzfpw9wc3p91lcl9nnig9k7fijz85pwrva";
     };
 
     propagatedBuildInputs = [ buildbot-pkg ];
@@ -65,17 +65,18 @@ in {
       description = "Buildbot Console View Plugin";
       maintainers = with maintainers; [ nand0p ryansydnor ];
       platforms = platforms.all;
+      license = licenses.gpl2;
     };
   };
 
   waterfall-view = pythonPackages.buildPythonPackage rec {
     name = "${pname}-${version}";
     pname = "buildbot-waterfall-view";
-    version = "0.9.0rc3";
+    version = "0.9.0rc4";
 
     src = fetchurl {
       url = "mirror://pypi/b/${pname}/${name}.tar.gz";
-      sha256 = "0xpqxj3mmwl5xdhm3p52shl24d85qapdk4v66f9hrb9pnk5k4a81";
+      sha256 = "08kh966grj9b4mif337vv7bqy5ixz8xz31ml63wysjb65djnjbk8";
     };
 
     propagatedBuildInputs = [ buildbot-pkg ];
@@ -85,6 +86,7 @@ in {
       description = "Buildbot Waterfall View Plugin";
       maintainers = with maintainers; [ nand0p ryansydnor ];
       platforms = platforms.all;
+      license = licenses.gpl2;
     };
   };
 }
diff --git a/pkgs/development/tools/build-managers/buildbot/worker.nix b/pkgs/development/tools/build-managers/buildbot/worker.nix
index 2c8e17a37c00..01b2051aaa6d 100644
--- a/pkgs/development/tools/build-managers/buildbot/worker.nix
+++ b/pkgs/development/tools/build-managers/buildbot/worker.nix
@@ -1,16 +1,13 @@
-{ stdenv
-, fetchurl
-, pythonPackages
-}:
+{ stdenv, fetchurl, pythonPackages }:
 
 pythonPackages.buildPythonApplication (rec {
   name = "${pname}-${version}";
   pname = "buildbot-worker";
-  version = "0.9.0rc3";
+  version = "0.9.0rc4";
 
   src = fetchurl {
     url = "mirror://pypi/b/${pname}/${name}.tar.gz";
-    sha256 = "0wqn2176rk7hc27r4hfy5qnxp0nr9iis5nyzg5x07xljnsspnhy1";
+    sha256 = "1fv40pki1awv5f2z9vd7phjk7dlsy1cp4blsy2vdhqwbc7112a8c";
   };
 
   buildInputs = with pythonPackages; [ setuptoolsTrial mock ];
@@ -21,5 +18,6 @@ pythonPackages.buildPythonApplication (rec {
     description = "Buildbot Worker Daemon";
     maintainers = with maintainers; [ nand0p ryansydnor ];
     platforms = platforms.all;
+    license = licenses.gpl2;
   };
 })
diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix
index 47c6e12a5860..558b8acf70f1 100644
--- a/pkgs/development/tools/build-managers/meson/default.nix
+++ b/pkgs/development/tools/build-managers/meson/default.nix
@@ -1,10 +1,11 @@
 { lib, python3Packages, fetchurl }:
 python3Packages.buildPythonPackage rec {
-  name = "meson-0.32.0";
+  version = "0.35.0";
+  name = "meson-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/m/meson/${name}.tar.gz";
-    sha256 = "1i5m4q53sr55aw8kx761kh0rsfwkpq0gfa0c0k3jf66y4aml6n54";
+    sha256 = "0w4vian55cwcv2m5qzn73aznf9a0y24cszqb7dkpahrb9yrg25l3";
   };
 
   meta = with lib; {
diff --git a/pkgs/development/tools/hexio/default.nix b/pkgs/development/tools/hexio/default.nix
new file mode 100644
index 000000000000..6d75c7256ee0
--- /dev/null
+++ b/pkgs/development/tools/hexio/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, fetchurl, python, pcsclite, pth, glibc }:
+
+stdenv.mkDerivation rec {
+  pname = "hexio";
+  name = "${pname}-${version}";
+  version = "201605";
+
+  src = fetchFromGitHub {
+    sha256 = "08jxkdi0gjsi8s793f9kdlad0a58a0xpsaayrsnpn9bpmm5cgihq";
+    rev = "f6f963bd0fcd2808977e0ad82dcb3100691cdd7c";
+    owner = "vanrein";
+    repo = "hexio";
+  };
+
+  buildInputs = [ python pcsclite pth glibc ];
+
+  patchPhase = ''
+    substituteInPlace Makefile \
+      --replace '-I/usr/local/include/PCSC/' '-I${pcsclite}/include/PCSC/' \
+      --replace '-L/usr/local/lib/pth' '-I${pth}/lib/'
+    '';
+
+  installPhase = ''
+    mkdir -p $out/bin $out/lib $out/sbin $out/man
+    make DESTDIR=$out PREFIX=/ all
+    make DESTDIR=$out PREFIX=/ install
+    '';
+
+  meta = with stdenv.lib; {
+    description = "Low-level I/O helpers for hexadecimal, tty/serial devices and so on";
+    homepage = https://github.com/vanrein/hexio;
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ leenaars ];
+  };
+}
diff --git a/pkgs/development/tools/mdk/default.nix b/pkgs/development/tools/mdk/default.nix
index f54b409efb6d..ca8c2de9630f 100644
--- a/pkgs/development/tools/mdk/default.nix
+++ b/pkgs/development/tools/mdk/default.nix
@@ -4,7 +4,7 @@ stdenv.mkDerivation {
   name = "gnu-mdk-1.2.9";
   src = fetchurl {
     url = http://ftp.gnu.org/gnu/mdk/v1.2.9/mdk-1.2.9.tar.gz;
-    md5 = "08c96baa4b99dd9d25190dd15fe415a5";
+    sha256 = "0c24wzrzbk0l4z1p5nnxihaqra75amwmw59va44554infkfms9kc";
   };
   buildInputs = [ intltool pkgconfig glib ];
   postInstall = ''
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix
index 48e74cf2631d..da0447c49da8 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.11.1";
+  basename = "gdb-7.12";
 
   # 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 = "0w7wi1llznlqdqk2lmzygz2xylb2c9mh580s9i0rypkmwfj6s8g9";
+    sha256 = "152g2qa8337cxif3lkvabjcxfd9jphfb2mza8f1p2c4bjk2z6kw3";
   };
 
   nativeBuildInputs = [ pkgconfig texinfo perl ]
@@ -43,6 +43,9 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  # darwin build fails with format hardening since v7.12
+  hardeningDisable = stdenv.lib.optionals stdenv.isDarwin [ "format" ];
+
   configureFlags = with stdenv.lib;
     [ "--with-gmp=${gmp.dev}" "--with-mpfr=${mpfr.dev}" "--with-system-readline"
       "--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat.dev}"
diff --git a/pkgs/development/tools/misc/intel-gpu-tools/default.nix b/pkgs/development/tools/misc/intel-gpu-tools/default.nix
index 3d3e457781ad..5ecc0421c361 100644
--- a/pkgs/development/tools/misc/intel-gpu-tools/default.nix
+++ b/pkgs/development/tools/misc/intel-gpu-tools/default.nix
@@ -2,11 +2,11 @@
 , libX11, libXext, libXv, libXrandr, glib, bison, libunwind, python3 }:
 
 stdenv.mkDerivation rec {
-  name = "intel-gpu-tools-1.14";
+  name = "intel-gpu-tools-1.16";
 
   src = fetchurl {
     url = "http://xorg.freedesktop.org/archive/individual/app/${name}.tar.bz2";
-    sha256 = "030g1akybk19y3jcxd8pp573ymrd4w7mmzxbspp064lwdv9y35im";
+    sha256 = "1q9sfb15081zm1rq4z67sfj13ryvbdha4fa6pdzdsfd9261nvgn6";
   };
 
   buildInputs = [ pkgconfig libdrm libpciaccess cairo dri2proto udev libX11
diff --git a/pkgs/development/tools/misc/intltool/default.nix b/pkgs/development/tools/misc/intltool/default.nix
index 4ab9fa284915..e59e4c23776d 100644
--- a/pkgs/development/tools/misc/intltool/default.nix
+++ b/pkgs/development/tools/misc/intltool/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   patches = [(fetchpatch {
     name = "perl-5.22.patch";
     url = "https://anonscm.debian.org/viewvc/pkg-gnome/desktop/unstable/intltool"
-      + "/debian/patches/perl5.22-regex-fixes?revision=47255&view=co";
+      + "/debian/patches/perl5.22-regex-fixes?revision=47258&view=co";
     sha256 = "17clqczb9fky7hp8czxa0fy82b5478irvz4f3fnans3sqxl95hx3";
   })];
 
diff --git a/pkgs/development/tools/misc/travis/default.nix b/pkgs/development/tools/misc/travis/default.nix
index adc63ce7c43f..a520c4deb342 100644
--- a/pkgs/development/tools/misc/travis/default.nix
+++ b/pkgs/development/tools/misc/travis/default.nix
@@ -1,29 +1,14 @@
-{ stdenv, lib, bundlerEnv, ruby }:
+{ lib, bundlerEnv, ruby }:
 
-stdenv.mkDerivation rec {
-  name = "travis-${version}";
-  version = env.gems.travis.version;
-
-  env = bundlerEnv {
-    inherit ruby;
-    name = "${name}-gems";
-    gemset = ./gemset.nix;
-    gemfile = ./Gemfile;
-    lockfile = ./Gemfile.lock;
-  };
-
-  phases = ["installPhase"];
-
-  installPhase = ''
-    mkdir -p $out/bin
-    ln -s ${env}/bin/travis $out/bin/travis
-  '';
+bundlerEnv {
+  inherit ruby;
+  pname = "travis";
+  gemdir = ./.;
 
   meta = with lib; {
     description = "CLI and Ruby client library for Travis CI";
     homepage    = https://github.com/travis-ci/travis.rb;
     license     = licenses.mit;
     maintainers = with maintainers; [ zimbatm ];
-    platforms   = ruby.meta.platforms;
   };
 }
diff --git a/pkgs/development/tools/ocaml/camlidl/default.nix b/pkgs/development/tools/ocaml/camlidl/default.nix
index 093e90dd47f3..feedd8835485 100644
--- a/pkgs/development/tools/ocaml/camlidl/default.nix
+++ b/pkgs/development/tools/ocaml/camlidl/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, makeWrapper, gcc, ocaml, ncurses}:
+{ stdenv, fetchurl, makeWrapper, ocaml, ncurses }:
 
 let
   pname = "camlidl";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
     mv config/Makefile.unix config/Makefile
     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=${gcc}/bin/cpp
+    substituteInPlace config/Makefile --replace CPP=/lib/cpp CPP=${stdenv.cc}/bin/cpp
     mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/camlidl/caml
   '';
 
diff --git a/pkgs/development/tools/ocaml/utop/default.nix b/pkgs/development/tools/ocaml/utop/default.nix
index 45888924a2ef..b8740bc37932 100644
--- a/pkgs/development/tools/ocaml/utop/default.nix
+++ b/pkgs/development/tools/ocaml/utop/default.nix
@@ -1,5 +1,5 @@
-{stdenv, fetchurl, ocaml, findlib, lambdaTerm, ocaml_lwt, makeWrapper,
- ocaml_react, camomile, zed, cppo, camlp4, ppx_tools
+{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, camlp4, ocaml_react
+, lambdaTerm, ocaml_lwt, makeWrapper, camomile, zed, cppo, ppx_tools
 }:
 
 stdenv.mkDerivation rec {
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "0hxybkqmrh0sz1yyyrgzdmxp46gda4vk22pv07s0qpfg2dpv56jh";
   };
 
-  buildInputs = [ ocaml findlib makeWrapper cppo camlp4 ppx_tools ];
+  buildInputs = [ ocaml findlib ocamlbuild makeWrapper cppo camlp4 ppx_tools ];
 
   propagatedBuildInputs = [ lambdaTerm ocaml_lwt ];
 
diff --git a/pkgs/development/tools/valadoc/default.nix b/pkgs/development/tools/valadoc/default.nix
new file mode 100644
index 000000000000..7d4e61c87995
--- /dev/null
+++ b/pkgs/development/tools/valadoc/default.nix
@@ -0,0 +1,24 @@
+{stdenv, fetchgit, gnome3, automake, autoconf, which, libtool, pkgconfig, graphviz, glib, gobjectIntrospection, expat}:
+stdenv.mkDerivation rec {
+  version = "2016-10-09";
+  name = "valadoc-unstable-${version}";
+
+  src = fetchgit {
+    url = "git://git.gnome.org/valadoc";
+    rev = "37756970379d1363453562e9f2af2c354d172fb4";
+    sha256 = "1s9sf6f0srh5sqqikswnb3bgwv5s1r9bd4n10hs2lzfmh7z227qb";
+  };
+
+  nativeBuildInputs = [ automake autoconf which gnome3.vala libtool pkgconfig gobjectIntrospection ];
+  buildInputs = [ graphviz glib gnome3.libgee expat ];
+
+  preConfigure = "./autogen.sh";
+
+  meta = with stdenv.lib; {
+    description = "valadoc is a documentation generator for generating API documentation from Vala source code";
+    homepage = http://valadoc.org;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = with maintainers; [ sternenseemann ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/pkgs/development/tools/xcbuild/default.nix b/pkgs/development/tools/xcbuild/default.nix
new file mode 100644
index 000000000000..e313672aea3f
--- /dev/null
+++ b/pkgs/development/tools/xcbuild/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, cmake, fetchFromGitHub, zlib, libxml2, libpng, CoreServices, CoreGraphics, ImageIO }:
+
+let
+  googletest = fetchFromGitHub {
+    owner  = "google";
+    repo   = "googletest";
+    rev    = "43359642a1c16ad3f4fc575c7edd0cb935810815";
+    sha256 = "0y4xaah62fjr3isaryc3vfz3mn9xflr00vchdimj8785milxga4q";
+  };
+
+  linenoise = fetchFromGitHub {
+    owner  = "antirez";
+    repo   = "linenoise";
+    rev    = "c894b9e59f02203dbe4e2be657572cf88c4230c3";
+    sha256 = "0wasql7ph5g473zxhc2z47z3pjp42q0dsn4gpijwzbxawid71b4w";
+  };
+in stdenv.mkDerivation rec {
+  name    = "xcbuild-${stdenv.lib.substring 0 8 version}";
+  version = "49f8a5923f1381f87ac03ad4c1b138d1d2b74369";
+
+  src = fetchFromGitHub {
+    owner  = "facebook";
+    repo   = "xcbuild";
+    rev    = version;
+    sha256 = "0l107xkh7dab2xc58dqyrrhpd1gp12cpzh0wrx0i9jbh0idbwnk0";
+  };
+
+  prePatch = ''
+    rmdir ThirdParty/*
+    cp -r --no-preserve=all ${googletest} ThirdParty/googletest
+    cp -r --no-preserve=all ${linenoise} ThirdParty/linenoise
+  '';
+
+  enableParallelBuilding = true;
+
+  # TODO: instruct cmake not to put it in /usr, rather than cleaning up
+  postInstall = ''
+    mv $out/usr/* $out
+    rmdir $out/usr
+  '';
+
+  buildInputs = [ cmake zlib libxml2 libpng CoreServices CoreGraphics ImageIO ];
+}
\ No newline at end of file
diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix
index c10fe99f74a9..6cf73fd22b64 100644
--- a/pkgs/development/web/nodejs/nodejs.nix
+++ b/pkgs/development/web/nodejs/nodejs.nix
@@ -6,7 +6,8 @@
 , preBuild ? ""
 , extraConfigFlags ? []
 , extraBuildInputs ? []
-, ...
+, patches ? [],
+ ...
 }:
 
 assert stdenv.system != "armv5tel-linux";
@@ -44,7 +45,7 @@ in stdenv.mkDerivation {
     PATH=$out/bin:$PATH patchShebangs $out
   '';
 
-  patches = stdenv.lib.optionals stdenv.isDarwin [ ./no-xcode.patch ];
+  patches = patches ++ stdenv.lib.optionals stdenv.isDarwin [ ./no-xcode.patch ];
 
   buildInputs = extraBuildInputs
     ++ [ python which zlib libuv openssl ]
diff --git a/pkgs/development/web/nodejs/v4.nix b/pkgs/development/web/nodejs/v4.nix
index fa22f9d54c5c..d0e2494cd305 100644
--- a/pkgs/development/web/nodejs/v4.nix
+++ b/pkgs/development/web/nodejs/v4.nix
@@ -4,9 +4,9 @@
 }@args:
 
 import ./nodejs.nix (args // rec {
-  version = "4.4.6";
+  version = "4.6.0";
   src = fetchurl {
     url = "http://nodejs.org/dist/v${version}/node-v${version}.tar.xz";
-    sha256 = "0f6bbfbea525469c91932b1aac35e0810e6bcda96f1c720e42a433942ee66106";
+    sha256 = "1566q1kkv8j30fgqx8sm2h8323f38wwpa1hfb10gr6z46jyhv4a2";
   };
 })
diff --git a/pkgs/development/web/nodejs/v6.nix b/pkgs/development/web/nodejs/v6.nix
index f5d6e52ee441..ac54f0f8d492 100644
--- a/pkgs/development/web/nodejs/v6.nix
+++ b/pkgs/development/web/nodejs/v6.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, openssl, python, zlib, libuv, v8, utillinux, http-parser
-, pkgconfig, runCommand, which, libtool
+, pkgconfig, runCommand, which, libtool, fetchpatch
 , callPackage
 , darwin ? null
 }@args:
@@ -8,12 +8,18 @@ let
   inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices;
 
 in import ./nodejs.nix (args // rec {
-  version = "6.7.0";
-  sha256 = "1r9vvnczjczqs29ja8gmbqgsfgkg0dph4qkaxb3yh7mb98r2ic6f";
+  version = "6.8.0";
+  sha256 = "13arzwki13688hr1lh871y06lrk019g4hkasmg11arm8j1dcwcpq";
   extraBuildInputs = stdenv.lib.optionals stdenv.isDarwin
     [ CoreServices ApplicationServices ];
   preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
     sed -i -e "s|tr1/type_traits|type_traits|g" \
       -e "s|std::tr1|std|" src/util.h
   '';
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/nodejs/node/commit/fc164acbbb700fd50ab9c04b47fc1b2687e9c0f4.patch";
+      sha256 = "1rms3n09622xmddn013yvf5c6p3s8w8s0d2h813zs8c1l15k4k1i";
+    })
+  ];
 })
diff --git a/pkgs/games/opentyrian/default.nix b/pkgs/games/opentyrian/default.nix
index c435bbe5887f..c91f9807581e 100644
--- a/pkgs/games/opentyrian/default.nix
+++ b/pkgs/games/opentyrian/default.nix
@@ -1,21 +1,20 @@
-{stdenv, fetchhg, fetchurl, unzip, SDL, SDL_net}:
+{stdenv, fetchurl, fetchzip, SDL, SDL_net}:
 
 stdenv.mkDerivation rec {
   name = "opentyrian-${version}";
-  version = "0.0.955";
+  version = "2.1.20130907";
 
-  src = fetchhg {
-    url = "https://opentyrian.googlecode.com/hg/";
-    rev = "13ef8ce47362";
-    md5 = "95c8f9e7ff3d4207f1c692c7cec6c9b0";
+  src = fetchurl {
+    url = "https://bitbucket.org/opentyrian/opentyrian/get/${version}.tar.gz";
+    sha256 = "1jnrkq616pc4dhlbd4n30d65vmn25q84w6jfv9383l9q20cqf2ph";
   };
 
-  data = fetchurl {
+  data = fetchzip {
     url = http://sites.google.com/a/camanis.net/opentyrian/tyrian/tyrian21.zip;
-    md5 = "2a3b206a6de25ed4b771af073f8ca904";
+    sha256 = "1biz6hf6s7qrwn8ky0g6p8w7yg715w7yklpn6258bkks1s15hpdb";
   };
 
-  buildInputs = [SDL SDL_net unzip];
+  buildInputs = [SDL SDL_net];
 
   patchPhase = "
     substituteInPlace src/file.c --replace /usr/share $out/share
@@ -25,12 +24,12 @@ stdenv.mkDerivation rec {
     mkdir -p $out/bin
     cp ./opentyrian $out/bin
     mkdir -p $out/share/opentyrian/data
-    unzip -j $data -d $out/share/opentyrian/data
+    cp -r $data/* $out/share/opentyrian/data
   ";
 
   meta = {
     description = ''Open source port of the game "Tyrian"'';
-    homepage = https://opentyrian.googlecode.com/;
+    homepage = https://bitbucket.org/opentyrian/opentyrian;
     # This does not account of Tyrian data.
     # license = stdenv.lib.licenses.gpl2;
   };
diff --git a/pkgs/misc/emulators/fs-uae/default.nix b/pkgs/misc/emulators/fs-uae/default.nix
index 43ace9ca977e..f7d94bcad471 100644
--- a/pkgs/misc/emulators/fs-uae/default.nix
+++ b/pkgs/misc/emulators/fs-uae/default.nix
@@ -1,24 +1,18 @@
 { stdenv, fetchurl, pkgconfig
-, gettext, gtk2, SDL, zlib, glib, openal, mesa, lua, freetype }:
+, gettext, gtk2, SDL2, zlib, glib, openal, mesa, lua, freetype, libmpeg2, zip }:
 
 with stdenv.lib;
-stdenv.mkDerivation rec{
+stdenv.mkDerivation rec {
 
   name = "fs-uae-${version}";
-  version = "2.4.3";
+  version = "2.8.0";
 
   src = fetchurl {
-    urls = [ "http://fs-uae.net/fs-uae/stable/${version}/${name}.tar.gz" ];
-    sha256 = "05wngvpqj8kj4wzi5jzzhvs19iljb3m6ba1l2hk4rz68b400ndv6";
+    url = "http://fs-uae.net/fs-uae/stable/${version}/${name}.tar.gz";
+    sha256 = "1cvvlkzhh4rrpax7505bngw990rx86l1nhad174zpqc9ah93il25";
   };
 
-  buildInputs = [ pkgconfig gettext gtk2 SDL zlib glib openal mesa lua freetype ];
-
-  phases = "unpackPhase buildPhase installPhase";
-
-  # Strange: the docs recommend SDL2, but it does compile only with SDL1
-  buildPhase = "make sdl=1";
-  installPhase = "make install prefix=$out";
+  buildInputs = [ pkgconfig gettext gtk2 SDL2 zlib glib openal mesa lua freetype libmpeg2 zip ];
 
   meta = {
     description = "An accurate, customizable Amiga Emulator";
@@ -30,9 +24,8 @@ stdenv.mkDerivation rec{
     '';
     license = licenses.gpl2Plus;
     homepage = http://fs-uae.net;
-    maintainers = [ maintainers.AndersonTorres ];
+    maintainers = with stdenv.lib; [ maintainers.AndersonTorres ];
     platforms = stdenv.lib.platforms.linux;
   };
 }
 # TODO: testing and Python GUI support
-# TODO: SDL2 support
diff --git a/pkgs/misc/screensavers/xscreensaver/default.nix b/pkgs/misc/screensavers/xscreensaver/default.nix
index 4217f1d0b1e9..276c311fa455 100644
--- a/pkgs/misc/screensavers/xscreensaver/default.nix
+++ b/pkgs/misc/screensavers/xscreensaver/default.nix
@@ -5,12 +5,12 @@
 }:
 
 stdenv.mkDerivation rec {
-  version = "5.35";
+  version = "5.36";
   name = "xscreensaver-${version}";
 
   src = fetchurl {
     url = "http://www.jwz.org/xscreensaver/${name}.tar.gz";
-    sha256 = "08kbb0ry7ih436ab4i5g6lnhaaz13zkcdmbdibrn4j5gm5qq8v0y";
+    sha256 = "0v60mdhvv42jla5hljp77igng11kxpah5fs9j7ci65kz0hw552vb";
   };
 
   buildInputs =
diff --git a/pkgs/misc/themes/arc/default.nix b/pkgs/misc/themes/arc/default.nix
index b7ff36c0917c..09599604a472 100644
--- a/pkgs/misc/themes/arc/default.nix
+++ b/pkgs/misc/themes/arc/default.nix
@@ -1,14 +1,15 @@
 { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, gnome3, gtk-engine-murrine }:
 
 stdenv.mkDerivation rec {
-  version = "2016-06-06";
-  name = "arc-gtk-theme-${version}";
+  name = "${pname}-${version}";
+  pname = "arc-theme";
+  version = "2016-10-13";
 
   src = fetchFromGitHub {
     owner = "horst3180";
-    repo = "arc-theme";
-    rev = "d24a7b5b4eb25e1a094bdf4e125332cfb8e2c8c1";
-    sha256 = "07rf21xhyz3if4n5ccmzmjf9rz9w7wkvci7ccivhh6lkillfbxgi";
+    repo = pname;
+    rev = "a9ce9d56ae61f23592fa4a8c200085dde7b43e07";
+    sha256 = "02w8nckd4q548shdgml9ndnbnq1g7nq6v8df89mx4l3lc9r6354y";
   };
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
@@ -17,13 +18,21 @@ stdenv.mkDerivation rec {
 
   preferLocalBuild = true;
 
-  configureFlags = "--with-gnome=${gnome3.version} ";
+  configureFlags = [ "--disable-unity" "--with-gnome=${gnome3.version}" ];
+
+  postInstall = ''
+    mkdir -p $out/share/plank/themes
+    cp -r extra/*-Plank $out/share/plank/themes
+    mkdir -p $out/share/doc/$pname/Chrome
+    cp -r extra/Chrome/*.crx $out/share/doc/$pname/Chrome
+    cp AUTHORS README.md $out/share/doc/$pname/
+  '';
 
   meta = with stdenv.lib; {
     description = "A flat theme with transparent elements for GTK 3, GTK 2 and Gnome-Shell";
-    homepage = "https://github.com/horst3180/Arc-theme";
+    homepage = "https://github.com/horst3180/arc-theme";
     license = licenses.gpl3;
-    platforms = platforms.linux;
+    platforms = platforms.unix;
     maintainers = with maintainers; [ simonvandel romildo ];
   };
 }
diff --git a/pkgs/misc/themes/vertex/default.nix b/pkgs/misc/themes/vertex/default.nix
index 7c6778a40d54..fe48bb14d40c 100644
--- a/pkgs/misc/themes/vertex/default.nix
+++ b/pkgs/misc/themes/vertex/default.nix
@@ -1,33 +1,38 @@
-{ stdenv, fetchFromGitHub, autoreconfHook, gtk3, pkgconfig }:
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, gnome3, gtk-engine-murrine }:
 
 stdenv.mkDerivation rec {
-  name = "theme-vertex-${version}";
-  version = "20160329";
+  name = "${pname}-${version}";
+  pname = "theme-vertex";
+  version = "20161009";
 
   src = fetchFromGitHub {
     owner = "horst3180";
-    repo = "Vertex-theme";
-    rev = version;
-    sha256 = "1zafnbxn9hgi4lmi254iw9jyhifcqijxa7cymwjpyy0jfa6sm1qj";
+    repo = "vertex-theme";
+    rev = "c861918a7fccf6d0768d45d790a19a13bb23485e";
+    sha256 = "13abgl18m04sj44gqipxbagpan4jqral65w59rgnhb6ldxgnhg33";
   };
 
-  buildInputs = [ autoreconfHook gtk3 pkgconfig ];
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
 
-  configureFlags = "--disable-unity";
+  buildInputs = [ gtk-engine-murrine ];
+
+  configureFlags = [ "--disable-unity" "--with-gnome=${gnome3.version}" ];
 
   postInstall = ''
-    mkdir -p $out/share/doc/theme-vertex
-    cp AUTHORS COPYING README.md $out/share/doc/theme-vertex/
+    mkdir -p $out/share/plank/themes
+    cp -r extra/*-Plank $out/share/plank/themes
 
-    mkdir -p $out/share/doc/theme-vertex/extra
-    cp -r extra/{Chrome,Firefox} $out/share/doc/theme-vertex/extra
+    mkdir -p $out/share/doc/$pname/Chrome
+    cp -r extra/Chrome/*.crx $out/share/doc/$pname/Chrome
+    cp -r extra/Firefox $out/share/doc/$pname
+    cp AUTHORS README.md $out/share/doc/$pname/
   '';
 
   meta = with stdenv.lib; {
     inherit (src.meta) homepage;
     description = "Theme for GTK 3, GTK 2, Gnome-Shell, and Cinnamon";
     license = licenses.gpl3;
-    maintainers = [ maintainers.rycee ];
     platforms = platforms.unix;
+    maintainers = with maintainers; [ rycee romildo ];
   };
 }
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
index 27d2360a9800..aac213bb8047 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
@@ -56,9 +56,40 @@ appleDerivation rec {
     # The startup object files
     cp ${Csu}/lib/* $out/lib
 
-    # OMG impurity
-    ln -s /usr/lib/libSystem.B.dylib $out/lib/libSystem.B.dylib
-    ln -s /usr/lib/libSystem.dylib $out/lib/libSystem.dylib
+    # Narrowly speaking, these would work if we re-exported libsystem_c and libsystem_kernel,
+    # but we also need to run the original central libsystem constructor (which initializes
+    # a ton of crap for its consitutent libraries) so we link against the central library here.
+    mkdir -p $out/lib/system
+    ld -macosx_version_min 10.7 -arch x86_64 -dylib \
+       -o $out/lib/system/libsystem_c.dylib \
+       /usr/lib/libSystem.dylib \
+       -reexported_symbols_list ${./system_c_symbols}
+
+    ld -macosx_version_min 10.7 -arch x86_64 -dylib \
+       -o $out/lib/system/libsystem_kernel.dylib \
+       /usr/lib/libSystem.dylib \
+       -reexported_symbols_list ${./system_kernel_symbols}
+
+    libs=$(otool -arch x86_64 -L /usr/lib/libSystem.dylib | tail -n +3 | awk '{ print $1 }')
+
+
+    for i in $libs; do
+      if [ "$i" != "/usr/lib/system/libsystem_kernel.dylib" ] && [ "$i" != "/usr/lib/system/libsystem_c.dylib" ]; then
+        args="$args -reexport_library $i"
+      fi
+    done
+
+    ld -macosx_version_min 10.7 \
+       -arch x86_64 \
+       -dylib \
+       -o $out/lib/libSystem.B.dylib \
+       -compatibility_version 1.0 \
+       -current_version 1226.10.1 \
+       -reexport_library $out/lib/system/libsystem_c.dylib \
+       -reexport_library $out/lib/system/libsystem_kernel.dylib \
+       $args
+
+    ln -s libSystem.B.dylib $out/lib/libSystem.dylib
 
     # Set up links to pretend we work like a conventional unix (Apple's design, not mine!)
     for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols
index 0c814899c3c4..e298ae47f72d 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols
@@ -1,14 +1,3 @@
-_NSGetNextSearchPathEnumeration
-_NSStartSearchPathEnumeration
-_OSAtomicAdd32
-_OSAtomicAdd32Barrier
-_OSAtomicAnd32
-_OSAtomicDequeue
-_OSAtomicEnqueue
-_OSSpinLockLock
-_OSSpinLockUnlock
-__Block_copy
-__Block_release
 __CurrentRuneLocale
 __DefaultRuneLocale
 __Exit
@@ -62,20 +51,18 @@ ___bt_setcur
 ___bt_split
 ___bt_sync
 ___buf_free
-___bzero
 ___cVersionNumber
 ___cVersionString
 ___call_hash
-___chmod_extended
 ___cleanup
 ___cmp_D2A
 ___collate_equiv_match
 ___collate_load_error
 ___collate_lookup
-___commpage_gettimeofday
 ___copybits_D2A
 ___cxa_atexit
 ___cxa_finalize
+___cxa_finalize_ranges
 ___cxa_thread_atexit
 ___d2b_D2A
 ___dbpanic
@@ -85,34 +72,21 @@ ___default_utx
 ___delpair
 ___diff_D2A
 ___dtoa
-___error
-___exit
 ___expand_table
-___fchmod_extended
-___fcntl
-___fcntl_nocancel
 ___fflush
 ___fgetwc
 ___find_bigpair
 ___find_last_page
 ___fix_locale_grouping_str
-___fork
-___fpclassifyd
-___fpclassifyl
 ___fread
 ___free_ovflpage
 ___freedtoa
-___fstat64_extended
-___fstat_extended
 ___gdtoa
 ___gdtoa_locks
 ___get_buf
 ___get_page
-___getdirentries64
 ___gethex_D2A
-___getlogin
 ___getonlyClocaleconv
-___gettimeofday
 ___hash_open
 ___hdtoa
 ___hexdig_D2A
@@ -126,14 +100,11 @@ ___increment_D2A
 ___isctype
 ___istype
 ___istype_l
-___kill
 ___ldtoa
 ___libc_init
 ___lo0bits_D2A
 ___log2
 ___lshift_D2A
-___lstat64_extended
-___lstat_extended
 ___maskrune
 ___maskrune_l
 ___match_D2A
@@ -143,22 +114,15 @@ ___memccpy_chk
 ___memcpy_chk
 ___memmove_chk
 ___memset_chk
-___mkdir_extended
-___mkfifo_extended
 ___mult_D2A
 ___multadd_D2A
 ___nrv_alloc_D2A
-___open
-___open_extended
-___open_nocancel
 ___opendir2
 ___opendir2$INODE64
 ___ovfl_delete
 ___ovfl_get
 ___ovfl_put
 ___pow5mult_D2A
-___pthread_sigmask
-___pthread_workqueue_setkill
 ___put_page
 ___quorem_D2A
 ___ratio_D2A
@@ -179,29 +143,19 @@ ___rec_sync
 ___rec_vmap
 ___rec_vpipe
 ___reclaim_buf
-___recvfrom
-___recvfrom_nocancel
 ___rshift_D2A
 ___rv_alloc_D2A
 ___s2b_D2A
 ___sF
 ___sclose
 ___sdidinit
-___semwait_signal
-___semwait_signal_nocancel
-___sendto
-___sendto_nocancel
 ___set_ones_D2A
-___setlogin
 ___setonlyClocaleconv
-___settimeofday
 ___sflags
 ___sflush
 ___sfp
 ___sfvwrite
 ___sglue
-___sigaction
-___sigaltstack
 ___sinit
 ___slbexpand
 ___smakebuf
@@ -214,8 +168,6 @@ ___srget
 ___sseek
 ___stack_chk_fail
 ___stack_chk_guard
-___stat64_extended
-___stat_extended
 ___stderrp
 ___stdinp
 ___stdoutp
@@ -237,7 +189,6 @@ ___swbuf
 ___swhatbuf
 ___swrite
 ___swsetup
-___sysctl
 ___tens_D2A
 ___tinytens_D2A
 ___tolower
@@ -246,31 +197,25 @@ ___toupper
 ___toupper_l
 ___trailz_D2A
 ___ulp_D2A
-___umask_extended
 ___ungetc
 ___ungetwc
-___unix_conforming
 ___vsnprintf_chk
 ___vsprintf_chk
-___wait4
-___wait4_nocancel
 ___wcwidth
 ___wcwidth_l
 __allocenvstate
+__atexit_receipt
 __c_locale
 __cleanup
 __closeutx
 __copyenv
 __cthread_init_routine
 __deallocenvstate
-__dyld_register_func_for_add_image
 __endutxent
-__exit
 __flockfile_debug_stub
 __fseeko
 __ftello
 __fwalk
-__get_cpu_capabilities
 __getenvp
 __getutxent
 __getutxid
@@ -279,34 +224,18 @@ __inet_aton_check
 __init_clock_port
 __int_to_time
 __libc_fork_child
+__libc_initializer
 __long_to_time
 __mkpath_np
 __mktemp
 __openutx
-__os_alloc_once
-__os_alloc_once_table
 __os_assert_log
 __os_assert_log_ctx
 __os_assumes_log
 __os_assumes_log_ctx
 __os_avoid_tail_call
-__osx_assert_log
-__osx_assert_log_ctx
-__osx_assumes_log
-__osx_assumes_log_ctx
-__osx_avoid_tail_call
-__platform_bzero
-__platform_memccpy
-__platform_memchr
-__platform_memcmp
-__platform_memmove
-__platform_memset
-__platform_memset_pattern16
-__platform_memset_pattern4
-__platform_memset_pattern8
-__platform_strchr
-__platform_strcmp
-__platform_strncmp
+__os_debug_log
+__os_debug_log_error_str
 __putenvp
 __pututxline
 __rand48_add
@@ -322,20 +251,7 @@ __setutxent
 __sigaction_nobind
 __sigintr
 __signal_nobind
-__sigtramp
 __sigvec_nobind
-__simple_asl_log
-__simple_asl_log_prog
-__simple_asl_msg_new
-__simple_asl_msg_set
-__simple_asl_send
-__simple_dprintf
-__simple_salloc
-__simple_sappend
-__simple_sfree
-__simple_sprintf
-__simple_string
-__simple_vsprintf
 __sread
 __sseek
 __swrite
@@ -345,14 +261,11 @@ __time_to_int
 __time_to_long
 __time_to_time32
 __time_to_time64
-__tlv_atexit
-__tlv_exit
 __unsetenvp
 __utmpxname
 _a64l
 _abort
 _abs
-_access
 _acl_add_flag_np
 _acl_add_perm
 _acl_calc_mask
@@ -416,12 +329,6 @@ _arc4random_uniform
 _ascii2addr
 _asctime
 _asctime_r
-_asl_get
-_asl_new
-_asl_open
-_asl_send
-_asl_set
-_asl_set_query
 _asprintf
 _asprintf_l
 _asxprintf
@@ -442,8 +349,6 @@ _backtrace_symbols_fd
 _basename
 _bcmp
 _bcopy
-_bootstrap_parent
-_bootstrap_port
 _brk
 _bsd_signal
 _bsearch
@@ -451,7 +356,6 @@ _bsearch_b
 _btowc
 _btowc_l
 _bzero
-_calloc
 _catclose
 _catgets
 _catopen
@@ -471,17 +375,12 @@ _cgetnum
 _cgetset
 _cgetstr
 _cgetustr
-_chdir
-_chflags
-_chmod
 _chmodx_np
 _clearerr
 _clearerr_unlocked
 _clock
-_clock_get_time
 _clock_port
 _clock_sem
-_close$NOCANCEL
 _closedir
 _compat_mode
 _confstr
@@ -514,19 +413,13 @@ _digittoint
 _digittoint_l
 _dirfd
 _dirname
-_dispatch_get_global_queue
 _div
-_dladdr
-_dlsym
 _dprintf
 _dprintf_l
 _drand48
-_dup2
 _duplocale
 _dxprintf
 _dxprintf_exec
-_dyld_get_program_sdk_version
-_dyld_get_sdk_version
 _ecvt
 _encrypt
 _endttyent
@@ -545,26 +438,22 @@ _execle
 _execlp
 _execv
 _execvP
-_execve
 _execvp
 _exit
 _f_prealloc
-_fchdir
 _fchmodx_np
 _fclose
-_fcntl$NOCANCEL
 _fcvt
 _fdopen
 _fdopen$DARWIN_EXTSN
-_fegetenv
+_fdopendir
+_fdopendir$INODE64
 _feof
 _feof_unlocked
 _ferror
 _ferror_unlocked
-_fesetenv
 _fflagstostr
 _fflush
-_ffsctl
 _fgetc
 _fgetln
 _fgetpos
@@ -586,7 +475,6 @@ _filesec_query_property
 _filesec_set_property
 _filesec_unset_property
 _flockfile
-_flsl
 _fmtcheck
 _fmtmsg
 _fnmatch
@@ -606,33 +494,24 @@ _fputwc_l
 _fputws
 _fputws_l
 _fread
-_free
 _free_printf_comp
 _free_printf_domain
-_freeifaddrs
 _freelocale
 _freopen
 _fscanf
 _fscanf_l
-_fsctl
 _fseek
 _fseeko
 _fsetpos
-_fstat
-_fstat$INODE64
-_fstatfs
-_fstatfs$INODE64
 _fstatvfs
 _fstatx64_np
 _fstatx_np
 _fstatx_np$INODE64
-_fsync$NOCANCEL
 _fsync_volume_np
 _ftell
 _ftello
 _ftime
 _ftok
-_ftruncate
 _ftrylockfile
 _fts_children
 _fts_children$INODE64
@@ -660,7 +539,6 @@ _fwscanf_l
 _fxprintf
 _fxprintf_exec
 _gcvt
-_getattrlist
 _getbsize
 _getc
 _getc_unlocked
@@ -670,22 +548,11 @@ _getcwd
 _getdate
 _getdate_err
 _getdelim
-_getdirentries
 _getdiskbyname
-_getdtablesize
 _getenv
-_geteuid
-_getfsstat
-_getfsstat$INODE64
-_getfsstat64
-_getgrgid
-_getgrnam
-_getgroupcount
-_getgrouplist
 _getgroups$DARWIN_EXTSN
 _gethostid
 _gethostname
-_getifaddrs
 _getipv4sourcefilter
 _getlastlogx
 _getlastlogxbyname
@@ -703,24 +570,13 @@ _getopt_long_only
 _getpagesize
 _getpass
 _getpeereid
-_getpgrp
-_getpid
-_getpriority
 _getprogname
-_getpwnam
-_getpwuid
-_getpwuid_r
-_getrlimit
-_getrusage
 _gets
-_getsectiondata
-_getsockopt
 _getsourcefilter
 _getsubopt
 _gettimeofday
 _getttyent
 _getttynam
-_getuid
 _getusershell
 _getutmp
 _getutmpx
@@ -753,9 +609,7 @@ _hcreate
 _hdestroy
 _heapsort
 _heapsort_b
-_host_get_clock_service
 _hsearch
-_if_nametoindex
 _imaxabs
 _imaxdiv
 _index
@@ -777,7 +631,6 @@ _inet_ntop6
 _inet_pton
 _initstate
 _insque
-_ioctl
 _isalnum
 _isalnum_l
 _isalpha
@@ -808,7 +661,6 @@ _ispunct
 _ispunct_l
 _isrune
 _isrune_l
-_issetugid
 _isspace
 _isspace_l
 _isspecial
@@ -857,7 +709,7 @@ _iswxdigit_l
 _isxdigit
 _isxdigit_l
 _jrand48
-_kill
+_kOSThermalNotificationPressureLevelName
 _killpg
 _l64a
 _labs
@@ -882,26 +734,13 @@ _logout
 _logwtmp
 _lrand48
 _lsearch
-_lseek
-_lstat
-_lstat$INODE64
 _lstatx64_np
 _lstatx_np
 _lstatx_np$INODE64
 _lutimes
-_mach_absolute_time
-_mach_error_string
-_mach_host_self
-_mach_port_deallocate
-_mach_task_self_
-_mach_timebase_info
-_malloc
 _mblen
 _mblen_l
 _mbmb
-_mbr_gid_to_uuid
-_mbr_uid_to_uuid
-_mbr_uuid_to_id
 _mbrlen
 _mbrlen_l
 _mbrrune
@@ -931,7 +770,6 @@ _memset_pattern8
 _memset_s
 _mergesort
 _mergesort_b
-_mkdir
 _mkdirx_np
 _mkdtemp
 _mkfifox_np
@@ -940,7 +778,6 @@ _mkstemp
 _mkstemps
 _mktemp
 _mktime
-_mmap
 _monaddition
 _moncontrol
 _moncount
@@ -957,10 +794,6 @@ _mpool_open
 _mpool_put
 _mpool_sync
 _mrand48
-_munmap
-_nan
-_nanf
-_nanl
 _nanosleep
 _nanosleep$NOCANCEL
 _new_printf_comp
@@ -973,16 +806,10 @@ _nftw$INODE64
 _nice
 _nl_langinfo
 _nl_langinfo_l
-_notify_cancel
-_notify_check
-_notify_monitor_file
-_notify_post
-_notify_register_check
 _nrand48
 _off32
 _off64
 _offtime
-_open$NOCANCEL
 _opendev
 _opendir
 _opendir$INODE64
@@ -993,60 +820,21 @@ _opterr
 _optind
 _optopt
 _optreset
-_pathconf
 _pause
 _pause$NOCANCEL
 _pclose
 _perror
-_pipe
 _popen
 _popen$DARWIN_EXTSN
 _posix2time
 _posix_openpt
-_posix_spawn
-_posix_spawn_file_actions_addclose
-_posix_spawn_file_actions_adddup2
-_posix_spawn_file_actions_destroy
-_posix_spawn_file_actions_init
-_posix_spawnattr_destroy
-_posix_spawnattr_init
-_posix_spawnattr_setflags
-_posix_spawnattr_setsigdefault
-_posix_spawnattr_setsigmask
 _posix_spawnp
-_pread$NOCANCEL
 _printf
 _printf_l
-_proc_name
-_pselect
-_pselect$1050
-_pselect$DARWIN_EXTSN
-_pselect$DARWIN_EXTSN$NOCANCEL
-_pselect$NOCANCEL
 _psignal
 _psort
 _psort_b
 _psort_r
-_pthread_get_stackaddr_np
-_pthread_get_stacksize_np
-_pthread_getspecific
-_pthread_key_create
-_pthread_key_init_np
-_pthread_kill
-_pthread_mutex_destroy
-_pthread_mutex_init
-_pthread_mutex_lock
-_pthread_mutex_trylock
-_pthread_mutex_unlock
-_pthread_once
-_pthread_rwlock_destroy
-_pthread_rwlock_rdlock
-_pthread_rwlock_unlock
-_pthread_rwlock_wrlock
-_pthread_self
-_pthread_setspecific
-_pthread_sigmask
-_pthread_testcancel
 _ptsname
 _putc
 _putc_unlocked
@@ -1060,7 +848,6 @@ _putwc
 _putwc_l
 _putwchar
 _putwchar_l
-_pwrite$NOCANCEL
 _qsort
 _qsort_b
 _qsort_r
@@ -1078,14 +865,11 @@ _rb_tree_init
 _rb_tree_insert_node
 _rb_tree_iterate
 _rb_tree_remove_node
-_read$NOCANCEL
 _readdir
 _readdir$INODE64
 _readdir_r
 _readdir_r$INODE64
-_readlink
 _readpassphrase
-_realloc
 _reallocf
 _realpath
 _realpath$DARWIN_EXTSN
@@ -1113,7 +897,6 @@ _rewind
 _rewinddir
 _rewinddir$INODE64
 _rindex
-_rmdir
 _sbrk
 _scandir
 _scandir$INODE64
@@ -1124,15 +907,8 @@ _scanf_l
 _seed48
 _seekdir
 _seekdir$INODE64
-_select
-_select$1050
-_select$DARWIN_EXTSN
-_select$DARWIN_EXTSN$NOCANCEL
-_select$NOCANCEL
-_semaphore_create
 _send
 _send$NOCANCEL
-_setattrlist
 _setbuf
 _setbuffer
 _setenv
@@ -1140,24 +916,16 @@ _sethostid
 _sethostname
 _setinvalidrune
 _setipv4sourcefilter
-_setitimer
 _setkey
 _setlinebuf
 _setlocale
 _setlogin
 _setmode
-_setpgid
 _setpgrp
-_setpriority
 _setprogname
-_setregid
-_setreuid
 _setrgid
-_setrlimit
 _setruid
 _setrunelocale
-_setsid
-_setsockopt
 _setsourcefilter
 _setstate
 _settimeofday
@@ -1180,12 +948,9 @@ _sigismember
 _signal
 _sigpause
 _sigpause$NOCANCEL
-_sigprocmask
 _sigrelse
 _sigset
 _sigsetmask
-_sigsuspend
-_sigsuspend$NOCANCEL
 _sigvec
 _skip
 _sl_add
@@ -1197,10 +962,6 @@ _sleep$NOCANCEL
 _snprintf
 _snprintf_l
 _sockatmark
-_socket
-_socketpair
-_spin_lock
-_spin_unlock
 _sprintf
 _sprintf_l
 _sradixsort
@@ -1211,9 +972,6 @@ _srandom
 _srandomdev
 _sscanf
 _sscanf_l
-_stat
-_stat$INODE64
-_statfs$INODE64
 _statvfs
 _statx64_np
 _statx_np
@@ -1306,10 +1064,8 @@ _sysconf
 _sysctl
 _sysctlbyname
 _sysctlnametomib
-_syslog
 _system
 _system$NOCANCEL
-_task_set_special_port
 _tcdrain
 _tcdrain$NOCANCEL
 _tcflow
@@ -1346,6 +1102,23 @@ _towlower
 _towlower_l
 _towupper
 _towupper_l
+_tre_ast_new_catenation
+_tre_ast_new_iter
+_tre_ast_new_literal
+_tre_ast_new_node
+_tre_ast_new_union
+_tre_compile
+_tre_fill_pmatch
+_tre_free
+_tre_mem_alloc_impl
+_tre_mem_destroy
+_tre_mem_new_impl
+_tre_parse
+_tre_stack_destroy
+_tre_stack_new
+_tre_stack_num_objects
+_tre_tnfa_run_backtrack
+_tre_tnfa_run_parallel
 _tsearch
 _ttyname
 _ttyname_r
@@ -1356,13 +1129,11 @@ _tzset
 _tzsetwall
 _ualarm
 _ulimit
-_umask
 _umaskx_np
 _uname
 _ungetc
 _ungetwc
 _ungetwc_l
-_unlink
 _unlockpt
 _unsetenv
 _unvis
@@ -1370,7 +1141,6 @@ _uselocale
 _usleep
 _usleep$NOCANCEL
 _utime
-_utimes
 _utmpxname
 _uuid_clear
 _uuid_compare
@@ -1407,7 +1177,6 @@ _vfwscanf_l
 _vfxprintf
 _vfxprintf_exec
 _vis
-_vm_allocate
 _vprintf
 _vprintf_l
 _vscanf
@@ -1436,7 +1205,6 @@ _vxprintf_exec
 _wait
 _wait$NOCANCEL
 _wait3
-_wait4
 _waitpid
 _waitpid$NOCANCEL
 _warn
@@ -1519,12 +1287,9 @@ _wordexp
 _wordfree
 _wprintf
 _wprintf_l
-_write$NOCANCEL
-_writev$NOCANCEL
 _wscanf
 _wscanf_l
 _wtmpxname
 _xprintf
 _xprintf_exec
-dyld_stub_binder
 mcount
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols
index 9d53dea70253..ff9073157a58 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols
@@ -9,17 +9,20 @@ ___access_extended
 ___aio_suspend_nocancel
 ___bind
 ___bsdthread_create
+___bsdthread_ctl
 ___bsdthread_register
 ___bsdthread_terminate
 ___carbon_delete
 ___chmod
 ___chmod_extended
-___chud
 ___close_nocancel
+___coalition
+___coalition_info
 ___commpage_gettimeofday
 ___connect
 ___connect_nocancel
 ___copyfile
+___csrctl
 ___delete
 ___disable_threadsignal
 ___error
@@ -29,7 +32,6 @@ ___fchmod_extended
 ___fcntl
 ___fcntl_nocancel
 ___fork
-___fsgetpath
 ___fstat64_extended
 ___fstat_extended
 ___fsync_nocancel
@@ -37,7 +39,6 @@ ___get_remove_counter
 ___getattrlist
 ___getdirentries64
 ___gethostuuid
-___getlcid
 ___getlogin
 ___getpeername
 ___getpid
@@ -47,6 +48,7 @@ ___getsockname
 ___gettid
 ___gettimeofday
 ___getwgroups
+___guarded_open_dprotected_np
 ___guarded_open_np
 ___identitysvc
 ___inc_remove_counter
@@ -54,11 +56,13 @@ ___initgroups
 ___ioctl
 ___iopolicysys
 ___kdebug_trace
+___kdebug_trace64
 ___kernelVersionNumber
 ___kernelVersionString
 ___kill
 ___lchown
 ___libkernel_init
+___libkernel_voucher_init
 ___listen
 ___lseek
 ___lstat64_extended
@@ -66,8 +70,6 @@ ___lstat_extended
 ___mac_execve
 ___mac_get_fd
 ___mac_get_file
-___mac_get_lcid
-___mac_get_lctx
 ___mac_get_link
 ___mac_get_mount
 ___mac_get_pid
@@ -76,7 +78,6 @@ ___mac_getfsstat
 ___mac_mount
 ___mac_set_fd
 ___mac_set_file
-___mac_set_lctx
 ___mac_set_link
 ___mac_set_proc
 ___mac_syscall
@@ -96,6 +97,8 @@ ___open
 ___open_dprotected_np
 ___open_extended
 ___open_nocancel
+___openat
+___openat_nocancel
 ___pipe
 ___poll_nocancel
 ___posix_spawn
@@ -131,6 +134,7 @@ ___recvfrom_nocancel
 ___recvmsg
 ___recvmsg_nocancel
 ___rename
+___renameat
 ___rmdir
 ___sandbox_me
 ___sandbox_mm
@@ -149,8 +153,8 @@ ___sendmsg_nocancel
 ___sendto
 ___sendto_nocancel
 ___setattrlist
-___setlcid
 ___setlogin
+___setpriority
 ___setregid
 ___setreuid
 ___setrlimit
@@ -159,6 +163,8 @@ ___settid
 ___settid_with_pid
 ___settimeofday
 ___setwgroups
+___sfi_ctl
+___sfi_pidctl
 ___shared_region_check_np
 ___shared_region_map_and_slide_np
 ___shm_open
@@ -171,16 +177,18 @@ ___sigsuspend
 ___sigsuspend_nocancel
 ___sigwait
 ___socketpair
-___stack_snapshot
 ___stat64_extended
 ___stat_extended
 ___syscall
 ___syscall_logger
 ___sysctl
+___sysctlbyname
 ___telemetry
 ___thread_selfid
+___thread_selfusage
 ___umask_extended
 ___unlink
+___unlinkat
 ___vfork
 ___wait4
 ___wait4_nocancel
@@ -238,6 +246,7 @@ __kernelrpc_mach_port_set_attributes
 __kernelrpc_mach_port_set_context
 __kernelrpc_mach_port_set_mscount
 __kernelrpc_mach_port_set_seqno
+__kernelrpc_mach_port_space_basic_info
 __kernelrpc_mach_port_space_info
 __kernelrpc_mach_port_type
 __kernelrpc_mach_port_unguard
@@ -253,6 +262,9 @@ __kernelrpc_mach_vm_protect_trap
 __kernelrpc_mach_vm_read
 __kernelrpc_mach_vm_remap
 __kernelrpc_task_set_port_space
+__kernelrpc_thread_policy
+__kernelrpc_thread_policy_set
+__kernelrpc_thread_set_policy
 __kernelrpc_vm_map
 __kernelrpc_vm_read
 __kernelrpc_vm_remap
@@ -304,11 +316,18 @@ _clock_sleep
 _clock_sleep_trap
 _close
 _close$NOCANCEL
+_coalition_create
+_coalition_info_resource_usage
+_coalition_reap
+_coalition_terminate
 _connect
 _connect$NOCANCEL
 _connectx
 _csops
 _csops_audittoken
+_csr_check
+_csr_get_active_config
+_denap_boost_assertion_token
 _disconnectx
 _dup
 _dup2
@@ -321,10 +340,13 @@ _exception_raise_state
 _exception_raise_state_identity
 _exchangedata
 _execve
+_faccessat
 _fchdir
 _fchflags
 _fchmod
+_fchmodat
 _fchown
+_fchownat
 _fcntl
 _fcntl$NOCANCEL
 _fdatasync
@@ -344,6 +366,9 @@ _fsetxattr
 _fstat
 _fstat$INODE64
 _fstat64
+_fstatat
+_fstatat$INODE64
+_fstatat64
 _fstatfs
 _fstatfs$INODE64
 _fstatfs64
@@ -353,6 +378,8 @@ _ftruncate
 _futimes
 _get_dp_control_port
 _getattrlist
+_getattrlistat
+_getattrlistbulk
 _getaudit
 _getaudit_addr
 _getauid
@@ -387,7 +414,12 @@ _getwgroups_np
 _getxattr
 _guarded_close_np
 _guarded_kqueue_np
+_guarded_open_dprotected_np
 _guarded_open_np
+_guarded_pwrite_np
+_guarded_write_np
+_guarded_writev_np
+_host_create_mach_voucher
 _host_default_memory_manager
 _host_get_UNDServer
 _host_get_boot_info
@@ -406,6 +438,8 @@ _host_processor_set_priv
 _host_processor_sets
 _host_processors
 _host_reboot
+_host_register_mach_voucher_attr_manager
+_host_register_well_known_mach_voucher_attr_manager
 _host_request_notification
 _host_security_create_task_token
 _host_security_set_task_token
@@ -426,6 +460,7 @@ _internal_catch_exc_subsystem
 _ioctl
 _issetugid
 _kas_info
+_kdebug_trace
 _kevent
 _kevent64
 _kext_request
@@ -438,6 +473,7 @@ _kqueue
 _lchown
 _ledger
 _link
+_linkat
 _lio_listio
 _listen
 _listxattr
@@ -454,6 +490,7 @@ _lstat
 _lstat$INODE64
 _lstat64
 _mach_absolute_time
+_mach_approximate_time
 _mach_error
 _mach_error_full_diag
 _mach_error_string
@@ -510,6 +547,7 @@ _mach_port_set_attributes
 _mach_port_set_context
 _mach_port_set_mscount
 _mach_port_set_seqno
+_mach_port_space_basic_info
 _mach_port_space_info
 _mach_port_type
 _mach_port_unguard
@@ -540,6 +578,12 @@ _mach_vm_region_recurse
 _mach_vm_remap
 _mach_vm_wire
 _mach_vm_write
+_mach_voucher_attr_command
+_mach_voucher_deallocate
+_mach_voucher_debug_info
+_mach_voucher_extract_all_attr_recipes
+_mach_voucher_extract_attr_content
+_mach_voucher_extract_attr_recipe
 _mach_wait_until
 _mach_zone_force_gc
 _mach_zone_info
@@ -565,6 +609,7 @@ _mk_timer_cancel
 _mk_timer_create
 _mk_timer_destroy
 _mkdir
+_mkdirat
 _mkfifo
 _mknod
 _mlock
@@ -573,6 +618,7 @@ _mmap
 _modwatch
 _mount
 _mprotect
+_mremap_encrypted
 _msg_receive
 _msg_rpc
 _msg_send
@@ -588,6 +634,7 @@ _msync$NOCANCEL
 _munlock
 _munlockall
 _munmap
+_necp_match_policy
 _netname_check_in
 _netname_check_out
 _netname_look_up
@@ -599,12 +646,17 @@ _normal_boost_assertion_token
 _open
 _open$NOCANCEL
 _open_dprotected_np
+_openat
+_openat$NOCANCEL
+_openbyid_np
 _panic
 _panic_init
 _pathconf
 _peeloff
 _pid_for_task
+_pid_hibernate
 _pid_resume
+_pid_shutdown_sockets
 _pid_suspend
 _pipe
 _poll
@@ -621,6 +673,7 @@ _posix_spawn_file_actions_addopen
 _posix_spawn_file_actions_destroy
 _posix_spawn_file_actions_init
 _posix_spawnattr_destroy
+_posix_spawnattr_get_qos_clamp_np
 _posix_spawnattr_getbinpref_np
 _posix_spawnattr_getcpumonitor
 _posix_spawnattr_getflags
@@ -632,8 +685,10 @@ _posix_spawnattr_getsigdefault
 _posix_spawnattr_getsigmask
 _posix_spawnattr_init
 _posix_spawnattr_set_importancewatch_port_np
+_posix_spawnattr_set_qos_clamp_np
 _posix_spawnattr_setauditsessionport_np
 _posix_spawnattr_setbinpref_np
+_posix_spawnattr_setcoalition_np
 _posix_spawnattr_setcpumonitor
 _posix_spawnattr_setcpumonitor_default
 _posix_spawnattr_setexceptionports_np
@@ -648,7 +703,10 @@ _posix_spawnattr_setspecialport_np
 _pread
 _pread$NOCANCEL
 _proc_clear_delayidlesleep
+_proc_clear_dirty
 _proc_clear_vmpressure
+_proc_denap_assertion_begin_with_msg
+_proc_denap_assertion_complete
 _proc_disable_apptype
 _proc_disable_cpumon
 _proc_disable_wakemon
@@ -671,19 +729,23 @@ _proc_pid_rusage
 _proc_pidfdinfo
 _proc_pidfileportinfo
 _proc_pidinfo
+_proc_pidoriginatorinfo
 _proc_pidpath
 _proc_regionfilename
 _proc_rlimit_control
 _proc_set_cpumon_defaults
 _proc_set_cpumon_params
+_proc_set_cpumon_params_fatal
 _proc_set_delayidlesleep
 _proc_set_dirty
 _proc_set_owner_vmpressure
 _proc_set_wakemon_defaults
 _proc_set_wakemon_params
 _proc_setpcontrol
+_proc_setthread_cpupercent
 _proc_suppress
 _proc_terminate
+_proc_trace_log
 _proc_track_dirty
 _proc_uuid_policy
 _processor_assign
@@ -704,6 +766,11 @@ _processor_set_statistics
 _processor_set_tasks
 _processor_set_threads
 _processor_start
+_pselect
+_pselect$1050
+_pselect$DARWIN_EXTSN
+_pselect$DARWIN_EXTSN$NOCANCEL
+_pselect$NOCANCEL
 _pthread_getugid_np
 _pthread_setugid_np
 _ptrace
@@ -714,6 +781,7 @@ _quotactl
 _read
 _read$NOCANCEL
 _readlink
+_readlinkat
 _readv
 _readv$NOCANCEL
 _reboot
@@ -721,8 +789,11 @@ _recvfrom
 _recvfrom$NOCANCEL
 _recvmsg
 _recvmsg$NOCANCEL
+_recvmsg_x
 _removexattr
 _rename
+_rename_ext
+_renameat
 _revoke
 _rmdir
 _searchfs
@@ -764,6 +835,7 @@ _semsys
 _sendfile
 _sendmsg
 _sendmsg$NOCANCEL
+_sendmsg_x
 _sendto
 _sendto$NOCANCEL
 _set_dp_control_port
@@ -790,6 +862,10 @@ _setsockopt
 _setuid
 _setwgroups_np
 _setxattr
+_sfi_get_class_offtime
+_sfi_process_get_flags
+_sfi_process_set_flags
+_sfi_set_class_offtime
 _shm_open
 _shm_unlink
 _shmat
@@ -815,10 +891,13 @@ _swapon
 _swtch
 _swtch_pri
 _symlink
+_symlinkat
 _sync
 _syscall
 _syscall_thread_switch
+_system_get_sfi_window
 _system_override
+_system_set_sfi_window
 _task_assign
 _task_assign_default
 _task_create
@@ -826,6 +905,7 @@ _task_for_pid
 _task_get_assignment
 _task_get_emulation_vector
 _task_get_exception_ports
+_task_get_mach_voucher
 _task_get_special_port
 _task_get_state
 _task_info
@@ -843,6 +923,7 @@ _task_set_emulation
 _task_set_emulation_vector
 _task_set_exception_ports
 _task_set_info
+_task_set_mach_voucher
 _task_set_phys_footprint_limit
 _task_set_policy
 _task_set_port_space
@@ -852,6 +933,7 @@ _task_set_state
 _task_suspend
 _task_suspend2
 _task_swap_exception_ports
+_task_swap_mach_voucher
 _task_terminate
 _task_threads
 _task_zone_info
@@ -864,6 +946,7 @@ _thread_create_running
 _thread_depress_abort
 _thread_get_assignment
 _thread_get_exception_ports
+_thread_get_mach_voucher
 _thread_get_special_port
 _thread_get_state
 _thread_info
@@ -874,11 +957,13 @@ _thread_resume
 _thread_sample
 _thread_self_trap
 _thread_set_exception_ports
+_thread_set_mach_voucher
 _thread_set_policy
 _thread_set_special_port
 _thread_set_state
 _thread_suspend
 _thread_swap_exception_ports
+_thread_swap_mach_voucher
 _thread_switch
 _thread_terminate
 _thread_wire
@@ -886,6 +971,7 @@ _truncate
 _umask
 _undelete
 _unlink
+_unlinkat
 _unmount
 _utimes
 _vfork
@@ -917,6 +1003,10 @@ _vm_region_recurse_64
 _vm_remap
 _vm_wire
 _vm_write
+_voucher_mach_msg_adopt
+_voucher_mach_msg_clear
+_voucher_mach_msg_revert
+_voucher_mach_msg_set
 _vprintf_stderr_func
 _wait4
 _waitevent
diff --git a/pkgs/os-specific/linux/amdgpu-pro/default.nix b/pkgs/os-specific/linux/amdgpu-pro/default.nix
new file mode 100644
index 000000000000..17a066640410
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/default.nix
@@ -0,0 +1,155 @@
+{ stdenv, fetchurl, elfutils, mesa_noglu
+, xorg, patchelf, openssl, libdrm, libudev
+, libxcb, libxshmfence, epoxy, perl, zlib
+, libsOnly ? false, kernel ? null
+}:
+
+assert (!libsOnly) -> kernel != null;
+
+with stdenv.lib;
+
+let
+
+  kernelDir = if libsOnly then null else kernel.dev;
+
+  inherit (mesa_noglu) driverLink;
+
+  bitness = if stdenv.is64bit then "64" else "32";
+
+  libArch =
+    if stdenv.system == "i686-linux" then
+      "i386-linux-gnu"
+    else if stdenv.system == "x86_64-linux" then
+      "x86_64-linux-gnu"
+    else throw "amdgpu-pro is Linux only. Sorry. The build was stopped.";
+
+  libReplaceDir = "/usr/lib/${libArch}";
+
+in stdenv.mkDerivation rec {
+
+  version = "16.30";
+  pname = "amdgpu-pro";
+  build = "16.30.3-315407";
+
+  libCompatDir = "/run/lib/${libArch}";
+
+  name = pname + "-" + version + (optionalString (!libsOnly) "-${kernelDir.version}");
+
+  src = fetchurl {
+    url =
+    "https://www2.ati.com/drivers/linux/amdgpu-pro_${build}.tar.xz";
+    sha256 = "97d6fb64617cf2cefe780e5fb83b29d8ee4e3e7886b71fe3d92b0113847b2354";
+    curlOpts = "--referer http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Beta-Driver-for-Vulkan-Release-Notes.aspx";
+  };
+
+  hardeningDisable = [ "pic" "format" ];
+
+  inherit libsOnly;
+
+  postUnpack = ''
+    cd $sourceRoot
+    mkdir root
+    cd root
+    for deb in ../*.deb; do echo $deb; ar p $deb data.tar.xz | tar -xJ; done
+    sourceRoot=.
+  '';
+
+  modulePatches = [
+    ./patches/0001-add-OS-detection-for-arch.patch
+    ./patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch
+    ./patches/0003-add-kcl_drm_gem_object_lookup.patch
+    ./patches/0004-paging-changes-for-linux-4.6.patch
+    ./patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch
+    ./patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch
+    ./patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch
+    ./patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch
+    ./patches/0009-disable-dal-by-default.patch
+    ./patches/0010-remove-dependency-on-System.map.patch
+  ];
+
+  patchPhase = optionalString (!libsOnly) ''
+    pushd usr/src/amdgpu-pro-${build}
+    for patch in $modulePatches; do echo $patch; patch -p1 < $patch; done
+    popd
+  '';
+
+  preBuild = optionalString (!libsOnly) ''
+    makeFlags="$makeFlags M=$(pwd)/usr/src/amdgpu-pro-${build}"
+  '';
+
+  postBuild = optionalString (!libsOnly) ''
+    xz usr/src/amdgpu-pro-${build}/amd/amdgpu/amdgpu.ko
+  '';
+
+  makeFlags = optionalString (!libsOnly)
+    "-C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build modules";
+
+  depLibPath = makeLibraryPath [
+    stdenv.cc.cc.lib xorg.libXext xorg.libX11 xorg.libXdamage xorg.libXfixes zlib
+    xorg.libXxf86vm libxcb libxshmfence epoxy openssl libdrm elfutils libudev
+  ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r usr/bin $out/bin
+    cp -r etc $out/etc
+    cp -r usr/include $out/include
+    cp -r usr/lib/${libArch} $out/lib
+    mv $out/lib/amdgpu-pro/* $out/lib/
+    rmdir $out/lib/amdgpu-pro
+    cp -r usr/share $out/share
+  '' + optionalString (!libsOnly) ''
+    if [ -d $out/lib/xorg ]; then
+      rm $out/lib/xorg
+      mv $out/lib/1.18 $out/lib/xorg
+      rm -r $out/lib/1.*
+    fi
+    cp -r lib/firmware $out/lib/firmware
+    mkdir -p $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko.xz
+    cp usr/src/amdgpu-pro-${build}/amd/amdgpu/amdgpu.ko.xz $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko.xz
+  '' + ''
+    interpreter="$(cat $NIX_CC/nix-support/dynamic-linker)"
+    libPath="$out/lib:$out/lib/gbm:$depLibPath"
+    echo patching with $interpreter $libPath
+    for prog in "$out"/bin/*; do
+      echo patching program $prog
+      patchelf --interpreter "$interpreter" --set-rpath "$libPath" "$prog"
+    done
+    for lib in `find "$out/lib/" -name '*.so*'`; do
+      echo patching library $lib
+      patchelf --set-rpath "$libPath" "$lib"
+    done
+  '';
+
+  postFixup = assert (stringLength libReplaceDir == stringLength libCompatDir); ''
+    libPath="$out/lib:$out/lib/gbm:$depLibPath"
+    for lib in libgbm.so.1.0.0 ${optionalString (!libsOnly) "xorg/modules/drivers/amdgpu_drv.so"} amdvlk${bitness}.so vdpau/libvdpau_amdgpu.so; do
+      if [ -e "$out/lib/$lib" ]; then
+        patchelf --set-rpath "$libPath" "$out/lib/$lib"
+      fi
+    done
+    for lib in libEGL.so.1 libGL.so.1.2 ${optionalString (!libsOnly) "xorg/modules/extensions/libglx.so"} dri/amdgpu_dri.so; do
+      if [ -e "$out/lib/$lib" ]; then
+        perl -pi -e 's:${libReplaceDir}:${libCompatDir}:g' "$out/lib/$lib"
+      fi
+    done
+    substituteInPlace "$out/etc/vulkan/icd.d/amd_icd${bitness}.json" --replace "/usr/lib/${libArch}" "$out/lib"
+  '';
+
+  buildInputs = [
+    patchelf
+    perl
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "AMDGPU-PRO drivers";
+    homepage =  http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Beta-Driver-for-Vulkan-Release-Notes.aspx ;
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ corngood ];
+    # Copied from the nvidia default.nix to prevent a store collision.
+    priority = 4;
+  };
+}
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0001-add-OS-detection-for-arch.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0001-add-OS-detection-for-arch.patch
new file mode 100644
index 000000000000..46302ae0ea89
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0001-add-OS-detection-for-arch.patch
@@ -0,0 +1,26 @@
+From e78ede724fff53fc0220999f6381242142ce8c33 Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Sun, 21 Aug 2016 16:30:25 -0300
+Subject: [PATCH 1/8] add OS detection for arch
+
+---
+ amd/backport/Makefile | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/amd/backport/Makefile b/amd/backport/Makefile
+index 0c285ef..6447a15 100644
+--- a/amd/backport/Makefile
++++ b/amd/backport/Makefile
+@@ -17,6 +17,9 @@ else ifeq ("ubuntu",$(OS_NAME))
+ ccflags-y += -DOS_NAME_UBUNTU
+ else ifeq ("steamos",$(OS_NAME))
+ ccflags-y += -DOS_NAME_STEAMOS
++else ifeq ("arch",$(OS_NAME))
++ccflags-y += -DOS_NAME_ARCH
++OS_VERSION = "0.0"
+ else
+ ccflags-y += -DOS_NAME_UNKNOWN
+ endif
+-- 
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch
new file mode 100644
index 000000000000..4101662a4ebe
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch
@@ -0,0 +1,25 @@
+From d84bd62a10308efb6a414e8f6582a7b1e9860638 Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Sun, 21 Aug 2016 16:31:12 -0300
+Subject: [PATCH 2/8] update kcl_ttm_bo_reserve for linux-4.7
+
+---
+ amd/backport/include/kcl/kcl_ttm.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/amd/backport/include/kcl/kcl_ttm.h b/amd/backport/include/kcl/kcl_ttm.h
+index 3575004..0d1560d 100644
+--- a/amd/backport/include/kcl/kcl_ttm.h
++++ b/amd/backport/include/kcl/kcl_ttm.h
+@@ -84,7 +84,7 @@ static inline int kcl_ttm_bo_reserve(struct ttm_buffer_object *bo,
+ 				 bool interruptible, bool no_wait,
+ 				 struct ww_acquire_ctx *ticket)
+ {
+-#if defined(BUILD_AS_DKMS)
++#if defined(BUILD_AS_DKMS) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)
+ 	return ttm_bo_reserve(bo, interruptible, no_wait, false, ticket);
+ #else
+ 	return ttm_bo_reserve(bo, interruptible, no_wait, ticket);
+-- 
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0003-add-kcl_drm_gem_object_lookup.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0003-add-kcl_drm_gem_object_lookup.patch
new file mode 100644
index 000000000000..214b8effd9d3
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0003-add-kcl_drm_gem_object_lookup.patch
@@ -0,0 +1,204 @@
+From 2637dfe990e4c277bc724f6ba48e6661506805ec Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Sun, 21 Aug 2016 16:37:34 -0300
+Subject: [PATCH 3/8] add kcl_drm_gem_object_lookup
+
+---
+ amd/amdgpu/amdgpu_atpx_handler.c    |  4 ++++
+ amd/amdgpu/amdgpu_bo_list.c         |  2 +-
+ amd/amdgpu/amdgpu_cs.c              |  2 +-
+ amd/amdgpu/amdgpu_display.c         |  2 +-
+ amd/amdgpu/amdgpu_gem.c             | 10 +++++-----
+ amd/amdgpu/dce_v10_0.c              |  2 +-
+ amd/amdgpu/dce_v11_0.c              |  2 +-
+ amd/amdgpu/dce_v8_0.c               |  2 +-
+ amd/backport/include/kcl/kcl_drm.h  | 11 +++++++++++
+ amd/dal/amdgpu_dm/amdgpu_dm_types.c |  2 +-
+ 10 files changed, 27 insertions(+), 12 deletions(-)
+
+diff --git a/amd/amdgpu/amdgpu_atpx_handler.c b/amd/amdgpu/amdgpu_atpx_handler.c
+index cc9b998..7e47478 100644
+--- a/amd/amdgpu/amdgpu_atpx_handler.c
++++ b/amd/amdgpu/amdgpu_atpx_handler.c
+@@ -565,7 +565,11 @@ void amdgpu_register_atpx_handler(void)
+ 	if (!r)
+ 		return;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
++	vga_switcheroo_register_handler(&amdgpu_atpx_handler, 0);
++#else
+ 	vga_switcheroo_register_handler(&amdgpu_atpx_handler);
++#endif
+ }
+ 
+ /**
+diff --git a/amd/amdgpu/amdgpu_bo_list.c b/amd/amdgpu/amdgpu_bo_list.c
+index 35d0856..1d163ec 100644
+--- a/amd/amdgpu/amdgpu_bo_list.c
++++ b/amd/amdgpu/amdgpu_bo_list.c
+@@ -106,7 +106,7 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev,
+ 		struct amdgpu_bo *bo;
+ 		struct mm_struct *usermm;
+ 
+-		gobj = drm_gem_object_lookup(adev->ddev, filp, info[i].bo_handle);
++		gobj = kcl_drm_gem_object_lookup(adev->ddev, filp, info[i].bo_handle);
+ 		if (!gobj) {
+ 			r = -ENOENT;
+ 			goto error_free;
+diff --git a/amd/amdgpu/amdgpu_cs.c b/amd/amdgpu/amdgpu_cs.c
+index d16ed26..b0390b5 100644
+--- a/amd/amdgpu/amdgpu_cs.c
++++ b/amd/amdgpu/amdgpu_cs.c
+@@ -92,7 +92,7 @@ static int amdgpu_cs_user_fence_chunk(struct amdgpu_cs_parser *p,
+ {
+ 	struct drm_gem_object *gobj;
+ 
+-	gobj = drm_gem_object_lookup(p->adev->ddev, p->filp,
++	gobj = kcl_drm_gem_object_lookup(p->adev->ddev, p->filp,
+ 				     data->handle);
+ 	if (gobj == NULL)
+ 		return -EINVAL;
+diff --git a/amd/amdgpu/amdgpu_display.c b/amd/amdgpu/amdgpu_display.c
+index 46326b3..9b5441f 100644
+--- a/amd/amdgpu/amdgpu_display.c
++++ b/amd/amdgpu/amdgpu_display.c
+@@ -594,7 +594,7 @@ amdgpu_user_framebuffer_create(struct drm_device *dev,
+ 	struct amdgpu_framebuffer *amdgpu_fb;
+ 	int ret;
+ 
+-	obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
++	obj = kcl_drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
+ 	if (obj ==  NULL) {
+ 		dev_err(&dev->pdev->dev, "No GEM object associated to handle 0x%08X, "
+ 			"can't create framebuffer\n", mode_cmd->handles[0]);
+diff --git a/amd/amdgpu/amdgpu_gem.c b/amd/amdgpu/amdgpu_gem.c
+index 0069aec..d10c282 100644
+--- a/amd/amdgpu/amdgpu_gem.c
++++ b/amd/amdgpu/amdgpu_gem.c
+@@ -397,7 +397,7 @@ int amdgpu_mode_dumb_mmap(struct drm_file *filp,
+ 	struct drm_gem_object *gobj;
+ 	struct amdgpu_bo *robj;
+ 
+-	gobj = drm_gem_object_lookup(dev, filp, handle);
++	gobj = kcl_drm_gem_object_lookup(dev, filp, handle);
+ 	if (gobj == NULL) {
+ 		return -ENOENT;
+ 	}
+@@ -461,7 +461,7 @@ int amdgpu_gem_wait_idle_ioctl(struct drm_device *dev, void *data,
+ 	int r = 0;
+ 	long ret;
+ 
+-	gobj = drm_gem_object_lookup(dev, filp, handle);
++	gobj = kcl_drm_gem_object_lookup(dev, filp, handle);
+ 	if (gobj == NULL) {
+ 		return -ENOENT;
+ 	}
+@@ -495,7 +495,7 @@ int amdgpu_gem_metadata_ioctl(struct drm_device *dev, void *data,
+ 	int r = -1;
+ 
+ 	DRM_DEBUG("%d \n", args->handle);
+-	gobj = drm_gem_object_lookup(dev, filp, args->handle);
++	gobj = kcl_drm_gem_object_lookup(dev, filp, args->handle);
+ 	if (gobj == NULL)
+ 		return -ENOENT;
+ 	robj = gem_to_amdgpu_bo(gobj);
+@@ -643,7 +643,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
+ 		return -EINVAL;
+ 	}
+ 
+-	gobj = drm_gem_object_lookup(dev, filp, args->handle);
++	gobj = kcl_drm_gem_object_lookup(dev, filp, args->handle);
+ 	if (gobj == NULL)
+ 		return -ENOENT;
+ 	rbo = gem_to_amdgpu_bo(gobj);
+@@ -705,7 +705,7 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
+ 	struct amdgpu_bo *robj;
+ 	int r;
+ 
+-	gobj = drm_gem_object_lookup(dev, filp, args->handle);
++	gobj = kcl_drm_gem_object_lookup(dev, filp, args->handle);
+ 	if (gobj == NULL) {
+ 		return -ENOENT;
+ 	}
+diff --git a/amd/amdgpu/dce_v10_0.c b/amd/amdgpu/dce_v10_0.c
+index 7554dd7..6d38754 100644
+--- a/amd/amdgpu/dce_v10_0.c
++++ b/amd/amdgpu/dce_v10_0.c
+@@ -2594,7 +2594,7 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc,
+ 		return -EINVAL;
+ 	}
+ 
+-	obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
++	obj = kcl_drm_gem_object_lookup(crtc->dev, file_priv, handle);
+ 	if (!obj) {
+ 		DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
+ 		return -ENOENT;
+diff --git a/amd/amdgpu/dce_v11_0.c b/amd/amdgpu/dce_v11_0.c
+index d9c9b88..93dbc1a 100644
+--- a/amd/amdgpu/dce_v11_0.c
++++ b/amd/amdgpu/dce_v11_0.c
+@@ -2604,7 +2604,7 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc,
+ 		return -EINVAL;
+ 	}
+ 
+-	obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
++	obj = kcl_drm_gem_object_lookup(crtc->dev, file_priv, handle);
+ 	if (!obj) {
+ 		DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
+ 		return -ENOENT;
+diff --git a/amd/amdgpu/dce_v8_0.c b/amd/amdgpu/dce_v8_0.c
+index 7a027ce..c56a298 100644
+--- a/amd/amdgpu/dce_v8_0.c
++++ b/amd/amdgpu/dce_v8_0.c
+@@ -2501,7 +2501,7 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc,
+ 		return -EINVAL;
+ 	}
+ 
+-	obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
++	obj = kcl_drm_gem_object_lookup(crtc->dev, file_priv, handle);
+ 	if (!obj) {
+ 		DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
+ 		return -ENOENT;
+diff --git a/amd/backport/include/kcl/kcl_drm.h b/amd/backport/include/kcl/kcl_drm.h
+index a65ee25..5a8a7b3 100644
+--- a/amd/backport/include/kcl/kcl_drm.h
++++ b/amd/backport/include/kcl/kcl_drm.h
+@@ -3,6 +3,7 @@
+ 
+ #include <linux/version.h>
+ #include <drm/drmP.h>
++#include <drm/drm_gem.h>
+ 
+ #if defined(BUILD_AS_DKMS)
+ extern int drm_pcie_get_max_link_width(struct drm_device *dev, u32 *mlw);
+@@ -123,4 +124,14 @@ static inline int kcl_drm_universal_plane_init(struct drm_device *dev, struct dr
+ #endif
+ }
+ 
++static inline struct drm_gem_object *kcl_drm_gem_object_lookup(struct drm_device *dev,
++                                 struct drm_file *filp,
++                                 u32 handle) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++    return drm_gem_object_lookup(filp, handle);
++#else
++    return drm_gem_object_lookup(dev, filp, handle);
++#endif
++}
++
+ #endif /* AMDGPU_BACKPORT_KCL_DRM_H */
+diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+index 3f357a5..2e2d2e6 100644
+--- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
++++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+@@ -152,7 +152,7 @@ static int dm_crtc_pin_cursor_bo_new(
+ 
+ 		amdgpu_crtc = to_amdgpu_crtc(crtc);
+ 
+-		obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
++		obj = kcl_drm_gem_object_lookup(crtc->dev, file_priv, handle);
+ 
+ 		if (!obj) {
+ 			DRM_ERROR(
+-- 
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0004-paging-changes-for-linux-4.6.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0004-paging-changes-for-linux-4.6.patch
new file mode 100644
index 000000000000..54394b7879be
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0004-paging-changes-for-linux-4.6.patch
@@ -0,0 +1,42 @@
+From 2bd83488ccea22bb9e399986c171cccc3b6beb93 Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Sun, 21 Aug 2016 16:40:32 -0300
+Subject: [PATCH 4/8] paging changes for linux-4.6
+
+---
+ amd/amdgpu/amdgpu_ttm.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/amd/amdgpu/amdgpu_ttm.c b/amd/amdgpu/amdgpu_ttm.c
+index 7bdebde..8b676c2 100644
+--- a/amd/amdgpu/amdgpu_ttm.c
++++ b/amd/amdgpu/amdgpu_ttm.c
+@@ -548,8 +548,12 @@ int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages)
+ 		list_add(&guptask.list, &gtt->guptasks);
+ 		spin_unlock(&gtt->guptasklock);
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
++		r = get_user_pages(userptr, num_pages, write, 0, p, NULL);
++#else
+ 		r = get_user_pages(current, current->mm, userptr, num_pages,
+-				   write, 0, p, NULL);
++			write, 0, p, NULL);
++#endif
+ 
+ 		spin_lock(&gtt->guptasklock);
+ 		list_del(&guptask.list);
+@@ -625,7 +629,11 @@ static void amdgpu_ttm_tt_unpin_userptr(struct ttm_tt *ttm)
+ 			set_page_dirty(page);
+ 
+ 		mark_page_accessed(page);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
++		put_page(page);
++#else
+ 		page_cache_release(page);
++#endif
+ 	}
+ 
+ 	sg_free_table(ttm->sg);
+-- 
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch
new file mode 100644
index 000000000000..6da3e46a3ee6
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch
@@ -0,0 +1,48 @@
+From c41c15fa04e363c41272e7b5d767710170691347 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Mon, 4 Jul 2016 19:19:45 +0100
+Subject: [PATCH 5/8] LRU stuff isn't available until >= 4.7.x
+
+---
+ amd/amdgpu/amdgpu_ttm.c | 4 ++--
+ amd/backport/kcl_ttm.c  | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/amd/amdgpu/amdgpu_ttm.c b/amd/amdgpu/amdgpu_ttm.c
+index 8b676c2..752d065 100644
+--- a/amd/amdgpu/amdgpu_ttm.c
++++ b/amd/amdgpu/amdgpu_ttm.c
+@@ -907,7 +907,7 @@ uint32_t amdgpu_ttm_tt_pte_flags(struct amdgpu_device *adev, struct ttm_tt *ttm,
+ 	return flags;
+ }
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+ 
+ static void amdgpu_ttm_lru_removal(struct ttm_buffer_object *tbo)
+ {
+@@ -969,7 +969,7 @@ static struct ttm_bo_driver amdgpu_bo_driver = {
+ 	.fault_reserve_notify = &amdgpu_bo_fault_reserve_notify,
+ 	.io_mem_reserve = &amdgpu_ttm_io_mem_reserve,
+ 	.io_mem_free = &amdgpu_ttm_io_mem_free,
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+ 	.lru_removal = &amdgpu_ttm_lru_removal,
+ 	.lru_tail = &amdgpu_ttm_lru_tail,
+ 	.swap_lru_tail = &amdgpu_ttm_swap_lru_tail,
+diff --git a/amd/backport/kcl_ttm.c b/amd/backport/kcl_ttm.c
+index 24f7a83..1a2cb7b 100644
+--- a/amd/backport/kcl_ttm.c
++++ b/amd/backport/kcl_ttm.c
+@@ -7,7 +7,7 @@ static int _kcl_ttm_bo_del_from_lru(struct ttm_buffer_object *bo)
+ {
+ 	int put_count = 0;
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+ 	struct ttm_bo_device *bdev = bo->bdev;
+ 
+ 	if (bdev->driver->lru_removal)
+-- 
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch
new file mode 100644
index 000000000000..5be5acad00d6
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch
@@ -0,0 +1,29 @@
+From 5b90b8d8ab44637c707623b25ee98aa4ebded308 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Mon, 4 Jul 2016 19:30:08 +0100
+Subject: [PATCH 6/8] Change name of vblank_disable_allowed to
+ vblank_disable_immediate under 4.7.x.
+
+---
+ amd/amdgpu/amdgpu_irq.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/amd/amdgpu/amdgpu_irq.c b/amd/amdgpu/amdgpu_irq.c
+index d13865a..5cfa69f 100644
+--- a/amd/amdgpu/amdgpu_irq.c
++++ b/amd/amdgpu/amdgpu_irq.c
+@@ -240,7 +240,11 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
+ 		INIT_WORK(&adev->hotplug_work,
+ 				amdgpu_hotplug_work_func);
+ 	}
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	adev->ddev->vblank_disable_immediate = true;
++#else
+ 	adev->ddev->vblank_disable_allowed = true;
++#endif
+ 
+ 	INIT_WORK(&adev->reset_work, amdgpu_irq_reset_work_func);
+ 
+-- 
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch
new file mode 100644
index 000000000000..13d4a282ac82
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch
@@ -0,0 +1,29 @@
+From 27ef2ce0d4d8eeb3bca32ddeae503f0a334832aa Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Mon, 4 Jul 2016 19:41:08 +0100
+Subject: [PATCH 7/8] Remove connector parameter from
+ __drm_atomic_helper_connector_destroy_state for 4.7.x kernels.
+
+---
+ amd/dal/amdgpu_dm/amdgpu_dm_types.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+index 2e2d2e6..cd34607 100644
+--- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
++++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+@@ -1205,7 +1205,11 @@ void amdgpu_dm_connector_atomic_destroy_state(
+ 	struct dm_connector_state *dm_state =
+ 		to_dm_connector_state(state);
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++	__drm_atomic_helper_connector_destroy_state(state);
++#else
+ 	__drm_atomic_helper_connector_destroy_state(connector, state);
++#endif
+ 
+ 	kfree(dm_state);
+ }
+-- 
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch
new file mode 100644
index 000000000000..693ad8b2f40d
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch
@@ -0,0 +1,25 @@
+From c9f2501131da0d9173e21f7e8ff5741a7fcfedb6 Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Sun, 21 Aug 2016 16:58:45 -0300
+Subject: [PATCH 8/8] fix apparent typo in bandwidth_calcs causing array error
+
+---
+ amd/dal/dc/calcs/bandwidth_calcs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/amd/dal/dc/calcs/bandwidth_calcs.c b/amd/dal/dc/calcs/bandwidth_calcs.c
+index 8a19139..c4ededd 100644
+--- a/amd/dal/dc/calcs/bandwidth_calcs.c
++++ b/amd/dal/dc/calcs/bandwidth_calcs.c
+@@ -3181,7 +3181,7 @@ static void calculate_bandwidth(
+ 																	bw_int_to_fixed(
+ 																		2),
+ 																	vbios->mcifwrmc_urgent_latency),
+-																results->dmif_burst_time[i][j]),
++																results->dmif_burst_time[results->y_clk_level][results->sclk_level]),
+ 															results->mcifwr_burst_time[results->y_clk_level][results->sclk_level])),
+ 														results->dispclk),
+ 													bw_int_to_fixed(
+-- 
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0009-disable-dal-by-default.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0009-disable-dal-by-default.patch
new file mode 100644
index 000000000000..05bcbf8bd061
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0009-disable-dal-by-default.patch
@@ -0,0 +1,25 @@
+From 49d45957ddaafe13a9cc7bacd1b9665fe9c517ac Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Thu, 25 Aug 2016 22:17:06 -0300
+Subject: [PATCH] disable dal by default
+
+---
+ amd/amdgpu/amdgpu_drv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/amd/amdgpu/amdgpu_drv.c b/amd/amdgpu/amdgpu_drv.c
+index 793528b..9a4dfcc 100644
+--- a/amd/amdgpu/amdgpu_drv.c
++++ b/amd/amdgpu/amdgpu_drv.c
+@@ -79,7 +79,7 @@ int amdgpu_vm_block_size = -1;
+ int amdgpu_vm_fault_stop = 0;
+ int amdgpu_vm_debug = 0;
+ int amdgpu_exp_hw_support = 0;
+-int amdgpu_dal = -1;
++int amdgpu_dal = 0;
+ int amdgpu_sched_jobs = 32;
+ int amdgpu_sched_hw_submission = 2;
+ int amdgpu_powerplay = -1;
+-- 
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0010-remove-dependency-on-System.map.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0010-remove-dependency-on-System.map.patch
new file mode 100644
index 000000000000..ec8f2c5a5999
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0010-remove-dependency-on-System.map.patch
@@ -0,0 +1,112 @@
+From fbc0d704f47526ca38f518b60237962cc6b08305 Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Thu, 25 Aug 2016 23:08:02 -0300
+Subject: [PATCH] remove dependency on System.map
+
+---
+ amd/backport/Makefile    |  3 +--
+ amd/backport/kcl_fence.c | 10 ++++++++--
+ amd/backport/symbols     |  3 ---
+ dkms.conf                |  1 -
+ pre-build.sh             | 32 --------------------------------
+ 5 files changed, 9 insertions(+), 40 deletions(-)
+ delete mode 100644 amd/backport/symbols
+ delete mode 100755 pre-build.sh
+
+diff --git a/amd/backport/Makefile b/amd/backport/Makefile
+index 6447a15..4682e0f 100644
+--- a/amd/backport/Makefile
++++ b/amd/backport/Makefile
+@@ -53,10 +53,9 @@ ccflags-y += -DOS_NAME_RHEL_7
+ endif
+ endif
+ 
+-BACKPORT_OBJS = symbols.o
+ endif
+ 
+-BACKPORT_OBJS += kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o
++BACKPORT_OBJS = kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o
+ 
+ amdgpu-y += $(addprefix ../backport/,$(BACKPORT_OBJS))
+ 
+diff --git a/amd/backport/kcl_fence.c b/amd/backport/kcl_fence.c
+index 2141eef..ceef1fe 100644
+--- a/amd/backport/kcl_fence.c
++++ b/amd/backport/kcl_fence.c
+@@ -22,8 +22,14 @@ struct default_wait_cb {
+ 	struct task_struct *task;
+ };
+ 
+-extern void
+-(*fence_default_wait_cb)(struct fence *fence, struct fence_cb *cb);
++static void
++fence_default_wait_cb(struct fence *fence, struct fence_cb *cb)
++{
++	struct default_wait_cb *wait =
++		container_of(cb, struct default_wait_cb, base);
++
++	wake_up_process(wait->task);
++}
+ 
+ signed long
+ _kcl_fence_wait_any_timeout(struct fence **fences, uint32_t count,
+diff --git a/amd/backport/symbols b/amd/backport/symbols
+deleted file mode 100644
+index 2d3f2ee..0000000
+--- a/amd/backport/symbols
++++ /dev/null
+@@ -1,3 +0,0 @@
+-SYMS=""
+-
+-SYMS+="fence_default_wait_cb"
+diff --git a/dkms.conf b/dkms.conf
+index 9ca148e..36be480 100644
+--- a/dkms.conf
++++ b/dkms.conf
+@@ -4,4 +4,3 @@ BUILT_MODULE_NAME[0]="amdgpu"
+ BUILT_MODULE_LOCATION[0]="amd/amdgpu"
+ DEST_MODULE_LOCATION[0]="/extra"
+ AUTOINSTALL="yes"
+-PRE_BUILD="pre-build.sh $kernelver"
+\ No newline at end of file
+diff --git a/pre-build.sh b/pre-build.sh
+deleted file mode 100755
+index 88ec680..0000000
+--- a/pre-build.sh
++++ /dev/null
+@@ -1,32 +0,0 @@
+-#!/bin/bash
+-
+-KERNELVER=$1
+-KERNELVER_BASE=${KERNELVER%%-*}
+-
+-version_lt () {
+-    newest=$((echo "$1"; echo "$2") | sort -V | tail -n1)
+-    [ "$1" != "$newest" ]
+-}
+-
+-version_ge () {
+-    newest=$((echo "$1"; echo "$2") | sort -V | tail -n1)
+-    [ "$1" = "$newest" ]
+-}
+-
+-version_gt () {
+-    oldest=$((echo "$1"; echo "$2") | sort -V | head -n1)
+-    [ "$1" != "$oldest" ]
+-}
+-
+-version_le () {
+-    oldest=$((echo "$1"; echo "$2") | sort -V | head -n1)
+-    [ "$1" = "$oldest" ]
+-}
+-
+-source amd/backport/symbols
+-
+-echo '// auto generated by DKMS pre-build.sh' > amd/backport/symbols.c
+-for sym in $SYMS; do
+-    addr=$(grep $sym /boot/System.map-$KERNELVER | awk -F' ' '{print $1}')
+-    echo "void *$sym = (void *)0x$addr;" >> amd/backport/symbols.c
+-done
+-- 
+2.9.3
+
diff --git a/pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix b/pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix
index bfcef1d9c1aa..c87023bf336d 100644
--- a/pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix
+++ b/pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
     description = "Firmware for Intel 2200BG cards";
     homepage = http://ipw2200.sourceforge.net/firmware.php;
     license = stdenv.lib.licenses.unfreeRedistributableFirmware;
-    maintainers = with maintainers; [ lukasepple ];
+    maintainers = with maintainers; [ sternenseemann ];
     platforms = with platforms; linux;
   };
 }
diff --git a/pkgs/os-specific/linux/kernel/linux-grsecurity.nix b/pkgs/os-specific/linux/kernel/linux-grsecurity.nix
index f08d594a3957..139ae20d8c96 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.7.6";
+  version = "4.7.7";
   extraMeta.branch = "4.7";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "1lidsc85xc025a46pyjimcr1xcwv7mh59jihmnqihfnwqch6albv";
+    sha256 = "079gvv91a0mymzxx1h9bbn4snk6xz0cyk1bf8pjkhdyyad90v17d";
   };
 
   kernelPatches = args.kernelPatches;
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 0a577bb4e316..29d622cd3c38 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -86,9 +86,9 @@ rec {
   };
 
   grsecurity_testing = grsecPatch
-    { kver   = "4.7.6";
-      grrev  = "201609301918";
-      sha256 = "153x97vvd3jl2i7fs6d5ilqnmz2v2iyzsf3pg3frrackv6xaisa5";
+    { kver   = "4.7.7";
+      grrev  = "201610101902";
+      sha256 = "18x8grxj03bh9gqlm3sfgjl8vy5gpyrjr8nmdnrnas6ycmbvyjx4";
     };
 
   # This patch relaxes grsec constraints on the location of usermode helpers,
diff --git a/pkgs/os-specific/linux/kmod/aggregator.nix b/pkgs/os-specific/linux/kmod/aggregator.nix
index 88069ba4bf13..9bd7c8480c1c 100644
--- a/pkgs/os-specific/linux/kmod/aggregator.nix
+++ b/pkgs/os-specific/linux/kmod/aggregator.nix
@@ -17,10 +17,12 @@ buildEnv {
 
       echo "kernel version is $kernelVersion"
 
+      shopt -s extglob
+
       # Regenerate the depmod map files.  Be sure to pass an explicit
       # kernel version number, otherwise depmod will use `uname -r'.
       if test -w $out/lib/modules/$kernelVersion; then
-          rm -f $out/lib/modules/$kernelVersion/modules.*
+          rm -f $out/lib/modules/$kernelVersion/modules.!(builtin*|order*)
           ${kmod}/bin/depmod -b $out -a $kernelVersion
       fi
     '';
diff --git a/pkgs/os-specific/linux/nvidia-x11/365.35-kernel-4.7.patch b/pkgs/os-specific/linux/nvidia-x11/365.35-kernel-4.7.patch
deleted file mode 100644
index 8d1436c50940..000000000000
--- a/pkgs/os-specific/linux/nvidia-x11/365.35-kernel-4.7.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff -Naur NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-fb.c NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-fb.c
---- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-fb.c	2016-07-31 19:07:06.595038290 -0400
-+++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-fb.c	2016-07-31 19:09:18.532197060 -0400
-@@ -114,7 +114,7 @@
-      * We don't support any planar format, pick up first buffer only.
-      */
- 
--    gem = drm_gem_object_lookup(dev, file, cmd->handles[0]);
-+    gem = drm_gem_object_lookup(file, cmd->handles[0]);
- 
-     if (gem == NULL)
-     {
-diff -Naur NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-gem.c NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-gem.c
---- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-gem.c	2016-07-31 19:07:06.595038290 -0400
-+++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-gem.c	2016-07-31 19:08:56.187492736 -0400
-@@ -408,7 +408,7 @@
- 
-     mutex_lock(&dev->struct_mutex);
- 
--    gem = drm_gem_object_lookup(dev, file, handle);
-+    gem = drm_gem_object_lookup(file, handle);
- 
-     if (gem == NULL)
-     {
-diff -Naur NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-uvm/uvm_linux.h NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-uvm/uvm_linux.h
---- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-uvm/uvm_linux.h	2016-07-31 19:07:06.600038448 -0400
-+++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-uvm/uvm_linux.h	2016-07-31 19:08:06.506926763 -0400
-@@ -554,12 +554,6 @@
-     INIT_RADIX_TREE(tree, GFP_NOWAIT);
- }
- 
--static bool radix_tree_empty(struct radix_tree_root *tree)
--{
--    void *dummy;
--    return radix_tree_gang_lookup(tree, &dummy, 0, 1) == 0;
--}
--
- 
- #if !defined(NV_USLEEP_RANGE_PRESENT)
- static void __sched usleep_range(unsigned long min, unsigned long max)
diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix
index e7297b0efe20..ae05e583061b 100644
--- a/pkgs/os-specific/linux/nvidia-x11/default.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/default.nix
@@ -12,28 +12,30 @@ assert (!libsOnly) -> kernel != null;
 
 let
 
-  versionNumber = "367.35";
+  versionNumber = "367.57";
 
   # Policy: use the highest stable version as the default (on our master).
   inherit (stdenv.lib) makeLibraryPath;
 
+  nameSuffix = optionalString (!libsOnly) "-${kernel.version}";
+
 in
 
 stdenv.mkDerivation {
-  name = "nvidia-x11-${versionNumber}${optionalString (!libsOnly) "-${kernel.version}"}";
+  name = "nvidia-x11-${versionNumber}${nameSuffix}";
 
   builder = ./builder.sh;
 
   src =
     if stdenv.system == "i686-linux" then
       fetchurl {
-        url = "http://download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run";
-        sha256 = "05g36bxcfk21ab8b0ay3zy21k5nd71468p9y1nbflx7ghpx25jrq";
+        url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run";
+        sha256 = "1fw87nvbf8dmy7clwmm7jwp842c78mkz9bcb060wbihsywkfkm23";
       }
     else if stdenv.system == "x86_64-linux" then
       fetchurl {
-        url = "http://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run";
-        sha256 = "0m4k8f0212l63h22wk6hgi8fbfsgxqih5mizsw4ixqqmjd75av4a";
+        url = "http://us.download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}.run";
+        sha256 = "0lc87bgr29l9idhy2a4bsplkwx9r0dz9kjhcc5xq2xqkkyr5sqd1";
       }
     else throw "nvidia-x11 does not support platform ${stdenv.system}";
 
@@ -55,7 +57,7 @@ stdenv.mkDerivation {
     [ gtk2 atk pango glib gdk_pixbuf cairo ] );
   programPath = makeLibraryPath [ xorg.libXv ];
 
-  patches = if (!libsOnly) && (versionAtLeast kernel.dev.version "4.7") then [ ./365.35-kernel-4.7.patch ] else [];
+
 
   buildInputs = [ perl nukeReferences ];
 
diff --git a/pkgs/os-specific/linux/powertop/default.nix b/pkgs/os-specific/linux/powertop/default.nix
index 59083a8b040e..4d81126af444 100644
--- a/pkgs/os-specific/linux/powertop/default.nix
+++ b/pkgs/os-specific/linux/powertop/default.nix
@@ -8,17 +8,19 @@ stdenv.mkDerivation rec {
     sha256 = "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8";
   };
 
-  buildInputs = [ gettext libnl ncurses pciutils pkgconfig zlib ];
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ gettext libnl ncurses pciutils zlib ];
 
   postPatch = ''
     substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe"
     substituteInPlace src/calibrate/calibrate.cpp --replace "/usr/bin/xset" "xset"
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Analyze power consumption on Intel-based laptops";
-    license = stdenv.lib.licenses.gpl2;
-    maintainers = [ stdenv.lib.maintainers.chaoflow ];
-    platforms = stdenv.lib.platforms.linux;
+    homepage = https://01.org/powertop;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ chaoflow fpletz ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/servers/atlassian/confluence.nix b/pkgs/servers/atlassian/confluence.nix
new file mode 100644
index 000000000000..bcba8ef21c61
--- /dev/null
+++ b/pkgs/servers/atlassian/confluence.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "atlassian-confluence-${version}";
+  version = "5.10.7";
+
+  src = fetchurl {
+    url = "https://www.atlassian.com/software/confluence/downloads/binary/${name}.tar.gz";
+    sha256 = "1zzkaps78nqjgriz6i6m7bdnm5srvslq27lr3vk6cizn2xz9nc1b";
+  };
+
+  phases = [ "unpackPhase" "buildPhase" "installPhase" ];
+
+  buildPhase = ''
+    echo "confluence.home=/run/confluence/home" > confluence/WEB-INF/classes/confluence-init.properties
+    mv conf/server.xml conf/server.xml.dist
+    ln -sf /run/confluence/home/deploy conf/Standalone
+    ln -sf /run/confluence/server.xml conf/server.xml
+    rm -r logs; ln -sf /run/confluence/logs/ .
+    rm -r work; ln -sf /run/confluence/work/ .
+    rm -r temp; ln -sf /run/confluence/temp/ .
+  '';
+
+  installPhase = ''
+    cp -rva . $out
+    patchShebangs $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Team collaboration software written in Java and mainly used in corporate environments";
+    homepage = https://www.atlassian.com/software/confluence;
+    license = licenses.unfree;
+    maintainers = with maintainers; [ fpletz globin ];
+  };
+}
diff --git a/pkgs/servers/atlassian/crowd.nix b/pkgs/servers/atlassian/crowd.nix
new file mode 100644
index 000000000000..d84ddd00882b
--- /dev/null
+++ b/pkgs/servers/atlassian/crowd.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, home ? "/var/lib/crowd" }:
+
+stdenv.mkDerivation rec {
+  name = "atlassian-crowd-${version}";
+  version = "2.10.1";
+
+  src = fetchurl {
+    url = "https://www.atlassian.com/software/crowd/downloads/binary/${name}.tar.gz";
+    sha256 = "1pl4wyqvzqb97ql23530amslrrsysi0fmmnzpihhgqhvhwf57sc6";
+  };
+
+  phases = [ "unpackPhase" "buildPhase" "installPhase" "fixupPhase" ];
+
+  buildPhase = ''
+    mv apache-tomcat/conf/server.xml apache-tomcat/conf/server.xml.dist
+    ln -s /run/atlassian-crowd/server.xml apache-tomcat/conf/server.xml
+
+    rm -rf apache-tomcat/work
+    ln -s /run/atlassian-crowd/work apache-tomcat/work
+
+    substituteInPlace apache-tomcat/bin/startup.sh --replace start run
+
+    echo "crowd.home=${home}" > crowd-webapp/WEB-INF/classes/crowd-init.properties
+  '';
+
+  installPhase = ''
+    cp -rva . $out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Single sign-on and identity management tool";
+    homepage = https://www.atlassian.com/software/crowd;
+    license = licenses.unfree;
+    maintainers = with maintainers; [ fpletz globin ];
+  };
+}
diff --git a/pkgs/servers/atlassian/jira.nix b/pkgs/servers/atlassian/jira.nix
new file mode 100644
index 000000000000..d37463f81a55
--- /dev/null
+++ b/pkgs/servers/atlassian/jira.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "atlassian-jira-${version}";
+  version = "7.2.3";
+
+  src = fetchurl {
+    url = "https://downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-${version}.tar.gz";
+    sha256 = "0237f1x2ir3g6ll0w7fpm6vnccqlx1xr015q37qh693hykyi1hy9";
+  };
+
+  phases = [ "unpackPhase" "buildPhase" "installPhase" "fixupPhase" ];
+
+  buildPhase = ''
+    mv conf/server.xml conf/server.xml.dist
+    ln -sf /run/atlassian-jira/server.xml conf/server.xml
+    rm -r logs; ln -sf /run/atlassian-jira/logs/ .
+    rm -r work; ln -sf /run/atlassian-jira/work/ .
+    rm -r temp; ln -sf /run/atlassian-jira/temp/ .
+  '';
+
+  installPhase = ''
+    cp -rva . $out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Proprietary issue tracking product, also providing project management functions";
+    homepage = https://www.atlassian.com/software/jira;
+    license = licenses.unfree;
+    maintainers = with maintainers; [ fpletz globin ];
+  };
+}
diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix
index 6303946de3a2..9c72aa018989 100644
--- a/pkgs/servers/mail/postfix/default.nix
+++ b/pkgs/servers/mail/postfix/default.nix
@@ -22,11 +22,11 @@ in stdenv.mkDerivation rec {
 
   name = "postfix-${version}";
 
-  version = "3.1.2";
+  version = "3.1.3";
 
   src = fetchurl {
     url = "ftp://ftp.cs.uu.nl/mirror/postfix/postfix-release/official/${name}.tar.gz";
-    sha256 = "0sqgsfq3dqilfcr2z9wi7g12mcma690j8qvs8v93gszrdgpb9f8s";
+    sha256 = "0ya9h7ynhq8h7zgq0qkvfwx5rsam7i3vkbyh6rx63qlpcxz15y2j";
   };
 
   buildInputs = [ makeWrapper gnused db openssl cyrus_sasl icu pcre ]
diff --git a/pkgs/servers/monitoring/riemann-dash/default.nix b/pkgs/servers/monitoring/riemann-dash/default.nix
index 32f543fbf2f1..2218edabe06b 100644
--- a/pkgs/servers/monitoring/riemann-dash/default.nix
+++ b/pkgs/servers/monitoring/riemann-dash/default.nix
@@ -1,21 +1,9 @@
-{ bundlerEnv, lib, stdenv }:
+{ bundlerEnv, lib, ruby }:
 
-let
-  name = "riemann-dash-${env.gems.riemann-dash.version}";
-
-  env = bundlerEnv {
-    inherit name;
-    gemfile = ./Gemfile;
-    lockfile = ./Gemfile.lock;
-    gemset = ./gemset.nix;
-  };
-
-in stdenv.mkDerivation {
-  inherit name;
-  buildCommand = ''
-    mkdir -p $out/bin
-    ln -s ${env}/bin/riemann-dash $out/bin/riemann-dash
-  '';
+bundlerEnv {
+  inherit ruby;
+  pname = "riemann-dash";
+  gemdir = ./.;
 
   meta = with lib; {
     description = "A javascript, websockets-powered dashboard for Riemann";
diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix
index ebaecd2bb875..422715925b88 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.17";
+  version = "10.1.18";
 
   src = fetchurl {
     url    = "https://downloads.mariadb.org/interstitial/mariadb-${version}/source/mariadb-${version}.tar.gz";
-    sha256 = "1ddalhxxcn95qp5b50z213niylcd0s6bqphid0c7c624wg2mm92c";
+    sha256 = "0wrvhyck95czhz553834i9im7ljvn8k2byakcinlji7zx43njcyp";
   };
 
   prePatch = ''
diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix
index 6cab8597869e..d892135740c3 100644
--- a/pkgs/servers/x11/xorg/default.nix
+++ b/pkgs/servers/x11/xorg/default.nix
@@ -680,11 +680,11 @@ let
   }) // {inherit windowswmproto libX11 libXext xextproto ;};
 
   libX11 = (mkDerivation "libX11" {
-    name = "libX11-1.6.3";
+    name = "libX11-1.6.4";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libX11-1.6.3.tar.bz2;
-      sha256 = "04c1vj53xq2xgyxx5vhln3wm2d76hh1n95fvs3myhligkz1sfcfg";
+      url = mirror://xorg/individual/lib/libX11-1.6.4.tar.bz2;
+      sha256 = "0hg46i6h92pmb7xp1cis2j43zq3fkdz89p0yv35w4vm17az4iixp";
     };
     buildInputs = [pkgconfig inputproto kbproto libxcb xextproto xf86bigfontproto xproto xtrans ];
     meta.platforms = stdenv.lib.platforms.unix;
@@ -779,11 +779,11 @@ let
   }) // {inherit libX11 xextproto xproto ;};
 
   libXfixes = (mkDerivation "libXfixes" {
-    name = "libXfixes-5.0.1";
+    name = "libXfixes-5.0.2";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libXfixes-5.0.1.tar.bz2;
-      sha256 = "0rs7qgzr6dpr62db7sd91c1b47hzhzfr010qwnpcm8sg122w1gk3";
+      url = mirror://xorg/individual/lib/libXfixes-5.0.2.tar.bz2;
+      sha256 = "1slsk898386xii0r3l7szwwq3s6y2m4dsj0x93ninjh8xkghxllv";
     };
     buildInputs = [pkgconfig fixesproto libX11 xextproto xproto ];
     meta.platforms = stdenv.lib.platforms.unix;
@@ -823,11 +823,11 @@ let
   }) // {inherit fontconfig freetype libX11 xproto libXrender ;};
 
   libXi = (mkDerivation "libXi" {
-    name = "libXi-1.7.6";
+    name = "libXi-1.7.7";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libXi-1.7.6.tar.bz2;
-      sha256 = "1b5p0l19ynmd6blnqr205wyngh6fagl35nqb4v05dw60rr9aachz";
+      url = mirror://xorg/individual/lib/libXi-1.7.7.tar.bz2;
+      sha256 = "0c70n4aq0ba628wr88ih4740nci9d9f6y3v96sx376vvlm7q6vwr";
     };
     buildInputs = [pkgconfig inputproto libX11 libXext xextproto libXfixes xproto ];
     meta.platforms = stdenv.lib.platforms.unix;
@@ -889,22 +889,22 @@ let
   }) // {inherit presentproto libX11 xextproto xproto ;};
 
   libXrandr = (mkDerivation "libXrandr" {
-    name = "libXrandr-1.5.0";
+    name = "libXrandr-1.5.1";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libXrandr-1.5.0.tar.bz2;
-      sha256 = "0n6ycs1arf4wb1cal9il6v7vbxbf21qhs9sbfl8xndgwnxclk1kg";
+      url = mirror://xorg/individual/lib/libXrandr-1.5.1.tar.bz2;
+      sha256 = "06pmphx8lp3iywqnh88fvbfb0d8xgkx0qpvan49akpja1vxfgy8z";
     };
     buildInputs = [pkgconfig randrproto renderproto libX11 libXext xextproto xproto libXrender ];
     meta.platforms = stdenv.lib.platforms.unix;
   }) // {inherit randrproto renderproto libX11 libXext xextproto xproto libXrender ;};
 
   libXrender = (mkDerivation "libXrender" {
-    name = "libXrender-0.9.9";
+    name = "libXrender-0.9.10";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libXrender-0.9.9.tar.bz2;
-      sha256 = "06myx7044qqdswxndsmd82fpp670klnizkgzdm194h51h1wyabzw";
+      url = mirror://xorg/individual/lib/libXrender-0.9.10.tar.bz2;
+      sha256 = "0j89cnb06g8x79wmmnwzykgkkfdhin9j7hjpvsxwlr3fz1wmjvf0";
     };
     buildInputs = [pkgconfig renderproto libX11 xproto ];
     meta.platforms = stdenv.lib.platforms.unix;
@@ -933,33 +933,33 @@ let
   }) // {inherit libICE kbproto libSM libX11 xproto ;};
 
   libXtst = (mkDerivation "libXtst" {
-    name = "libXtst-1.2.2";
+    name = "libXtst-1.2.3";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libXtst-1.2.2.tar.bz2;
-      sha256 = "1ngn161nq679ffmbwl81i2hn75jjg5b3ffv6n4jilpvyazypy2pg";
+      url = mirror://xorg/individual/lib/libXtst-1.2.3.tar.bz2;
+      sha256 = "012jpyj7xfm653a9jcfqbzxyywdmwb2b5wr1dwylx14f3f54jma6";
     };
     buildInputs = [pkgconfig inputproto recordproto libX11 libXext xextproto libXi ];
     meta.platforms = stdenv.lib.platforms.unix;
   }) // {inherit inputproto recordproto libX11 libXext xextproto libXi ;};
 
   libXv = (mkDerivation "libXv" {
-    name = "libXv-1.0.10";
+    name = "libXv-1.0.11";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libXv-1.0.10.tar.bz2;
-      sha256 = "09a5j6bisysiipd0nw6s352565bp0n6gbyhv5hp63s3cd3w95zjm";
+      url = mirror://xorg/individual/lib/libXv-1.0.11.tar.bz2;
+      sha256 = "125hn06bd3d8y97hm2pbf5j55gg4r2hpd3ifad651i4sr7m16v6j";
     };
     buildInputs = [pkgconfig videoproto libX11 libXext xextproto xproto ];
     meta.platforms = stdenv.lib.platforms.unix;
   }) // {inherit videoproto libX11 libXext xextproto xproto ;};
 
   libXvMC = (mkDerivation "libXvMC" {
-    name = "libXvMC-1.0.9";
+    name = "libXvMC-1.0.10";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libXvMC-1.0.9.tar.bz2;
-      sha256 = "0mjp1b21dvkaz7r0iq085r92nh5vkpmx99awfgqq9hgzyvgxf0q7";
+      url = mirror://xorg/individual/lib/libXvMC-1.0.10.tar.bz2;
+      sha256 = "0bpffxr5dal90a8miv2w0rif61byqxq2f5angj4z1bnznmws00g5";
     };
     buildInputs = [pkgconfig videoproto libX11 libXext xextproto xproto libXv ];
     meta.platforms = stdenv.lib.platforms.unix;
diff --git a/pkgs/servers/x11/xorg/tarballs-7.7.list b/pkgs/servers/x11/xorg/tarballs-7.7.list
index 2ee394faf02c..5e7a9e81416f 100644
--- a/pkgs/servers/x11/xorg/tarballs-7.7.list
+++ b/pkgs/servers/x11/xorg/tarballs-7.7.list
@@ -59,7 +59,7 @@ mirror://xorg/individual/lib/libICE-1.0.9.tar.bz2
 mirror://xorg/individual/lib/libpciaccess-0.13.4.tar.bz2
 mirror://xorg/individual/lib/libSM-1.2.2.tar.bz2
 mirror://xorg/X11R7.7/src/everything/libWindowsWM-1.0.1.tar.bz2
-mirror://xorg/individual/lib/libX11-1.6.3.tar.bz2
+mirror://xorg/individual/lib/libX11-1.6.4.tar.bz2
 mirror://xorg/individual/lib/libXau-1.0.8.tar.bz2
 mirror://xorg/individual/lib/libXaw-1.0.13.tar.bz2
 mirror://xorg/individual/lib/libXcomposite-0.4.4.tar.bz2
@@ -67,24 +67,24 @@ mirror://xorg/individual/lib/libXcursor-1.1.14.tar.bz2
 mirror://xorg/individual/lib/libXdamage-1.1.4.tar.bz2
 mirror://xorg/individual/lib/libXdmcp-1.1.2.tar.bz2
 mirror://xorg/individual/lib/libXext-1.3.3.tar.bz2
-mirror://xorg/individual/lib/libXfixes-5.0.1.tar.bz2
+mirror://xorg/individual/lib/libXfixes-5.0.2.tar.bz2
 mirror://xorg/individual/lib/libXfont-1.5.1.tar.bz2
 mirror://xorg/individual/lib/libXfont2-2.0.1.tar.bz2
 mirror://xorg/individual/lib/libXft-2.3.2.tar.bz2
-mirror://xorg/individual/lib/libXi-1.7.6.tar.bz2
+mirror://xorg/individual/lib/libXi-1.7.7.tar.bz2
 mirror://xorg/individual/lib/libXinerama-1.1.3.tar.bz2
 mirror://xorg/individual/lib/libxkbfile-1.0.9.tar.bz2
 mirror://xorg/individual/lib/libXmu-1.1.2.tar.bz2
 mirror://xorg/individual/lib/libXpm-3.5.11.tar.bz2
 mirror://xorg/individual/lib/libXpresent-1.0.0.tar.bz2
-mirror://xorg/individual/lib/libXrandr-1.5.0.tar.bz2
-mirror://xorg/individual/lib/libXrender-0.9.9.tar.bz2
+mirror://xorg/individual/lib/libXrandr-1.5.1.tar.bz2
+mirror://xorg/individual/lib/libXrender-0.9.10.tar.bz2
 mirror://xorg/individual/lib/libXres-1.0.7.tar.bz2
 mirror://xorg/X11R7.7/src/everything/libXScrnSaver-1.2.2.tar.bz2
 mirror://xorg/individual/lib/libXt-1.1.5.tar.bz2
-mirror://xorg/individual/lib/libXtst-1.2.2.tar.bz2
-mirror://xorg/individual/lib/libXv-1.0.10.tar.bz2
-mirror://xorg/individual/lib/libXvMC-1.0.9.tar.bz2
+mirror://xorg/individual/lib/libXtst-1.2.3.tar.bz2
+mirror://xorg/individual/lib/libXv-1.0.11.tar.bz2
+mirror://xorg/individual/lib/libXvMC-1.0.10.tar.bz2
 mirror://xorg/individual/lib/libXxf86dga-1.1.4.tar.bz2
 mirror://xorg/individual/lib/libXxf86vm-1.1.4.tar.bz2
 mirror://xorg/X11R7.7/src/everything/luit-1.1.1.tar.bz2
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix
index b530b7578e8e..fc81d3fec8d1 100644
--- a/pkgs/stdenv/darwin/default.nix
+++ b/pkgs/stdenv/darwin/default.nix
@@ -6,14 +6,14 @@
 # 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/62540508837664e9b366e36d1265502db4329a6e/${file}";
+    url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/33f59c9d11b8d5014dfd18cc11a425f6393c884a/${file}";
     inherit sha256 system executable;
   }; in {
-    sh      = fetch { file = "sh";    sha256 = "1qpg16qbqqkmcr5an4d73p6q55izhlzmdd3nvid8gp7f3f9spbz7"; };
-    bzip2   = fetch { file = "bzip2"; sha256 = "1g67sh51fa2ws9wch5gznvrmmh27mks3dbnp6gvac43qxdnv6mpz"; };
-    mkdir   = fetch { file = "mkdir"; sha256 = "1lkp6y33lsrj9yif1cfrw5g021pffynrdscrz3ds19hslg55w4dw"; };
-    cpio    = fetch { file = "cpio";  sha256 = "115pgrl0pcq2h4yfqrmfvffl0dcabw4mgkc91aphd913wrzfmlz9"; };
-    tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "1ak16xrj41l15ads5l2kfgbyrb1lczzhmi8nln5h0np8r3w9frw9"; executable = false; };
+    sh      = fetch { file = "sh";    sha256 = "1rx4kg6358xdj05z0m139a0zn4f4zfmq4n4vimlmnwyfiyn4x7wk"; };
+    bzip2   = fetch { file = "bzip2"; sha256 = "104qnhzk79vkbp2yi0kci6lszgfppvrwk3rgxhry842ly1xz2r7l"; };
+    mkdir   = fetch { file = "mkdir"; sha256 = "0d91c19xjzmqisncvldv79d7ddzai9l7vcmajhwlwwv74g6da5yl"; };
+    cpio    = fetch { file = "cpio";  sha256 = "0lw057bmcqls96j0gv1n3mgl66q31mba7i413cbkkaf0rfzz3dxj"; };
+    tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "13ihbj002pis3fgy1d9c4fi7flca21z9brjsjkklm82h5b4nlwxl"; executable = false; };
   }
 }:
 
diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix
index 41c94bd16745..11a52eb423e9 100644
--- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix
+++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix
@@ -1,8 +1,10 @@
-{ system ? builtins.currentSystem }:
+{ pkgspath ? ../../.., test-pkgspath ? pkgspath, system ? builtins.currentSystem }:
 
-with import ../../.. { inherit system; };
+with import pkgspath { inherit system; };
 
-rec {
+let
+  llvmPackages = llvmPackages_37;
+in rec {
   coreutils_ = coreutils.override (args: {
     # We want coreutils without ACL support.
     aclSupport = false;
@@ -19,17 +21,15 @@ rec {
     buildInputs = [nukeReferences cpio];
 
     buildCommand = ''
-      mkdir -p $out/bin $out/lib
+      mkdir -p $out/bin $out/lib $out/lib/system
 
-      # Our (fake) loader
-      cp -d ${darwin.dyld}/lib/dyld $out/lib/
-
-      # C standard library stuff
-      cp -d ${darwin.Libsystem}/lib/*.o $out/lib/
-      cp -d ${darwin.Libsystem}/lib/*.dylib $out/lib/
+      # We're not going to bundle the actual libSystem.dylib; instead we reconstruct it on
+      # the other side. See the notes in stdenv/darwin/default.nix for more information.
+      # We also need the .o files for various low-level boot stuff.
+      cp -d ${darwin.Libsystem}/lib/*.o $out/lib
+      cp -d ${darwin.Libsystem}/lib/system/*.dylib $out/lib/system
 
       # Resolv is actually a link to another package, so let's copy it properly
-      rm $out/lib/libresolv.9.dylib
       cp -L ${darwin.Libsystem}/lib/libresolv.9.dylib $out/lib
 
       cp -rL ${darwin.Libsystem}/include $out
@@ -78,11 +78,11 @@ rec {
 
       cp -rL ${llvmPackages.clang-unwrapped}/lib/clang $out/lib
 
-      cp -d ${libcxx}/lib/libc++*.dylib $out/lib
-      cp -d ${libcxxabi}/lib/libc++abi*.dylib $out/lib
+      cp -d ${llvmPackages.libcxx}/lib/libc++*.dylib $out/lib
+      cp -d ${llvmPackages.libcxxabi}/lib/libc++abi*.dylib $out/lib
 
       mkdir $out/include
-      cp -rd ${libcxx}/include/c++     $out/include
+      cp -rd ${llvmPackages.libcxx}/include/c++     $out/include
 
       cp -d ${icu.out}/lib/libicu*.dylib $out/lib
       cp -d ${zlib.out}/lib/libz.*       $out/lib
@@ -107,33 +107,26 @@ rec {
         done
       }
 
-      fix_dyld() {
-        # This is clearly a hack. Once we have an install_name_tool-alike that can patch dyld, this will be nicer.
-        ${perl}/bin/perl -i -0777 -pe 's/\/nix\/store\/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-dyld-239\.4\/lib\/dyld/\/usr\/lib\/dyld\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00/sg' "$1"
-      }
-
       # Strip executables even further
       for i in $out/bin/*; do
         if test -x $i -a ! -L $i; then
           chmod +w $i
-
-          fix_dyld $i
           strip $i || true
         fi
       done
 
       for i in $out/bin/* $out/lib/*.dylib $out/lib/clang/*/lib/darwin/*.dylib $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation; do
-        if test -x $i -a ! -L $i; then
+        if test -x "$i" -a ! -L "$i"; then
           echo "Adding rpath to $i"
           rpathify $i
         fi
       done
 
       nuke-refs $out/lib/*
+      nuke-refs $out/lib/system/*
       nuke-refs $out/lib/clang/*/lib/darwin/*
       nuke-refs $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
 
-      set -x
       mkdir $out/.pack
       mv $out/* $out/.pack
       mv $out/.pack $out/pack
@@ -148,10 +141,6 @@ rec {
       strip $out/on-server/*
       nuke-refs $out/on-server/*
 
-      for i in $out/on-server/*; do
-        fix_dyld $i
-      done
-
       (cd $out/pack && (find | cpio -o -H newc)) | bzip2 > $out/on-server/bootstrap-tools.cpio.bz2
     '';
 
@@ -294,8 +283,8 @@ rec {
 
   # The ultimate test: bootstrap a whole stdenv from the tools specified above and get a package set out of it
   test-pkgs = let
-    stdenv = import ./. { inherit system bootstrapFiles; };
-  in import ../../.. {
+    stdenv = import (test-pkgspath + "/pkgs/stdenv/darwin") { inherit system bootstrapFiles; };
+  in import test-pkgspath {
     inherit system;
     bootStdenv = stdenv.stdenvDarwin;
   };
diff --git a/pkgs/stdenv/darwin/unpack-bootstrap-tools.sh b/pkgs/stdenv/darwin/unpack-bootstrap-tools.sh
index 8033c7004d93..66c4e9ebeda9 100644
--- a/pkgs/stdenv/darwin/unpack-bootstrap-tools.sh
+++ b/pkgs/stdenv/darwin/unpack-bootstrap-tools.sh
@@ -17,9 +17,44 @@ for i in $out/bin/*; do
   fi
 done
 
+install_name_tool \
+  -id $out/lib/system/libsystem_c.dylib \
+  $out/lib/system/libsystem_c.dylib
+
+install_name_tool \
+  -id $out/lib/system/libsystem_kernel.dylib \
+  $out/lib/system/libsystem_kernel.dylib
+
+# TODO: this logic basically duplicates similar logic in the Libsystem expression. Deduplicate them!
+libs=$(otool -arch x86_64 -L /usr/lib/libSystem.dylib | tail -n +3 | awk '{ print $1 }')
+
+for i in $libs; do
+  if [ "$i" != "/usr/lib/system/libsystem_kernel.dylib" ] && [ "$i" != "/usr/lib/system/libsystem_c.dylib" ]; then
+    args="$args -reexport_library $i"
+  fi
+done
+
+ld -macosx_version_min 10.7 \
+   -arch x86_64 \
+   -dylib \
+   -o $out/lib/libSystem.B.dylib \
+   -compatibility_version 1.0 \
+   -current_version 1226.10.1 \
+   -reexport_library $out/lib/system/libsystem_c.dylib \
+   -reexport_library $out/lib/system/libsystem_kernel.dylib \
+   $args
+
+ln -s libSystem.B.dylib $out/lib/libSystem.dylib
+
+for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do
+  ln -s libSystem.dylib $out/lib/lib$name.dylib
+done
+
+ln -s libresolv.9.dylib $out/lib/libresolv.dylib
+
 for i in $out/lib/*.dylib $out/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation; do
-  if ! test -L $i; then
-    echo patching $i
+  if test ! -L "$i" -a "$i" != "$out/lib/libSystem*.dylib"; then
+    echo "Patching $i"
 
     id=$(otool -D "$i" | tail -n 1)
     install_name_tool -id "$(dirname $i)/$(basename $id)" $i
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index feb82fd92266..154fdefd789c 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -490,12 +490,14 @@ dumpVars() {
 }
 
 
-# Utility function: return the base name of the given path, with the
+# Utility function: echo the base name of the given path, with the
 # prefix `HASH-' removed, if present.
 stripHash() {
-    strippedName=$(basename $1);
+    local strippedName="$(basename "$1")";
     if echo "$strippedName" | grep -q '^[a-z0-9]\{32\}-'; then
-        strippedName=$(echo "$strippedName" | cut -c34-)
+        echo "$strippedName" | cut -c34-
+    else
+        echo "$strippedName"
     fi
 }
 
@@ -506,12 +508,10 @@ _defaultUnpack() {
 
     if [ -d "$fn" ]; then
 
-        stripHash "$fn"
-
         # We can't preserve hardlinks because they may have been
         # introduced by store optimization, which might break things
         # in the build.
-        cp -pr --reflink=auto "$fn" $strippedName
+        cp -pr --reflink=auto "$fn" "$(stripHash "$fn")"
 
     else
 
diff --git a/pkgs/tools/backup/rdup/default.nix b/pkgs/tools/backup/rdup/default.nix
index 8ca07e2c8235..33e3c77db887 100644
--- a/pkgs/tools/backup/rdup/default.nix
+++ b/pkgs/tools/backup/rdup/default.nix
@@ -19,6 +19,6 @@ stdenv.mkDerivation rec {
     homepage    = "https://github.com/miekg/rdup";
     license    = stdenv.lib.licenses.gpl3;
     platforms   = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [ lukasepple ];
+    maintainers = with stdenv.lib.maintainers; [ sternenseemann ];
   };
 }
diff --git a/pkgs/tools/bluetooth/blueman/default.nix b/pkgs/tools/bluetooth/blueman/default.nix
index 6a668f777941..2efd4660bbcc 100644
--- a/pkgs/tools/bluetooth/blueman/default.nix
+++ b/pkgs/tools/bluetooth/blueman/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchurl, intltool, pkgconfig, pythonPackages, bluez, polkit, gtk3
 , obex_data_server, xdg_utils, libnotify, dconf, gsettings_desktop_schemas, dnsmasq, dhcp
-, withPulseAudio ? true, libpulseaudio }:
+, hicolor_icon_theme , withPulseAudio ? true, libpulseaudio }:
 
 let
   binPath = lib.makeBinPath [ xdg_utils dnsmasq dhcp ];
@@ -16,7 +16,8 @@ in stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ intltool pkgconfig pythonPackages.wrapPython pythonPackages.cython ];
 
-  buildInputs = [ bluez gtk3 pythonPackages.python libnotify dconf gsettings_desktop_schemas ]
+  buildInputs = [ bluez gtk3 pythonPackages.python libnotify dconf
+                  gsettings_desktop_schemas hicolor_icon_theme ]
                 ++ pythonPath
                 ++ lib.optional withPulseAudio libpulseaudio;
 
diff --git a/pkgs/tools/compression/lhasa/default.nix b/pkgs/tools/compression/lhasa/default.nix
new file mode 100644
index 000000000000..f270d29a694f
--- /dev/null
+++ b/pkgs/tools/compression/lhasa/default.nix
@@ -0,0 +1,21 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation {
+  name = "lhasa-0.3.1";
+  src = fetchurl {
+    url = https://soulsphere.org/projects/lhasa/lhasa-0.3.1.tar.gz;
+    sha256 = "092zi9av18ma20c6h9448k0bapvx2plnp292741dvfd9hmgqxc1z";
+  };
+  meta = {
+    description = "Free Software replacement for the Unix LHA tool";
+    longDescription = ''
+      Lhasa is a Free Software replacement for the Unix LHA tool, for
+      decompressing .lzh (LHA / LHarc) and .lzs (LArc) archives. The backend for
+      the tool is a library, so that it can be reused for other purposes.
+    '';
+    license = stdenv.lib.licenses.isc;
+    homepage = http://fragglet.github.io/lhasa;
+    maintainers = with stdenv.lib; [ maintainers.sander ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/tools/filesystems/afpfs-ng/default.nix b/pkgs/tools/filesystems/afpfs-ng/default.nix
new file mode 100644
index 000000000000..bfa45c9930e4
--- /dev/null
+++ b/pkgs/tools/filesystems/afpfs-ng/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub, fuse, readline, libgcrypt, gmp }:
+
+stdenv.mkDerivation rec {
+  name = "afpfs-ng-${version}";
+  version = "0.8.2";
+
+  src = fetchFromGitHub {
+    owner  = "simonvetter";
+    repo   = "afpfs-ng";
+    rev    = "f6e24eb73c9283732c3b5d9cb101a1e2e4fade3e";
+    sha256 = "125jx1rsqkiifcffyjb05b2s36rllckdgjaf1bay15k9gzhwwldz";
+  };
+
+  buildInputs = [ fuse readline libgcrypt gmp ];
+
+  meta = with stdenv.lib; {
+    homepage    = https://github.com/simonvetter/afpfs-ng;
+    description = "A client implementation of the Apple Filing Protocol";
+    license     = licenses.gpl2;
+    maintainers = with maintainers; [ rnhmjoj ];
+    platform    = platforms.linux;
+  };
+
+}
diff --git a/pkgs/tools/filesystems/zfstools/default.nix b/pkgs/tools/filesystems/zfstools/default.nix
index 7a056f503e23..518e92814a41 100644
--- a/pkgs/tools/filesystems/zfstools/default.nix
+++ b/pkgs/tools/filesystems/zfstools/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchFromGitHub, ruby, zfs }:
 
-let version = "0.3.3"; in
+let version = "0.3.6"; in
 stdenv.mkDerivation rec {
   name = "zfstools-${version}";
 
   src = fetchFromGitHub {
-    sha256 = "1gj6jksc9crmjvhsx8yp3l06b5vcm415l0bmdjcil7jjbfhwwp2k";
+    sha256 = "16lvw3xbmxp2pr8nixqn7lf4504zaaxvbbdnjkv4dggwd4lsdjyg";
     rev = "v${version}";
     repo = "zfstools";
     owner = "bdrewery";
diff --git a/pkgs/tools/misc/fluentd/default.nix b/pkgs/tools/misc/fluentd/default.nix
index 4c5de7448409..25e083b6bf57 100644
--- a/pkgs/tools/misc/fluentd/default.nix
+++ b/pkgs/tools/misc/fluentd/default.nix
@@ -1,12 +1,10 @@
 { stdenv, lib, bundlerEnv, ruby, curl }:
 
 bundlerEnv {
-  name = "fluentd-0.14.0";
-
   inherit ruby;
-  gemfile = ./Gemfile;
-  lockfile = ./Gemfile.lock;
-  gemset = ./gemset.nix;
+
+  pname = "fluentd";
+  gemdir = ./.;
 
   meta = with lib; {
     description = "A data collector";
diff --git a/pkgs/tools/misc/lolcat/default.nix b/pkgs/tools/misc/lolcat/default.nix
index 21355652d3e3..21377d7bfa4a 100644
--- a/pkgs/tools/misc/lolcat/default.nix
+++ b/pkgs/tools/misc/lolcat/default.nix
@@ -2,12 +2,10 @@
 , pkgconfig, which }:
 
 bundlerEnv {
-  name = "lolcat-42.1.0";
-
   inherit ruby;
-  gemfile = ./Gemfile;
-  lockfile = ./Gemfile.lock;
-  gemset = ./gemset.nix;
+
+  pname = "lolcat";
+  gemdir = ./.;
 
   meta = with lib; {
     description = "A rainbow version of cat";
diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix
index b049e0706e9a..9c1dabc75844 100644
--- a/pkgs/tools/misc/man-db/default.nix
+++ b/pkgs/tools/misc/man-db/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff }:
+{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff, makeWrapper }:
 
 stdenv.mkDerivation rec {
   name = "man-db-2.7.5";
@@ -11,9 +11,8 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "doc" ];
   outputMan = "out"; # users will want `man man` to work
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig makeWrapper ];
   buildInputs = [ libpipeline db groff ];
-  troff="${groff}/bin/groff";
 
   postPatch = ''
     substituteInPlace src/man_db.conf.in \
@@ -27,14 +26,14 @@ stdenv.mkDerivation rec {
     # Don't try /etc/man_db.conf by default, so we avoid error messages.
     "--with-config-file=\${out}/etc/man_db.conf"
     "--with-systemdtmpfilesdir=\${out}/lib/tmpfiles.d"
-    "--with-eqn=${groff}/bin/eqn"
-    "--with-neqn=${groff}/bin/neqn"
-    "--with-nroff=${groff}/bin/nroff"
-    "--with-pic=${groff}/bin/pic"
-    "--with-refer=${groff}/bin/refer"
-    "--with-tbl=${groff}/bin/tbl"
   ];
 
+  postInstall = ''
+    for i in "$out/bin/"*; do
+      wrapProgram "$i" --prefix PATH : "${groff}/bin"
+    done
+  '';
+
   enableParallelBuilding = true;
 
   doCheck = true;
diff --git a/pkgs/tools/misc/mysqltuner/default.nix b/pkgs/tools/misc/mysqltuner/default.nix
new file mode 100644
index 000000000000..38cfa8b19cd1
--- /dev/null
+++ b/pkgs/tools/misc/mysqltuner/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, perl }:
+
+stdenv.mkDerivation rec {
+  name = "mysqltuner-${version}";
+  version = "1.6.18";
+
+  src = fetchFromGitHub {
+    owner  = "major";
+    repo   = "MySQLTuner-perl";
+    rev    = version;
+    sha256 = "14dblrjqciyx6k7yczfzbaflc7hdxnj0kyy6q0lqfz8imszdkpi2";
+  };
+
+  buildInputs = [ perl ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install -m0755 mysqltuner.pl $out/bin/mysqltuner
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Make recommendations for increased performance and stability of MariaDB/MySQL";
+    homepage = http://mysqltuner.com;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+}
diff --git a/pkgs/tools/misc/ostree/default.nix b/pkgs/tools/misc/ostree/default.nix
index 7d9d5545f406..4655331dbc17 100644
--- a/pkgs/tools/misc/ostree/default.nix
+++ b/pkgs/tools/misc/ostree/default.nix
@@ -7,8 +7,8 @@ let
   libglnx-src = fetchFromGitHub {
     owner  = "GNOME";
     repo   = "libglnx";
-    rev    = "769522753c25537e520adc322fa62e5390272add";
-    sha256 = "0gfc8dl63xpmf73dwb1plj7cymq7z6w6wq5m06yx8jymwhq7x1l8";
+    rev    = "36396b49ad6636c9959f3dfac5e04d41584b1a92";
+    sha256 = "146flrpzybm2s12wg05rnglnfd2f2jx3xzvns2pq28kvg09bgcfn";
   };
 
   bsdiff-src = fetchFromGitHub {
@@ -17,15 +17,16 @@ let
     rev    = "1edf9f656850c0c64dae260960fabd8249ea9c60";
     sha256 = "1h71d2h2d3anp4msvpaff445rnzdxii3id2yglqk7af9i43kdsn1";
   };
-in stdenv.mkDerivation rec {
-  rev = "v2016.5";
-  name = "ostree-${rev}";
+
+  version = "2016.11";
+in stdenv.mkDerivation {
+  name = "ostree-${version}";
 
   src = fetchFromGitHub {
-    inherit rev;
+    rev    = "v${version}";
     owner  = "ostreedev";
     repo   = "ostree";
-    sha256 = "1dfyhzgv94ldjv2l4jxf4xhks2z5ljljqa3k579qskds755n6kvg";
+    sha256 = "19xmg01mxdykx74r9ra11hc15qd1fjqbxdn23jrn2pcvz8dw9zgc";
   };
 
   nativeBuildInputs = [
@@ -43,6 +44,8 @@ in stdenv.mkDerivation rec {
 
   preConfigure = ''
     env NOCONFIGURE=1 ./autogen.sh
+
+    configureFlags+="--with-systemdsystemunitdir=$out/lib/systemd/system"
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/misc/rpm-ostree/default.nix b/pkgs/tools/misc/rpm-ostree/default.nix
index f96e70650b7c..3e2953c57334 100644
--- a/pkgs/tools/misc/rpm-ostree/default.nix
+++ b/pkgs/tools/misc/rpm-ostree/default.nix
@@ -1,35 +1,60 @@
 { stdenv, fetchFromGitHub, ostree, rpm, which, autoconf, automake, libtool, pkgconfig,
-  libcap, glib, libgsystem, json_glib, libarchive, libhif, librepo, gtk_doc, elfutils,
-  libxslt, docbook_xsl, docbook_xml_dtd_42, acl }:
+  libcap, glib, libgsystem, json_glib, libarchive, libsolv, librepo, gtk_doc, elfutils,
+  gperf, cmake, pcre, check, python, libxslt, docbook_xsl, docbook_xml_dtd_42, acl }:
 
 let
   libglnx-src = fetchFromGitHub {
     owner  = "GNOME";
     repo   = "libglnx";
-    rev    = "85c9dd5c073a8c0d74c4baa2e4a94f5535984e62";
-    sha256 = "08m8wxlkymwq5hsc26k7ndwiqiw1ggaaxyi2qfhqznasgbp4g623";
+    rev    = "4ae5e3beaaa674abfabf7404ab6fafcc4ec547db";
+    sha256 = "1npb9zbyb4bl0nxqf0pcqankcwzs3k1x8i2wkdwhgak4qcvxvfqn";
   };
-in stdenv.mkDerivation rec {
-  rev  = "v2016.1";
-  name = "rpm-ostree";
+
+  libdnf-src = fetchFromGitHub {
+    owner  = "rpm-software-management";
+    repo   = "libhif";
+    rev    = "b69552b3b3a42fd41698a925d5f5f623667bac63";
+    sha256 = "0h6k09rb4imzbmsn7mspwl0js2awqdpb4ysdqq550vw2nr0dzszr";
+  };
+
+  version = "2016.10";
+in stdenv.mkDerivation {
+  name = "rpm-ostree-${version}";
 
   src = fetchFromGitHub {
-    inherit rev;
+    rev    = "v${version}";
     owner  = "projectatomic";
     repo   = "rpm-ostree";
-    sha256 = "19jvnmy9zinx0j5nvy3h5abfv9d988kvyza09gljx16gll8qkbbf";
+    sha256 = "0a0wwklzk1kvk3bbxxfvxgk4ck5dn7a7v32shqidb674fr2d5pvb";
   };
 
   buildInputs = [
-    which autoconf automake pkgconfig libtool libcap ostree rpm glib libgsystem
-    json_glib libarchive libhif librepo gtk_doc libxslt docbook_xsl docbook_xml_dtd_42
+    which autoconf automake pkgconfig libtool libcap ostree rpm glib libgsystem gperf
+    json_glib libarchive libsolv librepo gtk_doc libxslt docbook_xsl docbook_xml_dtd_42
+    cmake pcre check python
     # FIXME: get rid of this once libarchive properly propagates this
     acl
   ];
 
+  dontUseCmakeConfigure = true;
+
   prePatch = ''
-    rmdir libglnx
+    rmdir libglnx libdnf
     cp --no-preserve=mode -r ${libglnx-src} libglnx
+    cp --no-preserve=mode -r ${libdnf-src} libdnf
+
+    # According to #cmake on freenode, libdnf should bundle the FindLibSolv.cmake module
+    cp ${libsolv}/share/cmake/Modules/FindLibSolv.cmake libdnf/cmake/modules/
+
+    # See https://github.com/projectatomic/rpm-ostree/issues/480
+    substituteInPlace src/libpriv/rpmostree-unpacker.c --replace 'include <selinux/selinux.h>' ""
+
+    # libdnf normally wants sphinx to build its hawkey manpages, but we don't care about those manpages since we don't use hawkey
+    substituteInPlace configure.ac --replace 'cmake \' 'cmake -DWITH_MAN=off \'
+
+    # Let's not hardcode the rpm-gpg path...
+    substituteInPlace libdnf/libdnf/dnf-keyring.c \
+      --replace '"/etc/pki/rpm-gpg"' 'getenv("LIBDNF_RPM_GPG_PATH_OVERRIDE") ? getenv("LIBDNF_RPM_GPG_PATH_OVERRIDE") : "/etc/pki/rpm-gpg"'
   '';
 
   preConfigure = ''
diff --git a/pkgs/tools/misc/svtplay-dl/default.nix b/pkgs/tools/misc/svtplay-dl/default.nix
index 437be3a46808..5a5d8df26ce1 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.5";
+  version = "1.6";
 
   src = fetchFromGitHub {
     owner = "spaam";
     repo = "svtplay-dl";
     rev = version;
-    sha256 = "1hmg49fhvdf7yjybxmky4ymy5s4mgbh9b8pbgyfnhm1i3s544bz2";
+    sha256 = "12r4yazsxk09sampiz9j1jqgzm3136h5fgbbdaiwg43b0y1sjg3d";
   };
 
   pythonPaths = [ pycrypto requests2 ];
diff --git a/pkgs/tools/misc/tmuxp/default.nix b/pkgs/tools/misc/tmuxp/default.nix
index 1f1ec0437f86..3ca01d7e5eb9 100644
--- a/pkgs/tools/misc/tmuxp/default.nix
+++ b/pkgs/tools/misc/tmuxp/default.nix
@@ -2,20 +2,17 @@
 
 pythonPackages.buildPythonApplication rec {
   name = "tmuxp-${version}";
-  version = "1.2.0";
+  version = "1.2.2";
 
   namePrefix = "";
 
   src = fetchurl {
     url = "mirror://pypi/t/tmuxp/${name}.tar.gz";
-    sha256 = "05z5ssv9glsqmcy9fdq06bawy1274dnzqsqd3a4z4jd0w6j09smn";
+    sha256 = "1g37pdxs0wmnskqm7qsqm0ygwpc1dxk1d7lrzpgs717zxaak8vln";
   };
 
   patchPhase = ''
-    # Dependencies required for testing shouldn't pinned to
-    # a specific version.
-    substituteInPlace requirements/test.txt \
-      --replace "==" ">="
+    sed -i 's/==.*$//' requirements/test.txt
   '';
 
   buildInputs = with pythonPackages; [
diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix
index 1233cb09c78d..3f07ed87433a 100644
--- a/pkgs/tools/misc/youtube-dl/default.nix
+++ b/pkgs/tools/misc/youtube-dl/default.nix
@@ -14,11 +14,11 @@ with stdenv.lib;
 buildPythonApplication rec {
 
   name = "youtube-dl-${version}";
-  version = "2016.09.27";
+  version = "2016.10.07";
 
   src = fetchurl {
     url = "https://yt-dl.org/downloads/${version}/${name}.tar.gz";
-    sha256 = "dfae0d25cb515d17e7145b7ab0edf0c85f77ef4975aefe46719fdef0a5d4a879";
+    sha256 = "56be6107275cbdc867e89caf9d20f351d184fdc4fb06d915945fef708086dbce";
   };
 
   buildInputs = [ makeWrapper zip ] ++ optional generateManPage pandoc;
diff --git a/pkgs/tools/networking/fastd/default.nix b/pkgs/tools/networking/fastd/default.nix
new file mode 100644
index 000000000000..3a99adb4a9ef
--- /dev/null
+++ b/pkgs/tools/networking/fastd/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchgit, cmake, bison, pkgconfig
+, libuecc, libsodium, libcap, json_c }:
+
+stdenv.mkDerivation rec {
+  version = "18";
+  name = "fastd-${version}";
+
+  src = fetchgit {
+    url = "git://git.universe-factory.net/fastd";
+    rev = "refs/tags/v${version}";
+    sha256 = "0c9v3igv3812b3jr7jk75a2np658yy00b3i4kpbpdjgvqzc1jrq8";
+  };
+
+  nativeBuildInputs = [ pkgconfig bison cmake ];
+  buildInputs = [ libuecc libsodium libcap json_c ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Fast and Secure Tunneling Daemon";
+    homepage = https://projects.universe-factory.net/projects/fastd/wiki;
+    license = with licenses; [ bsd2 bsd3 ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ fpletz ];
+  };
+}
diff --git a/pkgs/tools/networking/linkchecker/default.nix b/pkgs/tools/networking/linkchecker/default.nix
index 79566f129019..59699076a3ac 100644
--- a/pkgs/tools/networking/linkchecker/default.nix
+++ b/pkgs/tools/networking/linkchecker/default.nix
@@ -1,26 +1,34 @@
-{ stdenv, lib, fetchurl, python2Packages }:
+{ stdenv, lib, fetchurl, python2Packages, gettext }:
 
 python2Packages.buildPythonApplication rec {
   name = "LinkChecker-${version}";
   version = "9.3";
 
-  # LinkChecker 9.3 only works with requests 2.9.x
-  propagatedBuildInputs = with python2Packages ; [ requests2 ]; 
+  buildInputs = with python2Packages ; [ pytest ];
+  propagatedBuildInputs = with python2Packages ; [ requests2 ] ++ [ gettext ];
 
   src = fetchurl {
     url = "mirror://pypi/L/LinkChecker/${name}.tar.gz";
     sha256 = "0v8pavf0bx33xnz1kwflv0r7lxxwj7vg3syxhy2wzza0wh6sc2pf";
   };
 
-  # upstream refuses to support ignoring robots.txt
+  # 1. upstream refuses to support ignoring robots.txt
+  # 2. work around requests2 version detection - can be dropped >v9.3
   patches = [
     ./add-no-robots-flag.patch
+    ./no-version-check.patch
   ];
 
   postInstall = ''
     rm $out/bin/linkchecker-gui
   '';
 
+  checkPhase = ''
+    # the mime test fails for me...
+    rm tests/test_mimeutil.py
+    make test PYTESTOPTS="--tb=short" TESTS="tests/test_*.py tests/logger/test_*.py"
+  '';
+
   meta = {
     description = "Check websites for broken links";
     homepage = "https://wummel.github.io/linkchecker/";
diff --git a/pkgs/tools/networking/linkchecker/no-version-check.patch b/pkgs/tools/networking/linkchecker/no-version-check.patch
new file mode 100644
index 000000000000..49b674f37359
--- /dev/null
+++ b/pkgs/tools/networking/linkchecker/no-version-check.patch
@@ -0,0 +1,14 @@
+diff --git a/linkcheck/__init__.py b/linkcheck/__init__.py
+--- a/linkcheck/__init__.py	2014-07-16 13:34:58.000000000 +0800
++++ b/linkcheck/__init__.py	2016-10-11 10:42:08.914085950 +0800
+@@ -26,8 +26,8 @@
+         sys.version_info < (2, 7, 2, 'final', 0)):
+     raise SystemExit("This program requires Python 2.7.2 or later.")
+ import requests
+-if requests.__version__ <= '2.2.0':
+-    raise SystemExit("This program requires Python requests 2.2.0 or later.")
++#if requests.__version__ <= '2.2.0':
++#    raise SystemExit("This program requires Python requests 2.2.0 or later.")
+ 
+ import os
+ # add the custom linkcheck_dns directory to sys.path
diff --git a/pkgs/tools/networking/modemmanager/default.nix b/pkgs/tools/networking/modemmanager/default.nix
index 77c71f38331c..9fe4b4421a7f 100644
--- a/pkgs/tools/networking/modemmanager/default.nix
+++ b/pkgs/tools/networking/modemmanager/default.nix
@@ -1,17 +1,18 @@
-{ stdenv, fetchurl, udev, libgudev, polkit, dbus_glib, ppp, intltool, pkgconfig, libmbim, libqmi }:
+{ stdenv, fetchurl, udev, libgudev, polkit, dbus_glib, ppp, intltool, pkgconfig
+, libmbim, libqmi, systemd }:
 
 stdenv.mkDerivation rec {
   name = "ModemManager-${version}";
-  version = "1.4.6";
+  version = "1.6.2";
 
   src = fetchurl {
     url = "http://www.freedesktop.org/software/ModemManager/${name}.tar.xz";
-    sha256 = "1kd5nn5rm88c8rgmzwy2fsf3cr7fai7r85mi61kcby0hcgsapv8c";
+    sha256 = "14v31j916h63z7af107rias1zbb2y94p3jg77zhzhrn1v6c46m74";
   };
 
   nativeBuildInputs = [ intltool pkgconfig ];
 
-  buildInputs = [ udev libgudev polkit dbus_glib ppp libmbim libqmi ];
+  buildInputs = [ udev libgudev polkit dbus_glib ppp libmbim libqmi systemd ];
 
   configureFlags = [
     "--with-polkit"
@@ -19,6 +20,7 @@ stdenv.mkDerivation rec {
     "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
     "--sysconfdir=/etc"
     "--localstatedir=/var"
+    "--with-suspend-resume=systemd"
   ];
 
   installFlags = [ "DESTDIR=\${out}" ];
diff --git a/pkgs/tools/networking/network-manager-applet/default.nix b/pkgs/tools/networking/network-manager-applet/default.nix
index 7f6620af4c95..0cb5c92abec8 100644
--- a/pkgs/tools/networking/network-manager-applet/default.nix
+++ b/pkgs/tools/networking/network-manager-applet/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, intltool, pkgconfig, libglade, networkmanager, gnome3
-, libnotify, libsecret, polkit, isocodes
+, libnotify, libsecret, polkit, isocodes, modemmanager
 , mobile_broadband_provider_info, glib_networking, gsettings_desktop_schemas
-, makeWrapper, udev, libgudev, hicolor_icon_theme }:
+, makeWrapper, udev, libgudev, hicolor_icon_theme, jansson }:
 
 stdenv.mkDerivation rec {
   name    = "${pname}-${version}";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url    = "mirror://gnome/sources/${pname}/${networkmanager.major}/${name}.tar.xz";
-    sha256 = "02b42e7c17c9cd6c840563750da92ce58da1ec621df7f0c2402016026e727756";
+    sha256 = "431b7b4876638c6a537c8bf9c91a9250532b3d960b22b056df554695a81e4499";
   };
 
   configureFlags = [ "--sysconfdir=/etc" ];
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
   buildInputs = [
     gnome3.gtk libglade networkmanager libnotify libsecret gsettings_desktop_schemas
     polkit isocodes makeWrapper udev libgudev gnome3.gconf gnome3.libgnome_keyring
+    modemmanager jansson
   ];
 
   nativeBuildInputs = [ intltool pkgconfig ];
diff --git a/pkgs/tools/networking/network-manager/default.nix b/pkgs/tools/networking/network-manager/default.nix
index 57bf1a51a1ae..608b9ea17fe1 100644
--- a/pkgs/tools/networking/network-manager/default.nix
+++ b/pkgs/tools/networking/network-manager/default.nix
@@ -7,12 +7,12 @@
 stdenv.mkDerivation rec {
   name    = "network-manager-${version}";
   pname   = "NetworkManager";
-  major   = "1.2";
+  major   = "1.4";
   version = "${major}.2";
 
   src = fetchurl {
     url    = "mirror://gnome/sources/${pname}/${major}/${pname}-${version}.tar.xz";
-    sha256 = "41d8082e027f58bb5fa4181f93742606ab99c659794a18e2823eff22df0eecd9";
+    sha256 = "a864e347ddf6da8dabd40e0185b8c10a655d4a94b45cbaa2b3bb4b5e8360d204";
   };
 
   preConfigure = ''
diff --git a/pkgs/tools/networking/network-manager/openconnect.nix b/pkgs/tools/networking/network-manager/openconnect.nix
index b1b24bceb576..303ca70aace1 100644
--- a/pkgs/tools/networking/network-manager/openconnect.nix
+++ b/pkgs/tools/networking/network-manager/openconnect.nix
@@ -4,10 +4,11 @@
 stdenv.mkDerivation rec {
   name    = "${pname}${if withGnome then "-gnome" else ""}-${version}";
   pname   = "NetworkManager-openconnect";
-  version = networkmanager.version;
+  major   = "1.2";
+  version = "${major}.2";
 
   src = fetchurl {
-    url    = "mirror://gnome/sources/${pname}/${networkmanager.major}/${pname}-${version}.tar.xz";
+    url    = "mirror://gnome/sources/${pname}/${major}/${pname}-${version}.tar.xz";
     sha256 = "522979593e21b4e884112816708db9eb66148b3491580dacfad53472b94aafec";
   };
 
diff --git a/pkgs/tools/networking/network-manager/openvpn.nix b/pkgs/tools/networking/network-manager/openvpn.nix
index 6fd1a666f0e8..92dc45ac82c0 100644
--- a/pkgs/tools/networking/network-manager/openvpn.nix
+++ b/pkgs/tools/networking/network-manager/openvpn.nix
@@ -4,11 +4,12 @@
 stdenv.mkDerivation rec {
   name    = "${pname}${if withGnome then "-gnome" else ""}-${version}";
   pname   = "NetworkManager-openvpn";
-  version = networkmanager.version;
+  major   = "1.2";
+  version = "${major}.6";
 
   src = fetchurl {
-    url    = "mirror://gnome/sources/${pname}/${networkmanager.major}/${pname}-${version}.tar.xz";
-    sha256 = "47a6d219a781eff8491c7876b7fb95b12dcfb8f8a05f916f95afc65c7babddef";
+    url    = "mirror://gnome/sources/${pname}/${major}/${pname}-${version}.tar.xz";
+    sha256 = "2373e2bb0a8a876cb2997cd8b0e3d6e10012d9bef3705ea3ac21f6394b3f1fb0";
   };
 
   buildInputs = [ openvpn networkmanager libsecret ]
diff --git a/pkgs/tools/networking/network-manager/pptp.nix b/pkgs/tools/networking/network-manager/pptp.nix
index a9bee0c74811..6cc8107f2c89 100644
--- a/pkgs/tools/networking/network-manager/pptp.nix
+++ b/pkgs/tools/networking/network-manager/pptp.nix
@@ -4,11 +4,12 @@
 stdenv.mkDerivation rec {
   name    = "${pname}${if withGnome then "-gnome" else ""}-${version}";
   pname   = "NetworkManager-pptp";
-  version = networkmanager.version;
+  major   = "1.2";
+  version = "${major}.4";
 
   src = fetchurl {
-    url    = "mirror://gnome/sources/${pname}/${networkmanager.major}/${pname}-${version}.tar.xz";
-    sha256 = "a72cb88ecc0a9edec836e8042c592d68b8b290c0d78082e6b25cf08b46c6be5d";
+    url    = "mirror://gnome/sources/${pname}/${major}/${pname}-${version}.tar.xz";
+    sha256 = "bd97ce768c34cce6d5b5d43681149a8300bec754397a3f46a0d8d0aea7030c5e";
   };
 
   buildInputs = [ networkmanager pptp ppp libsecret ]
diff --git a/pkgs/tools/networking/network-manager/vpnc.nix b/pkgs/tools/networking/network-manager/vpnc.nix
index b760fe6e4f7d..44233b351290 100644
--- a/pkgs/tools/networking/network-manager/vpnc.nix
+++ b/pkgs/tools/networking/network-manager/vpnc.nix
@@ -4,11 +4,12 @@
 stdenv.mkDerivation rec {
   name    = "${pname}${if withGnome then "-gnome" else ""}-${version}";
   pname   = "NetworkManager-vpnc";
-  version = networkmanager.version;
+  major   = "1.2";
+  version = "${major}.4";
 
   src = fetchurl {
-    url    = "mirror://gnome/sources/${pname}/${networkmanager.major}/${pname}-${version}.tar.xz";
-    sha256 = "e900f6500026f8c3ee4feb92e1d0a0c0abbee9ba507dad915b47a8ab7df9e1f3";
+    url    = "mirror://gnome/sources/${pname}/${major}/${pname}-${version}.tar.xz";
+    sha256 = "39c7516418e90208cb534c19628ce40fd50eba0a08b2ebaef8da85720b10fb05";
   };
 
   buildInputs = [ vpnc networkmanager libsecret ]
diff --git a/pkgs/tools/networking/openssh/RH-1380296-NEWKEYS-null-pointer-deref.patch b/pkgs/tools/networking/openssh/RH-1380296-NEWKEYS-null-pointer-deref.patch
new file mode 100644
index 000000000000..665eff864530
--- /dev/null
+++ b/pkgs/tools/networking/openssh/RH-1380296-NEWKEYS-null-pointer-deref.patch
@@ -0,0 +1,37 @@
+diff --git a/kex.c b/kex.c
+index 50c7a0f..823668b 100644
+--- a/kex.c
++++ b/kex.c
+@@ -419,6 +419,8 @@ kex_input_newkeys(int type, u_int32_t seq, void *ctxt)
+ 	ssh_dispatch_set(ssh, SSH2_MSG_NEWKEYS, &kex_protocol_error);
+ 	if ((r = sshpkt_get_end(ssh)) != 0)
+ 		return r;
++        if ((r = ssh_set_newkeys(ssh, MODE_IN)) != 0)
++          return r;
+ 	kex->done = 1;
+ 	sshbuf_reset(kex->peer);
+ 	/* sshbuf_reset(kex->my); */
+diff --git a/packet.c b/packet.c
+index d6dad2d..f96566b 100644
+--- a/packet.c
++++ b/packet.c
+@@ -38,7 +38,7 @@
+  */
+ 
+ #include "includes.h"
+- 
++
+ #include <sys/param.h>	/* MIN roundup */
+ #include <sys/types.h>
+ #include "openbsd-compat/sys-queue.h"
+@@ -1907,9 +1907,7 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
+ 			return r;
+ 		return SSH_ERR_PROTOCOL_ERROR;
+ 	}
+-	if (*typep == SSH2_MSG_NEWKEYS)
+-		r = ssh_set_newkeys(ssh, MODE_IN);
+-	else if (*typep == SSH2_MSG_USERAUTH_SUCCESS && !state->server_side)
++	if (*typep == SSH2_MSG_USERAUTH_SUCCESS && !state->server_side)
+ 		r = ssh_packet_enable_delayed_compress(ssh);
+ 	else
+ 		r = 0;
diff --git a/pkgs/tools/networking/openssh/default.nix b/pkgs/tools/networking/openssh/default.nix
index 0c19822d37c9..fabcda902be3 100644
--- a/pkgs/tools/networking/openssh/default.nix
+++ b/pkgs/tools/networking/openssh/default.nix
@@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
 
   patches =
     [
+      ./RH-1380296-NEWKEYS-null-pointer-deref.patch
       ./locale_archive.patch
       ./fix-host-key-algorithms-plus.patch
 
diff --git a/pkgs/tools/networking/sshpass/default.nix b/pkgs/tools/networking/sshpass/default.nix
index 95212b00beb1..f87cecaf4d27 100644
--- a/pkgs/tools/networking/sshpass/default.nix
+++ b/pkgs/tools/networking/sshpass/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "sshpass-${version}";
-  version = "1.05";
-  
+  version = "1.06";
+
   src = fetchurl {
     url = "mirror://sourceforge/sshpass/sshpass-${version}.tar.gz";
-    sha256 = "0gj8r05h1hy01vh4csygyw21z2hcxb72qcxkxxi3y34alr98gxy3";
+    sha256 = "0q7fblaczb7kwbsz0gdy9267z0sllzgmf0c7z5c9mf88wv74ycn6";
   };
-  
+
   meta = {
     homepage = http://sourceforge.net/projects/sshpass/;
     description = "Non-interactive ssh password auth";
diff --git a/pkgs/tools/networking/tinc/default.nix b/pkgs/tools/networking/tinc/default.nix
index f7085e8f5c52..813290494e2e 100644
--- a/pkgs/tools/networking/tinc/default.nix
+++ b/pkgs/tools/networking/tinc/default.nix
@@ -1,12 +1,12 @@
 {stdenv, fetchurl, lzo, openssl, zlib}:
 
 stdenv.mkDerivation rec {
-  version = "1.0.28";
+  version = "1.0.29";
   name = "tinc-${version}";
 
   src = fetchurl {
     url = "http://www.tinc-vpn.org/packages/tinc-${version}.tar.gz";
-    sha256 = "0i5kx3hza359nclyhb60kxlzqyx0phmg175350hww28g6scjcl0b";
+    sha256 = "0y1alzxgds067m83qdkg12hsy6disa2ad3y2i0h1pgpvdxy02mq3";
   };
 
   buildInputs = [ lzo openssl zlib ];
diff --git a/pkgs/tools/package-management/fpm/default.nix b/pkgs/tools/package-management/fpm/default.nix
index ca2e44fcaf00..4a18bfb5345f 100644
--- a/pkgs/tools/package-management/fpm/default.nix
+++ b/pkgs/tools/package-management/fpm/default.nix
@@ -1,13 +1,9 @@
 { lib, bundlerEnv, ruby }:
 
 bundlerEnv rec {
-  name = "fpm-${version}";
-
-  version = (import gemset).fpm.version;
   inherit ruby;
-  gemfile = ./Gemfile;
-  lockfile = ./Gemfile.lock;
-  gemset = ./gemset.nix;
+  pname = "fpm";
+  gemdir = ./.;
 
   meta = with lib; {
     description = "Tool to build packages for multiple platforms with ease";
diff --git a/pkgs/tools/package-management/libhif/default.nix b/pkgs/tools/package-management/libhif/default.nix
deleted file mode 100644
index 7736c67007ae..000000000000
--- a/pkgs/tools/package-management/libhif/default.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{ stdenv, fetchFromGitHub, cmake, pkgconfig, autoconf, automake, libtool, expat, python, sphinx, gobjectIntrospection, librepo, check, rpm, libsolv, pcre, curl, gtk_doc, zlib, xz, elfutils }:
-
-stdenv.mkDerivation rec {
-  rev  = "87e4cb247f5982fd48636691a955cc566d3110a3";
-  name = "libhif-${stdenv.lib.strings.substring 0 7 rev}";
-
-  src = fetchFromGitHub {
-    inherit rev;
-    owner  = "rpm-software-management";
-    repo   = "libhif";
-    sha256 = "1g8hrqjawzwcx1gjcnv9sxg5i8l13dab3rr3i641k5vi76vv8miq";
-  };
-
-  postPatch = ''
-    for file in python/hawkey/CMakeLists.txt python/hawkey/tests/module/CMakeLists.txt; do
-      substituteInPlace $file --replace ' ''${PYTHON_INSTALL_DIR}' " $out/${python.sitePackages}"
-    done
-
-    # Until https://github.com/rpm-software-management/libhif/issues/43 is implemented, let's not force users to have this path
-    substituteInPlace libhif/hif-keyring.c \
-      --replace '"/etc/pki/rpm-gpg"' 'getenv("LIBHIF_RPM_GPG_PATH_OVERRIDE") ? getenv("LIBHIF_RPM_GPG_PATH_OVERRIDE") : "/etc/pki/rpm-gpg"'
- '';
-
-  buildInputs = [ cmake pkgconfig pcre expat python sphinx gobjectIntrospection gtk_doc librepo check rpm curl ];
-
-  # ibhif/hif-packagedelta.h includes solv/pool.h
-  propagatedBuildInputs = [ libsolv ];
-
-  meta = with stdenv.lib; {
-    description = "A library that provides a high level package-manager. It uses librepo and hawkey under the hood.";
-    license     = licenses.lgpl2Plus;
-    platforms   = platforms.linux;
-    maintainers = with maintainers; [ copumpkin ];
-  };
-}
-
diff --git a/pkgs/tools/security/enpass/data.json b/pkgs/tools/security/enpass/data.json
new file mode 100644
index 000000000000..4e245d1c80fc
--- /dev/null
+++ b/pkgs/tools/security/enpass/data.json
@@ -0,0 +1,12 @@
+{
+  "amd64": {
+    "path": "pool/main/e/enpass/enpass_5.3.0_amd64.deb", 
+    "sha256": "d9da061c6456281da836bdd78bdb7baeced4b7f1805bb2495e4f1d15038cf86b", 
+    "version": "5.3.0"
+  }, 
+  "i386": {
+    "path": "pool/main/e/enpass/enpass_5.3.0_i386.deb", 
+    "sha256": "58d9f3b83c2da477c13976e1826d112236eabd46a389de7e8767ee99ac41f469", 
+    "version": "5.3.0"
+  }
+}
\ No newline at end of file
diff --git a/pkgs/tools/security/enpass/default.nix b/pkgs/tools/security/enpass/default.nix
new file mode 100644
index 000000000000..b7f7282d2929
--- /dev/null
+++ b/pkgs/tools/security/enpass/default.nix
@@ -0,0 +1,106 @@
+{stdenv, system, fetchurl, dpkg, openssl, xorg
+, glib, mesa, libpulseaudio, zlib, dbus, fontconfig, freetype
+, gtk2, pango, atk, cairo, gdk_pixbuf, jasper, xkeyboardconfig
+, makeWrapper , makeDesktopItem, python, pythonPackages, lib}:
+assert system == "i686-linux" || system == "x86_64-linux";
+let
+  all_data = (with builtins; fromJSON (readFile ./data.json));
+  system_map = {
+    i686-linux = "i386";
+    x86_64-linux = "amd64";
+  };
+
+  data = (with builtins; getAttr (getAttr system system_map) all_data);
+
+  baseUrl = http://repo.sinew.in;
+  
+  # used of both wrappers and libpath
+  libPath = lib.makeLibraryPath (with xorg; [
+    openssl
+    mesa
+    fontconfig
+    freetype
+    libpulseaudio
+    zlib
+    dbus
+    libX11
+    libXi
+    libSM
+    libICE
+    libXext
+    libXrender
+    libXScrnSaver
+    glib
+    gtk2
+    pango
+    cairo
+    atk
+    gdk_pixbuf
+    jasper
+    stdenv.cc.cc
+  ]);
+  package = stdenv.mkDerivation rec {
+
+    inherit (data) version;
+    name = "enpass-${version}";
+
+    desktopItem = makeDesktopItem {
+      name = "Enpass";
+      exec = "$out/bin/Enpass";
+      #icon = "Enpass";
+      desktopName = "Enpass";
+      genericName = "Password manager";
+      categories = "Application;Security;";
+    };
+
+
+    src = fetchurl {
+      inherit (data) sha256;
+      url = "${baseUrl}/${data.path}";
+    };
+
+    meta = {
+      description = "a well known password manager";
+      homepage = https://www.enpass.io/;
+      maintainer = lib.maintainers.ronny;
+      license = lib.licenses.unfree;
+      platforms = lib.platforms.linux;
+    };
+
+    buildInputs = [makeWrapper dpkg];
+    phases = [ "unpackPhase" "installPhase" ];
+
+    unpackPhase = "dpkg -X $src .";
+    installPhase=''
+      mkdir $out
+      cp -r opt/Enpass/*  $out
+
+      # Make desktop item
+      mkdir -p "$out"/share/applications
+      cp "$desktopItem"/share/applications/* "$out"/share/applications/
+      mkdir -p "$out"/share/icons
+
+      patchelf  \
+        --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+        $out/bin/Enpass
+
+      wrapProgram $out/bin/Enpass \
+        --set LD_LIBRARY_PATH "${libPath}:$out/lib:$out/plugins/sqldrivers" \
+        --set QT_PLUGIN_PATH "$out/plugins" \
+        --set QT_QPA_PLATFORM_PLUGIN_PATH "$out/plugins/platforms" \
+        --set QT_XKB_CONFIG_ROOT "${xkeyboardconfig}/share/X11/xkb"
+    '';
+  };
+  updater = {
+    update = stdenv.mkDerivation rec {
+      name = "enpass-update-script";
+      SCRIPT =./update_script.py;
+      
+      buildInputs = with pythonPackages; [python requests pathlib2 six attrs ];
+      shellHook = ''
+      exec python $SCRIPT --target pkgs/tools/security/enpass/data.json --repo ${baseUrl}
+      '';
+
+    };
+  };
+in (package // {refresh = updater;}) 
diff --git a/pkgs/tools/security/enpass/update_script.py b/pkgs/tools/security/enpass/update_script.py
new file mode 100644
index 000000000000..f8ec715cb5e4
--- /dev/null
+++ b/pkgs/tools/security/enpass/update_script.py
@@ -0,0 +1,95 @@
+from __future__ import print_function
+
+
+import argparse
+import bz2
+import email
+import json
+import logging
+
+from itertools import product
+from operator import itemgetter
+
+import attr
+import pkg_resources
+
+from pathlib2 import Path
+from requests import Session
+from six.moves.urllib_parse import urljoin
+
+
+@attr.s
+class ReleaseElement(object):
+    sha256 = attr.ib(repr=False)
+    size = attr.ib(convert=int)
+    path = attr.ib()
+
+log = logging.getLogger('enpass.updater')
+
+
+parser = argparse.ArgumentParser()
+parser.add_argument('--repo')
+parser.add_argument('--target', type=Path)
+
+
+session = Session()
+
+
+def parse_bz2_msg(msg):
+    msg = bz2.decompress(msg)
+    if '\n\n' in msg:
+        parts = msg.split('\n\n')
+        return list(map(email.message_from_string, parts))
+    return email.message_from_string(msg)
+
+
+def fetch_meta(repo, name, parse=email.message_from_string, split=False):
+    url = urljoin(repo, 'dists/stable', name)
+    response = session.get("{repo}/dists/stable/{name}".format(**locals()))
+    return parse(response.content)
+
+
+def fetch_filehashes(repo, path):
+    meta = fetch_meta(repo, path, parse=parse_bz2_msg)
+    for item in meta:
+        yield {
+            'version': pkg_resources.parse_version(str(item['Version'])),
+            'path': item['Filename'],
+            'sha256': item['sha256'],
+        }
+
+
+def fetch_archs(repo):
+    m = fetch_meta(repo, 'Release')
+
+    architectures = m['Architectures'].split()
+    elements = [ReleaseElement(*x.split()) for x in m['SHA256'].splitlines()]
+    elements = [x for x in elements if x.path.endswith('bz2')]
+
+    for arch, elem in product(architectures, elements):
+        if arch in elem.path:
+            yield arch, max(fetch_filehashes(repo, elem.path),
+                            key=itemgetter('version'))
+
+
+class OurVersionEncoder(json.JSONEncoder):
+    def default(self, obj):
+        # the other way around to avoid issues with
+        # newer setuptools having strict/legacy versions
+        if not isinstance(obj, (dict, str)):
+            return str(obj)
+        return json.JSONEncoder.default(self, obj)
+
+
+def main(repo, target):
+    logging.basicConfig(level=logging.DEBUG)
+    with target.open(mode='wb') as fp:
+        json.dump(
+            dict(fetch_archs(repo)), fp,
+            cls=OurVersionEncoder,
+            indent=2,
+            sort_keys=True)
+
+
+opts = parser.parse_args()
+main(opts.repo, opts.target)
diff --git a/pkgs/tools/system/foreman/default.nix b/pkgs/tools/system/foreman/default.nix
index 594947c265a3..e97d71f5c84a 100644
--- a/pkgs/tools/system/foreman/default.nix
+++ b/pkgs/tools/system/foreman/default.nix
@@ -1,24 +1,9 @@
-{ stdenv, lib, ruby, bundlerEnv, makeWrapper }:
+{ bundlerEnv, lib, ruby }:
 
-stdenv.mkDerivation rec {
-  name = "foreman-${env.gems.foreman.version}";
-
-  env = bundlerEnv {
-    inherit ruby;
-    name = "${name}-gems";
-    gemfile = ./Gemfile;
-    lockfile = ./Gemfile.lock;
-    gemset = ./gemset.nix;
-  };
-
-  phases = ["installPhase"];
-
-  nativeBuildInputs = [ makeWrapper ];
-
-  installPhase = ''
-    mkdir -p $out/bin
-    makeWrapper ${env}/bin/foreman $out/bin/foreman
-  '';
+bundlerEnv {
+  inherit ruby;
+  pname = "foreman";
+  gemdir = ./.;
 
   meta = with lib; {
     description = "Process manager for applications with multiple components";
diff --git a/pkgs/tools/system/hiera-eyaml/default.nix b/pkgs/tools/system/hiera-eyaml/default.nix
index 615a66f86551..e0ff7d5ca8b4 100644
--- a/pkgs/tools/system/hiera-eyaml/default.nix
+++ b/pkgs/tools/system/hiera-eyaml/default.nix
@@ -1,22 +1,9 @@
-{ lib, bundlerEnv, stdenv }:
+{ lib, bundlerEnv, ruby }:
 
-let
-  name = "hiera-eyaml-${env.gems.hiera-eyaml.version}";
-
-  env = bundlerEnv {
-    inherit name;
-    gemfile = ./Gemfile;
-    lockfile = ./Gemfile.lock;
-    gemset = ./gemset.nix;
-  };
-
-in stdenv.mkDerivation {
-  inherit name;
-
-  buildCommand = ''
-    mkdir -p $out/bin
-    ln -s ${env}/bin/eyaml $out/bin/eyaml
-  '';
+bundlerEnv {
+  inherit ruby;
+  pname = "hiera-eyaml";
+  gemdir = ./.;
 
   meta = with lib; {
     description = "Per-value asymmetric encryption of sensitive data for Hiera";
diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix
index 28ec7f1be427..13c50fe3ec9e 100644
--- a/pkgs/tools/system/netdata/default.nix
+++ b/pkgs/tools/system/netdata/default.nix
@@ -1,19 +1,24 @@
-{ stdenv, fetchFromGitHub, autoreconfHook, zlib, pkgconfig }:
+{ stdenv, fetchFromGitHub, autoreconfHook, zlib, pkgconfig, libuuid }:
 
 stdenv.mkDerivation rec{
-  version = "1.0.0";
+  version = "1.4.0";
   name = "netdata-${version}";
 
   src = fetchFromGitHub {
     rev = "v${version}";
     owner = "firehol";
     repo = "netdata";
-    sha256 = "03107ny98zks05p44jzypkk4lw8lbvmqja5b537ln6cnrgp20yvq";
+    sha256 = "1wknxci2baj6f7rl8z8j7haaz122jmbb74aw7i3xbj2y61cs58n8";
   };
 
-  buildInputs = [ autoreconfHook zlib pkgconfig ];
+  buildInputs = [ autoreconfHook zlib pkgconfig libuuid ];
 
-  patches = [ ./web_access.patch ];
+  preConfigure = ''
+    export ZLIB_CFLAGS=" "
+    export ZLIB_LIBS="-lz"
+    export UUID_CFLAGS=" "
+    export UUID_LIBS="-luuid"
+  '';
 
   meta = with stdenv.lib; {
     description = "Real-time performance monitoring tool";
diff --git a/pkgs/tools/system/netdata/web_access.patch b/pkgs/tools/system/netdata/web_access.patch
deleted file mode 100644
index 3c0fbf7507d7..000000000000
--- a/pkgs/tools/system/netdata/web_access.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/src/web_client.c.orig	2016-04-17 11:34:20.044455323 +0200
-+++ b/src/web_client.c	2016-04-17 11:34:47.432897957 +0200
-@@ -291,14 +291,14 @@
- 		buffer_sprintf(w->response.data, "File '%s' does not exist, or is not accessible.", filename);
- 		return 404;
- 	}
--
-+#if 0
- 	// check if the file is owned by us
- 	if(stat.st_uid != web_files_uid()) {
- 		error("%llu: File '%s' is owned by user %d (I run as user %d). Access Denied.", w->id, webfilename, stat.st_uid, getuid());
- 		buffer_sprintf(w->response.data, "Access to file '%s' is not permitted.", filename);
- 		return 403;
- 	}
--
-+#endif
- 	if((stat.st_mode & S_IFMT) == S_IFDIR) {
- 		snprintf(webfilename, FILENAME_MAX+1, "%s/index.html", filename);
- 		return mysendfile(w, webfilename);
diff --git a/pkgs/tools/text/shfmt/default.nix b/pkgs/tools/text/shfmt/default.nix
index aef12ed97439..cac9bbb168b8 100644
--- a/pkgs/tools/text/shfmt/default.nix
+++ b/pkgs/tools/text/shfmt/default.nix
@@ -2,8 +2,8 @@
 
 buildGoPackage rec {
   name = "shfmt-${version}";
-  version = "2016-06-16";
-  rev = "8add0072d6abdc892e4617c95e8bba21ebe0beeb";
+  version = "0.2.0";
+  rev = "v${version}";
 
   goPackagePath = "github.com/mvdan/sh";
 
@@ -11,7 +11,7 @@ buildGoPackage rec {
     owner = "mvdan";
     repo = "sh";
     inherit rev;
-    sha256 = "1m2lkcw6m5gdqjp17m01d822cj1p04qk6hm9m94ni2x19f16qs8m";
+    sha256 = "07jf9v6583vvmk07fp7xdlnh7rvgl6f06ib2588g3xf1wk9vrq3d";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/typesetting/asciidoctor/default.nix b/pkgs/tools/typesetting/asciidoctor/default.nix
index dd90444d6af6..495a5fcf8821 100644
--- a/pkgs/tools/typesetting/asciidoctor/default.nix
+++ b/pkgs/tools/typesetting/asciidoctor/default.nix
@@ -1,19 +1,9 @@
 { stdenv, lib, bundlerEnv, ruby_2_2, curl }:
 
 bundlerEnv rec {
-  name = "asciidoctor-${version}";
-  version = "1.5.4";
-
+  pname = "asciidoctor";
   ruby = ruby_2_2;
-  gemfile = ./Gemfile;
-  lockfile = ./Gemfile.lock;
-  gemset = ./gemset.nix;
-
-  # Delete dependencies' executables
-  postBuild = ''
-    find $out/bin -type f -not -wholename '*bin/asciidoctor*' -print0 \
-    | xargs -0 rm
-  '';
+  gemdir = ./.;
 
   meta = with lib; {
     description = "A faster Asciidoc processor written in Ruby";
diff --git a/pkgs/tools/typesetting/tex/nix/animatedot.sh b/pkgs/tools/typesetting/tex/nix/animatedot.sh
index 46a2c515e03a..f038b83ff7ad 100644
--- a/pkgs/tools/typesetting/tex/nix/animatedot.sh
+++ b/pkgs/tools/typesetting/tex/nix/animatedot.sh
@@ -4,6 +4,6 @@ mkdir -p $out
 
 for ((i = 1; i <= $nrFrames; i++)); do
     echo "producing frame $i...";
-    targetName=$out/$(basename $(stripHash $dotGraph; echo $strippedName) .dot)-f-$i.dot
+    targetName=$out/$(basename $(stripHash $dotGraph) .dot)-f-$i.dot
     cpp -DFRAME=$i < $dotGraph > $targetName
 done
diff --git a/pkgs/tools/typesetting/tex/nix/default.nix b/pkgs/tools/typesetting/tex/nix/default.nix
index ce5c025475a0..0566e5118705 100644
--- a/pkgs/tools/typesetting/tex/nix/default.nix
+++ b/pkgs/tools/typesetting/tex/nix/default.nix
@@ -185,7 +185,7 @@ rec {
         if test -d $postscript; then
           input=$(ls $postscript/*.ps)
         else
-          input=$(stripHash $postscript; echo $strippedName)
+          input=$(stripHash $postscript)
           ln -s $postscript $input
         fi
 
diff --git a/pkgs/tools/typesetting/tex/nix/dot2pdf.sh b/pkgs/tools/typesetting/tex/nix/dot2pdf.sh
index c416bf235a14..71cf601dfac0 100644
--- a/pkgs/tools/typesetting/tex/nix/dot2pdf.sh
+++ b/pkgs/tools/typesetting/tex/nix/dot2pdf.sh
@@ -4,7 +4,7 @@ mkdir -p $out
 
 dot2pdf() {
     sourceFile=$1
-    targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .dot).pdf
+    targetName=$out/$(basename $(stripHash $sourceFile) .dot).pdf
     echo "converting $sourceFile to $targetName..."
     export FONTCONFIG_FILE=$fontsConf
     dot -Tpdf $sourceFile > $targetName
diff --git a/pkgs/tools/typesetting/tex/nix/dot2ps.sh b/pkgs/tools/typesetting/tex/nix/dot2ps.sh
index c70e76ce4c73..dd8de4a23dbc 100644
--- a/pkgs/tools/typesetting/tex/nix/dot2ps.sh
+++ b/pkgs/tools/typesetting/tex/nix/dot2ps.sh
@@ -4,7 +4,7 @@ mkdir -p $out
 
 dot2ps() {
     sourceFile=$1
-    targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .dot).ps
+    targetName=$out/$(basename $(stripHash $sourceFile) .dot).ps
     echo "converting $sourceFile to $targetName..."
     dot -Tps $sourceFile > $targetName
 }
diff --git a/pkgs/tools/typesetting/tex/nix/lhs2tex.sh b/pkgs/tools/typesetting/tex/nix/lhs2tex.sh
index f34b3944c8ef..bfef3df6b0e1 100644
--- a/pkgs/tools/typesetting/tex/nix/lhs2tex.sh
+++ b/pkgs/tools/typesetting/tex/nix/lhs2tex.sh
@@ -10,7 +10,7 @@ cd $startDir
 
 lhstex() {
     sourceFile=$1
-    targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .lhs).tex
+    targetName=$out/$(basename $(stripHash $sourceFile) .lhs).tex
     echo "converting $sourceFile to $targetName..."
     lhs2TeX -o "$targetName" $flags "$sourceFile"
 }
diff --git a/pkgs/tools/typesetting/tex/nix/run-latex.sh b/pkgs/tools/typesetting/tex/nix/run-latex.sh
index fa27520d11cd..3941fdcac4a4 100644
--- a/pkgs/tools/typesetting/tex/nix/run-latex.sh
+++ b/pkgs/tools/typesetting/tex/nix/run-latex.sh
@@ -16,11 +16,11 @@ for i in $extraFiles; do
     if test -d $i; then
         ln -s $i/* .
     else
-        ln -s $i $(stripHash $i; echo $strippedName)
+        ln -s $i $(stripHash $i)
     fi
 done
 
-rootName=$(basename $(stripHash "$rootFile"; echo $strippedName))
+rootName=$(basename $(stripHash "$rootFile"))
 
 rootNameBase=$(echo "$rootName" | sed 's/\..*//')
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 03e69e9ae732..08fffaf2c9ea 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -377,6 +377,8 @@ in
 
   afl = callPackage ../tools/security/afl { };
 
+  afpfs-ng = callPackage ../tools/filesystems/afpfs-ng/default.nix { };
+
   aha = callPackage ../tools/text/aha { };
 
   ahcpd = callPackage ../tools/networking/ahcpd { };
@@ -499,6 +501,8 @@ in
 
   elvish = callPackage ../shells/elvish { };
 
+  enpass = callPackage ../tools/security/enpass { };
+
   genymotion = callPackage ../development/mobile/genymotion { };
 
   grc = callPackage ../tools/misc/grc { };
@@ -531,7 +535,7 @@ in
 
   androidsdk_extras = self.androidenv.androidsdk_6_0_extras;
 
-  arc-gtk-theme = callPackage ../misc/themes/arc { };
+  arc-theme = callPackage ../misc/themes/arc { };
 
   adapta-gtk-theme = callPackage ../misc/themes/adapta { };
 
@@ -867,6 +871,8 @@ in
 
   heatseeker = callPackage ../tools/misc/heatseeker { };
 
+  hexio = callPackage ../development/tools/hexio { };
+
   interlock = callPackage ../servers/interlock {};
 
   kapacitor = callPackage ../servers/monitoring/kapacitor { };
@@ -1561,6 +1567,8 @@ in
       pillow;
   };
 
+  fastd = callPackage ../tools/networking/fastd { };
+
   fatsort = callPackage ../tools/filesystems/fatsort { };
 
   fcitx = callPackage ../tools/inputmethods/fcitx {
@@ -2300,6 +2308,8 @@ in
 
   lf = callPackage ../tools/misc/lf {};
 
+  lhasa = callPackage ../tools/compression/lhasa {};
+
   libcpuid = callPackage ../tools/misc/libcpuid { };
 
   lesspipe = callPackage ../tools/misc/lesspipe { };
@@ -2409,10 +2419,6 @@ in
     libtool = darwin.cctools;
   };
 
-  nodejs-5_x = callPackage ../development/web/nodejs/v5.nix {
-    libtool = darwin.cctools;
-  };
-
   nodejs-6_x = callPackage ../development/web/nodejs/v6.nix {
     libtool = darwin.cctools;
   };
@@ -2426,10 +2432,6 @@ in
     nodejs = pkgs.nodejs-6_x;
   };
 
-  nodePackages_5_x = callPackage ../development/node-packages/default-v5.nix {
-    nodejs = pkgs.nodejs-5_x;
-  };
-
   nodePackages_4_x = callPackage ../development/node-packages/default-v4.nix {
     nodejs = pkgs.nodejs-4_x;
   };
@@ -2759,6 +2761,8 @@ in
 
   mysql2pgsql = callPackage ../tools/misc/mysql2pgsql { };
 
+  mysqltuner = callPackage ../tools/misc/mysqltuner { };
+
   nabi = callPackage ../tools/inputmethods/nabi { };
 
   namazu = callPackage ../tools/text/namazu { };
@@ -3695,7 +3699,7 @@ in
   sshpass = callPackage ../tools/networking/sshpass { };
 
   sslscan = callPackage ../tools/security/sslscan {
-    openssl = openssl_1_0_1;
+    openssl = openssl_1_0_1.override { enableSSL2 = true; };
   };
 
   sslmate = callPackage ../development/tools/sslmate { };
@@ -5095,6 +5099,8 @@ in
 
   ponyc = callPackage ../development/compilers/ponyc { };
 
+  pony-stable = callPackage ../development/compilers/ponyc/pony-stable.nix { };
+
   rgbds = callPackage ../development/compilers/rgbds { };
 
   rtags = callPackage ../development/tools/rtags/default.nix {};
@@ -5192,13 +5198,15 @@ in
 
   urweb = callPackage ../development/compilers/urweb { };
 
-  vala_0_23 = callPackage ../development/compilers/vala/0.23.nix { };
-
-  vala_0_26 = callPackage ../development/compilers/vala/0.26.nix { };
+  inherit (callPackage ../development/compilers/vala { })
+    vala_0_23
+    vala_0_26
+    vala_0_28
+    vala_0_32
+    vala_0_34
+    vala;
 
-  vala_0_28 = callPackage ../development/compilers/vala/0.28.nix { };
-
-  vala_0_32 = callPackage ../development/compilers/vala/0.32.nix { };
+  valadoc = callPackage ../development/tools/valadoc { };
 
   vs90wrapper = callPackage ../development/compilers/vs90wrapper { };
 
@@ -5273,7 +5281,10 @@ in
   erlangR16 = callPackage ../development/interpreters/erlang/R16.nix {
     inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
   };
-  erlangR16_odbc = callPackage ../development/interpreters/erlang/R16.nix { odbcSupport = true; };
+  erlangR16_odbc = callPackage ../development/interpreters/erlang/R16.nix {
+    inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
+    odbcSupport = true;
+  };
   erlangR17 = callPackage ../development/interpreters/erlang/R17.nix {
     inherit (darwin.apple_sdk.frameworks) Carbon Cocoa;
   };
@@ -5714,6 +5725,8 @@ in
   apacheKafka_0_9 = callPackage ../servers/apache-kafka { majorVersion = "0.9"; };
   apacheKafka_0_10 = callPackage ../servers/apache-kafka { majorVersion = "0.10"; };
 
+  asn2quickder = callPackage ../development/tools/asn2quickder {};
+
   astyle = callPackage ../development/tools/misc/astyle { };
 
   electron = callPackage ../development/tools/electron { };
@@ -6409,6 +6422,8 @@ in
 
   xc3sprog = callPackage ../development/tools/misc/xc3sprog { };
 
+  xcbuild  = callPackage ../development/tools/xcbuild { inherit (darwin.apple_sdk.frameworks) CoreServices CoreGraphics ImageIO; };
+
   xmlindent = callPackage ../development/web/xmlindent {};
 
   xpwn = callPackage ../development/mobile/xpwn {};
@@ -6648,6 +6663,7 @@ in
   cpp-hocon = callPackage ../development/libraries/cpp-hocon { };
 
   cpp-netlib = callPackage ../development/libraries/cpp-netlib { };
+  uri = callPackage ../development/libraries/uri { };
 
   cppcms = callPackage ../development/libraries/cppcms { };
 
@@ -7467,7 +7483,7 @@ in
   libburn = callPackage ../development/libraries/libburn { };
 
   libcaca = callPackage ../development/libraries/libcaca {
-    inherit (xlibs) libX11;
+    inherit (xlibs) libX11 libXext;
   };
 
   libcanberra_gtk3 = callPackage ../development/libraries/libcanberra {
@@ -7646,6 +7662,8 @@ in
 
   libgee_0_6 = callPackage ../development/libraries/libgee/0.6.nix { };
 
+  libgee_0_8 = callPackage ../development/libraries/libgee/0.8.nix { };
+
   libgig = callPackage ../development/libraries/libgig { };
 
   libgnome_keyring = callPackage ../development/libraries/libgnome-keyring { };
@@ -7750,7 +7768,7 @@ in
 
   libharu = callPackage ../development/libraries/libharu { };
 
-  libhif = callPackage ../tools/package-management/libhif { sphinx = python27Packages.sphinx; };
+  libhttpseverywhere = callPackage ../development/libraries/libhttpseverywhere { };
 
   libHX = callPackage ../development/libraries/libHX { };
 
@@ -8155,6 +8173,8 @@ in
 
   libu2f-server = callPackage ../development/libraries/libu2f-server { };
 
+  libuecc = callPackage ../development/libraries/libuecc { };
+
   libui = callPackage ../development/libraries/libui { };
 
   libunity = callPackage ../development/libraries/libunity { };
@@ -8878,6 +8898,8 @@ in
 
   quesoglc = callPackage ../development/libraries/quesoglc { };
 
+  quickder = callPackage ../development/libraries/quickder {};
+
   quicksynergy = callPackage ../applications/misc/quicksynergy { };
 
   qwt = callPackage ../development/libraries/qwt {};
@@ -9798,6 +9820,10 @@ in
 
   archiveopteryx = callPackage ../servers/mail/archiveopteryx/default.nix { };
 
+  atlassian-confluence = callPackage ../servers/atlassian/confluence.nix { };
+  atlassian-crowd = callPackage ../servers/atlassian/crowd.nix { };
+  atlassian-jira = callPackage ../servers/atlassian/jira.nix { };
+
   cadvisor = callPackage ../servers/monitoring/cadvisor { };
 
   cassandra_1_2 = callPackage ../servers/nosql/cassandra/1.2.nix { };
@@ -10852,13 +10878,17 @@ in
      for a specific kernel.  This function can then be called for
      whatever kernel you're using. */
 
-  linuxPackagesFor = kernel: self: let callPackage = newScope self; in rec {
+  linuxPackagesFor = kernel: lib.makeExtensible (self: with self; {
+    callPackage = newScope self;
+
     inherit kernel;
 
     accelio = callPackage ../development/libraries/accelio { };
 
     acpi_call = callPackage ../os-specific/linux/acpi-call {};
 
+    amdgpu-pro = callPackage ../os-specific/linux/amdgpu-pro { };
+
     batman_adv = callPackage ../os-specific/linux/batman-adv {};
 
     bcc = callPackage ../os-specific/linux/bcc { };
@@ -10968,7 +10998,7 @@ in
       configFile = "kernel";
       inherit kernel spl;
     };
-  };
+  });
 
   # The current default kernel / kernel modules.
   linuxPackages = linuxPackages_4_4;
@@ -10979,29 +11009,29 @@ in
   linux_latest = linuxPackages_latest.kernel;
 
   # Build the kernel modules for the some of the kernels.
-  linuxPackages_mptcp = linuxPackagesFor pkgs.linux_mptcp linuxPackages_mptcp;
-  linuxPackages_rpi = linuxPackagesFor pkgs.linux_rpi linuxPackages_rpi;
-  linuxPackages_3_10 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_10 linuxPackages_3_10);
-  linuxPackages_3_10_tuxonice = linuxPackagesFor pkgs.linux_3_10_tuxonice linuxPackages_3_10_tuxonice;
-  linuxPackages_3_12 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_12 linuxPackages_3_12);
-  linuxPackages_3_18 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_18 linuxPackages_3_18);
-  linuxPackages_4_1 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_1 linuxPackages_4_1);
-  linuxPackages_4_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_4 linuxPackages_4_4);
-  linuxPackages_4_7 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_7 linuxPackages_4_7);
-  linuxPackages_4_8 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_8 linuxPackages_4_8);
+  linuxPackages_mptcp = linuxPackagesFor pkgs.linux_mptcp;
+  linuxPackages_rpi = linuxPackagesFor pkgs.linux_rpi;
+  linuxPackages_3_10 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_10);
+  linuxPackages_3_10_tuxonice = linuxPackagesFor pkgs.linux_3_10_tuxonice;
+  linuxPackages_3_12 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_12);
+  linuxPackages_3_18 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_18);
+  linuxPackages_4_1 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_1);
+  linuxPackages_4_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_4);
+  linuxPackages_4_7 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_7);
+  linuxPackages_4_8 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_8);
   # Don't forget to update linuxPackages_latest!
 
   # Intentionally lacks recurseIntoAttrs, as -rc kernels will quite likely break out-of-tree modules and cause failed Hydra builds.
-  linuxPackages_testing = linuxPackagesFor pkgs.linux_testing linuxPackages_testing;
+  linuxPackages_testing = linuxPackagesFor pkgs.linux_testing;
 
-  linuxPackages_custom = {version, src, configfile}:
-                           let linuxPackages_self = (linuxPackagesFor (pkgs.linuxManualConfig {inherit version src configfile;
-                                                                                               allowImportFromDerivation=true;})
-                                                     linuxPackages_self);
-                           in recurseIntoAttrs linuxPackages_self;
+  linuxPackages_custom = { version, src, configfile }:
+    recurseIntoAttrs (linuxPackagesFor (pkgs.linuxManualConfig {
+      inherit version src configfile;
+      allowImportFromDerivation = true;
+    }));
 
   # Build a kernel for Xen dom0
-  linuxPackages_latest_xen_dom0 = recurseIntoAttrs (linuxPackagesFor (pkgs.linux_latest.override { features.xen_dom0=true; }) linuxPackages_latest);
+  linuxPackages_latest_xen_dom0 = recurseIntoAttrs (linuxPackagesFor (pkgs.linux_latest.override { features.xen_dom0=true; }));
 
   # Grsecurity packages
 
@@ -11021,8 +11051,7 @@ in
   };
 
   linuxPackages_grsec_nixos =
-    let self = linuxPackagesFor linux_grsec_nixos self;
-    in recurseIntoAttrs self;
+    recurseIntoAttrs (linuxPackagesFor linux_grsec_nixos);
 
   # An unsupported grsec xen guest kernel
   linux_grsec_server_xen = linux_grsec_nixos.override {
@@ -11036,13 +11065,13 @@ in
   };
 
   # ChromiumOS kernels
-  linuxPackages_chromiumos_3_14 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_chromiumos_3_14 linuxPackages_chromiumos_3_14);
-  linuxPackages_chromiumos_3_18 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_chromiumos_3_18 linuxPackages_chromiumos_3_18);
-  linuxPackages_chromiumos_latest = recurseIntoAttrs (linuxPackagesFor pkgs.linux_chromiumos_latest linuxPackages_chromiumos_latest);
+  linuxPackages_chromiumos_3_14 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_chromiumos_3_14);
+  linuxPackages_chromiumos_3_18 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_chromiumos_3_18);
+  linuxPackages_chromiumos_latest = recurseIntoAttrs (linuxPackagesFor pkgs.linux_chromiumos_latest);
 
   # A function to build a manually-configured kernel
   linuxManualConfig = pkgs.buildLinux;
-  buildLinux = callPackage ../os-specific/linux/kernel/manual-config.nix {};
+  buildLinux = makeOverridable (callPackage ../os-specific/linux/kernel/manual-config.nix {});
 
   keyutils = callPackage ../os-specific/linux/keyutils { };
 
@@ -11721,6 +11750,8 @@ in
 
   orbitron = callPackage ../data/fonts/orbitron { };
 
+  overpass = callPackage ../data/fonts/overpass { };
+
   oxygenfonts = callPackage ../data/fonts/oxygenfonts { };
 
   paper-icon-theme = callPackage ../data/icons/paper-icon-theme { };
@@ -12351,6 +12382,8 @@ in
 
   docker-machine = callPackage ../applications/networking/cluster/docker-machine { };
 
+  docker-distribution = callPackage ../applications/virtualization/docker-distribution { };
+
   doodle = callPackage ../applications/search/doodle { };
 
   drumgizmo = callPackage ../applications/audio/drumgizmo { };
@@ -13645,6 +13678,8 @@ in
 
   mpc_cli = callPackage ../applications/audio/mpc { };
 
+  clerk = callPackage ../applications/audio/clerk { };
+
   ncmpc = callPackage ../applications/audio/ncmpc { };
 
   ncmpcpp = callPackage ../applications/audio/ncmpcpp { };
@@ -14007,6 +14042,8 @@ in
 
   pidgin-opensteamworks = callPackage ../applications/networking/instant-messengers/pidgin-plugins/pidgin-opensteamworks { };
 
+  purple-facebook = callPackage ../applications/networking/instant-messengers/pidgin-plugins/purple-facebook { };
+
   pithos = callPackage ../applications/audio/pithos {
     pythonPackages = python3Packages;
   };
@@ -15019,7 +15056,9 @@ in
     gtk = gtk2;
   };
 
-  kodiPlain = callPackage ../applications/video/kodi { };
+  kodiPlain = callPackage ../applications/video/kodi {
+    libva = libva-full;
+  };
   xbmcPlain = kodiPlain;
 
   kodiPlugins = recurseIntoAttrs (callPackage ../applications/video/kodi/plugins.nix {
@@ -15066,10 +15105,9 @@ in
 
   xdotool = callPackage ../tools/X11/xdotool { };
 
-  xen_4_5_0 = callPackage ../applications/virtualization/xen/4.5.0.nix { stdenv = overrideCC stdenv gcc49; };
-  xen_4_5_2 = callPackage ../applications/virtualization/xen/4.5.2.nix { stdenv = overrideCC stdenv gcc49; };
-  xen_xenServer = callPackage ../applications/virtualization/xen/4.5.0.nix { xenserverPatched = true; stdenv = overrideCC stdenv gcc49; };
-  xen = xen_4_5_2;
+  xen_4_5 = callPackage ../applications/virtualization/xen/4.5.nix { stdenv = overrideCC stdenv gcc49; };
+  xen_xenServer = callPackage ../applications/virtualization/xen/4.5.nix { xenserverPatched = true; stdenv = overrideCC stdenv gcc49; };
+  xen = xen_4_5;
 
   win-spice = callPackage ../applications/virtualization/driver/win-spice { };
   win-virtio = callPackage ../applications/virtualization/driver/win-virtio { };
@@ -16835,6 +16873,8 @@ in
 
   keynav = callPackage ../tools/X11/keynav { };
 
+  kops = callPackage ../applications/networking/cluster/kops { };
+
   lilypond = callPackage ../misc/lilypond { guile = guile_1_8; };
 
   mailcore2 = callPackage ../development/libraries/mailcore2 { };
@@ -17298,6 +17338,10 @@ in
 
   zimg = callPackage ../development/libraries/zimg { };
 
+  zk-shell = callPackage ../applications/misc/zk-shell {
+    inherit (pythonPackages) buildPythonApplication;
+  };
+
   zuki-themes = callPackage ../misc/themes/zuki { };
 
   zoom-us = qt55.callPackage ../applications/networking/instant-messengers/zoom-us {};
diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix
index 2fe69390ec5b..8b3b67f4b05e 100644
--- a/pkgs/top-level/make-tarball.nix
+++ b/pkgs/top-level/make-tarball.nix
@@ -63,12 +63,15 @@ releaseTools.sourceTarball rec {
     fi
 
     # Check that all-packages.nix evaluates on a number of platforms without any warnings.
+    # Filter out MD5 warnings for now
     for platform in i686-linux x86_64-linux x86_64-darwin; do
         header "checking Nixpkgs on $platform"
 
         NIXPKGS_ALLOW_BROKEN=1 nix-env -f . \
             --show-trace --argstr system "$platform" \
-            -qa --drv-path --system-filter \* --system 2>&1 >/dev/null | tee eval-warnings.log
+            -qa --drv-path --system-filter \* --system 2>&1 >/dev/null |
+            (grep -v '^trace: INFO: Deprecated use of MD5 hash in fetch' || true) |
+            tee eval-warnings.log
 
         if [ -s eval-warnings.log ]; then
             echo "Nixpkgs on $platform evaluated with warnings, aborting"
diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix
index 9bebfa3d9158..74d4e1707a11 100644
--- a/pkgs/top-level/php-packages.nix
+++ b/pkgs/top-level/php-packages.nix
@@ -23,20 +23,11 @@ let
     sha256 = "0r5pfbjbmdj46h20jm3iqmy969qd27ajyf0phjhgykv6j0cqjlgd";
   };
 
-  imagick = if isPhp7 then imagick34 else imagick31;
-
-  imagick31 = assert !isPhp7; buildPecl {
-    name = "imagick-3.1.2";
-    sha256 = "14vclf2pqcgf3w8nzqbdw0b9v30q898344c84jdbw2sa62n6k1sj";
-    configureFlags = "--with-imagick=${pkgs.imagemagick.dev}";
-    buildInputs = [ pkgs.pkgconfig ];
-  };
-
-  imagick34 = buildPecl {
-    name = "imagick-3.4.0RC4";
-    sha256 = "0fdkzdv3r8sm6y1x11kp3rxsimq6zf15xvi0mhn57svmnan4zh0i";
+  imagick = buildPecl {
+    name = "imagick-3.4.3RC1";
+    sha256 = "0siyxpszjz6s095s2g2854bhprjq49rf22v6syjiwvndg1pc9fsh";
     configureFlags = "--with-imagick=${pkgs.imagemagick.dev}";
-    buildInputs = [ pkgs.pkgconfig ];
+    nativeBuildInputs = [ pkgs.pkgconfig ];
   };
 
   # No support for PHP 7 yet
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index e160c3d6a475..df27eb0221f9 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1160,6 +1160,28 @@ in modules // {
     };
   };
 
+ asn1ate = buildPythonPackage rec {
+  pname = "asn1ate";
+  date = "20160810";
+  name = "${pname}-unstable-${date}";
+
+  src = pkgs.fetchFromGitHub {
+    sha256 = "04pddr1mh2v9qq8fg60czwvjny5qwh4nyxszr3qc4bipiiv2xk9w";
+    rev = "c56104e8912400135509b584d84423ee05a5af6b";
+    owner = "kimgr";
+    repo = pname;
+  };
+
+  propagatedBuildInputs = with self; [ pyparsing ];
+
+  meta = with stdenv.lib; {
+    description = "Python library for translating ASN.1 into other forms";
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ leenaars ];
+  };
+};
+
   atomiclong = buildPythonPackage rec {
     version = "0.1.1";
     name = "atomiclong-${version}";
@@ -2866,11 +2888,11 @@ in modules // {
 
   boto = buildPythonPackage rec {
     name = "boto-${version}";
-    version = "2.41.0";
+    version = "2.42.0";
 
     src = pkgs.fetchurl {
       url = "https://github.com/boto/boto/archive/${version}.tar.gz";
-      sha256 = "1n33bfbkpijyy6awjq7a8lrw4hw2lmwv5l7j0am6d34gpa8my75l";
+      sha256 = "04ywn8xszk57s87jnkv4j1hswc6ra7z811y9lawfvhvnfshrpx5d";
     };
 
     checkPhase = ''
@@ -5293,16 +5315,16 @@ in modules // {
 
   libtmux = buildPythonPackage rec {
     name = "libtmux-${version}";
-    version = "0.5.0";
+    version = "0.6.0";
 
     src = pkgs.fetchurl {
       url = "mirror://pypi/l/libtmux/${name}.tar.gz";
-      sha256 = "0fwydaahgflz9w753v1cmkfzrlfq1vb8zp4i20m2d3lvkm4crv93";
+      sha256 = "117savw47c2givq9vxr5m02nyxmsk34l2ihxyy5axlaiqyxyf20s";
     };
 
     buildInputs = with self; [ pytest ];
     patchPhase = ''
-      sed -i 's/==2.9.1//' requirements/test.txt
+      sed -i 's/==.*$//' requirements/test.txt
     '';
 
     meta = with stdenv.lib; {
@@ -28806,7 +28828,7 @@ in modules // {
 
     propagatedBuildInputs = with self; [ msgpack ]
       ++ optional (!isPyPy) greenlet
-      ++ optional (!isPy34) trollius;
+      ++ optional (pythonOlder "3.4") trollius;
 
     meta = {
       description = "Python client for Neovim";
@@ -30651,4 +30673,22 @@ in modules // {
     };
   };
 
+  packet-python = buildPythonPackage rec {
+    name = "${pname}-${version}";
+    pname = "packet-python";
+    version = "1.31";
+    src = pkgs.fetchurl {
+      url = "https://pypi.python.org/packages/c3/1b/ea71ec9d6eeab92b783d23dd62e71e9296f9699bc7d457450859803929f0/${name}.tar.gz";
+      sha256 = "1z1zmrajfw01jr3mafimq7dvsb1rs978zln9xfd6fbqkp3vm9hc0";
+    };
+    propagatedBuildInputs = with self; [ requests ];
+
+    meta = {
+      description = "A Python client for the Packet API.";
+      homepage    = "https://github.com/packethost/packet-python";
+      license     = licenses.lgpl3;
+      maintainers = with maintainers; [ dipinhora ];
+      platforms   = platforms.all;
+    };
+  };
 }
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index a8f319bea601..d3fb4e646c3b 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -24,16 +24,13 @@ let
   lib = pkgs.lib;
 
   jobs =
-    rec { tarball = import ./make-tarball.nix { inherit pkgs nixpkgs officialRelease; };
+    { tarball = import ./make-tarball.nix { inherit pkgs nixpkgs officialRelease; };
 
       metrics = import ./metrics.nix { inherit pkgs nixpkgs; };
 
       manual = import ../../doc;
       lib-tests = import ../../lib/tests/release.nix { inherit nixpkgs; };
 
-      # for consistency with NixOS tested job
-      tested = unstable;
-
       unstable = pkgs.releaseTools.aggregate
         { name = "nixpkgs-${jobs.tarball.version}";
           meta.description = "Release-critical builds for the Nixpkgs unstable channel";