about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-08-14 12:02:12 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-08-14 12:02:28 +0200
commit4fbb37c5179915a0daf985c624ab02373111cdcb (patch)
tree9adede5ca986450956a6a23aede277d9dd8837d6
parent4bceaca196cd6be14a584be45510ca85f873ffe7 (diff)
parent329589c7fdfac2a07af70dc8a3a281ddfc10b315 (diff)
downloadnixlib-4fbb37c5179915a0daf985c624ab02373111cdcb.tar
nixlib-4fbb37c5179915a0daf985c624ab02373111cdcb.tar.gz
nixlib-4fbb37c5179915a0daf985c624ab02373111cdcb.tar.bz2
nixlib-4fbb37c5179915a0daf985c624ab02373111cdcb.tar.lz
nixlib-4fbb37c5179915a0daf985c624ab02373111cdcb.tar.xz
nixlib-4fbb37c5179915a0daf985c624ab02373111cdcb.tar.zst
nixlib-4fbb37c5179915a0daf985c624ab02373111cdcb.zip
Merge branch 'master' into staging
Hydra nixpkgs: ?compare=1287298
-rw-r--r--.travis.yml4
-rw-r--r--doc/languages-frameworks/go.xml21
-rw-r--r--doc/languages-frameworks/python.md17
-rw-r--r--lib/licenses.nix6
-rw-r--r--lib/lists.nix2
-rw-r--r--lib/sources.nix2
-rw-r--r--lib/strings.nix19
-rw-r--r--lib/trivial.nix2
-rwxr-xr-xmaintainers/scripts/travis-nox-review-pr.sh9
-rw-r--r--nixos/doc/manual/release-notes/rl-1609.xml7
-rw-r--r--nixos/modules/config/system-path.nix1
-rw-r--r--nixos/modules/i18n/input-method/default.xml2
-rw-r--r--nixos/modules/installer/tools/get-version-suffix (renamed from nixos/modules/installer/tools/get-git-revision)2
-rw-r--r--nixos/modules/installer/tools/nixos-install.sh2
-rw-r--r--nixos/modules/installer/tools/nixos-rebuild.sh11
-rw-r--r--nixos/modules/installer/tools/tools.nix2
-rw-r--r--nixos/modules/misc/version.nix4
-rw-r--r--nixos/modules/module-list.nix6
-rw-r--r--nixos/modules/programs/unity3d.nix25
-rw-r--r--nixos/modules/rename.nix3
-rw-r--r--nixos/modules/security/chromium-suid-sandbox.nix24
-rw-r--r--nixos/modules/services/continuous-integration/gocd-agent/default.nix37
-rw-r--r--nixos/modules/services/databases/cassandra.nix449
-rw-r--r--nixos/modules/services/misc/gitlab.nix2
-rw-r--r--nixos/modules/services/web-servers/nginx/default.nix14
-rw-r--r--nixos/modules/services/web-servers/phpfpm/default.nix (renamed from nixos/modules/services/web-servers/phpfpm.nix)22
-rw-r--r--nixos/modules/services/web-servers/phpfpm/pool-options.nix35
-rw-r--r--nixos/modules/services/x11/hardware/libinput.nix21
-rw-r--r--nixos/modules/system/boot/stage-1-init.sh123
-rw-r--r--nixos/modules/system/boot/stage-1.nix14
-rw-r--r--nixos/release-small.nix1
-rw-r--r--nixos/tests/cassandra.nix68
-rw-r--r--nixos/tests/gocd-agent.nix34
-rw-r--r--nixos/tests/gocd-server.nix6
-rw-r--r--nixos/tests/installer.nix22
-rw-r--r--pkgs/applications/audio/audacious/default.nix98
-rw-r--r--pkgs/applications/audio/i-score/default.nix2
-rw-r--r--pkgs/applications/audio/musescore/default.nix4
-rw-r--r--pkgs/applications/audio/sooperlooper/default.nix16
-rw-r--r--pkgs/applications/audio/spotify/default.nix4
-rw-r--r--pkgs/applications/editors/android-studio/default.nix82
-rw-r--r--pkgs/applications/editors/atom/default.nix4
-rw-r--r--pkgs/applications/editors/idea/default.nix40
-rw-r--r--pkgs/applications/graphics/geeqie/default.nix4
-rw-r--r--pkgs/applications/misc/acbuild/default.nix4
-rw-r--r--pkgs/applications/misc/calibre/default.nix83
-rw-r--r--pkgs/applications/misc/fehlstart/default.nix27
-rw-r--r--pkgs/applications/misc/fehlstart/use-nix-profiles.patch21
-rw-r--r--pkgs/applications/misc/gsimplecal/default.nix2
-rw-r--r--pkgs/applications/misc/hello/default.nix2
-rw-r--r--pkgs/applications/misc/hugo/deps.json357
-rw-r--r--pkgs/applications/misc/mop/deps.json15
-rw-r--r--pkgs/applications/misc/playonlinux/default.nix4
-rw-r--r--pkgs/applications/misc/timewarrior/default.nix4
-rw-r--r--pkgs/applications/misc/wego/deps.json35
-rw-r--r--pkgs/applications/misc/wikicurses/default.nix10
-rw-r--r--pkgs/applications/networking/browsers/chromium/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/firefox/default.nix7
-rw-r--r--pkgs/applications/networking/cluster/terraform/default.nix4
-rw-r--r--pkgs/applications/networking/drive/deps.json186
-rw-r--r--pkgs/applications/networking/ftp/filezilla/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/baresip/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-skypeweb/default.nix15
-rw-r--r--pkgs/applications/networking/instant-messengers/pond/deps.json55
-rw-r--r--pkgs/applications/networking/instant-messengers/teamspeak/client.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/vacuum/default.nix5
-rw-r--r--pkgs/applications/networking/instant-messengers/xmpp-client/deps.json25
-rw-r--r--pkgs/applications/networking/syncthing012/deps.json145
-rw-r--r--pkgs/applications/office/libreoffice/default.nix24
-rwxr-xr-xpkgs/applications/office/libreoffice/generate-libreoffice-srcs.sh4
-rw-r--r--pkgs/applications/office/libreoffice/libreoffice-srcs-still.nix143
-rw-r--r--pkgs/applications/office/libreoffice/libreoffice-srcs.nix87
-rw-r--r--pkgs/applications/office/libreoffice/still.nix16
-rw-r--r--pkgs/applications/science/biology/bcftools/default.nix8
-rw-r--r--pkgs/applications/science/logic/abc/default.nix6
-rw-r--r--pkgs/applications/science/logic/aspino/default.nix5
-rw-r--r--pkgs/applications/science/math/LiE/default.nix4
-rw-r--r--pkgs/applications/science/math/geogebra/default.nix58
-rw-r--r--pkgs/applications/science/math/pari/default.nix4
-rw-r--r--pkgs/applications/science/math/sage/default.nix7
-rw-r--r--pkgs/applications/science/misc/golly/default.nix12
-rw-r--r--pkgs/applications/science/misc/golly/default.upstream2
-rw-r--r--pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix6
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.json25
-rw-r--r--pkgs/applications/version-management/yadm/default.nix34
-rw-r--r--pkgs/applications/virtualization/rkt/default.nix4
-rw-r--r--pkgs/applications/window-managers/compiz/default.nix12
-rw-r--r--pkgs/build-support/fetchurl/mirrors.nix55
-rw-r--r--pkgs/build-support/gcc-cross-wrapper/builder.sh2
-rw-r--r--pkgs/build-support/upstream-updater/update-walker-service-specific.sh2
-rw-r--r--pkgs/build-support/vm/default.nix26
-rw-r--r--pkgs/data/fonts/baekmuk-ttf/default.nix2
-rw-r--r--pkgs/data/fonts/gdouros/default.nix12
-rw-r--r--pkgs/data/misc/tzdata/default.nix6
-rw-r--r--pkgs/desktops/gnome-3/3.20/apps/evolution/src.nix9
-rw-r--r--pkgs/desktops/gnome-3/3.20/apps/gnome-maps/src.nix6
-rw-r--r--pkgs/desktops/gnome-3/3.20/apps/gnome-photos/src.nix6
-rw-r--r--pkgs/desktops/gnome-3/3.20/core/evolution-data-server/src.nix9
-rw-r--r--pkgs/desktops/gnome-3/3.20/core/gnome-calculator/src.nix6
-rw-r--r--pkgs/desktops/gnome-3/3.20/core/gnome-online-accounts/src.nix9
-rw-r--r--pkgs/desktops/gnome-3/3.20/core/gnome-software/src.nix6
-rw-r--r--pkgs/desktops/gnome-3/3.20/core/nautilus/src.nix6
-rw-r--r--pkgs/desktops/gnome-3/3.20/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.20/devtools/nemiver/bool_slot.patch13
-rw-r--r--pkgs/desktops/gnome-3/3.20/devtools/nemiver/default.nix23
-rw-r--r--pkgs/desktops/gnome-3/3.20/devtools/nemiver/safe_ptr.patch10
-rw-r--r--pkgs/desktops/gnome-3/3.20/devtools/nemiver/src.nix11
-rw-r--r--pkgs/desktops/gnome-3/3.20/games/five-or-more/src.nix6
-rw-r--r--pkgs/desktops/kde-5/applications/default.nix1
-rw-r--r--pkgs/desktops/kde-5/applications/kdenlive.nix81
-rw-r--r--pkgs/desktops/kde-5/plasma/default.nix1
-rw-r--r--pkgs/desktops/kde-5/plasma/kwallet-pam.nix11
-rw-r--r--pkgs/development/arduino/arduino-core/default.nix2
-rw-r--r--pkgs/development/compilers/compcert/default.nix4
-rw-r--r--pkgs/development/compilers/gcc/4.9/default.nix3
-rw-r--r--pkgs/development/compilers/gcc/5/default.nix3
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix3
-rw-r--r--pkgs/development/compilers/go/1.6.nix4
-rw-r--r--pkgs/development/compilers/jsonnet/default.nix6
-rw-r--r--pkgs/development/compilers/rust/beta.nix25
-rw-r--r--pkgs/development/compilers/rust/bootstrap.nix20
-rw-r--r--pkgs/development/compilers/rust/cargo.nix19
-rw-r--r--pkgs/development/compilers/rust/default.nix13
-rw-r--r--pkgs/development/compilers/rust/head.nix26
-rw-r--r--pkgs/development/compilers/rust/patches/tcp-stress-test-run-a-smaller-number-of-threads.patch44
-rw-r--r--pkgs/development/compilers/rust/rustc.nix66
-rw-r--r--pkgs/development/compilers/sbcl/default.nix4
-rw-r--r--pkgs/development/go-modules/generic/default.nix9
-rw-r--r--pkgs/development/go-modules/libs.json1820
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix17
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix7
-rw-r--r--pkgs/development/haskell-modules/configuration-hackage2nix.yaml11
-rw-r--r--pkgs/development/interpreters/angelscript/default.nix4
-rw-r--r--pkgs/development/interpreters/lolcode/default.nix9
-rw-r--r--pkgs/development/libraries/SDL_mixer/default.nix12
-rw-r--r--pkgs/development/libraries/alure/default.nix2
-rw-r--r--pkgs/development/libraries/appstream-glib/default.nix4
-rw-r--r--pkgs/development/libraries/botan/default.nix4
-rw-r--r--pkgs/development/libraries/botan/unstable.nix4
-rw-r--r--pkgs/development/libraries/ffmpeg/3.1.nix7
-rw-r--r--pkgs/development/libraries/ffmpeg/generic.nix4
-rw-r--r--pkgs/development/libraries/gdbm/default.nix2
-rw-r--r--pkgs/development/libraries/gdcm/default.nix4
-rw-r--r--pkgs/development/libraries/gegl/3.0.nix4
-rw-r--r--pkgs/development/libraries/git2/default.nix14
-rw-r--r--pkgs/development/libraries/git2/disable-security.framework.patch58
-rw-r--r--pkgs/development/libraries/globalplatform/default.nix20
-rw-r--r--pkgs/development/libraries/globalplatform/gppcscconnectionplugin.nix20
-rw-r--r--pkgs/development/libraries/libatomic_ops/default.nix8
-rw-r--r--pkgs/development/libraries/libircclient/default.nix31
-rw-r--r--pkgs/development/libraries/libmikmod/default.nix14
-rw-r--r--pkgs/development/libraries/libmwaw/default.nix8
-rw-r--r--pkgs/development/libraries/libraw/default.nix4
-rw-r--r--pkgs/development/libraries/libre/default.nix4
-rw-r--r--pkgs/development/libraries/libsamplerate/default.nix23
-rw-r--r--pkgs/development/libraries/libshout/default.nix5
-rw-r--r--pkgs/development/libraries/libsidplayfp/default.nix39
-rw-r--r--pkgs/development/libraries/mdds/0.12.1.nix17
-rw-r--r--pkgs/development/libraries/mdds/default.nix6
-rw-r--r--pkgs/development/libraries/mdds/default.upstream4
-rw-r--r--pkgs/development/libraries/mlt/qt-5.nix4
-rw-r--r--pkgs/development/libraries/nlohmann_json/default.nix25
-rw-r--r--pkgs/development/libraries/nss/default.nix6
-rw-r--r--pkgs/development/libraries/pcl/default.nix13
-rw-r--r--pkgs/development/libraries/protobuf/3.0.0-beta-2.nix43
-rw-r--r--pkgs/development/libraries/protobuf/generic.nix3
-rw-r--r--pkgs/development/libraries/ptlib/default.nix10
-rw-r--r--pkgs/development/libraries/ptlib/sslv3.patch16
-rw-r--r--pkgs/development/libraries/qt-5/5.5/default.nix2
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qttools/cmake-paths.patch72
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qttools/default.nix (renamed from pkgs/development/libraries/qt-5/5.5/qttools.nix)3
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qttools/series1
-rw-r--r--pkgs/development/libraries/qt-5/5.6/default.nix2
-rw-r--r--pkgs/development/libraries/qt-5/5.6/qttools.nix10
-rw-r--r--pkgs/development/libraries/qt-5/5.6/qttools/cmake-paths.patch72
-rw-r--r--pkgs/development/libraries/qt-5/5.6/qttools/default.nix11
-rw-r--r--pkgs/development/libraries/qt-5/5.6/qttools/series1
-rw-r--r--pkgs/development/libraries/qt-5/5.7/default.nix2
-rw-r--r--pkgs/development/libraries/qt-5/5.7/qttools.nix10
-rw-r--r--pkgs/development/libraries/qt-5/5.7/qttools/cmake-paths.patch72
-rw-r--r--pkgs/development/libraries/qt-5/5.7/qttools/default.nix11
-rw-r--r--pkgs/development/libraries/qt-5/5.7/qttools/series1
-rw-r--r--pkgs/development/libraries/vtk/default.nix15
-rw-r--r--pkgs/development/libraries/wolfssl/default.nix4
-rw-r--r--pkgs/development/python-modules/pyqt/4.x.nix4
-rw-r--r--pkgs/development/python-modules/pyqt/5.x.nix4
-rw-r--r--pkgs/development/tools/analysis/flow/default.nix8
-rw-r--r--pkgs/development/tools/continuous-integration/gocd-agent/default.nix8
-rw-r--r--pkgs/development/tools/continuous-integration/gocd-server/default.nix6
-rw-r--r--pkgs/development/tools/deis/deps.json31
-rw-r--r--pkgs/development/tools/go2nix/deps.json25
-rw-r--r--pkgs/development/tools/golint/deps.json15
-rw-r--r--pkgs/development/tools/gotools/deps.json15
-rw-r--r--pkgs/development/tools/gox/deps.json15
-rw-r--r--pkgs/development/tools/misc/gpshell/default.nix20
-rw-r--r--pkgs/development/tools/misc/hydra/default.nix2
-rw-r--r--pkgs/development/tools/pypi2nix/default.nix2
-rw-r--r--pkgs/development/tools/remarshal/deps.json25
-rw-r--r--pkgs/development/tools/textql/deps.json15
-rw-r--r--pkgs/development/tools/unity3d/default.nix8
-rw-r--r--pkgs/development/tools/vagrant/default.nix21
-rw-r--r--pkgs/development/web/minify/deps.json81
-rw-r--r--pkgs/development/web/nodejs/nodejs.nix4
-rw-r--r--pkgs/games/gambatte/default.nix2
-rw-r--r--pkgs/games/gambatte/fix-scons-paths.patch15
-rw-r--r--pkgs/games/openttd/default.nix6
-rw-r--r--pkgs/games/pokerth/default.nix41
-rw-r--r--pkgs/games/vessel/default.nix2
-rw-r--r--pkgs/games/xboard/default.nix8
-rw-r--r--pkgs/os-specific/linux/eudev/default.nix4
-rw-r--r--pkgs/os-specific/linux/firejail/default.nix8
-rw-r--r--pkgs/os-specific/linux/hwdata/default.nix9
-rw-r--r--pkgs/os-specific/linux/iputils/default.nix10
-rw-r--r--pkgs/os-specific/linux/jool/source.nix6
-rw-r--r--pkgs/os-specific/linux/kernel/ecryptfs-fix-mmap-bug.patch20
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.4.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-mptcp.nix10
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix8
-rw-r--r--pkgs/os-specific/linux/kernel/qat_common_Makefile.patch10
-rw-r--r--pkgs/os-specific/linux/microcode/intel.nix6
-rw-r--r--pkgs/os-specific/linux/systemd/cryptsetup-generator.nix7
-rw-r--r--pkgs/os-specific/linux/uclibc/default.nix1
-rw-r--r--pkgs/os-specific/linux/uksmtools/default.nix27
-rw-r--r--pkgs/os-specific/linux/wireguard/default.nix3
-rw-r--r--pkgs/servers/amqp/rabbitmq-server/default.nix2
-rw-r--r--pkgs/servers/caddy/deps.json165
-rw-r--r--pkgs/servers/dico/default.nix8
-rw-r--r--pkgs/servers/emby/default.nix4
-rw-r--r--pkgs/servers/etcd/deps.json25
-rw-r--r--pkgs/servers/gotty/deps.json85
-rw-r--r--pkgs/servers/http/nginx/mainline.nix4
-rw-r--r--pkgs/servers/interlock/deps.json75
-rw-r--r--pkgs/servers/matrix-synapse/default.nix5
-rw-r--r--pkgs/servers/mesos-dns/deps.json115
-rw-r--r--pkgs/servers/monitoring/prometheus/cli_deps.json15
-rw-r--r--pkgs/servers/monitoring/prometheus/collectd-exporter_deps.json75
-rw-r--r--pkgs/servers/monitoring/prometheus/haproxy-exporter_deps.json75
-rw-r--r--pkgs/servers/monitoring/prometheus/mesos-exporter_deps.json95
-rw-r--r--pkgs/servers/monitoring/prometheus/mysqld-exporter_deps.json85
-rw-r--r--pkgs/servers/monitoring/prometheus/nginx-exporter_deps.json95
-rw-r--r--pkgs/servers/monitoring/prometheus/prom2json_deps.json45
-rw-r--r--pkgs/servers/monitoring/prometheus/pushgateway_deps.json85
-rw-r--r--pkgs/servers/monitoring/prometheus/statsd-bridge_deps.json85
-rw-r--r--pkgs/servers/nosql/cassandra/1.2.nix52
-rw-r--r--pkgs/servers/nosql/cassandra/2.0.nix52
-rw-r--r--pkgs/servers/nosql/cassandra/2.1.nix52
-rw-r--r--pkgs/servers/nosql/cassandra/3.0.nix49
-rw-r--r--pkgs/servers/nosql/cassandra/generic.nix49
-rw-r--r--pkgs/servers/nsq/deps.json95
-rw-r--r--pkgs/servers/oauth2_proxy/deps.json95
-rw-r--r--pkgs/servers/serf/deps.json156
-rw-r--r--pkgs/servers/skydns/deps.json145
-rw-r--r--pkgs/servers/sql/mariadb/default.nix3
-rw-r--r--pkgs/servers/sql/mariadb/my_context_asm.patch18
-rw-r--r--pkgs/servers/uftp/default.nix35
-rw-r--r--pkgs/shells/elvish/deps.json25
-rw-r--r--pkgs/shells/oh/deps.json35
-rw-r--r--pkgs/tools/X11/go-sct/deps.json15
-rw-r--r--pkgs/tools/admin/lxd/deps.json195
-rw-r--r--pkgs/tools/filesystems/ceph/default.nix11
-rw-r--r--pkgs/tools/filesystems/glusterfs/default.nix8
-rw-r--r--pkgs/tools/filesystems/go-mtpfs/deps.json31
-rw-r--r--pkgs/tools/filesystems/gpart/default.nix2
-rw-r--r--pkgs/tools/filesystems/grive/default.nix2
-rw-r--r--pkgs/tools/filesystems/xfsprogs/4.3.0-sharedlibs.patch (renamed from pkgs/tools/filesystems/xfsprogs/4.2.0-sharedlibs.patch)35
-rw-r--r--pkgs/tools/filesystems/xfsprogs/default.nix9
-rw-r--r--pkgs/tools/filesystems/xtreemfs/default.nix3
-rw-r--r--pkgs/tools/graphics/gmic/default.nix4
-rw-r--r--pkgs/tools/inputmethods/fcitx-engines/fcitx-unikey/default.nix31
-rw-r--r--pkgs/tools/misc/fasd/default.nix24
-rw-r--r--pkgs/tools/misc/gawp/deps.json31
-rw-r--r--pkgs/tools/misc/i3cat/deps.json15
-rw-r--r--pkgs/tools/misc/ised/default.nix4
-rw-r--r--pkgs/tools/misc/kronometer/default.nix28
-rw-r--r--pkgs/tools/misc/mongodb-tools/deps.json55
-rw-r--r--pkgs/tools/misc/upower-notify/deps.json15
-rw-r--r--pkgs/tools/misc/xfstests/default.nix8
-rw-r--r--pkgs/tools/networking/dibbler/default.nix23
-rw-r--r--pkgs/tools/networking/email/default.nix7
-rw-r--r--pkgs/tools/networking/getmail/default.nix4
-rw-r--r--pkgs/tools/networking/ngrok/deps.json116
-rw-r--r--pkgs/tools/networking/offlineimap/default.nix4
-rw-r--r--pkgs/tools/networking/openssh/CVE-2015-8325.patch28
-rw-r--r--pkgs/tools/networking/openssh/default.nix6
-rw-r--r--pkgs/tools/networking/s3gof3r/deps.json15
-rw-r--r--pkgs/tools/networking/tlsdate/default.nix30
-rw-r--r--pkgs/tools/package-management/nox/default.nix4
-rw-r--r--pkgs/tools/package-management/opkg/default.nix4
-rw-r--r--pkgs/tools/package-management/packagekit/default.nix20
-rw-r--r--pkgs/tools/security/hologram/deps.json116
-rw-r--r--pkgs/tools/security/nmap/default.nix6
-rw-r--r--pkgs/tools/security/shc/default.nix21
-rw-r--r--pkgs/tools/security/thc-hydra/default.nix34
-rw-r--r--pkgs/tools/system/confd/deps.json85
-rw-r--r--pkgs/tools/system/datefudge/default.nix40
-rw-r--r--pkgs/tools/system/freeipmi/default.nix4
-rw-r--r--pkgs/tools/system/wsmancli/default.nix12
-rw-r--r--pkgs/tools/text/par/default.nix36
-rw-r--r--pkgs/tools/text/platinum-searcher/deps.json95
-rw-r--r--pkgs/tools/text/reckon/Gemfile2
-rw-r--r--pkgs/tools/text/reckon/Gemfile.lock21
-rw-r--r--pkgs/tools/text/reckon/default.nix30
-rw-r--r--pkgs/tools/text/reckon/gemset.nix42
-rw-r--r--pkgs/tools/text/sift/deps.json35
-rw-r--r--pkgs/tools/typesetting/hevea/default.nix4
-rw-r--r--pkgs/tools/typesetting/tex/texlive-new/bin.nix2
-rw-r--r--pkgs/tools/video/atomicparsley/default.nix12
-rwxr-xr-xpkgs/tools/virtualization/nixos-container/nixos-container.pl2
-rw-r--r--pkgs/top-level/all-packages.nix93
-rw-r--r--pkgs/top-level/node-packages-generated.nix27
-rw-r--r--pkgs/top-level/node-packages.json1
-rw-r--r--pkgs/top-level/perl-packages.nix15
-rw-r--r--pkgs/top-level/python-packages.nix386
-rw-r--r--pkgs/top-level/rust-packages.nix6
314 files changed, 6648 insertions, 3713 deletions
diff --git a/.travis.yml b/.travis.yml
index 77881dbc492c..e1cc9890df25 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,10 +11,10 @@ matrix:
           dist: trusty
           before_script:
               - sudo mount -o remount,exec,size=2G,mode=755 /run/user
-          script: ./maintainers/scripts/travis-nox-review-pr.sh pr
+          script: ./maintainers/scripts/travis-nox-review-pr.sh nox pr
         - os: osx
           osx_image: xcode7.3
-          script: ./maintainers/scripts/travis-nox-review-pr.sh pr
+          script: ./maintainers/scripts/travis-nox-review-pr.sh nox pr
 git:
     depth: 1
 env:
diff --git a/doc/languages-frameworks/go.xml b/doc/languages-frameworks/go.xml
index 7365f5abe681..e56d7dd389d9 100644
--- a/doc/languages-frameworks/go.xml
+++ b/doc/languages-frameworks/go.xml
@@ -86,13 +86,6 @@ the following arguments are of special significance to the function:
           "rev": "a83829b6f1293c91addabc89d0571c246397bbf4",
           "sha256": "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh"
         }
-    },
-    {
-    "include": "../../libs.json", <co xml:id='ex-goDeps-4' />
-    "packages": [ <co xml:id='ex-goDeps-5' />
-            "github.com/docopt/docopt-go",
-            "golang.org/x/crypto",
-        ]
     }
 ]
 </programlisting>
@@ -122,20 +115,6 @@ the following arguments are of special significance to the function:
     </para>
   </callout>
 
-  <callout arearefs='ex-goDeps-4'>
-    <para>
-      <varname>include</varname> could be used to reuse <varname>goDeps</varname> between Go programs.
-      There is a common libs set in <varname>&lt;nixpkgs/pkgs/development/go-modules/libs.json&gt;</varname>
-      with pinned versions of many packages that you can reuse.
-    </para>
-  </callout>
-
-  <callout arearefs='ex-goDeps-5'>
-    <para>
-      <varname>packages</varname> enumerates all Go packages that will be imported from included file.
-    </para>
-  </callout>
-
 </calloutlist>
 
 </para>
diff --git a/doc/languages-frameworks/python.md b/doc/languages-frameworks/python.md
index 6f5054c177b6..bb1094e2b741 100644
--- a/doc/languages-frameworks/python.md
+++ b/doc/languages-frameworks/python.md
@@ -748,6 +748,23 @@ in newpkgs.python35.withPackages (ps: [ps.blaze])
 ```
 The requested package `blaze` depends upon `pandas` which itself depends on `scipy`.
 
+### `python setup.py bdist_wheel` cannot create .whl
+
+Executing `python setup.py bdist_wheel` fails with
+```
+ValueError: ZIP does not support timestamps before 1980
+```
+This is because files are included that depend on items in the Nix store which have a timestamp of, that is, it corresponds to January the 1st, 1970 at 00:00:00. And as the error informs you, ZIP does not support that.
+Fortunately `bdist_wheel` takes into account `SOURCE_DATE_EPOCH`. On Nix this value is set to 1. By setting it to a value correspond to 1980 or later it is possible to build wheels.
+
+Use 1980 as timestamp:
+```
+SOURCE_DATE_EPOCH=315532800 python3 setup.py bdist_wheel
+```
+or the current time:
+```
+SOURCE_DATE_EPOCH=$(date +%s) python3 setup.py bdist_wheel
+```
 
 ### `install_data` / `data_files` problems
 
diff --git a/lib/licenses.nix b/lib/licenses.nix
index 4071fcfd70d2..c91b0c21a061 100644
--- a/lib/licenses.nix
+++ b/lib/licenses.nix
@@ -200,6 +200,12 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
     url = https://geant4.web.cern.ch/geant4/license/LICENSE.html;
   };
 
+  geogebra = {
+    fullName = "GeoGebra Non-Commercial License Agreement";
+    url = https://www.geogebra.org/license;
+    free = false;
+  };
+
   gpl1 = spdx {
     spdxId = "GPL-1.0";
     fullName = "GNU General Public License v1.0 only";
diff --git a/lib/lists.nix b/lib/lists.nix
index 6712e5cc93f8..78ffa753ac33 100644
--- a/lib/lists.nix
+++ b/lib/lists.nix
@@ -89,7 +89,7 @@ rec {
   */
   flatten = x:
     if isList x
-    then foldl' (x: y: x ++ (flatten y)) [] x
+    then concatMap (y: flatten y) x
     else [x];
 
   /* Remove elements equal to 'e' from a list.  Useful for buildInputs.
diff --git a/lib/sources.nix b/lib/sources.nix
index 49dcd6d3dd2a..156afaae5c98 100644
--- a/lib/sources.nix
+++ b/lib/sources.nix
@@ -58,7 +58,7 @@ rec {
            else if lib.pathExists packedRefsName
            then
              let fileContent = readFile packedRefsName;
-                 matchRef    = match ".*\n([^\n ]*) " + file + "\n.*" fileContent;
+                 matchRef    = match (".*\n([^\n ]*) " + file + "\n.*") fileContent;
              in if   isNull matchRef
                 then throw ("Could not find " + file + " in " + packedRefsName)
                 else lib.head matchRef
diff --git a/lib/strings.nix b/lib/strings.nix
index daf845839343..86af4d438344 100644
--- a/lib/strings.nix
+++ b/lib/strings.nix
@@ -156,12 +156,12 @@ rec {
        hasSuffix "foo" "barfoo"
        => true
   */
-  hasSuffix = suff: str:
+  hasSuffix = suffix: content:
     let
-      lenStr = stringLength str;
-      lenSuff = stringLength suff;
-    in lenStr >= lenSuff &&
-       substring (lenStr - lenSuff) lenStr str == suff;
+      lenContent = stringLength content;
+      lenSuffix = stringLength suffix;
+    in lenContent >= lenSuffix &&
+       substring (lenContent - lenSuffix) lenContent content == suffix;
 
   /* Convert a string to a list of characters (i.e. singleton strings).
      This allows you to, e.g., map a function over each character.  However,
@@ -248,7 +248,7 @@ rec {
   /* Converts an ASCII string to upper-case.
 
      Example:
-       toLower "home"
+       toUpper "home"
        => "HOME"
   */
   toUpper = replaceChars lowerChars upperChars;
@@ -372,7 +372,12 @@ rec {
        getVersion pkgs.youtube-dl
        => "2016.01.01"
   */
-  getVersion = x: (builtins.parseDrvName (x.name or x)).version;
+  getVersion = x:
+   let
+     parse = drv: (builtins.parseDrvName drv).version;
+   in if isString x
+      then parse x
+      else x.version or (parse x.name);
 
   /* Extract name with version from URL. Ask for separator which is
      supposed to start extension.
diff --git a/lib/trivial.nix b/lib/trivial.nix
index f85c74ab88e3..21642ca0bdc1 100644
--- a/lib/trivial.nix
+++ b/lib/trivial.nix
@@ -71,7 +71,7 @@ rec {
     + (if pathExists suffixFile then fileContents suffixFile else "pre-git");
 
   # Whether we're being called by nix-shell.
-  inNixShell = builtins.getEnv "IN_NIX_SHELL" == "1";
+  inNixShell = builtins.getEnv "IN_NIX_SHELL" != "";
 
   # Return minimum/maximum of two numbers.
   min = x: y: if x < y then x else y;
diff --git a/maintainers/scripts/travis-nox-review-pr.sh b/maintainers/scripts/travis-nox-review-pr.sh
index 13df5087fad5..8ff2258162fb 100755
--- a/maintainers/scripts/travis-nox-review-pr.sh
+++ b/maintainers/scripts/travis-nox-review-pr.sh
@@ -44,6 +44,13 @@ while test -n "$1"; do
             nix-shell --packages nixpkgs-lint --run "nixpkgs-lint -f $TRAVIS_BUILD_DIR"
             ;;
 
+        nox)
+            echo "=== Fetching Nox from binary cache"
+
+            # build nox silently so it's not in the log
+            nix-build "<nixpkgs>" -A nox
+            ;;
+
         pr)
             if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
                 echo "=== No pull request found"
@@ -55,7 +62,7 @@ while test -n "$1"; do
                     token="--token $GITHUB_TOKEN"
                 fi
 
-                nix-shell --packages nox git --run "nox-review pr --slug $TRAVIS_REPO_SLUG $token $TRAVIS_PULL_REQUEST"
+                nix-shell --packages nox --run "nox-review pr --slug $TRAVIS_REPO_SLUG $token $TRAVIS_PULL_REQUEST"
             fi
             ;;
 
diff --git a/nixos/doc/manual/release-notes/rl-1609.xml b/nixos/doc/manual/release-notes/rl-1609.xml
index 7a85d5cd5cbc..8dd4e1a9f642 100644
--- a/nixos/doc/manual/release-notes/rl-1609.xml
+++ b/nixos/doc/manual/release-notes/rl-1609.xml
@@ -51,6 +51,13 @@ following incompatible changes:</para>
       gitlab-run and gitlab-rake scripts because gitlab-runner is a component of Gitlab CI.</para>
   </listitem>
 
+  <listitem>
+    <para><literal>services.xserver.libinput.accelProfile</literal> default
+    changed from <literal>flat</literal> to <literal>adaptive</literal>,
+    as per <link xlink:href="https://wayland.freedesktop.org/libinput/doc/latest/group__config.html#gad63796972347f318b180e322e35cee79">
+    official documentation</link>.</para>
+  </listitem>
+
 </itemizedlist>
 
 
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix
index 3054439da655..9708b5d9fe33 100644
--- a/nixos/modules/config/system-path.nix
+++ b/nixos/modules/config/system-path.nix
@@ -34,7 +34,6 @@ let
       config.programs.ssh.package
       pkgs.perl
       pkgs.procps
-      pkgs.rsync
       pkgs.strace
       pkgs.su
       pkgs.time
diff --git a/nixos/modules/i18n/input-method/default.xml b/nixos/modules/i18n/input-method/default.xml
index c55ac1ec2456..a32ed100df30 100644
--- a/nixos/modules/i18n/input-method/default.xml
+++ b/nixos/modules/i18n/input-method/default.xml
@@ -88,6 +88,8 @@ i18n.inputMethod = {
       methods among Traditional Chinese Unix users.</para></listitem>
   <listitem><para>Hangul (<literal>fcitx-engines.hangul</literal>): Korean input 
       method.</para></listitem>
+  <listitem><para>Unikey (<literal>fcitx-engines.unikey</literal>): Vietnamese input 
+      method.</para></listitem>
   <listitem><para>m17n (<literal>fcitx-engines.m17n</literal>): m17n is an input 
       method that uses input methods and corresponding icons in the m17n 
       database.</para></listitem>
diff --git a/nixos/modules/installer/tools/get-git-revision b/nixos/modules/installer/tools/get-version-suffix
index b57d9cf9fa08..b8972cd57d22 100644
--- a/nixos/modules/installer/tools/get-git-revision
+++ b/nixos/modules/installer/tools/get-version-suffix
@@ -17,6 +17,6 @@ getVersion() {
 if nixpkgs=$(nix-instantiate --find-file nixpkgs "$@"); then
     getVersion $nixpkgs
     if [ -n "$rev" ]; then
-        echo "$rev"
+        echo ".git.$rev"
     fi
 fi
diff --git a/nixos/modules/installer/tools/nixos-install.sh b/nixos/modules/installer/tools/nixos-install.sh
index ae9f3a892950..0247925f4144 100644
--- a/nixos/modules/installer/tools/nixos-install.sh
+++ b/nixos/modules/installer/tools/nixos-install.sh
@@ -175,7 +175,7 @@ if ! NIX_DB_DIR=$mountPoint/nix/var/nix/db nix-store --check-validity @nix@ 2> /
     for i in $(@perl@/bin/perl @pathsFromGraph@ @nixClosure@); do
         echo "  $i"
         chattr -R -i $mountPoint/$i 2> /dev/null || true # clear immutable bit
-        rsync -a $i $mountPoint/nix/store/
+        @rsync@/bin/rsync -a $i $mountPoint/nix/store/
     done
 
     # Register the paths in the Nix closure as valid.  This is necessary
diff --git a/nixos/modules/installer/tools/nixos-rebuild.sh b/nixos/modules/installer/tools/nixos-rebuild.sh
index 80a4537375c4..e26a9f6cf635 100644
--- a/nixos/modules/installer/tools/nixos-rebuild.sh
+++ b/nixos/modules/installer/tools/nixos-rebuild.sh
@@ -214,9 +214,9 @@ fi
 
 # Re-execute nixos-rebuild from the Nixpkgs tree.
 if [ -z "$_NIXOS_REBUILD_REEXEC" -a -n "$canRun" ]; then
-    if p=$(nix-instantiate --find-file nixpkgs/nixos/modules/installer/tools/nixos-rebuild.sh "${extraBuildFlags[@]}"); then
+    if p=$(nix-build --no-out-link --expr 'with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild' "${extraBuildFlags[@]}"); then
         export _NIXOS_REBUILD_REEXEC=1
-        exec $SHELL -e $p "${origArgs[@]}"
+        exec $p/bin/nixos-rebuild "${origArgs[@]}"
         exit 1
     fi
 fi
@@ -311,10 +311,9 @@ fi
 # nixos-version shows something useful).
 if [ -n "$canRun" ]; then
     if nixpkgs=$(nix-instantiate --find-file nixpkgs "${extraBuildFlags[@]}"); then
-        revision=$($SHELL $nixpkgs/nixos/modules/installer/tools/get-git-revision "${extraBuildFlags[@]}" || true)
-        if [ -n "$revision" ]; then
-            echo -n ".git.$revision" > "$nixpkgs/.version-suffix" || true
-            echo -n "$revision"  > "$nixpkgs/.git-revision" || true
+        suffix=$($SHELL $nixpkgs/nixos/modules/installer/tools/get-version-suffix "${extraBuildFlags[@]}" || true)
+        if [ -n "$suffix" ]; then
+            echo -n "$suffix" > "$nixpkgs/.version-suffix" || true
         fi
     fi
 fi
diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix
index d8622b510522..a55c03bd9528 100644
--- a/nixos/modules/installer/tools/tools.nix
+++ b/nixos/modules/installer/tools/tools.nix
@@ -21,7 +21,7 @@ let
     name = "nixos-install";
     src = ./nixos-install.sh;
 
-    inherit (pkgs) perl pathsFromGraph;
+    inherit (pkgs) perl pathsFromGraph rsync;
     nix = config.nix.package.out;
     cacert = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
 
diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix
index 6af310a9d877..2ecdbdbf3925 100644
--- a/nixos/modules/misc/version.nix
+++ b/nixos/modules/misc/version.nix
@@ -63,7 +63,9 @@ in
     nixosRevision = mkOption {
       internal = true;
       type = types.str;
-      default = if pathExists revisionFile then fileContents revisionFile else "master";
+      default = if pathIsDirectory gitRepo then commitIdFromGitRepo gitRepo
+                else if pathExists revisionFile then fileContents revisionFile
+                else "master";
       description = "The Git revision from which this NixOS configuration was built.";
     };
 
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 03a191c72321..f5747428825c 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -62,8 +62,7 @@
   ./programs/bash/bash.nix
   ./programs/blcr.nix
   ./programs/cdemu.nix
-  # see https://github.com/NixOS/nixos-channel-scripts/issues/4
-  #./programs/command-not-found/command-not-found.nix
+  ./programs/command-not-found/command-not-found.nix
   ./programs/dconf.nix
   ./programs/environment.nix
   ./programs/freetds.nix
@@ -80,7 +79,6 @@
   ./programs/ssh.nix
   ./programs/ssmtp.nix
   ./programs/tmux.nix
-  ./programs/unity3d.nix
   ./programs/venus.nix
   ./programs/wvdial.nix
   ./programs/xfs_quota.nix
@@ -476,7 +474,7 @@
   ./services/web-servers/lighttpd/gitweb.nix
   ./services/web-servers/lighttpd/inginious.nix
   ./services/web-servers/nginx/default.nix
-  ./services/web-servers/phpfpm.nix
+  ./services/web-servers/phpfpm/default.nix
   ./services/web-servers/shellinabox.nix
   ./services/web-servers/tomcat.nix
   ./services/web-servers/uwsgi.nix
diff --git a/nixos/modules/programs/unity3d.nix b/nixos/modules/programs/unity3d.nix
deleted file mode 100644
index 3c0ea26d9d56..000000000000
--- a/nixos/modules/programs/unity3d.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let cfg = config.programs.unity3d;
-in {
-
-  options = {
-    programs.unity3d.enable = mkEnableOption "Unity3D, a game development tool";
-  };
-
-  config = mkIf cfg.enable {
-    security.setuidOwners = [{
-      program = "unity-chrome-sandbox";
-      source = "${pkgs.unity3d.sandbox}/bin/unity-chrome-sandbox";
-      owner = "root";
-      #group = "root";
-      setuid = true;
-      #setgid = true;
-    }];
-
-    environment.systemPackages = [ pkgs.unity3d ];
-  };
-
-}
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 634f91a275d3..3f8a770cbce7 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -134,6 +134,9 @@ with lib;
     (mkRemovedOptionModule [ "security" "grsecurity" "config" "verboseVersion" ])
     (mkRemovedOptionModule [ "security" "grsecurity" "config" "kernelExtraConfig" ])
 
+    # Unity3D
+    (mkRenamedOptionModule [ "programs" "unity3d" "enable" ] [ "security" "chromiumSuidSandbox" "enable" ])
+
     # Options that are obsolete and have no replacement.
     (mkRemovedOptionModule [ "boot" "initrd" "luks" "enable" ])
     (mkRemovedOptionModule [ "programs" "bash" "enable" ])
diff --git a/nixos/modules/security/chromium-suid-sandbox.nix b/nixos/modules/security/chromium-suid-sandbox.nix
index b517e879f04e..88fbe518c2de 100644
--- a/nixos/modules/security/chromium-suid-sandbox.nix
+++ b/nixos/modules/security/chromium-suid-sandbox.nix
@@ -7,19 +7,23 @@ let
   sandbox = pkgs.chromium.sandbox;
 in
 {
-  options.security.chromiumSuidSandbox.enable = mkEnableOption ''
-    Whether to install the Chromium SUID sandbox which is an executable that
-    Chromium may use in order to achieve sandboxing.
+  options.security.chromiumSuidSandbox.enable = mkOption {
+    type = types.bool;
+    default = false;
+    description = ''
+      Whether to install the Chromium SUID sandbox which is an executable that
+      Chromium may use in order to achieve sandboxing.
 
-    If you get the error "The SUID sandbox helper binary was found, but is not
-    configured correctly.", turning this on might help.
+      If you get the error "The SUID sandbox helper binary was found, but is not
+      configured correctly.", turning this on might help.
 
-    Also, if the URL chrome://sandbox tells you that "You are not adequately
-    sandboxed!", turning this on might resolve the issue.
+      Also, if the URL chrome://sandbox tells you that "You are not adequately
+      sandboxed!", turning this on might resolve the issue.
 
-    Finally, if you have <option>security.grsecurity</option> enabled and you
-    use Chromium, you probably need this.
-  '';
+      Finally, if you have <option>security.grsecurity</option> enabled and you
+      use Chromium, you probably need this.
+    '';
+  };
 
   config = mkIf cfg.enable {
     environment.systemPackages = [ sandbox ];
diff --git a/nixos/modules/services/continuous-integration/gocd-agent/default.nix b/nixos/modules/services/continuous-integration/gocd-agent/default.nix
index 36f6527ee47b..21f319f7fcf6 100644
--- a/nixos/modules/services/continuous-integration/gocd-agent/default.nix
+++ b/nixos/modules/services/continuous-integration/gocd-agent/default.nix
@@ -36,7 +36,7 @@ in {
       };
 
       packages = mkOption {
-        default = [ pkgs.stdenv pkgs.jre config.programs.ssh.package pkgs.nix ];
+        default = [ pkgs.stdenv pkgs.jre pkgs.git config.programs.ssh.package pkgs.nix ];
         type = types.listOf types.package;
         description = ''
           Packages to add to PATH for the Go.CD agent process.
@@ -57,18 +57,10 @@ in {
       };
 
       goServer = mkOption {
-        default = "127.0.0.1";
+        default = "https://127.0.0.1:8154/go";
         type = types.str;
         description = ''
-          Address of GoCD Server to attach the Go.CD Agent to.
-        '';
-      };
-
-      goServerPort = mkOption {
-        default = 8153;
-        type = types.int;
-        description = ''
-          Port that Go.CD Server is Listening on.
+          URL of the GoCD Server to attach the Go.CD Agent to.
         '';
       };
 
@@ -80,26 +72,26 @@ in {
         '';
       };
 
-      heapSize = mkOption {
+      initialJavaHeapSize = mkOption {
         default = "128m";
         type = types.str;
         description = ''
-          Specifies the java heap memory size for the Go.CD agent java process.
+          Specifies the initial java heap memory size for the Go.CD agent java process.
         '';
       };
 
-      maxMemory = mkOption {
+      maxJavaHeapMemory = mkOption {
         default = "256m";
         type = types.str;
         description = ''
-          Specifies the java maximum memory size for the Go.CD agent java process.
+          Specifies the java maximum heap memory size for the Go.CD agent java process.
         '';
       };
 
       startupOptions = mkOption {
         default = [
-          "-Xms${cfg.heapSize}"
-          "-Xmx${cfg.maxMemory}"
+          "-Xms${cfg.initialJavaHeapSize}"
+          "-Xmx${cfg.maxJavaHeapMemory}"
           "-Djava.io.tmpdir=/tmp"
           "-Dcruise.console.publish.interval=10"
           "-Djava.security.egd=file:/dev/./urandom"
@@ -112,8 +104,8 @@ in {
 
       extraOptions = mkOption {
         default = [ ];
-        example = [ 
-          "-X debug" 
+        example = [
+          "-X debug"
           "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006"
           "-verbose:gc"
           "-Xloggc:go-agent-gc.log"
@@ -170,7 +162,7 @@ in {
               config.environment.sessionVariables;
         in
           selectedSessionVars //
-            { 
+            {
               NIX_REMOTE = "daemon";
               AGENT_WORK_DIR = cfg.workDir;
               AGENT_STARTUP_ARGS = ''${concatStringsSep " "  cfg.startupOptions}'';
@@ -199,13 +191,14 @@ in {
         ${pkgs.jre}/bin/java ${concatStringsSep " " cfg.startupOptions} \
                         ${concatStringsSep " " cfg.extraOptions} \
                               -jar ${pkgs.gocd-agent}/go-agent/agent-bootstrapper.jar \
-                              ${cfg.goServer} \
-                              ${toString cfg.goServerPort}
+                              -serverUrl ${cfg.goServer}
       '';
 
       serviceConfig = {
         User = cfg.user;
         WorkingDirectory = cfg.workDir;
+        RestartSec = 30;
+        Restart = "on-failure";
       };
     };
   };
diff --git a/nixos/modules/services/databases/cassandra.nix b/nixos/modules/services/databases/cassandra.nix
new file mode 100644
index 000000000000..c98af617587d
--- /dev/null
+++ b/nixos/modules/services/databases/cassandra.nix
@@ -0,0 +1,449 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.services.cassandra;
+  cassandraPackage = cfg.package.override {
+    jre = cfg.jre;
+  };
+  cassandraUser = {
+    name = cfg.user;
+    home = "/var/lib/cassandra";
+    description = "Cassandra role user";
+  };
+
+  cassandraRackDcProperties = ''
+    dc=${cfg.dc}
+    rack=${cfg.rack}
+  '';
+
+  cassandraConf = ''
+    cluster_name: ${cfg.clusterName}
+    num_tokens: 256
+    auto_bootstrap: ${if cfg.autoBootstrap then "true" else "false"}
+    hinted_handoff_enabled: ${if cfg.hintedHandOff then "true" else "false"}
+    hinted_handoff_throttle_in_kb: ${builtins.toString cfg.hintedHandOffThrottle}
+    max_hints_delivery_threads: 2
+    max_hint_window_in_ms: 10800000 # 3 hours
+    authenticator: ${cfg.authenticator}
+    authorizer: ${cfg.authorizer}
+    permissions_validity_in_ms: 2000
+    partitioner: org.apache.cassandra.dht.Murmur3Partitioner
+    data_file_directories:
+    ${builtins.concatStringsSep "\n" (map (v: "  - "+v) cfg.dataDirs)}
+    commitlog_directory: ${cfg.commitLogDirectory}
+    disk_failure_policy: stop
+    key_cache_size_in_mb:
+    key_cache_save_period: 14400
+    row_cache_size_in_mb: 0
+    row_cache_save_period: 0
+    saved_caches_directory: ${cfg.savedCachesDirectory}
+    commitlog_sync: ${cfg.commitLogSync}
+    commitlog_sync_period_in_ms: ${builtins.toString cfg.commitLogSyncPeriod}
+    commitlog_segment_size_in_mb: 32
+    seed_provider:
+      - class_name: org.apache.cassandra.locator.SimpleSeedProvider
+        parameters:
+          - seeds: "${builtins.concatStringsSep "," cfg.seeds}"
+    concurrent_reads: ${builtins.toString cfg.concurrentReads}
+    concurrent_writes: ${builtins.toString cfg.concurrentWrites}
+    memtable_flush_queue_size: 4
+    trickle_fsync: false
+    trickle_fsync_interval_in_kb: 10240
+    storage_port: 7000
+    ssl_storage_port: 7001
+    listen_address: ${cfg.listenAddress}
+    start_native_transport: true
+    native_transport_port: 9042
+    start_rpc: true
+    rpc_address: ${cfg.rpcAddress}
+    rpc_port: 9160
+    rpc_keepalive: true
+    rpc_server_type: sync
+    thrift_framed_transport_size_in_mb: 15
+    incremental_backups: ${if cfg.incrementalBackups then "true" else "false"}
+    snapshot_before_compaction: false
+    auto_snapshot: true
+    column_index_size_in_kb: 64
+    in_memory_compaction_limit_in_mb: 64
+    multithreaded_compaction: false
+    compaction_throughput_mb_per_sec: 16
+    compaction_preheat_key_cache: true
+    read_request_timeout_in_ms: 10000
+    range_request_timeout_in_ms: 10000
+    write_request_timeout_in_ms: 10000
+    cas_contention_timeout_in_ms: 1000
+    truncate_request_timeout_in_ms: 60000
+    request_timeout_in_ms: 10000
+    cross_node_timeout: false
+    endpoint_snitch: ${cfg.snitch}
+    dynamic_snitch_update_interval_in_ms: 100
+    dynamic_snitch_reset_interval_in_ms: 600000
+    dynamic_snitch_badness_threshold: 0.1
+    request_scheduler: org.apache.cassandra.scheduler.NoScheduler
+    server_encryption_options:
+      internode_encryption: ${cfg.internodeEncryption}
+      keystore: ${cfg.keyStorePath}
+      keystore_password: ${cfg.keyStorePassword}
+      truststore: ${cfg.trustStorePath}
+      truststore_password: ${cfg.trustStorePassword}
+    client_encryption_options:
+      enabled: ${if cfg.clientEncryption then "true" else "false"}
+      keystore: ${cfg.keyStorePath}
+      keystore_password: ${cfg.keyStorePassword}
+    internode_compression: all
+    inter_dc_tcp_nodelay: false
+    preheat_kernel_page_cache: false
+    streaming_socket_timeout_in_ms: ${toString cfg.streamingSocketTimoutInMS}
+  '';
+
+  cassandraLog = ''
+    log4j.rootLogger=${cfg.logLevel},stdout
+    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+    log4j.appender.stdout.layout.ConversionPattern=%5p [%t] %d{HH:mm:ss,SSS} %m%n
+  '';
+
+  cassandraConfFile = pkgs.writeText "cassandra.yaml" cassandraConf;
+  cassandraLogFile = pkgs.writeText "log4j-server.properties" cassandraLog;
+  cassandraRackFile = pkgs.writeText "cassandra-rackdc.properties" cassandraRackDcProperties;
+
+  cassandraEnvironment = {
+    CASSANDRA_HOME = cassandraPackage;
+    JAVA_HOME = cfg.jre;
+    CASSANDRA_CONF = "/etc/cassandra";
+  };
+
+in {
+
+  ###### interface
+
+  options.services.cassandra = {
+    enable = mkOption {
+      description = "Whether to enable cassandra.";
+      default = false;
+      type = types.bool;
+    };
+    package = mkOption {
+      description = "Cassandra package to use.";
+      default = pkgs.cassandra;
+      defaultText = "pkgs.cassandra";
+      type = types.package;
+    };
+    jre = mkOption {
+      description = "JRE package to run cassandra service.";
+      default = pkgs.jre;
+      defaultText = "pkgs.jre";
+      type = types.package;
+    };
+    user = mkOption {
+      description = "User that runs cassandra service.";
+      default = "cassandra";
+      type = types.string;
+    };
+    group = mkOption {
+      description = "Group that runs cassandra service.";
+      default = "cassandra";
+      type = types.string;
+    };
+    envFile = mkOption {
+      description = "path to cassandra-env.sh";
+      default = "${cassandraPackage}/conf/cassandra-env.sh";
+      defaultText = "\${cassandraPackage}/conf/cassandra-env.sh";
+      type = types.path;
+    };
+    clusterName = mkOption {
+      description = "set cluster name";
+      default = "cassandra";
+      example = "prod-cluster0";
+      type = types.string;
+    };
+    commitLogDirectory = mkOption {
+      description = "directory for commit logs";
+      default = "/var/lib/cassandra/commit_log";
+      type = types.string;
+    };
+    savedCachesDirectory = mkOption {
+      description = "directory for saved caches";
+      default = "/var/lib/cassandra/saved_caches";
+      type = types.string;
+    };
+    hintedHandOff = mkOption {
+      description = "enable hinted handoff";
+      default = true;
+      type = types.bool;
+    };
+    hintedHandOffThrottle = mkOption {
+      description = "hinted hand off throttle rate in kb";
+      default = 1024;
+      type = types.int;
+    };
+    commitLogSync = mkOption {
+      description = "commitlog sync method";
+      default = "periodic";
+      type = types.str;
+      example = "batch";
+    };
+    commitLogSyncPeriod = mkOption {
+      description = "commitlog sync period in ms ";
+      default = 10000;
+      type = types.int;
+    };
+    envScript = mkOption {
+      default = "${cassandraPackage}/conf/cassandra-env.sh";
+      defaultText = "\${cassandraPackage}/conf/cassandra-env.sh";
+      type = types.path;
+      description = "Supply your own cassandra-env.sh rather than using the default";
+    };
+    extraParams = mkOption {
+      description = "add additional lines to cassandra-env.sh";
+      default = [];
+      example = [''JVM_OPTS="$JVM_OPTS -Dcassandra.available_processors=1"''];
+      type = types.listOf types.str;
+    };
+    dataDirs = mkOption {
+      type = types.listOf types.path;
+      default = [ "/var/lib/cassandra/data" ];
+      description = "Data directories for cassandra";
+    };
+    logLevel = mkOption {
+      type = types.str;
+      default = "INFO";
+      description = "default logging level for log4j";
+    };
+    internodeEncryption = mkOption {
+      description = "enable internode encryption";
+      default = "none";
+      example = "all";
+      type = types.str;
+    };
+    clientEncryption = mkOption {
+      description = "enable client encryption";
+      default = false;
+      type = types.bool;
+    };
+    trustStorePath = mkOption {
+      description = "path to truststore";
+      default = ".conf/truststore";
+      type = types.str;
+    };
+    keyStorePath = mkOption {
+      description = "path to keystore";
+      default = ".conf/keystore";
+      type = types.str;
+    };
+    keyStorePassword = mkOption {
+      description = "password to keystore";
+      default = "cassandra";
+      type = types.str;
+    };
+    trustStorePassword = mkOption {
+      description = "password to truststore";
+      default = "cassandra";
+      type = types.str;
+    };
+    seeds = mkOption {
+      description = "password to truststore";
+      default = [ "127.0.0.1" ];
+      type = types.listOf types.str;
+    };
+    concurrentWrites = mkOption {
+      description = "number of concurrent writes allowed";
+      default = 32;
+      type = types.int;
+    };
+    concurrentReads = mkOption {
+      description = "number of concurrent reads allowed";
+      default = 32;
+      type = types.int;
+    };
+    listenAddress = mkOption {
+      description = "listen address";
+      default = "localhost";
+      type = types.str;
+    };
+    rpcAddress = mkOption {
+      description = "rpc listener address";
+      default = "localhost";
+      type = types.str;
+    };
+    incrementalBackups = mkOption {
+      description = "enable incremental backups";
+      default = false;
+      type = types.bool;
+    };
+    snitch = mkOption {
+      description = "snitch to use for topology discovery";
+      default = "GossipingPropertyFileSnitch";
+      example = "Ec2Snitch";
+      type = types.str;
+    };
+    dc = mkOption {
+      description = "datacenter for use in topology configuration";
+      default = "DC1";
+      example = "DC1";
+      type = types.str;
+    };
+    rack = mkOption {
+      description = "rack for use in topology configuration";
+      default = "RAC1";
+      example = "RAC1";
+      type = types.str;
+    };
+    authorizer = mkOption {
+      description = "
+        Authorization backend, implementing IAuthorizer; used to limit access/provide permissions
+      ";
+      default = "AllowAllAuthorizer";
+      example = "CassandraAuthorizer";
+      type = types.str;
+    };
+    authenticator = mkOption {
+      description = "
+        Authentication backend, implementing IAuthenticator; used to identify users
+      ";
+      default = "AllowAllAuthenticator";
+      example = "PasswordAuthenticator";
+      type = types.str;
+    };
+    autoBootstrap = mkOption {
+      description = "It makes new (non-seed) nodes automatically migrate the right data to themselves.";
+      default = true;
+      example = true;
+      type = types.bool;
+    };
+    streamingSocketTimoutInMS = mkOption {
+      description = "Enable or disable socket timeout for streaming operations";
+      default = 3600000; #CASSANDRA-8611
+      example = 120;
+      type = types.int;
+    };
+    repairStartAt = mkOption {
+      default = "Sun";
+      type = types.string;
+      description = ''
+      Defines realtime (i.e. wallclock) timers with calendar event
+      expressions. For more details re: systemd OnCalendar at
+      https://www.freedesktop.org/software/systemd/man/systemd.time.html#Displaying%20Time%20Spans
+      '';
+      example = ["weekly" "daily" "08:05:40" "mon,fri *-1/2-1,3 *:30:45"];
+    };
+    repairRandomizedDelayInSec = mkOption {
+      default = 0;
+      type = types.int;
+      description = ''Delay the timer by a randomly selected, evenly distributed
+      amount of time between 0 and the specified time value. re: systemd timer
+      RandomizedDelaySec for more details
+      '';
+    };
+    repairPostStop = mkOption {
+      default = null;
+      type = types.nullOr types.string;
+      description = ''
+      Run a script when repair is over. One can use it to send statsd events, email, etc.
+      '';
+    };
+    repairPostStart = mkOption {
+      default = null;
+      type = types.nullOr types.string;
+      description = ''
+      Run a script when repair starts. One can use it to send statsd events, email, etc.
+      It has same semantics as systemd ExecStopPost; So, if it fails, unit is consisdered
+      failed.
+      '';
+    };
+  };
+
+  ###### implementation
+
+  config = mkIf cfg.enable {
+
+    environment.etc."cassandra/cassandra-rackdc.properties" = {
+      source = cassandraRackFile;
+    };
+    environment.etc."cassandra/cassandra.yaml" = {
+      source = cassandraConfFile;
+    };
+    environment.etc."cassandra/log4j-server.properties" = {
+      source = cassandraLogFile;
+    };
+    environment.etc."cassandra/cassandra-env.sh" = {
+      text = ''
+        ${builtins.readFile cfg.envFile}
+        ${concatStringsSep "\n" cfg.extraParams}
+      '';
+    };
+    systemd.services.cassandra = {
+      description = "Cassandra Daemon";
+      wantedBy = [ "multi-user.target" ];
+      after = [ "network-interfaces.target" ];
+      environment = cassandraEnvironment;
+      restartTriggers = [ cassandraConfFile cassandraLogFile cassandraRackFile ];
+      serviceConfig = {
+
+        User = cfg.user;
+        PermissionsStartOnly = true;
+        LimitAS = "infinity";
+        LimitNOFILE = "100000";
+        LimitNPROC = "32768";
+        LimitMEMLOCK = "infinity";
+
+      };
+      script = ''
+         ${cassandraPackage}/bin/cassandra -f
+        '';
+      path = [
+        cfg.jre
+        cassandraPackage
+        pkgs.coreutils
+      ];
+      preStart = ''
+        mkdir -m 0700 -p /etc/cassandra/triggers
+        mkdir -m 0700 -p /var/lib/cassandra /var/log/cassandra
+        chown ${cfg.user} /var/lib/cassandra /var/log/cassandra /etc/cassandra/triggers
+      '';
+      postStart = ''
+        sleep 2
+        while ! nodetool status >/dev/null 2>&1; do
+          sleep 2
+        done
+        nodetool status
+      '';
+    };
+
+    environment.systemPackages = [ cassandraPackage ];
+
+    networking.firewall.allowedTCPPorts = [
+      7000
+      7001
+      9042
+      9160
+    ];
+
+    users.extraUsers.cassandra =
+      if config.ids.uids ? "cassandra"
+      then { uid = config.ids.uids.cassandra; } // cassandraUser
+      else cassandraUser ;
+
+    boot.kernel.sysctl."vm.swappiness" = pkgs.lib.mkOptionDefault 0;
+
+    systemd.timers."cassandra-repair" = {
+      timerConfig = {
+        OnCalendar = "${toString cfg.repairStartAt}";
+        RandomizedDelaySec = cfg.repairRandomizedDelayInSec;
+      };
+    };
+
+    systemd.services."cassandra-repair" = {
+      description = "Cassandra repair daemon";
+      environment = cassandraEnvironment;
+      script = "${cassandraPackage}/bin/nodetool repair -pr";
+      postStop = mkIf (cfg.repairPostStop != null) cfg.repairPostStop;
+      postStart = mkIf (cfg.repairPostStart != null) cfg.repairPostStart;
+      serviceConfig = {
+        User = cfg.user;
+      };
+    };
+  };
+}
diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix
index ac2e94c25c33..df19efb55fdf 100644
--- a/nixos/modules/services/misc/gitlab.nix
+++ b/nixos/modules/services/misc/gitlab.nix
@@ -380,6 +380,7 @@ in {
         User = cfg.user;
         Group = cfg.group;
         TimeoutSec = "300";
+        Restart = "on-failure";
         WorkingDirectory = "${cfg.packages.gitlab}/share/gitlab";
         ExecStart="${cfg.packages.gitlab.env}/bin/bundle exec \"sidekiq -q post_receive -q mailers -q system_hook -q project_web_hook -q gitlab_shell -q common -q default -e production -P ${cfg.statePath}/tmp/sidekiq.pid\"";
       };
@@ -404,6 +405,7 @@ in {
         User = cfg.user;
         Group = cfg.group;
         TimeoutSec = "300";
+        Restart = "on-failure";
         ExecStart =
           "${cfg.packages.gitlab-workhorse}/bin/gitlab-workhorse "
           + "-listenUmask 0 "
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index 8385d8e60266..af7753470de6 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -18,7 +18,9 @@ let
 
     ${cfg.config}
 
-    ${optionalString (cfg.httpConfig == "") ''
+    ${optionalString (cfg.httpConfig == "" && cfg.config == "") ''
+    events {}
+
     http {
       include ${cfg.package}/conf/mime.types;
       include ${cfg.package}/conf/fastcgi.conf;
@@ -96,6 +98,7 @@ let
     }''}
 
     ${optionalString (cfg.httpConfig != "") ''
+    events {}
     http {
       include ${cfg.package}/conf/mime.types;
       include ${cfg.package}/conf/fastcgi.conf;
@@ -233,9 +236,12 @@ in
       };
 
       config = mkOption {
-        default = "events {}";
+        default = "";
         description = "
           Verbatim nginx.conf configuration.
+          This is mutually exclusive with the structured configuration
+          via virtualHosts and the recommendedXyzSettings configuration
+          options. See appendConfig for appending to the generated http block.
         ";
       };
 
@@ -268,8 +274,8 @@ in
         default = "";
         description = "
           Configuration lines to be appended to the generated http block.
-          This is mutually exclusive with using httpConfig for specifying the whole
-          http block verbatim.
+          This is mutually exclusive with using config and httpConfig for 
+          specifying the whole http block verbatim.
         ";
       };
 
diff --git a/nixos/modules/services/web-servers/phpfpm.nix b/nixos/modules/services/web-servers/phpfpm/default.nix
index 2658d7117e37..819d0c251bf3 100644
--- a/nixos/modules/services/web-servers/phpfpm.nix
+++ b/nixos/modules/services/web-servers/phpfpm/default.nix
@@ -9,6 +9,12 @@ let
 
   pidFile = "${stateDir}/phpfpm.pid";
 
+  mkPool = n: p: ''
+    [${n}]
+    listen = ${p.listen}
+    ${p.extraConfig}
+  '';
+
   cfgFile = pkgs.writeText "phpfpm.conf" ''
     [global]
     pid = ${pidFile}
@@ -16,6 +22,8 @@ let
     daemonize = yes
     ${cfg.extraConfig}
 
+    ${concatStringsSep "\n" (mapAttrsToList mkPool cfg.pools)}
+
     ${concatStringsSep "\n" (mapAttrsToList (n: v: "[${n}]\n${v}") cfg.poolConfigs)}
   '';
 
@@ -62,8 +70,8 @@ in {
       };
 
       poolConfigs = mkOption {
-        type = types.attrsOf types.lines;
         default = {};
+        type = types.attrsOf types.lines;
         example = literalExample ''
           { mypool = '''
               listen = /run/phpfpm/mypool
@@ -84,10 +92,20 @@ in {
           the phpfpm service is disabled.
         '';
       };
+
+      pools = mkOption {
+        type = types.attrsOf (types.submodule (import ./pool-options.nix {
+          inherit lib;
+        }));
+        default = {};
+        description = ''
+          If no pools are defined, the phpfpm service is disabled.
+        '';
+      };
     };
   };
 
-  config = mkIf (cfg.poolConfigs != {}) {
+  config = mkIf (cfg.pools != {}) {
 
     systemd.services.phpfpm = {
       wantedBy = [ "multi-user.target" ];
diff --git a/nixos/modules/services/web-servers/phpfpm/pool-options.nix b/nixos/modules/services/web-servers/phpfpm/pool-options.nix
new file mode 100644
index 000000000000..cc688c2c48a2
--- /dev/null
+++ b/nixos/modules/services/web-servers/phpfpm/pool-options.nix
@@ -0,0 +1,35 @@
+{ lib }:
+
+with lib; {
+
+  options = {
+
+    listen = mkOption {
+      type = types.str;
+      example = "/path/to/unix/socket";
+      description = ''
+        The address on which to accept FastCGI requests.
+      '';
+    };
+
+    extraConfig = mkOption {
+      type = types.lines;
+      example = ''
+        user = nobody
+        pm = dynamic
+        pm.max_children = 75
+        pm.start_servers = 10
+        pm.min_spare_servers = 5
+        pm.max_spare_servers = 20
+        pm.max_requests = 500
+      '';
+
+      description = ''
+        Extra lines that go into the pool configuration.
+        See the documentation on <literal>php-fpm.conf</literal> for
+        details on configuration directives.
+      '';
+    };
+  };
+}
+
diff --git a/nixos/modules/services/x11/hardware/libinput.nix b/nixos/modules/services/x11/hardware/libinput.nix
index 47ce9e566045..b358550ba41d 100644
--- a/nixos/modules/services/x11/hardware/libinput.nix
+++ b/nixos/modules/services/x11/hardware/libinput.nix
@@ -25,16 +25,21 @@ in {
 
       accelProfile = mkOption {
         type = types.enum [ "flat" "adaptive" ];
-        default = "flat";
-        example = "adaptive";
+        default = "adaptive";
+        example = "flat";
         description =
           ''
-            Sets  the pointer acceleration profile to the given profile. Permitted values are adaptive, flat.
-            Not all devices support this option or all profiles. If a profile is unsupported, the default profile
-            for this is used. For a description on the profiles and their behavior, see the libinput documentation.
+            Sets  the pointer acceleration profile to the given profile.
+            Permitted values are adaptive, flat.
+            Not all devices support this option or all profiles.
+            If a profile is unsupported, the default profile for this is used.
+            <literal>flat</literal>: Pointer motion is accelerated by a constant
+            (device-specific) factor, depending on the current speed.
+            <literal>adaptive</literal>: Pointer acceleration depends on the input speed.
+            This is the default profile for most devices.
           '';
-      };    
-      
+      };
+
       accelSpeed = mkOption {
         type = types.nullOr types.string;
         default = null;
@@ -216,7 +221,7 @@ in {
           Option "LeftHanded" "${xorgBool cfg.leftHanded}"
           Option "MiddleEmulation" "${xorgBool cfg.middleEmulation}"
           Option "NaturalScrolling" "${xorgBool cfg.naturalScrolling}"
-          ${optionalString (cfg.scrollButton != null) ''Option "ScrollButton" "${cfg.scrollButton}"''}
+          ${optionalString (cfg.scrollButton != null) ''Option "ScrollButton" "${toString cfg.scrollButton}"''}
           Option "ScrollMethod" "${cfg.scrollMethod}"
           Option "HorizontalScrolling" "${xorgBool cfg.horizontalScrolling}"
           Option "SendEventsMode" "${cfg.sendEventsMode}"
diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh
index 82995d5bab11..fbb32901f64e 100644
--- a/nixos/modules/system/boot/stage-1-init.sh
+++ b/nixos/modules/system/boot/stage-1-init.sh
@@ -185,39 +185,6 @@ if test -n "$debug1devices"; then fail; fi
 @postDeviceCommands@
 
 
-# Try to resume - all modules are loaded now, and devices exist
-if test -e /sys/power/tuxonice/resume; then
-    if test -n "$(cat /sys/power/tuxonice/resume)"; then
-        echo 0 > /sys/power/tuxonice/user_interface/enabled
-        echo 1 > /sys/power/tuxonice/do_resume || echo "failed to resume..."
-    fi
-fi
-
-if test -e /sys/power/resume -a -e /sys/power/disk; then
-    if test -n "@resumeDevice@"; then
-        resumeDev="@resumeDevice@"
-        resumeInfo="$(udevadm info -q property "$resumeDev" )"
-    else
-        for sd in @resumeDevices@; do
-            # Try to detect resume device. According to Ubuntu bug:
-            # https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/923326/comments/1
-            # when there are multiple swap devices, we can't know where the hibernate
-            # image will reside. We can check all of them for swsuspend blkid.
-            resumeInfo="$(test -e "$sd" && udevadm info -q property "$sd")"
-            if [ "$(echo "$resumeInfo" | sed -n 's/^ID_FS_TYPE=//p')" = "swsuspend" ]; then
-                resumeDev="$sd"
-                break
-            fi
-        done
-    fi
-    if test -e "$resumeDev"; then
-        resumeMajor="$(echo "$resumeInfo" | sed -n 's/^MAJOR=//p')"
-        resumeMinor="$(echo "$resumeInfo" | sed -n 's/^MINOR=//p')"
-        echo "$resumeMajor:$resumeMinor" > /sys/power/resume 2> /dev/null || echo "failed to resume..."
-    fi
-fi
-
-
 # Return true if the machine is on AC power, or if we can't determine
 # whether it's on AC power.
 onACPower() {
@@ -348,6 +315,68 @@ mountFS() {
 }
 
 
+# Function for waiting a device to appear.
+waitDevice() {
+    local device="$1"
+
+    # USB storage devices tend to appear with some delay.  It would be
+    # great if we had a way to synchronously wait for them, but
+    # alas...  So just wait for a few seconds for the device to
+    # appear.
+    if test ! -e $device; then
+        echo -n "waiting for device $device to appear..."
+        try=20
+        while [ $try -gt 0 ]; do
+            sleep 1
+            # also re-try lvm activation now that new block devices might have appeared
+            lvm vgchange -ay
+            # and tell udev to create nodes for the new LVs
+            udevadm trigger --action=add
+            if test -e $device; then break; fi
+            echo -n "."
+            try=$((try - 1))
+        done
+        echo
+        [ $try -ne 0 ]
+    fi
+}
+
+
+# Try to resume - all modules are loaded now.
+if test -e /sys/power/tuxonice/resume; then
+    if test -n "$(cat /sys/power/tuxonice/resume)"; then
+        echo 0 > /sys/power/tuxonice/user_interface/enabled
+        echo 1 > /sys/power/tuxonice/do_resume || echo "failed to resume..."
+    fi
+fi
+
+if test -e /sys/power/resume -a -e /sys/power/disk; then
+    if test -n "@resumeDevice@" && waitDevice "@resumeDevice@"; then
+        resumeDev="@resumeDevice@"
+        resumeInfo="$(udevadm info -q property "$resumeDev" )"
+    else
+        for sd in @resumeDevices@; do
+            # Try to detect resume device. According to Ubuntu bug:
+            # https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/923326/comments/1
+            # when there are multiple swap devices, we can't know where the hibernate
+            # image will reside. We can check all of them for swsuspend blkid.
+            if waitDevice "$sd"; then
+                resumeInfo="$(udevadm info -q property "$sd")"
+                if [ "$(echo "$resumeInfo" | sed -n 's/^ID_FS_TYPE=//p')" = "swsuspend" ]; then
+                    resumeDev="$sd"
+                    break
+                fi
+            fi
+        done
+    fi
+    if test -n "$resumeDev"; then
+        resumeMajor="$(echo "$resumeInfo" | sed -n 's/^MAJOR=//p')"
+        resumeMinor="$(echo "$resumeInfo" | sed -n 's/^MINOR=//p')"
+        echo "$resumeMajor:$resumeMinor" > /sys/power/resume 2> /dev/null || echo "failed to resume..."
+    fi
+fi
+
+
 # Try to find and mount the root device.
 mkdir -p $targetRoot
 
@@ -380,29 +409,11 @@ while read -u 3 mountPoint; do
             ;;
     esac
 
-    # USB storage devices tend to appear with some delay.  It would be
-    # great if we had a way to synchronously wait for them, but
-    # alas...  So just wait for a few seconds for the device to
-    # appear.  If it doesn't appear, try to mount it anyway (and
-    # probably fail).  This is a fallback for non-device "devices"
-    # that we don't properly recognise.
-    if test -z "$pseudoDevice" -a ! -e $device; then
-        echo -n "waiting for device $device to appear..."
-        try=20
-        while [ $try -gt 0 ]; do
-            sleep 1
-            # also re-try lvm activation now that new block devices might have appeared
-            lvm vgchange -ay
-            # and tell udev to create nodes for the new LVs
-            udevadm trigger --action=add
-            if test -e $device; then break; fi
-            echo -n "."
-            try=$((try - 1))
-        done
-        echo
-        if [ $try -eq 0 ]; then
-          echo "Timed out waiting for device $device, trying to mount anyway."
-        fi
+    if test -z "$pseudoDevice" && ! waitDevice "$device"; then
+        # If it doesn't appear, try to mount it anyway (and
+        # probably fail).  This is a fallback for non-device "devices"
+        # that we don't properly recognise.
+        echo "Timed out waiting for device $device, trying to mount anyway."
     fi
 
     # Wait once more for the udev queue to empty, just in case it's
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
index 21a49d45789e..70429e9c0a22 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -87,15 +87,11 @@ let
         LDD="$(ldd $BIN)" || continue
         LIBS="$(echo "$LDD" | awk '{print $3}' | sed '/^$/d')"
         for LIB in $LIBS; do
-          [ ! -f "$out/lib/$(basename $LIB)" ] && cp -pdv $LIB $out/lib
-          while [ "$(readlink $LIB)" != "" ]; do
-            LINK="$(readlink $LIB)"
-            if [ "${LINK:0:1}" != "/" ]; then
-              LINK="$(dirname $LIB)/$LINK"
-            fi
-            LIB="$LINK"
-            [ ! -f "$out/lib/$(basename $LIB)" ] && cp -pdv $LIB $out/lib
-          done
+          TGT="$out/lib/$(basename $LIB)"
+          if [ ! -f "$TGT" ]; then
+            SRC="$(readlink -e $LIB)"
+            cp -pdv "$SRC" "$TGT"
+          fi
         done
       done
 
diff --git a/nixos/release-small.nix b/nixos/release-small.nix
index fb5a97f98ab9..f6e7a65fbdea 100644
--- a/nixos/release-small.nix
+++ b/nixos/release-small.nix
@@ -63,7 +63,6 @@ in rec {
       imagemagick
       jdk
       linux
-      mysql51
       mysql55
       nginx
       nodejs
diff --git a/nixos/tests/cassandra.nix b/nixos/tests/cassandra.nix
new file mode 100644
index 000000000000..b729e6b158bc
--- /dev/null
+++ b/nixos/tests/cassandra.nix
@@ -0,0 +1,68 @@
+import ./make-test.nix ({ pkgs, ...}:
+let
+  user = "cassandra";
+  nodeCfg = nodes: selfIP: cassandraOpts:
+    {
+      services.cassandra = {
+        enable = true;
+        listenAddress = selfIP;
+        rpcAddress = "0.0.0.0";
+        seeds = [ "192.168.1.1" ];
+        package = pkgs.cassandra_2_0;
+        jre = pkgs.openjdk;
+        clusterName = "ci ahoy";
+        authenticator = "PasswordAuthenticator";
+        authorizer = "CassandraAuthorizer";
+        user = user;
+      } // cassandraOpts;
+      nixpkgs.config.allowUnfree = true;
+      virtualisation.memorySize = 1024;
+    };
+
+in
+{
+  name = "cassandra-ci";
+
+  nodes = {
+    cass0 = {pkgs, config, nodes, ...}: nodeCfg nodes "192.168.1.1" {};
+    cass1 = {pkgs, config, nodes, ...}: nodeCfg nodes "192.168.1.2" {};
+    cass2 = {pkgs, config, nodes, ...}: nodeCfg nodes "192.168.1.3" {
+      extraParams = [
+        ''JVM_OPTS="$JVM_OPTS -Dcassandra.replace_address=192.168.1.2"''
+      ];
+      listenAddress = "192.168.1.3";
+    };
+  };
+
+  testScript = ''
+    subtest "start seed", sub {
+      $cass0->waitForUnit("cassandra.service");
+      $cass0->waitForOpenPort(9160);
+      $cass0->execute("echo show version | cqlsh localhost -u cassandra -p cassandra");
+      sleep 2;
+      $cass0->succeed("echo show version | cqlsh localhost -u cassandra -p cassandra");
+      $cass1->start;
+    };
+    subtest "cassandra user/group", sub {
+      $cass0->succeed("id \"${user}\" >/dev/null");
+      $cass1->succeed("id \"${user}\" >/dev/null");
+    };
+    subtest "bring up cassandra cluster", sub {
+      $cass1->waitForUnit("cassandra.service");
+      $cass0->waitUntilSucceeds("nodetool status | grep -c UN  | grep 2");
+    };
+    subtest "break and fix node", sub {
+      $cass0->block;
+      $cass0->waitUntilSucceeds("nodetool status | grep -c DN  | grep 1");
+      $cass0->unblock;
+      $cass0->waitUntilSucceeds("nodetool status | grep -c UN  | grep 2");
+    };
+    subtest "replace crashed node", sub {
+      $cass1->crash;
+      $cass2->start;
+      $cass2->waitForUnit("cassandra.service");
+      $cass0->waitUntilFails("nodetool status | grep UN  | grep 192.168.1.2");
+      $cass0->waitUntilSucceeds("nodetool status | grep UN | grep 192.168.1.3");
+    };
+  '';
+})
diff --git a/nixos/tests/gocd-agent.nix b/nixos/tests/gocd-agent.nix
index d5ed0f65ab01..5cadff089950 100644
--- a/nixos/tests/gocd-agent.nix
+++ b/nixos/tests/gocd-agent.nix
@@ -4,31 +4,37 @@
 #   3. GoCD agent is available on GoCD server using GoCD API
 #     3.1. https://api.go.cd/current/#get-all-agents
 
+let
+  serverUrl = "localhost:8153/go/api/agents";
+  header = "Accept: application/vnd.go.cd.v2+json";
+in
+
 import ./make-test.nix ({ pkgs, ...} : {
   name = "gocd-agent";
   meta = with pkgs.stdenv.lib.maintainers; {
-    maintainers = [ swarren83 ];
+    maintainers = [ grahamc swarren83 ];
   };
 
-nodes = {
-  gocd_agent =
-    { config, pkgs, ... }:
-    { 
-      virtualisation.memorySize = 2048;
-      services.gocd-agent = {
-        enable = true;
-      };
-      services.gocd-server = {
-        enable = true;
+  nodes = {
+    gocd_agent =
+      { config, pkgs, ... }:
+      {
+        virtualisation.memorySize = 2046;
+        services.gocd-agent = {
+          enable = true;
+        };
+        services.gocd-server = {
+          enable = true;
+        };
       };
-    };
-};
+  };
 
   testScript = ''
     startAll;
     $gocd_agent->waitForUnit("gocd-server");
     $gocd_agent->waitForOpenPort("8153");
     $gocd_agent->waitForUnit("gocd-agent");
-    $gocd_agent->waitUntilSucceeds("curl -s -f localhost:8153/go/api/agents -H 'Accept: application/vnd.go.cd.v2+json'");
+    $gocd_agent->waitUntilSucceeds("curl ${serverUrl} -H '${header}' | ${pkgs.jq}/bin/jq -e ._embedded.agents[0].uuid");
+    $gocd_agent->succeed("curl ${serverUrl} -H '${header}' | ${pkgs.jq}/bin/jq -e ._embedded.agents[0].agent_state | grep -q Idle");
   '';
 })
diff --git a/nixos/tests/gocd-server.nix b/nixos/tests/gocd-server.nix
index 6ec5bfb4dbb9..b473d4ad61c7 100644
--- a/nixos/tests/gocd-server.nix
+++ b/nixos/tests/gocd-server.nix
@@ -2,7 +2,7 @@
 #   1. GoCD server starts
 #   2. GoCD server responds
 
-import ./make-test.nix ({ pkgs, ...} : 
+import ./make-test.nix ({ pkgs, ...} :
 
 {
   name = "gocd-server";
@@ -13,8 +13,8 @@ import ./make-test.nix ({ pkgs, ...} :
 nodes = {
   gocd_server =
     { config, pkgs, ... }:
-    { 
-      virtualisation.memorySize = 2048;
+    {
+      virtualisation.memorySize = 2046;
       services.gocd-server.enable = true;
     };
 };
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix
index e71168a73660..1df2c651f9bc 100644
--- a/nixos/tests/installer.nix
+++ b/nixos/tests/installer.nix
@@ -201,19 +201,21 @@ let
 
             # The test cannot access the network, so any packages we
             # need must be included in the VM.
-            system.extraDependencies =
-              [ pkgs.sudo
-                pkgs.docbook5
-                pkgs.docbook5_xsl
-                pkgs.unionfs-fuse
-                pkgs.ntp
-                pkgs.nixos-artwork
-                pkgs.perlPackages.XMLLibXML
-                pkgs.perlPackages.ListCompare
+            system.extraDependencies = with pkgs;
+              [ sudo
+                libxml2.bin
+                libxslt.bin
+                docbook5
+                docbook5_xsl
+                unionfs-fuse
+                ntp
+                nixos-artwork
+                perlPackages.XMLLibXML
+                perlPackages.ListCompare
 
                 # add curl so that rather than seeing the test attempt to download
                 # curl's tarball, we see what it's trying to download
-                pkgs.curl
+                curl
               ]
               ++ optional (bootLoader == "grub" && grubVersion == 1) pkgs.grub
               ++ optionals (bootLoader == "grub" && grubVersion == 2) [ pkgs.grub2 pkgs.grub2_efi ];
diff --git a/pkgs/applications/audio/audacious/default.nix b/pkgs/applications/audio/audacious/default.nix
index 193b9c1e790f..e6322dd1d0aa 100644
--- a/pkgs/applications/audio/audacious/default.nix
+++ b/pkgs/applications/audio/audacious/default.nix
@@ -1,69 +1,71 @@
-{ stdenv, fetchurl, pkgconfig, glib, gtk3, libmowgli, libmcs
-, gettext, dbus_glib, libxml2, libmad, xorg, alsaLib, libogg
-, libvorbis, libcdio, libcddb, flac, ffmpeg, makeWrapper
-, mpg123, neon, faad2, gnome3
+{ stdenv, fetchurl, pkgconfig, wrapGAppsHook, gettext, glib, gtk3
+, libmowgli, libmcs, dbus_glib, libxml2, xorg, gnome3, alsaLib
+, libpulseaudio, libjack2, fluidsynth, libmad, libogg, libvorbis
+, libcdio082, libcddb, flac, ffmpeg, mpg123, libcue, libmms, libbs2b
+, libsndfile, libmodplug, libsamplerate, soxr, lirc, curl, wavpack
+, neon, faad2, lame, libnotify, libsidplayfp
 }:
 
-let version = "3.5.2"; in
-
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   name = "audacious-${version}";
+  version = "3.7.2";
 
   src = fetchurl {
-    url = "http://distfiles.audacious-media-player.org/audacious-${version}.tar.bz2";
-    sha256 = "0mhrdj76h0g6q197wgp8rxk6gqsrirrw49hfidcb5b7q5rlvj59r";
+    url = "http://distfiles.audacious-media-player.org/audacious-${version}-gtk3.tar.bz2";
+    sha256 = "1pvyxi8niy70nv13kc16g2vaywwahmg2650fa7v4rlbmykifk75z";
   };
 
   pluginsSrc = fetchurl {
-    url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}.tar.bz2";
-    sha256 = "1nacd8n46q3pqnwavq3i2ayls609gvxfcp3qqpcsfcdfz3bh15hp";
+    url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}-gtk3.tar.bz2";
+    sha256 = "0gxka0lp9a35k2xgq8bx69wyv83dvrqnpwcsqliy3h3yz6v1fv2v";
   };
 
-  buildInputs =
-    [ gettext pkgconfig glib gtk3 libmowgli libmcs libxml2 dbus_glib
-      libmad xorg.libXcomposite libogg libvorbis flac alsaLib libcdio
-      libcddb ffmpeg makeWrapper mpg123 neon faad2 gnome3.defaultIconTheme
-    ];
+  nativeBuildInputs = [
+    pkgconfig wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gettext glib gtk3 libmowgli libmcs dbus_glib libxml2
+    xorg.libXcomposite gnome3.defaultIconTheme alsaLib libjack2
+    libpulseaudio fluidsynth libmad libogg libvorbis libcdio082
+    libcddb flac ffmpeg mpg123 libcue libmms libbs2b libsndfile
+    libmodplug libsamplerate soxr lirc curl wavpack neon faad2
+    lame libnotify libsidplayfp
+  ];
 
-  # Here we build bouth audacious and audacious-plugins in one
+  configureFlags = [ "--enable-statusicon" ];
+
+  # Here we build both audacious and audacious-plugins in one
   # derivations, since they really expect to be in the same prefix.
   # This is slighly tricky.
-  builder = builtins.toFile "builder.sh"
-    ''
-      # First build audacious.
-      (
-        source $stdenv/setup
-        genericBuild
-      )
-
-      # Then build the plugins.
-      (
-        nativeBuildInputs="$out $nativeBuildInputs" # to find audacious
-        source $stdenv/setup
-        rm -rfv audacious-*
-        src=$pluginsSrc
-        genericBuild
-      )
+  builder = builtins.toFile "builder.sh" ''
+    # First build audacious.
+    (
+      source $stdenv/setup
+      genericBuild
+    )
 
-      (
-        source $stdenv/setup
-        # gsettings schemas for file dialogues
-        # XDG_ICON_DIRS is set by hook for gnome3.defaultIconTheme
-        for file in "$out/bin/"*; do
-          wrapProgram "$file" \
-            --prefix XDG_DATA_DIRS : "$XDG_ADD:$GSETTINGS_SCHEMAS_PATH" \
-            --suffix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
-        done
-      )
-    '';
-  XDG_ADD = gtk3 + "/share";
+    # Then build the plugins.
+    (
+      dontWrapGApps=true
+      nativeBuildInputs="$out $nativeBuildInputs" # to find audacious
+      source $stdenv/setup
+      rm -rfv audacious-*
+      src=$pluginsSrc
+      genericBuild
+    )
+  '';
 
   enableParallelBuilding = true;
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Audio player";
     homepage = http://audacious-media-player.org/;
-    maintainers = with stdenv.lib.maintainers; [ eelco ];
-    platforms = stdenv.lib.platforms.linux;
+    maintainers = with maintainers; [ eelco ramkromberg ];
+    platforms = with platforms; linux;
+    license = with licenses; [
+      bsd2 bsd3 #https://github.com/audacious-media-player/audacious/blob/master/COPYING
+      gpl2 gpl3 lgpl2Plus #http://redmine.audacious-media-player.org/issues/46
+    ];
   };
 }
diff --git a/pkgs/applications/audio/i-score/default.nix b/pkgs/applications/audio/i-score/default.nix
index 97e8f5f1429b..e3ebc5fde08e 100644
--- a/pkgs/applications/audio/i-score/default.nix
+++ b/pkgs/applications/audio/i-score/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
   src = fetchgit {
     url = "https://github.com/OSSIA/i-score.git";
     rev = "ede2453b139346ae46702b5e2643c5488f8c89fb";
-    sha256 = "0mk0zsqhx9z7ry1amjki89h6yp5ysi1qgy2j3kzhrm5sfazvf0x3";
+    sha256 = "0cl9vdmxkshdacgpp7s2rg40b7xbsjrzw916jds9i3rpq1pcy5pj";
     leaveDotGit = true;
     deepClone = true;
   };
diff --git a/pkgs/applications/audio/musescore/default.nix b/pkgs/applications/audio/musescore/default.nix
index e1f0472ce9e4..99fe26b5927a 100644
--- a/pkgs/applications/audio/musescore/default.nix
+++ b/pkgs/applications/audio/musescore/default.nix
@@ -6,11 +6,11 @@
 
 stdenv.mkDerivation rec {
   name = "musescore-${version}";
-  version = "2.0.2";
+  version = "2.0.3";
 
   src = fetchzip {
     url = "https://github.com/musescore/MuseScore/archive/v${version}.tar.gz";
-    sha256 = "12a83v4i830gj76z5744034y1vvwzgy27mjbjp508yh9bd328yqw";
+    sha256 = "067f4li48qfhz2barj70zpf2d2mlii12npx07jx9xjkkgz84z4c9";
   };
 
   makeFlags = [
diff --git a/pkgs/applications/audio/sooperlooper/default.nix b/pkgs/applications/audio/sooperlooper/default.nix
index a11f37a6d528..e4d9541673a6 100644
--- a/pkgs/applications/audio/sooperlooper/default.nix
+++ b/pkgs/applications/audio/sooperlooper/default.nix
@@ -1,10 +1,11 @@
-{ stdenv, fetchFromGitHub , liblo, libxml2, libjack2, libsndfile, wxGTK, libsigcxx
-  ,libsamplerate, rubberband, pkgconfig, autoconf, automake, libtool, gettext, ncurses, which
+{ stdenv, fetchFromGitHub, liblo, libxml2, libjack2, libsndfile, wxGTK, libsigcxx
+, libsamplerate, rubberband, pkgconfig, libtool, gettext, ncurses, which
+, autoreconfHook
 }:
 
 stdenv.mkDerivation rec {
   name = "sooperlooper-git-${version}";
-  version = "19-07-2016";
+  version = "2016-07-19";
 
   src = fetchFromGitHub {
     owner = "essej";
@@ -13,9 +14,16 @@ stdenv.mkDerivation rec {
     sha256 = "0qz25h4idv79m97ici2kzx72fwzks3lysyksk3p3rx72lsijhf3g";
   };
 
+  autoreconfPhase = ''
+    patchShebangs ./autogen.sh
+    ./autogen.sh
+  '';
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig which libtool ];
+
   buildInputs = [
     liblo libxml2 libjack2 libsndfile wxGTK libsigcxx
-    libsamplerate rubberband pkgconfig autoconf automake libtool gettext ncurses which
+    libsamplerate rubberband gettext ncurses
   ];
 
   meta = {
diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix
index 483527c8fa8c..0cd5c1997518 100644
--- a/pkgs/applications/audio/spotify/default.nix
+++ b/pkgs/applications/audio/spotify/default.nix
@@ -5,7 +5,7 @@
 assert stdenv.system == "x86_64-linux";
 
 let
-  version = "1.0.34.146.g28f9eda2-19";
+  version = "1.0.36.120.g536a862f-20";
 
   deps = [
     alsaLib
@@ -50,7 +50,7 @@ stdenv.mkDerivation {
   src =
     fetchurl {
       url = "http://repository-origin.spotify.com/pool/non-free/s/spotify-client/spotify-client_${version}_amd64.deb";
-      sha256 = "1pks9b83aj6y3c3jlmll0rs05yk15r49v0v4amm950z68v182a5g";
+      sha256 = "03r4hz4x4f3zmp6dsv1n72y5q01d7mfqvaaxqvd587a5561gahf0";
     };
 
   buildInputs = [ dpkg makeWrapper ];
diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix
new file mode 100644
index 000000000000..eea686d691de
--- /dev/null
+++ b/pkgs/applications/editors/android-studio/default.nix
@@ -0,0 +1,82 @@
+{ bash
+, buildFHSUserEnv
+, coreutils
+, fetchurl
+, findutils
+, git
+, gnugrep
+, gnutar
+, gzip
+, jdk
+, libXrandr
+, makeWrapper
+, pkgsi686Linux
+, stdenv
+, unzip
+, which
+, writeTextFile
+, zlib
+}:
+
+let
+
+  version = "2.1.2.0";
+  build = "143.2915827";
+
+  androidStudio = stdenv.mkDerivation {
+    name = "android-studio";
+    buildInputs = [
+      makeWrapper
+      unzip
+    ];
+    installPhase = ''
+      cp -r . $out
+      wrapProgram $out/bin/studio.sh --set PATH "${stdenv.lib.makeBinPath [
+
+        # Checked in studio.sh
+        coreutils
+        findutils
+        gnugrep
+        jdk
+        which
+
+        # Used during setup wizard
+        gnutar
+        gzip
+
+        # Runtime stuff
+        git
+
+      ]}" --set LD_LIBRARY_PATH "${stdenv.lib.makeLibraryPath [
+        # Gradle wants libstdc++.so.6
+        stdenv.cc.cc.lib
+        # mksdcard wants 32 bit libstdc++.so.6
+        pkgsi686Linux.stdenv.cc.cc.lib
+        # aapt wants libz.so.1
+        zlib
+        # Support multiple monitors
+        libXrandr
+      ]}"
+    '';
+    src = fetchurl {
+      url = "https://dl.google.com/dl/android/studio/ide-zips/${version}/android-studio-ide-${build}-linux.zip";
+      sha256 = "0q61m8yln77valg7y6lyxlml53z387zh6fyfgc22sm3br5ahbams";
+    };
+  };
+
+  # Android Studio downloads prebuilt binaries as part of the SDK. These tools
+  # (e.g. `mksdcard`) have `/lib/ld-linux.so.2` set as the interpreter. An FHS
+  # environment is used as a work around for that.
+  fhsEnv = buildFHSUserEnv {
+    name = "android-studio-fhs-env";
+  };
+
+in writeTextFile {
+  name = "android-studio-${version}";
+  destination = "/bin/android-studio";
+  executable = true;
+  text = ''
+    #!${bash}/bin/bash
+    ${fhsEnv}/bin/android-studio-fhs-env ${androidStudio}/bin/studio.sh
+  '';
+}
diff --git a/pkgs/applications/editors/atom/default.nix b/pkgs/applications/editors/atom/default.nix
index 13816f8bfdc6..cfcb822ade04 100644
--- a/pkgs/applications/editors/atom/default.nix
+++ b/pkgs/applications/editors/atom/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "atom-${version}";
-  version = "1.9.0";
+  version = "1.9.6";
 
   src = fetchurl {
     url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
-    sha256 = "0hhv1yfs2h5x86pjbkbdg1mn15afdd3baddwpf3p0fl8x2gv9z7m";
+    sha256 = "1hw3s4zc0rs138gg429w98kkgmkm19wgq7r790hic5naci7d7f4i";
     name = "${name}.deb";
   };
 
diff --git a/pkgs/applications/editors/idea/default.nix b/pkgs/applications/editors/idea/default.nix
index 187480217ebd..c113b63390fa 100644
--- a/pkgs/applications/editors/idea/default.nix
+++ b/pkgs/applications/editors/idea/default.nix
@@ -10,32 +10,6 @@ let
   bnumber = with stdenv.lib; build: last (splitString "-" build);
   mkIdeaProduct = callPackage ./common.nix { };
 
-  buildAndroidStudio = { name, version, build, src, license, description, wmClass }:
-    let drv = (mkIdeaProduct rec {
-      inherit name version build src wmClass jdk;
-      product = "Studio";
-      meta = with stdenv.lib; {
-        homepage = https://developer.android.com/sdk/installing/studio.html;
-        inherit description license;
-        longDescription = ''
-          Android development environment based on IntelliJ
-          IDEA providing new features and improvements over
-          Eclipse ADT and will be the official Android IDE
-          once it's ready.
-        '';
-        platforms = platforms.linux;
-        maintainers = with maintainers; [ edwtjo ];
-      };
-    });
-    in stdenv.lib.overrideDerivation drv (x : {
-      buildInputs = x.buildInputs ++ [ makeWrapper ];
-      installPhase = x.installPhase +  ''
-        wrapProgram "$out/bin/android-studio" \
-          --set ANDROID_HOME "${androidsdk}/libexec/" \
-          --set LD_LIBRARY_PATH "${stdenv.cc.cc.lib}/lib" # Gradle installs libnative-platform.so in ~/.gradle, that requires libstdc++.so.6
-      '';
-    });
-
   buildClion = { name, version, build, src, license, description, wmClass }:
     (mkIdeaProduct rec {
       inherit name version build src wmClass jdk;
@@ -147,20 +121,6 @@ in
 
 {
 
-  android-studio = let buildNumber = "143.2915827"; in buildAndroidStudio rec {
-    name = "android-studio-${version}";
-    version = "2.1.2.0";
-    build = "AI-${buildNumber}";
-    description = "Android development environment based on IntelliJ IDEA";
-    license = stdenv.lib.licenses.asl20;
-    src = fetchurl {
-      url = "https://dl.google.com/dl/android/studio/ide-zips/${version}" +
-            "/android-studio-ide-${buildNumber}-linux.zip";
-      sha256 = "0q61m8yln77valg7y6lyxlml53z387zh6fyfgc22sm3br5ahbams";
-    };
-    wmClass = "jetbrains-studio";
-  };
-
   clion = buildClion rec {
     name = "clion-${version}";
     version = "1.2.5";
diff --git a/pkgs/applications/graphics/geeqie/default.nix b/pkgs/applications/graphics/geeqie/default.nix
index 6508b16d15a7..04119f3f1c65 100644
--- a/pkgs/applications/graphics/geeqie/default.nix
+++ b/pkgs/applications/graphics/geeqie/default.nix
@@ -4,11 +4,11 @@
 
 stdenv.mkDerivation rec {
   name = "geeqie-${version}";
-  version = "1.2.3";
+  version = "1.3";
 
   src = fetchurl {
     url = "http://geeqie.org/${name}.tar.xz";
-    sha256 = "2629bf33a9070fad4804b1ef051c3bf8a8fdad3bba4e6188dc20588185003248";
+    sha256 = "0gzc82sy66pbsmq7lnmq4y37zqad1zfwfls3ik3dmfm8s5nmcvsb";
   };
 
   preConfigure = "./autogen.sh";
diff --git a/pkgs/applications/misc/acbuild/default.nix b/pkgs/applications/misc/acbuild/default.nix
index 8221e4ba8d3d..319764ae81a5 100644
--- a/pkgs/applications/misc/acbuild/default.nix
+++ b/pkgs/applications/misc/acbuild/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "acbuild-${version}";
-  version = "0.3.0";
+  version = "0.4.0";
 
   src = fetchFromGitHub {
     owner = "appc";
     repo = "acbuild";
     rev = "v${version}";
-    sha256 = "19f2fybz4m7d5sp1v8zkl26ig4dacr27qan9h5lxyn2v7a5z34rc";
+    sha256 = "0s81xlaw75d05b4cidxml978hnxak8parwpnk9clanwqjbj66c7x";
   };
 
   buildInputs = [ go ];
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index 871d153e9617..966df509c92d 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, python, pyqt5, sip_4_16, poppler_utils, pkgconfig, libpng
 , imagemagick, libjpeg, fontconfig, podofo, qtbase, qmakeHook, icu, sqlite
 , makeWrapper, unrarSupport ? false, chmlib, pythonPackages, xz, libusb1, libmtp
-, xdg_utils
+, xdg_utils, makeDesktopItem
 }:
 
 stdenv.mkDerivation rec {
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
   name = "calibre-${version}";
 
   src = fetchurl {
-    url = "http://download.calibre-ebook.com/${version}/${name}.tar.xz";
+    url = "https://download.calibre-ebook.com/${version}/${name}.tar.xz";
     sha256 = "0npqvfjqj1vwa7nmnsyd4d30z40brydw275ldf1jankrp6dr9dyd";
   };
 
@@ -67,11 +67,88 @@ stdenv.mkDerivation rec {
       wrapProgram $a --prefix PYTHONPATH : $PYTHONPATH \
                      --prefix PATH : ${poppler_utils.out}/bin
     done
+
+    # Replace @out@ by the output path.
+    mkdir -p $out/share/applications/
+    cp {$calibreDesktopItem,$ebookEditDesktopItem,$ebookViewerDesktopItem}/share/applications/* $out/share/applications/
+    for entry in $out/share/applications/*.desktop; do
+      substituteAllInPlace $entry
+    done
   '';
 
+  calibreDesktopItem = makeDesktopItem {
+    name = "calibre";
+    desktopName = "calibre";
+    exec = "@out@/bin/calibre --detach %F";
+    genericName = "E-book library management";
+    icon = "@out@/share/calibre/images/library.png";
+    comment = "Manage, convert, edit, and read e-books";
+    mimeType = stdenv.lib.concatStringsSep ";" [
+      "application/x-mobipocket-subscription"
+      "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
+      "text/html"
+      "application/x-cbc"
+      "application/ereader"
+      "application/oebps-package+xml"
+      "image/vnd.djvu"
+      "application/x-sony-bbeb"
+      "application/vnd.ms-word.document.macroenabled.12"
+      "text/rtf"
+      "text/x-markdown"
+      "application/pdf"
+      "application/x-cbz"
+      "application/x-mobipocket-ebook"
+      "application/x-cbr"
+      "application/x-mobi8-ebook"
+      "text/fb2+xml"
+      "application/vnd.oasis.opendocument.text"
+      "application/epub+zip"
+      "text/plain"
+      "application/xhtml+xml"
+    ];
+    categories = "Office";
+    extraEntries = ''
+      Actions=ebook-edit ebook-viewer
+
+      [Desktop Action ebook-edit]
+      Name=Edit E-book
+      Icon=@out@/share/calibre/images/tweak.png
+      Exec=@out@/bin/ebook-edit --detach %F
+
+      [Desktop Action ebook-viewer]
+      Name=E-book Viewer
+      Icon=@out@/share/calibre/images/viewer.png
+      Exec=@out@/bin/ebook-viewer --detach %F
+    '';
+  };
+
+  ebookEditDesktopItem = makeDesktopItem {
+    name = "calibre-edit-ebook";
+    desktopName = "Edit E-book";
+    genericName = "E-book Editor";
+    comment = "Edit e-books";
+    icon = "@out@/share/calibre/images/tweak.png";
+    exec = "@out@/bin/ebook-edit --detach %F";
+    categories = "Office;Publishing";
+    mimeType = "application/epub+zip";
+    extraEntries = "NoDisplay=true";
+  };
+
+  ebookViewerDesktopItem = makeDesktopItem {
+    name = "calibre-ebook-viewer";
+    desktopName = "E-book Viewer";
+    genericName = "E-book Viewer";
+    comment = "Read e-books in all the major formats";
+    icon = "@out@/share/calibre/images/viewer.png";
+    exec = "@out@/bin/ebook-viewer --detach %F";
+    categories = "Office;Viewer";
+    mimeType = "application/epub+zip";
+    extraEntries = "NoDisplay=true";
+  };
+
   meta = with stdenv.lib; {
     description = "Comprehensive e-book software";
-    homepage = http://calibre-ebook.com;
+    homepage = https://calibre-ebook.com;
     license = with licenses; if unrarSupport then unfreeRedistributable else gpl3;
     maintainers = with maintainers; [ viric domenkozar pSub AndersonTorres ];
     platforms = platforms.linux;
diff --git a/pkgs/applications/misc/fehlstart/default.nix b/pkgs/applications/misc/fehlstart/default.nix
new file mode 100644
index 000000000000..35b66299c06d
--- /dev/null
+++ b/pkgs/applications/misc/fehlstart/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, pkgconfig, gtk2, keybinder, fetchFromGitLab }:
+
+stdenv.mkDerivation {
+  name = "fehlstart-9f4342d7";
+
+  src = fetchFromGitLab {
+    owner = "fehlstart";
+    repo = "fehlstart";
+    rev = "9f4342d75ec5e2a46c13c99c34894bc275798441";
+    sha256 = "1rfzh7w6n2s9waprv7m1bhvqrk36a77ada7w655pqiwkhdj5q95i";
+  };
+
+  patches = [ ./use-nix-profiles.patch ];
+  buildInputs = [ pkgconfig gtk2 keybinder ];
+
+  preConfigure = ''
+    export PREFIX=$out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Small desktop application launcher with reasonable memory footprint";
+    homepage = https://gitlab.com/fehlstart/fehlstart;
+    licence = licenses.gpl3;
+    maintainers = [ maintainers.mounium ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/misc/fehlstart/use-nix-profiles.patch b/pkgs/applications/misc/fehlstart/use-nix-profiles.patch
new file mode 100644
index 000000000000..0c06e53f9814
--- /dev/null
+++ b/pkgs/applications/misc/fehlstart/use-nix-profiles.patch
@@ -0,0 +1,21 @@
+--- fehlstart-9f4342d75ec5e2a46c13c99c34894bc275798441-src/fehlstart.c	1970-01-01 01:00:01.000000000 +0100
++++ fehlstart.c	2016-08-10 12:21:11.231638418 +0200
+@@ -779,8 +779,15 @@
+     read_settings(setting_file, &settings);
+     update_commands();
+     g_hash_table_foreach(action_map, update_launcher, NULL);
+-    add_launchers(STR_S(APPLICATIONS_DIR_0));
+-    add_launchers(STR_S(APPLICATIONS_DIR_1));
+-    add_launchers(STR_S(USER_APPLICATIONS_DIR));
++    const char* nixprofiles = getenv("NIX_PROFILES");
++    if(nixprofiles != NULL) {
++      const char* pch = strtok(nixprofiles, " ");
++      while (pch != NULL)
++      {
++          String nix_dir = str_concat((String) { pch, strlen(pch), false },STR_S("/share/applications"));
++          add_launchers(nix_dir);
++          pch = strtok(NULL, " ");
++      }
++    }
+     return NULL;
+ }
diff --git a/pkgs/applications/misc/gsimplecal/default.nix b/pkgs/applications/misc/gsimplecal/default.nix
index 975bc3b358d8..9115fe026daa 100644
--- a/pkgs/applications/misc/gsimplecal/default.nix
+++ b/pkgs/applications/misc/gsimplecal/default.nix
@@ -32,6 +32,6 @@ stdenv.mkDerivation rec {
     '';
     license = stdenv.lib.licenses.bsd3;
     maintainers = [ stdenv.lib.maintainers.romildo ];
-    platforms = stdenv.lib.platforms.unix;
+    platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/misc/hello/default.nix b/pkgs/applications/misc/hello/default.nix
index bf63df4d154e..8a31c591b29b 100644
--- a/pkgs/applications/misc/hello/default.nix
+++ b/pkgs/applications/misc/hello/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i";
   };
 
-  doCheck = false;
+  doCheck = true;
 
   meta = {
     description = "A program that produces a familiar, friendly greeting";
diff --git a/pkgs/applications/misc/hugo/deps.json b/pkgs/applications/misc/hugo/deps.json
index 47f67d4269c4..53967d1bff09 100644
--- a/pkgs/applications/misc/hugo/deps.json
+++ b/pkgs/applications/misc/hugo/deps.json
@@ -1,44 +1,317 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-        "gopkg.in/yaml.v2",
-        "github.com/hashicorp/hcl",
-        "github.com/pkg/sftp",
-        "golang.org/x/sys",
-        "github.com/hashicorp/go-multierror",
-        "golang.org/x/crypto",
-        "github.com/pkg/errors",
-        "github.com/kr/fs",
-        "github.com/kyokomi/emoji",
-        "github.com/bep/inflect",
-        "github.com/BurntSushi/toml",
-        "github.com/PuerkitoBio/purell",
-        "github.com/PuerkitoBio/urlesc",
-        "github.com/dchest/cssmin",
-        "github.com/eknkc/amber",
-        "github.com/gorilla/websocket",
-        "github.com/kardianos/osext",
-        "github.com/miekg/mmark",
-        "github.com/mitchellh/mapstructure",
-        "github.com/russross/blackfriday",
-        "github.com/shurcooL/sanitized_anchor_name",
-        "github.com/spf13/afero",
-        "github.com/spf13/cast",
-        "github.com/spf13/jwalterweatherman",
-        "github.com/spf13/cobra",
-        "github.com/cpuguy83/go-md2man",
-        "github.com/inconshreveable/mousetrap",
-        "github.com/spf13/pflag",
-        "github.com/spf13/fsync",
-        "github.com/spf13/viper",
-        "github.com/kr/pretty",
-        "github.com/kr/text",
-        "github.com/magiconair/properties",
-        "golang.org/x/text",
-        "github.com/yosssi/ace",
-        "github.com/spf13/nitro",
-        "github.com/fsnotify/fsnotify"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/sys",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/sys",
+            "rev": "d9157a9621b69ad1d8d77a1933590c416593f24f",
+            "sha256": "1asdbp7rj1j1m1aar1a022wpcwbml6zih6cpbxaw7b2m8v8is931"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/yaml.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/yaml.v2",
+            "rev": "a83829b6f1293c91addabc89d0571c246397bbf4",
+            "sha256": "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/crypto",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/crypto",
+            "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
+            "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/gorilla/websocket",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/gorilla/websocket",
+            "rev": "a622679ebd7a3b813862379232f645f8e690e43f",
+            "sha256": "1nc9jbcmgya1i6dmf6sbcqsnxi9hbjg6dz1z0k7zmc6xdwlq0y4q"
+        }
+    },
+    {
+        "goPackagePath": "github.com/inconshreveable/mousetrap",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/inconshreveable/mousetrap",
+            "rev": "9dbb96d2c3a964935b0870b5abaea13c98b483aa",
+            "sha256": "1f9g8vm18qv1rcb745a4iahql9vfrz0jni9mnzriab2wy1pfdl5b"
+        }
+    },
+    {
+        "goPackagePath": "github.com/kardianos/osext",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/kardianos/osext",
+            "rev": "29ae4ffbc9a6fe9fb2bc5029050ce6996ea1d3bc",
+            "sha256": "1mawalaz84i16njkz6f9fd5jxhcbxkbsjnav3cmqq2dncv2hyv8a"
+        }
+    },
+    {
+        "goPackagePath": "github.com/hashicorp/hcl",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/hashicorp/hcl",
+            "rev": "54864211433d45cb780682431585b3e573b49e4a",
+            "sha256": "07l2dydzjpdgm2d4a72hkmincn455j3nrafg6hs3c23bkvizj950"
+        }
+    },
+    {
+        "goPackagePath": "github.com/hashicorp/go-multierror",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/hashicorp/go-multierror",
+            "rev": "56912fb08d85084aa318edcf2bba735b97cf35c5",
+            "sha256": "0s01cqdab2f7fxkkjjk2wqx05a1shnwlvfn45h2pi3i4gapvcn0r"
+        }
+    },
+    {
+        "goPackagePath": "github.com/BurntSushi/toml",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/BurntSushi/toml",
+            "rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4",
+            "sha256": "0gkgkw04ndr5y7hrdy0r4v2drs5srwfcw2bs1gyas066hwl84xyw"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mitchellh/mapstructure",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mitchellh/mapstructure",
+            "rev": "281073eb9eb092240d33ef253c404f1cca550309",
+            "sha256": "1zjx9fv29639sp1fn84rxs830z7gp7bs38yd5y1hl5adb8s5x1mh"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/text",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/text",
+            "rev": "5eb8d4684c4796dd36c74f6452f2c0fa6c79597e",
+            "sha256": "1cjwm2pv42dbfqc6ylr7jmma902zg4gng5aarqrbjf1k2nf2vs14"
+        }
+    },
+    {
+        "goPackagePath": "github.com/shurcooL/sanitized_anchor_name",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/shurcooL/sanitized_anchor_name",
+            "rev": "10ef21a441db47d8b13ebcc5fd2310f636973c77",
+            "sha256": "1cnbzcf47cn796rcjpph1s64qrabhkv5dn9sbynsy7m9zdwr5f01"
+        }
+    },
+    {
+        "goPackagePath": "github.com/russross/blackfriday",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/russross/blackfriday",
+            "rev": "d18b67ae0afd61dae240896eae1785f00709aa31",
+            "sha256": "1l78hz8k1ixry5fjw29834jz1q5ysjcpf6kx2ggjj1s6xh0bfzvf"
+        }
+    },
+    {
+        "goPackagePath": "github.com/yosssi/ace",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/yosssi/ace",
+            "rev": "71afeb714739f9d5f7e1849bcd4a0a5938e1a70d",
+            "sha256": "15k7ji8m3nqbwhnsvp82j4qa45sgvwv2giliw2xkdwi2g7mfrn8k"
+        }
+    },
+    {
+        "goPackagePath": "github.com/spf13/viper",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/spf13/viper",
+            "rev": "c1ccc378a054ea8d4e38d8c67f6938d4760b53dd",
+            "sha256": "0lpdzalqhqp9pwsg63inkxwjji7m0pp42ryw1499bqbjp97hriq0"
+        }
+    },
+    {
+        "goPackagePath": "github.com/spf13/pflag",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/spf13/pflag",
+            "rev": "367864438f1b1a3c7db4da06a2f55b144e6784e0",
+            "sha256": "03c6654hv4v1fj79i5sri3p9q2afqgicka4nicb6fr4kcfkkgbfp"
+        }
+    },
+    {
+        "goPackagePath": "github.com/spf13/jwalterweatherman",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/spf13/jwalterweatherman",
+            "rev": "33c24e77fb80341fe7130ee7c594256ff08ccc46",
+            "sha256": "1knvzspqzc2bh58q16zggzc8gcabjp5gr7zk4k7nx5ij4092cg0z"
+        }
+    },
+    {
+        "goPackagePath": "github.com/fsnotify/fsnotify",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/fsnotify/fsnotify",
+            "rev": "30411dbcefb7a1da7e84f75530ad3abe4011b4f8",
+            "sha256": "0kbpvyi6p9942k0vmcw5z13mja47f7hq7nqd332pn2zydss6kddm"
+        }
+    },
+    {
+        "goPackagePath": "github.com/magiconair/properties",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/magiconair/properties",
+            "rev": "c265cfa48dda6474e208715ca93e987829f572f8",
+            "sha256": "1ab9ywwsrdq5mvrcwl7m3276y1q4dfwinbv88vgpqwcqai9wkpp3"
+        }
+    },
+    {
+        "goPackagePath": "github.com/bep/inflect",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/bep/inflect",
+            "rev": "b896c45f5af983b1f416bdf3bb89c4f1f0926f69",
+            "sha256": "0drv6in94n7lmap4ajvgqlvdcbpn8alinfdzywzpihvzbx21b3h3"
+        }
+    },
+    {
+        "goPackagePath": "github.com/eknkc/amber",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/eknkc/amber",
+            "rev": "91774f050c1453128146169b626489e60108ec03",
+            "sha256": "1rb8bm35h8a77q4py6r3818cpwh7kpq1kh2ib2rb4i5s7z75ciis"
+        }
+    },
+    {
+        "goPackagePath": "github.com/spf13/afero",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/spf13/afero",
+            "rev": "1a8ecf8b9da1fb5306e149e83128fc447957d2a8",
+            "sha256": "1nrg0gmqnl4h6zjmi4mdhrwnl3l34nzxpq2hsr3nizfvrx5gqbzw"
+        }
+    },
+    {
+        "goPackagePath": "github.com/spf13/cast",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/spf13/cast",
+            "rev": "27b586b42e29bec072fe7379259cc719e1289da6",
+            "sha256": "1y73pfxdvm1bfpghwsfxj8gl4miv6fpzi9azxcknp6rcjn1gmq0x"
+        }
+    },
+    {
+        "goPackagePath": "github.com/spf13/cobra",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/spf13/cobra",
+            "rev": "bc81c21bd0d8be5ba2d6630a505d79d4467566e7",
+            "sha256": "1sp8gl25cjx0yibh6q1i8d5rbxpwaal3z8vz372wfmbz002say8r"
+        }
+    },
+    {
+        "goPackagePath": "github.com/dchest/cssmin",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/dchest/cssmin",
+            "rev": "fb8d9b44afdc258bfff6052d3667521babcb2239",
+            "sha256": "09sdijfx5d05z4cd5k6lhl7k3kbpdf2amzlngv15h5v0fff9qw4s"
+        }
+    },
+    {
+        "goPackagePath": "github.com/spf13/fsync",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/spf13/fsync",
+            "rev": "eefee59ad7de621617d4ff085cf768aab4b919b1",
+            "sha256": "0d56xdczawikyczc12i661qc79dbv4q8ihlj4p20zsjkyxxym59p"
+        }
+    },
+    {
+        "goPackagePath": "github.com/cpuguy83/go-md2man",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/cpuguy83/go-md2man",
+            "rev": "2724a9c9051aa62e9cca11304e7dd518e9e41599",
+            "sha256": "1j2bigs7ixy20cdqd246nxr417md2qcyvkfk3x94992cr88d0vyj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/miekg/mmark",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/miekg/mmark",
+            "rev": "adb5c3e2e9f3e7da9bd25291edda8e66c0045a2a",
+            "sha256": "0fycz17fj37fh95lfshdrfwrgkzi3hl1kgnily0cxc9zwfbap3qa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/spf13/nitro",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/spf13/nitro",
+            "rev": "24d7ef30a12da0bdc5e2eb370a79c659ddccf0e8",
+            "sha256": "143sbpx0jdgf8f8ayv51x6l4jg6cnv6nps6n60qxhx4vd90s6mib"
+        }
+    },
+    {
+        "goPackagePath": "github.com/PuerkitoBio/purell",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/PuerkitoBio/purell",
+            "rev": "1d5d1cfad45d42ec5f81fa8ef23de09cebc6dcc3",
+            "sha256": "12k82576ka21c6572yy2v81kxpjrgf9mffjlz469g3vs0g3nkwlb"
+        }
+    },
+    {
+        "goPackagePath": "github.com/pkg/sftp",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/pkg/sftp",
+            "rev": "d4c18e7ffdc496a38de67dde6e29b2f364afc472",
+            "sha256": "0cnl83k317gxskayfj3xwr4bl0vcbjvlwi3q0vjwvircynb6xscj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/kr/fs",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/kr/fs",
+            "rev": "2788f0dbd16903de03cb8186e5c7d97b69ad387b",
+            "sha256": "1c0fipl4rsh0v5liq1ska1dl83v3llab4k6lm8mvrx9c4dyp71ly"
+        }
+    },
+    {
+        "goPackagePath": "github.com/kyokomi/emoji",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/kyokomi/emoji",
+            "rev": "17c5e7085c9d59630aa578df67f4469481fbe7a9",
+            "sha256": "0qs4mi7z1lghiyiw7s2bz5y959wj9ifmhyqh39xwqk69d690jwlp"
+        }
+    },
+    {
+        "goPackagePath": "github.com/pkg/errors",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/pkg/errors",
+            "rev": "494e70f7620561491c2ca11e185bbef4b70060da",
+            "sha256": "0a0961ixl67vryhnzyzhai357c9n9a7v3vpkpqrh32spn033gjd9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/PuerkitoBio/urlesc",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/PuerkitoBio/urlesc",
+            "rev": "5fa9ff0392746aeae1c4b37fcc42c65afa7a9587",
+            "sha256": "0dppkmfs0hb5vcqli191x9yss5vvlx29qxjcywhdfirc89rn0sni"
+        }
+    }
 ]
diff --git a/pkgs/applications/misc/mop/deps.json b/pkgs/applications/misc/mop/deps.json
index e1b40df83104..d2c59589dc22 100644
--- a/pkgs/applications/misc/mop/deps.json
+++ b/pkgs/applications/misc/mop/deps.json
@@ -1,8 +1,11 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/nsf/termbox-go"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/nsf/termbox-go",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/nsf/termbox-go",
+            "rev": "9aecf65084a5754f12d27508fa2e6ed56851953b",
+            "sha256": "16sak07bgvmax4zxfrd4jia1dgygk733xa8vk8cdx28z98awbfsh"
+        }
+    }
 ]
diff --git a/pkgs/applications/misc/playonlinux/default.nix b/pkgs/applications/misc/playonlinux/default.nix
index 4bf6e36f1d26..4050f8bf5894 100644
--- a/pkgs/applications/misc/playonlinux/default.nix
+++ b/pkgs/applications/misc/playonlinux/default.nix
@@ -24,7 +24,7 @@
 assert stdenv.isLinux;
 
 let
-  version = "4.2.9";
+  version = "4.2.10";
 
   binpath = stdenv.lib.makeBinPath
     [ cabextract
@@ -57,7 +57,7 @@ in stdenv.mkDerivation {
 
   src = fetchurl {
     url = "https://www.playonlinux.com/script_files/PlayOnLinux/${version}/PlayOnLinux_${version}.tar.gz";
-    sha256 = "89bb0fd7cce8cf598ebf38cad716b8587eaca5b916d54386fb24b3ff66b48624";
+    sha256 = "0ws94hgxajaww450q8ivrp28ypv39mashs29ak41faxf29cr097m";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/applications/misc/timewarrior/default.nix b/pkgs/applications/misc/timewarrior/default.nix
index 5864a07fde72..e67c141f3582 100644
--- a/pkgs/applications/misc/timewarrior/default.nix
+++ b/pkgs/applications/misc/timewarrior/default.nix
@@ -14,8 +14,8 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ];
 
   installPhase = ''
-    mkdir -p $out/{bin,share}
-    cp -rv doc/man $out/share/
+    mkdir -p $out/{bin,share/man/man1}
+    cp -rv doc/man/*.1 $out/share/man/man1
     cp src/timew $out/bin/
   '';
 
diff --git a/pkgs/applications/misc/wego/deps.json b/pkgs/applications/misc/wego/deps.json
index 2255fdeb69e3..5bfb64ffbc5f 100644
--- a/pkgs/applications/misc/wego/deps.json
+++ b/pkgs/applications/misc/wego/deps.json
@@ -1,10 +1,29 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/mattn/go-colorable",
-      "github.com/mattn/go-runewidth",
-      "github.com/schachmat/ingo"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/mattn/go-runewidth",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mattn/go-runewidth",
+            "rev": "d6bea18f789704b5f83375793155289da36a3c7f",
+            "sha256": "1hnigpn7rjbwd1ircxkyx9hvi0xmxr32b2jdy2jzw6b3jmcnz1fs"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mattn/go-colorable",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mattn/go-colorable",
+            "rev": "3dac7b4f76f6e17fb39b768b89e3783d16e237fe",
+            "sha256": "08680mba8hh2rghymqbzd4m40r9k765w5kbzvrif9ngd6h85qnw6"
+        }
+    },
+    {
+        "goPackagePath": "github.com/schachmat/ingo",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/schachmat/ingo",
+            "rev": "fab41e4e62cbef5d92998746ec25f7e195100f38",
+            "sha256": "04yfnch7pdabjjqfl2qxjmsaknvp4m1rbjlv8qrpmnqwjkxzx0hb"
+        }
+    }
 ]
diff --git a/pkgs/applications/misc/wikicurses/default.nix b/pkgs/applications/misc/wikicurses/default.nix
index 54e56785071d..2b11ccf58379 100644
--- a/pkgs/applications/misc/wikicurses/default.nix
+++ b/pkgs/applications/misc/wikicurses/default.nix
@@ -9,6 +9,16 @@ pythonPackages.buildPythonApplication rec {
     sha256 = "1yxgafk1sczg1xi2p6nhrvr3hchp7ydw98n48lp3qzwnryn1kxv8";
   };
 
+  patches = [
+    # This is necessary to build without a config file.
+    # It can be safely removed after updating to wikicurses to 1.4
+    # or when commit 4b944ac339312b642c6dc5d6b5a2f7be7503218f is included
+    (fetchurl {
+      url = "https://github.com/ids1024/wikicurses/commit/4b944ac339312b642c6dc5d6b5a2f7be7503218f.patch";
+      sha256 = "0ii4b0c4hb1zdhcpp4ij908mfy5b8khpm1l7xr7lp314lfhsg9as";
+    })
+  ];
+
   propagatedBuildInputs = with pythonPackages; [ urwid beautifulsoup4 lxml ];
 
   meta = {
diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index 049c1128b9fa..f2c37d9e9737 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -96,7 +96,7 @@ in stdenv.mkDerivation {
       ${concatMapStringsSep " " getWrapperFlags chromium.plugins.enabled}
 
     cp -v "${launchScript}" "$out/bin/chromium"
-    substituteInPlace $out/bin/chromium --replace @out@ $out --replace @sandbox@ $sandbox
+    substituteInPlace $out/bin/chromium --subst-var out --subst-var sandbox
     chmod 755 "$out/bin/chromium"
 
     ln -sv "${chromium.browser.sandbox}" "$sandbox"
diff --git a/pkgs/applications/networking/browsers/firefox/default.nix b/pkgs/applications/networking/browsers/firefox/default.nix
index eaa60084b6d0..bc170cfdafdc 100644
--- a/pkgs/applications/networking/browsers/firefox/default.nix
+++ b/pkgs/applications/networking/browsers/firefox/default.nix
@@ -47,7 +47,6 @@ common = { pname, version, sha512 }: stdenv.mkDerivation rec {
 
   configureFlags =
     [ "--enable-application=browser"
-      "--disable-javaxpcom"
       "--with-system-jpeg"
       "--with-system-zlib"
       "--with-system-bz2"
@@ -64,11 +63,9 @@ common = { pname, version, sha512 }: stdenv.mkDerivation rec {
       #"--enable-system-cairo"
       "--enable-startup-notification"
       "--enable-content-sandbox"            # available since 26.0, but not much info available
-      "--disable-content-sandbox-reporter"  # keeping disabled for now
       "--disable-crashreporter"
       "--disable-tests"
       "--disable-necko-wifi" # maybe we want to enable this at some point
-      "--disable-installer"
       "--disable-updater"
       "--enable-jemalloc"
       "--disable-gconf"
@@ -135,8 +132,8 @@ in {
 
   firefox-unwrapped = common {
     pname = "firefox";
-    version = "47.0.1";
-    sha512 = "f79c53b9acf0d96917aa11e57092a4e540ce694471123ef8e616e15864195fab7b37235ebd37367e4d0cc8e594a881a30c973075cc97346ef6f88d92944c0312";
+    version = "48.0";
+    sha512 = "51bbb1954920b4d0e49e2834939748e596ed27c09a45adeea2be2cfbd32898dae41f13db17318e9699fa96c41fb50fba9966df1f88deeadc0ae3bdd679bd79c5";
   };
 
   firefox-esr-unwrapped = common {
diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix
index 78edcff30cce..2bc1a643db70 100644
--- a/pkgs/applications/networking/cluster/terraform/default.nix
+++ b/pkgs/applications/networking/cluster/terraform/default.nix
@@ -15,10 +15,10 @@ buildGoPackage rec {
   };
 
   postInstall = ''
-    # prefix all the plugins with "terraform-"
+    # remove all plugins, they are part of the main binary now
     for i in $bin/bin/*; do
       if [[ $(basename $i) != terraform ]]; then
-        mv -v $i $bin/bin/terraform-$(basename $i);
+        rm "$i"
       fi
     done
   '';
diff --git a/pkgs/applications/networking/drive/deps.json b/pkgs/applications/networking/drive/deps.json
index 3d71a76de8a6..a1d1fde7727d 100644
--- a/pkgs/applications/networking/drive/deps.json
+++ b/pkgs/applications/networking/drive/deps.json
@@ -1,26 +1,164 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/boltdb/bolt",
-      "github.com/cheggaaa/pb",
-      "github.com/odeke-em/cli-spinner",
-      "github.com/odeke-em/statos",
-      "golang.org/x/oauth2",
-      "github.com/odeke-em/exponential-backoff",
-      "github.com/odeke-em/extractor",
-      "github.com/odeke-em/meddler",
-      "github.com/odeke-em/xon",
-      "github.com/odeke-em/cache",
-      "github.com/odeke-em/drive",
-      "github.com/odeke-em/command",
-      "github.com/odeke-em/log",
-      "github.com/odeke-em/pretty-words",
-      "github.com/skratchdot/open-golang",
-      "google.golang.org/cloud",
-      "google.golang.org/api",
-      "github.com/mattn/go-isatty",
-      "golang.org/x/net"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/net",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/net",
+            "rev": "62ac18b461605b4be188bbc7300e9aa2bc836cd4",
+            "sha256": "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p"
+        }
+    },
+    {
+        "goPackagePath": "google.golang.org/api",
+        "fetch": {
+            "type": "git",
+            "url": "https://code.googlesource.com/google-api-go-client",
+            "rev": "a5c3e2a4792aff40e59840d9ecdff0542a202a80",
+            "sha256": "1kigddnbyrl9ddpj5rs8njvf1ck54ipi4q1282k0d6b3am5qfbj8"
+        }
+    },
+    {
+        "goPackagePath": "google.golang.org/cloud",
+        "fetch": {
+            "type": "git",
+            "url": "https://code.googlesource.com/gocloud",
+            "rev": "6335269abf9002cf5a84613c13cda6010842b834",
+            "sha256": "15xrqxna5ms0r634k3bfzyymn431dvqcjwbsap8ay60x371kzbwf"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/oauth2",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/oauth2",
+            "rev": "397fe7649477ff2e8ced8fc0b2696f781e53745a",
+            "sha256": "0fza0l7iwh6llkq2yzqn7dxi138vab0da64lnghfj1p71fprjzn8"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mattn/go-isatty",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mattn/go-isatty",
+            "rev": "ae0b1f8f8004be68d791a576e3d8e7648ab41449",
+            "sha256": "0qrcsh7j9mxcaspw8lfxh9hhflz55vj4aq1xy00v78301czq6jlj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/boltdb/bolt",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/boltdb/bolt",
+            "rev": "957d850b5158a4eebf915476058e720f43459584",
+            "sha256": "193adhhsqdy0kyq1l1fi8pg2n6pwyrw4h607qm78qyi26f8i7vzf"
+        }
+    },
+    {
+        "goPackagePath": "github.com/cheggaaa/pb",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/cheggaaa/pb",
+            "rev": "e648e12b78cedf14ebb2fc1855033f07b034cfbb",
+            "sha256": "03k4cars7hcqqgdsd0minfls2p7gjpm8q6y8vknh1s68kvxd4xam"
+        }
+    },
+    {
+        "goPackagePath": "github.com/odeke-em/cli-spinner",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/odeke-em/cli-spinner",
+            "rev": "610063bb4aeef25f7645b3e6080456655ec0fb33",
+            "sha256": "13wzs2qrxd72ah32ym0ppswhvyimjw5cqaq3q153y68vlvxd048c"
+        }
+    },
+    {
+        "goPackagePath": "github.com/odeke-em/statos",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/odeke-em/statos",
+            "rev": "f27d6ab69b62abd9d9fe80d355e23a3e45d347d6",
+            "sha256": "17cpks8bi9i7p8j38x0wy60jb9g39wbzszcmhx4hlq6yzxr04jvs"
+        }
+    },
+    {
+        "goPackagePath": "github.com/odeke-em/exponential-backoff",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/odeke-em/exponential-backoff",
+            "rev": "96e25d36ae36ad09ac02cbfe653b44c4043a8e09",
+            "sha256": "1as21p2jj8xpahvdxqwsw2i1s3fll14dlc9j192iq7xl1ybwpqs6"
+        }
+    },
+    {
+        "goPackagePath": "github.com/odeke-em/extractor",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/odeke-em/extractor",
+            "rev": "801861aedb854c7ac5e1329e9713023e9dc2b4d4",
+            "sha256": "036zmnqxy48h6mxiwywgxix2p4fqvl4svlmcp734ri2rbq3cmxs1"
+        }
+    },
+    {
+        "goPackagePath": "github.com/odeke-em/meddler",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/odeke-em/meddler",
+            "rev": "d2b51d2b40e786ab5f810d85e65b96404cf33570",
+            "sha256": "0m0fqrn3kxy4swyk4ja1y42dn1i35rq9j85y11wb222qppy2342x"
+        }
+    },
+    {
+        "goPackagePath": "github.com/odeke-em/xon",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/odeke-em/xon",
+            "rev": "d580be739d723da4f6378083128f93017b8ab295",
+            "sha256": "07a7zj01d4a23xqp01m48jp2v5mw49islf4nbq2rj13sd5w4s6sc"
+        }
+    },
+    {
+        "goPackagePath": "github.com/odeke-em/cache",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/odeke-em/cache",
+            "rev": "b51b08cb6cf889deda6c941a5205baecfd16f3eb",
+            "sha256": "1rmm1ky7irqypqjkk6qcd2n0xkzpaggdxql9dp9i9qci5rvvwwd4"
+        }
+    },
+    {
+        "goPackagePath": "github.com/odeke-em/command",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/odeke-em/command",
+            "rev": "91ca5ec5e9a1bc2668b1ccbe0967e04a349e3561",
+            "sha256": "1ghckzr8h99ckagpmb15p61xazdjmf9mjmlym634hsr9vcj84v62"
+        }
+    },
+    {
+        "goPackagePath": "github.com/odeke-em/log",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/odeke-em/log",
+            "rev": "cad53c4565a0b0304577bd13f3862350bdc5f907",
+            "sha256": "059c933qjikxlvaywzpzljqnab19svymbv6x32pc7khw156fh48w"
+        }
+    },
+    {
+        "goPackagePath": "github.com/odeke-em/pretty-words",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/odeke-em/pretty-words",
+            "rev": "9d37a7fcb4ae6f94b288d371938482994458cecb",
+            "sha256": "1466wjhrg9lhqmzil1vf8qj16fxk32b5kxlcccyw2x6dybqa6pkl"
+        }
+    },
+    {
+        "goPackagePath": "github.com/skratchdot/open-golang",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/skratchdot/open-golang",
+            "rev": "c8748311a7528d0ba7330d302adbc5a677ef9c9e",
+            "sha256": "0qhn2d00v3m9fiqk9z7swdm599clc6j7rnli983s8s1byyp0x3ac"
+        }
+    }
 ]
diff --git a/pkgs/applications/networking/ftp/filezilla/default.nix b/pkgs/applications/networking/ftp/filezilla/default.nix
index 7293bae50a7a..eb95647ff0f8 100644
--- a/pkgs/applications/networking/ftp/filezilla/default.nix
+++ b/pkgs/applications/networking/ftp/filezilla/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, dbus, gnutls, wxGTK30, libidn, tinyxml, gettext
 , pkgconfig, xdg_utils, gtk2, sqlite, pugixml, libfilezilla, nettle }:
 
-let version = "3.20.0"; in
+let version = "3.20.1"; in
 stdenv.mkDerivation {
   name = "filezilla-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/project/filezilla/FileZilla_Client/${version}/FileZilla_${version}_src.tar.bz2";
-    sha256 = "0clfw266c980w2kjl4xm56d80ixpv8lj675p58hv2bz70ihxpwaa";
+    sha256 = "0bcy0j89y2mpjyzwnz1qa33412n7yl0g8px2r4v7gla25r2x5qwa";
   };
 
   configureFlags = [
diff --git a/pkgs/applications/networking/instant-messengers/baresip/default.nix b/pkgs/applications/networking/instant-messengers/baresip/default.nix
index acc0ddd43d36..e4a732ba66d8 100644
--- a/pkgs/applications/networking/instant-messengers/baresip/default.nix
+++ b/pkgs/applications/networking/instant-messengers/baresip/default.nix
@@ -4,11 +4,11 @@
 , gsm, speex, portaudio, spandsp, libuuid
 }:
 stdenv.mkDerivation rec {
-  version = "0.4.19";
+  version = "0.4.20";
   name = "baresip-${version}";
   src=fetchurl {
     url = "http://www.creytiv.com/pub/baresip-${version}.tar.gz";
-    sha256 = "1ldh3sc4n19vsjfc1f3kbrin7djb1z6y1rkisc5f6zjx4bd6535v";
+    sha256 = "0m8afbfdc9a57cy94ny7g6jv2ndfmrvkx0lgk64i8w870958gkwb";
   };
   buildInputs = [zlib openssl libre librem pkgconfig
     cairo mpg123 gstreamer gst_ffmpeg gst_plugins_base gst_plugins_bad gst_plugins_good
diff --git a/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-skypeweb/default.nix b/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-skypeweb/default.nix
index 1c717eb97fba..533c0ba48ba7 100644
--- a/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-skypeweb/default.nix
+++ b/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-skypeweb/default.nix
@@ -1,20 +1,17 @@
 { stdenv, fetchFromGitHub, pkgconfig, pidgin, json_glib }:
 
-let
-  rev = "b92a05c67e";
-  date = "2015-10-02";
-in
 stdenv.mkDerivation rec {
-  name = "pidgin-skypeweb-${date}-${rev}";
+  name = "pidgin-skypeweb-${version}";
+  version = "1.2.1";
 
   src = fetchFromGitHub {
     owner = "EionRobb";
     repo = "skype4pidgin";
-    rev = "${rev}";
-    sha256 = "00r57w9iwx2yp68ld6f3zkhf53vsk679b42w3xxla6bqblpcxzxl";
+    rev = "${version}";
+    sha256 = "0qmqf1r9kc7r6rgzz0byyq7yf5spsl2iima0cvxafs43gn4hnc2z";
   };
 
-  sourceRoot = "skype4pidgin-${rev}-src/skypeweb";
+  sourceRoot = "skype4pidgin-${version}-src/skypeweb";
 
   buildInputs = [ pkgconfig pidgin json_glib ];
 
@@ -28,7 +25,7 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     homepage = https://github.com/EionRobb/skype4pidgin;
-    description = "SkypeWeb Plugin for Pidgin";
+    description = "SkypeWeb plugin for Pidgin";
     license = licenses.gpl3;
     platforms = platforms.linux;
     maintainers = with maintainers; [ jgeerds ];
diff --git a/pkgs/applications/networking/instant-messengers/pond/deps.json b/pkgs/applications/networking/instant-messengers/pond/deps.json
index 53f48df3b553..c4d600a2ab3e 100644
--- a/pkgs/applications/networking/instant-messengers/pond/deps.json
+++ b/pkgs/applications/networking/instant-messengers/pond/deps.json
@@ -1,12 +1,47 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "golang.org/x/net",
-      "github.com/golang/protobuf",
-      "github.com/agl/ed25519",
-      "golang.org/x/crypto",
-      "github.com/agl/go-gtk"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/crypto",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/crypto",
+            "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
+            "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/agl/ed25519",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/agl/ed25519",
+            "rev": "278e1ec8e8a6e017cd07577924d6766039146ced",
+            "sha256": "165d89cc6dl28j4hkn86pny0jz3sa6hamzdvpvwdj4iha3x6lzc9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/net",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/net",
+            "rev": "62ac18b461605b4be188bbc7300e9aa2bc836cd4",
+            "sha256": "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p"
+        }
+    },
+    {
+        "goPackagePath": "github.com/agl/go-gtk",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/agl/go-gtk",
+            "rev": "91c1edb38c241d73129e6b098ca1c9fa83abfc15",
+            "sha256": "156ixlhakpqgyp35rsvmndrqz8aggv5bcmzg9ynpri3b9j6kim4d"
+        }
+    }
 ]
diff --git a/pkgs/applications/networking/instant-messengers/teamspeak/client.nix b/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
index 24edbc856436..36a91716f5ea 100644
--- a/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
+++ b/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
@@ -31,7 +31,7 @@ in
 stdenv.mkDerivation rec {
   name = "teamspeak-client-${version}";
 
-  version = "3.0.19.3";
+  version = "3.0.19.4";
 
   src = fetchurl {
     urls = [
@@ -39,8 +39,8 @@ stdenv.mkDerivation rec {
       "http://teamspeak.gameserver.gamed.de/ts3/releases/${version}/TeamSpeak3-Client-linux_${arch}-${version}.run"
     ];
     sha256 = if stdenv.is64bit
-                then "05620qqi8plxsrzj92g306a0l8wg1pd2l66vpmj71vs0f5lms6p4"
-                else "07b2120pa8nyvnvh48vp5vqq7xlxg6vrrx67azz9kfcdzbbarcv9";
+                then "f74617d2a2f5cb78e0ead345e6ee66c93e4a251355779018fd060828e212294a"
+                else "e11467dc1732ddc21ec0d86c2853c322af7a6b8307e3e8dfebc6b4b4d7404841";
   };
 
   # grab the plugin sdk for the desktop icon
diff --git a/pkgs/applications/networking/instant-messengers/vacuum/default.nix b/pkgs/applications/networking/instant-messengers/vacuum/default.nix
index 2b5ce5f4142c..0572e3f9e2e9 100644
--- a/pkgs/applications/networking/instant-messengers/vacuum/default.nix
+++ b/pkgs/applications/networking/instant-messengers/vacuum/default.nix
@@ -16,6 +16,11 @@ stdenv.mkDerivation rec {
     qt4 openssl xproto libX11 libXScrnSaver scrnsaverproto xz zlib
   ];
 
+  # hack: needed to fix build issues in
+  # http://hydra.nixos.org/build/38322959/nixlog/1
+  # should be an upstream issue but it's easy to fix
+  NIX_LDFLAGS = "-lz";
+
   nativeBuildInputs = [ qmake4Hook ];
 
   preConfigure = ''
diff --git a/pkgs/applications/networking/instant-messengers/xmpp-client/deps.json b/pkgs/applications/networking/instant-messengers/xmpp-client/deps.json
index a5fd7fc3aa7c..7ac2b86cc21f 100644
--- a/pkgs/applications/networking/instant-messengers/xmpp-client/deps.json
+++ b/pkgs/applications/networking/instant-messengers/xmpp-client/deps.json
@@ -1,9 +1,20 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "golang.org/x/crypto",
-      "golang.org/x/net"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/net",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/net",
+            "rev": "62ac18b461605b4be188bbc7300e9aa2bc836cd4",
+            "sha256": "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/crypto",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/crypto",
+            "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
+            "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
+        }
+    }
 ]
diff --git a/pkgs/applications/networking/syncthing012/deps.json b/pkgs/applications/networking/syncthing012/deps.json
index 75e10397017a..b21f2ef6a168 100644
--- a/pkgs/applications/networking/syncthing012/deps.json
+++ b/pkgs/applications/networking/syncthing012/deps.json
@@ -1,21 +1,128 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/bkaradzic/go-lz4",
-      "github.com/calmh/luhn",
-      "golang.org/x/text",
-      "github.com/kardianos/osext",
-      "github.com/vitrun/qart",
-      "github.com/calmh/du",
-      "github.com/calmh/xdr",
-      "github.com/juju/ratelimit",
-      "github.com/thejerf/suture",
-      "github.com/golang/snappy",
-      "github.com/rcrowley/go-metrics",
-      "github.com/syndtr/goleveldb",
-      "golang.org/x/crypto",
-      "golang.org/x/net"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/crypto",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/crypto",
+            "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
+            "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/net",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/net",
+            "rev": "62ac18b461605b4be188bbc7300e9aa2bc836cd4",
+            "sha256": "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p"
+        }
+    },
+    {
+        "goPackagePath": "github.com/rcrowley/go-metrics",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/rcrowley/go-metrics",
+            "rev": "1ce93efbc8f9c568886b2ef85ce305b2217b3de3",
+            "sha256": "06gg72krlmd0z3zdq6s716blrga95pyj8dc2f2psfbknbkyrkfqa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/kardianos/osext",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/kardianos/osext",
+            "rev": "29ae4ffbc9a6fe9fb2bc5029050ce6996ea1d3bc",
+            "sha256": "1mawalaz84i16njkz6f9fd5jxhcbxkbsjnav3cmqq2dncv2hyv8a"
+        }
+    },
+    {
+        "goPackagePath": "github.com/bkaradzic/go-lz4",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/bkaradzic/go-lz4",
+            "rev": "74ddf82598bc4745b965729e9c6a463bedd33049",
+            "sha256": "1vdid8v0c2v2qhrg9rzn3l7ya1h34jirrxfnir7gv7w6s4ivdvc1"
+        }
+    },
+    {
+        "goPackagePath": "github.com/calmh/luhn",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/calmh/luhn",
+            "rev": "0c8388ff95fa92d4094011e5a04fc99dea3d1632",
+            "sha256": "1hfj1lx7wdpifn16zqrl4xml6cj5gxbn6hfz1f46g2a6bdf0gcvs"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/text",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/text",
+            "rev": "5eb8d4684c4796dd36c74f6452f2c0fa6c79597e",
+            "sha256": "1cjwm2pv42dbfqc6ylr7jmma902zg4gng5aarqrbjf1k2nf2vs14"
+        }
+    },
+    {
+        "goPackagePath": "github.com/vitrun/qart",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/vitrun/qart",
+            "rev": "ccb109cf25f0cd24474da73b9fee4e7a3e8a8ce0",
+            "sha256": "0bhp768b8ha6f25dmhwn9q8m2lkbn4qnjf8n7pizk25jn5zjdvc8"
+        }
+    },
+    {
+        "goPackagePath": "github.com/calmh/du",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/calmh/du",
+            "rev": "3c0690cca16228b97741327b1b6781397afbdb24",
+            "sha256": "1mv6mkbslfc8giv47kyl97ny0igb3l7jya5hc75sm54xi6g205wa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/calmh/xdr",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/calmh/xdr",
+            "rev": "e467b5aeb65ca8516fb3925c84991bf1d7cc935e",
+            "sha256": "1bi4b2xkjzcr0vq1wxz14i9943k71sj092dam0gdmr9yvdrg0nra"
+        }
+    },
+    {
+        "goPackagePath": "github.com/juju/ratelimit",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/juju/ratelimit",
+            "rev": "772f5c38e468398c4511514f4f6aa9a4185bc0a0",
+            "sha256": "02rs61ay6sq499lxxszjsrxp33m6zklds1xrmnr5fk73vpqfa28p"
+        }
+    },
+    {
+        "goPackagePath": "github.com/thejerf/suture",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/thejerf/suture",
+            "rev": "99c1f2d613756768fc4299acd9dc621e11ed3fd7",
+            "sha256": "094ksr2nlxhvxr58nbnzzk0prjskb21r86jmxqjr3rwg4rkwn6d4"
+        }
+    },
+    {
+        "goPackagePath": "github.com/golang/snappy",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/snappy",
+            "rev": "723cc1e459b8eea2dea4583200fd60757d40097a",
+            "sha256": "0bprq0qb46f5511b5scrdqqzskqqi2z8b4yh3216rv0n1crx536h"
+        }
+    },
+    {
+        "goPackagePath": "github.com/syndtr/goleveldb",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/syndtr/goleveldb",
+            "rev": "1a9d62f03ea92815b46fcaab357cfd4df264b1a0",
+            "sha256": "04ywbif36fiah4fw0x2abr5q3p4fdhi6q57d5icc2mz03q889vhb"
+        }
+    }
 ]
diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix
index 6b206bb13d9b..9eaaf9035850 100644
--- a/pkgs/applications/office/libreoffice/default.nix
+++ b/pkgs/applications/office/libreoffice/default.nix
@@ -22,9 +22,9 @@ let
   lib = stdenv.lib;
   langsSpaces = lib.concatStringsSep " " langs;
   major = "5";
-  minor = "1";
-  patch = "3";
-  tweak = "2";
+  minor = "2";
+  patch = "0";
+  tweak = "4";
   subdir = "${major}.${minor}.${patch}";
   version = "${subdir}${if tweak == "" then "" else "."}${tweak}";
 
@@ -50,14 +50,14 @@ let
 
     translations = fetchSrc {
       name = "translations";
-      sha256 = "039gjg4295x9f3hj0bh32csp63gbfns1sj7wk5mv51szdz50a8zi";
+      sha256 = "0a3dnqm9k1skp7jvg354fdn84y0ylvnjzpd4v2r2mbz8vc4p3ld5";
     };
 
     # TODO: dictionaries
 
     help = fetchSrc {
       name = "help";
-      sha256 = "0fq9wqzvbs6x003ljvhwbnq7vglzcq3yylndv0kp1mj00dkyz3gm";
+      sha256 = "1gyakwbbsd3aykf0gsanyg6p4g4qixj1rh6qxspln70afl3kxm90";
     };
 
   };
@@ -66,7 +66,7 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://download.documentfoundation.org/libreoffice/src/${subdir}/libreoffice-${version}.tar.xz";
-    sha256 = "1i077hz24kz1wmnvw9xicmm1mrr9msdxq4lg3y0hy47ar6kiqnnd";
+    sha256 = "1v3bbk2afq61gs3l4qvc1r6y0ylr21jzbm3wcnyq9c3bbyw43pj7";
   };
 
   # Openoffice will open libcups dynamically, so we link it directly
@@ -128,6 +128,13 @@ in stdenv.mkDerivation rec {
     sed -e '/CPPUNIT_TEST(testTdf96536);/d' -i sw/qa/extras/uiwriter/uiwriter.cxx
     # rendering-dependent test
     sed -e '/CPPUNIT_ASSERT_EQUAL(11148L, pOleObj->GetLogicRect().getWidth());/d ' -i sc/qa/unit/subsequent_filters-test.cxx
+    # tilde expansion in path processing checks the existence of $HOME
+    sed -e 's@rtl::OString sSysPath("~/tmp");@& return ; @' -i sal/qa/osl/file/osl_File.cxx
+    # rendering-dependent: on my computer the test table actually doesn't fit…
+    # interesting fact: test disabled on macOS by upstream
+    sed -re '/DECLARE_WW8EXPORT_TEST[(]testTableKeep, "tdf91083.odt"[)]/,+5d' -i ./sw/qa/extras/ww8export/ww8export.cxx
+    # Segfault on DB access — maybe temporarily acceptable for a new version of Fresh?
+    sed -e 's/CppunitTest_dbaccess_empty_stdlib_save//' -i ./dbaccess/Module_dbaccess.mk
   '';
 
   makeFlags = "SHELL=${bash}/bin/bash";
@@ -215,7 +222,6 @@ in stdenv.mkDerivation rec {
     "--without-system-hsqldb"
     "--without-system-altlinuxhyph"
     "--without-system-lpsolve"
-    "--without-system-npapi-headers"
     "--without-system-libetonyek"
     "--without-system-libfreehand"
     "--without-system-liblangtag"
@@ -249,6 +255,10 @@ in stdenv.mkDerivation rec {
     ]
     ++ lib.optional kdeIntegration kde4.kdelibs;
 
+  passthru = {
+    inherit srcs;
+  };
+
   meta = with lib; {
     description = "Comprehensive, professional-quality productivity suite, a variant of openoffice.org";
     homepage = http://libreoffice.org/;
diff --git a/pkgs/applications/office/libreoffice/generate-libreoffice-srcs.sh b/pkgs/applications/office/libreoffice/generate-libreoffice-srcs.sh
index bba1ad9c213d..0c92a1c5553f 100755
--- a/pkgs/applications/office/libreoffice/generate-libreoffice-srcs.sh
+++ b/pkgs/applications/office/libreoffice/generate-libreoffice-srcs.sh
@@ -33,15 +33,18 @@ while read line; do
     *_MD5SUM\ :=*)
       read tbline;
       line=${line##* };
+      line=${line##*:=};
       if [ "${tbline#*VERSION_MICRO}" != "$tbline" ]; then
          verline=${tbline##* };
          read tbline;
          tbline=${tbline##* };
+         tbline=${tbline##*:=};
          md5=$line
          name=$tbline;
          name="${name/\$([A-Z]*_VERSION_MICRO)/$verline}"
       else
          tbline=${tbline##* };
+         tbline=${tbline##*:=};
          md5=$line
          name=$tbline;
       fi
@@ -50,6 +53,7 @@ while read line; do
       ;;
     *_TARBALL\ :=*)
       line=${line##* };
+      line=${line##*:=};
       line="${line#,}"
       md5=${line:0:32};
       name=${line:33};
diff --git a/pkgs/applications/office/libreoffice/libreoffice-srcs-still.nix b/pkgs/applications/office/libreoffice/libreoffice-srcs-still.nix
index a70d5a7c77c3..0d626728c9a4 100644
--- a/pkgs/applications/office/libreoffice/libreoffice-srcs-still.nix
+++ b/pkgs/applications/office/libreoffice/libreoffice-srcs-still.nix
@@ -5,21 +5,6 @@
   brief = true;
 }
 {
-  name = "commons-codec-1.6-src.tar.gz";
-  md5 = "2e482c7567908d334785ce7d69ddfff7";
-  brief = false;
-}
-{
-  name = "commons-httpclient-3.1-src.tar.gz";
-  md5 = "2c9b0f83ed5890af02c0df1c1776f39b";
-  brief = false;
-}
-{
-  name = "commons-lang-2.4-src.tar.gz";
-  md5 = "625ff5f2f968dd908bca43c9469d6e6b";
-  brief = false;
-}
-{
   name = "commons-logging-1.2-src.tar.gz";
   md5 = "ce977548f1cbf46918e93cd38ac35163";
   brief = true;
@@ -35,9 +20,9 @@
   brief = true;
 }
 {
-  name = "boost_1_55_0.tar.bz2";
-  md5 = "d6eef4b4cacb2183f2bf265a5a03a354";
-  brief = false;
+  name = "boost_1_59_0.tar.bz2";
+  md5 = "6aa9a5c6a4ca1016edd0ed1178e3cb87";
+  brief = true;
 }
 {
   name = "bsh-2.0b5-src.zip";
@@ -45,13 +30,18 @@
   brief = false;
 }
 {
+  name = "bzip2-1.0.6.tar.gz";
+  md5 = "00b516f4704d4a7cb50a1d97e6e8e15b";
+  brief = false;
+}
+{
   name = "cairo-1.10.2.tar.gz";
   md5 = "f101a9e88b783337b20b2e26dfd26d5f";
   brief = false;
 }
 {
-  name = "libcdr-0.1.1.tar.bz2";
-  md5 = "b33fd0be3befdd1b37777e08ce058bd9";
+  name = "libcdr-0.1.2.tar.bz2";
+  md5 = "6e3062b55b149d7b3c6aedb3bb5b86e2";
   brief = true;
 }
 {
@@ -100,18 +90,18 @@
   brief = false;
 }
 {
-  name = "libetonyek-0.1.3.tar.bz2";
-  md5 = "e5947373dd7834f27e93f1636faa419f";
+  name = "libetonyek-0.1.6.tar.bz2";
+  md5 = "77ff46936dcc83670557274e7dd2aa33";
   brief = true;
 }
 {
-  name = "expat-2.1.0.tar.gz";
-  md5 = "dd7dab7a5fea97d2a6a43f511449b7cd";
-  brief = false;
+  name = "expat-2.1.1.tar.bz2";
+  md5 = "7380a64a8e3a9d66a9887b01d0d7ea81";
+  brief = true;
 }
 {
-  name = "Firebird-2.5.2.26540-0.tar.bz2";
-  md5 = "21154d2004e025c8a3666625b0357bb5";
+  name = "Firebird-2.5.4.26856-0.tar.bz2";
+  md5 = "7a17ec9889424b98baa29e001a054434";
   brief = true;
 }
 {
@@ -130,8 +120,8 @@
   brief = false;
 }
 {
-  name = "dejavu-fonts-ttf-2.34.zip";
-  md5 = "a4e565e220b5de082c23995e256e3c12";
+  name = "dejavu-fonts-ttf-2.35.zip";
+  md5 = "d8b5214d35bcd2bfcb2cffa7795b351d";
   brief = false;
 }
 {
@@ -185,8 +175,8 @@
   brief = false;
 }
 {
-  name = "glew-1.10.0.zip";
-  md5 = "594eb47b4b1210e25438d51825404d5a";
+  name = "glew-1.12.0.zip";
+  md5 = "3941e9cab2f4f9d8faee3e8d57ae7664";
   brief = false;
 }
 {
@@ -195,9 +185,14 @@
   brief = false;
 }
 {
-  name = "graphite2-1.2.4.tgz";
-  md5 = "2ef839348fe28e3b923bf8cced440227";
-  brief = true;
+  name = "glyphy-0.2.0.tar.bz2";
+  md5 = "5d303fb955beb9bf112267316ca9d021";
+  brief = false;
+}
+{
+  name = "graphite-minimal-1.3.6.tgz";
+  md5 = "17df8301bcc459e83f8a8f3aca6183b2";
+  brief = false;
 }
 {
   name = "harfbuzz-0.9.40.tar.bz2";
@@ -220,8 +215,8 @@
   brief = false;
 }
 {
-  name = "icu4c-54_1-src.tgz";
-  md5 = "e844caed8f2ca24c088505b0d6271bc0";
+  name = "icu4c-56_1-src.tgz";
+  md5 = "c4a2d71ff56aec5ebfab2a3f059be99d";
   brief = false;
 }
 {
@@ -285,13 +280,13 @@
   brief = true;
 }
 {
-  name = "libjpeg-turbo-1.3.1.tar.gz";
-  md5 = "2c3a68129dac443a72815ff5bb374b05";
+  name = "libjpeg-turbo-1.4.2.tar.gz";
+  md5 = "86b0d5f7507c2e6c21c00219162c3c44";
   brief = true;
 }
 {
-  name = "language-subtag-registry-2015-08-04.tar.bz2";
-  md5 = "bf5986dbfa1c9a0f26cf1b00ed369484";
+  name = "language-subtag-registry-2016-02-10.tar.bz2";
+  md5 = "d1e7c55a0383f7d720d3ead0b6117284";
   brief = true;
 }
 {
@@ -326,8 +321,8 @@
   subDir = "libgltf/";
 }
 {
-  name = "liblangtag-0.5.1.tar.bz2";
-  md5 = "36271d3fa0d9dec1632029b6d7aac925";
+  name = "liblangtag-0.5.8.tar.bz2";
+  md5 = "aa899eff126216dafe721149fbdb511b";
   brief = false;
 }
 {
@@ -336,8 +331,8 @@
   brief = false;
 }
 {
-  name = "libxml2-2.9.3.tar.gz";
-  md5 = "daece17e045f1c107610e137ab50c179";
+  name = "libxml2-2.9.4.tar.gz";
+  md5 = "ae249165c173b1ff386ee8ad676815f5";
   brief = false;
 }
 {
@@ -366,8 +361,8 @@
   brief = true;
 }
 {
-  name = "libmwaw-0.3.5.tar.bz2";
-  md5 = "bdc58bbf89aaaf6d29b3516d96830a06";
+  name = "libmwaw-0.3.7.tar.bz2";
+  md5 = "4a8a53a9d997cf0e2bd208178797dbfb";
   brief = true;
 }
 {
@@ -381,18 +376,18 @@
   brief = false;
 }
 {
-  name = "neon-0.29.5.tar.gz";
-  md5 = "ff369e69ef0f0143beb5626164e87ae2";
+  name = "neon-0.30.1.tar.gz";
+  md5 = "231adebe5c2f78fded3e3df6e958878e";
   brief = false;
 }
 {
-  name = "nss-3.19.4-with-nspr-4.10.10.tar.gz";
-  md5 = "478e0e90ebc4a90159549e77021021fd";
+  name = "nss-3.22.2-with-nspr-4.12.tar.gz";
+  md5 = "6b254cf2f8cb4b27a3f0b8b7b9966ea7";
   brief = false;
 }
 {
-  name = "libodfgen-0.1.4.tar.bz2";
-  md5 = "8716be5c22ae8353f9aaa380d74840dc";
+  name = "libodfgen-0.1.6.tar.bz2";
+  md5 = "32572ea48d9021bbd6fa317ddb697abc";
   brief = true;
 }
 {
@@ -406,14 +401,19 @@
   brief = false;
 }
 {
-  name = "openssl-1.0.2a.tar.gz";
-  md5 = "a06c547dac9044161a477211049f60ef";
+  name = "openssl-1.0.2h.tar.gz";
+  md5 = "9392e65072ce4b614c1392eefc1f23d0";
   brief = true;
 }
 {
-  name = "liborcus-0.7.0.tar.bz2";
-  md5 = "7681383be6ce489d84c1c74f4e7f9643";
-  brief = false;
+  name = "liborcus-0.9.2.tar.gz";
+  md5 = "e6efcbe50a5fd4d50d513c9a7a4139b0";
+  brief = true;
+}
+{
+  name = "owncloud-android-library-0.9.4-no-binary-deps.tar.gz";
+  md5 = "593f0aa47bf2efc0efda2d28fae063b2";
+  brief = true;
 }
 {
   name = "libpagemaker-0.0.2.tar.bz2";
@@ -426,8 +426,8 @@
   brief = false;
 }
 {
-  name = "libpng-1.5.24.tar.gz";
-  md5 = "6652e428d1d3fc3c6cb1362159b1cf3b";
+  name = "libpng-1.6.19.tar.gz";
+  md5 = "3121bdc77c365a87e054b9f859f421fe";
   brief = true;
 }
 {
@@ -446,6 +446,11 @@
   brief = true;
 }
 {
+  name = "Python-3.5.0.tgz";
+  md5 = "a56c0c0b45d75a0ec9c6dee933c41c36";
+  brief = true;
+}
+{
   name = "raptor2-2.0.9.tar.gz";
   md5 = "4ceb9316488b0ea01acf011023cf7fff";
   brief = false;
@@ -461,8 +466,8 @@
   brief = false;
 }
 {
-  name = "librevenge-0.0.2.tar.bz2";
-  md5 = "2d4183bf17aea1a71842468a71a68c47";
+  name = "librevenge-0.0.4.tar.bz2";
+  md5 = "5b9ac52ec77d4d19157cf5962ebc0aea";
   brief = true;
 }
 {
@@ -491,23 +496,23 @@
   brief = false;
 }
 {
-  name = "libvisio-0.1.1.tar.bz2";
-  md5 = "726c1f5be65eb7d649e0d48b63d920e7";
+  name = "libvisio-0.1.5.tar.bz2";
+  md5 = "cbee198a78b842b2087f32d33c522818";
   brief = true;
 }
 {
-  name = "libwpd-0.10.0.tar.bz2";
-  md5 = "0773d79a1f240ef9f4f20242b13c5bb7";
+  name = "libwpd-0.10.1.tar.bz2";
+  md5 = "79b56bcc349264d686a67994506ad199";
   brief = true;
 }
 {
-  name = "libwpg-0.3.0.tar.bz2";
-  md5 = "17da9770cb8b317b7633f9807b32b71a";
+  name = "libwpg-0.3.1.tar.bz2";
+  md5 = "dfd066658ec9d2fb2262417039a8a1c3";
   brief = true;
 }
 {
-  name = "libwps-0.4.0.tar.bz2";
-  md5 = "e9162d2566421d9d71b3ad2377a68fd5";
+  name = "libwps-0.4.2.tar.bz2";
+  md5 = "8a6c55542ce80203dd6d3b1cba99d4e5";
   brief = true;
 }
 {
diff --git a/pkgs/applications/office/libreoffice/libreoffice-srcs.nix b/pkgs/applications/office/libreoffice/libreoffice-srcs.nix
index 7af49d51a85e..219b7e20632a 100644
--- a/pkgs/applications/office/libreoffice/libreoffice-srcs.nix
+++ b/pkgs/applications/office/libreoffice/libreoffice-srcs.nix
@@ -20,13 +20,18 @@
   brief = true;
 }
 {
-  name = "boost_1_59_0.tar.bz2";
-  md5 = "6aa9a5c6a4ca1016edd0ed1178e3cb87";
+  name = "boost_1_60_0.tar.bz2";
+  md5 = "65a840e1a0b13a558ff19eeb2c4f0cbe";
   brief = true;
 }
 {
-  name = "bsh-2.0b5-src.zip";
-  md5 = "ec1941a74d3ef513c4ce57a9092b74e1";
+  name = "breakpad.zip";
+  md5 = "415ce291aa6f2ee1d5db7b62bf62ade8";
+  brief = true;
+}
+{
+  name = "bsh-2.0b6-src.zip";
+  md5 = "beeca87be45ec87d241ddd0e1bad80c1";
   brief = false;
 }
 {
@@ -50,9 +55,9 @@
   brief = false;
 }
 {
-  name = "libcmis-0.5.0.tar.gz";
-  md5 = "5821b806a98e6c38370970e682ce76e8";
-  brief = false;
+  name = "libcmis-0.5.1.tar.gz";
+  md5 = "3270154f0f40d86fce849b161f914101";
+  brief = true;
 }
 {
   name = "CoinMP-1.7.6.tgz";
@@ -95,13 +100,13 @@
   brief = true;
 }
 {
-  name = "expat-2.1.0.tar.gz";
-  md5 = "dd7dab7a5fea97d2a6a43f511449b7cd";
-  brief = false;
+  name = "expat-2.2.0.tar.bz2";
+  md5 = "2f47841c829facb346eb6e3fab5212e2";
+  brief = true;
 }
 {
-  name = "Firebird-2.5.4.26856-0.tar.bz2";
-  md5 = "7a17ec9889424b98baa29e001a054434";
+  name = "Firebird-2.5.5.26952-0.tar.bz2";
+  md5 = "b0b5293991fcf07347b38431c80be1d4";
   brief = true;
 }
 {
@@ -190,13 +195,13 @@
   brief = false;
 }
 {
-  name = "graphite-minimal-1.3.6.tgz";
-  md5 = "17df8301bcc459e83f8a8f3aca6183b2";
+  name = "graphite2-minimal-1.3.8.tgz";
+  md5 = "4311dd9ace498b57c85f611e0670df64";
   brief = false;
 }
 {
-  name = "harfbuzz-0.9.40.tar.bz2";
-  md5 = "0e27e531f4c4acff601ebff0957755c2";
+  name = "harfbuzz-1.2.6.tar.bz2";
+  md5 = "9f4b6831c86135faef011e991f59f77f";
   brief = true;
 }
 {
@@ -205,8 +210,8 @@
   brief = false;
 }
 {
-  name = "hunspell-1.3.3.tar.gz";
-  md5 = "4967da60b23413604c9e563beacc63b4";
+  name = "hunspell-1.4.1.tar.gz";
+  md5 = "33d370f7fe5a030985e445a5672b2067";
   brief = false;
 }
 {
@@ -215,8 +220,8 @@
   brief = false;
 }
 {
-  name = "icu4c-56_1-src.tgz";
-  md5 = "c4a2d71ff56aec5ebfab2a3f059be99d";
+  name = "icu4c-57_1-src.tgz";
+  md5 = "976734806026a4ef8bdd17937c8898b9";
   brief = false;
 }
 {
@@ -326,18 +331,18 @@
   brief = false;
 }
 {
-  name = "xmlsec1-1.2.14.tar.gz";
-  md5 = "1f24ab1d39f4a51faf22244c94a6203f";
+  name = "xmlsec1-1.2.20.tar.gz";
+  md5 = "ce12af00283eb90d9281956524250d6e";
   brief = false;
 }
 {
-  name = "libxml2-2.9.3.tar.gz";
-  md5 = "daece17e045f1c107610e137ab50c179";
+  name = "libxml2-2.9.4.tar.gz";
+  md5 = "ae249165c173b1ff386ee8ad676815f5";
   brief = false;
 }
 {
-  name = "libxslt-1.1.28.tar.gz";
-  md5 = "9667bf6f9310b957254fdcf6596600b7";
+  name = "libxslt-1.1.29.tar.gz";
+  md5 = "a129d3c44c022de3b9dcf6d6f288d72e";
   brief = false;
 }
 {
@@ -351,8 +356,13 @@
   brief = false;
 }
 {
-  name = "mdds_0.12.1.tar.bz2";
-  md5 = "ef2560ed5416652a7fe195305b14cebe";
+  name = "mdds-1.2.0.tar.bz2";
+  md5 = "9f3383fb7bae825eab69f3a6ec1d74b2";
+  brief = true;
+}
+{
+  name = "mDNSResponder-576.30.4.tar.gz";
+  md5 = "940057ac8b513b00e8e9ca12ef796762";
   brief = true;
 }
 {
@@ -401,13 +411,13 @@
   brief = false;
 }
 {
-  name = "openssl-1.0.2g.tar.gz";
-  md5 = "f3c710c045cdee5fd114feb69feba7aa";
+  name = "openssl-1.0.2h.tar.gz";
+  md5 = "9392e65072ce4b614c1392eefc1f23d0";
   brief = true;
 }
 {
-  name = "liborcus-0.9.2.tar.gz";
-  md5 = "e6efcbe50a5fd4d50d513c9a7a4139b0";
+  name = "liborcus-0.11.2.tar.gz";
+  md5 = "205badaee72adf99422add8c4c49d669";
   brief = true;
 }
 {
@@ -416,8 +426,8 @@
   brief = true;
 }
 {
-  name = "libpagemaker-0.0.2.tar.bz2";
-  md5 = "795cc7a59ace4db2b12586971d668671";
+  name = "libpagemaker-0.0.3.tar.bz2";
+  md5 = "5c4985a68be0b79d3f809da5e12b143c";
   brief = true;
 }
 {
@@ -491,11 +501,6 @@
   brief = false;
 }
 {
-  name = "vigra1.6.0.tar.gz";
-  md5 = "d62650a6f908e85643e557a236ea989c";
-  brief = false;
-}
-{
   name = "libvisio-0.1.5.tar.bz2";
   md5 = "cbee198a78b842b2087f32d33c522818";
   brief = true;
@@ -511,8 +516,8 @@
   brief = true;
 }
 {
-  name = "libwps-0.4.2.tar.bz2";
-  md5 = "8a6c55542ce80203dd6d3b1cba99d4e5";
+  name = "libwps-0.4.3.tar.bz2";
+  md5 = "027fb17fb9e43553aa6624dc18f830ac";
   brief = true;
 }
 {
diff --git a/pkgs/applications/office/libreoffice/still.nix b/pkgs/applications/office/libreoffice/still.nix
index 248772b759f1..8c69d610a9a8 100644
--- a/pkgs/applications/office/libreoffice/still.nix
+++ b/pkgs/applications/office/libreoffice/still.nix
@@ -22,9 +22,9 @@ let
   lib = stdenv.lib;
   langsSpaces = lib.concatStringsSep " " langs;
   major = "5";
-  minor = "0";
-  patch = "6";
-  tweak = "3";
+  minor = "1";
+  patch = "5";
+  tweak = "2";
   subdir = "${major}.${minor}.${patch}";
   version = "${subdir}${if tweak == "" then "" else "."}${tweak}";
 
@@ -50,14 +50,14 @@ let
 
     translations = fetchSrc {
       name = "translations";
-      sha256 = "0ir97k91p3dxxs85ld1vyxcx7s63w678h9njbmw4y3mpp9f28y8c";
+      sha256 = "1mzsz9pd2k1lpvwf7r5q90qmdp57160362cmlxaj6bxz52gr9f2i";
     };
 
     # TODO: dictionaries
 
     help = fetchSrc {
       name = "help";
-      sha256 = "06qwdmdb086852qs6fzb3mm1wixkkkkg39njpvqsrfbdrr2amdjc";
+      sha256 = "1qqpggcanchz0qqasc5xvginrpa5rx7ahj3dw2vk7n34xaarnni6";
     };
 
   };
@@ -66,7 +66,7 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://download.documentfoundation.org/libreoffice/src/${subdir}/libreoffice-${version}.tar.xz";
-    sha256 = "1izc1ynfzg36jyi1ms5lmz9rl5lhlxa8qfa4bg7j2qlf65wdf0a6";
+    sha256 = "1qg0dj0zwh5ifhmvv4k771nmyqddz4ifn75s9mr1p0nyix8zks8x";
   };
 
   # Openoffice will open libcups dynamically, so we link it directly
@@ -249,6 +249,10 @@ in stdenv.mkDerivation rec {
     ]
     ++ lib.optional kdeIntegration kde4.kdelibs;
 
+  passthru = {
+    inherit srcs;
+  };
+
   meta = with lib; {
     description = "Comprehensive, professional-quality productivity suite (Still/stable release)";
     homepage = http://libreoffice.org/;
diff --git a/pkgs/applications/science/biology/bcftools/default.nix b/pkgs/applications/science/biology/bcftools/default.nix
index d4e4ed5b954f..71ceca122244 100644
--- a/pkgs/applications/science/biology/bcftools/default.nix
+++ b/pkgs/applications/science/biology/bcftools/default.nix
@@ -12,9 +12,11 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ zlib ];
 
-  preBuild = ''
-    makeFlagsArray=("HSTDIR=${htslib}" "prefix=$out")
-  '';
+  makeFlags = [
+    "HSTDIR=${htslib}"
+    "prefix=$out"
+    "CC=cc"
+  ];
 
   meta = with stdenv.lib; {
     description = "Tools for manipulating BCF2/VCF/gVCF format, SNP and short indel sequence variants";
diff --git a/pkgs/applications/science/logic/abc/default.nix b/pkgs/applications/science/logic/abc/default.nix
index 236045fa3358..dad1e60cb788 100644
--- a/pkgs/applications/science/logic/abc/default.nix
+++ b/pkgs/applications/science/logic/abc/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   name = "abc-verifier-${version}";
-  version = "20150614";
+  version = "20160813";
 
   src = fetchhg {
     url    = "https://bitbucket.org/alanmi/abc";
-    rev    = "38661894bc1287cad9bd35978bd252dbfe3e6c56";
-    sha256 = "04v0hkvj501r10pj3yrqrk2463d1d7lhl8dzfjwkmlbmlmpjlvvv";
+    rev    = "1df0b06d7bf615c50014df0952a61e11891ee306";
+    sha256 = "0i0b9i2gs0y1q8nqnqyzfbff8aiknzja27m383nvccxscvg355z5";
   };
 
   buildInputs = [ readline ];
diff --git a/pkgs/applications/science/logic/aspino/default.nix b/pkgs/applications/science/logic/aspino/default.nix
index 5207245b0ba6..ee9e580a7b87 100644
--- a/pkgs/applications/science/logic/aspino/default.nix
+++ b/pkgs/applications/science/logic/aspino/default.nix
@@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ zlib boost ];
 
+  patchPhase = ''
+    substituteInPlace Makefile \
+      --replace "GCC = g++" "GCC = c++"
+  '';
+
   preBuild = ''
     cp ${glucose.src} patches/glucose-syrup.tgz
     ./bootstrap.sh
diff --git a/pkgs/applications/science/math/LiE/default.nix b/pkgs/applications/science/math/LiE/default.nix
index b448b5114212..515b7e272899 100644
--- a/pkgs/applications/science/math/LiE/default.nix
+++ b/pkgs/applications/science/math/LiE/default.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
   version = "2.2.2";
      # The current version of LiE is 2.2.2, which is more or less unchanged
      # since about the year 2000. Minor bugfixes do get applied now and then.
-  name = "LiE-${version}";
+  name = "lie-${version}";
 
   meta = {
     description = "A Computer algebra package for Lie group computations";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
       characteristics, we refer to the following sources of information.
     ''; # take from the website
 
-    platforms = stdenv.lib.platforms.unix;
+    platforms = stdenv.lib.platforms.linux;
     maintainers = [ ]; # this package is probably not going to change anyway
   };
 
diff --git a/pkgs/applications/science/math/geogebra/default.nix b/pkgs/applications/science/math/geogebra/default.nix
new file mode 100644
index 000000000000..fcbd13566657
--- /dev/null
+++ b/pkgs/applications/science/math/geogebra/default.nix
@@ -0,0 +1,58 @@
+{ stdenv, fetchurl, jre, makeDesktopItem, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name = "geogebra-${version}";
+  version = "5.0.265.0";
+
+  preferLocalBuild = true;
+
+  src = fetchurl {
+    url = "http://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2";
+    sha256 = "74e5abfa098ee0fc464cd391cd3ef6db474ff25e8ea4fbcd82c4b4b5d3d5c459";
+  };
+
+  srcIcon = fetchurl {
+    url = "http://static.geogebra.org/images/geogebra-logo.svg";
+    sha256 = "55ded6b5ec9ad382494f858d8ab5def0ed6c7d529481cd212863b2edde3b5e07";
+  };
+
+  desktopItem = makeDesktopItem {
+    name = "geogebra";
+    exec = "geogebra";
+    icon = "geogebra";
+    desktopName = "Geogebra";
+    genericName = "Geogebra";
+    comment = meta.description;
+    categories = "Education;Science;Math;";
+    mimeType = "application/vnd.geogebra.file;application/vnd.geogebra.tool;";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    install -D geogebra/* -t "$out/libexec/geogebra/"
+
+    makeWrapper "$out/libexec/geogebra/geogebra" "$out/bin/geogebra" \
+      --set JAVACMD "${jre}/bin/java" \
+      --set GG_PATH "$out/libexec/geogebra"
+
+    install -Dm644 "${desktopItem}/share/applications/"* \
+      -t $out/share/applications/
+
+    install -Dm644 "${srcIcon}" \
+      "$out/share/icons/hicolor/scalable/apps/geogebra.svg"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Dynamic mathematics software with graphics, algebra and spreadsheets";
+    longDescription = ''
+      Dynamic mathematics software for all levels of education that brings
+      together geometry, algebra, spreadsheets, graphing, statistics and
+      calculus in one easy-to-use package.
+    '';
+    homepage = https://www.geogebra.org/;
+    license = with licenses; [ gpl3 cc-by-nc-sa-30 geogebra ];
+    platforms = platforms.all;
+    hydraPlatforms = [];
+  };
+}
diff --git a/pkgs/applications/science/math/pari/default.nix b/pkgs/applications/science/math/pari/default.nix
index da10e89855ae..0cda65b32c30 100644
--- a/pkgs/applications/science/math/pari/default.nix
+++ b/pkgs/applications/science/math/pari/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, gmp, readline }:
 
 stdenv.mkDerivation rec {
-  version = "2.7.5";
+  version = "2.7.6";
   name = "pari-${version}";
 
   src = fetchurl {
     url = "http://pari.math.u-bordeaux.fr/pub/pari/unix/${name}.tar.gz";
-    sha256 = "0c8l83a0gjq73r9hndsrzkypwxvnnm4pxkkzbg6jm95m80nzwh11";
+    sha256 = "04dqi697czd8mmw8aiwzrkgbvkjassqagg6lfy3lkf1k5qi9g9rr";
   };
 
   buildInputs = [gmp readline];
diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix
index a19a49774404..6e0b4313b47d 100644
--- a/pkgs/applications/science/math/sage/default.nix
+++ b/pkgs/applications/science/math/sage/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, m4, perl, gfortran, texLive, ffmpeg, tk
+{ stdenv, fetchurl, m4, perl, gfortran, texlive, ffmpeg, tk
 , imagemagick, liblapack, python, openssl, libpng
 , which
 }:
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "102mrzzi215g1xn5zgcv501x9sghwg758jagx2jixvg1rj2jijj9";
   };
 
-  buildInputs = [ m4 perl gfortran texLive ffmpeg tk imagemagick liblapack
+  buildInputs = [ m4 perl gfortran texlive.combined.scheme-basic ffmpeg tk imagemagick liblapack
                   python openssl libpng which];
 
   patches = [ ./spkg-singular.patch ./spkg-python.patch ./spkg-git.patch ];
@@ -25,9 +25,12 @@ stdenv.mkDerivation rec {
     export HOME=$out/sageHome
   '';
 
+  preBuild = "patchShebangs build";
+
   installPhase = ''DESTDIR=$out make install'';
 
   meta = {
+    broken = true;
     homepage = "http://www.sagemath.org";
     description = "A free open source mathematics software system";
     license = stdenv.lib.licenses.gpl2Plus;
diff --git a/pkgs/applications/science/misc/golly/default.nix b/pkgs/applications/science/misc/golly/default.nix
index bf6eabef909e..40d23cc7e8a4 100644
--- a/pkgs/applications/science/misc/golly/default.nix
+++ b/pkgs/applications/science/misc/golly/default.nix
@@ -1,16 +1,16 @@
-{stdenv, fetchurl, wxGTK, perl, python, zlib}:
+{stdenv, fetchurl, wxGTK, perl, python, zlib, mesa, libX11}:
 let
   s = # Generated upstream information
   rec {
     baseName="golly";
-    version="2.7";
+    version="2.8";
     name="${baseName}-${version}";
-    hash="0wfr9dhdbwg2cbcl7g2s1h9pmsm1lkjncbs9m0df82bcw516xs2f";
-    url="mirror://sourceforge/project/golly/golly/golly-2.7/golly-2.7-src.tar.gz";
-    sha256="0wfr9dhdbwg2cbcl7g2s1h9pmsm1lkjncbs9m0df82bcw516xs2f";
+    hash="0a4vn2hm7h4b47v2iwip1z3n9y8isf79v08aipl2iqms2m3p5204";
+    url="mirror://sourceforge/project/golly/golly/golly-2.8/golly-2.8-src.tar.gz";
+    sha256="0a4vn2hm7h4b47v2iwip1z3n9y8isf79v08aipl2iqms2m3p5204";
   };
   buildInputs = [
-    wxGTK perl python zlib
+    wxGTK perl python zlib mesa libX11
   ];
 in
 stdenv.mkDerivation rec {
diff --git a/pkgs/applications/science/misc/golly/default.upstream b/pkgs/applications/science/misc/golly/default.upstream
index 57881e5de355..24032de56684 100644
--- a/pkgs/applications/science/misc/golly/default.upstream
+++ b/pkgs/applications/science/misc/golly/default.upstream
@@ -1,4 +1,4 @@
 url http://sourceforge.net/projects/golly/files/golly/
 version_link '[-][0-9.]+/$'
-SF_version_tarball
+SF_version_tarball 'src'
 SF_redirect
diff --git a/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix b/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix
index a3881baf1e71..aa4b83c59b59 100644
--- a/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   name = "diff-so-fancy-${version}";
-  version = "0.10.1";
+  version = "0.11.1";
 
   # perl is needed here so patchShebangs can do its job
   buildInputs = [perl makeWrapper];
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     owner = "so-fancy";
     repo = "diff-so-fancy";
     rev = "v${version}";
-    sha256 = "0wp5civn70jzil1gbygx6ccrxfrmc8xx90v7zgf36rqi2yhvv64m";
+    sha256 = "1dw32c5i9mry6zr2a6h1369fhp1qbqimx04qgdmdnmn1imyck1h3";
   };
 
   buildPhase = null;
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
     # itself, so we are copying executable to lib, and only symlink it
     # from bin/
     cp diff-so-fancy $out/lib/diff-so-fancy
-    cp -r lib $out/lib/diff-so-fancy
+    cp -r libexec $out/lib/diff-so-fancy
     ln -s $out/lib/diff-so-fancy/diff-so-fancy $out/bin
 
     # ncurses is needed for `tput`
diff --git a/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.json b/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.json
index b04422768a5f..914655e2813a 100644
--- a/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.json
+++ b/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.json
@@ -1,9 +1,20 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/pquerna/ffjson",
-      "gopkg.in/kothar/go-backblaze.v0"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/pquerna/ffjson",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/pquerna/ffjson",
+            "rev": "674bc015b5b3f50f9bb2561179778586b9af68c5",
+            "sha256": "0l53q7b1g25hfjm1iyynfs413rpav4c51yvdr244ivw1x3hksa7a"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/kothar/go-backblaze.v0",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/kothar/go-backblaze.v0",
+            "rev": "373819725fc560fa962c6cd883b533d2ebec4844",
+            "sha256": "1kmlwfnnfd4h46bb9pz2gw1hxqm1pzkwvidfmnc0zkrilaywk6fx"
+        }
+    }
 ]
diff --git a/pkgs/applications/version-management/yadm/default.nix b/pkgs/applications/version-management/yadm/default.nix
new file mode 100644
index 000000000000..7990f996ec3a
--- /dev/null
+++ b/pkgs/applications/version-management/yadm/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, fetchFromGitHub }:
+
+let version = "1.04"; in
+stdenv.mkDerivation {
+  name = "yadm-${version}";
+
+  src = fetchFromGitHub {
+    owner  = "TheLocehiliosan";
+    repo   = "yadm";
+    rev    = "${version}";
+    sha256 = "1g5nz4y63ccxlbz67klm78525ps41ynis8683iayakg4907vd898";
+  };
+
+  buildCommand = ''
+    mkdir -p $out/bin
+    mkdir -p $out/share/man/man1
+    sed -e 's:/bin/bash:/usr/bin/env bash:' $src/yadm > $out/bin/yadm
+    chmod 755 $out/bin/yadm
+    install -m 644 $src/yadm.1 $out/share/man/man1/yadm.1
+  '';
+
+  meta = {
+    homepage = "https://github.com/TheLocehiliosan/yadm";
+    description = "Yet Another Dotfiles Manager";
+    longDescription = ''
+    yadm is a dotfile management tool with 3 main features: Manages files across
+    systems using a single Git repository. Provides a way to use alternate files on
+    a specific OS or host. Supplies a method of encrypting confidential data so it
+    can safely be stored in your repository.
+    '';
+    licence = stdenv.lib.licenses.gpl3;
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/pkgs/applications/virtualization/rkt/default.nix b/pkgs/applications/virtualization/rkt/default.nix
index e33ce9361adf..f5a6991dc80f 100644
--- a/pkgs/applications/virtualization/rkt/default.nix
+++ b/pkgs/applications/virtualization/rkt/default.nix
@@ -12,7 +12,7 @@ let
   stage1Dir = "lib/rkt/stage1-images";
 
 in stdenv.mkDerivation rec {
-  version = "1.11.0";
+  version = "1.12.0";
   name = "rkt-${version}";
   BUILDDIR="build-${name}";
 
@@ -20,7 +20,7 @@ in stdenv.mkDerivation rec {
       rev = "v${version}";
       owner = "coreos";
       repo = "rkt";
-      sha256 = "05lm9grckbyjmv1292v00vw4h3nv6r7gmq04zhahcjyw7crx06sv";
+      sha256 = "0fkjhmssxyx2q699zcif5fvnpcs50l9pqrvy680dw670wsl3b7s7";
   };
 
   stage1BaseImage = fetchurl {
diff --git a/pkgs/applications/window-managers/compiz/default.nix b/pkgs/applications/window-managers/compiz/default.nix
index 39eb0586f7b2..09c36835dad6 100644
--- a/pkgs/applications/window-managers/compiz/default.nix
+++ b/pkgs/applications/window-managers/compiz/default.nix
@@ -3,7 +3,7 @@
 , GConf, libXdamage, damageproto, libxml2, libxslt, glibmm
 , metacity
 , libstartup_notification, libpthreadstubs, libxcb, intltool
-, ORBit2, libXau
+, ORBit2, libXau, libICE, libSM
 , dbus, dbus_glib, librsvg, mesa
 , libXdmcp, libnotify, python
 , hicolor_icon_theme, libjpeg_turbo, libsigcxx, protobuf, pygtk, pythonDBus
@@ -15,18 +15,18 @@ let
   s = # Generated upstream information
   rec {
     baseName="compiz";
-    version="0.9.12.2";
+    version="0.9.13.0";
     name="${baseName}-${version}";
-    hash="107cv8jm7nl0lbkj2y7878lmv1pd6blra68fg10cgb7xdngaq5w9";
-    url="https://launchpad.net/compiz/0.9.12/0.9.12.2/+download/compiz-0.9.12.2.tar.bz2";
-    sha256="107cv8jm7nl0lbkj2y7878lmv1pd6blra68fg10cgb7xdngaq5w9";
+    hash="00m73im5kdpbfjg9ryzxnab5qvx5j51gxwr3wzimkrcbax6vb3ph";
+    url="https://launchpad.net/compiz/0.9.13/0.9.13.0/+download/compiz-0.9.13.0.tar.bz2";
+    sha256="00m73im5kdpbfjg9ryzxnab5qvx5j51gxwr3wzimkrcbax6vb3ph";
   };
   buildInputs = [cmake pkgconfig
     libXrender renderproto gtk libwnck pango cairo
     GConf libXdamage damageproto libxml2 libxslt glibmm libstartup_notification
     metacity
     libpthreadstubs libxcb intltool
-    ORBit2 libXau
+    ORBit2 libXau libICE libSM
     dbus dbus_glib librsvg mesa
     libXdmcp libnotify python
     hicolor_icon_theme libjpeg_turbo libsigcxx protobuf pygtk pythonDBus
diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix
index 68244a43e58f..fec8918cb447 100644
--- a/pkgs/build-support/fetchurl/mirrors.nix
+++ b/pkgs/build-support/fetchurl/mirrors.nix
@@ -290,34 +290,49 @@ rec {
 
   # Sage mirrors (http://www.sagemath.org/mirrors.html)
   sagemath = [
-    http://boxen.math.washington.edu/home/sagemath/sage-mirror/src/
-    http://echidna.maths.usyd.edu.au/sage/src/
-    http://ftp.iitm.ac.in/sage/src/
+    # Africa
+    http://sagemath.polytechnic.edu.na/src/
+    ftp://ftp.sun.ac.za/pub/mirrors/www.sagemath.org/src/
+    http://sagemath.mirror.ac.za/src/
+    https://ftp.leg.uct.ac.za/pub/packages/sage/src/
+    http://mirror.ufs.ac.za/sagemath/src/
+
+    # America, North
+    http://mirrors-usa.go-parts.com/sage/sagemath/src/
+    http://mirrors.mit.edu/sage/src/
+    http://www.cecm.sfu.ca/sage/src/
+    http://files.sagemath.org/src/
+    http://mirror.clibre.uqam.ca/sage/src/
+    https://mirrors.xmission.com/sage/src/
+
+    # America, South
+    http://sagemath.c3sl.ufpr.br/src/
+    http://linorg.usp.br/sage/
+
+    # Asia
+    http://sage.asis.io/src/
+    http://mirror.hust.edu.cn/sagemath/src/
+    https://ftp.iitm.ac.in/sage/src/
     http://ftp.kaist.ac.kr/sage/src/
     http://ftp.riken.jp/sagemath/src/
+    https://mirrors.tuna.tsinghua.edu.cn/sagemath/src/
+    https://mirrors.ustc.edu.cn/sagemath/src/
     http://ftp.tsukuba.wide.ad.jp/software/sage/src/
-    http://jambu.spms.ntu.edu.sg/sage/src/
-    http://linorg.usp.br/sage/src/
-    http://mirror.aarnet.edu.au/pub/sage/src/
-    http://mirror.clibre.uqam.ca/sage/src/
-    http://mirror.hust.edu.cn/sagemath/src/
-    http://mirror.switch.ch/mirror/sagemath/src/
-    http://mirror.yandex.ru/mirrors/sage.math.washington.edu/src/
-    http://mirrors.fe.up.pt/pub/sage/src/
-    http://mirrors.hustunique.com/sagemath/src/
-    http://mirrors.ustc.edu.cn/sagemath/src/
-    http://mirrors.xmission.com/sage/src/
-    http://sage.asis.io/src/
+    http://ftp.yz.yamagata-u.ac.jp/pub/math/sage/src/
+    https://mirror.yandex.ru/mirrors/sage.math.washington.edu/src/
+
+    # Australia
+    http://echidna.maths.usyd.edu.au/sage/src/
+
+    # Europe
     http://sage.mirror.garr.it/mirrors/sage/src/
-    http://sage.yasar.edu.tr/src/
-    http://sagemath.c3sl.ufpr.br/src/
-    http://sagemath.polytechnic.edu.na/src/
     http://sunsite.rediris.es/mirror/sagemath/src/
+    http://mirror.switch.ch/mirror/sagemath/src/
+    http://mirrors.fe.up.pt/pub/sage/src/
     http://www-ftp.lip6.fr/pub/math/sagemath/src/
-    http://www.mirrorservice.org/sites/www.sagemath.org/src/
+    http://ftp.ntua.gr/pub/sagemath/src/
 
     # Old versions
-    http://www.cecm.sfu.ca/sage/src/
     http://sagemath.org/src-old/
   ];
 
diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh
index 9396ace84f11..1bdda9696536 100644
--- a/pkgs/build-support/gcc-cross-wrapper/builder.sh
+++ b/pkgs/build-support/gcc-cross-wrapper/builder.sh
@@ -7,7 +7,7 @@ mkdir $out/nix-support
 # Force gcc to use ld-wrapper.sh when calling ld.
 cflagsCompile="-B$out/bin/"
 
-if test -z "$nativeLibc"; then
+if test -z "$nativeLibc" -a -n "$libc"; then
     cflagsCompile="$cflagsCompile -B$gccLibs/lib -B$libc/lib/ -isystem $libc/include"
     ldflags="$ldflags -L$libc/lib"
     # Get the proper dynamic linker for glibc and uclibc. 
diff --git a/pkgs/build-support/upstream-updater/update-walker-service-specific.sh b/pkgs/build-support/upstream-updater/update-walker-service-specific.sh
index b66001073f27..fe439c5d11e3 100644
--- a/pkgs/build-support/upstream-updater/update-walker-service-specific.sh
+++ b/pkgs/build-support/upstream-updater/update-walker-service-specific.sh
@@ -9,7 +9,7 @@ SF_version_dir () {
 }
 
 SF_version_tarball () {
-  version_link '[.]tar[.].*/download$'
+  version_link "${1:-[.]tar[.]}.*/download\$"
 }
 
 GH_latest () {
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix
index 7ac1b2cc5194..fafef169bd57 100644
--- a/pkgs/build-support/vm/default.nix
+++ b/pkgs/build-support/vm/default.nix
@@ -1124,6 +1124,32 @@ rec {
       unifiedSystemDir = true;
     };
 
+    fedora24i386 = {
+      name = "fedora-24-i386";
+      fullName = "Fedora 24 (i386)";
+      packagesList = fetchurl rec {
+        url = "mirror://fedora/linux/releases/24/Everything/i386/os/repodata/${sha256}-primary.xml.gz";
+        sha256 = "6928e251628da7a74b79180739a43784e534eaa744ba4bcb18c847dff541f344";
+      };
+      urlPrefix = mirror://fedora/linux/releases/24/Everything/i386/os;
+      archs = ["noarch" "i386" "i586" "i686"];
+      packages = commonFedoraPackages ++ [ "cronie" "util-linux" ];
+      unifiedSystemDir = true;
+    };
+
+    fedora24x86_64 = {
+      name = "fedora-24-x86_64";
+      fullName = "Fedora 24 (x86_64)";
+      packagesList = fetchurl rec {
+        url = "mirror://fedora/linux/releases/24/Everything/x86_64/os/repodata/${sha256}-primary.xml.gz";
+        sha256 = "8dcc989396ed27fadd252ba9b655019934bc3d9915f186f1f2f27e71eba7b42f";
+      };
+      urlPrefix = mirror://fedora/linux/releases/24/Everything/x86_64/os;
+      archs = ["noarch" "x86_64"];
+      packages = commonFedoraPackages ++ [ "cronie" "util-linux" ];
+      unifiedSystemDir = true;
+    };
+
     opensuse103i386 = {
       name = "opensuse-10.3-i586";
       fullName = "openSUSE 10.3 (i586)";
diff --git a/pkgs/data/fonts/baekmuk-ttf/default.nix b/pkgs/data/fonts/baekmuk-ttf/default.nix
index d44517247ddd..93c4a55d49eb 100644
--- a/pkgs/data/fonts/baekmuk-ttf/default.nix
+++ b/pkgs/data/fonts/baekmuk-ttf/default.nix
@@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
   name = "baekmuk-ttf-2.2";
 
   src = fetchurl {
-    url = "http://kldp.net/frs/download.php/1429/${name}.tar.gz";
+    url = "http://kldp.net/baekmuk/release/865-${name}.tar.gz";
     sha256 = "08ab7dffb55d5887cc942ce370f5e33b756a55fbb4eaf0b90f244070e8d51882";
   };
 
diff --git a/pkgs/data/fonts/gdouros/default.nix b/pkgs/data/fonts/gdouros/default.nix
index 35c53659c6e6..28bea4c2c8bd 100644
--- a/pkgs/data/fonts/gdouros/default.nix
+++ b/pkgs/data/fonts/gdouros/default.nix
@@ -1,10 +1,6 @@
 {stdenv, fetchurl, unzip, lib }:
 let
   fonts = {
-    aegean = { version = "8.00"; file = "Aegean.zip"; sha256 = "0jhj4i0262f4zbm979fm01rnvc91a00kwkbcgvzs281256g2ciny";
-               description = "Scripts and symbols of the Aegean world"; };
-    textfonts = { version = "6.00"; file = "Textfonts.zip"; sha256 = "06igp3hdql0yfaj9h2ahh5n7yvj2ni7rj2jdmz534f9618l8qi6r";
-                  description = "Fonts based on early Greek editions"; };
     symbola = { version = "9.00"; file = "Symbola.zip"; sha256 = "0d9zrlvzh8inhr17p99banr0dmrvkwxbk3q7zhqqx2z4gf2yavc5";
                 description = "Basic Latin, Greek, Cyrillic and many Symbol blocks of Unicode"; };
     aegyptus = { version = "6.00"; file = "Aegyptus.zip"; sha256 = "10mr54ja9b169fhqfkrw510jybghrpjx7a8a7m38k5v39ck8wz6v";
@@ -21,6 +17,14 @@ let
                description = "Musical Notation"; };
     analecta = { version = "5.00"; file = "Analecta.zip"; sha256 = "0rphylnz42fqm1zpx5jx60k294kax3sid8r2hx3cbxfdf8fnpb1f";
                  description = "Coptic, Gothic, Deseret"; };
+    # the following are also available from http://users.teilar.gr/~g1951d/
+    # but not yet packaged:
+    #  - Aroania
+    #  - Anaktoria
+    #  - Alexander
+    #  - Avdira
+    #  - Asea
+    #  - Aegean
   };
   mkpkg = name_: {version, file, sha256, description}:
     stdenv.mkDerivation rec {
diff --git a/pkgs/data/misc/tzdata/default.nix b/pkgs/data/misc/tzdata/default.nix
index a633b9abe830..0e59e2e04e35 100644
--- a/pkgs/data/misc/tzdata/default.nix
+++ b/pkgs/data/misc/tzdata/default.nix
@@ -2,16 +2,16 @@
 
 stdenv.mkDerivation rec {
   name = "tzdata-${version}";
-  version = "2016e";
+  version = "2016f";
 
   srcs =
     [ (fetchurl {
         url = "http://www.iana.org/time-zones/repository/releases/tzdata${version}.tar.gz";
-        sha256 = "10dxnv6mwpm1rbv0dp7fhih4jd7lvqgmw7x2gy6h9i4dy6czh05s";
+        sha256 = "1c024mg4gy572vgdj9rk4dqnb33iap06zs8ibasisbyi1089b37d";
       })
       (fetchurl {
         url = "http://www.iana.org/time-zones/repository/releases/tzcode${version}.tar.gz";
-        sha256 = "17j5z894cfnid3dhh8y934hn86pvxz2ym672s1bhdag8spyc9n2p";
+        sha256 = "1vb6n29ik7dzhffzzcnskbhmn6h1dxzan3zanbp118wh8hw5yckj";
       })
     ];
 
diff --git a/pkgs/desktops/gnome-3/3.20/apps/evolution/src.nix b/pkgs/desktops/gnome-3/3.20/apps/evolution/src.nix
index 9c55a6b60e2e..b43dc9c505d1 100644
--- a/pkgs/desktops/gnome-3/3.20/apps/evolution/src.nix
+++ b/pkgs/desktops/gnome-3/3.20/apps/evolution/src.nix
@@ -1,11 +1,10 @@
 # Autogenerated by maintainers/scripts/gnome.sh update
 
-fetchurl: rec {
-  major = "3.20";
-  name = "evolution-${major}.4";
+fetchurl: {
+  name = "evolution-3.20.5";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/evolution/${major}/${name}.tar.xz";
-    sha256 = "1g1nai6jz0irz94d06vx8gbwbzdp7r53qjxvjfhdqhlhnhy76a9c";
+    url = mirror://gnome/sources/evolution/3.20/evolution-3.20.5.tar.xz;
+    sha256 = "2e13551ce0996963506f0bdde5e01c3b8aa0622849a272ff12877cd595baeb6e";
   };
 }
diff --git a/pkgs/desktops/gnome-3/3.20/apps/gnome-maps/src.nix b/pkgs/desktops/gnome-3/3.20/apps/gnome-maps/src.nix
index 1ef58f33c90d..054f340bf42f 100644
--- a/pkgs/desktops/gnome-3/3.20/apps/gnome-maps/src.nix
+++ b/pkgs/desktops/gnome-3/3.20/apps/gnome-maps/src.nix
@@ -1,10 +1,10 @@
 # Autogenerated by maintainers/scripts/gnome.sh update
 
 fetchurl: {
-  name = "gnome-maps-3.20.1";
+  name = "gnome-maps-3.20.2";
 
   src = fetchurl {
-    url = mirror://gnome/sources/gnome-maps/3.20/gnome-maps-3.20.1.tar.xz;
-    sha256 = "4874d10a3cfdffd5d1db6084d67b5e8dc8c2db2ff995302b80060ecfc5e99bd5";
+    url = mirror://gnome/sources/gnome-maps/3.20/gnome-maps-3.20.2.tar.xz;
+    sha256 = "e860144795339fdbb2f1239c4db092ad12beb9acaa3f3f8aa1d935c36d86bc3f";
   };
 }
diff --git a/pkgs/desktops/gnome-3/3.20/apps/gnome-photos/src.nix b/pkgs/desktops/gnome-3/3.20/apps/gnome-photos/src.nix
index c24de8525a87..e8569dc5433a 100644
--- a/pkgs/desktops/gnome-3/3.20/apps/gnome-photos/src.nix
+++ b/pkgs/desktops/gnome-3/3.20/apps/gnome-photos/src.nix
@@ -1,10 +1,10 @@
 # Autogenerated by maintainers/scripts/gnome.sh update
 
 fetchurl: {
-  name = "gnome-photos-3.20.2";
+  name = "gnome-photos-3.20.3";
 
   src = fetchurl {
-    url = mirror://gnome/sources/gnome-photos/3.20/gnome-photos-3.20.2.tar.xz;
-    sha256 = "ec6b95ad1c4aeeb065a65d2d48335036c0750761c7f6762bafcf874791272b46";
+    url = mirror://gnome/sources/gnome-photos/3.20/gnome-photos-3.20.3.tar.xz;
+    sha256 = "d1dd8bd8178dd1d0120abd2ff3e959fb1199f4e1751558f925ce7f1278548996";
   };
 }
diff --git a/pkgs/desktops/gnome-3/3.20/core/evolution-data-server/src.nix b/pkgs/desktops/gnome-3/3.20/core/evolution-data-server/src.nix
index cdb3dacf7ab5..eaeece5baf20 100644
--- a/pkgs/desktops/gnome-3/3.20/core/evolution-data-server/src.nix
+++ b/pkgs/desktops/gnome-3/3.20/core/evolution-data-server/src.nix
@@ -1,11 +1,10 @@
 # Autogenerated by maintainers/scripts/gnome.sh update
 
-fetchurl: rec {
-  major = "3.20";
-  name = "evolution-data-server-${major}.4";
+fetchurl: {
+  name = "evolution-data-server-3.20.5";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/evolution-data-server/${major}/${name}.tar.xz";
-    sha256 = "03h81dnk34b3xf2065rymr1jd7as4dmpd89hyf380c5np36f6l7j";
+    url = mirror://gnome/sources/evolution-data-server/3.20/evolution-data-server-3.20.5.tar.xz;
+    sha256 = "0d1586cd326d997497a2a6fddd939a83892be07cb20f8c88fda5013f8c5bbe7e";
   };
 }
diff --git a/pkgs/desktops/gnome-3/3.20/core/gnome-calculator/src.nix b/pkgs/desktops/gnome-3/3.20/core/gnome-calculator/src.nix
index a24b0b5b8767..60270be06b7f 100644
--- a/pkgs/desktops/gnome-3/3.20/core/gnome-calculator/src.nix
+++ b/pkgs/desktops/gnome-3/3.20/core/gnome-calculator/src.nix
@@ -1,10 +1,10 @@
 # Autogenerated by maintainers/scripts/gnome.sh update
 
 fetchurl: {
-  name = "gnome-calculator-3.20.1";
+  name = "gnome-calculator-3.20.2";
 
   src = fetchurl {
-    url = mirror://gnome/sources/gnome-calculator/3.20/gnome-calculator-3.20.1.tar.xz;
-    sha256 = "02edcf99857599ac10ecd2faaf33ad20a9f11f7c5a89a52ee1b511d99b594b90";
+    url = mirror://gnome/sources/gnome-calculator/3.20/gnome-calculator-3.20.2.tar.xz;
+    sha256 = "2af1c12a12a230f90fc221ff908efd80fe7eebfeaad56cd698c393d2fc34a8fb";
   };
 }
diff --git a/pkgs/desktops/gnome-3/3.20/core/gnome-online-accounts/src.nix b/pkgs/desktops/gnome-3/3.20/core/gnome-online-accounts/src.nix
index 4c263d9d2d68..088c4127b800 100644
--- a/pkgs/desktops/gnome-3/3.20/core/gnome-online-accounts/src.nix
+++ b/pkgs/desktops/gnome-3/3.20/core/gnome-online-accounts/src.nix
@@ -1,11 +1,10 @@
 # Autogenerated by maintainers/scripts/gnome.sh update
 
-fetchurl: rec {
-  major = "3.20";
-  name = "gnome-online-accounts-${major}.2";
+fetchurl: {
+  name = "gnome-online-accounts-3.20.3";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/gnome-online-accounts/${major}/${name}.tar.xz";
-    sha256 = "1pf1rn1i7dqll9ph6scg2g281njx5pq6z0wyj9493m474nfmsmab";
+    url = mirror://gnome/sources/gnome-online-accounts/3.20/gnome-online-accounts-3.20.3.tar.xz;
+    sha256 = "094fc04cf3e0b4ace667fce3b5bdcca5093e0c93f9184439e663c69546c1e046";
   };
 }
diff --git a/pkgs/desktops/gnome-3/3.20/core/gnome-software/src.nix b/pkgs/desktops/gnome-3/3.20/core/gnome-software/src.nix
index 4d377903cc1d..ea9378fcd3cc 100644
--- a/pkgs/desktops/gnome-3/3.20/core/gnome-software/src.nix
+++ b/pkgs/desktops/gnome-3/3.20/core/gnome-software/src.nix
@@ -1,10 +1,10 @@
 # Autogenerated by maintainers/scripts/gnome.sh update
 
 fetchurl: {
-  name = "gnome-software-3.20.0";
+  name = "gnome-software-3.20.4";
 
   src = fetchurl {
-    url = mirror://gnome/sources/gnome-software/3.20/gnome-software-3.20.0.tar.xz;
-    sha256 = "0w0bp29fm13a235gq8vylihzjfxx20ri46w4w2syaw0cixxihbix";
+    url = mirror://gnome/sources/gnome-software/3.20/gnome-software-3.20.4.tar.xz;
+    sha256 = "d6a2794348e2c543218e3efb01105a7e6d51e93ad3055a2482e3104ca75345f2";
   };
 }
diff --git a/pkgs/desktops/gnome-3/3.20/core/nautilus/src.nix b/pkgs/desktops/gnome-3/3.20/core/nautilus/src.nix
index b9e1ceeba204..467bb13a74ed 100644
--- a/pkgs/desktops/gnome-3/3.20/core/nautilus/src.nix
+++ b/pkgs/desktops/gnome-3/3.20/core/nautilus/src.nix
@@ -1,10 +1,10 @@
 # Autogenerated by maintainers/scripts/gnome.sh update
 
 fetchurl: {
-  name = "nautilus-3.20.1";
+  name = "nautilus-3.20.2";
 
   src = fetchurl {
-    url = mirror://gnome/sources/nautilus/3.20/nautilus-3.20.1.tar.xz;
-    sha256 = "f2a907b994026412a7ed7c8145d4ab4f886ac87e780353b967473305a35e81e8";
+    url = mirror://gnome/sources/nautilus/3.20/nautilus-3.20.2.tar.xz;
+    sha256 = "8d6e679b880dc78c0c2e2dabf6025e6da34ff279dee501f7c75f3649c1a6caae";
   };
 }
diff --git a/pkgs/desktops/gnome-3/3.20/default.nix b/pkgs/desktops/gnome-3/3.20/default.nix
index babbed37cc01..a1a7390274e7 100644
--- a/pkgs/desktops/gnome-3/3.20/default.nix
+++ b/pkgs/desktops/gnome-3/3.20/default.nix
@@ -321,6 +321,8 @@ let
 
   gnome-devel-docs = callPackage ./devtools/gnome-devel-docs { };
 
+  nemiver = callPackage ./devtools/nemiver { };
+
 #### Games
 
   aisleriot = callPackage ./games/aisleriot { };
diff --git a/pkgs/desktops/gnome-3/3.20/devtools/nemiver/bool_slot.patch b/pkgs/desktops/gnome-3/3.20/devtools/nemiver/bool_slot.patch
new file mode 100644
index 000000000000..83423122110c
--- /dev/null
+++ b/pkgs/desktops/gnome-3/3.20/devtools/nemiver/bool_slot.patch
@@ -0,0 +1,13 @@
+--- a/src/dbgengine/nmv-dbg-common.h	2014-07-09 10:36:05.000000000 +0200
++++ b/src/dbgengine/nmv-dbg-common.h	2016-08-04 22:40:28.447842746 +0200
+@@ -171,7 +171,9 @@
+ 
+     bool has_slot () const
+     {
+-        return m_slot;
++        //return m_slot;
++        // https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822502
++        return static_cast<bool> (m_slot);
+     }
+ 
+     template<class T>
diff --git a/pkgs/desktops/gnome-3/3.20/devtools/nemiver/default.nix b/pkgs/desktops/gnome-3/3.20/devtools/nemiver/default.nix
new file mode 100644
index 000000000000..c4645b67fb90
--- /dev/null
+++ b/pkgs/desktops/gnome-3/3.20/devtools/nemiver/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pkgconfig, gnome3, gtk3, libxml2, intltool, itstool, gdb,
+  boost, sqlite, gconf, libgtop, glibmm, gtkmm, vte, gtksourceview, 
+  gtksourceviewmm, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  inherit (import ./src.nix fetchurl) name src;
+
+  nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
+
+  buildInputs = [ gtk3 libxml2 intltool itstool gdb boost sqlite gconf libgtop 
+    glibmm gtkmm vte gtksourceview gtksourceviewmm ];
+
+  patches = [ ./bool_slot.patch ./safe_ptr.patch ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://wiki.gnome.org/Apps/Nemiver";
+    description = "Easy to use standalone C/C++ debugger";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.juliendehos ];
+  };
+}
+
diff --git a/pkgs/desktops/gnome-3/3.20/devtools/nemiver/safe_ptr.patch b/pkgs/desktops/gnome-3/3.20/devtools/nemiver/safe_ptr.patch
new file mode 100644
index 000000000000..e3413b224977
--- /dev/null
+++ b/pkgs/desktops/gnome-3/3.20/devtools/nemiver/safe_ptr.patch
@@ -0,0 +1,10 @@
+--- a/src/confmgr/nmv-gconf-mgr.cc	2014-07-08 10:24:06.000000000 +0200
++++ b/src/confmgr/nmv-gconf-mgr.cc	2016-08-04 23:50:08.143060464 +0200
+@@ -32,6 +32,7 @@
+ NEMIVER_BEGIN_NAMESPACE (nemiver)
+ 
+ using nemiver::common::GCharSafePtr;
++using nemiver::common::GErrorSafePtr;
+ 
+ class GConfMgr : public IConfMgr {
+     GConfMgr (const GConfMgr &);
diff --git a/pkgs/desktops/gnome-3/3.20/devtools/nemiver/src.nix b/pkgs/desktops/gnome-3/3.20/devtools/nemiver/src.nix
new file mode 100644
index 000000000000..2fcf639fe1b4
--- /dev/null
+++ b/pkgs/desktops/gnome-3/3.20/devtools/nemiver/src.nix
@@ -0,0 +1,11 @@
+# Autogenerated by maintainers/scripts/gnome.sh update
+
+fetchurl: {
+  name = "nemiver-0.9.6";
+
+  src = fetchurl {
+    url = mirror://gnome/sources/nemiver/0.9/nemiver-0.9.6.tar.xz;
+    sha256 = "85ab8cf6c4f83262f441cb0952a6147d075c3c53d0687389a3555e946b694ef2";
+  };
+}
+
diff --git a/pkgs/desktops/gnome-3/3.20/games/five-or-more/src.nix b/pkgs/desktops/gnome-3/3.20/games/five-or-more/src.nix
index 207917c9772c..3bdd6e27645e 100644
--- a/pkgs/desktops/gnome-3/3.20/games/five-or-more/src.nix
+++ b/pkgs/desktops/gnome-3/3.20/games/five-or-more/src.nix
@@ -1,10 +1,10 @@
 # Autogenerated by maintainers/scripts/gnome.sh update
 
 fetchurl: {
-  name = "five-or-more-3.20.0";
+  name = "five-or-more-3.20.1";
 
   src = fetchurl {
-    url = mirror://gnome/sources/five-or-more/3.20/five-or-more-3.20.0.tar.xz;
-    sha256 = "4290a0e4a1817d76db2f042854efbc580d6ac06f2c42176afac2b412dcd456e0";
+    url = mirror://gnome/sources/five-or-more/3.20/five-or-more-3.20.1.tar.xz;
+    sha256 = "9f6dff43b6511b12ef062f4dc4d9ab8de2579676747f0ead4802e0f166a5e85f";
   };
 }
diff --git a/pkgs/desktops/kde-5/applications/default.nix b/pkgs/desktops/kde-5/applications/default.nix
index 609901048eee..47109aaeac24 100644
--- a/pkgs/desktops/kde-5/applications/default.nix
+++ b/pkgs/desktops/kde-5/applications/default.nix
@@ -42,6 +42,7 @@ let
     gpgmepp = callPackage ./gpgmepp.nix {};
     gwenview = callPackage ./gwenview.nix {};
     kate = callPackage ./kate.nix {};
+    kdenlive = callPackage ./kdenlive.nix {};
     kcalc = callPackage ./kcalc.nix {};
     kcolorchooser = callPackage ./kcolorchooser.nix {};
     kdegraphics-thumbnailers = callPackage ./kdegraphics-thumbnailers.nix {};
diff --git a/pkgs/desktops/kde-5/applications/kdenlive.nix b/pkgs/desktops/kde-5/applications/kdenlive.nix
new file mode 100644
index 000000000000..00826060b69b
--- /dev/null
+++ b/pkgs/desktops/kde-5/applications/kdenlive.nix
@@ -0,0 +1,81 @@
+{ kdeApp
+, kdeWrapper
+, lib
+, extra-cmake-modules
+, kdoctools
+, qtscript
+, kactivities
+, kconfig
+, kcrash
+, kguiaddons
+, kiconthemes
+, ki18n
+, kinit
+, kio
+, kio-extras
+, kwindowsystem
+, kdbusaddons
+, plasma-framework
+, knotifications
+, knewstuff
+, karchive
+, knotifyconfig
+, kplotting
+, ktextwidgets
+, mlt
+, shared_mime_info
+, libv4l
+, kfilemetadata
+, ffmpeg
+, phonon-backend-vlc
+, qtquickcontrols
+}:
+
+let
+unwrapped = kdeApp {
+  name = "kdenlive";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    kdoctools
+  ];
+  buildInputs = [
+    qtscript
+    kconfig
+    kcrash
+    kguiaddons
+    kiconthemes
+    kinit
+    kdbusaddons
+    knotifications
+    knewstuff
+    karchive
+    knotifyconfig
+    kplotting
+    ktextwidgets
+    mlt
+    shared_mime_info
+    libv4l
+    ffmpeg
+  ];
+  propagatedBuildInputs = [
+    kactivities
+    ki18n
+    kio
+    kio-extras
+    kwindowsystem
+    kfilemetadata
+    plasma-framework
+    phonon-backend-vlc
+    qtquickcontrols
+  ];
+  enableParallelBuilding = true;
+  meta = {
+    license = with lib.licenses; [ gpl2Plus ];
+  };
+};
+in
+kdeWrapper unwrapped
+{
+  targets = [ "bin/kdenlive" ];
+  paths = [ kinit ];
+}
diff --git a/pkgs/desktops/kde-5/plasma/default.nix b/pkgs/desktops/kde-5/plasma/default.nix
index 853faa7040bb..4b502a3119bf 100644
--- a/pkgs/desktops/kde-5/plasma/default.nix
+++ b/pkgs/desktops/kde-5/plasma/default.nix
@@ -67,6 +67,7 @@ let
     kscreenlocker = callPackage ./kscreenlocker.nix {};
     ksshaskpass = callPackage ./ksshaskpass.nix {};
     ksysguard = callPackage ./ksysguard.nix {};
+    kwallet-pam = callPackage ./kwallet-pam.nix {};
     kwayland-integration = callPackage ./kwayland-integration.nix {};
     kwin = callPackage ./kwin {};
     kwrited = callPackage ./kwrited.nix {};
diff --git a/pkgs/desktops/kde-5/plasma/kwallet-pam.nix b/pkgs/desktops/kde-5/plasma/kwallet-pam.nix
new file mode 100644
index 000000000000..86ba52292f9e
--- /dev/null
+++ b/pkgs/desktops/kde-5/plasma/kwallet-pam.nix
@@ -0,0 +1,11 @@
+{ plasmaPackage, ecm, pam, socat, libgcrypt
+}:
+
+plasmaPackage {
+  name = "kwallet-pam";
+
+  nativeBuildInputs = [ ecm ];
+
+  buildInputs = [ pam socat libgcrypt ];
+
+}
diff --git a/pkgs/development/arduino/arduino-core/default.nix b/pkgs/development/arduino/arduino-core/default.nix
index f1f598c1359c..f89947d7d61f 100644
--- a/pkgs/development/arduino/arduino-core/default.nix
+++ b/pkgs/development/arduino/arduino-core/default.nix
@@ -112,7 +112,7 @@ stdenv.mkDerivation rec {
     description = "Open-source electronics prototyping platform";
     homepage = http://arduino.cc/;
     license = stdenv.lib.licenses.gpl2;
-    platforms = platforms.all;
+    platforms = platforms.linux;
     maintainers = with maintainers; [ antono robberer bjornfor ];
   };
 }
diff --git a/pkgs/development/compilers/compcert/default.nix b/pkgs/development/compilers/compcert/default.nix
index 190f2b7a96af..4957706ea0f8 100644
--- a/pkgs/development/compilers/compcert/default.nix
+++ b/pkgs/development/compilers/compcert/default.nix
@@ -4,11 +4,11 @@
 
 stdenv.mkDerivation rec {
   name    = "compcert-${version}";
-  version = "2.6";
+  version = "2.7.1";
 
   src = fetchurl {
     url    = "http://compcert.inria.fr/release/${name}.tgz";
-    sha256 = "05sdxgg2w7ykw6xbcq6dl2kzxdz4qzhjajiawpy6490wqiji7wm1";
+    sha256 = "1vhbs1fmr9x2imqyd6yfvkbz763jhjfm9wk4nizf9rn1cvxrjqa4";
   };
 
   buildInputs = [ coq ] ++ (with ocamlPackages; [ ocaml findlib menhir ]);
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix
index 2030f931c51a..a8aa550c93c4 100644
--- a/pkgs/development/compilers/gcc/4.9/default.nix
+++ b/pkgs/development/compilers/gcc/4.9/default.nix
@@ -189,6 +189,9 @@ let version = "4.9.4";
             # To keep ABI compatibility with upstream mingw-w64
             " --enable-fully-dynamic-string"
             else (if cross.libc == "uclibc" then
+              # libsanitizer requires netrom/netrom.h which is not
+              # available in uclibc.
+              " --disable-libsanitizer" +
               # In uclibc cases, libgomp needs an additional '-ldl'
               # and as I don't know how to pass it, I disable libgomp.
               " --disable-libgomp" else "") +
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix
index 4802c3fe2782..2ac4f553f850 100644
--- a/pkgs/development/compilers/gcc/5/default.nix
+++ b/pkgs/development/compilers/gcc/5/default.nix
@@ -189,6 +189,9 @@ let version = "5.4.0";
             # To keep ABI compatibility with upstream mingw-w64
             " --enable-fully-dynamic-string"
             else (if cross.libc == "uclibc" then
+              # libsanitizer requires netrom/netrom.h which is not
+              # available in uclibc.
+              " --disable-libsanitizer" +
               # In uclibc cases, libgomp needs an additional '-ldl'
               # and as I don't know how to pass it, I disable libgomp.
               " --disable-libgomp" else "") +
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index e87554c25ab8..ec6f0ca8d14c 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -188,6 +188,9 @@ let version = "6.1.0";
             # To keep ABI compatibility with upstream mingw-w64
             " --enable-fully-dynamic-string"
             else (if cross.libc == "uclibc" then
+              # libsanitizer requires netrom/netrom.h which is not
+              # available in uclibc.
+              " --disable-libsanitizer" +
               # In uclibc cases, libgomp needs an additional '-ldl'
               # and as I don't know how to pass it, I disable libgomp.
               " --disable-libgomp" else "") +
diff --git a/pkgs/development/compilers/go/1.6.nix b/pkgs/development/compilers/go/1.6.nix
index be6f1a5402d6..fa2b3d31d75b 100644
--- a/pkgs/development/compilers/go/1.6.nix
+++ b/pkgs/development/compilers/go/1.6.nix
@@ -15,11 +15,11 @@ in
 
 stdenv.mkDerivation rec {
   name = "go-${version}";
-  version = "1.6.2";
+  version = "1.6.3";
 
   src = fetchurl {
     url = "https://github.com/golang/go/archive/go${version}.tar.gz";
-    sha256 = "17sfhg3xfnakk666wlsbhxp4vbn19hlywf5cn1zfcd4zqkcyx30h";
+    sha256 = "1plakydixx0xrp0z3n8ahnwg66psn31791dh56yl4ry41phq0axm";
   };
 
   # perl is used for testing go vet
diff --git a/pkgs/development/compilers/jsonnet/default.nix b/pkgs/development/compilers/jsonnet/default.nix
index d31654cdf2db..adca825b2016 100644
--- a/pkgs/development/compilers/jsonnet/default.nix
+++ b/pkgs/development/compilers/jsonnet/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitHub, emscripten }:
 
-let version = "0.8.7"; in
+let version = "0.8.9"; in
 
 stdenv.mkDerivation {
   name = "jsonnet-${version}";
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
     rev = "v${version}";
     owner = "google";
     repo = "jsonnet";
-    sha256 = "0adg7ijz10mc4xs5lfrby5g9sx96icf6cg39hvkh4wqjl85c6i9g";
+    sha256 = "0phk8dzby5v60r7fwd1qf4as2jdpmdmksjw3g4p3mkkr7sc81119";
   };
 
   buildInputs = [ emscripten ];
@@ -28,7 +28,7 @@ stdenv.mkDerivation {
 
   meta = {
     description = "Purely-functional configuration language that helps you define JSON data";
-    maintainers = [ lib.maintainers.benley ];
+    maintainers = with lib.maintainers; [ benley copumpkin ];
     license = lib.licenses.asl20;
     homepage = https://github.com/google/jsonnet;
     platforms = lib.platforms.unix;
diff --git a/pkgs/development/compilers/rust/beta.nix b/pkgs/development/compilers/rust/beta.nix
index 4b4ee89f981b..130b3311cc58 100644
--- a/pkgs/development/compilers/rust/beta.nix
+++ b/pkgs/development/compilers/rust/beta.nix
@@ -3,13 +3,15 @@
 
 rec {
   rustc = callPackage ./rustc.nix {
-    shortVersion = "beta-1.10.0";
+    shortVersion = "beta-1.11.0";
     forceBundledLLVM = false;
+    needsCmake = true;
     configureFlags = [ "--release-channel=beta" ];
-    srcRev = "d18e321abeecc69e4d1bf9cafba4fba53ddf267d";
-    srcSha = "1ck8mbjrq0bzq5xzwgaqdilakwm2ab0xpzqibjycds62ad4yw774";
-    patches = [ ./patches/disable-lockfile-check.patch ]
-      ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
+    srcRev = "9333c420da0da6291740c313d5af3d620b55b8bc";
+    srcSha = "05z6i4s5jjw3c5ypap6kzxk81bg4dib47h51znvsvcvr0svsnkgs";
+    patches = [
+      ./patches/disable-lockfile-check.patch
+    ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
     inherit targets;
     inherit targetPatches;
     inherit targetToolchains;
@@ -17,10 +19,15 @@ rec {
   };
 
   cargo = callPackage ./cargo.nix rec {
-    version = "0.10.0";
-    srcRev = "refs/tags/${version}";
-    srcSha = "06scvx5qh60mgvlpvri9ig4np2fsnicsfd452fi9w983dkxnz4l2";
-    depsSha256 = "0js4697n7v93wnqnpvamhp446w58llj66za5hkd6wannmc0gsy3b";
+    # TODO: We're temporarily tracking master here as Darwin needs the
+    # `http.cainfo` option from .cargo/config which isn't released
+    # yet.
+
+    version = "beta-2016-07-25";
+    srcRev = "f09ef68cc47956ccc5f99212bdcdd15298c400a0";
+    srcSha = "1r6q9jd0fl6mzhwkvrrcv358q2784hg51dfpy28xgh4n61m7c155";
+    depsSha256 = "055ky0lkrcsi976kmvc4lqyv0sjdpcj3jv36kz9hkqq0gip3crjc";
+
     inherit rustc; # the rustc that will be wrapped by cargo
     inherit rustPlatform; # used to build cargo
   };
diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix
index bfc82c4317d7..1ced865fc909 100644
--- a/pkgs/development/compilers/rust/bootstrap.nix
+++ b/pkgs/development/compilers/rust/bootstrap.nix
@@ -1,6 +1,8 @@
 { stdenv, fetchurl, makeWrapper, cacert, zlib }:
 
 let
+  inherit (stdenv.lib) optionalString;
+
   platform =
     if stdenv.system == "i686-linux"
     then "i686-unknown-linux-gnu"
@@ -24,6 +26,8 @@ let
     then "d59b5509e69c1cace20a57072e3b3ecefdbfd8c7e95657b0ff2ac10aa1dfebe6"
     else throw "missing boostrap hash for platform ${stdenv.system}";
 
+  needsPatchelf = stdenv.isLinux;
+
   src = fetchurl {
      url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
      sha256 = bootstrapHash;
@@ -46,9 +50,11 @@ rec {
       ./install.sh --prefix=$out \
         --components=rustc,rust-std-${platform},rust-docs
 
-      patchelf \
-        --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
-        "$out/bin/rustc"
+      ${optionalString needsPatchelf ''
+        patchelf \
+          --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+          "$out/bin/rustc"
+      ''}
 
       # Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc
       # (or similar) here. It causes strange effects where rustc loads
@@ -71,9 +77,11 @@ rec {
       ./install.sh --prefix=$out \
         --components=cargo
 
-      patchelf \
-        --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
-        "$out/bin/cargo"
+      ${optionalString needsPatchelf ''
+        patchelf \
+          --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+          "$out/bin/cargo"
+      ''}
 
       wrapProgram "$out/bin/cargo" \
         --suffix PATH : "${rustc}/bin"
diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix
index fc4bf732cf6b..537764ebca2b 100644
--- a/pkgs/development/compilers/rust/cargo.nix
+++ b/pkgs/development/compilers/rust/cargo.nix
@@ -1,6 +1,7 @@
 { stdenv, fetchgit, file, curl, pkgconfig, python, openssl, cmake, zlib
-, makeWrapper, libiconv, cacert, rustPlatform, rustc
-, version, srcRev, srcSha, depsSha256 }:
+, makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2
+, version, srcRev, srcSha, depsSha256
+, patches ? []}:
 
 rustPlatform.buildRustPackage rec {
   name = "cargo-${version}";
@@ -13,11 +14,14 @@ rustPlatform.buildRustPackage rec {
   };
 
   inherit depsSha256;
+  inherit patches;
 
   passthru.rustc = rustc;
 
-  buildInputs = [ file curl pkgconfig python openssl cmake zlib makeWrapper ]
-    ++ stdenv.lib.optional stdenv.isDarwin libiconv;
+  buildInputs = [ file curl pkgconfig python openssl cmake zlib makeWrapper libgit2 ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
+
+  LIBGIT2_SYS_USE_PKG_CONFIG=1;
 
   configurePhase = ''
     ./configure --enable-optimize --prefix=$out --local-cargo=${rustPlatform.rust.cargo}/bin/cargo
@@ -37,9 +41,14 @@ rustPlatform.buildRustPackage rec {
        "$out/lib/rustlib/uninstall.sh" \
        "$out/lib/rustlib/manifest-cargo"
 
+    # NOTE: We override the `http.cainfo` option usually specified in
+    # `.cargo/config`. This is an issue when users want to specify
+    # their own certificate chain as environment variables take
+    # precedence
     wrapProgram "$out/bin/cargo" \
       --suffix PATH : "${rustc}/bin" \
-      --run "export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt" \
+      --set CARGO_HTTP_CAINFO "${cacert}/etc/ssl/certs/ca-bundle.crt" \
+      --set SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt" \
       ${stdenv.lib.optionalString stdenv.isDarwin ''--suffix DYLD_LIBRARY_PATH : "${rustc}/lib"''}
   '';
 
diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix
index adabdd71a1dd..bfab4453a349 100644
--- a/pkgs/development/compilers/rust/default.nix
+++ b/pkgs/development/compilers/rust/default.nix
@@ -23,10 +23,15 @@ rec {
   };
 
   cargo = callPackage ./cargo.nix rec {
-    version = "0.11.0";
-    srcRev = "refs/tags/${version}";
-    srcSha = "0ic2093bmwiw6vl2l9yhip87ni6dbz7dhrizy9wdx61229k16hc4";
-    depsSha256 = "0690sgn6fcay7sazlmrbbn4jbhnvmznrpz5z3rvkbaifkjrg4w6d";
+    # TODO: We're temporarily tracking master here as Darwin needs the
+    # `http.cainfo` option from .cargo/config which isn't released
+    # yet.
+
+    version = "master-2016-07-25";
+    srcRev = "f09ef68cc47956ccc5f99212bdcdd15298c400a0";
+    srcSha = "1r6q9jd0fl6mzhwkvrrcv358q2784hg51dfpy28xgh4n61m7c155";
+    depsSha256 = "1p1ygabg9k9b0azm0mrx8asjzdi35c5zw53iysba198lli6bhdl4";
+
     inherit rustc; # the rustc that will be wrapped by cargo
     inherit rustPlatform; # used to build cargo
   };
diff --git a/pkgs/development/compilers/rust/head.nix b/pkgs/development/compilers/rust/head.nix
index bbfe5c9a1529..3406fdb317fa 100644
--- a/pkgs/development/compilers/rust/head.nix
+++ b/pkgs/development/compilers/rust/head.nix
@@ -3,13 +3,18 @@
 
 rec {
   rustc = callPackage ./rustc.nix {
-    shortVersion = "master-1.11.0";
+    shortVersion = "master-1.12.0";
     forceBundledLLVM = false;
-    srcRev = "298730e7032cd55809423773da397cd5c7d827d4";
-    srcSha = "0hyz5j1z75sjkgsifzgxviv3b1lhgaz8wqwvmq80xx5vd78yd0c1";
-    patches = [ ./patches/disable-lockfile-check.patch
-                ./patches/use-rustc-1.9.0.patch ]
-      ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
+    needsCmake = true;
+    configureFlags = [ "--release-channel=nightly" ];
+    srcRev = "d9a911d236cbecb47775276ba51a5f9111bdbc9c";
+    srcSha = "07wybqvnw99fljmcy33vb9iwirmp10cwy47n008p396s7pb852hv";
+    patches = [
+      ./patches/disable-lockfile-check.patch
+      # Drop this patch after
+      # https://github.com/rust-lang/rust/pull/35140 gets merged
+      ./patches/tcp-stress-test-run-a-smaller-number-of-threads.patch
+    ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
     inherit targets;
     inherit targetPatches;
     inherit targetToolchains;
@@ -17,10 +22,11 @@ rec {
   };
 
   cargo = callPackage ./cargo.nix rec {
-    version = "2016.06.07";
-    srcRev = "3e70312a2a4ebedace131fc63bb8f27463c5db28";
-    srcSha = "0nibzyfjkiqfnq0c00hhqvs856l5qls8wds252p97q5q92yvp40f";
-    depsSha256 = "1xbb33aqnf5yyws6gjys9w8kznbh9rh6hw8mpg1hhq1ahipc2j1f";
+    version = "master-2016-07-25";
+    srcRev = "f09ef68cc47956ccc5f99212bdcdd15298c400a0";
+    srcSha = "1r6q9jd0fl6mzhwkvrrcv358q2784hg51dfpy28xgh4n61m7c155";
+    depsSha256 = "1p1ygabg9k9b0azm0mrx8asjzdi35c5zw53iysba198lli6bhdl4";
+
     inherit rustc; # the rustc that will be wrapped by cargo
     inherit rustPlatform; # used to build cargo
   };
diff --git a/pkgs/development/compilers/rust/patches/tcp-stress-test-run-a-smaller-number-of-threads.patch b/pkgs/development/compilers/rust/patches/tcp-stress-test-run-a-smaller-number-of-threads.patch
new file mode 100644
index 000000000000..1b1d62160f65
--- /dev/null
+++ b/pkgs/development/compilers/rust/patches/tcp-stress-test-run-a-smaller-number-of-threads.patch
@@ -0,0 +1,44 @@
+From b6202b5d602ca8216febe8ce9078581faa32955e Mon Sep 17 00:00:00 2001
+From: Moritz Ulrich <moritz@tarn-vedra.de>
+Date: Sat, 30 Jul 2016 09:01:13 +0200
+Subject: [PATCH] tcp-stress-test: Run a smaller number of threads.
+
+---
+ src/test/run-pass/tcp-stress.rs | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/test/run-pass/tcp-stress.rs b/src/test/run-pass/tcp-stress.rs
+index dfc8649..df8cdc9 100644
+--- a/src/test/run-pass/tcp-stress.rs
++++ b/src/test/run-pass/tcp-stress.rs
+@@ -21,6 +21,8 @@ use std::sync::mpsc::channel;
+ use std::time::Duration;
+ use std::thread::{self, Builder};
+ 
++const TARGET_CNT: usize = 256;
++
+ fn main() {
+     // This test has a chance to time out, try to not let it time out
+     thread::spawn(move|| -> () {
+@@ -42,8 +44,9 @@ fn main() {
+     });
+ 
+     let (tx, rx) = channel();
++
+     let mut spawned_cnt = 0;
+-    for _ in 0..1000 {
++    for _ in 0..TARGET_CNT {
+         let tx = tx.clone();
+         let res = Builder::new().stack_size(64 * 1024).spawn(move|| {
+             match TcpStream::connect(addr) {
+@@ -66,6 +69,6 @@ fn main() {
+     for _ in 0..spawned_cnt {
+         rx.recv().unwrap();
+     }
+-    assert_eq!(spawned_cnt, 1000);
++    assert_eq!(spawned_cnt, TARGET_CNT);
+     process::exit(0);
+ }
+-- 
+2.9.1
+
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix
index b1b33d57bb25..85e842176f47 100644
--- a/pkgs/development/compilers/rust/rustc.nix
+++ b/pkgs/development/compilers/rust/rustc.nix
@@ -1,7 +1,8 @@
 { stdenv, fetchurl, fetchgit, fetchzip, file, python2, tzdata, procps
-, llvm, jemalloc, ncurses, darwin, binutils, rustPlatform, git
+, llvm, jemalloc, ncurses, darwin, binutils, rustPlatform, git, cmake, curl
 
 , isRelease ? false
+, needsCmake ? false
 , shortVersion
 , forceBundledLLVM ? false
 , srcSha, srcRev
@@ -13,26 +14,28 @@
 } @ args:
 
 let
-    version = if isRelease then
-        "${shortVersion}"
-      else
-        "${shortVersion}-g${builtins.substring 0 7 srcRev}";
+  inherit (stdenv.lib) optional optionalString;
 
-    name = "rustc-${version}";
+  version = if isRelease then
+      "${shortVersion}"
+    else
+      "${shortVersion}-g${builtins.substring 0 7 srcRev}";
 
-    procps = if stdenv.isDarwin then darwin.ps else args.procps;
+  name = "rustc-${version}";
 
-    llvmShared = llvm.override { enableSharedLibraries = true; };
+  procps = if stdenv.isDarwin then darwin.ps else args.procps;
 
-    target = builtins.replaceStrings [" "] [","] (builtins.toString targets);
+  llvmShared = llvm.override { enableSharedLibraries = true; };
 
-    meta = with stdenv.lib; {
-      homepage = http://www.rust-lang.org/;
-      description = "A safe, concurrent, practical language";
-      maintainers = with maintainers; [ madjar cstrahan wizeman globin havvy wkennington retrry ];
-      license = [ licenses.mit licenses.asl20 ];
-      platforms = platforms.linux ++ platforms.darwin;
-    };
+  target = builtins.replaceStrings [" "] [","] (builtins.toString targets);
+
+  meta = with stdenv.lib; {
+    homepage = http://www.rust-lang.org/;
+    description = "A safe, concurrent, practical language";
+    maintainers = with maintainers; [ madjar cstrahan wizeman globin havvy wkennington retrry ];
+    license = [ licenses.mit licenses.asl20 ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
 in
 
 stdenv.mkDerivation {
@@ -42,7 +45,7 @@ stdenv.mkDerivation {
 
   __impureHostDeps = [ "/usr/lib/libedit.3.dylib" ];
 
-  NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-rpath ${llvmShared}/lib";
+  NIX_LDFLAGS = optionalString stdenv.isDarwin "-rpath ${llvmShared}/lib";
 
   src = fetchgit {
     url = https://github.com/rust-lang/rust;
@@ -55,11 +58,12 @@ stdenv.mkDerivation {
                 ++ [ "--enable-local-rust" "--local-rust-root=${rustPlatform.rust.rustc}" "--enable-rpath" ]
                 # ++ [ "--jemalloc-root=${jemalloc}/lib"
                 ++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${binutils.out}/bin/ar" ]
-                ++ stdenv.lib.optional (stdenv.cc.cc ? isClang) "--enable-clang"
-                ++ stdenv.lib.optional (targets != []) "--target=${target}"
-                ++ stdenv.lib.optional (!forceBundledLLVM) "--llvm-root=${llvmShared}";
+                ++ optional (stdenv.cc.cc ? isClang) "--enable-clang"
+                ++ optional (targets != []) "--target=${target}"
+                ++ optional (!forceBundledLLVM) "--llvm-root=${llvmShared}";
 
   patches = patches ++ targetPatches;
+
   passthru.target = target;
 
   postPatch = ''
@@ -73,7 +77,7 @@ stdenv.mkDerivation {
       --replace "\$\$(subst  /,//," "\$\$(subst /,/,"
 
     # Fix dynamic linking against llvm
-    ${stdenv.lib.optionalString (!forceBundledLLVM) ''sed -i 's/, kind = \\"static\\"//g' src/etc/mklldeps.py''}
+    ${optionalString (!forceBundledLLVM) ''sed -i 's/, kind = \\"static\\"//g' src/etc/mklldeps.py''}
 
     # Fix the configure script to not require curl as we won't use it
     sed -i configure \
@@ -84,6 +88,9 @@ stdenv.mkDerivation {
     #[ -f src/liballoc_jemalloc/lib.rs ] && sed -i 's,je_,,g' src/liballoc_jemalloc/lib.rs
     #[ -f src/liballoc/heap.rs ] && sed -i 's,je_,,g' src/liballoc/heap.rs # Remove for 1.4.0+
 
+    # Disable fragile linker-output-non-utf8 test
+    rm -vr src/test/run-make/linker-output-non-utf8/
+
     # Useful debugging parameter
     #export VERBOSE=1
   '';
@@ -94,10 +101,17 @@ stdenv.mkDerivation {
     configureFlagsArray+=("--infodir=$out/share/info")
   '';
 
+  # New -beta and -unstable unfortunately need cmake for compiling
+  # llvm-rt but don't use it for the normal build. This disables cmake
+  # in Nix.
+  dontUseCmakeConfigure = needsCmake;
+
   # ps is needed for one of the test cases
-  nativeBuildInputs = [ file python2 procps rustPlatform.rust.rustc git ];
+  nativeBuildInputs = [ file python2 procps rustPlatform.rust.rustc git ]
+    ++ stdenv.lib.optional needsCmake [ cmake curl ];
+
   buildInputs = [ ncurses ] ++ targetToolchains
-    ++ stdenv.lib.optional (!forceBundledLLVM) llvmShared;
+    ++ optional (!forceBundledLLVM) llvmShared;
 
   # https://github.com/rust-lang/rust/issues/30181
   # enableParallelBuilding = false; # missing files during linking, occasionally
@@ -105,8 +119,12 @@ stdenv.mkDerivation {
   outputs = [ "out" "doc" ];
   setOutputFlags = false;
 
-  preCheck = "export TZDIR=${tzdata}/share/zoneinfo";
+  preCheck = ''
+    export TZDIR=${tzdata}/share/zoneinfo
+    ${optionalString stdenv.isDarwin "export TMPDIR=/tmp"}
+  '';
 
+  # Disable doCheck on Darwin to work around upstream issue
   doCheck = true;
   dontSetConfigureCross = true;
 }
diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index 296f81d271d9..35467080e831 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -9,11 +9,11 @@
 
 stdenv.mkDerivation rec {
   name    = "sbcl-${version}";
-  version = "1.3.7";
+  version = "1.3.8";
 
   src = fetchurl {
     url    = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
-    sha256 = "0fjdqnb2rsm2vi9794ywp27jr239ddvzc4xfr0dk49jd4v7p2kc5";
+    sha256 = "0jfhrzsydgxzx0g90bl3fjys0i5biah76lkxjgh16l7h7577y8rh";
   };
 
   patchPhase = ''
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix
index e6373c1d50ec..72c91daac401 100644
--- a/pkgs/development/go-modules/generic/default.nix
+++ b/pkgs/development/go-modules/generic/default.nix
@@ -55,13 +55,8 @@ let
       else abort "Unrecognized package fetch type";
     };
 
-  importGodeps = { depsFile, filterPackages ? [] }:
-  let
-    deps = lib.importJSON depsFile;
-    external = filter (d: d ? include) deps;
-    direct = filter (d: d ? goPackagePath && (length filterPackages == 0 || elem d.goPackagePath filterPackages)) deps;
-  in
-    concatLists (map importGodeps (map (d: { depsFile = ./. + d.include; filterPackages = d.packages; }) external)) ++ (map dep2src direct);
+  importGodeps = { depsFile }:
+    map dep2src (lib.importJSON depsFile);
 
   goPath = if goDeps != null then importGodeps { depsFile = goDeps; } ++ extraSrcs
                              else extraSrcs;
diff --git a/pkgs/development/go-modules/libs.json b/pkgs/development/go-modules/libs.json
deleted file mode 100644
index 9e1b43691369..000000000000
--- a/pkgs/development/go-modules/libs.json
+++ /dev/null
@@ -1,1820 +0,0 @@
-[
-  {
-    "goPackagePath": "github.com/elves/getopt",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/elves/getopt",
-      "rev": "f91a7bf920995832d55a1182f26657bc975b9c24",
-      "sha256": "0wz5dz0iq1b1c2w30mmcgll9xidsrnlvs2906jw9szy0h67310za"
-    }
-  },
-  {
-    "goPackagePath": "golang.org/x/sys",
-    "fetch": {
-      "type": "git",
-      "url": "https://go.googlesource.com/sys",
-      "rev": "d9157a9621b69ad1d8d77a1933590c416593f24f",
-      "sha256": "1asdbp7rj1j1m1aar1a022wpcwbml6zih6cpbxaw7b2m8v8is931"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/fsnotify.v1",
-    "fetch": {
-      "type": "git",
-      "url": "https://gopkg.in/fsnotify.v1",
-      "rev": "96c060f6a6b7e0d6f75fddd10efeaca3e5d1bcb0",
-      "sha256": "1308z1by82fbymcra26wjzw7lpjy91kbpp2skmwqcq4q1iwwzvk2"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/yaml.v2",
-    "fetch": {
-      "type": "git",
-      "url": "https://gopkg.in/yaml.v2",
-      "rev": "a83829b6f1293c91addabc89d0571c246397bbf4",
-      "sha256": "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh"
-    }
-  },
-  {
-    "goPackagePath": "github.com/docopt/docopt-go",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/docopt/docopt-go",
-      "rev": "784ddc588536785e7299f7272f39101f7faccc3f",
-      "sha256": "0wwz48jl9fvl1iknvn9dqr4gfy1qs03gxaikrxxp9gry6773v3sj"
-    }
-  },
-  {
-    "goPackagePath": "golang.org/x/crypto",
-    "fetch": {
-      "type": "git",
-      "url": "https://go.googlesource.com/crypto",
-      "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
-      "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
-    }
-  },
-  {
-    "goPackagePath": "github.com/Sirupsen/logrus",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/Sirupsen/logrus",
-      "rev": "be52937128b38f1d99787bb476c789e2af1147f1",
-      "sha256": "1m6vvd4pg4lwglhk54lv5mf6cc8h7bi0d9zb3gar4crz531r66y4"
-    }
-  },
-  {
-    "goPackagePath": "github.com/agl/ed25519",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/agl/ed25519",
-      "rev": "278e1ec8e8a6e017cd07577924d6766039146ced",
-      "sha256": "165d89cc6dl28j4hkn86pny0jz3sa6hamzdvpvwdj4iha3x6lzc9"
-    }
-  },
-  {
-    "goPackagePath": "github.com/golang/protobuf",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/golang/protobuf",
-      "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
-      "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
-    }
-  },
-  {
-    "goPackagePath": "github.com/janimo/textsecure",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/janimo/textsecure",
-      "rev": "c38f429e48d6b2776d17b4171f216f132185b0f6",
-      "sha256": "191pwgfgphr0x04dwpvniax4wilpv52l25bw7d3igvnw302y7i94"
-    }
-  },
-  {
-    "goPackagePath": "golang.org/x/net",
-    "fetch": {
-      "type": "git",
-      "url": "https://go.googlesource.com/net",
-      "rev": "62ac18b461605b4be188bbc7300e9aa2bc836cd4",
-      "sha256": "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p"
-    }
-  },
-  {
-    "goPackagePath": "github.com/howeyc/gopass",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/howeyc/gopass",
-      "rev": "2c70fa70727c953c51695f800f25d6b44abb368e",
-      "sha256": "152lrkfxk205rlxiign0w5wb0fmfh910yz4jhlv4f4l1qr1h2lx8"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/mgo.v2",
-    "fetch": {
-      "type": "git",
-      "url": "https://gopkg.in/mgo.v2",
-      "rev": "c6a7dce14133ccac2dcac3793f1d6e2ef048503a",
-      "sha256": "0rg232q1bkq3y3kd5816hgk1jpf7i38aha5q5ia7j6p9xashz7vj"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/tomb.v2",
-    "fetch": {
-      "type": "git",
-      "url": "https://gopkg.in/tomb.v2",
-      "rev": "14b3d72120e8d10ea6e6b7f87f7175734b1faab8",
-      "sha256": "1nza31jvkpka5431c4bdbirvjdy36b1b55sbzljqhqih25jrcjx5"
-    }
-  },
-  {
-    "goPackagePath": "github.com/hanwen/go-fuse",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/hanwen/go-fuse",
-      "rev": "bd746dd8bcc8c059a9d953a786a6156eb83f398e",
-      "sha256": "1dvvclp418j3d02v9717sfqhl6fw6yyddr9r3j8gsiv8nb62ib56"
-    }
-  },
-  {
-    "goPackagePath": "github.com/cpucycle/astrotime",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/cpucycle/astrotime",
-      "rev": "9c7d514efdb561775030eaf8f1a9ae6bddb3a2ca",
-      "sha256": "024sc7g55v4s54irssm5wsn74sr2k2ynsm6z16w47q66cxhgvby1"
-    }
-  },
-  {
-    "goPackagePath": "github.com/godbus/dbus",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/godbus/dbus",
-      "rev": "32c6cc29c14570de4cf6d7e7737d68fb2d01ad15",
-      "sha256": "0v401f761l88yapiaw23pxvxviqrwl2r2vfd6lq02044i7x4i5r3"
-    }
-  },
-  {
-    "goPackagePath": "github.com/gorilla/websocket",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/gorilla/websocket",
-      "rev": "a622679ebd7a3b813862379232f645f8e690e43f",
-      "sha256": "1nc9jbcmgya1i6dmf6sbcqsnxi9hbjg6dz1z0k7zmc6xdwlq0y4q"
-    }
-  },
-  {
-    "goPackagePath": "github.com/syndtr/gocapability",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/syndtr/gocapability",
-      "rev": "2c00daeb6c3b45114c80ac44119e7b8801fdd852",
-      "sha256": "1x7jdcg2r5pakjf20q7bdiidfmv7vcjiyg682186rkp2wz0yws0l"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/inconshreveable/log15.v2",
-    "fetch": {
-      "type": "git",
-      "url": "https://gopkg.in/inconshreveable/log15.v2",
-      "rev": "b105bd37f74e5d9dc7b6ad7806715c7a2b83fd3f",
-      "sha256": "18rldvi60i7b3lljfrsqgcc24gdkw2pcixxydznyggaqhh96l6a8"
-    }
-  },
-  {
-    "goPackagePath": "github.com/gorilla/mux",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/gorilla/mux",
-      "rev": "8096f47503459bcc74d1f4c487b7e6e42e5746b5",
-      "sha256": "0163fm9jsh54df471mx9kfhdg0070klqhw9ja0qwdzqibxq791b9"
-    }
-  },
-  {
-    "goPackagePath": "github.com/pborman/uuid",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/pborman/uuid",
-      "rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4",
-      "sha256": "0rcx669bbjkkwdlw81spnra4ffgzd4rbpywnrj3w41m9vq6mk1gn"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/flosch/pongo2.v3",
-    "fetch": {
-      "type": "git",
-      "url": "https://gopkg.in/flosch/pongo2.v3",
-      "rev": "5e81b817a0c48c1c57cdf1a9056cf76bdee02ca9",
-      "sha256": "0fd7d79644zmcirsb1gvhmh0l5vb5nyxmkzkvqpmzzcg6yfczph8"
-    }
-  },
-  {
-    "goPackagePath": "github.com/olekukonko/tablewriter",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/olekukonko/tablewriter",
-      "rev": "cca8bbc0798408af109aaaa239cbd2634846b340",
-      "sha256": "0f9ph3z7lh6p6gihbl1461j9yq5qiaqxr9mzdkp512n18v89ml48"
-    }
-  },
-  {
-    "goPackagePath": "github.com/mattn/go-sqlite3",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/mattn/go-sqlite3",
-      "rev": "b4142c444a8941d0d92b0b7103a24df9cd815e42",
-      "sha256": "0xq2y4am8dz9w9aaq24s1npg1sn8pf2gn4nki73ylz2fpjwq9vla"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/lxc/go-lxc.v2",
-    "fetch": {
-      "type": "git",
-      "url": "https://gopkg.in/lxc/go-lxc.v2",
-      "rev": "8f9e220b36393c03854c2d224c5a55644b13e205",
-      "sha256": "1dc1n2561k3pxbm2zzh3qwlh30bcb2k9v22ghvr7ps2j9lmhs0ip"
-    }
-  },
-  {
-    "goPackagePath": "github.com/mattn/go-runewidth",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/mattn/go-runewidth",
-      "rev": "d6bea18f789704b5f83375793155289da36a3c7f",
-      "sha256": "1hnigpn7rjbwd1ircxkyx9hvi0xmxr32b2jdy2jzw6b3jmcnz1fs"
-    }
-  },
-  {
-    "goPackagePath": "github.com/coreos/go-systemd",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/coreos/go-systemd",
-      "rev": "a606a1e936df81b70d85448221c7b1c6d8a74ef1",
-      "sha256": "0fhan564swp982dnzzspb6jzfdl453489c0qavh65g3shy5x8x28"
-    }
-  },
-  {
-    "goPackagePath": "github.com/dustinkirkland/golang-petname",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/dustinkirkland/golang-petname",
-      "rev": "2182cecef7f257230fc998bc351a08a5505f5e6c",
-      "sha256": "1xagj34y5rxl7rykhil8iqxlls9rbgcxgdvgfp7kg39pinw83arl"
-    }
-  },
-  {
-    "goPackagePath": "github.com/gorilla/context",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/gorilla/context",
-      "rev": "215affda49addc4c8ef7e2534915df2c8c35c6cd",
-      "sha256": "1ybvjknncyx1f112mv28870n0l7yrymsr0861vzw10gc4yn1h97g"
-    }
-  },
-  {
-    "goPackagePath": "github.com/mattn/go-colorable",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/mattn/go-colorable",
-      "rev": "3dac7b4f76f6e17fb39b768b89e3783d16e237fe",
-      "sha256": "08680mba8hh2rghymqbzd4m40r9k765w5kbzvrif9ngd6h85qnw6"
-    }
-  },
-  {
-    "goPackagePath": "github.com/gosexy/gettext",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/gosexy/gettext",
-      "rev": "305f360aee30243660f32600b87c3c1eaa947187",
-      "sha256": "0sm7ziv56ms0lrk30ipbl6i17azar3a44dd2xvr011442zs5ym09"
-    }
-  },
-  {
-    "goPackagePath": "github.com/rcrowley/go-metrics",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/rcrowley/go-metrics",
-      "rev": "1ce93efbc8f9c568886b2ef85ce305b2217b3de3",
-      "sha256": "06gg72krlmd0z3zdq6s716blrga95pyj8dc2f2psfbknbkyrkfqa"
-    }
-  },
-  {
-    "goPackagePath": "github.com/inconshreveable/go-vhost",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/inconshreveable/go-vhost",
-      "rev": "c4c28117502e4bf00960c8282b2d1c51c865fe2c",
-      "sha256": "1rway6sls6fl2s2jk20ajj36rrlzh9944ncc9pdd19kifix54z32"
-    }
-  },
-  {
-    "goPackagePath": "code.google.com/p/log4go",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/ccpaging/log4go",
-      "rev": "cb4cc51cd03958183d3b637d0750497d88c2f7a8",
-      "sha256": "0l9f86zzhla9hq35q4xhgs837283qrm4gxbp5lrwwls54ifiq7k2"
-    }
-  },
-  {
-    "goPackagePath": "github.com/daviddengcn/go-colortext",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/daviddengcn/go-colortext",
-      "rev": "13eaeb896f5985a1ab74ddea58707a73d875ba57",
-      "sha256": "0618xs9lc5xfp5zkkb5j47dr7i30ps3zj5fj0zpv8afqh2cc689x"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/yaml.v1",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/go-yaml/yaml",
-      "rev": "b0c168ac0cf9493da1f9bb76c34b26ffef940b4a",
-      "sha256": "0jbdy41pplf2d1j24qwr8gc5qsig6ai5ch8rwgvg72kq9q0901cy"
-    }
-  },
-  {
-    "goPackagePath": "github.com/inconshreveable/mousetrap",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/inconshreveable/mousetrap",
-      "rev": "9dbb96d2c3a964935b0870b5abaea13c98b483aa",
-      "sha256": "1f9g8vm18qv1rcb745a4iahql9vfrz0jni9mnzriab2wy1pfdl5b"
-    }
-  },
-  {
-    "goPackagePath": "github.com/nsf/termbox-go",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/nsf/termbox-go",
-      "rev": "9aecf65084a5754f12d27508fa2e6ed56851953b",
-      "sha256": "16sak07bgvmax4zxfrd4jia1dgygk733xa8vk8cdx28z98awbfsh"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/inconshreveable/go-update.v0",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/inconshreveable/go-update",
-      "rev": "d8b0b1d421aa1cbf392c05869f8abbc669bb7066",
-      "sha256": "0cvkik2w368fzimx3y29ncfgw7004qkbdf2n3jy5czvzn35q7dpa"
-    }
-  },
-  {
-    "goPackagePath": "github.com/kardianos/osext",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/kardianos/osext",
-      "rev": "29ae4ffbc9a6fe9fb2bc5029050ce6996ea1d3bc",
-      "sha256": "1mawalaz84i16njkz6f9fd5jxhcbxkbsjnav3cmqq2dncv2hyv8a"
-    }
-  },
-  {
-    "goPackagePath": "github.com/kr/binarydist",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/kr/binarydist",
-      "rev": "9955b0ab8708602d411341e55fffd7e0700f86bd",
-      "sha256": "11wncbbbrdcxl5ff3h6w8vqfg4bxsf8709mh6vda0cv236flkyn3"
-    }
-  },
-  {
-    "goPackagePath": "github.com/jessevdk/go-flags",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/jessevdk/go-flags",
-      "rev": "1b89bf73cd2c3a911d7b2a279ab085c4a18cf539",
-      "sha256": "027nglc5xx1cm03z9sisg0iqrhwcj6gh5z254rrpl8p4fwrxx680"
-    }
-  },
-  {
-    "goPackagePath": "github.com/prometheus/client_model",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/prometheus/client_model",
-      "rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6",
-      "sha256": "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"
-    }
-  },
-  {
-    "goPackagePath": "github.com/prometheus/common",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/prometheus/common",
-      "rev": "40456948a47496dc22168e6af39297a2f8fbf38c",
-      "sha256": "15700w18pifng0l2isa6v25y91r5rb7yfgljqw2g2gqrvac6sr5l"
-    }
-  },
-  {
-    "goPackagePath": "github.com/beorn7/perks",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/beorn7/perks",
-      "rev": "b965b613227fddccbfffe13eae360ed3fa822f8d",
-      "sha256": "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk"
-    }
-  },
-  {
-    "goPackagePath": "github.com/coreos/go-etcd",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/coreos/go-etcd",
-      "rev": "9847b93751a5fbaf227b893d172cee0104ac6427",
-      "sha256": "1ihq01ayqzxvn6hca5j00vl189vi5lm78f0fy2wpk5mrm3xi01l4"
-    }
-  },
-  {
-    "goPackagePath": "github.com/matttproud/golang_protobuf_extensions",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/matttproud/golang_protobuf_extensions",
-      "rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a",
-      "sha256": "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"
-    }
-  },
-  {
-    "goPackagePath": "github.com/prometheus/client_golang",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/prometheus/client_golang",
-      "rev": "6dbab8106ed3ed77359ac85d9cf08e30290df864",
-      "sha256": "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"
-    }
-  },
-  {
-    "goPackagePath": "github.com/stathat/go",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/stathat/go",
-      "rev": "91dfa3a59c5b233fef9a346a1460f6e2bc889d93",
-      "sha256": "105ql5v8r4hqcsq0ag7asdxqg9n7rvf83y1q1dj2nfjyn4manv6r"
-    }
-  },
-  {
-    "goPackagePath": "github.com/ugorji/go",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/ugorji/go",
-      "rev": "03e33114d4d60a1f37150325e15f51b0fa6fc4f6",
-      "sha256": "01kdzgx23cgb4k867m1pvsw14hhdr9jf2frqy6i4j4221055m57v"
-    }
-  },
-  {
-    "goPackagePath": "github.com/miekg/dns",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/miekg/dns",
-      "rev": "7e024ce8ce18b21b475ac6baf8fa3c42536bf2fa",
-      "sha256": "0hlwb52lnnj3c6papjk9i5w5cjdw6r7c891v4xksnfvk1f9cy9kl"
-    }
-  },
-  {
-    "goPackagePath": "github.com/prometheus/procfs",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/prometheus/procfs",
-      "rev": "c91d8eefde16bd047416409eb56353ea84a186e4",
-      "sha256": "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"
-    }
-  },
-  {
-    "goPackagePath": "github.com/schachmat/ingo",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/schachmat/ingo",
-      "rev": "fab41e4e62cbef5d92998746ec25f7e195100f38",
-      "sha256": "04yfnch7pdabjjqfl2qxjmsaknvp4m1rbjlv8qrpmnqwjkxzx0hb"
-    }
-  },
-  {
-    "goPackagePath": "github.com/michaelmacinnis/adapted",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/michaelmacinnis/adapted",
-      "rev": "0dd5fa34d6f9d74c7c0deed1fc224f9a87e02978",
-      "sha256": "16n3a87m33pqx4qih713q3gw2j6ksj1q3ngjax6bpn5b11rqvikv"
-    }
-  },
-  {
-    "goPackagePath": "github.com/peterh/liner",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/peterh/liner",
-      "rev": "ad1edfd30321d8f006ccf05f1e0524adeb943060",
-      "sha256": "0c24d9j1gnq7r982h1l2isp3d37379qw155hr8ihx9i2mhpfz317"
-    }
-  },
-  {
-    "goPackagePath": "github.com/mitchellh/iochan",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/mitchellh/iochan",
-      "rev": "b584a329b193e206025682ae6c10cdbe03b0cd77",
-      "sha256": "1fcwdhfci41ibpng2j4c1bqfng578cwzb3c00yw1lnbwwhaq9r6b"
-    }
-  },
-  {
-    "goPackagePath": "github.com/gogo/protobuf",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/gogo/protobuf",
-      "rev": "7883e1468d48d969e1c3ce4bcde89b6a7dd4adc4",
-      "sha256": "16ja7lqq96q0pnzgnbwnh0j8qzvqgns1nfk8ndxgkg4sg93bg372"
-    }
-  },
-  {
-    "goPackagePath": "github.com/golang/glog",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/golang/glog",
-      "rev": "fca8c8854093a154ff1eb580aae10276ad6b1b5f",
-      "sha256": "1nr2q0vas0a2f395f4shjxqpas18mjsf8yhgndsav7svngpbbpg8"
-    }
-  },
-  {
-    "goPackagePath": "github.com/mesos/mesos-go",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/mesos/mesos-go",
-      "rev": "aaa5b2fecf0e2db463f4f996c89617d6766b2969",
-      "sha256": "1pk1fpxksjln6kqvgm1igw3582jgrn14fwa8bdj5cwbpy6skjdvk"
-    }
-  },
-  {
-    "goPackagePath": "github.com/pmezard/go-difflib",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/pmezard/go-difflib",
-      "rev": "d8ed2627bdf02c080bf22230dbb337003b7aba2d",
-      "sha256": "0w1jp4k4zbnrxh3jvh8fgbjgqpf2hg31pbj8fb32kh26px9ldpbs"
-    }
-  },
-  {
-    "goPackagePath": "github.com/samuel/go-zookeeper",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/samuel/go-zookeeper",
-      "rev": "5bb5cfc093ad18a28148c578f8632cfdb4d802e4",
-      "sha256": "1kpx1ymh7rds0b2km291idnyqi0zck74nd8hnk72crgz7wmpqv6z"
-    }
-  },
-  {
-    "goPackagePath": "github.com/stretchr/objx",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/stretchr/objx",
-      "rev": "cbeaeb16a013161a98496fad62933b1d21786672",
-      "sha256": "1xn7iibjik77h6h0jilfvcjkkzaqz45baf44p3rb2i03hbmkqkp1"
-    }
-  },
-  {
-    "goPackagePath": "github.com/davecgh/go-spew",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/davecgh/go-spew",
-      "rev": "5215b55f46b2b919f50a1df0eaa5886afe4e3b3d",
-      "sha256": "15h9kl73rdbzlfmsdxp13jja5gs7sknvqkpq2qizq3qv3nr1x8dk"
-    }
-  },
-  {
-    "goPackagePath": "github.com/emicklei/go-restful",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/emicklei/go-restful",
-      "rev": "892402ba11a2e2fd5e1295dd633481f27365f14d",
-      "sha256": "0gr9f53vayc6501a1kaw4p3h9pgf376cgxsfnr3f2dvp0xacvw8x"
-    }
-  },
-  {
-    "goPackagePath": "github.com/stretchr/testify",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/stretchr/testify",
-      "rev": "089c7181b8c728499929ff09b62d3fdd8df8adff",
-      "sha256": "03dzxkxbs298pvfsjz4kdadfaf9jkzsdhshqmg4p12wbyaj09s4p"
-    }
-  },
-  {
-    "goPackagePath": "github.com/kr/pty",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/kr/pty",
-      "rev": "67e2db24c831afa6c64fc17b4a143390674365ef",
-      "sha256": "1l3z3wbb112ar9br44m8g838z0pq2gfxcp5s3ka0xvm1hjvanw2d"
-    }
-  },
-  {
-    "goPackagePath": "github.com/braintree/manners",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/braintree/manners",
-      "rev": "cab36f97339b1925cd89e158632728025557e550",
-      "sha256": "1q508c62iiklghkhwqz9c0zsn9hrij7kqb93gdywzj7ms7x6hlfh"
-    }
-  },
-  {
-    "goPackagePath": "github.com/codegangsta/cli",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/codegangsta/cli",
-      "rev": "71f57d300dd6a780ac1856c005c4b518cfd498ec",
-      "sha256": "1fxznirkvank5461789dm5aw5z8aqi0jvwligvz44659rfl376p3"
-    }
-  },
-  {
-    "goPackagePath": "github.com/elazarl/go-bindata-assetfs",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/elazarl/go-bindata-assetfs",
-      "rev": "d5cac425555ca5cf00694df246e04f05e6a55150",
-      "sha256": "636ce247ff6f85c14f38a421f46662fa77bdc29762692e1f72b3cd1f9d7a1d17"
-    }
-  },
-  {
-    "goPackagePath": "github.com/fatih/structs",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/fatih/structs",
-      "rev": "a9f7daa9c2729e97450c2da2feda19130a367d8f",
-      "sha256": "0pyrc7svc826g37al3db19n5l4r2m9h1mlhjh3hz2r41xfaqia50"
-    }
-  },
-  {
-    "goPackagePath": "github.com/hashicorp/hcl",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/hashicorp/hcl",
-      "rev": "54864211433d45cb780682431585b3e573b49e4a",
-      "sha256": "07l2dydzjpdgm2d4a72hkmincn455j3nrafg6hs3c23bkvizj950"
-    }
-  },
-  {
-    "goPackagePath": "github.com/hashicorp/go-multierror",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/hashicorp/go-multierror",
-      "rev": "56912fb08d85084aa318edcf2bba735b97cf35c5",
-      "sha256": "0s01cqdab2f7fxkkjjk2wqx05a1shnwlvfn45h2pi3i4gapvcn0r"
-    }
-  },
-  {
-    "goPackagePath": "github.com/mreiferson/go-snappystream",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/mreiferson/go-snappystream",
-      "rev": "028eae7ab5c4c9e2d1cb4c4ca1e53259bbe7e504",
-      "sha256": "0jdd5whp74nvg35d9hzydsi3shnb1vrnd7shi9qz4wxap7gcrid6"
-    }
-  },
-  {
-    "goPackagePath": "github.com/bitly/go-nsq",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/bitly/go-nsq",
-      "rev": "22a8bd48c443ec23bb559675b6df8284bbbdab29",
-      "sha256": "06hrkwk84w8rshkanvfgmgbiml7n06ybv192dvibhwgk2wz2dl46"
-    }
-  },
-  {
-    "goPackagePath": "github.com/bitly/go-simplejson",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/bitly/go-simplejson",
-      "rev": "18db6e68d8fd9cbf2e8ebe4c81a78b96fd9bf05a",
-      "sha256": "0lj9cxyncchlw6p35j0yym5q5waiz0giw6ri41qdwm8y3dghwwiy"
-    }
-  },
-  {
-    "goPackagePath": "github.com/blang/semver",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/blang/semver",
-      "rev": "9bf7bff48b0388cb75991e58c6df7d13e982f1f2",
-      "sha256": "11sinbf942dpyc9wdpidkhmqn438cfp5n8x3xqnmq9aszkld9hy7"
-    }
-  },
-  {
-    "goPackagePath": "github.com/bmizerany/perks",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/bmizerany/perks",
-      "rev": "6cb9d9d729303ee2628580d9aec5db968da3a607",
-      "sha256": "0cdh84hmn21is6hvv6dy9qjdcg9w3l2k8avlk0881a8cqm09s90j"
-    }
-  },
-  {
-    "goPackagePath": "github.com/BurntSushi/toml",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/BurntSushi/toml",
-      "rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4",
-      "sha256": "0gkgkw04ndr5y7hrdy0r4v2drs5srwfcw2bs1gyas066hwl84xyw"
-    }
-  },
-  {
-    "goPackagePath": "github.com/bitly/go-hostpool",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/bitly/go-hostpool",
-      "rev": "d0e59c22a56e8dadfed24f74f452cea5a52722d2",
-      "sha256": "14ph12krn5zlg00vh9g6g08lkfjxnpw46nzadrfb718yl1hgyk3g"
-    }
-  },
-  {
-    "goPackagePath": "github.com/bitly/timer_metrics",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/bitly/timer_metrics",
-      "rev": "afad1794bb13e2a094720aeb27c088aa64564895",
-      "sha256": "1b717vkwj63qb5kan4b92kx4rg6253l5mdb3lxpxrspy56a6rl0c"
-    }
-  },
-  {
-    "goPackagePath": "github.com/mreiferson/go-options",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/mreiferson/go-options",
-      "rev": "7c174072188d0cfbe6f01bb457626abb22bdff52",
-      "sha256": "0ksyi2cb4k6r2fxamljg42qbz5hdcb9kv5i7y6cx4ajjy0xznwgm"
-    }
-  },
-  {
-    "goPackagePath": "google.golang.org/api",
-    "fetch": {
-      "type": "git",
-      "url": "https://code.googlesource.com/google-api-go-client",
-      "rev": "a5c3e2a4792aff40e59840d9ecdff0542a202a80",
-      "sha256": "1kigddnbyrl9ddpj5rs8njvf1ck54ipi4q1282k0d6b3am5qfbj8"
-    }
-  },
-  {
-    "goPackagePath": "google.golang.org/cloud",
-    "fetch": {
-      "type": "git",
-      "url": "https://code.googlesource.com/gocloud",
-      "rev": "6335269abf9002cf5a84613c13cda6010842b834",
-      "sha256": "15xrqxna5ms0r634k3bfzyymn431dvqcjwbsap8ay60x371kzbwf"
-    }
-  },
-  {
-    "goPackagePath": "golang.org/x/oauth2",
-    "fetch": {
-      "type": "git",
-      "url": "https://go.googlesource.com/oauth2",
-      "rev": "397fe7649477ff2e8ced8fc0b2696f781e53745a",
-      "sha256": "0fza0l7iwh6llkq2yzqn7dxi138vab0da64lnghfj1p71fprjzn8"
-    }
-  },
-  {
-    "goPackagePath": "github.com/18F/hmacauth",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/18F/hmacauth",
-      "rev": "9232a6386b737d7d1e5c1c6e817aa48d5d8ee7cd",
-      "sha256": "056mcqrf2bv0g9gn2ixv19srk613h4sasl99w9375mpvmadb3pz1"
-    }
-  },
-  {
-    "goPackagePath": "github.com/armon/go-metrics",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/armon/go-metrics",
-      "rev": "b2d95e5291cdbc26997d1301a5e467ecbb240e25",
-      "sha256": "1jvdf98jlbyzbb9w159nifvv8fihrcs66drnl8pilqdjpmkmyyck"
-    }
-  },
-  {
-    "goPackagePath": "github.com/mattn/go-isatty",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/mattn/go-isatty",
-      "rev": "ae0b1f8f8004be68d791a576e3d8e7648ab41449",
-      "sha256": "0qrcsh7j9mxcaspw8lfxh9hhflz55vj4aq1xy00v78301czq6jlj"
-    }
-  },
-  {
-    "goPackagePath": "github.com/hashicorp/logutils",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/hashicorp/logutils",
-      "rev": "0dc08b1671f34c4250ce212759ebd880f743d883",
-      "sha256": "0rynhjwvacv9ibl2k4fwz0xy71d583ac4p33gm20k9yldqnznc7r"
-    }
-  },
-  {
-    "goPackagePath": "github.com/armon/go-radix",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/armon/go-radix",
-      "rev": "fbd82e84e2b13651f3abc5ffd26b65ba71bc8f93",
-      "sha256": "16y64r1v054c2ln0bi5mrqq1cmvy6d6pnxk1glb8lw2g31ksa80c"
-    }
-  },
-  {
-    "goPackagePath": "github.com/hashicorp/go-syslog",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/hashicorp/go-syslog",
-      "rev": "42a2b573b664dbf281bd48c3cc12c086b17a39ba",
-      "sha256": "1j53m2wjyczm9m55znfycdvm4c8vfniqgk93dvzwy8vpj5gm6sb3"
-    }
-  },
-  {
-    "goPackagePath": "github.com/hashicorp/memberlist",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/hashicorp/memberlist",
-      "rev": "6025015f2dc659ca2c735112d37e753bda6e329d",
-      "sha256": "01s2gwnbgvwz4wshz9d4za0p12ji4fnapnlmz3jwfcmcwjpyqfb7"
-    }
-  },
-  {
-    "goPackagePath": "github.com/mitchellh/mapstructure",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/mitchellh/mapstructure",
-      "rev": "281073eb9eb092240d33ef253c404f1cca550309",
-      "sha256": "1zjx9fv29639sp1fn84rxs830z7gp7bs38yd5y1hl5adb8s5x1mh"
-    }
-  },
-  {
-    "goPackagePath": "github.com/armon/circbuf",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/armon/circbuf",
-      "rev": "f092b4f207b6e5cce0569056fba9e1a2735cb6cf",
-      "sha256": "06kwwdwa3hskdh6ws7clj1vim80dyc3ldim8k9y5qpd30x0avn5s"
-    }
-  },
-  {
-    "goPackagePath": "github.com/hashicorp/mdns",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/hashicorp/mdns",
-      "rev": "2b439d37011456df8ff83a70ffd1cd6046410113",
-      "sha256": "17zwk212zmyramnjylpvvrvbbsz0qb5crkhly6yiqkyll3qzpb96"
-    }
-  },
-  {
-    "goPackagePath": "github.com/mitchellh/cli",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/mitchellh/cli",
-      "rev": "8102d0ed5ea2709ade1243798785888175f6e415",
-      "sha256": "08mj1l94pww72jy34gk9a483hpic0rrackskfw13r3ycy997w7m2"
-    }
-  },
-  {
-    "goPackagePath": "github.com/ryanuber/columnize",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/ryanuber/columnize",
-      "rev": "44cb4788b2ec3c3d158dd3d1b50aba7d66f4b59a",
-      "sha256": "1qrqr76cw58x2hkjic6h88na5ihgvkmp8mqapj8kmjcjzdxkzhr9"
-    }
-  },
-  {
-    "goPackagePath": "github.com/hashicorp/go-msgpack",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/ugorji/go",
-      "rev": "03e33114d4d60a1f37150325e15f51b0fa6fc4f6",
-      "sha256": "01kdzgx23cgb4k867m1pvsw14hhdr9jf2frqy6i4j4221055m57v"
-    }
-  },
-  {
-    "goPackagePath": "github.com/hashicorp/go.net",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/hashicorp/go.net",
-      "rev": "104dcad90073cd8d1e6828b2af19185b60cf3e29",
-      "sha256": "0pfi09h4q6w2x833qxr8r609ml4kw1flqm265j752sb08sbf3zwf"
-    }
-  },
-  {
-    "goPackagePath": "golang.org/x/crypto",
-    "fetch": {
-      "type": "git",
-      "url": "https://go.googlesource.com/crypto",
-      "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
-      "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
-    }
-  },
-  {
-    "goPackagePath": "golang.org/x/tools",
-    "fetch": {
-      "type": "git",
-      "url": "https://go.googlesource.com/tools",
-      "rev": "9ae4729fba20b3533d829a9c6ba8195b068f2abc",
-      "sha256": "1j51aaskfqc953p5s9naqimr04hzfijm4yczdsiway1xnnvvpfr1"
-    }
-  },
-  {
-    "goPackagePath": "github.com/vincent-petithory/structfield",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/vincent-petithory/structfield",
-      "rev": "01a738558a47fbf16712994d1737fb31c77e7d11",
-      "sha256": "1kyx71z13mf6hc8ly0j0b9zblgvj5lzzvgnc3fqh61wgxrsw24dw"
-    }
-  },
-  {
-    "goPackagePath": "github.com/aybabtme/rgbterm",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/aybabtme/rgbterm",
-      "rev": "c07e2f009ed2311e9c35bca12ec00b38ccd48283",
-      "sha256": "1qph7drds44jzx1whqlrh1hs58k0wv0v58zyq2a81hmm72gsgzam"
-    }
-  },
-  {
-    "goPackagePath": "github.com/vaughan0/go-ini",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/vaughan0/go-ini",
-      "rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1",
-      "sha256": "1l1isi3czis009d9k5awsj4xdxgbxn4n9yqjc1ac7f724x6jacfa"
-    }
-  },
-  {
-    "goPackagePath": "github.com/mitchellh/go-homedir",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/mitchellh/go-homedir",
-      "rev": "1f6da4a72e57d4e7edd4a7295a585e0a3999a2d4",
-      "sha256": "1l5lrsjrnwxn299mhvyxvz8hd0spkx0d31gszm4cyx21bg1xsiy9"
-    }
-  },
-  {
-    "goPackagePath": "github.com/goamz/goamz",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/goamz/goamz",
-      "rev": "2a8fed5e89ab9e16210fc337d1aac780e8c7bbb7",
-      "sha256": "0rlinp0cvgw66qjndg4padr5s0wd3n7kjfggkx6czqj9bqaxcz4b"
-    }
-  },
-  {
-    "goPackagePath": "github.com/nmcclain/asn1-ber",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/go-asn1-ber/asn1-ber",
-      "rev": "f4b6f4a84f5cde443d1925b5ec185ee93c2bdc72",
-      "sha256": "0qdyax6yw3hvplzqc2ykpihi3m5y4nii581ay0mxy9c54bzs2nk9"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/asn1-ber.v1",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/go-asn1-ber/asn1-ber",
-      "rev": "f4b6f4a84f5cde443d1925b5ec185ee93c2bdc72",
-      "sha256": "0qdyax6yw3hvplzqc2ykpihi3m5y4nii581ay0mxy9c54bzs2nk9"
-    }
-  },
-  {
-    "goPackagePath": "github.com/peterbourgon/g2s",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/peterbourgon/g2s",
-      "rev": "ec76db4c1ac16400ac0e17ca9c4840e1d23da5dc",
-      "sha256": "1p4p8755v2nrn54rik7yifpg9szyg44y5rpp0kryx4ycl72307rj"
-    }
-  },
-  {
-    "goPackagePath": "github.com/nmcclain/ldap",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/go-ldap/ldap",
-      "rev": "83e65426fd1c06626e88aa8a085e5bfed0208e29",
-      "sha256": "179lwaf0hvczl8g4xzkpcpzq25p1b23f7399bx5zl55iin62d8yz"
-    }
-  },
-  {
-    "goPackagePath": "github.com/kelseyhightower/memkv",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/kelseyhightower/memkv",
-      "rev": "7f9c7f36f45ba80c62fe22779ee78d9b4ca36580",
-      "sha256": "090x65kr3gqh8fc8z4rm9hc2r0v0k7rfm5vsbmhdh21f48ixw540"
-    }
-  },
-  {
-    "goPackagePath": "github.com/armon/consul-api",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/armon/consul-api",
-      "rev": "f79efe463cdbb62f6d5a55f879a63ec554eb13e5",
-      "sha256": "1rkmzfhsazj9p2b6ywvs8yramzvxfxyvplzxi0ldvhcv04887gcp"
-    }
-  },
-  {
-    "goPackagePath": "github.com/garyburd/redigo",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/garyburd/redigo",
-      "rev": "535138d7bcd717d6531c701ef5933d98b1866257",
-      "sha256": "1m7nc1gvv5yqnq8ii75f33485il6y6prf8gxl97dimsw94qccc5v"
-    }
-  },
-  {
-    "goPackagePath": "github.com/bkaradzic/go-lz4",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/bkaradzic/go-lz4",
-      "rev": "74ddf82598bc4745b965729e9c6a463bedd33049",
-      "sha256": "1vdid8v0c2v2qhrg9rzn3l7ya1h34jirrxfnir7gv7w6s4ivdvc1"
-    }
-  },
-  {
-    "goPackagePath": "github.com/calmh/luhn",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/calmh/luhn",
-      "rev": "0c8388ff95fa92d4094011e5a04fc99dea3d1632",
-      "sha256": "1hfj1lx7wdpifn16zqrl4xml6cj5gxbn6hfz1f46g2a6bdf0gcvs"
-    }
-  },
-  {
-    "goPackagePath": "golang.org/x/text",
-    "fetch": {
-      "type": "git",
-      "url": "https://go.googlesource.com/text",
-      "rev": "5eb8d4684c4796dd36c74f6452f2c0fa6c79597e",
-      "sha256": "1cjwm2pv42dbfqc6ylr7jmma902zg4gng5aarqrbjf1k2nf2vs14"
-    }
-  },
-  {
-    "goPackagePath": "github.com/vitrun/qart",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/vitrun/qart",
-      "rev": "ccb109cf25f0cd24474da73b9fee4e7a3e8a8ce0",
-      "sha256": "0bhp768b8ha6f25dmhwn9q8m2lkbn4qnjf8n7pizk25jn5zjdvc8"
-    }
-  },
-  {
-    "goPackagePath": "github.com/calmh/du",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/calmh/du",
-      "rev": "3c0690cca16228b97741327b1b6781397afbdb24",
-      "sha256": "1mv6mkbslfc8giv47kyl97ny0igb3l7jya5hc75sm54xi6g205wa"
-    }
-  },
-  {
-    "goPackagePath": "github.com/calmh/xdr",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/calmh/xdr",
-      "rev": "e467b5aeb65ca8516fb3925c84991bf1d7cc935e",
-      "sha256": "1bi4b2xkjzcr0vq1wxz14i9943k71sj092dam0gdmr9yvdrg0nra"
-    }
-  },
-  {
-    "goPackagePath": "github.com/juju/ratelimit",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/juju/ratelimit",
-      "rev": "772f5c38e468398c4511514f4f6aa9a4185bc0a0",
-      "sha256": "02rs61ay6sq499lxxszjsrxp33m6zklds1xrmnr5fk73vpqfa28p"
-    }
-  },
-  {
-    "goPackagePath": "github.com/thejerf/suture",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/thejerf/suture",
-      "rev": "99c1f2d613756768fc4299acd9dc621e11ed3fd7",
-      "sha256": "094ksr2nlxhvxr58nbnzzk0prjskb21r86jmxqjr3rwg4rkwn6d4"
-    }
-  },
-  {
-    "goPackagePath": "github.com/golang/snappy",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/golang/snappy",
-      "rev": "723cc1e459b8eea2dea4583200fd60757d40097a",
-      "sha256": "0bprq0qb46f5511b5scrdqqzskqqi2z8b4yh3216rv0n1crx536h"
-    }
-  },
-  {
-    "goPackagePath": "github.com/syndtr/goleveldb",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/syndtr/goleveldb",
-      "rev": "1a9d62f03ea92815b46fcaab357cfd4df264b1a0",
-      "sha256": "04ywbif36fiah4fw0x2abr5q3p4fdhi6q57d5icc2mz03q889vhb"
-    }
-  },
-  {
-    "goPackagePath": "github.com/flynn/go-shlex",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/flynn/go-shlex",
-      "rev": "3f9db97f856818214da2e1057f8ad84803971cff",
-      "sha256": "1j743lysygkpa2s2gii2xr32j7bxgc15zv4113b0q9jhn676ysia"
-    }
-  },
-  {
-    "goPackagePath": "github.com/xenolf/lego",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/xenolf/lego",
-      "rev": "ca19a90028e242e878585941c2a27c8f3b3efc25",
-      "sha256": "1zkcsbdzbmfzk3kqmcj9l13li8sz228xhrw2wj3ab4a0w6drbw3x"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/natefinch/lumberjack.v2",
-    "fetch": {
-      "type": "git",
-      "url": "https://gopkg.in/natefinch/lumberjack.v2",
-      "rev": "514cbda263a734ae8caac038dadf05f8f3f9f738",
-      "sha256": "1v92v8vkip36l2fs6l5dpp655151hrijjc781cif658r8nf7xr82"
-    }
-  },
-  {
-    "goPackagePath": "github.com/shurcooL/sanitized_anchor_name",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/shurcooL/sanitized_anchor_name",
-      "rev": "10ef21a441db47d8b13ebcc5fd2310f636973c77",
-      "sha256": "1cnbzcf47cn796rcjpph1s64qrabhkv5dn9sbynsy7m9zdwr5f01"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/square/go-jose.v1",
-    "fetch": {
-      "type": "git",
-      "url": "https://gopkg.in/square/go-jose.v1",
-      "rev": "40d457b439244b546f023d056628e5184136899b",
-      "sha256": "0asa1kl1qbx0cyayk44jhxxff0awpkwiw6va7yzrzjzhfc5kvg7p"
-    }
-  },
-  {
-    "goPackagePath": "github.com/mholt/archiver",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/mholt/archiver",
-      "rev": "85f054813ed511646b0ce5e047697e0651b8e1a4",
-      "sha256": "0b38mrfm3rwgdi7hrp4gjhf0y0f6bw73qjkfrkafxjrdpdg7nyly"
-    }
-  },
-  {
-    "goPackagePath": "github.com/dustin/go-humanize",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/dustin/go-humanize",
-      "rev": "8929fe90cee4b2cb9deb468b51fb34eba64d1bf0",
-      "sha256": "1g155kxjh6hd3ibx41nbpj6f7h5bh54zgl9dr53xzg2xlxljgjy0"
-    }
-  },
-  {
-    "goPackagePath": "github.com/jimstudt/http-authentication",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/jimstudt/http-authentication",
-      "rev": "3eca13d6893afd7ecabe15f4445f5d2872a1b012",
-      "sha256": "1drw3bhrxpjzwryqz9nq5s0yyjqyd42iym3bh1zjs5qsh401cq08"
-    }
-  },
-  {
-    "goPackagePath": "github.com/russross/blackfriday",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/russross/blackfriday",
-      "rev": "d18b67ae0afd61dae240896eae1785f00709aa31",
-      "sha256": "1l78hz8k1ixry5fjw29834jz1q5ysjcpf6kx2ggjj1s6xh0bfzvf"
-    }
-  },
-  {
-    "goPackagePath": "github.com/agl/go-gtk",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/agl/go-gtk",
-      "rev": "91c1edb38c241d73129e6b098ca1c9fa83abfc15",
-      "sha256": "156ixlhakpqgyp35rsvmndrqz8aggv5bcmzg9ynpri3b9j6kim4d"
-    }
-  },
-  {
-    "goPackagePath": "bitbucket.org/ww/goautoneg",
-    "fetch": {
-      "type": "hg",
-      "url": "bitbucket.org/ww/goautoneg",
-      "rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675",
-      "sha256": "19khhn5xhqv1yp7d6k987gh5w5rhrjnp4p0c6fyrd8z6lzz5h9qi"
-    }
-  },
-  {
-    "goPackagePath": "github.com/antonlindstrom/mesos_stats",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/antonlindstrom/mesos_stats",
-      "rev": "0c6ea494c19bedc67ebb85ce3d187ec21050e920",
-      "sha256": "18ggyjf4nyn77gkn16wg9krp4dsphgzdgcr3mdflv6mvbr482ar4"
-    }
-  },
-  {
-    "goPackagePath": "github.com/go-sql-driver/mysql",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/go-sql-driver/mysql",
-      "rev": "fb7299726d2e68745a8805b14f2ff44b5c2cfa84",
-      "sha256": "185af0x475hq2wmm2zdvxjyslkplf8zzqijdxa937zqxq63qiw4w"
-    }
-  },
-  {
-    "goPackagePath": "github.com/prometheus/log",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/prometheus/log",
-      "rev": "439e5db48fbb50ebbaf2c816030473a62f505f55",
-      "sha256": "1fl23gsw2hn3c1y91qckr661sybqcw2gqnd1gllxn3hp6p2w6hxv"
-    }
-  },
-  {
-    "goPackagePath": "github.com/soundcloud/go-runit",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/soundcloud/go-runit",
-      "rev": "a9148323a615e2e1c93b7a9893914a360b4945c8",
-      "sha256": "00f2rfhsaqj2wjanh5qp73phx7x12a5pwd7lc0rjfv68l6sgpg2v"
-    }
-  },
-  {
-    "goPackagePath": "github.com/beevik/ntp",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/beevik/ntp",
-      "rev": "0a5264e2563429030eb922f258229ae3fee5b5dc",
-      "sha256": "03fvgbjf2aprjj1s6wdc35wwa7k1w5phkixzvp5n1j21sf6w4h24"
-    }
-  },
-  {
-    "goPackagePath": "github.com/julienschmidt/httprouter",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/julienschmidt/httprouter",
-      "rev": "6aacfd5ab513e34f7e64ea9627ab9670371b34e7",
-      "sha256": "00rrjysmq898qcrf2hfwfh9s70vwvmjx2kp5w03nz1krxa4zhrkl"
-    }
-  },
-  {
-    "goPackagePath": "github.com/howeyc/fsnotify",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/fsnotify/fsnotify",
-      "rev": "ea925a0a47d225b2ca7f9932b01d2ed4f3ec74f6",
-      "sha256": "15wqjpkfzsxnaxbz6y4r91hw6812g3sc4ipagxw1bya9klbnkdc9"
-    }
-  },
-  {
-    "goPackagePath": "github.com/alecthomas/template",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/alecthomas/template",
-      "rev": "14fd436dd20c3cc65242a9f396b61bfc8a3926fc",
-      "sha256": "19rzvvcgvr1z2wz9xpqsmlm8syizbpxjp5zbzgakvrqlajpbjvx2"
-    }
-  },
-  {
-    "goPackagePath": "github.com/alecthomas/units",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/alecthomas/units",
-      "rev": "2efee857e7cfd4f3d0138cc3cbb1b4966962b93a",
-      "sha256": "1j65b91qb9sbrml9cpabfrcf07wmgzzghrl7809hjjhrmbzri5bl"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/alecthomas/kingpin.v2",
-    "fetch": {
-      "type": "git",
-      "url": "https://gopkg.in/alecthomas/kingpin.v2",
-      "rev": "21551c2a6259a8145110ca80a36e25c9d7624032",
-      "sha256": "1zhpqc4qxsw9lc1b4dwk5r42k9r702ihzrabs3mnsphvm9jx4l59"
-    }
-  },
-  {
-    "goPackagePath": "github.com/Masterminds/vcs",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/Masterminds/vcs",
-      "rev": "7af28b64c5ec41b1558f5514fd938379822c237c",
-      "sha256": "127pamr5lkym3iq6z747bm4y4gyc02glrqb61yv82z1rdyv1dcf6"
-    }
-  },
-  {
-    "goPackagePath": "github.com/boltdb/bolt",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/boltdb/bolt",
-      "rev": "957d850b5158a4eebf915476058e720f43459584",
-      "sha256": "193adhhsqdy0kyq1l1fi8pg2n6pwyrw4h607qm78qyi26f8i7vzf"
-    }
-  },
-  {
-    "goPackagePath": "github.com/cheggaaa/pb",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/cheggaaa/pb",
-      "rev": "e648e12b78cedf14ebb2fc1855033f07b034cfbb",
-      "sha256": "03k4cars7hcqqgdsd0minfls2p7gjpm8q6y8vknh1s68kvxd4xam"
-    }
-  },
-  {
-    "goPackagePath": "github.com/odeke-em/cli-spinner",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/odeke-em/cli-spinner",
-      "rev": "610063bb4aeef25f7645b3e6080456655ec0fb33",
-      "sha256": "13wzs2qrxd72ah32ym0ppswhvyimjw5cqaq3q153y68vlvxd048c"
-    }
-  },
-  {
-    "goPackagePath": "github.com/odeke-em/statos",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/odeke-em/statos",
-      "rev": "f27d6ab69b62abd9d9fe80d355e23a3e45d347d6",
-      "sha256": "17cpks8bi9i7p8j38x0wy60jb9g39wbzszcmhx4hlq6yzxr04jvs"
-    }
-  },
-  {
-    "goPackagePath": "github.com/odeke-em/exponential-backoff",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/odeke-em/exponential-backoff",
-      "rev": "96e25d36ae36ad09ac02cbfe653b44c4043a8e09",
-      "sha256": "1as21p2jj8xpahvdxqwsw2i1s3fll14dlc9j192iq7xl1ybwpqs6"
-    }
-  },
-  {
-    "goPackagePath": "github.com/odeke-em/extractor",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/odeke-em/extractor",
-      "rev": "801861aedb854c7ac5e1329e9713023e9dc2b4d4",
-      "sha256": "036zmnqxy48h6mxiwywgxix2p4fqvl4svlmcp734ri2rbq3cmxs1"
-    }
-  },
-  {
-    "goPackagePath": "github.com/odeke-em/meddler",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/odeke-em/meddler",
-      "rev": "d2b51d2b40e786ab5f810d85e65b96404cf33570",
-      "sha256": "0m0fqrn3kxy4swyk4ja1y42dn1i35rq9j85y11wb222qppy2342x"
-    }
-  },
-  {
-    "goPackagePath": "github.com/odeke-em/xon",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/odeke-em/xon",
-      "rev": "d580be739d723da4f6378083128f93017b8ab295",
-      "sha256": "07a7zj01d4a23xqp01m48jp2v5mw49islf4nbq2rj13sd5w4s6sc"
-    }
-  },
-  {
-    "goPackagePath": "github.com/odeke-em/cache",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/odeke-em/cache",
-      "rev": "b51b08cb6cf889deda6c941a5205baecfd16f3eb",
-      "sha256": "1rmm1ky7irqypqjkk6qcd2n0xkzpaggdxql9dp9i9qci5rvvwwd4"
-    }
-  },
-  {
-    "goPackagePath": "github.com/odeke-em/command",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/odeke-em/command",
-      "rev": "91ca5ec5e9a1bc2668b1ccbe0967e04a349e3561",
-      "sha256": "1ghckzr8h99ckagpmb15p61xazdjmf9mjmlym634hsr9vcj84v62"
-    }
-  },
-  {
-    "goPackagePath": "github.com/odeke-em/log",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/odeke-em/log",
-      "rev": "cad53c4565a0b0304577bd13f3862350bdc5f907",
-      "sha256": "059c933qjikxlvaywzpzljqnab19svymbv6x32pc7khw156fh48w"
-    }
-  },
-  {
-    "goPackagePath": "github.com/odeke-em/pretty-words",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/odeke-em/pretty-words",
-      "rev": "9d37a7fcb4ae6f94b288d371938482994458cecb",
-      "sha256": "1466wjhrg9lhqmzil1vf8qj16fxk32b5kxlcccyw2x6dybqa6pkl"
-    }
-  },
-  {
-    "goPackagePath": "github.com/skratchdot/open-golang",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/skratchdot/open-golang",
-      "rev": "c8748311a7528d0ba7330d302adbc5a677ef9c9e",
-      "sha256": "0qhn2d00v3m9fiqk9z7swdm599clc6j7rnli983s8s1byyp0x3ac"
-    }
-  },
-  {
-    "goPackagePath": "github.com/hashicorp/raft",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/hashicorp/raft",
-      "rev": "a8065f298505708bf60f518c09178149f3c06f21",
-      "sha256": "122mjijphas7ybbvssxv1r36sb8i907gdr9kvplnx6yg9w52j3mn"
-    }
-  },
-  {
-    "goPackagePath": "github.com/hashicorp/raft-boltdb",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/hashicorp/raft-boltdb",
-      "rev": "d1e82c1ec3f15ee991f7cc7ffd5b67ff6f5bbaee",
-      "sha256": "0p609w6x0h6bapx4b0d91dxnp2kj7dv0534q4blyxp79shv2a8ia"
-    }
-  },
-  {
-    "goPackagePath": "github.com/rakyll/statik",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/rakyll/statik",
-      "rev": "274df120e9065bdd08eb1120e0375e3dc1ae8465",
-      "sha256": "0llk7bxmk66wdiy42h32vj1jfk8zg351xq21hwhrq7gkfljghffp"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/fatih/pool.v2",
-    "fetch": {
-      "type": "git",
-      "url": "https://gopkg.in/fatih/pool.v2",
-      "rev": "cba550ebf9bce999a02e963296d4bc7a486cb715",
-      "sha256": "1jlrakgnpvhi2ny87yrsj1gyrcncfzdhypa9i2mlvvzqlj4r0dn0"
-    }
-  },
-  {
-    "goPackagePath": "github.com/bmizerany/pat",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/bmizerany/pat",
-      "rev": "b8a35001b773c267eb260a691f4e5499a3531600",
-      "sha256": "11zxd45rvjm6cn3wzbi18wy9j4vr1r1hgg6gzlqnxffiizkycxmz"
-    }
-  },
-  {
-    "goPackagePath": "github.com/kimor79/gollectd",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/kimor79/gollectd",
-      "rev": "cf6dec97343244b5d8a5485463675d42f574aa2d",
-      "sha256": "1f3ml406cprzjc192csyr2af4wcadkc74kg8n4c0zdzglxxfsqxa"
-    }
-  },
-  {
-    "goPackagePath": "github.com/monochromegane/conflag",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/monochromegane/conflag",
-      "rev": "6d68c9aa4183844ddc1655481798fe4d90d483e9",
-      "sha256": "0csfr5c8d3kbna9sqhzfp2z06wq6mc6ijja1zj2i82kzsq8534wa"
-    }
-  },
-  {
-    "goPackagePath": "github.com/monochromegane/go-home",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/monochromegane/go-home",
-      "rev": "25d9dda593924a11ea52e4ffbc8abdb0dbe96401",
-      "sha256": "172chakrj22xfm0bcda4qj5zqf7lwr53pzwc3xj6wz8vd2bcxkww"
-    }
-  },
-  {
-    "goPackagePath": "github.com/monochromegane/terminal",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/monochromegane/terminal",
-      "rev": "2da212063ce19aed90ee5bbb00ad1ad7393d7f48",
-      "sha256": "1rddaq9pk5q57ildms35iihghqk505gb349pb0f6k3svchay38nh"
-    }
-  },
-  {
-    "goPackagePath": "github.com/monochromegane/go-gitignore",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/monochromegane/go-gitignore",
-      "rev": "38717d0a108ca0e5af632cd6845ca77d45b50729",
-      "sha256": "0r1inabpgg6sn6i47b02hcmd2p4dc1ab1mcy20mn1b2k3mpdj4b7"
-    }
-  },
-  {
-    "goPackagePath": "github.com/shiena/ansicolor",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/shiena/ansicolor",
-      "rev": "a5e2b567a4dd6cc74545b8a4f27c9d63b9e7735b",
-      "sha256": "0gwplb1b4fvav1vjf4b2dypy5rcp2w41vrbxkd1dsmac870cy75p"
-    }
-  },
-  {
-    "goPackagePath": "github.com/pquerna/ffjson",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/pquerna/ffjson",
-      "rev": "674bc015b5b3f50f9bb2561179778586b9af68c5",
-      "sha256": "0l53q7b1g25hfjm1iyynfs413rpav4c51yvdr244ivw1x3hksa7a"
-    }
-  },
-  {
-    "goPackagePath": "gopkg.in/kothar/go-backblaze.v0",
-    "fetch": {
-      "type": "git",
-      "url": "https://gopkg.in/kothar/go-backblaze.v0",
-      "rev": "373819725fc560fa962c6cd883b533d2ebec4844",
-      "sha256": "1kmlwfnnfd4h46bb9pz2gw1hxqm1pzkwvidfmnc0zkrilaywk6fx"
-    }
-  },
-  {
-    "goPackagePath": "github.com/jawher/mow.cli",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/jawher/mow.cli",
-      "rev": "772320464101e904cd51198160eb4d489be9cc49",
-      "sha256": "1a8hnh2k3vc3prjhnz4rjbiwhqq6r3mi18h9cdb6fc6s6yzjc19j"
-    }
-  },
-  {
-    "goPackagePath": "github.com/svent/go-flags",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/svent/go-flags",
-      "rev": "4bcbad344f0318adaf7aabc16929701459009aa3",
-      "sha256": "1gb416fgxl9gq4q6wsv3i2grq1mzbi7lvfvmfdqbxqbv9vizzh34"
-    }
-  },
-  {
-    "goPackagePath": "github.com/svent/go-nbreader",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/svent/go-nbreader",
-      "rev": "7cef48da76dca6a496faa7fe63e39ed665cbd219",
-      "sha256": "0hw11jj5r3f6qwydg41nc3c6aadlbkhc1qpxra2609lis0qa9h4r"
-    }
-  },
-  {
-    "goPackagePath": "github.com/tdewolff/buffer",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/tdewolff/buffer",
-      "rev": "0edfcb7b750146ff879e95831de2ef53605a5cb5",
-      "sha256": "1mdd4k9byp22mw0a399j3w73zjb5g0vn58g76rjy7ajb0dzm80vl"
-    }
-  },
-  {
-    "goPackagePath": "github.com/tdewolff/parse",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/tdewolff/parse",
-      "rev": "34d5c1160d4503da4b456e5094609f2331d6dde3",
-      "sha256": "0hxf65fgkrc1q4p99p33xxxy1s6wxpn1vfsnqf9p846awwbqsy0v"
-    }
-  },
-  {
-    "goPackagePath": "github.com/tdewolff/strconv",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/tdewolff/strconv",
-      "rev": "3e8091f4417ebaaa3910da63a45ea394ebbfb0e3",
-      "sha256": "00w2mryfjhz3vaqzxvbwvyhi1vgpc1s4xfv1r9hxn8hwa078q5gp"
-    }
-  },
-  {
-    "goPackagePath": "github.com/matryer/try",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/matryer/try",
-      "rev": "93d30e50512f879b73829eb79867df38084bcd31",
-      "sha256": "0dmc8iar9685ks1ba3vnycjsx8qxwyqv51jb7677dvwnzbqhgw6f"
-    }
-  },
-  {
-    "goPackagePath": "github.com/yosssi/ace",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/yosssi/ace",
-      "rev": "71afeb714739f9d5f7e1849bcd4a0a5938e1a70d",
-      "sha256": "15k7ji8m3nqbwhnsvp82j4qa45sgvwv2giliw2xkdwi2g7mfrn8k"
-    }
-  },
-  {
-    "goPackagePath": "github.com/spf13/viper",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/spf13/viper",
-      "rev": "c1ccc378a054ea8d4e38d8c67f6938d4760b53dd",
-      "sha256": "0lpdzalqhqp9pwsg63inkxwjji7m0pp42ryw1499bqbjp97hriq0"
-    }
-  },
-  {
-    "goPackagePath": "github.com/spf13/pflag",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/spf13/pflag",
-      "rev": "367864438f1b1a3c7db4da06a2f55b144e6784e0",
-      "sha256": "03c6654hv4v1fj79i5sri3p9q2afqgicka4nicb6fr4kcfkkgbfp"
-    }
-  },
-  {
-    "goPackagePath": "github.com/spf13/jwalterweatherman",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/spf13/jwalterweatherman",
-      "rev": "33c24e77fb80341fe7130ee7c594256ff08ccc46",
-      "sha256": "1knvzspqzc2bh58q16zggzc8gcabjp5gr7zk4k7nx5ij4092cg0z"
-    }
-  },
-  {
-    "goPackagePath": "github.com/fsnotify/fsnotify",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/fsnotify/fsnotify",
-      "rev": "30411dbcefb7a1da7e84f75530ad3abe4011b4f8",
-      "sha256": "0kbpvyi6p9942k0vmcw5z13mja47f7hq7nqd332pn2zydss6kddm"
-    }
-  },
-  {
-    "goPackagePath": "github.com/ogier/pflag",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/ogier/pflag",
-      "rev": "45c278ab3607870051a2ea9040bb85fcb8557481",
-      "sha256": "0620v75wppfd84d95n312wpngcb73cph4q3ivs1h0waljfnsrd5l"
-    }
-  },
-  {
-    "goPackagePath": "github.com/magiconair/properties",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/magiconair/properties",
-      "rev": "c265cfa48dda6474e208715ca93e987829f572f8",
-      "sha256": "1ab9ywwsrdq5mvrcwl7m3276y1q4dfwinbv88vgpqwcqai9wkpp3"
-    }
-  },
-  {
-    "goPackagePath": "github.com/bep/inflect",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/bep/inflect",
-      "rev": "b896c45f5af983b1f416bdf3bb89c4f1f0926f69",
-      "sha256": "0drv6in94n7lmap4ajvgqlvdcbpn8alinfdzywzpihvzbx21b3h3"
-    }
-  },
-  {
-    "goPackagePath": "github.com/eknkc/amber",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/eknkc/amber",
-      "rev": "91774f050c1453128146169b626489e60108ec03",
-      "sha256": "1rb8bm35h8a77q4py6r3818cpwh7kpq1kh2ib2rb4i5s7z75ciis"
-    }
-  },
-  {
-    "goPackagePath": "github.com/spf13/afero",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/spf13/afero",
-      "rev": "1a8ecf8b9da1fb5306e149e83128fc447957d2a8",
-      "sha256": "1nrg0gmqnl4h6zjmi4mdhrwnl3l34nzxpq2hsr3nizfvrx5gqbzw"
-    }
-  },
-  {
-    "goPackagePath": "github.com/spf13/cast",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/spf13/cast",
-      "rev": "27b586b42e29bec072fe7379259cc719e1289da6",
-      "sha256": "1y73pfxdvm1bfpghwsfxj8gl4miv6fpzi9azxcknp6rcjn1gmq0x"
-    }
-  },
-  {
-    "goPackagePath": "github.com/spf13/cobra",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/spf13/cobra",
-      "rev": "bc81c21bd0d8be5ba2d6630a505d79d4467566e7",
-      "sha256": "1sp8gl25cjx0yibh6q1i8d5rbxpwaal3z8vz372wfmbz002say8r"
-    }
-  },
-  {
-    "goPackagePath": "github.com/dchest/cssmin",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/dchest/cssmin",
-      "rev": "fb8d9b44afdc258bfff6052d3667521babcb2239",
-      "sha256": "09sdijfx5d05z4cd5k6lhl7k3kbpdf2amzlngv15h5v0fff9qw4s"
-    }
-  },
-  {
-    "goPackagePath": "github.com/spf13/fsync",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/spf13/fsync",
-      "rev": "eefee59ad7de621617d4ff085cf768aab4b919b1",
-      "sha256": "0d56xdczawikyczc12i661qc79dbv4q8ihlj4p20zsjkyxxym59p"
-    }
-  },
-  {
-    "goPackagePath": "github.com/cpuguy83/go-md2man",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/cpuguy83/go-md2man",
-      "rev": "2724a9c9051aa62e9cca11304e7dd518e9e41599",
-      "sha256": "1j2bigs7ixy20cdqd246nxr417md2qcyvkfk3x94992cr88d0vyj"
-    }
-  },
-  {
-    "goPackagePath": "github.com/miekg/mmark",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/miekg/mmark",
-      "rev": "adb5c3e2e9f3e7da9bd25291edda8e66c0045a2a",
-      "sha256": "0fycz17fj37fh95lfshdrfwrgkzi3hl1kgnily0cxc9zwfbap3qa"
-    }
-  },
-  {
-    "goPackagePath": "github.com/spf13/nitro",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/spf13/nitro",
-      "rev": "24d7ef30a12da0bdc5e2eb370a79c659ddccf0e8",
-      "sha256": "143sbpx0jdgf8f8ayv51x6l4jg6cnv6nps6n60qxhx4vd90s6mib"
-    }
-  },
-  {
-    "goPackagePath": "github.com/PuerkitoBio/purell",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/PuerkitoBio/purell",
-      "rev": "1d5d1cfad45d42ec5f81fa8ef23de09cebc6dcc3",
-      "sha256": "12k82576ka21c6572yy2v81kxpjrgf9mffjlz469g3vs0g3nkwlb"
-    }
-  },
-  {
-    "goPackagePath": "github.com/opennota/urlesc",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/opennota/urlesc",
-      "rev": "5fa9ff0392746aeae1c4b37fcc42c65afa7a9587",
-      "sha256": "0dppkmfs0hb5vcqli191x9yss5vvlx29qxjcywhdfirc89rn0sni"
-    }
-  },
-  {
-    "goPackagePath": "github.com/pkg/sftp",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/pkg/sftp",
-      "rev": "d4c18e7ffdc496a38de67dde6e29b2f364afc472",
-      "sha256": "0cnl83k317gxskayfj3xwr4bl0vcbjvlwi3q0vjwvircynb6xscj"
-    }
-  },
-  {
-    "goPackagePath": "github.com/kr/fs",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/kr/fs",
-      "rev": "2788f0dbd16903de03cb8186e5c7d97b69ad387b",
-      "sha256": "1c0fipl4rsh0v5liq1ska1dl83v3llab4k6lm8mvrx9c4dyp71ly"
-    }
-  },
-  {
-    "goPackagePath": "github.com/kyokomi/emoji",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/kyokomi/emoji",
-      "rev": "17c5e7085c9d59630aa578df67f4469481fbe7a9",
-      "sha256": "0qs4mi7z1lghiyiw7s2bz5y959wj9ifmhyqh39xwqk69d690jwlp"
-    }
-  },
-  {
-    "goPackagePath": "github.com/pkg/errors",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/pkg/errors",
-      "rev": "494e70f7620561491c2ca11e185bbef4b70060da",
-      "sha256": "0a0961ixl67vryhnzyzhai357c9n9a7v3vpkpqrh32spn033gjd9"
-    }
-  },
-  {
-    "goPackagePath": "github.com/PuerkitoBio/urlesc",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/PuerkitoBio/urlesc",
-      "rev": "5fa9ff0392746aeae1c4b37fcc42c65afa7a9587",
-      "sha256": "0dppkmfs0hb5vcqli191x9yss5vvlx29qxjcywhdfirc89rn0sni"
-    }
-  }
-]
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 690153a27792..5faceef85733 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -973,4 +973,21 @@ self: super: {
   # us when we patch the cabal file (Link options will be recored in the ghc package registry).
   GLUT = addPkgconfigDepend (appendPatch super.GLUT ./patches/GLUT.patch) pkgs.freeglut;
 
+  # https://github.com/gwern/mueval/issues/14
+  mueval = overrideCabal super.mueval (drv: {
+    revision = null;
+    editedCabalFile = null;
+    patches = [(pkgs.fetchpatch {
+      url = "https://github.com/gwern/mueval/commit/866f895e0b671bcaa232b46ed93dd7d47a4b32b2.patch";
+      sha256 = "16pb9nfr52hwidxv0f7j4yg8yd86959kzbcw9lmnzpvgdy5qyvkg";
+    })];
+  });
+
+  # remove if a version > 0.1.0.1 ever gets released
+  stunclient = overrideCabal super.stunclient (drv: {
+    postPatch = (drv.postPatch or "") + ''
+      substituteInPlace source/Network/Stun/MappedAddress.hs --replace "import Network.Endian" ""
+    '';
+  });
+
 }
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 66f7d4763b4a..d594170d4580 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix
@@ -63,6 +63,8 @@ self: super: {
   nats = dontHaddock super.nats;
   bytestring-builder = dontHaddock super.bytestring-builder;
 
+  hoauth2 = overrideCabal super.hoauth2 (drv: { testDepends = (drv.testDepends or []) ++ [ self.wai self.warp ]; });
+
   # Setup: At least the following dependencies are missing: base <4.8
   hspec-expectations = overrideCabal super.hspec-expectations (drv: {
     postPatch = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
@@ -115,6 +117,8 @@ self: super: {
     license = pkgs.stdenv.lib.licenses.bsd3;
   }) {};
 
+  mono-traversable = addBuildDepend super.mono-traversable self.semigroups;
+
   # diagrams/monoid-extras#19
   monoid-extras = overrideCabal super.monoid-extras (drv: {
     prePatch = "sed -i 's|4\.8|4.9|' monoid-extras.cabal";
@@ -186,7 +190,8 @@ self: super: {
   vty-ui = enableCabalFlag super.vty-ui "no-tests";
 
   # https://github.com/fpco/stackage/issues/1112
-  vector-algorithms = dontCheck super.vector-algorithms;
+  vector-algorithms = addBuildDepends (dontCheck super.vector-algorithms)
+    [ self.mtl self.mwc-random ];
 
   # Trigger rebuild to mitigate broken packaes on Hydra.
   amazonka-core = triggerRebuild super.amazonka-core 1;
diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
index ffa3405d6eb8..2328e9f34cc9 100644
--- a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
+++ b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
@@ -107,6 +107,7 @@ package-maintainers:
     - shakespeare
   abbradar:
     - Agda
+    - lambdabot
 
 dont-distribute-packages:
   # hard restrictions that really belong into meta.platforms
@@ -2212,7 +2213,6 @@ dont-distribute-packages:
   hinotify-bytestring:                          [ x86_64-darwin ]
   hinstaller:                                   [ i686-linux, x86_64-linux ]
   hint-server:                                  [ i686-linux, x86_64-darwin, x86_64-linux ]
-  hint:                                         [ i686-linux, x86_64-darwin, x86_64-linux ]
   hinvaders:                                    [ i686-linux, x86_64-darwin, x86_64-linux ]
   hinze-streams:                                [ i686-linux, x86_64-darwin, x86_64-linux ]
   hip:                                          [ i686-linux, x86_64-darwin, x86_64-linux ]
@@ -2797,15 +2797,6 @@ dont-distribute-packages:
   lambda-devs:                                  [ i686-linux, x86_64-darwin, x86_64-linux ]
   lambda-toolbox:                               [ i686-linux, x86_64-linux ]
   lambdaBase:                                   [ i686-linux, x86_64-darwin, x86_64-linux ]
-  lambdabot-core:                               [ i686-linux, x86_64-darwin, x86_64-linux ]
-  lambdabot-haskell-plugins:                    [ i686-linux, x86_64-darwin, x86_64-linux ]
-  lambdabot-irc-plugins:                        [ i686-linux, x86_64-darwin, x86_64-linux ]
-  lambdabot-misc-plugins:                       [ i686-linux, x86_64-darwin, x86_64-linux ]
-  lambdabot-novelty-plugins:                    [ i686-linux, x86_64-darwin, x86_64-linux ]
-  lambdabot-reference-plugins:                  [ i686-linux, x86_64-darwin, x86_64-linux ]
-  lambdabot-social-plugins:                     [ i686-linux, x86_64-darwin, x86_64-linux ]
-  lambdabot-utils:                              [ i686-linux, x86_64-linux ]
-  lambdabot:                                    [ i686-linux, x86_64-darwin, x86_64-linux ]
   LambdaCalculator:                             [ i686-linux, x86_64-linux ]
   lambdacat:                                    [ i686-linux, x86_64-linux ]
   lambdacms-core:                               [ i686-linux, x86_64-linux ]
diff --git a/pkgs/development/interpreters/angelscript/default.nix b/pkgs/development/interpreters/angelscript/default.nix
index 84b474b08cb0..16042091a47a 100644
--- a/pkgs/development/interpreters/angelscript/default.nix
+++ b/pkgs/development/interpreters/angelscript/default.nix
@@ -3,10 +3,10 @@ let
   s = # Generated upstream information
   rec {
     baseName="angelscript";
-    version = "2.31.0";
+    version = "2.31.1";
     name="${baseName}-${version}";
     url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
-    sha256 = "03a0gmz95di62552dv873iwwy1ym96kpyrc0s708assjlslr9716";
+    sha256 = "00z0x2w1dnfd2h8xvmq3qy2n8gqxyi9gxwnsz0q420by8vnrljmh";
   };
   buildInputs = [
     unzip
diff --git a/pkgs/development/interpreters/lolcode/default.nix b/pkgs/development/interpreters/lolcode/default.nix
index 0db23e0efed9..284773fe660f 100644
--- a/pkgs/development/interpreters/lolcode/default.nix
+++ b/pkgs/development/interpreters/lolcode/default.nix
@@ -1,17 +1,18 @@
-{ stdenv, fetchurl, pkgconfig, doxygen, cmake }:
+{ stdenv, fetchurl, pkgconfig, doxygen, cmake, readline }:
 
 with stdenv.lib;
 stdenv.mkDerivation rec {
 
   name = "lolcode-${version}";
-  version = "0.10.5";
+  version = "0.11.2";
 
   src = fetchurl {
     url = "https://github.com/justinmeza/lci/archive/v${version}.tar.gz";
-    sha256 = "0g6k1jxnvgjxyidrvgk8pdb8y8mai456j9zpzmvhm6fr22c4skrc";
+    sha256 = "1li7ikcrs7wqah7gqkirg0k61n6pm12w7pydin966x1sdn9na46b";
   };
 
-  buildInputs = [ pkgconfig doxygen cmake ];
+  nativeBuildInputs = [ pkgconfig cmake doxygen ];
+  buildInputs = [ readline ];
 
   # Maybe it clashes with lci scientific logic software package...
   postInstall = "mv $out/bin/lci $out/bin/lolcode-lci";
diff --git a/pkgs/development/libraries/SDL_mixer/default.nix b/pkgs/development/libraries/SDL_mixer/default.nix
index 22a67b13e0b0..2db10eeea764 100644
--- a/pkgs/development/libraries/SDL_mixer/default.nix
+++ b/pkgs/development/libraries/SDL_mixer/default.nix
@@ -14,7 +14,17 @@ stdenv.mkDerivation rec {
 
   configureFlags = "--disable-music-ogg-shared" + stdenv.lib.optionalString enableNativeMidi " --enable-music-native-midi-gpl";
 
-  postInstall = "ln -s $out/include/SDL/SDL_mixer.h $out/include/";
+  postInstall = ''
+    ln -s $out/include/SDL/SDL_mixer.h $out/include/
+
+    for f in $out/include/SDL/SDL_mixer.h
+    do
+      for i in SDL_types.h SDL_rwops.h SDL_audio.h SDL_endian.h SDL_version.h begin_code.h close_code.h
+      do
+        substituteInPlace $f --replace "#include \"$i\"" "#include <SDL/$i>"
+      done
+    done
+  '';
 
   meta = with stdenv.lib; {
     description = "SDL multi-channel audio mixer library";
diff --git a/pkgs/development/libraries/alure/default.nix b/pkgs/development/libraries/alure/default.nix
index 200ff1ca2e7f..fe2892c96270 100644
--- a/pkgs/development/libraries/alure/default.nix
+++ b/pkgs/development/libraries/alure/default.nix
@@ -15,6 +15,6 @@ stdenv.mkDerivation rec {
     description = "A utility library to help manage common tasks with OpenAL applications";
     homepage = http://kcat.strangesoft.net/alure.html;
     license = licenses.mit;
-    platforms = platforms.unix;
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/appstream-glib/default.nix b/pkgs/development/libraries/appstream-glib/default.nix
index e6051552ab71..8450def08452 100644
--- a/pkgs/development/libraries/appstream-glib/default.nix
+++ b/pkgs/development/libraries/appstream-glib/default.nix
@@ -5,13 +5,13 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "appstream-glib-0.5.11";
+  name = "appstream-glib-0.5.12";
 
   src = fetchFromGitHub {
     owner = "hughsie";
     repo = "appstream-glib";
     rev = stdenv.lib.replaceStrings ["." "-"] ["_" "_"] name;
-    sha256 = "1rvfncm9z29h70pd718j73cd263g6yyxkxrg7zfzy0gj6wwzvhkh";
+    sha256 = "00b0441f409vzgy0znn42k093w7hwv3495qvsakxnhvk1h1ws23s";
   };
 
   nativeBuildInputs = [ autoconf automake libtool pkgconfig intltool ];
diff --git a/pkgs/development/libraries/botan/default.nix b/pkgs/development/libraries/botan/default.nix
index 3a3acbf67b9d..6e8a8cd8d7fe 100644
--- a/pkgs/development/libraries/botan/default.nix
+++ b/pkgs/development/libraries/botan/default.nix
@@ -2,7 +2,7 @@
 
 callPackage ./generic.nix (args // {
   baseVersion = "1.10";
-  revision = "12";
-  sha256 = "09xcbrs48c9sgy6cj37qbc69gi6wlkjd6r3fi4zr8xwmj5wkmz5g";
+  revision = "13";
+  sha256 = "144vl65z7bys43sxgb09mbisyf2nmh49wh0d957y0ksa9cyrgv13";
   extraConfigureFlags = "--with-gnump";
 })
diff --git a/pkgs/development/libraries/botan/unstable.nix b/pkgs/development/libraries/botan/unstable.nix
index d952b50aeb8e..4e004da32175 100644
--- a/pkgs/development/libraries/botan/unstable.nix
+++ b/pkgs/development/libraries/botan/unstable.nix
@@ -2,8 +2,8 @@
 
 callPackage ./generic.nix (args // {
   baseVersion = "1.11";
-  revision = "29";
-  sha256 = "157bp8716h17agrxyj7xpsj2i5sqhafj1nfx4gpzccx7y2kyq176";
+  revision = "30";
+  sha256 = "09d1cvg6dnfi225wipc1fw691bq7xxdcmgkq8smldc5kivf3mbwd";
   openssl = null;
   postPatch = "sed '1i#include <cmath>' -i src/tests/test_bigint.cpp";
 })
diff --git a/pkgs/development/libraries/ffmpeg/3.1.nix b/pkgs/development/libraries/ffmpeg/3.1.nix
index 25892e186843..84e6f57c523a 100644
--- a/pkgs/development/libraries/ffmpeg/3.1.nix
+++ b/pkgs/development/libraries/ffmpeg/3.1.nix
@@ -1,7 +1,12 @@
-{ callPackage, ... } @ args:
+{ callPackage
+# Darwin frameworks
+, Cocoa, CoreMedia
+, ...
+}@args:
 
 callPackage ./generic.nix (args // rec {
   version = "${branch}.1";
   branch = "3.1";
   sha256 = "1d5knh87cgnla5zawy56gkrpb48qhyiq7i0pm8z9hyx3j05abg55";
+  darwinFrameworks = [ Cocoa CoreMedia ];
 })
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix
index 0c4e9df3df19..33ee2f80a6ed 100644
--- a/pkgs/development/libraries/ffmpeg/generic.nix
+++ b/pkgs/development/libraries/ffmpeg/generic.nix
@@ -13,7 +13,7 @@
 , optimizationsDeveloper ? true
 , extraWarningsDeveloper ? false
 # Darwin frameworks
-, Cocoa
+, Cocoa, darwinFrameworks ? [ Cocoa ]
 # Inherit generics
 , branch, sha256, version, patches ? [], ...
 }:
@@ -153,7 +153,7 @@ stdenv.mkDerivation rec {
     ++ optionals (!isDarwin && !isArm) [ libvpx libpulseaudio ] # Need to be fixed on Darwin and ARM
     ++ optional ((isLinux || isFreeBSD) && !isArm) libva
     ++ optional isLinux alsaLib
-    ++ optional isDarwin Cocoa
+    ++ optionals isDarwin darwinFrameworks
     ++ optional vdpauSupport libvdpau
     ++ optional sdlSupport SDL;
 
diff --git a/pkgs/development/libraries/gdbm/default.nix b/pkgs/development/libraries/gdbm/default.nix
index bd5ee16eb673..71b65131015a 100644
--- a/pkgs/development/libraries/gdbm/default.nix
+++ b/pkgs/development/libraries/gdbm/default.nix
@@ -10,6 +10,8 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
+  configureFlags = [ "--enable-libgdbm-compat" ];
+
   meta = with stdenv.lib; {
     description = "GNU dbm key/value database library";
 
diff --git a/pkgs/development/libraries/gdcm/default.nix b/pkgs/development/libraries/gdcm/default.nix
index c2121f31f1d2..2d7e26b9e1a8 100644
--- a/pkgs/development/libraries/gdcm/default.nix
+++ b/pkgs/development/libraries/gdcm/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, cmake, vtk }:
 
 stdenv.mkDerivation rec {
-  version = "2.4.6";
+  version = "2.6.4";
   name = "gdcm-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/gdcm/${name}.tar.bz2";
-    sha256 = "0rgqgkjyqgld0hpa311z8cddp42v9ihzidyanwyxqpv3jmcrlsfk";
+    sha256 = "14bysjdldq7xb9k1ayskxijm08dy2n45v9bg379dqrcz1q5xq5mi";
   };
 
   dontUseCmakeBuildDir = true;
diff --git a/pkgs/development/libraries/gegl/3.0.nix b/pkgs/development/libraries/gegl/3.0.nix
index f66ade28da9d..2a201ed55236 100644
--- a/pkgs/development/libraries/gegl/3.0.nix
+++ b/pkgs/development/libraries/gegl/3.0.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, glib, babl, libpng, cairo, libjpeg, which
-, librsvg, pango, gtk, bzip2, intltool, libtool, automake, autoconf, json_glib }:
+, librsvg, pango, gtk, bzip2, intltool, libtool, automake, autoconf, json_glib , libraw }:
 
 stdenv.mkDerivation rec {
   name = "gegl-0.3.6";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   configureFlags = "--disable-docs";
 
   buildInputs = [ babl libpng cairo libjpeg librsvg pango gtk bzip2 intltool
-                  autoconf automake libtool which json_glib ];
+                  autoconf automake libtool which json_glib libraw ];
 
   nativeBuildInputs = [ pkgconfig ];
 
diff --git a/pkgs/development/libraries/git2/default.nix b/pkgs/development/libraries/git2/default.nix
index 7aaac299b0e3..0a0c5858917f 100644
--- a/pkgs/development/libraries/git2/default.nix
+++ b/pkgs/development/libraries/git2/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, cmake, zlib, python, libssh2, openssl, http-parser, libiconv }:
+{ stdenv, fetchurl, pkgconfig, cmake, zlib, python, libssh2, openssl, curl, http-parser, libiconv }:
 
 stdenv.mkDerivation (rec {
   version = "0.24.1";
@@ -10,10 +10,20 @@ stdenv.mkDerivation (rec {
     sha256 = "0rw80480dx2f6a2wbb1bwixygg1iwq3r7vwhxdmkkf4lpxd35jhd";
   };
 
+  # TODO: `cargo` (rust's package manager) surfaced a serious bug in
+  # libgit2 when the `Security.framework` transport is used on Darwin.
+  # The upstream issue is tracked at
+  # https://github.com/libgit2/libgit2/issues/3885 - feel free to
+  # remove this patch as soon as it's resolved (i.E. when cargo is
+  # working fine without this patch)
+  patches = stdenv.lib.optionals stdenv.isDarwin [
+    ./disable-security.framework.patch
+  ];
+
   cmakeFlags = "-DTHREADSAFE=ON";
 
   nativeBuildInputs = [ cmake python pkgconfig ];
-  buildInputs = [ zlib libssh2 openssl http-parser ];
+  buildInputs = [ zlib libssh2 openssl http-parser curl ];
 
   meta = {
     description = "The Git linkable library";
diff --git a/pkgs/development/libraries/git2/disable-security.framework.patch b/pkgs/development/libraries/git2/disable-security.framework.patch
new file mode 100644
index 000000000000..ce6a008b1c4c
--- /dev/null
+++ b/pkgs/development/libraries/git2/disable-security.framework.patch
@@ -0,0 +1,58 @@
+From fbc2ea65406236a740b8734dd41dc5ddbc24f8c9 Mon Sep 17 00:00:00 2001
+From: mulrich <mulrich@entwicklerheld.local>
+Date: Mon, 8 Aug 2016 15:36:07 +0200
+Subject: [PATCH] disable security.framework
+
+---
+ CMakeLists.txt    | 7 +++----
+ src/curl_stream.c | 9 ++++++++-
+ 2 files changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 93a9e47..331e148 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,7 +49,8 @@ ENDIF()
+ 
+ IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ 	SET( USE_ICONV ON )
+-	FIND_PACKAGE(Security)
++	# FIND_PACKAGE(Security)
++  SET(SECURITY_FOUND "NO")
+ 	FIND_PACKAGE(CoreFoundation REQUIRED)
+ ENDIF()
+ 
+@@ -87,9 +88,7 @@ IF(MSVC)
+ 	OPTION(MSVC_CRTDBG "Enable CRTDBG memory leak reporting" OFF)
+ ENDIF()
+ 
+-IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+-	OPTION( USE_OPENSSL                     "Link with and use openssl library"             ON )
+-ENDIF()
++OPTION( USE_OPENSSL                     "Link with and use openssl library"             ON )
+ 
+ CHECK_STRUCT_HAS_MEMBER ("struct stat" st_mtim "sys/types.h;sys/stat.h"
+ 	HAVE_STRUCT_STAT_ST_MTIM LANGUAGE C)
+diff --git a/src/curl_stream.c b/src/curl_stream.c
+index 98de187..a8a9f4c 100644
+--- a/src/curl_stream.c
++++ b/src/curl_stream.c
+@@ -309,7 +309,14 @@ int git_curl_stream_new(git_stream **out, const char *host, const char *port)
+ 	curl_easy_setopt(handle, CURLOPT_HTTPPROXYTUNNEL, 1);
+ 	curl_easy_setopt(handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
+ 
+-	/* curl_easy_setopt(handle, CURLOPT_VERBOSE, 1); */
++  const char* cainfo = getenv("SSL_CERT_FILE");
++  if(cainfo != NULL) {
++    curl_easy_setopt(handle, CURLOPT_CAINFO, cainfo);
++  }
++
++  /*
++	curl_easy_setopt(handle, CURLOPT_VERBOSE, 1);
++  */
+ 
+ 	st->parent.version = GIT_STREAM_VERSION;
+ 	st->parent.encrypted = 0; /* we don't encrypt ourselves */
+-- 
+2.3.8 (Apple Git-58)
+
diff --git a/pkgs/development/libraries/globalplatform/default.nix b/pkgs/development/libraries/globalplatform/default.nix
new file mode 100644
index 000000000000..a7dd47aaeb4f
--- /dev/null
+++ b/pkgs/development/libraries/globalplatform/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, pkgconfig, zlib, openssl, pcsclite }:
+
+stdenv.mkDerivation rec {
+  name = "globalplatform-${version}";
+  version  = "6.0.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/globalplatform/${name}.tar.gz";
+    sha256 = "191s9005xbc7i90bzjk4rlw15licd6m0rls9fxli8jyymz2021zy";
+  };
+
+  buildInputs = [ zlib pkgconfig openssl pcsclite ];
+
+  meta = with stdenv.lib; {
+    homepage = https://sourceforge.net/p/globalplatform/wiki/Home/;
+    description = "Library for interacting with smart card devices";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/globalplatform/gppcscconnectionplugin.nix b/pkgs/development/libraries/globalplatform/gppcscconnectionplugin.nix
new file mode 100644
index 000000000000..f147305220c7
--- /dev/null
+++ b/pkgs/development/libraries/globalplatform/gppcscconnectionplugin.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, pkgconfig, globalplatform, openssl, pcsclite }:
+
+stdenv.mkDerivation rec {
+  name = "gppcscconnectionplugin-${version}";
+  version  = "1.1.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/globalplatform/${name}.tar.gz";
+    sha256 = "0d3vcrh9z55rbal0dchmj661pqqrav9c400bx1c46grcl1q022ad";
+  };
+
+  buildInputs = [ pkgconfig globalplatform openssl pcsclite ];
+
+  meta = with stdenv.lib; {
+    homepage = https://sourceforge.net/p/globalplatform/wiki/Home/;
+    description = "GlobalPlatform pcsc connection plugin";
+    license = [ licenses.lgpl3 licenses.gpl3 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/libatomic_ops/default.nix b/pkgs/development/libraries/libatomic_ops/default.nix
index cf74ed3b5f65..174c633bf0d4 100644
--- a/pkgs/development/libraries/libatomic_ops/default.nix
+++ b/pkgs/development/libraries/libatomic_ops/default.nix
@@ -3,11 +3,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="libatomic_ops";
-    version="7.4.2";
+    version="7.4.4";
     name="${baseName}-${version}";
-    hash="1pdm0h1y7bgkczr8byg20r6bq15m5072cqm5pny4f9crc9gn3yh4";
-    url="http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-7.4.2.tar.gz";
-    sha256="1pdm0h1y7bgkczr8byg20r6bq15m5072cqm5pny4f9crc9gn3yh4";
+    hash="13vg5fqwil17zpf4hj4h8rh3blzmym693lkdjgvwpgni1mh0l8dz";
+    url="http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-7.4.4.tar.gz";
+    sha256="13vg5fqwil17zpf4hj4h8rh3blzmym693lkdjgvwpgni1mh0l8dz";
   };
   
   buildInputs = stdenv.lib.optionals stdenv.isCygwin [ autoconf automake libtool ];
diff --git a/pkgs/development/libraries/libircclient/default.nix b/pkgs/development/libraries/libircclient/default.nix
new file mode 100644
index 000000000000..14e41961e0a6
--- /dev/null
+++ b/pkgs/development/libraries/libircclient/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, cmake }:
+
+stdenv.mkDerivation rec {
+  name    = "${pname}-${version}";
+  version = "1.9";
+  pname   = "libircclient";
+
+  src = fetchurl {
+    url    = "mirror://sourceforge/${pname}/${pname}/${version}/${name}.tar.gz";
+    sha256 = "0r60i76jh4drjh2jgp5sx71chagqllmkaq49zv67nrhqwvp9ghw1";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  configureFlags = [ "--enable-shared" ];
+
+  postPatch = ''
+    substituteInPlace src/Makefile.in \
+      --replace "@prefix@/include" "@prefix@/include/libircclient" \
+      --replace "@libdir@"         "@prefix@/lib" \
+      --replace "cp "              "install "
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A small but extremely powerful library which implements the client IRC protocol";
+    homepage    = http://www.ulduzsoft.com/libircclient/;
+    license     = licenses.lgpl3;
+    maintainers = with maintainers; [ obadz ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/libmikmod/default.nix b/pkgs/development/libraries/libmikmod/default.nix
index 0f3ea26eb043..806f0e9cd824 100644
--- a/pkgs/development/libraries/libmikmod/default.nix
+++ b/pkgs/development/libraries/libmikmod/default.nix
@@ -1,6 +1,9 @@
-{ stdenv, fetchurl, texinfo, alsaLib, libpulseaudio }:
+{ stdenv, fetchurl, texinfo, alsaLib, libpulseaudio, CoreAudio }:
 
-stdenv.mkDerivation rec {
+let
+  inherit (stdenv.lib) optional optionals optionalString;
+
+in stdenv.mkDerivation rec {
   name = "libmikmod-3.3.7";
   src = fetchurl {
     url = "mirror://sourceforge/mikmod/${name}.tar.gz";
@@ -8,11 +11,12 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ texinfo ]
-    ++ stdenv.lib.optional stdenv.isLinux [ alsaLib libpulseaudio ];
+    ++ optionals stdenv.isLinux [ alsaLib libpulseaudio ]
+    ++ optional stdenv.isDarwin CoreAudio;
   propagatedBuildInputs =
-    stdenv.lib.optional stdenv.isLinux libpulseaudio;
+    optional stdenv.isLinux libpulseaudio;
 
-  NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lasound";
+  NIX_LDFLAGS = optionalString stdenv.isLinux "-lasound";
 
   meta = with stdenv.lib; {
     description = "A library for playing tracker music module files";
diff --git a/pkgs/development/libraries/libmwaw/default.nix b/pkgs/development/libraries/libmwaw/default.nix
index 7354111e1314..fc2ed6c60867 100644
--- a/pkgs/development/libraries/libmwaw/default.nix
+++ b/pkgs/development/libraries/libmwaw/default.nix
@@ -3,11 +3,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="libmwaw";
-    version="0.3.7";
+    version="0.3.8";
     name="${baseName}-${version}";
-    hash="1yg8zvv71r6wsrj71as1ngavj07527d8vrzdrf7s4yf2f7l12xh5";
-    url="mirror://sourceforge/project/libmwaw/libmwaw/libmwaw-0.3.7/libmwaw-0.3.7.tar.xz";
-    sha256="1yg8zvv71r6wsrj71as1ngavj07527d8vrzdrf7s4yf2f7l12xh5";
+    hash="019vk8cj3lgbrpgj48zy25mpkgmllwxznkfd94hh9vbb1cjvpz3a";
+    url="mirror://sourceforge/project/libmwaw/libmwaw/libmwaw-0.3.8/libmwaw-0.3.8.tar.xz";
+    sha256="019vk8cj3lgbrpgj48zy25mpkgmllwxznkfd94hh9vbb1cjvpz3a";
   };
   buildInputs = [
     boost pkgconfig cppunit zlib libwpg libwpd librevenge
diff --git a/pkgs/development/libraries/libraw/default.nix b/pkgs/development/libraries/libraw/default.nix
index ee842b0c4bdd..0b196cc22e01 100644
--- a/pkgs/development/libraries/libraw/default.nix
+++ b/pkgs/development/libraries/libraw/default.nix
@@ -9,7 +9,9 @@ stdenv.mkDerivation rec {
     sha256 = "18fygk896gxbx47nh2rn5jp4skisgkl6pdfjqb7h0zn39hd6b6g5";
   };
 
-  buildInputs = [ lcms2 jasper ];
+  buildInputs = [ jasper ];
+
+  propagatedBuildInputs = [ lcms2 ];
 
   nativeBuildInputs = [ pkgconfig ];
 
diff --git a/pkgs/development/libraries/libre/default.nix b/pkgs/development/libraries/libre/default.nix
index 3038b9f83d36..f266841ffaf6 100644
--- a/pkgs/development/libraries/libre/default.nix
+++ b/pkgs/development/libraries/libre/default.nix
@@ -1,10 +1,10 @@
 {stdenv, fetchurl, zlib, openssl}:
 stdenv.mkDerivation rec {
-  version = "0.4.16";
+  version = "0.4.17";
   name = "libre-${version}";
   src=fetchurl {
     url = "http://www.creytiv.com/pub/re-${version}.tar.gz";
-    sha256 = "0aabz9hjw47xqis2xr3rvxw1slpig4hq9wkl8fbdpgq2fgrzqdmw";
+    sha256 = "1630228xbsmasbmkx3s7g4r8mzkdlzila4j2f6m2mp0996v8kq1c";
   };
   buildInputs = [zlib openssl];
   makeFlags = [
diff --git a/pkgs/development/libraries/libsamplerate/default.nix b/pkgs/development/libraries/libsamplerate/default.nix
index f0ff549c7168..771e31f7b79b 100644
--- a/pkgs/development/libraries/libsamplerate/default.nix
+++ b/pkgs/development/libraries/libsamplerate/default.nix
@@ -1,6 +1,9 @@
-{ stdenv, fetchurl, pkgconfig, libsndfile }:
+{ stdenv, fetchurl, pkgconfig, libsndfile, ApplicationServices, Carbon, CoreServices }:
 
-stdenv.mkDerivation rec {
+let
+  inherit (stdenv.lib) optionals optionalString;
+
+in stdenv.mkDerivation rec {
   name = "libsamplerate-0.1.8";
 
   src = fetchurl {
@@ -9,7 +12,8 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ libsndfile ];
+  buildInputs = [ libsndfile ]
+    ++ optionals stdenv.isDarwin [ ApplicationServices CoreServices ];
 
   # maybe interesting configure flags:
   #--disable-fftw          disable usage of FFTW
@@ -17,14 +21,13 @@ stdenv.mkDerivation rec {
 
   outputs = [ "dev" "bin" "out" ];
 
-  postConfigure = stdenv.lib.optionalString stdenv.isDarwin
-    ''
-      # need headers from the Carbon.framework in /System/Library/Frameworks to
-      # compile this on darwin -- not sure how to handle
-      NIX_CFLAGS_COMPILE+=" -I$SDKROOT/System/Library/Frameworks/Carbon.framework/Versions/A/Headers"
+  postConfigure = optionalString stdenv.isDarwin ''
+    # need headers from the Carbon.framework in /System/Library/Frameworks to
+    # compile this on darwin -- not sure how to handle
+    NIX_CFLAGS_COMPILE+=" -I${Carbon}/Library/Frameworks/Carbon.framework/Headers"
 
-      substituteInPlace examples/Makefile --replace "-fpascal-strings" ""
-    '';
+    substituteInPlace examples/Makefile --replace "-fpascal-strings" ""
+  '';
 
   meta = with stdenv.lib; {
     description = "Sample Rate Converter for audio";
diff --git a/pkgs/development/libraries/libshout/default.nix b/pkgs/development/libraries/libshout/default.nix
index 1cf937586c36..0e1d3a4bb4c8 100644
--- a/pkgs/development/libraries/libshout/default.nix
+++ b/pkgs/development/libraries/libshout/default.nix
@@ -4,11 +4,11 @@
 # need pkgconfig so that libshout installs ${out}/lib/pkgconfig/shout.pc
 
 stdenv.mkDerivation rec {
-  name = "libshout-2.3.1";
+  name = "libshout-2.4.1";
 
   src = fetchurl {
     url = "http://downloads.xiph.org/releases/libshout/${name}.tar.gz";
-    sha256 = "cf3c5f6b4a5e3fcfbe09fb7024aa88ad4099a9945f7cb037ec06bcee7a23926e";
+    sha256 = "0kgjpf8jkgyclw11nilxi8vyjk4s8878x23qyxnvybbgqbgbib7k";
   };
 
   nativeBuildInputs = [ pkgconfig ];
@@ -26,7 +26,6 @@ stdenv.mkDerivation rec {
     homepage = http://www.icecast.org;
     license = stdenv.lib.licenses.gpl2;
     maintainers = with stdenv.lib.maintainers; [ jcumming ];
- 
     platforms = with stdenv.lib.platforms; unix;
   };
 }
diff --git a/pkgs/development/libraries/libsidplayfp/default.nix b/pkgs/development/libraries/libsidplayfp/default.nix
new file mode 100644
index 000000000000..78e7036bdccc
--- /dev/null
+++ b/pkgs/development/libraries/libsidplayfp/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl, pkgconfig
+, docSupport ? true, doxygen ? null, graphviz ? null }:
+
+assert docSupport -> doxygen != null && graphviz != null;
+
+stdenv.mkDerivation rec {
+  pname = "libsidplayfp";
+  major = "1";
+  minor = "8";
+  level = "6";
+  version = "${major}.${minor}.${level}";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/sidplay-residfp/${pname}/${major}.${minor}/${name}.tar.gz";
+    sha256 = "0lzivfdq0crmfr01c6f5h883yr7wvagq198xkk3srdmvshhxmwnw";
+  };
+
+  nativeBuildInputs = [ pkgconfig ]
+    ++ stdenv.lib.optionals docSupport [ doxygen graphviz ];
+
+  installTargets = [ "install" ]
+    ++ stdenv.lib.optionals docSupport [ "doc" ];
+
+  outputs = [ "out" ] ++ stdenv.lib.optionals docSupport [ "doc" ];
+
+  postInstall = stdenv.lib.optionalString docSupport ''
+    mkdir -p $doc/share/doc/libsidplayfp
+    mv docs/html $doc/share/doc/libsidplayfp/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A library to play Commodore 64 music derived from libsidplay2";
+    homepage = https://sourceforge.net/projects/sidplay-residfp/;
+    license = with licenses; [ gpl2Plus ];
+    maintainers = with maintainers; [ ramkromberg ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/pkgs/development/libraries/mdds/0.12.1.nix b/pkgs/development/libraries/mdds/0.12.1.nix
new file mode 100644
index 000000000000..3c3a874c8ad0
--- /dev/null
+++ b/pkgs/development/libraries/mdds/0.12.1.nix
@@ -0,0 +1,17 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  version = "0.12.1";
+  name = "mdds-${version}";
+
+  src = fetchurl {
+    url = "http://kohei.us/files/mdds/src/mdds_${version}.tar.bz2";
+    sha256 = "0gg8mb9kxh3wggh7njj1gf90xy27p0yq2cw88wqar9hhg2fmwmi3";
+  };
+
+  meta = {
+    homepage = https://code.google.com/p/multidimalgorithm/;
+    description = "A collection of multi-dimensional data structure and indexing algorithm";
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/mdds/default.nix b/pkgs/development/libraries/mdds/default.nix
index f379d8c4e322..3d0c594b61bc 100644
--- a/pkgs/development/libraries/mdds/default.nix
+++ b/pkgs/development/libraries/mdds/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  version = "0.12.1";
+  version = "1.2.1";
   name = "mdds-${version}";
 
   src = fetchurl {
-    url = "http://kohei.us/files/mdds/src/mdds_${version}.tar.bz2";
-    sha256 = "0gg8mb9kxh3wggh7njj1gf90xy27p0yq2cw88wqar9hhg2fmwmi3";
+    url = "http://kohei.us/files/mdds/src/mdds-${version}.tar.bz2";
+    sha256 = "0yzwdl8mf8xdj8rif1qq0qnlq7vlk5q86r3hs2x49m5rqzgljbqy";
   };
 
   postInstall = ''
diff --git a/pkgs/development/libraries/mdds/default.upstream b/pkgs/development/libraries/mdds/default.upstream
index 94b6c78b06b7..96c5bc35d169 100644
--- a/pkgs/development/libraries/mdds/default.upstream
+++ b/pkgs/development/libraries/mdds/default.upstream
@@ -1,6 +1,6 @@
 url https://gitlab.com/mdds/mdds
-version_link '[.]tar[.][a-z0-9]+$'
-version '.*_([0-9.]+)[.]tar[.].*' '\1'
+version_link 'mdds-.*[.]tar[.][a-z0-9]+$'
+version '.*-([0-9.]+)[.]tar[.].*' '\1'
 
 do_overwrite(){
   ensure_hash
diff --git a/pkgs/development/libraries/mlt/qt-5.nix b/pkgs/development/libraries/mlt/qt-5.nix
index d66d3fe93720..b279371b2109 100644
--- a/pkgs/development/libraries/mlt/qt-5.nix
+++ b/pkgs/development/libraries/mlt/qt-5.nix
@@ -4,11 +4,11 @@
 
 stdenv.mkDerivation rec {
   name = "mlt-${version}";
-  version = "0.9.6";
+  version = "0.9.8";
 
   src = fetchurl {
     url = "https://github.com/mltframework/mlt/archive/v${version}.tar.gz";
-    sha256 = "0s8ypg0q50zfcmq527y8cbdvzxhiqidm1923k28ar8jqmjp45ssh";
+    sha256 = "0x0hsb05i7g70dh3jll41qlvcylailfgsr0y1dpx7hyigynxc50j";
   };
 
   buildInputs = [
diff --git a/pkgs/development/libraries/nlohmann_json/default.nix b/pkgs/development/libraries/nlohmann_json/default.nix
new file mode 100644
index 000000000000..819160a8d7c8
--- /dev/null
+++ b/pkgs/development/libraries/nlohmann_json/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  name = "nlohmann_json-${version}";
+  version = "2.0.2";
+
+  src = fetchFromGitHub {
+    owner = "nlohmann";
+    repo = "json";
+    rev = "v${version}";
+    sha256 = "10sk8d23vh0c7b3qafjz2n8r5jv8vc275bl069ikhqnx1zxv6hwp";
+  };
+
+  buildInputs = [ cmake ];
+
+  doCheck = true;
+  checkTarget = "test";
+
+  meta = with stdenv.lib; {
+    description = "Header only C++ library for the JSON file format";
+    homepage = https://github.com/nlohmann/json;
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix
index c95e2304e40f..008494818e54 100644
--- a/pkgs/development/libraries/nss/default.nix
+++ b/pkgs/development/libraries/nss/default.nix
@@ -9,11 +9,11 @@ let
 
 in stdenv.mkDerivation rec {
   name = "nss-${version}";
-  version = "3.23";
+  version = "3.26";
 
   src = fetchurl {
-    url = "mirror://mozilla/security/nss/releases/NSS_3_23_RTM/src/${name}.tar.gz";
-    sha256 = "1kqidv91icq96m9m8zx50n7px08km2l88458rkgyjwcn3kiq7cwl";
+    url = "mirror://mozilla/security/nss/releases/NSS_3_26_RTM/src/${name}.tar.gz";
+    sha256 = "0r65s5q8kk0vr48s0zr8xi610k7h072lgkkpp4z6jlxr19bkly4i";
   };
 
   buildInputs = [ nspr perl zlib sqlite ];
diff --git a/pkgs/development/libraries/pcl/default.nix b/pkgs/development/libraries/pcl/default.nix
index b38f1e5711ae..42a8d00eec01 100644
--- a/pkgs/development/libraries/pcl/default.nix
+++ b/pkgs/development/libraries/pcl/default.nix
@@ -1,14 +1,15 @@
-{ stdenv, fetchzip, cmake, qhull, flann, boost, vtk, eigen, pkgconfig, qt4
+{ stdenv, fetchFromGitHub, cmake, qhull, flann, boost, vtk, eigen, pkgconfig, qt4
 , libusb1, libpcap, libXt, libpng, Cocoa, AGL, cf-private
 }:
 
 stdenv.mkDerivation rec {
-  name = "pcl-1.7.2";
+  name = "pcl-1.8.0";
 
-  src = fetchzip {
-    name = name + "-src";
-    url = "https://github.com/PointCloudLibrary/pcl/archive/${name}.tar.gz";
-    sha256 = "0sm19p6wcls2d9l0vi5fgwqp7l372nh3g7bdin42w31zr8dmz8h8";
+  src = fetchFromGitHub {
+    owner = "PointCloudLibrary";
+    repo = "pcl";
+    rev = name;
+    sha256 = "1pki4y7mc2dryxc8wa7rs4hg74qab80rpy90jnw3j8fzf09kxcll";
   };
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/protobuf/3.0.0-beta-2.nix b/pkgs/development/libraries/protobuf/3.0.0-beta-2.nix
new file mode 100644
index 000000000000..a06d4cef968a
--- /dev/null
+++ b/pkgs/development/libraries/protobuf/3.0.0-beta-2.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchFromGitHub , autoreconfHook, zlib, gmock }:
+
+stdenv.mkDerivation rec {
+  name = "protobuf-${version}";
+
+  version = "3.0.0-beta-2";
+  # make sure you test also -A pythonPackages.protobuf
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "protobuf";
+    rev = "v${version}";
+    sha256 = "0cbr1glgma5vakabsjwcs41pcnn8yphhn037l0zd121zb9gdaqc1";
+  };
+
+  postPatch = ''
+    rm -rf gmock
+    cp -r ${gmock.source} gmock
+    chmod -R a+w gmock
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace src/google/protobuf/testing/googletest.cc \
+      --replace 'tmpnam(b)' '"'$TMPDIR'/foo"'
+  '';
+
+  buildInputs = [ autoreconfHook zlib ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = {
+    description = "Google's data interchange format";
+    longDescription =
+      ''Protocol Buffers are a way of encoding structured data in an efficient
+        yet extensible format. Google uses Protocol Buffers for almost all of
+        its internal RPC protocols and file formats.
+      '';
+    license = stdenv.lib.licenses.bsd3;
+    platforms = stdenv.lib.platforms.unix;
+    homepage = https://developers.google.com/protocol-buffers/;
+  };
+
+  passthru.version = version;
+}
diff --git a/pkgs/development/libraries/protobuf/generic.nix b/pkgs/development/libraries/protobuf/generic.nix
index d4b7c77a5fef..47f66c83ff5d 100644
--- a/pkgs/development/libraries/protobuf/generic.nix
+++ b/pkgs/development/libraries/protobuf/generic.nix
@@ -25,15 +25,12 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Protocol Buffers - Google's data interchange format";
-
     longDescription =
       '' Protocol Buffers are a way of encoding structured data in an
          efficient yet extensible format.  Google uses Protocol Buffers for
          almost all of its internal RPC protocols and file formats.
       '';
-
     license = "mBSD";
-
     homepage = https://developers.google.com/protocol-buffers/;
     platforms = stdenv.lib.platforms.unix;
   };
diff --git a/pkgs/development/libraries/ptlib/default.nix b/pkgs/development/libraries/ptlib/default.nix
index aa2601a7bd3e..604f246e711f 100644
--- a/pkgs/development/libraries/ptlib/default.nix
+++ b/pkgs/development/libraries/ptlib/default.nix
@@ -2,20 +2,20 @@
 , openssl, openldap, cyrus_sasl, kerberos, expat, SDL, libdv, libv4l, alsaLib }:
 
 stdenv.mkDerivation rec {
-  name = "ptlib-2.10.10";
+  name = "ptlib-2.10.11";
 
   src = fetchurl {
     url = "mirror://gnome/sources/ptlib/2.10/${name}.tar.xz";
-    sha256 = "7fcaabe194cbd3bc0b370b951dffd19cfe7ea0298bfff6aecee948e97f3207e4";
+    sha256 = "1jf27mjz8vqnclhrhrpn7niz4c177kcjbd1hc7vn65ihcqfz05rs";
   };
 
-  buildInputs = [ pkgconfig bison flex unixODBC openssl openldap 
+  buildInputs = [ pkgconfig bison flex unixODBC openssl openldap
                   cyrus_sasl kerberos expat SDL libdv libv4l alsaLib ];
 
   enableParallelBuilding = true;
 
-  patches = [ ./bison.patch ];
-      
+  patches = [ ./bison.patch ./sslv3.patch ];
+
   meta = with stdenv.lib; {
     description = "Portable Tools from OPAL VoIP";
     maintainers = [ maintainers.raskin ];
diff --git a/pkgs/development/libraries/ptlib/sslv3.patch b/pkgs/development/libraries/ptlib/sslv3.patch
new file mode 100644
index 000000000000..1ccf3593ec1f
--- /dev/null
+++ b/pkgs/development/libraries/ptlib/sslv3.patch
@@ -0,0 +1,16 @@
+--- ptlib-2.10.11/src/ptclib/pssl.cxx	2016-02-07 09:54:36.326325637 +0000
++++ ptlib-2.10.11/src/ptclib/pssl.cxx	2016-02-07 09:55:55.677870908 +0000
+@@ -805,11 +805,13 @@
+   SSL_METHOD * meth;
+ 
+   switch (method) {
++#if !defined(OPENSSL_NO_SSL3)
+     case SSLv3:
+       meth = SSLv3_method();
+       break;
++#endif
+     case TLSv1:
+       meth = TLSv1_method(); 
+       break;
+     case SSLv23:
+     default:
diff --git a/pkgs/development/libraries/qt-5/5.5/default.nix b/pkgs/development/libraries/qt-5/5.5/default.nix
index 8401e9f0d3de..27f6e66a1256 100644
--- a/pkgs/development/libraries/qt-5/5.5/default.nix
+++ b/pkgs/development/libraries/qt-5/5.5/default.nix
@@ -92,7 +92,7 @@ let
       qtsensors = callPackage ./qtsensors.nix {};
       qtserialport = callPackage ./qtserialport {};
       qtsvg = callPackage ./qtsvg.nix {};
-      qttools = callPackage ./qttools.nix {};
+      qttools = callPackage ./qttools {};
       qttranslations = callPackage ./qttranslations.nix {};
       /* qtwayland = not packaged */
       /* qtwebchannel = not packaged */
diff --git a/pkgs/development/libraries/qt-5/5.5/qttools/cmake-paths.patch b/pkgs/development/libraries/qt-5/5.5/qttools/cmake-paths.patch
new file mode 100644
index 000000000000..fe5bcadbe9a8
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.5/qttools/cmake-paths.patch
@@ -0,0 +1,72 @@
+Index: qttools-opensource-src-5.5.1/src/assistant/help/Qt5HelpConfigExtras.cmake.in
+===================================================================
+--- qttools-opensource-src-5.5.1.orig/src/assistant/help/Qt5HelpConfigExtras.cmake.in
++++ qttools-opensource-src-5.5.1/src/assistant/help/Qt5HelpConfigExtras.cmake.in
+@@ -2,11 +2,10 @@
+ if (NOT TARGET Qt5::qcollectiongenerator)
+     add_executable(Qt5::qcollectiongenerator IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
++    if(NOT EXISTS \"${imported_location}\")
++        set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
++    endif()
+     _qt5_Help_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::qcollectiongenerator PROPERTIES
+Index: qttools-opensource-src-5.5.1/src/linguist/Qt5LinguistToolsConfig.cmake.in
+===================================================================
+--- qttools-opensource-src-5.5.1.orig/src/linguist/Qt5LinguistToolsConfig.cmake.in
++++ qttools-opensource-src-5.5.1/src/linguist/Qt5LinguistToolsConfig.cmake.in
+@@ -44,11 +44,10 @@ endmacro()
+ if (NOT TARGET Qt5::lrelease)
+     add_executable(Qt5::lrelease IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
++    if(NOT EXISTS \"${imported_location}\")
++        set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
++    endif()
+     _qt5_LinguistTools_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::lrelease PROPERTIES
+@@ -59,11 +58,10 @@ endif()
+ if (NOT TARGET Qt5::lupdate)
+     add_executable(Qt5::lupdate IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
++    if(NOT EXISTS \"${imported_location}\")
++        set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
++    endif()
+     _qt5_LinguistTools_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::lupdate PROPERTIES
+@@ -74,11 +72,10 @@ endif()
+ if (NOT TARGET Qt5::lconvert)
+     add_executable(Qt5::lconvert IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
++    if(NOT EXISTS \"${imported_location}\")
++        set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
++    endif()
+     _qt5_LinguistTools_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::lconvert PROPERTIES
diff --git a/pkgs/development/libraries/qt-5/5.5/qttools.nix b/pkgs/development/libraries/qt-5/5.5/qttools/default.nix
index 47ebd17c08f6..d72d7b6c64cb 100644
--- a/pkgs/development/libraries/qt-5/5.5/qttools.nix
+++ b/pkgs/development/libraries/qt-5/5.5/qttools/default.nix
@@ -1,8 +1,9 @@
-{ qtSubmodule, qtbase }:
+{ qtSubmodule, lib, copyPathsToStore, qtbase }:
 
 qtSubmodule {
   name = "qttools";
   qtInputs = [ qtbase ];
+  patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
   postFixup = ''
     moveToOutput "bin/qdbus" "$out"
     moveToOutput "bin/qtpaths" "$out"
diff --git a/pkgs/development/libraries/qt-5/5.5/qttools/series b/pkgs/development/libraries/qt-5/5.5/qttools/series
new file mode 100644
index 000000000000..6cc1d3b87bca
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.5/qttools/series
@@ -0,0 +1 @@
+cmake-paths.patch
diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix
index 94b75f1c18b9..5276bcb73dca 100644
--- a/pkgs/development/libraries/qt-5/5.6/default.nix
+++ b/pkgs/development/libraries/qt-5/5.6/default.nix
@@ -90,7 +90,7 @@ let
       qtsensors = callPackage ./qtsensors.nix {};
       qtserialport = callPackage ./qtserialport {};
       qtsvg = callPackage ./qtsvg.nix {};
-      qttools = callPackage ./qttools.nix {};
+      qttools = callPackage ./qttools {};
       qttranslations = callPackage ./qttranslations.nix {};
       /* qtwayland = not packaged */
       qtwebchannel = callPackage ./qtwebchannel.nix {};
diff --git a/pkgs/development/libraries/qt-5/5.6/qttools.nix b/pkgs/development/libraries/qt-5/5.6/qttools.nix
deleted file mode 100644
index 4aeaea729a25..000000000000
--- a/pkgs/development/libraries/qt-5/5.6/qttools.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ qtSubmodule, qtbase, qtdeclarative }:
-
-qtSubmodule {
-  name = "qttools";
-  qtInputs = [ qtbase qtdeclarative ];
-  postFixup = ''
-    moveToOutput "bin/qdbus" "$out"
-    moveToOutput "bin/qtpaths" "$out"
-  '';
-}
diff --git a/pkgs/development/libraries/qt-5/5.6/qttools/cmake-paths.patch b/pkgs/development/libraries/qt-5/5.6/qttools/cmake-paths.patch
new file mode 100644
index 000000000000..fe5bcadbe9a8
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.6/qttools/cmake-paths.patch
@@ -0,0 +1,72 @@
+Index: qttools-opensource-src-5.5.1/src/assistant/help/Qt5HelpConfigExtras.cmake.in
+===================================================================
+--- qttools-opensource-src-5.5.1.orig/src/assistant/help/Qt5HelpConfigExtras.cmake.in
++++ qttools-opensource-src-5.5.1/src/assistant/help/Qt5HelpConfigExtras.cmake.in
+@@ -2,11 +2,10 @@
+ if (NOT TARGET Qt5::qcollectiongenerator)
+     add_executable(Qt5::qcollectiongenerator IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
++    if(NOT EXISTS \"${imported_location}\")
++        set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
++    endif()
+     _qt5_Help_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::qcollectiongenerator PROPERTIES
+Index: qttools-opensource-src-5.5.1/src/linguist/Qt5LinguistToolsConfig.cmake.in
+===================================================================
+--- qttools-opensource-src-5.5.1.orig/src/linguist/Qt5LinguistToolsConfig.cmake.in
++++ qttools-opensource-src-5.5.1/src/linguist/Qt5LinguistToolsConfig.cmake.in
+@@ -44,11 +44,10 @@ endmacro()
+ if (NOT TARGET Qt5::lrelease)
+     add_executable(Qt5::lrelease IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
++    if(NOT EXISTS \"${imported_location}\")
++        set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
++    endif()
+     _qt5_LinguistTools_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::lrelease PROPERTIES
+@@ -59,11 +58,10 @@ endif()
+ if (NOT TARGET Qt5::lupdate)
+     add_executable(Qt5::lupdate IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
++    if(NOT EXISTS \"${imported_location}\")
++        set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
++    endif()
+     _qt5_LinguistTools_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::lupdate PROPERTIES
+@@ -74,11 +72,10 @@ endif()
+ if (NOT TARGET Qt5::lconvert)
+     add_executable(Qt5::lconvert IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
++    if(NOT EXISTS \"${imported_location}\")
++        set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
++    endif()
+     _qt5_LinguistTools_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::lconvert PROPERTIES
diff --git a/pkgs/development/libraries/qt-5/5.6/qttools/default.nix b/pkgs/development/libraries/qt-5/5.6/qttools/default.nix
new file mode 100644
index 000000000000..d72d7b6c64cb
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.6/qttools/default.nix
@@ -0,0 +1,11 @@
+{ qtSubmodule, lib, copyPathsToStore, qtbase }:
+
+qtSubmodule {
+  name = "qttools";
+  qtInputs = [ qtbase ];
+  patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
+  postFixup = ''
+    moveToOutput "bin/qdbus" "$out"
+    moveToOutput "bin/qtpaths" "$out"
+  '';
+}
diff --git a/pkgs/development/libraries/qt-5/5.6/qttools/series b/pkgs/development/libraries/qt-5/5.6/qttools/series
new file mode 100644
index 000000000000..6cc1d3b87bca
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.6/qttools/series
@@ -0,0 +1 @@
+cmake-paths.patch
diff --git a/pkgs/development/libraries/qt-5/5.7/default.nix b/pkgs/development/libraries/qt-5/5.7/default.nix
index 90bd6b0726ee..a84a429695c8 100644
--- a/pkgs/development/libraries/qt-5/5.7/default.nix
+++ b/pkgs/development/libraries/qt-5/5.7/default.nix
@@ -86,7 +86,7 @@ let
       qtsensors = callPackage ./qtsensors.nix {};
       qtserialport = callPackage ./qtserialport {};
       qtsvg = callPackage ./qtsvg.nix {};
-      qttools = callPackage ./qttools.nix {};
+      qttools = callPackage ./qttools {};
       qttranslations = callPackage ./qttranslations.nix {};
       qtwebchannel = callPackage ./qtwebchannel.nix {};
       qtwebengine = callPackage ./qtwebengine.nix {};
diff --git a/pkgs/development/libraries/qt-5/5.7/qttools.nix b/pkgs/development/libraries/qt-5/5.7/qttools.nix
deleted file mode 100644
index 4aeaea729a25..000000000000
--- a/pkgs/development/libraries/qt-5/5.7/qttools.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ qtSubmodule, qtbase, qtdeclarative }:
-
-qtSubmodule {
-  name = "qttools";
-  qtInputs = [ qtbase qtdeclarative ];
-  postFixup = ''
-    moveToOutput "bin/qdbus" "$out"
-    moveToOutput "bin/qtpaths" "$out"
-  '';
-}
diff --git a/pkgs/development/libraries/qt-5/5.7/qttools/cmake-paths.patch b/pkgs/development/libraries/qt-5/5.7/qttools/cmake-paths.patch
new file mode 100644
index 000000000000..fe5bcadbe9a8
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.7/qttools/cmake-paths.patch
@@ -0,0 +1,72 @@
+Index: qttools-opensource-src-5.5.1/src/assistant/help/Qt5HelpConfigExtras.cmake.in
+===================================================================
+--- qttools-opensource-src-5.5.1.orig/src/assistant/help/Qt5HelpConfigExtras.cmake.in
++++ qttools-opensource-src-5.5.1/src/assistant/help/Qt5HelpConfigExtras.cmake.in
+@@ -2,11 +2,10 @@
+ if (NOT TARGET Qt5::qcollectiongenerator)
+     add_executable(Qt5::qcollectiongenerator IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5Help_install_prefix}/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
++    if(NOT EXISTS \"${imported_location}\")
++        set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}qcollectiongenerator$$CMAKE_BIN_SUFFIX\")
++    endif()
+     _qt5_Help_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::qcollectiongenerator PROPERTIES
+Index: qttools-opensource-src-5.5.1/src/linguist/Qt5LinguistToolsConfig.cmake.in
+===================================================================
+--- qttools-opensource-src-5.5.1.orig/src/linguist/Qt5LinguistToolsConfig.cmake.in
++++ qttools-opensource-src-5.5.1/src/linguist/Qt5LinguistToolsConfig.cmake.in
+@@ -44,11 +44,10 @@ endmacro()
+ if (NOT TARGET Qt5::lrelease)
+     add_executable(Qt5::lrelease IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
++    if(NOT EXISTS \"${imported_location}\")
++        set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lrelease$$CMAKE_BIN_SUFFIX\")
++    endif()
+     _qt5_LinguistTools_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::lrelease PROPERTIES
+@@ -59,11 +58,10 @@ endif()
+ if (NOT TARGET Qt5::lupdate)
+     add_executable(Qt5::lupdate IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
++    if(NOT EXISTS \"${imported_location}\")
++        set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lupdate$$CMAKE_BIN_SUFFIX\")
++    endif()
+     _qt5_LinguistTools_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::lupdate PROPERTIES
+@@ -74,11 +72,10 @@ endif()
+ if (NOT TARGET Qt5::lconvert)
+     add_executable(Qt5::lconvert IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5_linguisttools_install_prefix}/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"@NIX_OUT@/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
++    if(NOT EXISTS \"${imported_location}\")
++        set(imported_location \"@NIX_DEV@/$${CMAKE_BIN_DIR}lconvert$$CMAKE_BIN_SUFFIX\")
++    endif()
+     _qt5_LinguistTools_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::lconvert PROPERTIES
diff --git a/pkgs/development/libraries/qt-5/5.7/qttools/default.nix b/pkgs/development/libraries/qt-5/5.7/qttools/default.nix
new file mode 100644
index 000000000000..d72d7b6c64cb
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.7/qttools/default.nix
@@ -0,0 +1,11 @@
+{ qtSubmodule, lib, copyPathsToStore, qtbase }:
+
+qtSubmodule {
+  name = "qttools";
+  qtInputs = [ qtbase ];
+  patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
+  postFixup = ''
+    moveToOutput "bin/qdbus" "$out"
+    moveToOutput "bin/qtpaths" "$out"
+  '';
+}
diff --git a/pkgs/development/libraries/qt-5/5.7/qttools/series b/pkgs/development/libraries/qt-5/5.7/qttools/series
new file mode 100644
index 000000000000..6cc1d3b87bca
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.7/qttools/series
@@ -0,0 +1 @@
+cmake-paths.patch
diff --git a/pkgs/development/libraries/vtk/default.nix b/pkgs/development/libraries/vtk/default.nix
index 59063645232d..20e2213e3e7c 100644
--- a/pkgs/development/libraries/vtk/default.nix
+++ b/pkgs/development/libraries/vtk/default.nix
@@ -5,24 +5,25 @@ with stdenv.lib;
 
 let
   os = stdenv.lib.optionalString;
-  majorVersion = "5.10";
-  minorVersion = "1";
+  majorVersion = "7.0";
+  minorVersion = "0";
   version = "${majorVersion}.${minorVersion}";
 in
 
 stdenv.mkDerivation rec {
   name = "vtk-${os (qtLib != null) "qvtk-"}${version}";
   src = fetchurl {
-    url = "${meta.homepage}files/release/${majorVersion}/vtk-${version}.tar.gz";
-    sha256 = "1fxxgsa7967gdphkl07lbfr6dcbq9a72z5kynlklxn7hyp0l18pi";
+    url = "${meta.homepage}files/release/${majorVersion}/VTK-${version}.tar.gz";
+    sha256 = "1hrjxkcvs3ap0bdhk90vymz5pgvxmg7q6sz8ab3wsyddbshr1abq";
   };
 
-  # https://bugzilla.redhat.com/show_bug.cgi?id=1138466
-  postPatch = "sed '/^#define GL_GLEXT_LEGACY/d' -i ./Rendering/vtkOpenGL.h";
-
   buildInputs = [ cmake mesa libX11 xproto libXt ]
     ++ optional (qtLib != null) qtLib;
 
+  preBuild = ''
+    export LD_LIBRARY_PATH="$(pwd)/lib";
+  '';
+
   # Shared libraries don't work, because of rpath troubles with the current
   # nixpkgs camke approach. It wants to call a binary at build time, just
   # built and requiring one of the shared objects.
diff --git a/pkgs/development/libraries/wolfssl/default.nix b/pkgs/development/libraries/wolfssl/default.nix
index b3145302d303..ca883cc79e73 100644
--- a/pkgs/development/libraries/wolfssl/default.nix
+++ b/pkgs/development/libraries/wolfssl/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "wolfssl-${version}";
-  version = "3.9.6";
+  version = "3.9.8";
 
   src = fetchFromGitHub {
     owner = "wolfSSL";
     repo = "wolfssl";
     rev = "v${version}";
-    sha256 = "19k3pqd567jfxyps4i6mk7sblwzaj1rixmsdwscw63pdgcgf260g";
+    sha256 = "0b1a9rmzpzjblj0gsrzas2aljivd0gfimcsj8gjl80ng25zgmaxr";
   };
 
   outputs = [ "dev" "out" "doc" "lib" ];
diff --git a/pkgs/development/python-modules/pyqt/4.x.nix b/pkgs/development/python-modules/pyqt/4.x.nix
index b2d5b93d9f78..746cc747d72d 100644
--- a/pkgs/development/python-modules/pyqt/4.x.nix
+++ b/pkgs/development/python-modules/pyqt/4.x.nix
@@ -28,9 +28,9 @@ stdenv.mkDerivation {
     ${python.executable} configure.py $configureFlags "''${configureFlagsArray[@]}"
   '';
 
-  buildInputs = [ python pkgconfig makeWrapper qt4 lndir ];
+  buildInputs = [ pkgconfig makeWrapper qt4 lndir ];
 
-  propagatedBuildInputs = [ pythonPackages.sip_4_16 ];
+  propagatedBuildInputs = [ pythonPackages.sip_4_16 python ];
 
   postInstall = ''
     for i in $out/bin/*; do
diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix
index 7ec89ffd7eec..69fb6e266ea5 100644
--- a/pkgs/development/python-modules/pyqt/5.x.nix
+++ b/pkgs/development/python-modules/pyqt/5.x.nix
@@ -20,11 +20,11 @@ in stdenv.mkDerivation {
   };
 
   buildInputs = [
-    python pkgconfig makeWrapper lndir
+    pkgconfig makeWrapper lndir
     qtbase qtsvg qtwebkit qmakeHook
   ];
 
-  propagatedBuildInputs = [ sip ];
+  propagatedBuildInputs = [ sip python ];
 
   configurePhase = ''
     runHook preConfigure
diff --git a/pkgs/development/tools/analysis/flow/default.nix b/pkgs/development/tools/analysis/flow/default.nix
index 2cff523323f6..f9aae3760d6c 100644
--- a/pkgs/development/tools/analysis/flow/default.nix
+++ b/pkgs/development/tools/analysis/flow/default.nix
@@ -1,15 +1,15 @@
-{ stdenv, fetchFromGitHub, lib, ocaml, libelf, cf-private, CoreServices, git, mercurial }:
+{ stdenv, fetchFromGitHub, lib, ocaml, libelf, cf-private, CoreServices }:
 
 with lib;
 
 stdenv.mkDerivation rec {
-  version = "0.28.0";
+  version = "0.30.0";
   name = "flow-${version}";
   src = fetchFromGitHub {
     owner = "facebook";
     repo = "flow";
     rev = "v${version}";
-    sha256 = "1xryv1366zc385r82r6n832xkaqcm63zs1baizl02qchfzfa3am2";
+    sha256 = "1s6l3570r53qjyqs8ghqqgb51rb0skijwjgm6av43xi7b7knkd35";
   };
 
   installPhase = ''
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
     cp bin/flow $out/bin/
   '';
 
-  buildInputs = [ ocaml libelf git mercurial ] # git and mercurial are necessary because of https://github.com/facebook/flow/issues/1981
+  buildInputs = [ ocaml libelf ]
     ++ optionals stdenv.isDarwin [ cf-private CoreServices ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/tools/continuous-integration/gocd-agent/default.nix b/pkgs/development/tools/continuous-integration/gocd-agent/default.nix
index 170f07ca5c3d..e252362a0592 100644
--- a/pkgs/development/tools/continuous-integration/gocd-agent/default.nix
+++ b/pkgs/development/tools/continuous-integration/gocd-agent/default.nix
@@ -2,19 +2,19 @@
 
 stdenv.mkDerivation rec {
   name = "gocd-agent-${version}-${rev}";
-  version = "16.5.0";
-  rev = "3305";
+  version = "16.7.0";
+  rev = "3819";
 
   src = fetchurl {
     url = "https://download.go.cd/binaries/${version}-${rev}/generic/go-agent-${version}-${rev}.zip";
-    sha256 = "2cb988d36ec747b2917f3be040b430f2a8289c07353a6b6bdc95bf741fa1ed97";
+    sha256 = "24cc47099d2e9cc1d3983e1ab65957316770f791632e572189b1e6c0183403b7";
   };
   meta = with stdenv.lib; {
     description = "A continuous delivery server specializing in advanced workflow modeling and visualization";
     homepage = http://www.go.cd;
     license = licenses.asl20;
     platforms = platforms.all;
-    maintainers = with maintainers; [ swarren83 ];
+    maintainers = with maintainers; [ grahamc swarren83 ];
   };
 
   buildInputs = [ unzip ];
diff --git a/pkgs/development/tools/continuous-integration/gocd-server/default.nix b/pkgs/development/tools/continuous-integration/gocd-server/default.nix
index d08d72c394ec..474bcba6c712 100644
--- a/pkgs/development/tools/continuous-integration/gocd-server/default.nix
+++ b/pkgs/development/tools/continuous-integration/gocd-server/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   name = "gocd-server-${version}-${rev}";
-  version = "16.6.0";
-  rev = "3590";
+  version = "16.7.0";
+  rev = "3819";
 
   src = fetchurl {
     url = "https://download.go.cd/binaries/${version}-${rev}/generic/go-server-${version}-${rev}.zip";
-    sha256 = "6e737c8b419544deb5089e9a2540892a6faec73c962ee7c4e526a799056acca1";
+    sha256 = "3fae89741726eac69adab8dd64cd18918343188eeb43496e88d4f3abbe0998ad";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/tools/deis/deps.json b/pkgs/development/tools/deis/deps.json
index a0333247062e..b28ce075e81f 100644
--- a/pkgs/development/tools/deis/deps.json
+++ b/pkgs/development/tools/deis/deps.json
@@ -1,10 +1,29 @@
 [
     {
-        "include": "../../../go-modules/libs.json",
-        "packages": [
-            "github.com/docopt/docopt-go",
-            "golang.org/x/crypto",
-            "gopkg.in/yaml.v2"
-        ]
+        "goPackagePath": "gopkg.in/yaml.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/yaml.v2",
+            "rev": "a83829b6f1293c91addabc89d0571c246397bbf4",
+            "sha256": "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh"
+        }
+    },
+    {
+        "goPackagePath": "github.com/docopt/docopt-go",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/docopt/docopt-go",
+            "rev": "784ddc588536785e7299f7272f39101f7faccc3f",
+            "sha256": "0wwz48jl9fvl1iknvn9dqr4gfy1qs03gxaikrxxp9gry6773v3sj"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/crypto",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/crypto",
+            "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
+            "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
+        }
     }
 ]
diff --git a/pkgs/development/tools/go2nix/deps.json b/pkgs/development/tools/go2nix/deps.json
index f6d392ad3ce3..ab9d0d39fce8 100644
--- a/pkgs/development/tools/go2nix/deps.json
+++ b/pkgs/development/tools/go2nix/deps.json
@@ -1,9 +1,20 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/Masterminds/vcs",
-      "github.com/jawher/mow.cli"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/Masterminds/vcs",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/Masterminds/vcs",
+            "rev": "7af28b64c5ec41b1558f5514fd938379822c237c",
+            "sha256": "127pamr5lkym3iq6z747bm4y4gyc02glrqb61yv82z1rdyv1dcf6"
+        }
+    },
+    {
+        "goPackagePath": "github.com/jawher/mow.cli",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/jawher/mow.cli",
+            "rev": "772320464101e904cd51198160eb4d489be9cc49",
+            "sha256": "1a8hnh2k3vc3prjhnz4rjbiwhqq6r3mi18h9cdb6fc6s6yzjc19j"
+        }
+    }
 ]
diff --git a/pkgs/development/tools/golint/deps.json b/pkgs/development/tools/golint/deps.json
index bc1b079376a1..387adc6cf069 100644
--- a/pkgs/development/tools/golint/deps.json
+++ b/pkgs/development/tools/golint/deps.json
@@ -1,8 +1,11 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "golang.org/x/tools"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/tools",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/tools",
+            "rev": "9ae4729fba20b3533d829a9c6ba8195b068f2abc",
+            "sha256": "1j51aaskfqc953p5s9naqimr04hzfijm4yczdsiway1xnnvvpfr1"
+        }
+    }
 ]
diff --git a/pkgs/development/tools/gotools/deps.json b/pkgs/development/tools/gotools/deps.json
index 76e8fd93aa7d..64ae72eb3ed4 100644
--- a/pkgs/development/tools/gotools/deps.json
+++ b/pkgs/development/tools/gotools/deps.json
@@ -1,8 +1,11 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "golang.org/x/net"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/net",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/net",
+            "rev": "62ac18b461605b4be188bbc7300e9aa2bc836cd4",
+            "sha256": "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p"
+        }
+    }
 ]
diff --git a/pkgs/development/tools/gox/deps.json b/pkgs/development/tools/gox/deps.json
index 288b2d9f714f..3406194137cd 100644
--- a/pkgs/development/tools/gox/deps.json
+++ b/pkgs/development/tools/gox/deps.json
@@ -1,8 +1,11 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/mitchellh/iochan"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/mitchellh/iochan",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mitchellh/iochan",
+            "rev": "b584a329b193e206025682ae6c10cdbe03b0cd77",
+            "sha256": "1fcwdhfci41ibpng2j4c1bqfng578cwzb3c00yw1lnbwwhaq9r6b"
+        }
+    }
 ]
diff --git a/pkgs/development/tools/misc/gpshell/default.nix b/pkgs/development/tools/misc/gpshell/default.nix
new file mode 100644
index 000000000000..a4ed3a44f350
--- /dev/null
+++ b/pkgs/development/tools/misc/gpshell/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, pkgconfig, globalplatform, pcsclite }:
+
+stdenv.mkDerivation rec {
+  name = "gpshell-${version}";
+  version = "1.4.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/globalplatform/gpshell-${version}.tar.gz";
+    sha256 = "19a77zvyf2vazbv17185s4pynhylk2ky8vhl4i8pg9zww29sicqi";
+  };
+
+  buildInputs = [ pkgconfig globalplatform pcsclite ];
+
+  meta = with stdenv.lib; {
+    homepage = https://sourceforge.net/p/globalplatform/wiki/Home/;
+    description = "Smartcard management application";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/development/tools/misc/hydra/default.nix b/pkgs/development/tools/misc/hydra/default.nix
index a4f1a96c6a4c..e3d2c4950bcd 100644
--- a/pkgs/development/tools/misc/hydra/default.nix
+++ b/pkgs/development/tools/misc/hydra/default.nix
@@ -118,7 +118,7 @@ in releaseTools.nixBuild rec {
 
   preCheck = ''
     patchShebangs .
-    export LOGNAME=${LOGNAME:-foo}
+    export LOGNAME=''${LOGNAME:-foo}
   '';
 
   postInstall = ''
diff --git a/pkgs/development/tools/pypi2nix/default.nix b/pkgs/development/tools/pypi2nix/default.nix
index 02ab4c06a50a..2884b23049ab 100644
--- a/pkgs/development/tools/pypi2nix/default.nix
+++ b/pkgs/development/tools/pypi2nix/default.nix
@@ -36,7 +36,7 @@ in stdenv.mkDerivation rec {
     # mv effect-*/effect                 $out/pkgs/effect
     mv requests-*/requests              $out/pkgs/
 
-    if [ "$IN_NIX_SHELL" != "1" ]; then
+    if [ -z "$IN_NIX_SHELL" ]; then
       if [ -e git-export ]; then
         mv git-export/src/pypi2nix      $out/pkgs/pypi2nix
       else
diff --git a/pkgs/development/tools/remarshal/deps.json b/pkgs/development/tools/remarshal/deps.json
index 3b43c0e5ff60..1cc264181c4c 100644
--- a/pkgs/development/tools/remarshal/deps.json
+++ b/pkgs/development/tools/remarshal/deps.json
@@ -1,9 +1,20 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/BurntSushi/toml",
-      "gopkg.in/yaml.v2"
-    ]
-  }
+    {
+        "goPackagePath": "gopkg.in/yaml.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/yaml.v2",
+            "rev": "a83829b6f1293c91addabc89d0571c246397bbf4",
+            "sha256": "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh"
+        }
+    },
+    {
+        "goPackagePath": "github.com/BurntSushi/toml",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/BurntSushi/toml",
+            "rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4",
+            "sha256": "0gkgkw04ndr5y7hrdy0r4v2drs5srwfcw2bs1gyas066hwl84xyw"
+        }
+    }
 ]
diff --git a/pkgs/development/tools/textql/deps.json b/pkgs/development/tools/textql/deps.json
index d2a75b9e45b0..01c5de1cdc62 100644
--- a/pkgs/development/tools/textql/deps.json
+++ b/pkgs/development/tools/textql/deps.json
@@ -1,8 +1,11 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/mattn/go-sqlite3"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/mattn/go-sqlite3",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mattn/go-sqlite3",
+            "rev": "b4142c444a8941d0d92b0b7103a24df9cd815e42",
+            "sha256": "0xq2y4am8dz9w9aaq24s1npg1sn8pf2gn4nki73ylz2fpjwq9vla"
+        }
+    }
 ]
diff --git a/pkgs/development/tools/unity3d/default.nix b/pkgs/development/tools/unity3d/default.nix
index 8f89770ffc85..0a72e6bb91eb 100644
--- a/pkgs/development/tools/unity3d/default.nix
+++ b/pkgs/development/tools/unity3d/default.nix
@@ -4,7 +4,7 @@
 , cairo, dbus, expat, zlib, libpng12, nodejs, gnutar, gcc, gcc_32bit
 , libX11, libXcursor, libXdamage, libXfixes, libXrender, libXi
 , libXcomposite, libXext, libXrandr, libXtst, libSM, libICE, libxcb
-, mono, libgnomeui, gnome_vfs, gnome-sharp, gtk-sharp
+, mono, libgnomeui, gnome_vfs, gnome-sharp, gtk-sharp, chromium
 }:
 
 let
@@ -44,7 +44,7 @@ in stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ makeWrapper fakeroot file getopt ];
 
-  outputs = [ "out" "monodevelop" "sandbox" ];
+  outputs = [ "out" "monodevelop" ];
 
   unpackPhase = ''
     echo -e 'q\ny' | fakeroot sh $src
@@ -91,12 +91,10 @@ in stdenv.mkDerivation rec {
   '';
 
   installPhase = ''
-    install -Dm755 Editor/chrome-sandbox $sandbox/bin/unity-chrome-sandbox
-
     unitydir="$out/opt/Unity/Editor"
     mkdir -p $unitydir
     mv Editor/* $unitydir
-    ln -sf /var/setuid-wrappers/unity-chrome-sandbox $unitydir/chrome-sandbox
+    ln -sf /var/setuid-wrappers/${chromium.sandboxExecutableName} $unitydir/chrome-sandbox
 
     mkdir -p $out/share/applications
     sed "/^Exec=/c\Exec=$out/bin/unity-editor" \
diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix
index 6dfbb6978db7..242782161d75 100644
--- a/pkgs/development/tools/vagrant/default.nix
+++ b/pkgs/development/tools/vagrant/default.nix
@@ -15,6 +15,7 @@ let
 in
 stdenv.mkDerivation rec {
   name = "vagrant-${version}";
+  inherit version;
 
   src =
     if stdenv.system == "x86_64-linux" then
@@ -39,10 +40,10 @@ stdenv.mkDerivation rec {
   buildInputs = [ makeWrapper ];
 
   unpackPhase = ''
-    ${dpkg}/bin/dpkg-deb -x ${src} .
+    ${dpkg}/bin/dpkg-deb -x "$src" .
   '';
 
-  buildPhase = false;
+  buildPhase = "";
 
   installPhase = ''
     sed -i "s|/opt|$out/opt|" usr/bin/vagrant
@@ -55,6 +56,8 @@ stdenv.mkDerivation rec {
     ln -s ${curl.dev}/bin/curl-config opt/vagrant/embedded/bin
 
     # libarchive: bsdtar, bsdcpio
+    rm opt/vagrant/embedded/lib/libarchive*
+    ln -s ${libarchive}/lib/libarchive.so opt/vagrant/embedded/lib/libarchive.so
     rm opt/vagrant/embedded/bin/{bsdtar,bsdcpio}
     ln -s ${libarchive}/bin/bsdtar opt/vagrant/embedded/bin
     ln -s ${libarchive}/bin/bsdcpio opt/vagrant/embedded/bin
@@ -74,6 +77,10 @@ stdenv.mkDerivation rec {
     ln -s ${ruby}/bin/ri opt/vagrant/embedded/bin
     ln -s ${ruby}/bin/ruby opt/vagrant/embedded/bin
 
+    # ruby libs
+    rm -rf opt/vagrant/embedded/lib
+    ln -s ${ruby}/lib opt/vagrant/embedded/lib
+
     # libiconv: iconv
     rm opt/vagrant/embedded/bin/iconv
     ln -s ${libiconv}/bin/iconv opt/vagrant/embedded/bin
@@ -92,17 +99,17 @@ stdenv.mkDerivation rec {
     mkdir -p "$out"
     cp -r opt "$out"
     cp -r usr/bin "$out"
-    wrapProgram $out/bin/vagrant --prefix LD_LIBRARY_PATH : $out/opt/vagrant/embedded/lib
+    wrapProgram "$out/bin/vagrant" --prefix LD_LIBRARY_PATH : "$out/opt/vagrant/embedded/lib"
   '';
 
   preFixup = ''
     # 'hide' the template file from shebang-patching
-    chmod -x $out/opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/templates/Executable
-    chmod -x $out/opt/vagrant/embedded/gems/gems/vagrant-${version}/plugins/provisioners/salt/bootstrap-salt.sh
+    chmod -x "$out/opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/templates/Executable"
+    chmod -x "$out/opt/vagrant/embedded/gems/gems/vagrant-$version/plugins/provisioners/salt/bootstrap-salt.sh"
   '';
 
   postFixup = ''
-    chmod +x $out/opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/templates/Executable
-    chmod +x $out/opt/vagrant/embedded/gems/gems/vagrant-${version}/plugins/provisioners/salt/bootstrap-salt.sh
+    chmod +x "$out/opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/templates/Executable"
+    chmod +x "$out/opt/vagrant/embedded/gems/gems/vagrant-$version/plugins/provisioners/salt/bootstrap-salt.sh"
   '';
 }
diff --git a/pkgs/development/web/minify/deps.json b/pkgs/development/web/minify/deps.json
index 0b2fe8108548..0575578b43c0 100644
--- a/pkgs/development/web/minify/deps.json
+++ b/pkgs/development/web/minify/deps.json
@@ -1,15 +1,74 @@
 [
     {
-        "include": "../../libs.json",
-        "packages": [
-            "github.com/tdewolff/buffer",
-            "github.com/tdewolff/parse",
-            "github.com/tdewolff/strconv",
-            "github.com/dustin/go-humanize",
-            "github.com/fsnotify/fsnotify",
-            "github.com/matryer/try",
-            "github.com/ogier/pflag",
-            "golang.org/x/sys"
-        ]
+        "goPackagePath": "golang.org/x/sys",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/sys",
+            "rev": "d9157a9621b69ad1d8d77a1933590c416593f24f",
+            "sha256": "1asdbp7rj1j1m1aar1a022wpcwbml6zih6cpbxaw7b2m8v8is931"
+        }
+    },
+    {
+        "goPackagePath": "github.com/dustin/go-humanize",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/dustin/go-humanize",
+            "rev": "8929fe90cee4b2cb9deb468b51fb34eba64d1bf0",
+            "sha256": "1g155kxjh6hd3ibx41nbpj6f7h5bh54zgl9dr53xzg2xlxljgjy0"
+        }
+    },
+    {
+        "goPackagePath": "github.com/tdewolff/buffer",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/tdewolff/buffer",
+            "rev": "0edfcb7b750146ff879e95831de2ef53605a5cb5",
+            "sha256": "1mdd4k9byp22mw0a399j3w73zjb5g0vn58g76rjy7ajb0dzm80vl"
+        }
+    },
+    {
+        "goPackagePath": "github.com/tdewolff/parse",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/tdewolff/parse",
+            "rev": "34d5c1160d4503da4b456e5094609f2331d6dde3",
+            "sha256": "0hxf65fgkrc1q4p99p33xxxy1s6wxpn1vfsnqf9p846awwbqsy0v"
+        }
+    },
+    {
+        "goPackagePath": "github.com/tdewolff/strconv",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/tdewolff/strconv",
+            "rev": "3e8091f4417ebaaa3910da63a45ea394ebbfb0e3",
+            "sha256": "00w2mryfjhz3vaqzxvbwvyhi1vgpc1s4xfv1r9hxn8hwa078q5gp"
+        }
+    },
+    {
+        "goPackagePath": "github.com/matryer/try",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/matryer/try",
+            "rev": "93d30e50512f879b73829eb79867df38084bcd31",
+            "sha256": "0dmc8iar9685ks1ba3vnycjsx8qxwyqv51jb7677dvwnzbqhgw6f"
+        }
+    },
+    {
+        "goPackagePath": "github.com/fsnotify/fsnotify",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/fsnotify/fsnotify",
+            "rev": "30411dbcefb7a1da7e84f75530ad3abe4011b4f8",
+            "sha256": "0kbpvyi6p9942k0vmcw5z13mja47f7hq7nqd332pn2zydss6kddm"
+        }
+    },
+    {
+        "goPackagePath": "github.com/ogier/pflag",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/ogier/pflag",
+            "rev": "45c278ab3607870051a2ea9040bb85fcb8557481",
+            "sha256": "0620v75wppfd84d95n312wpngcb73cph4q3ivs1h0waljfnsrd5l"
+        }
     }
 ]
diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix
index f0f4d71e3912..c10fe99f74a9 100644
--- a/pkgs/development/web/nodejs/nodejs.nix
+++ b/pkgs/development/web/nodejs/nodejs.nix
@@ -40,6 +40,10 @@ in stdenv.mkDerivation {
     sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' tools/gyp/pylib/gyp/xcode_emulation.py
   '';
 
+  postInstall = ''
+    PATH=$out/bin:$PATH patchShebangs $out
+  '';
+
   patches = stdenv.lib.optionals stdenv.isDarwin [ ./no-xcode.patch ];
 
   buildInputs = extraBuildInputs
diff --git a/pkgs/games/gambatte/default.nix b/pkgs/games/gambatte/default.nix
index 969f231dedaf..dabcfb19db04 100644
--- a/pkgs/games/gambatte/default.nix
+++ b/pkgs/games/gambatte/default.nix
@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ scons qt4 ];
 
+  patches = [ ./fix-scons-paths.patch ];
+
   buildPhase = ''
     ./build_qt.sh
   '';
diff --git a/pkgs/games/gambatte/fix-scons-paths.patch b/pkgs/games/gambatte/fix-scons-paths.patch
new file mode 100644
index 000000000000..ea10ee4163b4
--- /dev/null
+++ b/pkgs/games/gambatte/fix-scons-paths.patch
@@ -0,0 +1,15 @@
+diff --git a/libgambatte/SConstruct b/libgambatte/SConstruct
+index e882514..87e1eaa 100644
+--- a/libgambatte/SConstruct
++++ b/libgambatte/SConstruct
+@@ -5,7 +5,9 @@ vars = Variables()
+ vars.Add('CC')
+ vars.Add('CXX')
+ 
+-env = Environment(CPPPATH = ['src', 'include', '../common'],
++import os
++env = Environment(ENV = os.environ,
++                  CPPPATH = ['src', 'include', '../common'],
+                   CFLAGS = global_cflags + global_defines,
+                   CXXFLAGS = global_cxxflags + global_defines,
+                   variables = vars)
diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix
index 03f94afd94f2..7a7571a9fa50 100644
--- a/pkgs/games/openttd/default.nix
+++ b/pkgs/games/openttd/default.nix
@@ -21,11 +21,11 @@ let
 in
 stdenv.mkDerivation rec {
   name = "openttd-${version}";
-  version = "1.6.0";
+  version = "1.6.1";
 
   src = fetchurl {
     url = "http://binaries.openttd.org/releases/${version}/${name}-source.tar.xz";
-    sha256 = "1cjf9gz7d0sn7893wv9d00q724sxv3d81bgb0c5f5ppz2ssyc4jc";
+    sha256 = "1ak32fj5xkk2fvmm3g8i7wzmk4bh2ijsp8fzvvw5wj6365p9j24v";
   };
 
   nativeBuildInputs = [ pkgconfig ];
@@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
     '';
     homepage = http://www.openttd.org/;
     license = stdenv.lib.licenses.gpl2;
-    platforms = stdenv.lib.platforms.unix;
+    platforms = stdenv.lib.platforms.linux;
     maintainers = with stdenv.lib.maintainers; [ jcumming the-kenny fpletz ];
   };
 }
diff --git a/pkgs/games/pokerth/default.nix b/pkgs/games/pokerth/default.nix
new file mode 100644
index 000000000000..9daf98dcfb4f
--- /dev/null
+++ b/pkgs/games/pokerth/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, lib, fetchFromGitHub, qmake4Hook, qt4, protobuf, boost155, tinyxml2, libgcrypt, sqlite, gsasl, curl, SDL, SDL_mixer, libircclient }:
+
+let boost = boost155;
+in stdenv.mkDerivation rec {
+  name            = "${pname}-${version}";
+  pname           = "pokerth";
+  version         = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner  = pname;
+    repo   = pname;
+    rev    = "7f3c8a860848c16c8c2f78e3929a65a54ef4c04c";
+    sha256 = "1md3sl7pdpn3n42k75pxqbkkl19cz4699g1vdi04qpp0jxx09a2k";
+  };
+
+  buildInputs = [ qmake4Hook qt4 protobuf boost tinyxml2 libgcrypt sqlite gsasl curl SDL SDL_mixer libircclient ];
+
+  outputs = [ "out" "server" ];
+
+  qmakeFlags = [ "pokerth.pro" ];
+
+  postPatch = ''
+    for f in connectivity.pro load.pro pokerth_game.pro pokerth_server.pro
+    do
+      substituteInPlace $f \
+        --replace 'LIB_DIRS =' 'LIB_DIRS = ${boost.out}/lib'
+    done
+  '';
+
+  postInstall = ''
+    install -D -m755 bin/pokerth_server $server/bin/pokerth_server
+  '';
+
+  meta = with stdenv.lib; {
+    homepage    = http://www.pokerth.net/;
+    description = "Open Source Poker client and server";
+    license     = licenses.gpl3;
+    maintainers = with maintainers; [ obadz ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/pkgs/games/vessel/default.nix b/pkgs/games/vessel/default.nix
index f85fd267485d..34b9a606fb96 100644
--- a/pkgs/games/vessel/default.nix
+++ b/pkgs/games/vessel/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
       message = goBuyItNow;
       name = "${name}-bin";
       sha256 = "1vpwcrjiln2mx43h7ib3jnccyr3chk7a5x2bw9kb4lw8ycygvg96";
-    } else throw "unsupported platform ${stdenv.s:ystem} only i686-linux supported for now.";
+    } else throw "unsupported platform ${stdenv.system} only i686-linux supported for now.";
 
   phases = "installPhase";
   ld_preload = ./isatty.c;
diff --git a/pkgs/games/xboard/default.nix b/pkgs/games/xboard/default.nix
index 8d57b48481ec..46d3873659ff 100644
--- a/pkgs/games/xboard/default.nix
+++ b/pkgs/games/xboard/default.nix
@@ -6,11 +6,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="xboard";
-    version="4.9.0";
+    version="4.9.1";
     name="${baseName}-${version}";
-    hash="1av6r3s5vyclwf3c9i1pkr2442ryrf4ixhhf2i44a4j1xyhlp5jb";
-    url="http://ftp.gnu.org/gnu/xboard/xboard-4.9.0.tar.gz";
-    sha256="1av6r3s5vyclwf3c9i1pkr2442ryrf4ixhhf2i44a4j1xyhlp5jb";
+    hash="1mkh36xnnacnz9r00b5f9ld9309k32jv6mcavklbdnca8bl56bib";
+    url="http://ftp.gnu.org/gnu/xboard/xboard-4.9.1.tar.gz";
+    sha256="1mkh36xnnacnz9r00b5f9ld9309k32jv6mcavklbdnca8bl56bib";
   };
   buildInputs = [
     libX11 xproto libXt libXaw libSM libICE libXmu 
diff --git a/pkgs/os-specific/linux/eudev/default.nix b/pkgs/os-specific/linux/eudev/default.nix
index e9fcf5d8c4d3..8ab4da2da8cf 100644
--- a/pkgs/os-specific/linux/eudev/default.nix
+++ b/pkgs/os-specific/linux/eudev/default.nix
@@ -3,10 +3,10 @@ let
   s = # Generated upstream information
   rec {
     baseName="eudev";
-    version = "3.1.5";
+    version = "3.2";
     name="${baseName}-${version}";
     url="http://dev.gentoo.org/~blueness/eudev/eudev-${version}.tar.gz";
-    sha256 = "0akg9gcc3c2p56xbhlvbybqavcprly5q0bvk655zwl6d62j8an7p";
+    sha256 = "099w62ncq78nxpxizf910mx18hc8x4qvzw3azjd00fir89wmyjnq";
   };
   buildInputs = [
     glib pkgconfig gperf utillinux
diff --git a/pkgs/os-specific/linux/firejail/default.nix b/pkgs/os-specific/linux/firejail/default.nix
index dac0eb0d0f50..ce2f860efc88 100644
--- a/pkgs/os-specific/linux/firejail/default.nix
+++ b/pkgs/os-specific/linux/firejail/default.nix
@@ -3,11 +3,10 @@ let
   s = # Generated upstream information
   rec {
     baseName="firejail";
-    version="0.9.40";
+    version="0.9.42-rc1";
     name="${baseName}-${version}";
-    hash="1vr0z694wibjkcpmyg7lz68r53z857c8hsb02cqxi4lfkkcmzgh2";
-    url="mirror://sourceforge/project/firejail/firejail/firejail-0.9.40-rc1.tar.bz2";
-    sha256="1vr0z694wibjkcpmyg7lz68r53z857c8hsb02cqxi4lfkkcmzgh2";
+    url="mirror://sourceforge/project/firejail/firejail/firejail-0.9.42~rc1.tar.bz2";
+    sha256="11br6xp86bxs1ic2x683hbvg1hk8v2wp8cw6blj0zz3cdl0pcjqf";
   };
   buildInputs = [
     which
@@ -18,6 +17,7 @@ stdenv.mkDerivation {
   inherit buildInputs;
   src = fetchurl {
     inherit (s) url sha256;
+    name = "${s.name}.tar.bz2";
   };
 
   preConfigure = ''
diff --git a/pkgs/os-specific/linux/hwdata/default.nix b/pkgs/os-specific/linux/hwdata/default.nix
index 1987e914ad9a..dc3160af7aae 100644
--- a/pkgs/os-specific/linux/hwdata/default.nix
+++ b/pkgs/os-specific/linux/hwdata/default.nix
@@ -1,11 +1,12 @@
 { stdenv, fetchurl }:
 
-stdenv.mkDerivation {
-  name = "hwdata-0.276";
+stdenv.mkDerivation rec {
+  name = "hwdata-${version}";
+  version = "0.291";
 
   src = fetchurl {
-    url = "https://git.fedorahosted.org/cgit/hwdata.git/snapshot/hwdata-0.276.tar.xz";
-    sha256 = "0pg0ms6kb2mm25mdklsb0xn2spcwi2mhygzc7bkpji72qq8srzsh";
+    url = "https://git.fedorahosted.org/cgit/hwdata.git/snapshot/hwdata-${version}.tar.xz";
+    sha256 = "121qixrdhdncva1cnj7m7jlqvi1kbj85dpi844jiis3a8hgpzw5a";
   };
 
   preConfigure = "patchShebangs ./configure";
diff --git a/pkgs/os-specific/linux/iputils/default.nix b/pkgs/os-specific/linux/iputils/default.nix
index 9bce875570ef..f6fcef11eb01 100644
--- a/pkgs/os-specific/linux/iputils/default.nix
+++ b/pkgs/os-specific/linux/iputils/default.nix
@@ -1,17 +1,17 @@
 { stdenv, fetchurl, libsysfs, gnutls, openssl, libcap, sp, docbook_sgml_dtd_31
-, SGMLSpm }:
+, SGMLSpm, libgcrypt }:
 
 assert stdenv ? glibc;
 
 let
-  time = "20121221";
+  time = "20151218";
 in
 stdenv.mkDerivation rec {
   name = "iputils-${time}";
 
   src = fetchurl {
     url = "http://www.skbuff.net/iputils/iputils-s${time}.tar.bz2";
-    sha256 = "17riqp8dh8dvx32zv3hyrghpxz6xnxa6vai9b4yc485nqngm83s5";
+    sha256 = "189592jlkhxdgy8jc07m4bsl41ik9r6i6aaqb532prai37bmi7sl";
   };
 
   prePatch = ''
@@ -20,7 +20,9 @@ stdenv.mkDerivation rec {
 
   makeFlags = "USE_GNUTLS=no";
 
-  buildInputs = [ libsysfs openssl libcap sp docbook_sgml_dtd_31 SGMLSpm ];
+  buildInputs = [
+    libsysfs openssl libcap sp docbook_sgml_dtd_31 SGMLSpm libgcrypt
+  ];
 
   buildFlags = "man all ninfod";
 
diff --git a/pkgs/os-specific/linux/jool/source.nix b/pkgs/os-specific/linux/jool/source.nix
index 7a341b9e82bd..60415c0d009a 100644
--- a/pkgs/os-specific/linux/jool/source.nix
+++ b/pkgs/os-specific/linux/jool/source.nix
@@ -1,9 +1,9 @@
 { fetchzip }:
 
 rec {
-  version = "3.4.2";
+  version = "3.4.4";
   src = fetchzip {
-    url = "https://www.jool.mx/download/Jool-${version}.zip";
-    sha256 = "1qv7wwipylb76n8m8vphbf9rgxrryb42dsyw6mm43zjc9knsz7r0";
+    url = "https://github.com/NICMx/releases/raw/master/Jool/Jool-${version}.zip";
+    sha256 = "1k5iyfzjdzl5q64234r806pf6b3qdflvjpw06pnwl0ycj05p5frr";
   };
 }
diff --git a/pkgs/os-specific/linux/kernel/ecryptfs-fix-mmap-bug.patch b/pkgs/os-specific/linux/kernel/ecryptfs-fix-mmap-bug.patch
deleted file mode 100644
index 7f94669a9f45..000000000000
--- a/pkgs/os-specific/linux/kernel/ecryptfs-fix-mmap-bug.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Signed-off-by: Tyler Hicks <tyhicks@xxxxxxxxxxxxx>
-Tested-by: Tyler Hicks <tyhicks@xxxxxxxxxxxxx> # 4.4.y, 3.18.y
-Cc: <stable@xxxxxxxxxxxxxxx> # 4.5-
----
- fs/ecryptfs/kthread.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/fs/ecryptfs/kthread.c b/fs/ecryptfs/kthread.c
-index e818f5a..b9faeab 100644
---- a/fs/ecryptfs/kthread.c
-+++ b/fs/ecryptfs/kthread.c
-@@ -171,7 +171,7 @@ int ecryptfs_privileged_open(struct file **lower_file,
- 		goto out;
- 	}
- have_file:
--	if ((*lower_file)->f_op->mmap == NULL) {
-+	if ((*lower_file)->f_op->mmap == NULL && !d_is_dir(lower_dentry)) {
- 		fput(*lower_file);
- 		*lower_file = NULL;
- 		rc = -EMEDIUMTYPE;
diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix
index 4dd3444d524e..56ab62e95e53 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.4.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, perl, buildLinux, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "4.4.16";
+  version = "4.4.17";
   extraMeta.branch = "4.4";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
-    sha256 = "18v4n7yypl4c8k69zrnf9g09pilh47y0ciy3mwbksz2kmw4yq573";
+    sha256 = "10ags1n345irx1bi3fyal326b3m5myndz19v0klbvxhd3i3m350m";
   };
 
   kernelPatches = args.kernelPatches;
diff --git a/pkgs/os-specific/linux/kernel/linux-mptcp.nix b/pkgs/os-specific/linux/kernel/linux-mptcp.nix
index 981e6a97c2a0..b39514d45dd9 100644
--- a/pkgs/os-specific/linux/kernel/linux-mptcp.nix
+++ b/pkgs/os-specific/linux/kernel/linux-mptcp.nix
@@ -1,20 +1,22 @@
 { stdenv, fetchurl, perl, buildLinux, ... } @ args:
 
 import ./generic.nix (args // rec {
-  mptcpVersion = "0.90.1";
-  modDirVersion = "3.18.25";
+  mptcpVersion = "0.91";
+  modDirVersion = "4.1.26";
   version = "${modDirVersion}-mptcp_v${mptcpVersion}";
 
   extraMeta = {
-    branch = "3.18";
+    branch = "4.1";
     maintainers = stdenv.lib.maintainers.layus;
   };
 
   src = fetchurl {
     url = "https://github.com/multipath-tcp/mptcp/archive/v${mptcpVersion}.tar.gz";
-    sha256 = "088cpxl960xzrsz7x2lkq28ksa4gzjb1hp5yf8hxshihyhdaspwl";
+    sha256 = "0rbvgz89j5wk781y201qdxy2kz4gmlamb72wdbxj8mxv92x56lh3";
   };
 
+  kernelPatches = args.kernelPatches;
+
   extraConfig = ''
     IPV6 y
     MPTCP y
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 375f0e3b0b42..f0aa4c92b3c5 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -136,10 +136,6 @@ rec {
     { name = "mfd_fix_dependency";
       patch = ./chromiumos-patches/mfd-fix-dependency.patch;
     };
-  qat_common_Makefile =
-    { name = "qat_common_Makefile";
-      patch = ./qat_common_Makefile.patch;
-    };
 
   hiddev_CVE_2016_5829 =
     { name = "hiddev_CVE_2016_5829";
@@ -148,8 +144,4 @@ rec {
         sha256 = "14rm1qr87p7a5prz8g5fwbpxzdp3ighj095x8rvhm8csm20wspyy";
       };
     };
-  ecryptfs_fix_mmap_bug =
-    { name = "ecryptfs_fix_mmap_bug";
-      patch = ./ecryptfs-fix-mmap-bug.patch;
-    };
 }
diff --git a/pkgs/os-specific/linux/kernel/qat_common_Makefile.patch b/pkgs/os-specific/linux/kernel/qat_common_Makefile.patch
deleted file mode 100644
index 2d4476a7fe50..000000000000
--- a/pkgs/os-specific/linux/kernel/qat_common_Makefile.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/drivers/crypto/qat/qat_common/Makefile
-+++ b/drivers/crypto/qat/qat_common/Makefile
-@@ -2,6 +2,7 @@
- 			     $(obj)/qat_rsapubkey-asn1.h
- $(obj)/qat_rsaprivkey-asn1.o: $(obj)/qat_rsaprivkey-asn1.c \
- 			      $(obj)/qat_rsaprivkey-asn1.h
-+$(obj)/qat_asym_algs.o: $(obj)/qat_rsaprivkey-asn1.h $(obj)/qat_rsapubkey-asn1.h
- 
- clean-files += qat_rsapubkey-asn1.c qat_rsapubkey-asn1.h
- clean-files += qat_rsaprivkey-asn1.c qat_rsapvivkey-asn1.h
diff --git a/pkgs/os-specific/linux/microcode/intel.nix b/pkgs/os-specific/linux/microcode/intel.nix
index ea9ff1d58d1a..6fa947fea17a 100644
--- a/pkgs/os-specific/linux/microcode/intel.nix
+++ b/pkgs/os-specific/linux/microcode/intel.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "microcode-intel-${version}";
-  version = "20150121";
+  version = "20160714";
 
   src = fetchurl {
-    url = "http://downloadmirror.intel.com/24661/eng/microcode-${version}.tgz";
-    sha256 = "1cznv3f25cxkwxdc930ab0ifvq0c76fryppadi4p26a2pf9knd93";
+    url = "http://downloadmirror.intel.com/26156/eng/microcode-${version}.tgz";
+    sha256 = "03l4pkymrgbd5y9m5ys7kq85zvckmjbw7xr6pkzg2nr7jgycdagk";
   };
 
   buildInputs = [ libarchive ];
diff --git a/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix b/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix
index 2935990755c6..3d617ece1c00 100644
--- a/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix
+++ b/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix
@@ -15,11 +15,16 @@ stdenv.lib.overrideDerivation systemd (p: {
     make $makeFlags systemd-cryptsetup-generator
   '';
 
+  # For some reason systemd-cryptsetup-generator is a wrapper-script
+  # with the current release of systemd. We want the real one.
+
+  # TODO: Revert 3efadce when the wrapper-script is gone
   installPhase = ''
     mkdir -p $out/lib/systemd/
     cp systemd-cryptsetup $out/lib/systemd/systemd-cryptsetup
+    cp .libs/*.so $out/lib/
 
     mkdir -p $out/lib/systemd/system-generators/
-    cp systemd-cryptsetup-generator $out/lib/systemd/system-generators/systemd-cryptsetup-generator
+    cp .libs/systemd-cryptsetup-generator $out/lib/systemd/system-generators/systemd-cryptsetup-generator
   '';
 })
diff --git a/pkgs/os-specific/linux/uclibc/default.nix b/pkgs/os-specific/linux/uclibc/default.nix
index ab5f149c5125..448c9f3f4ee4 100644
--- a/pkgs/os-specific/linux/uclibc/default.nix
+++ b/pkgs/os-specific/linux/uclibc/default.nix
@@ -104,6 +104,7 @@ stdenv.mkDerivation {
   meta = {
     homepage = http://www.uclibc.org/;
     description = "A small implementation of the C library";
+    maintainers = with stdenv.lib.maintainers; [ rasendubi ];
     license = stdenv.lib.licenses.lgpl2;
     platforms = stdenv.lib.platforms.linux;
   };
diff --git a/pkgs/os-specific/linux/uksmtools/default.nix b/pkgs/os-specific/linux/uksmtools/default.nix
deleted file mode 100644
index 4efc2d42f2be..000000000000
--- a/pkgs/os-specific/linux/uksmtools/default.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ stdenv, fetchgit, cmake }:
-
-stdenv.mkDerivation rec {
-  name = "uksmtools-${version}";
-  version = "2015-09-25";
-
-  # This project uses git submodules, which fetchFromGitHub doesn't support:
-  src = fetchgit {
-    sha256 = "1nj53f24qjp0d87fzrz0y72rmv6lhxyiaqrsbd9v423h5zpmkrnj";
-    rev = "9f59a3a0b494b758aa91d7d8fa04e21b5e6463c0";
-    url = "https://github.com/pfactum/uksmtools.git";
-  };
-
-  nativeBuildInputs = [ cmake ];
-
-  enableParallelBuilding = true;
-
-  doCheck = false;
-
-  meta = with stdenv.lib; {
-    description = "Tools to control Linux UKSM (Ultra Kernel Same-page Merging)";
-    homepage = https://github.com/pfactum/uksmtools/;
-    license = licenses.gpl3Plus;
-    platforms = platforms.linux;
-    maintainers = with maintainers; [ nckx ];
-  };
-}
diff --git a/pkgs/os-specific/linux/wireguard/default.nix b/pkgs/os-specific/linux/wireguard/default.nix
index df94d17012e2..0fda5d6b9d55 100644
--- a/pkgs/os-specific/linux/wireguard/default.nix
+++ b/pkgs/os-specific/linux/wireguard/default.nix
@@ -1,5 +1,8 @@
 { stdenv, fetchgit, libmnl, kernel ? null }:
 
+# module requires Linux >= 4.1 https://www.wireguard.io/install/#kernel-requirements
+assert kernel != null -> stdenv.lib.versionAtLeast kernel.version "4.1";
+
 let
   name = "wireguard-unstable-${version}";
 
diff --git a/pkgs/servers/amqp/rabbitmq-server/default.nix b/pkgs/servers/amqp/rabbitmq-server/default.nix
index 5bf3f2e693e6..7725a7272edd 100644
--- a/pkgs/servers/amqp/rabbitmq-server/default.nix
+++ b/pkgs/servers/amqp/rabbitmq-server/default.nix
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
 
   postInstall =
     ''
-      echo 'PATH=${erlang}/bin:${PATH:+:}$PATH' >> $out/sbin/rabbitmq-env
+      echo 'PATH=${erlang}/bin:''${PATH:+:}$PATH' >> $out/sbin/rabbitmq-env
     ''; # */
 
   meta = {
diff --git a/pkgs/servers/caddy/deps.json b/pkgs/servers/caddy/deps.json
index dfe81f20ba8d..e026c7c63699 100644
--- a/pkgs/servers/caddy/deps.json
+++ b/pkgs/servers/caddy/deps.json
@@ -1,23 +1,146 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/BurntSushi/toml",
-      "github.com/flynn/go-shlex",
-      "github.com/hashicorp/go-syslog",
-      "gopkg.in/yaml.v2",
-      "github.com/xenolf/lego",
-      "golang.org/x/crypto",
-      "gopkg.in/natefinch/lumberjack.v2",
-      "github.com/shurcooL/sanitized_anchor_name",
-      "gopkg.in/square/go-jose.v1",
-      "github.com/mholt/archiver",
-      "github.com/dustin/go-humanize",
-      "github.com/gorilla/websocket",
-      "github.com/jimstudt/http-authentication",
-      "github.com/miekg/dns",
-      "golang.org/x/net",
-      "github.com/russross/blackfriday"
-    ]
-  }
+    {
+        "goPackagePath": "gopkg.in/yaml.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/yaml.v2",
+            "rev": "a83829b6f1293c91addabc89d0571c246397bbf4",
+            "sha256": "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/crypto",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/crypto",
+            "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
+            "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/net",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/net",
+            "rev": "62ac18b461605b4be188bbc7300e9aa2bc836cd4",
+            "sha256": "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p"
+        }
+    },
+    {
+        "goPackagePath": "github.com/gorilla/websocket",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/gorilla/websocket",
+            "rev": "a622679ebd7a3b813862379232f645f8e690e43f",
+            "sha256": "1nc9jbcmgya1i6dmf6sbcqsnxi9hbjg6dz1z0k7zmc6xdwlq0y4q"
+        }
+    },
+    {
+        "goPackagePath": "github.com/miekg/dns",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/miekg/dns",
+            "rev": "7e024ce8ce18b21b475ac6baf8fa3c42536bf2fa",
+            "sha256": "0hlwb52lnnj3c6papjk9i5w5cjdw6r7c891v4xksnfvk1f9cy9kl"
+        }
+    },
+    {
+        "goPackagePath": "github.com/BurntSushi/toml",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/BurntSushi/toml",
+            "rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4",
+            "sha256": "0gkgkw04ndr5y7hrdy0r4v2drs5srwfcw2bs1gyas066hwl84xyw"
+        }
+    },
+    {
+        "goPackagePath": "github.com/hashicorp/go-syslog",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/hashicorp/go-syslog",
+            "rev": "42a2b573b664dbf281bd48c3cc12c086b17a39ba",
+            "sha256": "1j53m2wjyczm9m55znfycdvm4c8vfniqgk93dvzwy8vpj5gm6sb3"
+        }
+    },
+    {
+        "goPackagePath": "github.com/flynn/go-shlex",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/flynn/go-shlex",
+            "rev": "3f9db97f856818214da2e1057f8ad84803971cff",
+            "sha256": "1j743lysygkpa2s2gii2xr32j7bxgc15zv4113b0q9jhn676ysia"
+        }
+    },
+    {
+        "goPackagePath": "github.com/xenolf/lego",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/xenolf/lego",
+            "rev": "ca19a90028e242e878585941c2a27c8f3b3efc25",
+            "sha256": "1zkcsbdzbmfzk3kqmcj9l13li8sz228xhrw2wj3ab4a0w6drbw3x"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/natefinch/lumberjack.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/natefinch/lumberjack.v2",
+            "rev": "514cbda263a734ae8caac038dadf05f8f3f9f738",
+            "sha256": "1v92v8vkip36l2fs6l5dpp655151hrijjc781cif658r8nf7xr82"
+        }
+    },
+    {
+        "goPackagePath": "github.com/shurcooL/sanitized_anchor_name",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/shurcooL/sanitized_anchor_name",
+            "rev": "10ef21a441db47d8b13ebcc5fd2310f636973c77",
+            "sha256": "1cnbzcf47cn796rcjpph1s64qrabhkv5dn9sbynsy7m9zdwr5f01"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/square/go-jose.v1",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/square/go-jose.v1",
+            "rev": "40d457b439244b546f023d056628e5184136899b",
+            "sha256": "0asa1kl1qbx0cyayk44jhxxff0awpkwiw6va7yzrzjzhfc5kvg7p"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mholt/archiver",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mholt/archiver",
+            "rev": "85f054813ed511646b0ce5e047697e0651b8e1a4",
+            "sha256": "0b38mrfm3rwgdi7hrp4gjhf0y0f6bw73qjkfrkafxjrdpdg7nyly"
+        }
+    },
+    {
+        "goPackagePath": "github.com/dustin/go-humanize",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/dustin/go-humanize",
+            "rev": "8929fe90cee4b2cb9deb468b51fb34eba64d1bf0",
+            "sha256": "1g155kxjh6hd3ibx41nbpj6f7h5bh54zgl9dr53xzg2xlxljgjy0"
+        }
+    },
+    {
+        "goPackagePath": "github.com/jimstudt/http-authentication",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/jimstudt/http-authentication",
+            "rev": "3eca13d6893afd7ecabe15f4445f5d2872a1b012",
+            "sha256": "1drw3bhrxpjzwryqz9nq5s0yyjqyd42iym3bh1zjs5qsh401cq08"
+        }
+    },
+    {
+        "goPackagePath": "github.com/russross/blackfriday",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/russross/blackfriday",
+            "rev": "d18b67ae0afd61dae240896eae1785f00709aa31",
+            "sha256": "1l78hz8k1ixry5fjw29834jz1q5ysjcpf6kx2ggjj1s6xh0bfzvf"
+        }
+    }
 ]
diff --git a/pkgs/servers/dico/default.nix b/pkgs/servers/dico/default.nix
index f898034719f3..2078e2e2d42d 100644
--- a/pkgs/servers/dico/default.nix
+++ b/pkgs/servers/dico/default.nix
@@ -1,17 +1,17 @@
 { fetchurl, stdenv, libtool, gettext, zlib, readline, gsasl
-, guile, python, pcre, libffi }:
+, guile, python, pcre, libffi, groff }:
 
 stdenv.mkDerivation rec {
-  name = "dico-2.2";
+  name = "dico-2.3";
 
   src = fetchurl {
     url = "mirror://gnu/dico/${name}.tar.xz";
-    sha256 = "04pjks075x20d19l623mj50bw64g8i41s63z4kzzqcbg9qg96x64";
+    sha256 = "13by0zimx90v2j8v7n4k9y3xwmh4q9jdc2f4f8yjs3x7f5bzm2pk";
   };
 
   # XXX: Add support for GNU SASL.
   buildInputs =
-    [ libtool gettext zlib readline gsasl guile python pcre libffi ];
+    [ libtool gettext zlib readline gsasl guile python pcre libffi groff ];
 
   # dicod fails to load modules, so the tests fail
   doCheck = false;
diff --git a/pkgs/servers/emby/default.nix b/pkgs/servers/emby/default.nix
index c576bcf87369..1cad76bbf203 100644
--- a/pkgs/servers/emby/default.nix
+++ b/pkgs/servers/emby/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "emby-${version}";
-  version = "3.0.6020";
+  version = "3.0.6030";
 
   src = fetchurl {
     url = "https://github.com/MediaBrowser/Emby/archive/${version}.tar.gz";
-    sha256 = "1hpzprhvwwrxjx3qijwvcnjprvx9g58idqnms7d9qql53a20scaq";
+    sha256 = "14fmgb8pwj11n57c1rm002ylwqapdqywbpsv7z6skairbaf6ny09";
   };
 
   propagatedBuildInputs = with pkgs; [
diff --git a/pkgs/servers/etcd/deps.json b/pkgs/servers/etcd/deps.json
index b5977a855515..310f51963f28 100644
--- a/pkgs/servers/etcd/deps.json
+++ b/pkgs/servers/etcd/deps.json
@@ -1,9 +1,20 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/olekukonko/tablewriter",
-      "github.com/mattn/go-runewidth"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/olekukonko/tablewriter",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/olekukonko/tablewriter",
+            "rev": "cca8bbc0798408af109aaaa239cbd2634846b340",
+            "sha256": "0f9ph3z7lh6p6gihbl1461j9yq5qiaqxr9mzdkp512n18v89ml48"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mattn/go-runewidth",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mattn/go-runewidth",
+            "rev": "d6bea18f789704b5f83375793155289da36a3c7f",
+            "sha256": "1hnigpn7rjbwd1ircxkyx9hvi0xmxr32b2jdy2jzw6b3jmcnz1fs"
+        }
+    }
 ]
diff --git a/pkgs/servers/gotty/deps.json b/pkgs/servers/gotty/deps.json
index ff0016df6233..81983165dcd9 100644
--- a/pkgs/servers/gotty/deps.json
+++ b/pkgs/servers/gotty/deps.json
@@ -1,15 +1,74 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/kr/pty",
-      "github.com/braintree/manners",
-      "github.com/codegangsta/cli",
-      "github.com/elazarl/go-bindata-assetfs",
-      "github.com/fatih/structs",
-      "github.com/gorilla/websocket",
-      "github.com/hashicorp/hcl",
-      "github.com/hashicorp/go-multierror"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/gorilla/websocket",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/gorilla/websocket",
+            "rev": "a622679ebd7a3b813862379232f645f8e690e43f",
+            "sha256": "1nc9jbcmgya1i6dmf6sbcqsnxi9hbjg6dz1z0k7zmc6xdwlq0y4q"
+        }
+    },
+    {
+        "goPackagePath": "github.com/kr/pty",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/kr/pty",
+            "rev": "67e2db24c831afa6c64fc17b4a143390674365ef",
+            "sha256": "1l3z3wbb112ar9br44m8g838z0pq2gfxcp5s3ka0xvm1hjvanw2d"
+        }
+    },
+    {
+        "goPackagePath": "github.com/braintree/manners",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/braintree/manners",
+            "rev": "cab36f97339b1925cd89e158632728025557e550",
+            "sha256": "1q508c62iiklghkhwqz9c0zsn9hrij7kqb93gdywzj7ms7x6hlfh"
+        }
+    },
+    {
+        "goPackagePath": "github.com/codegangsta/cli",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/codegangsta/cli",
+            "rev": "71f57d300dd6a780ac1856c005c4b518cfd498ec",
+            "sha256": "1fxznirkvank5461789dm5aw5z8aqi0jvwligvz44659rfl376p3"
+        }
+    },
+    {
+        "goPackagePath": "github.com/elazarl/go-bindata-assetfs",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/elazarl/go-bindata-assetfs",
+            "rev": "d5cac425555ca5cf00694df246e04f05e6a55150",
+            "sha256": "636ce247ff6f85c14f38a421f46662fa77bdc29762692e1f72b3cd1f9d7a1d17"
+        }
+    },
+    {
+        "goPackagePath": "github.com/fatih/structs",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/fatih/structs",
+            "rev": "a9f7daa9c2729e97450c2da2feda19130a367d8f",
+            "sha256": "0pyrc7svc826g37al3db19n5l4r2m9h1mlhjh3hz2r41xfaqia50"
+        }
+    },
+    {
+        "goPackagePath": "github.com/hashicorp/hcl",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/hashicorp/hcl",
+            "rev": "54864211433d45cb780682431585b3e573b49e4a",
+            "sha256": "07l2dydzjpdgm2d4a72hkmincn455j3nrafg6hs3c23bkvizj950"
+        }
+    },
+    {
+        "goPackagePath": "github.com/hashicorp/go-multierror",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/hashicorp/go-multierror",
+            "rev": "56912fb08d85084aa318edcf2bba735b97cf35c5",
+            "sha256": "0s01cqdab2f7fxkkjjk2wqx05a1shnwlvfn45h2pi3i4gapvcn0r"
+        }
+    }
 ]
diff --git a/pkgs/servers/http/nginx/mainline.nix b/pkgs/servers/http/nginx/mainline.nix
index 6e4c49abc5ba..3991e2b99d5e 100644
--- a/pkgs/servers/http/nginx/mainline.nix
+++ b/pkgs/servers/http/nginx/mainline.nix
@@ -1,6 +1,6 @@
 { callPackage, ... }@args:
 
 callPackage ./generic.nix (args // {
-  version = "1.11.2";
-  sha256 = "02khwad28ar2jjdfssysx262bgwgirm9967gnfhw9ga7wvipncm0";
+  version = "1.11.3";
+  sha256 = "042689m88bjhf7gsly4kl4gjyqdabcnizshxvdlp14gkz507yrja";
 })
diff --git a/pkgs/servers/interlock/deps.json b/pkgs/servers/interlock/deps.json
index a501a3087d7b..10bb3106c5c3 100644
--- a/pkgs/servers/interlock/deps.json
+++ b/pkgs/servers/interlock/deps.json
@@ -1,14 +1,65 @@
 [
-  {
-    "include": "../../../go-modules/libs.json",
-    "packages": [
-      "github.com/Sirupsen/logrus",
-      "github.com/agl/ed25519",
-      "github.com/golang/protobuf",
-      "github.com/janimo/textsecure",
-      "golang.org/x/crypto",
-      "golang.org/x/net",
-      "gopkg.in/yaml.v2"
-    ]
-  }
+    {
+        "goPackagePath": "gopkg.in/yaml.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/yaml.v2",
+            "rev": "a83829b6f1293c91addabc89d0571c246397bbf4",
+            "sha256": "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/crypto",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/crypto",
+            "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
+            "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/Sirupsen/logrus",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/Sirupsen/logrus",
+            "rev": "be52937128b38f1d99787bb476c789e2af1147f1",
+            "sha256": "1m6vvd4pg4lwglhk54lv5mf6cc8h7bi0d9zb3gar4crz531r66y4"
+        }
+    },
+    {
+        "goPackagePath": "github.com/agl/ed25519",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/agl/ed25519",
+            "rev": "278e1ec8e8a6e017cd07577924d6766039146ced",
+            "sha256": "165d89cc6dl28j4hkn86pny0jz3sa6hamzdvpvwdj4iha3x6lzc9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/janimo/textsecure",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/janimo/textsecure",
+            "rev": "c38f429e48d6b2776d17b4171f216f132185b0f6",
+            "sha256": "191pwgfgphr0x04dwpvniax4wilpv52l25bw7d3igvnw302y7i94"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/net",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/net",
+            "rev": "62ac18b461605b4be188bbc7300e9aa2bc836cd4",
+            "sha256": "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p"
+        }
+    }
 ]
diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix
index 96f874139d51..b228ab826098 100644
--- a/pkgs/servers/matrix-synapse/default.nix
+++ b/pkgs/servers/matrix-synapse/default.nix
@@ -12,13 +12,13 @@ let
 in
 buildPythonApplication rec {
   name = "matrix-synapse-${version}";
-  version = "0.16.1-r1";
+  version = "0.17.0";
 
   src = fetchFromGitHub {
     owner = "matrix-org";
     repo = "synapse";
     rev = "v${version}";
-    sha256 = "0flgaa26j9gga9a9h67b0q3yi0mpnbrjik55220cvvzhy9fnvwa9";
+    sha256 = "0rkaadc1vkg6p3d91yid2y6a0l7drbvpkqa8v7f50gpcbdzn1l93";
   };
 
   patches = [ ./matrix-synapse.patch ];
@@ -28,6 +28,7 @@ buildPythonApplication rec {
     pydenticon pymacaroons-pynacl pynacl pyopenssl pysaml2 pytz requests2
     service-identity signedjson systemd twisted ujson unpaddedbase64 pyyaml
     matrix-angular-sdk bleach netaddr jinja2 psycopg2 python.modules.curses
+    ldap3 psutil
   ];
 
   # Checks fail because of Tox.
diff --git a/pkgs/servers/mesos-dns/deps.json b/pkgs/servers/mesos-dns/deps.json
index 8ac9d7058413..4df002888c42 100644
--- a/pkgs/servers/mesos-dns/deps.json
+++ b/pkgs/servers/mesos-dns/deps.json
@@ -1,18 +1,101 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/gogo/protobuf",
-      "github.com/golang/glog",
-      "github.com/mesos/mesos-go",
-      "github.com/pmezard/go-difflib",
-      "github.com/samuel/go-zookeeper",
-      "github.com/stretchr/objx",
-      "github.com/davecgh/go-spew",
-      "github.com/emicklei/go-restful",
-      "github.com/stretchr/testify",
-      "github.com/miekg/dns",
-      "golang.org/x/net"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/net",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/net",
+            "rev": "62ac18b461605b4be188bbc7300e9aa2bc836cd4",
+            "sha256": "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p"
+        }
+    },
+    {
+        "goPackagePath": "github.com/miekg/dns",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/miekg/dns",
+            "rev": "7e024ce8ce18b21b475ac6baf8fa3c42536bf2fa",
+            "sha256": "0hlwb52lnnj3c6papjk9i5w5cjdw6r7c891v4xksnfvk1f9cy9kl"
+        }
+    },
+    {
+        "goPackagePath": "github.com/gogo/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/gogo/protobuf",
+            "rev": "7883e1468d48d969e1c3ce4bcde89b6a7dd4adc4",
+            "sha256": "16ja7lqq96q0pnzgnbwnh0j8qzvqgns1nfk8ndxgkg4sg93bg372"
+        }
+    },
+    {
+        "goPackagePath": "github.com/golang/glog",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/glog",
+            "rev": "fca8c8854093a154ff1eb580aae10276ad6b1b5f",
+            "sha256": "1nr2q0vas0a2f395f4shjxqpas18mjsf8yhgndsav7svngpbbpg8"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mesos/mesos-go",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mesos/mesos-go",
+            "rev": "aaa5b2fecf0e2db463f4f996c89617d6766b2969",
+            "sha256": "1pk1fpxksjln6kqvgm1igw3582jgrn14fwa8bdj5cwbpy6skjdvk"
+        }
+    },
+    {
+        "goPackagePath": "github.com/pmezard/go-difflib",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/pmezard/go-difflib",
+            "rev": "d8ed2627bdf02c080bf22230dbb337003b7aba2d",
+            "sha256": "0w1jp4k4zbnrxh3jvh8fgbjgqpf2hg31pbj8fb32kh26px9ldpbs"
+        }
+    },
+    {
+        "goPackagePath": "github.com/samuel/go-zookeeper",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/samuel/go-zookeeper",
+            "rev": "5bb5cfc093ad18a28148c578f8632cfdb4d802e4",
+            "sha256": "1kpx1ymh7rds0b2km291idnyqi0zck74nd8hnk72crgz7wmpqv6z"
+        }
+    },
+    {
+        "goPackagePath": "github.com/stretchr/objx",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/stretchr/objx",
+            "rev": "cbeaeb16a013161a98496fad62933b1d21786672",
+            "sha256": "1xn7iibjik77h6h0jilfvcjkkzaqz45baf44p3rb2i03hbmkqkp1"
+        }
+    },
+    {
+        "goPackagePath": "github.com/davecgh/go-spew",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/davecgh/go-spew",
+            "rev": "5215b55f46b2b919f50a1df0eaa5886afe4e3b3d",
+            "sha256": "15h9kl73rdbzlfmsdxp13jja5gs7sknvqkpq2qizq3qv3nr1x8dk"
+        }
+    },
+    {
+        "goPackagePath": "github.com/emicklei/go-restful",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/emicklei/go-restful",
+            "rev": "892402ba11a2e2fd5e1295dd633481f27365f14d",
+            "sha256": "0gr9f53vayc6501a1kaw4p3h9pgf376cgxsfnr3f2dvp0xacvw8x"
+        }
+    },
+    {
+        "goPackagePath": "github.com/stretchr/testify",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/stretchr/testify",
+            "rev": "089c7181b8c728499929ff09b62d3fdd8df8adff",
+            "sha256": "03dzxkxbs298pvfsjz4kdadfaf9jkzsdhshqmg4p12wbyaj09s4p"
+        }
+    }
 ]
diff --git a/pkgs/servers/monitoring/prometheus/cli_deps.json b/pkgs/servers/monitoring/prometheus/cli_deps.json
index 506263b51f24..57384dba31c5 100644
--- a/pkgs/servers/monitoring/prometheus/cli_deps.json
+++ b/pkgs/servers/monitoring/prometheus/cli_deps.json
@@ -1,8 +1,11 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/prometheus/client_golang"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/prometheus/client_golang",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_golang",
+            "rev": "6dbab8106ed3ed77359ac85d9cf08e30290df864",
+            "sha256": "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"
+        }
+    }
 ]
diff --git a/pkgs/servers/monitoring/prometheus/collectd-exporter_deps.json b/pkgs/servers/monitoring/prometheus/collectd-exporter_deps.json
index ea82d4900ff2..1ff93e411f86 100644
--- a/pkgs/servers/monitoring/prometheus/collectd-exporter_deps.json
+++ b/pkgs/servers/monitoring/prometheus/collectd-exporter_deps.json
@@ -1,14 +1,65 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/prometheus/client_golang",
-      "github.com/prometheus/client_model",
-      "github.com/prometheus/procfs",
-      "bitbucket.org/ww/goautoneg",
-      "github.com/beorn7/perks",
-      "github.com/golang/protobuf",
-      "github.com/matttproud/golang_protobuf_extensions"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_model",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_model",
+            "rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6",
+            "sha256": "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/beorn7/perks",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/beorn7/perks",
+            "rev": "b965b613227fddccbfffe13eae360ed3fa822f8d",
+            "sha256": "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk"
+        }
+    },
+    {
+        "goPackagePath": "github.com/matttproud/golang_protobuf_extensions",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/matttproud/golang_protobuf_extensions",
+            "rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a",
+            "sha256": "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_golang",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_golang",
+            "rev": "6dbab8106ed3ed77359ac85d9cf08e30290df864",
+            "sha256": "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/procfs",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/procfs",
+            "rev": "c91d8eefde16bd047416409eb56353ea84a186e4",
+            "sha256": "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"
+        }
+    },
+    {
+        "goPackagePath": "bitbucket.org/ww/goautoneg",
+        "fetch": {
+            "type": "hg",
+            "url": "bitbucket.org/ww/goautoneg",
+            "rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675",
+            "sha256": "19khhn5xhqv1yp7d6k987gh5w5rhrjnp4p0c6fyrd8z6lzz5h9qi"
+        }
+    }
 ]
diff --git a/pkgs/servers/monitoring/prometheus/haproxy-exporter_deps.json b/pkgs/servers/monitoring/prometheus/haproxy-exporter_deps.json
index 20a46eb370cf..1ff93e411f86 100644
--- a/pkgs/servers/monitoring/prometheus/haproxy-exporter_deps.json
+++ b/pkgs/servers/monitoring/prometheus/haproxy-exporter_deps.json
@@ -1,14 +1,65 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/prometheus/client_golang",
-      "github.com/prometheus/client_model",
-      "github.com/matttproud/golang_protobuf_extensions",
-      "github.com/prometheus/procfs",
-      "github.com/beorn7/perks",
-      "github.com/golang/protobuf",
-      "bitbucket.org/ww/goautoneg"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_model",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_model",
+            "rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6",
+            "sha256": "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/beorn7/perks",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/beorn7/perks",
+            "rev": "b965b613227fddccbfffe13eae360ed3fa822f8d",
+            "sha256": "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk"
+        }
+    },
+    {
+        "goPackagePath": "github.com/matttproud/golang_protobuf_extensions",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/matttproud/golang_protobuf_extensions",
+            "rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a",
+            "sha256": "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_golang",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_golang",
+            "rev": "6dbab8106ed3ed77359ac85d9cf08e30290df864",
+            "sha256": "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/procfs",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/procfs",
+            "rev": "c91d8eefde16bd047416409eb56353ea84a186e4",
+            "sha256": "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"
+        }
+    },
+    {
+        "goPackagePath": "bitbucket.org/ww/goautoneg",
+        "fetch": {
+            "type": "hg",
+            "url": "bitbucket.org/ww/goautoneg",
+            "rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675",
+            "sha256": "19khhn5xhqv1yp7d6k987gh5w5rhrjnp4p0c6fyrd8z6lzz5h9qi"
+        }
+    }
 ]
diff --git a/pkgs/servers/monitoring/prometheus/mesos-exporter_deps.json b/pkgs/servers/monitoring/prometheus/mesos-exporter_deps.json
index c250fb0495ee..a0b80e0ff146 100644
--- a/pkgs/servers/monitoring/prometheus/mesos-exporter_deps.json
+++ b/pkgs/servers/monitoring/prometheus/mesos-exporter_deps.json
@@ -1,16 +1,83 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/golang/glog",
-      "github.com/prometheus/client_golang",
-      "github.com/prometheus/client_model",
-      "github.com/antonlindstrom/mesos_stats",
-      "github.com/beorn7/perks",
-      "github.com/golang/protobuf",
-      "github.com/matttproud/golang_protobuf_extensions",
-      "github.com/prometheus/procfs",
-      "bitbucket.org/ww/goautoneg"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_model",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_model",
+            "rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6",
+            "sha256": "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/beorn7/perks",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/beorn7/perks",
+            "rev": "b965b613227fddccbfffe13eae360ed3fa822f8d",
+            "sha256": "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk"
+        }
+    },
+    {
+        "goPackagePath": "github.com/matttproud/golang_protobuf_extensions",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/matttproud/golang_protobuf_extensions",
+            "rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a",
+            "sha256": "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_golang",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_golang",
+            "rev": "6dbab8106ed3ed77359ac85d9cf08e30290df864",
+            "sha256": "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/procfs",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/procfs",
+            "rev": "c91d8eefde16bd047416409eb56353ea84a186e4",
+            "sha256": "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"
+        }
+    },
+    {
+        "goPackagePath": "github.com/golang/glog",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/glog",
+            "rev": "fca8c8854093a154ff1eb580aae10276ad6b1b5f",
+            "sha256": "1nr2q0vas0a2f395f4shjxqpas18mjsf8yhgndsav7svngpbbpg8"
+        }
+    },
+    {
+        "goPackagePath": "bitbucket.org/ww/goautoneg",
+        "fetch": {
+            "type": "hg",
+            "url": "bitbucket.org/ww/goautoneg",
+            "rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675",
+            "sha256": "19khhn5xhqv1yp7d6k987gh5w5rhrjnp4p0c6fyrd8z6lzz5h9qi"
+        }
+    },
+    {
+        "goPackagePath": "github.com/antonlindstrom/mesos_stats",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/antonlindstrom/mesos_stats",
+            "rev": "0c6ea494c19bedc67ebb85ce3d187ec21050e920",
+            "sha256": "18ggyjf4nyn77gkn16wg9krp4dsphgzdgcr3mdflv6mvbr482ar4"
+        }
+    }
 ]
diff --git a/pkgs/servers/monitoring/prometheus/mysqld-exporter_deps.json b/pkgs/servers/monitoring/prometheus/mysqld-exporter_deps.json
index 42e2f263c53b..77d4c301bf84 100644
--- a/pkgs/servers/monitoring/prometheus/mysqld-exporter_deps.json
+++ b/pkgs/servers/monitoring/prometheus/mysqld-exporter_deps.json
@@ -1,15 +1,74 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/prometheus/client_golang",
-      "github.com/prometheus/client_model",
-      "github.com/matttproud/golang_protobuf_extensions",
-      "github.com/prometheus/procfs",
-      "github.com/beorn7/perks",
-      "github.com/golang/protobuf",
-      "bitbucket.org/ww/goautoneg",
-      "github.com/go-sql-driver/mysql"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_model",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_model",
+            "rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6",
+            "sha256": "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/beorn7/perks",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/beorn7/perks",
+            "rev": "b965b613227fddccbfffe13eae360ed3fa822f8d",
+            "sha256": "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk"
+        }
+    },
+    {
+        "goPackagePath": "github.com/matttproud/golang_protobuf_extensions",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/matttproud/golang_protobuf_extensions",
+            "rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a",
+            "sha256": "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_golang",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_golang",
+            "rev": "6dbab8106ed3ed77359ac85d9cf08e30290df864",
+            "sha256": "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/procfs",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/procfs",
+            "rev": "c91d8eefde16bd047416409eb56353ea84a186e4",
+            "sha256": "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"
+        }
+    },
+    {
+        "goPackagePath": "bitbucket.org/ww/goautoneg",
+        "fetch": {
+            "type": "hg",
+            "url": "bitbucket.org/ww/goautoneg",
+            "rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675",
+            "sha256": "19khhn5xhqv1yp7d6k987gh5w5rhrjnp4p0c6fyrd8z6lzz5h9qi"
+        }
+    },
+    {
+        "goPackagePath": "github.com/go-sql-driver/mysql",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/go-sql-driver/mysql",
+            "rev": "fb7299726d2e68745a8805b14f2ff44b5c2cfa84",
+            "sha256": "185af0x475hq2wmm2zdvxjyslkplf8zzqijdxa937zqxq63qiw4w"
+        }
+    }
 ]
diff --git a/pkgs/servers/monitoring/prometheus/nginx-exporter_deps.json b/pkgs/servers/monitoring/prometheus/nginx-exporter_deps.json
index c7a2b3d1f6c6..2a86511ef995 100644
--- a/pkgs/servers/monitoring/prometheus/nginx-exporter_deps.json
+++ b/pkgs/servers/monitoring/prometheus/nginx-exporter_deps.json
@@ -1,16 +1,83 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/prometheus/log",
-      "github.com/prometheus/client_golang",
-      "github.com/prometheus/client_model",
-      "github.com/prometheus/procfs",
-      "github.com/Sirupsen/logrus",
-      "github.com/beorn7/perks",
-      "github.com/golang/protobuf",
-      "github.com/matttproud/golang_protobuf_extensions",
-      "bitbucket.org/ww/goautoneg"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/Sirupsen/logrus",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/Sirupsen/logrus",
+            "rev": "be52937128b38f1d99787bb476c789e2af1147f1",
+            "sha256": "1m6vvd4pg4lwglhk54lv5mf6cc8h7bi0d9zb3gar4crz531r66y4"
+        }
+    },
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_model",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_model",
+            "rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6",
+            "sha256": "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/beorn7/perks",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/beorn7/perks",
+            "rev": "b965b613227fddccbfffe13eae360ed3fa822f8d",
+            "sha256": "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk"
+        }
+    },
+    {
+        "goPackagePath": "github.com/matttproud/golang_protobuf_extensions",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/matttproud/golang_protobuf_extensions",
+            "rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a",
+            "sha256": "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_golang",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_golang",
+            "rev": "6dbab8106ed3ed77359ac85d9cf08e30290df864",
+            "sha256": "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/procfs",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/procfs",
+            "rev": "c91d8eefde16bd047416409eb56353ea84a186e4",
+            "sha256": "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"
+        }
+    },
+    {
+        "goPackagePath": "bitbucket.org/ww/goautoneg",
+        "fetch": {
+            "type": "hg",
+            "url": "bitbucket.org/ww/goautoneg",
+            "rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675",
+            "sha256": "19khhn5xhqv1yp7d6k987gh5w5rhrjnp4p0c6fyrd8z6lzz5h9qi"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/log",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/log",
+            "rev": "439e5db48fbb50ebbaf2c816030473a62f505f55",
+            "sha256": "1fl23gsw2hn3c1y91qckr661sybqcw2gqnd1gllxn3hp6p2w6hxv"
+        }
+    }
 ]
diff --git a/pkgs/servers/monitoring/prometheus/prom2json_deps.json b/pkgs/servers/monitoring/prometheus/prom2json_deps.json
index a8569d8a25f8..b716d41b2c12 100644
--- a/pkgs/servers/monitoring/prometheus/prom2json_deps.json
+++ b/pkgs/servers/monitoring/prometheus/prom2json_deps.json
@@ -1,11 +1,38 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/golang/protobuf",
-      "github.com/matttproud/golang_protobuf_extensions",
-      "github.com/prometheus/client_golang",
-      "github.com/prometheus/client_model"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_model",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_model",
+            "rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6",
+            "sha256": "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/matttproud/golang_protobuf_extensions",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/matttproud/golang_protobuf_extensions",
+            "rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a",
+            "sha256": "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_golang",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_golang",
+            "rev": "6dbab8106ed3ed77359ac85d9cf08e30290df864",
+            "sha256": "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"
+        }
+    }
 ]
diff --git a/pkgs/servers/monitoring/prometheus/pushgateway_deps.json b/pkgs/servers/monitoring/prometheus/pushgateway_deps.json
index 15e2815e0e2f..c5ece41a52eb 100644
--- a/pkgs/servers/monitoring/prometheus/pushgateway_deps.json
+++ b/pkgs/servers/monitoring/prometheus/pushgateway_deps.json
@@ -1,15 +1,74 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/julienschmidt/httprouter",
-      "github.com/prometheus/client_golang",
-      "github.com/prometheus/client_model",
-      "bitbucket.org/ww/goautoneg",
-      "github.com/golang/protobuf",
-      "github.com/matttproud/golang_protobuf_extensions",
-      "github.com/prometheus/procfs",
-      "github.com/beorn7/perks"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_model",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_model",
+            "rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6",
+            "sha256": "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/beorn7/perks",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/beorn7/perks",
+            "rev": "b965b613227fddccbfffe13eae360ed3fa822f8d",
+            "sha256": "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk"
+        }
+    },
+    {
+        "goPackagePath": "github.com/matttproud/golang_protobuf_extensions",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/matttproud/golang_protobuf_extensions",
+            "rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a",
+            "sha256": "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_golang",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_golang",
+            "rev": "6dbab8106ed3ed77359ac85d9cf08e30290df864",
+            "sha256": "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/procfs",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/procfs",
+            "rev": "c91d8eefde16bd047416409eb56353ea84a186e4",
+            "sha256": "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"
+        }
+    },
+    {
+        "goPackagePath": "bitbucket.org/ww/goautoneg",
+        "fetch": {
+            "type": "hg",
+            "url": "bitbucket.org/ww/goautoneg",
+            "rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675",
+            "sha256": "19khhn5xhqv1yp7d6k987gh5w5rhrjnp4p0c6fyrd8z6lzz5h9qi"
+        }
+    },
+    {
+        "goPackagePath": "github.com/julienschmidt/httprouter",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/julienschmidt/httprouter",
+            "rev": "6aacfd5ab513e34f7e64ea9627ab9670371b34e7",
+            "sha256": "00rrjysmq898qcrf2hfwfh9s70vwvmjx2kp5w03nz1krxa4zhrkl"
+        }
+    }
 ]
diff --git a/pkgs/servers/monitoring/prometheus/statsd-bridge_deps.json b/pkgs/servers/monitoring/prometheus/statsd-bridge_deps.json
index cda65257317d..4c0bc142c883 100644
--- a/pkgs/servers/monitoring/prometheus/statsd-bridge_deps.json
+++ b/pkgs/servers/monitoring/prometheus/statsd-bridge_deps.json
@@ -1,15 +1,74 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/howeyc/fsnotify",
-      "github.com/prometheus/client_golang",
-      "github.com/prometheus/client_model",
-      "bitbucket.org/ww/goautoneg",
-      "github.com/beorn7/perks",
-      "github.com/golang/protobuf",
-      "github.com/matttproud/golang_protobuf_extensions",
-      "github.com/prometheus/procfs"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_model",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_model",
+            "rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6",
+            "sha256": "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/beorn7/perks",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/beorn7/perks",
+            "rev": "b965b613227fddccbfffe13eae360ed3fa822f8d",
+            "sha256": "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk"
+        }
+    },
+    {
+        "goPackagePath": "github.com/matttproud/golang_protobuf_extensions",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/matttproud/golang_protobuf_extensions",
+            "rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a",
+            "sha256": "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_golang",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_golang",
+            "rev": "6dbab8106ed3ed77359ac85d9cf08e30290df864",
+            "sha256": "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/procfs",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/procfs",
+            "rev": "c91d8eefde16bd047416409eb56353ea84a186e4",
+            "sha256": "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"
+        }
+    },
+    {
+        "goPackagePath": "bitbucket.org/ww/goautoneg",
+        "fetch": {
+            "type": "hg",
+            "url": "bitbucket.org/ww/goautoneg",
+            "rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675",
+            "sha256": "19khhn5xhqv1yp7d6k987gh5w5rhrjnp4p0c6fyrd8z6lzz5h9qi"
+        }
+    },
+    {
+        "goPackagePath": "github.com/howeyc/fsnotify",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/fsnotify/fsnotify",
+            "rev": "ea925a0a47d225b2ca7f9932b01d2ed4f3ec74f6",
+            "sha256": "15wqjpkfzsxnaxbz6y4r91hw6812g3sc4ipagxw1bya9klbnkdc9"
+        }
+    }
 ]
diff --git a/pkgs/servers/nosql/cassandra/1.2.nix b/pkgs/servers/nosql/cassandra/1.2.nix
index 8380a21b2cac..87cb4a11f9ab 100644
--- a/pkgs/servers/nosql/cassandra/1.2.nix
+++ b/pkgs/servers/nosql/cassandra/1.2.nix
@@ -1,52 +1,6 @@
-{ stdenv
-, fetchurl
-, jre
-, python
-, makeWrapper
-, gawk
-, bash
-, getopt
-, procps
-}:
-
-let
+{ callPackage, ... } @ args:
 
+callPackage ./generic.nix (args // {
   version = "1.2.19";
   sha256 = "0zkq3ggpk8ra2siar43vmrn6lmvn902p1g2lrgb46ak1vii6w30w";
-
-in
-
-stdenv.mkDerivation rec {
-  name = "cassandra-${version}";
-
-  src = fetchurl {
-    inherit sha256;
-    url = "mirror://apache/cassandra/${version}/apache-${name}-bin.tar.gz";
-  };
-
-  nativeBuildInputs = [ makeWrapper ];
-
-  installPhase = ''
-    mkdir $out
-    mv * $out
-
-    for cmd in cassandra nodetool sstablekeys sstableloader sstableupgrade
-      do wrapProgram $out/bin/$cmd \
-        --set JAVA_HOME ${jre} \
-        --prefix PATH : ${bash}/bin \
-        --prefix PATH : ${getopt}/bin \
-        --prefix PATH : ${gawk}/bin \
-        --prefix PATH : ${procps}/bin
-    done
-
-    wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
-    '';
-
-  meta = with stdenv.lib; {
-    homepage = http://cassandra.apache.org/;
-    description = "A massively scalable open source NoSQL database";
-    platforms = platforms.all;
-    license = licenses.asl20;
-    maintainers = with maintainers; [ bcarrell ];
-  };
-}
+})
diff --git a/pkgs/servers/nosql/cassandra/2.0.nix b/pkgs/servers/nosql/cassandra/2.0.nix
index 026ae476691d..68bee0c124ba 100644
--- a/pkgs/servers/nosql/cassandra/2.0.nix
+++ b/pkgs/servers/nosql/cassandra/2.0.nix
@@ -1,52 +1,6 @@
-{ stdenv
-, fetchurl
-, jre
-, python
-, makeWrapper
-, gawk
-, bash
-, getopt
-, procps
-}:
-
-let
+{ callPackage, ... } @ args:
 
+callPackage ./generic.nix (args // {
   version = "2.0.16";
   sha256 = "1fpvgmakmxy1lnygccpc32q53pa36bwy0lqdvb6hsifkxymdw8y5";
-
-in
-
-stdenv.mkDerivation rec {
-  name = "cassandra-${version}";
-
-  src = fetchurl {
-    inherit sha256;
-    url = "mirror://apache/cassandra/${version}/apache-${name}-bin.tar.gz";
-  };
-
-  nativeBuildInputs = [ makeWrapper ];
-
-  installPhase = ''
-    mkdir $out
-    mv * $out
-
-    for cmd in cassandra nodetool sstablekeys sstableloader sstableupgrade
-      do wrapProgram $out/bin/$cmd \
-        --set JAVA_HOME ${jre} \
-        --prefix PATH : ${bash}/bin \
-        --prefix PATH : ${getopt}/bin \
-        --prefix PATH : ${gawk}/bin \
-        --prefix PATH : ${procps}/bin
-    done
-
-    wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
-    '';
-
-  meta = with stdenv.lib; {
-    homepage = http://cassandra.apache.org/;
-    description = "A massively scalable open source NoSQL database";
-    platforms = platforms.all;
-    license = licenses.asl20;
-    maintainers = with maintainers; [ nckx rushmorem ];
-  };
-}
+})
diff --git a/pkgs/servers/nosql/cassandra/2.1.nix b/pkgs/servers/nosql/cassandra/2.1.nix
index 5e9a57bfe55b..3514ae84350d 100644
--- a/pkgs/servers/nosql/cassandra/2.1.nix
+++ b/pkgs/servers/nosql/cassandra/2.1.nix
@@ -1,52 +1,6 @@
-{ stdenv
-, fetchurl
-, jre
-, python
-, makeWrapper
-, gawk
-, bash
-, getopt
-, procps
-}:
-
-let
+{ callPackage, ... } @ args:
 
+callPackage ./generic.nix (args // {
   version = "2.1.15";
   sha256 = "1yc6r4gmxz9c4zghzn6bz5wswz7dz61w7p4x9s5gqnixfp2mlapp";
-
-in
-
-stdenv.mkDerivation rec {
-  name = "cassandra-${version}";
-
-  src = fetchurl {
-    inherit sha256;
-    url = "mirror://apache/cassandra/${version}/apache-${name}-bin.tar.gz";
-  };
-
-  nativeBuildInputs = [ makeWrapper ];
-
-  installPhase = ''
-    mkdir $out
-    mv * $out
-
-    for cmd in cassandra nodetool sstablekeys sstableloader sstableupgrade
-      do wrapProgram $out/bin/$cmd \
-        --set JAVA_HOME ${jre} \
-        --prefix PATH : ${bash}/bin \
-        --prefix PATH : ${getopt}/bin \
-        --prefix PATH : ${gawk}/bin \
-        --prefix PATH : ${procps}/bin
-    done
-
-    wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
-    '';
-
-  meta = with stdenv.lib; {
-    homepage = http://cassandra.apache.org/;
-    description = "A massively scalable open source NoSQL database";
-    platforms = platforms.all;
-    license = licenses.asl20;
-    maintainers = with maintainers; [ nckx rushmorem ];
-  };
-}
+})
diff --git a/pkgs/servers/nosql/cassandra/3.0.nix b/pkgs/servers/nosql/cassandra/3.0.nix
index 68c2815ddd3b..b0975c7a93c0 100644
--- a/pkgs/servers/nosql/cassandra/3.0.nix
+++ b/pkgs/servers/nosql/cassandra/3.0.nix
@@ -1,49 +1,6 @@
-{ stdenv
-, fetchurl
-, jre
-, python
-, makeWrapper
-, gawk
-, bash
-, getopt
-, procps
-}:
-
-let
+{ callPackage, ... } @ args:
 
+callPackage ./generic.nix (args // {
   version = "3.0.8";
   sha256 = "02chk8q3pbl0y6rijfk2gbd0p1ani8daypsx9m9ingqkdx8ajljq";
-
-in
-
-stdenv.mkDerivation rec {
-  name = "cassandra-${version}";
-
-  src = fetchurl {
-    inherit sha256;
-    url = "mirror://apache/cassandra/${version}/apache-${name}-bin.tar.gz";
-  };
-
-  nativeBuildInputs = [ makeWrapper ];
-
-  installPhase = ''
-    mkdir $out
-    mv * $out
-
-    for cmd in cassandra nodetool sstableloader sstableupgrade
-      do wrapProgram $out/bin/$cmd \
-        --set JAVA_HOME ${jre} \
-        --prefix PATH : ${stdenv.lib.makeBinPath [ bash getopt gawk procps ]}
-    done
-
-    wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
-    '';
-
-  meta = with stdenv.lib; {
-    homepage = http://cassandra.apache.org/;
-    description = "A massively scalable open source NoSQL database";
-    platforms = platforms.all;
-    license = licenses.asl20;
-    maintainers = with maintainers; [ nckx rushmorem ];
-  };
-}
+})
diff --git a/pkgs/servers/nosql/cassandra/generic.nix b/pkgs/servers/nosql/cassandra/generic.nix
new file mode 100644
index 000000000000..5e364ba3e689
--- /dev/null
+++ b/pkgs/servers/nosql/cassandra/generic.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchurl, python, makeWrapper, gawk, bash, getopt, procps
+, which, jre, version, sha256, ...
+}:
+
+let
+  libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ];
+  binPath = stdenv.lib.makeBinPath [ bash getopt gawk procps which jre ];
+in
+
+stdenv.mkDerivation rec {
+  name = "cassandra-${version}";
+
+  src = fetchurl {
+    inherit sha256;
+    url = "mirror://apache/cassandra/${version}/apache-${name}-bin.tar.gz";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir $out
+    mv * $out
+    for cmd in bin/cassandra bin/nodetool bin/sstablekeys \
+      bin/sstableloader bin/sstableupgrade \
+      tools/bin/cassandra-stress tools/bin/cassandra-stressd \
+      tools/bin/sstablemetadata tools/bin/sstableofflinerelevel \
+      tools/bin/token-generator tools/bin/sstablelevelreset; do
+
+      # check if file exists because some bin tools don't exist across all
+      # cassandra versions
+      if [ -f $out/$cmd ]; then
+        wrapProgram $out/$cmd \
+          --suffix-each LD_LIBRARY_PATH : ${libPath} \
+          --prefix PATH : ${binPath} \
+          --set JAVA_HOME ${jre}
+      fi
+    done
+
+    wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
+    '';
+
+  meta = with stdenv.lib; {
+    homepage = http://cassandra.apache.org/;
+    description = "A massively scalable open source NoSQL database";
+    platforms = platforms.linux;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ nckx rushmorem cransom ];
+  };
+}
diff --git a/pkgs/servers/nsq/deps.json b/pkgs/servers/nsq/deps.json
index e23d3e15f669..c6a8392d9197 100644
--- a/pkgs/servers/nsq/deps.json
+++ b/pkgs/servers/nsq/deps.json
@@ -1,16 +1,83 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/mreiferson/go-snappystream",
-      "github.com/bitly/go-nsq",
-      "github.com/bitly/go-simplejson",
-      "github.com/blang/semver",
-      "github.com/bmizerany/perks",
-      "github.com/BurntSushi/toml",
-      "github.com/bitly/go-hostpool",
-      "github.com/bitly/timer_metrics",
-      "github.com/mreiferson/go-options"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/mreiferson/go-snappystream",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mreiferson/go-snappystream",
+            "rev": "028eae7ab5c4c9e2d1cb4c4ca1e53259bbe7e504",
+            "sha256": "0jdd5whp74nvg35d9hzydsi3shnb1vrnd7shi9qz4wxap7gcrid6"
+        }
+    },
+    {
+        "goPackagePath": "github.com/bitly/go-nsq",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/bitly/go-nsq",
+            "rev": "22a8bd48c443ec23bb559675b6df8284bbbdab29",
+            "sha256": "06hrkwk84w8rshkanvfgmgbiml7n06ybv192dvibhwgk2wz2dl46"
+        }
+    },
+    {
+        "goPackagePath": "github.com/bitly/go-simplejson",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/bitly/go-simplejson",
+            "rev": "18db6e68d8fd9cbf2e8ebe4c81a78b96fd9bf05a",
+            "sha256": "0lj9cxyncchlw6p35j0yym5q5waiz0giw6ri41qdwm8y3dghwwiy"
+        }
+    },
+    {
+        "goPackagePath": "github.com/blang/semver",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/blang/semver",
+            "rev": "9bf7bff48b0388cb75991e58c6df7d13e982f1f2",
+            "sha256": "11sinbf942dpyc9wdpidkhmqn438cfp5n8x3xqnmq9aszkld9hy7"
+        }
+    },
+    {
+        "goPackagePath": "github.com/bmizerany/perks",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/bmizerany/perks",
+            "rev": "6cb9d9d729303ee2628580d9aec5db968da3a607",
+            "sha256": "0cdh84hmn21is6hvv6dy9qjdcg9w3l2k8avlk0881a8cqm09s90j"
+        }
+    },
+    {
+        "goPackagePath": "github.com/BurntSushi/toml",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/BurntSushi/toml",
+            "rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4",
+            "sha256": "0gkgkw04ndr5y7hrdy0r4v2drs5srwfcw2bs1gyas066hwl84xyw"
+        }
+    },
+    {
+        "goPackagePath": "github.com/bitly/go-hostpool",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/bitly/go-hostpool",
+            "rev": "d0e59c22a56e8dadfed24f74f452cea5a52722d2",
+            "sha256": "14ph12krn5zlg00vh9g6g08lkfjxnpw46nzadrfb718yl1hgyk3g"
+        }
+    },
+    {
+        "goPackagePath": "github.com/bitly/timer_metrics",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/bitly/timer_metrics",
+            "rev": "afad1794bb13e2a094720aeb27c088aa64564895",
+            "sha256": "1b717vkwj63qb5kan4b92kx4rg6253l5mdb3lxpxrspy56a6rl0c"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mreiferson/go-options",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mreiferson/go-options",
+            "rev": "7c174072188d0cfbe6f01bb457626abb22bdff52",
+            "sha256": "0ksyi2cb4k6r2fxamljg42qbz5hdcb9kv5i7y6cx4ajjy0xznwgm"
+        }
+    }
 ]
diff --git a/pkgs/servers/oauth2_proxy/deps.json b/pkgs/servers/oauth2_proxy/deps.json
index ac8ac3d8ca21..56f27b6b4e53 100644
--- a/pkgs/servers/oauth2_proxy/deps.json
+++ b/pkgs/servers/oauth2_proxy/deps.json
@@ -1,16 +1,83 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "google.golang.org/api",
-      "google.golang.org/cloud",
-      "golang.org/x/oauth2",
-      "github.com/18F/hmacauth",
-      "github.com/mreiferson/go-options",
-      "github.com/BurntSushi/toml",
-      "github.com/bitly/go-simplejson",
-      "golang.org/x/net",
-      "gopkg.in/fsnotify.v1"
-    ]
-  }
+    {
+        "goPackagePath": "gopkg.in/fsnotify.v1",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/fsnotify.v1",
+            "rev": "96c060f6a6b7e0d6f75fddd10efeaca3e5d1bcb0",
+            "sha256": "1308z1by82fbymcra26wjzw7lpjy91kbpp2skmwqcq4q1iwwzvk2"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/net",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/net",
+            "rev": "62ac18b461605b4be188bbc7300e9aa2bc836cd4",
+            "sha256": "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p"
+        }
+    },
+    {
+        "goPackagePath": "github.com/bitly/go-simplejson",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/bitly/go-simplejson",
+            "rev": "18db6e68d8fd9cbf2e8ebe4c81a78b96fd9bf05a",
+            "sha256": "0lj9cxyncchlw6p35j0yym5q5waiz0giw6ri41qdwm8y3dghwwiy"
+        }
+    },
+    {
+        "goPackagePath": "github.com/BurntSushi/toml",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/BurntSushi/toml",
+            "rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4",
+            "sha256": "0gkgkw04ndr5y7hrdy0r4v2drs5srwfcw2bs1gyas066hwl84xyw"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mreiferson/go-options",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mreiferson/go-options",
+            "rev": "7c174072188d0cfbe6f01bb457626abb22bdff52",
+            "sha256": "0ksyi2cb4k6r2fxamljg42qbz5hdcb9kv5i7y6cx4ajjy0xznwgm"
+        }
+    },
+    {
+        "goPackagePath": "google.golang.org/api",
+        "fetch": {
+            "type": "git",
+            "url": "https://code.googlesource.com/google-api-go-client",
+            "rev": "a5c3e2a4792aff40e59840d9ecdff0542a202a80",
+            "sha256": "1kigddnbyrl9ddpj5rs8njvf1ck54ipi4q1282k0d6b3am5qfbj8"
+        }
+    },
+    {
+        "goPackagePath": "google.golang.org/cloud",
+        "fetch": {
+            "type": "git",
+            "url": "https://code.googlesource.com/gocloud",
+            "rev": "6335269abf9002cf5a84613c13cda6010842b834",
+            "sha256": "15xrqxna5ms0r634k3bfzyymn431dvqcjwbsap8ay60x371kzbwf"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/oauth2",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/oauth2",
+            "rev": "397fe7649477ff2e8ced8fc0b2696f781e53745a",
+            "sha256": "0fza0l7iwh6llkq2yzqn7dxi138vab0da64lnghfj1p71fprjzn8"
+        }
+    },
+    {
+        "goPackagePath": "github.com/18F/hmacauth",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/18F/hmacauth",
+            "rev": "9232a6386b737d7d1e5c1c6e817aa48d5d8ee7cd",
+            "sha256": "056mcqrf2bv0g9gn2ixv19srk613h4sasl99w9375mpvmadb3pz1"
+        }
+    }
 ]
diff --git a/pkgs/servers/serf/deps.json b/pkgs/servers/serf/deps.json
index 3f13d0684797..ffd872c62874 100644
--- a/pkgs/servers/serf/deps.json
+++ b/pkgs/servers/serf/deps.json
@@ -1,23 +1,137 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/armon/go-metrics",
-      "github.com/mattn/go-isatty",
-      "github.com/hashicorp/logutils",
-      "github.com/armon/go-radix",
-      "github.com/bgentry/speakeasy",
-      "github.com/hashicorp/go-syslog",
-      "github.com/hashicorp/memberlist",
-      "github.com/mitchellh/mapstructure",
-      "github.com/armon/circbuf",
-      "github.com/hashicorp/go-msgpack",
-      "github.com/hashicorp/go.net",
-      "github.com/hashicorp/mdns",
-      "github.com/mitchellh/cli",
-      "github.com/ryanuber/columnize",
-      "github.com/miekg/dns",
-      "golang.org/x/crypto"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/crypto",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/crypto",
+            "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
+            "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/miekg/dns",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/miekg/dns",
+            "rev": "7e024ce8ce18b21b475ac6baf8fa3c42536bf2fa",
+            "sha256": "0hlwb52lnnj3c6papjk9i5w5cjdw6r7c891v4xksnfvk1f9cy9kl"
+        }
+    },
+    {
+        "goPackagePath": "github.com/armon/go-metrics",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/armon/go-metrics",
+            "rev": "b2d95e5291cdbc26997d1301a5e467ecbb240e25",
+            "sha256": "1jvdf98jlbyzbb9w159nifvv8fihrcs66drnl8pilqdjpmkmyyck"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mattn/go-isatty",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mattn/go-isatty",
+            "rev": "ae0b1f8f8004be68d791a576e3d8e7648ab41449",
+            "sha256": "0qrcsh7j9mxcaspw8lfxh9hhflz55vj4aq1xy00v78301czq6jlj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/hashicorp/logutils",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/hashicorp/logutils",
+            "rev": "0dc08b1671f34c4250ce212759ebd880f743d883",
+            "sha256": "0rynhjwvacv9ibl2k4fwz0xy71d583ac4p33gm20k9yldqnznc7r"
+        }
+    },
+    {
+        "goPackagePath": "github.com/armon/go-radix",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/armon/go-radix",
+            "rev": "fbd82e84e2b13651f3abc5ffd26b65ba71bc8f93",
+            "sha256": "16y64r1v054c2ln0bi5mrqq1cmvy6d6pnxk1glb8lw2g31ksa80c"
+        }
+    },
+    {
+        "goPackagePath": "github.com/hashicorp/go-syslog",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/hashicorp/go-syslog",
+            "rev": "42a2b573b664dbf281bd48c3cc12c086b17a39ba",
+            "sha256": "1j53m2wjyczm9m55znfycdvm4c8vfniqgk93dvzwy8vpj5gm6sb3"
+        }
+    },
+    {
+        "goPackagePath": "github.com/hashicorp/memberlist",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/hashicorp/memberlist",
+            "rev": "6025015f2dc659ca2c735112d37e753bda6e329d",
+            "sha256": "01s2gwnbgvwz4wshz9d4za0p12ji4fnapnlmz3jwfcmcwjpyqfb7"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mitchellh/mapstructure",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mitchellh/mapstructure",
+            "rev": "281073eb9eb092240d33ef253c404f1cca550309",
+            "sha256": "1zjx9fv29639sp1fn84rxs830z7gp7bs38yd5y1hl5adb8s5x1mh"
+        }
+    },
+    {
+        "goPackagePath": "github.com/armon/circbuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/armon/circbuf",
+            "rev": "f092b4f207b6e5cce0569056fba9e1a2735cb6cf",
+            "sha256": "06kwwdwa3hskdh6ws7clj1vim80dyc3ldim8k9y5qpd30x0avn5s"
+        }
+    },
+    {
+        "goPackagePath": "github.com/hashicorp/mdns",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/hashicorp/mdns",
+            "rev": "2b439d37011456df8ff83a70ffd1cd6046410113",
+            "sha256": "17zwk212zmyramnjylpvvrvbbsz0qb5crkhly6yiqkyll3qzpb96"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mitchellh/cli",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mitchellh/cli",
+            "rev": "8102d0ed5ea2709ade1243798785888175f6e415",
+            "sha256": "08mj1l94pww72jy34gk9a483hpic0rrackskfw13r3ycy997w7m2"
+        }
+    },
+    {
+        "goPackagePath": "github.com/ryanuber/columnize",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/ryanuber/columnize",
+            "rev": "44cb4788b2ec3c3d158dd3d1b50aba7d66f4b59a",
+            "sha256": "1qrqr76cw58x2hkjic6h88na5ihgvkmp8mqapj8kmjcjzdxkzhr9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/hashicorp/go-msgpack",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/ugorji/go",
+            "rev": "03e33114d4d60a1f37150325e15f51b0fa6fc4f6",
+            "sha256": "01kdzgx23cgb4k867m1pvsw14hhdr9jf2frqy6i4j4221055m57v"
+        }
+    },
+    {
+        "goPackagePath": "github.com/hashicorp/go.net",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/hashicorp/go.net",
+            "rev": "104dcad90073cd8d1e6828b2af19185b60cf3e29",
+            "sha256": "0pfi09h4q6w2x833qxr8r609ml4kw1flqm265j752sb08sbf3zwf"
+        }
+    }
 ]
diff --git a/pkgs/servers/skydns/deps.json b/pkgs/servers/skydns/deps.json
index 446f60f3279d..5706ab2fc954 100644
--- a/pkgs/servers/skydns/deps.json
+++ b/pkgs/servers/skydns/deps.json
@@ -1,21 +1,128 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/miekg/dns",
-      "github.com/prometheus/client_golang",
-      "github.com/prometheus/client_model",
-      "bitbucket.org/ww/goautoneg",
-      "github.com/prometheus/common",
-      "github.com/prometheus/procfs",
-      "github.com/coreos/go-systemd",
-      "github.com/matttproud/golang_protobuf_extensions",
-      "github.com/ugorji/go",
-      "github.com/golang/protobuf",
-      "github.com/stathat/go",
-      "github.com/beorn7/perks",
-      "github.com/coreos/go-etcd",
-      "github.com/rcrowley/go-metrics"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/coreos/go-systemd",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/coreos/go-systemd",
+            "rev": "a606a1e936df81b70d85448221c7b1c6d8a74ef1",
+            "sha256": "0fhan564swp982dnzzspb6jzfdl453489c0qavh65g3shy5x8x28"
+        }
+    },
+    {
+        "goPackagePath": "github.com/rcrowley/go-metrics",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/rcrowley/go-metrics",
+            "rev": "1ce93efbc8f9c568886b2ef85ce305b2217b3de3",
+            "sha256": "06gg72krlmd0z3zdq6s716blrga95pyj8dc2f2psfbknbkyrkfqa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_model",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_model",
+            "rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6",
+            "sha256": "11a7v1fjzhhwsl128znjcf5v7v6129xjgkdpym2lial4lac1dhm9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/common",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/common",
+            "rev": "40456948a47496dc22168e6af39297a2f8fbf38c",
+            "sha256": "15700w18pifng0l2isa6v25y91r5rb7yfgljqw2g2gqrvac6sr5l"
+        }
+    },
+    {
+        "goPackagePath": "github.com/beorn7/perks",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/beorn7/perks",
+            "rev": "b965b613227fddccbfffe13eae360ed3fa822f8d",
+            "sha256": "1p8zsj4r0g61q922khfxpwxhdma2dx4xad1m5qx43mfn28kxngqk"
+        }
+    },
+    {
+        "goPackagePath": "github.com/coreos/go-etcd",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/coreos/go-etcd",
+            "rev": "9847b93751a5fbaf227b893d172cee0104ac6427",
+            "sha256": "1ihq01ayqzxvn6hca5j00vl189vi5lm78f0fy2wpk5mrm3xi01l4"
+        }
+    },
+    {
+        "goPackagePath": "github.com/matttproud/golang_protobuf_extensions",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/matttproud/golang_protobuf_extensions",
+            "rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a",
+            "sha256": "0ajg41h6402big484drvm72wvid1af2sffw0qkzbmpy04lq68ahj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/client_golang",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/client_golang",
+            "rev": "6dbab8106ed3ed77359ac85d9cf08e30290df864",
+            "sha256": "1i3g5h2ncdb8b67742kfpid7d0a1jas1pyicglbglwngfmzhpkna"
+        }
+    },
+    {
+        "goPackagePath": "github.com/stathat/go",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/stathat/go",
+            "rev": "91dfa3a59c5b233fef9a346a1460f6e2bc889d93",
+            "sha256": "105ql5v8r4hqcsq0ag7asdxqg9n7rvf83y1q1dj2nfjyn4manv6r"
+        }
+    },
+    {
+        "goPackagePath": "github.com/ugorji/go",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/ugorji/go",
+            "rev": "03e33114d4d60a1f37150325e15f51b0fa6fc4f6",
+            "sha256": "01kdzgx23cgb4k867m1pvsw14hhdr9jf2frqy6i4j4221055m57v"
+        }
+    },
+    {
+        "goPackagePath": "github.com/miekg/dns",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/miekg/dns",
+            "rev": "7e024ce8ce18b21b475ac6baf8fa3c42536bf2fa",
+            "sha256": "0hlwb52lnnj3c6papjk9i5w5cjdw6r7c891v4xksnfvk1f9cy9kl"
+        }
+    },
+    {
+        "goPackagePath": "github.com/prometheus/procfs",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/prometheus/procfs",
+            "rev": "c91d8eefde16bd047416409eb56353ea84a186e4",
+            "sha256": "0pj3gzw9b58l72w0rkpn03ayssglmqfmyxghhfad6mh0b49dvj3r"
+        }
+    },
+    {
+        "goPackagePath": "bitbucket.org/ww/goautoneg",
+        "fetch": {
+            "type": "hg",
+            "url": "bitbucket.org/ww/goautoneg",
+            "rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675",
+            "sha256": "19khhn5xhqv1yp7d6k987gh5w5rhrjnp4p0c6fyrd8z6lzz5h9qi"
+        }
+    }
 ]
diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix
index 090291e41012..76a7755f3957 100644
--- a/pkgs/servers/sql/mariadb/default.nix
+++ b/pkgs/servers/sql/mariadb/default.nix
@@ -29,8 +29,6 @@ common = rec { # attributes common to both builds
     sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
   '';
 
-  patches = stdenv.lib.optional stdenv.isDarwin ./my_context_asm.patch;
-
   nativeBuildInputs = [ cmake pkgconfig ];
 
   buildInputs = [
@@ -53,6 +51,7 @@ common = rec { # attributes common to both builds
     "-DWITH_PCRE=system"
   ]
     ++ optional stdenv.isDarwin "-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib"
+    ++ optional (!stdenv.isLinux) "-DWITH_JEMALLOC=no" # bad build at least on Darwin
     ;
 
   preConfigure = ''
diff --git a/pkgs/servers/sql/mariadb/my_context_asm.patch b/pkgs/servers/sql/mariadb/my_context_asm.patch
deleted file mode 100644
index 3a747ed1b03c..000000000000
--- a/pkgs/servers/sql/mariadb/my_context_asm.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/mysys/my_context.c
-+++ b/mysys/my_context.c
-@@ -206,15 +206,6 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d)
-     (
-      "movq %%rsp, (%[save])\n\t"
-      "movq %[stack], %%rsp\n\t"
--#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 && !defined(__INTEL_COMPILER)
--     /*
--       This emits a DWARF DW_CFA_undefined directive to make the return address
--       undefined. This indicates that this is the top of the stack frame, and
--       helps tools that use DWARF stack unwinding to obtain stack traces.
--       (I use numeric constant to avoid a dependency on libdwarf includes).
--     */
--     ".cfi_escape 0x07, 16\n\t"
--#endif
-      "movq %%rbp, 8(%[save])\n\t"
-      "movq %%rbx, 16(%[save])\n\t"
-      "movq %%r12, 24(%[save])\n\t"
diff --git a/pkgs/servers/uftp/default.nix b/pkgs/servers/uftp/default.nix
new file mode 100644
index 000000000000..32dcb98b20ea
--- /dev/null
+++ b/pkgs/servers/uftp/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, openssl }:
+
+stdenv.mkDerivation rec {
+  name = "uftp-${version}";
+  version = "4.9.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/uftp-multicast/source-tar/uftp-${version}.tar.gz";
+    sha256 = "0pra2sm8rdscyqkagi2v99az1vxbcch47wkdnz9wv4qg1x5phpmr";
+  };
+
+  buildInputs = [
+    openssl
+  ];
+
+  outputs = [ "out" "doc" ];
+
+  patchPhase = ''
+    substituteInPlace makefile --replace gcc cc
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin $doc/share/man/man1
+    cp {uftp,uftpd,uftp_keymgt,uftpproxyd} $out/bin/
+    cp {uftp.1,uftpd.1,uftp_keymgt.1,uftpproxyd.1} $doc/share/man/man1
+  '';
+
+  meta = {
+    description = "Encrypted UDP based FTP with multicast";
+    homepage = http://uftp-multicast.sourceforge.net/;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.fadenb ];
+    platforms = with stdenv.lib.platforms; linux ++ darwin;
+  };
+}
diff --git a/pkgs/shells/elvish/deps.json b/pkgs/shells/elvish/deps.json
index 827614a4268f..d1a4ceebe99d 100644
--- a/pkgs/shells/elvish/deps.json
+++ b/pkgs/shells/elvish/deps.json
@@ -1,9 +1,20 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/mattn/go-sqlite3",
-      "github.com/elves/getopt"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/elves/getopt",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/elves/getopt",
+            "rev": "f91a7bf920995832d55a1182f26657bc975b9c24",
+            "sha256": "0wz5dz0iq1b1c2w30mmcgll9xidsrnlvs2906jw9szy0h67310za"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mattn/go-sqlite3",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mattn/go-sqlite3",
+            "rev": "b4142c444a8941d0d92b0b7103a24df9cd815e42",
+            "sha256": "0xq2y4am8dz9w9aaq24s1npg1sn8pf2gn4nki73ylz2fpjwq9vla"
+        }
+    }
 ]
diff --git a/pkgs/shells/oh/deps.json b/pkgs/shells/oh/deps.json
index a0e67ed42dcc..5aabd0e6dba8 100644
--- a/pkgs/shells/oh/deps.json
+++ b/pkgs/shells/oh/deps.json
@@ -1,10 +1,29 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/michaelmacinnis/adapted",
-      "github.com/peterh/liner",
-      "golang.org/x/sys"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/sys",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/sys",
+            "rev": "d9157a9621b69ad1d8d77a1933590c416593f24f",
+            "sha256": "1asdbp7rj1j1m1aar1a022wpcwbml6zih6cpbxaw7b2m8v8is931"
+        }
+    },
+    {
+        "goPackagePath": "github.com/michaelmacinnis/adapted",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/michaelmacinnis/adapted",
+            "rev": "0dd5fa34d6f9d74c7c0deed1fc224f9a87e02978",
+            "sha256": "16n3a87m33pqx4qih713q3gw2j6ksj1q3ngjax6bpn5b11rqvikv"
+        }
+    },
+    {
+        "goPackagePath": "github.com/peterh/liner",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/peterh/liner",
+            "rev": "ad1edfd30321d8f006ccf05f1e0524adeb943060",
+            "sha256": "0c24d9j1gnq7r982h1l2isp3d37379qw155hr8ihx9i2mhpfz317"
+        }
+    }
 ]
diff --git a/pkgs/tools/X11/go-sct/deps.json b/pkgs/tools/X11/go-sct/deps.json
index 7a7ce4989d35..227db99338ea 100644
--- a/pkgs/tools/X11/go-sct/deps.json
+++ b/pkgs/tools/X11/go-sct/deps.json
@@ -1,8 +1,11 @@
 [
-  {
-    "include": "../../../go-modules/libs.json",
-    "packages": [
-      "github.com/cpucycle/astrotime"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/cpucycle/astrotime",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/cpucycle/astrotime",
+            "rev": "9c7d514efdb561775030eaf8f1a9ae6bddb3a2ca",
+            "sha256": "024sc7g55v4s54irssm5wsn74sr2k2ynsm6z16w47q66cxhgvby1"
+        }
+    }
 ]
diff --git a/pkgs/tools/admin/lxd/deps.json b/pkgs/tools/admin/lxd/deps.json
index 3e9a811accef..1a0e2d3245f5 100644
--- a/pkgs/tools/admin/lxd/deps.json
+++ b/pkgs/tools/admin/lxd/deps.json
@@ -1,26 +1,173 @@
 [
-  {
-    "include": "../../../go-modules/libs.json",
-    "packages": [
-      "github.com/golang/protobuf",
-      "github.com/gorilla/websocket",
-      "github.com/syndtr/gocapability",
-      "gopkg.in/inconshreveable/log15.v2",
-      "github.com/gorilla/mux",
-      "github.com/pborman/uuid",
-      "golang.org/x/crypto",
-      "gopkg.in/flosch/pongo2.v3",
-      "gopkg.in/tomb.v2",
-      "github.com/olekukonko/tablewriter",
-      "github.com/mattn/go-sqlite3",
-      "gopkg.in/lxc/go-lxc.v2",
-      "gopkg.in/yaml.v2",
-      "github.com/mattn/go-runewidth",
-      "github.com/coreos/go-systemd",
-      "github.com/dustinkirkland/golang-petname",
-      "github.com/gorilla/context",
-      "github.com/mattn/go-colorable",
-      "github.com/gosexy/gettext"
-    ]
-  }
+    {
+        "goPackagePath": "gopkg.in/yaml.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/yaml.v2",
+            "rev": "a83829b6f1293c91addabc89d0571c246397bbf4",
+            "sha256": "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/crypto",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/crypto",
+            "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
+            "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/tomb.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/tomb.v2",
+            "rev": "14b3d72120e8d10ea6e6b7f87f7175734b1faab8",
+            "sha256": "1nza31jvkpka5431c4bdbirvjdy36b1b55sbzljqhqih25jrcjx5"
+        }
+    },
+    {
+        "goPackagePath": "github.com/gorilla/websocket",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/gorilla/websocket",
+            "rev": "a622679ebd7a3b813862379232f645f8e690e43f",
+            "sha256": "1nc9jbcmgya1i6dmf6sbcqsnxi9hbjg6dz1z0k7zmc6xdwlq0y4q"
+        }
+    },
+    {
+        "goPackagePath": "github.com/syndtr/gocapability",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/syndtr/gocapability",
+            "rev": "2c00daeb6c3b45114c80ac44119e7b8801fdd852",
+            "sha256": "1x7jdcg2r5pakjf20q7bdiidfmv7vcjiyg682186rkp2wz0yws0l"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/inconshreveable/log15.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/inconshreveable/log15.v2",
+            "rev": "b105bd37f74e5d9dc7b6ad7806715c7a2b83fd3f",
+            "sha256": "18rldvi60i7b3lljfrsqgcc24gdkw2pcixxydznyggaqhh96l6a8"
+        }
+    },
+    {
+        "goPackagePath": "github.com/gorilla/mux",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/gorilla/mux",
+            "rev": "8096f47503459bcc74d1f4c487b7e6e42e5746b5",
+            "sha256": "0163fm9jsh54df471mx9kfhdg0070klqhw9ja0qwdzqibxq791b9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/pborman/uuid",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/pborman/uuid",
+            "rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4",
+            "sha256": "0rcx669bbjkkwdlw81spnra4ffgzd4rbpywnrj3w41m9vq6mk1gn"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/flosch/pongo2.v3",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/flosch/pongo2.v3",
+            "rev": "5e81b817a0c48c1c57cdf1a9056cf76bdee02ca9",
+            "sha256": "0fd7d79644zmcirsb1gvhmh0l5vb5nyxmkzkvqpmzzcg6yfczph8"
+        }
+    },
+    {
+        "goPackagePath": "github.com/olekukonko/tablewriter",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/olekukonko/tablewriter",
+            "rev": "cca8bbc0798408af109aaaa239cbd2634846b340",
+            "sha256": "0f9ph3z7lh6p6gihbl1461j9yq5qiaqxr9mzdkp512n18v89ml48"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mattn/go-sqlite3",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mattn/go-sqlite3",
+            "rev": "b4142c444a8941d0d92b0b7103a24df9cd815e42",
+            "sha256": "0xq2y4am8dz9w9aaq24s1npg1sn8pf2gn4nki73ylz2fpjwq9vla"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/lxc/go-lxc.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/lxc/go-lxc.v2",
+            "rev": "8f9e220b36393c03854c2d224c5a55644b13e205",
+            "sha256": "1dc1n2561k3pxbm2zzh3qwlh30bcb2k9v22ghvr7ps2j9lmhs0ip"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mattn/go-runewidth",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mattn/go-runewidth",
+            "rev": "d6bea18f789704b5f83375793155289da36a3c7f",
+            "sha256": "1hnigpn7rjbwd1ircxkyx9hvi0xmxr32b2jdy2jzw6b3jmcnz1fs"
+        }
+    },
+    {
+        "goPackagePath": "github.com/coreos/go-systemd",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/coreos/go-systemd",
+            "rev": "a606a1e936df81b70d85448221c7b1c6d8a74ef1",
+            "sha256": "0fhan564swp982dnzzspb6jzfdl453489c0qavh65g3shy5x8x28"
+        }
+    },
+    {
+        "goPackagePath": "github.com/dustinkirkland/golang-petname",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/dustinkirkland/golang-petname",
+            "rev": "2182cecef7f257230fc998bc351a08a5505f5e6c",
+            "sha256": "1xagj34y5rxl7rykhil8iqxlls9rbgcxgdvgfp7kg39pinw83arl"
+        }
+    },
+    {
+        "goPackagePath": "github.com/gorilla/context",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/gorilla/context",
+            "rev": "215affda49addc4c8ef7e2534915df2c8c35c6cd",
+            "sha256": "1ybvjknncyx1f112mv28870n0l7yrymsr0861vzw10gc4yn1h97g"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mattn/go-colorable",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mattn/go-colorable",
+            "rev": "3dac7b4f76f6e17fb39b768b89e3783d16e237fe",
+            "sha256": "08680mba8hh2rghymqbzd4m40r9k765w5kbzvrif9ngd6h85qnw6"
+        }
+    },
+    {
+        "goPackagePath": "github.com/gosexy/gettext",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/gosexy/gettext",
+            "rev": "305f360aee30243660f32600b87c3c1eaa947187",
+            "sha256": "0sm7ziv56ms0lrk30ipbl6i17azar3a44dd2xvr011442zs5ym09"
+        }
+    }
 ]
diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix
index b5d62482bf51..334525e79026 100644
--- a/pkgs/tools/filesystems/ceph/default.nix
+++ b/pkgs/tools/filesystems/ceph/default.nix
@@ -1,4 +1,4 @@
-{ callPackage, fetchgit, ... } @ args:
+{ callPackage, fetchgit, fetchpatch, ... } @ args:
 
 callPackage ./generic.nix (args // rec {
   version = "9.2.0";
@@ -9,5 +9,12 @@ callPackage ./generic.nix (args // rec {
     sha256 = "0a2v3bgkrbkzardcw7ymlhhyjlwi08qmcm7g34y2sjsxk9bd78an";
   };
 
-  patches = [ ./fix-pythonpath.patch ];
+  patches = [
+    ./fix-pythonpath.patch
+    # For building with xfsprogs 4.5.0:
+    (fetchpatch {
+      url = "https://github.com/ceph/ceph/commit/602425abd5cef741fc1b5d4d1dd70c68e153fc8d.patch";
+      sha256 = "1iyf0ml2n50ki800vjich8lvzmcdviwqwkbs6cdj0vqv2nc5ii1g";
+    })
+  ];
 })
diff --git a/pkgs/tools/filesystems/glusterfs/default.nix b/pkgs/tools/filesystems/glusterfs/default.nix
index 3defa6ab1238..9da5332ce676 100644
--- a/pkgs/tools/filesystems/glusterfs/default.nix
+++ b/pkgs/tools/filesystems/glusterfs/default.nix
@@ -6,11 +6,11 @@ let
   s = # Generated upstream information 
   rec {
     baseName="glusterfs";
-    version="3.7.11";
+    version="3.8.1";
     name="${baseName}-${version}";
-    hash="083dzpz6mafmf4rd55pak5q7x8509y4ggsckcb6i0gmkhzlbf1xd";
-    url="http://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.11/glusterfs-3.7.11.tar.gz";
-    sha256="083dzpz6mafmf4rd55pak5q7x8509y4ggsckcb6i0gmkhzlbf1xd";
+    hash="1j3r2wnk1pwwwn02pfnrrgh1if92b5cl51dqg7284qxrkjiafb2k";
+    url="http://download.gluster.org/pub/gluster/glusterfs/3.8/3.8.1/glusterfs-3.8.1.tar.gz";
+    sha256="1j3r2wnk1pwwwn02pfnrrgh1if92b5cl51dqg7284qxrkjiafb2k";
   };
   buildInputs = [
     fuse bison flex_2_5_35 openssl python ncurses readline
diff --git a/pkgs/tools/filesystems/go-mtpfs/deps.json b/pkgs/tools/filesystems/go-mtpfs/deps.json
index cc2ce33ac301..9960293f0908 100644
--- a/pkgs/tools/filesystems/go-mtpfs/deps.json
+++ b/pkgs/tools/filesystems/go-mtpfs/deps.json
@@ -1,17 +1,20 @@
 [
-  {
-    "include": "../../../go-modules/libs.json",
-    "packages": [
-      "github.com/hanwen/go-fuse"
-    ]
-  },
-  {
-    "goPackagePath": "github.com/hanwen/usb",
-    "fetch": {
-      "type": "git",
-      "url": "https://github.com/hanwen/usb",
-      "rev": "69aee4530ac705cec7c5344418d982aaf15cf0b1",
-      "sha256": "01k0c2g395j65vm1w37mmrfkg6nm900khjrrizzpmx8f8yf20dky"
+    {
+        "goPackagePath": "github.com/hanwen/go-fuse",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/hanwen/go-fuse",
+            "rev": "bd746dd8bcc8c059a9d953a786a6156eb83f398e",
+            "sha256": "1dvvclp418j3d02v9717sfqhl6fw6yyddr9r3j8gsiv8nb62ib56"
+        }
+    },
+    {
+        "goPackagePath": "github.com/hanwen/usb",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/hanwen/usb",
+            "rev": "69aee4530ac705cec7c5344418d982aaf15cf0b1",
+            "sha256": "01k0c2g395j65vm1w37mmrfkg6nm900khjrrizzpmx8f8yf20dky"
+        }
     }
-  }
 ]
diff --git a/pkgs/tools/filesystems/gpart/default.nix b/pkgs/tools/filesystems/gpart/default.nix
index dfa6fe3234c2..b0e4d5029e08 100644
--- a/pkgs/tools/filesystems/gpart/default.nix
+++ b/pkgs/tools/filesystems/gpart/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
       or device.
     '';
     license = licenses.gpl2Plus;
-    platforms = platforms.unix;
     maintainers = with maintainers; [ nckx ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/tools/filesystems/grive/default.nix b/pkgs/tools/filesystems/grive/default.nix
index 63d3bbc3373a..4e4a139f9adc 100644
--- a/pkgs/tools/filesystems/grive/default.nix
+++ b/pkgs/tools/filesystems/grive/default.nix
@@ -24,6 +24,6 @@ stdenv.mkDerivation rec {
     homepage = https://github.com/Grive/grive;
     license = stdenv.lib.licenses.gpl2;
 
-    platforms = stdenv.lib.platforms.all;
+    platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/tools/filesystems/xfsprogs/4.2.0-sharedlibs.patch b/pkgs/tools/filesystems/xfsprogs/4.3.0-sharedlibs.patch
index c74b75b7e43f..622708f7b9c9 100644
--- a/pkgs/tools/filesystems/xfsprogs/4.2.0-sharedlibs.patch
+++ b/pkgs/tools/filesystems/xfsprogs/4.3.0-sharedlibs.patch
@@ -1,5 +1,5 @@
---- xfsprogs-4.2.0/include/buildmacros
-+++ xfsprogs-4.2.0/include/buildmacros
+--- xfsprogs-4.3.0/include/buildmacros
++++ xfsprogs-4.3.0/include/buildmacros
 @@ -70,18 +70,9 @@
  # /usr/lib.
  ifeq ($(ENABLE_SHARED),yes)
@@ -22,8 +22,8 @@
  else
  INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
  endif
---- xfsprogs-4.2.0/libxcmd/Makefile
-+++ xfsprogs-4.2.0/libxcmd/Makefile
+--- xfsprogs-4.3.0/libxcmd/Makefile
++++ xfsprogs-4.3.0/libxcmd/Makefile
 @@ -34,6 +34,9 @@
  
  include $(BUILDRULES)
@@ -35,8 +35,8 @@
 +	$(INSTALL_LTLIB_DEV)
  
  -include .ltdep
---- xfsprogs-4.2.0/libxfs/Makefile
-+++ xfsprogs-4.2.0/libxfs/Makefile
+--- xfsprogs-4.3.0/libxfs/Makefile
++++ xfsprogs-4.3.0/libxfs/Makefile
 @@ -138,6 +138,7 @@
  
  install-dev: install
@@ -45,8 +45,8 @@
  
  # We need to install the headers before building the dependencies.  If we
  # include the .ltdep file, the makefile decides that it needs to build the
---- xfsprogs-4.2.0/libxlog/Makefile
-+++ xfsprogs-4.2.0/libxlog/Makefile
+--- xfsprogs-4.3.0/libxlog/Makefile
++++ xfsprogs-4.3.0/libxlog/Makefile
 @@ -12,6 +12,8 @@
  
  CFILES = xfs_log_recover.c util.c
@@ -67,19 +67,8 @@
 +	$(INSTALL_LTLIB_DEV)
  
  -include .ltdep
---- xfsprogs-4.2.0/Makefile
-+++ xfsprogs-4.2.0/Makefile
-@@ -81,6 +81,8 @@
- io: libxcmd libhandle
- quota: libxcmd
- repair: libxlog
-+libxlog: libxfs
-+libxlog-install-dev: libxfs-install-dev
- 
- 
- ifeq ($(HAVE_BUILDDEFS), yes)
---- xfsprogs-4.2.0/quota/Makefile
-+++ xfsprogs-4.2.0/quota/Makefile
+--- xfsprogs-4.3.0/quota/Makefile
++++ xfsprogs-4.3.0/quota/Makefile
 @@ -16,7 +16,6 @@ LSRCFILES = $(shell echo $(PCFILES) | sed -e "s/$(PKG_PLATFORM).c//g")
  
  LLDLIBS = $(LIBXCMD)
@@ -88,8 +77,8 @@
  
  ifeq ($(ENABLE_READLINE),yes)
  LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP)
---- xfsprogs-4.2.0/mdrestore/Makefile
-+++ xfsprogs-4.2.0/mdrestore/Makefile
+--- xfsprogs-4.3.0/mdrestore/Makefile
++++ xfsprogs-4.3.0/mdrestore/Makefile
 @@ -10,7 +10,6 @@ CFILES = xfs_mdrestore.c
  
  LLDLIBS = $(LIBXFS) $(LIBRT) $(LIBPTHREAD) $(LIBUUID)
diff --git a/pkgs/tools/filesystems/xfsprogs/default.nix b/pkgs/tools/filesystems/xfsprogs/default.nix
index e30f67af3e95..96e7931f14c8 100644
--- a/pkgs/tools/filesystems/xfsprogs/default.nix
+++ b/pkgs/tools/filesystems/xfsprogs/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, gettext, libuuid, readline }:
 
 stdenv.mkDerivation rec {
-  name = "xfsprogs-4.2.0";
+  name = "xfsprogs-4.5.0";
 
   src = fetchurl {
     urls = map (dir: "ftp://oss.sgi.com/projects/xfs/${dir}/${name}.tar.gz")
       [ "cmd_tars" "previous" ];
-    sha256 = "0q2j1rrh37kqyihaq5lc31xdi36lgg9asidaad0fada61ynv3six";
+    sha256 = "1y49rwvbbvqdq2a1x7p5i05bcfyv6xhmrfwafl6vvvw494qyp6z4";
   };
 
   prePatch = ''
@@ -21,10 +21,11 @@ stdenv.mkDerivation rec {
 
   patches = [
     # This patch fixes shared libs installation, still not fixed in 4.2.0
-    ./4.2.0-sharedlibs.patch
+    ./4.3.0-sharedlibs.patch
   ];
 
-  buildInputs = [ gettext libuuid readline ];
+  propagatedBuildInputs = [ libuuid ];
+  buildInputs = [ gettext readline ];
 
   outputs = [ "dev" "out" "bin" ]; # TODO: review xfs
 
diff --git a/pkgs/tools/filesystems/xtreemfs/default.nix b/pkgs/tools/filesystems/xtreemfs/default.nix
index fb491948a470..adee80d9c5d0 100644
--- a/pkgs/tools/filesystems/xtreemfs/default.nix
+++ b/pkgs/tools/filesystems/xtreemfs/default.nix
@@ -21,7 +21,8 @@ stdenv.mkDerivation rec {
 
     export BOOST_INCLUDEDIR=${boost.dev}/include
     export BOOST_LIBRARYDIR=${boost.out}/lib
-    export OPENSSL_ROOT_DIR=${openssl.dev}
+    export CMAKE_INCLUDE_PATH=${openssl.dev}/include
+    export CMAKE_LIBRARY_PATH=${openssl.out}/lib
 
     substituteInPlace cpp/cmake/FindValgrind.cmake \
       --replace "/usr/local" "${valgrind}"
diff --git a/pkgs/tools/graphics/gmic/default.nix b/pkgs/tools/graphics/gmic/default.nix
index 798c9d803958..408539561c7e 100644
--- a/pkgs/tools/graphics/gmic/default.nix
+++ b/pkgs/tools/graphics/gmic/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "gmic-${version}";
-  version = "1.6.5.0";
+  version = "1.7.4";
 
   src = fetchurl {
     url = "http://gmic.eu/files/source/gmic_${version}.tar.gz";
-    sha256 = "1vb6zm5zpqfnzxjvb9yfvczaqacm55rf010ib0yk9f28b17qrjgb";
+    sha256 = "1k4swqi1adq479b6zdpvy5kdpkvjkfihkj9iwgw9mgi0xdqikjry";
   };
 
   buildInputs = [ fftw zlib libjpeg libtiff libpng ];
diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-unikey/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-unikey/default.nix
new file mode 100644
index 000000000000..b2cd71d1816e
--- /dev/null
+++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-unikey/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, cmake, fcitx, gettext, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "fcitx-unikey-${version}";
+  version = "0.2.5";
+
+  src = fetchurl {
+    url = "http://download.fcitx-im.org/fcitx-unikey/${name}.tar.xz";
+    sha256 = "063vc29v7ycaai98v3z4q319sv9sm91my17pmhblw1vifxnw02wf";
+  };
+
+  buildInputs = [ cmake fcitx gettext pkgconfig ];
+
+  preInstall = ''
+    substituteInPlace src/cmake_install.cmake \
+      --replace ${fcitx} $out
+    substituteInPlace data/cmake_install.cmake \
+      --replace ${fcitx} $out
+  '';
+  
+  meta = with stdenv.lib; {
+    isFcitxEngine = true;
+    homepage      = "https://github.com/fcitx/fcitx-unikey";
+    downloadPage  = "http://download.fcitx-im.org/fcitx-table-other/";
+    description   = "Fcitx wrapper for unikey";
+    license       = licenses.gpl3Plus;
+    platforms     = platforms.linux;
+    maintainers   = with maintainers; [ ericsagnes ];
+  };
+
+}
\ No newline at end of file
diff --git a/pkgs/tools/misc/fasd/default.nix b/pkgs/tools/misc/fasd/default.nix
index aa1fa8f3c6c9..b651caf5a5e7 100644
--- a/pkgs/tools/misc/fasd/default.nix
+++ b/pkgs/tools/misc/fasd/default.nix
@@ -1,16 +1,14 @@
-{ stdenv, fetchgit } :
+{ stdenv, fetchFromGitHub } :
 
-let
-  rev = "61ce53be996189e1c325916e45a7dc0aa89660e3";
-in
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
+  pname = "fasd";
+  name = "${pname}-unstable-2016-08-11";
 
-  name = "fasd-git-2015-03-29";
-
-  src = fetchgit {
-    url = "https://github.com/clvv/fasd.git";
-    inherit rev;
-    sha256 = "1fd36ff065ae73de2d6b1bae2131c18c8c4dea98ca63d96b0396e8b291072b5e";
+  src = fetchFromGitHub {
+    owner = "clvv";
+    repo = "${pname}";
+    rev = "90b531a5daaa545c74c7d98974b54cbdb92659fc";
+    sha256 = "0i22qmhq3indpvwbxz7c472rdyp8grag55x7iyjz8gmyn8gxjc11";
   };
 
   installPhase = ''
@@ -18,9 +16,9 @@ stdenv.mkDerivation {
   '';
 
   meta = {
-    homepage = "https://github.com/clvv/fasd";
+    homepage = "https://github.com/clvv/${pname}";
     description = "Quick command-line access to files and directories for POSIX shells";
-    license = stdenv.lib.licenses.free; # https://github.com/clvv/fasd/blob/master/LICENSE
+    license = stdenv.lib.licenses.mit;
 
     longDescription = ''
       Fasd is a command-line productivity booster.
diff --git a/pkgs/tools/misc/gawp/deps.json b/pkgs/tools/misc/gawp/deps.json
index 28b9216ca007..a51c17253538 100644
--- a/pkgs/tools/misc/gawp/deps.json
+++ b/pkgs/tools/misc/gawp/deps.json
@@ -1,10 +1,29 @@
 [
     {
-        "include": "../../../../development/go-modules/libs.json",
-        "packages": [
-            "golang.org/x/sys",
-            "gopkg.in/yaml.v2",
-            "gopkg.in/fsnotify.v1"
-        ]
+        "goPackagePath": "golang.org/x/sys",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/sys",
+            "rev": "d9157a9621b69ad1d8d77a1933590c416593f24f",
+            "sha256": "1asdbp7rj1j1m1aar1a022wpcwbml6zih6cpbxaw7b2m8v8is931"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/fsnotify.v1",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/fsnotify.v1",
+            "rev": "96c060f6a6b7e0d6f75fddd10efeaca3e5d1bcb0",
+            "sha256": "1308z1by82fbymcra26wjzw7lpjy91kbpp2skmwqcq4q1iwwzvk2"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/yaml.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/yaml.v2",
+            "rev": "a83829b6f1293c91addabc89d0571c246397bbf4",
+            "sha256": "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh"
+        }
     }
 ]
diff --git a/pkgs/tools/misc/i3cat/deps.json b/pkgs/tools/misc/i3cat/deps.json
index cd4c703aed65..0db944a83613 100644
--- a/pkgs/tools/misc/i3cat/deps.json
+++ b/pkgs/tools/misc/i3cat/deps.json
@@ -1,8 +1,11 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/vincent-petithory/structfield"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/vincent-petithory/structfield",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/vincent-petithory/structfield",
+            "rev": "01a738558a47fbf16712994d1737fb31c77e7d11",
+            "sha256": "1kyx71z13mf6hc8ly0j0b9zblgvj5lzzvgnc3fqh61wgxrsw24dw"
+        }
+    }
 ]
diff --git a/pkgs/tools/misc/ised/default.nix b/pkgs/tools/misc/ised/default.nix
index 64a71846c4bc..a87d199d9bd4 100644
--- a/pkgs/tools/misc/ised/default.nix
+++ b/pkgs/tools/misc/ised/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   name = "ised-${version}";
-  version = "2.7.0";
+  version = "2.7.1";
   src = fetchurl {
     url = "mirror://sourceforge/project/ised/${name}.tar.bz2";
-    sha256 = "08wzgmyvlhfaxa0m2b6pw2mn03k1a87pzbzxm0x9z84gci9w2g4h";
+    sha256 = "0fhha61whkkqranqdxg792g0f5kgp5m3m6z1iqcvjh2c34rczbmb";
   };
 
   meta = {
diff --git a/pkgs/tools/misc/kronometer/default.nix b/pkgs/tools/misc/kronometer/default.nix
new file mode 100644
index 000000000000..5a3da3788d58
--- /dev/null
+++ b/pkgs/tools/misc/kronometer/default.nix
@@ -0,0 +1,28 @@
+{
+  kdeDerivation, kdeWrapper, fetchurl, lib,
+  ecm, kdoctools,
+  kconfig, kinit
+}:
+
+let
+  pname = "kronometer";
+  version = "2.1.0";
+  unwrapped = kdeDerivation rec {
+    name = "${pname}-${version}";
+
+    src = fetchurl {
+      url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
+      sha256 = "1nh7y4c13rscy55f5n8s2v8jij27b55rwkxh9g8r0p7mdwmw8vri";
+    };
+
+    meta = with lib; {
+      license = licenses.gpl2;
+      maintainers = with maintainers; [ peterhoeg ];
+    };
+    nativeBuildInputs = [ ecm kdoctools ];
+    propagatedBuildInputs = [ kconfig kinit ];
+  };
+in
+kdeWrapper unwrapped {
+  targets = [ "bin/kronometer" ];
+}
diff --git a/pkgs/tools/misc/mongodb-tools/deps.json b/pkgs/tools/misc/mongodb-tools/deps.json
index 1489b9e57adb..c1cc7f96f750 100644
--- a/pkgs/tools/misc/mongodb-tools/deps.json
+++ b/pkgs/tools/misc/mongodb-tools/deps.json
@@ -1,12 +1,47 @@
 [
-  {
-    "include": "../../../go-modules/libs.json",
-    "packages": [
-      "github.com/howeyc/gopass",
-      "github.com/jessevdk/go-flags",
-      "golang.org/x/crypto",
-      "gopkg.in/mgo.v2",
-      "gopkg.in/tomb.v2"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/crypto",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/crypto",
+            "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
+            "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/howeyc/gopass",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/howeyc/gopass",
+            "rev": "2c70fa70727c953c51695f800f25d6b44abb368e",
+            "sha256": "152lrkfxk205rlxiign0w5wb0fmfh910yz4jhlv4f4l1qr1h2lx8"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/mgo.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/mgo.v2",
+            "rev": "c6a7dce14133ccac2dcac3793f1d6e2ef048503a",
+            "sha256": "0rg232q1bkq3y3kd5816hgk1jpf7i38aha5q5ia7j6p9xashz7vj"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/tomb.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/tomb.v2",
+            "rev": "14b3d72120e8d10ea6e6b7f87f7175734b1faab8",
+            "sha256": "1nza31jvkpka5431c4bdbirvjdy36b1b55sbzljqhqih25jrcjx5"
+        }
+    },
+    {
+        "goPackagePath": "github.com/jessevdk/go-flags",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/jessevdk/go-flags",
+            "rev": "1b89bf73cd2c3a911d7b2a279ab085c4a18cf539",
+            "sha256": "027nglc5xx1cm03z9sisg0iqrhwcj6gh5z254rrpl8p4fwrxx680"
+        }
+    }
 ]
diff --git a/pkgs/tools/misc/upower-notify/deps.json b/pkgs/tools/misc/upower-notify/deps.json
index 3a254084ae36..96db25d0c7d5 100644
--- a/pkgs/tools/misc/upower-notify/deps.json
+++ b/pkgs/tools/misc/upower-notify/deps.json
@@ -1,8 +1,11 @@
 [
-  {
-    "include": "../../../go-modules/libs.json",
-    "packages": [
-      "github.com/godbus/dbus"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/godbus/dbus",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/godbus/dbus",
+            "rev": "32c6cc29c14570de4cf6d7e7737d68fb2d01ad15",
+            "sha256": "0v401f761l88yapiaw23pxvxviqrwl2r2vfd6lq02044i7x4i5r3"
+        }
+    }
 ]
diff --git a/pkgs/tools/misc/xfstests/default.nix b/pkgs/tools/misc/xfstests/default.nix
index a7098ae21602..80025164cb68 100644
--- a/pkgs/tools/misc/xfstests/default.nix
+++ b/pkgs/tools/misc/xfstests/default.nix
@@ -3,12 +3,12 @@
 , time, utillinux, which, writeScript, xfsprogs }:
 
 stdenv.mkDerivation {
-  name = "xfstests-2016-01-11";
+  name = "xfstests-2016-08-06";
 
   src = fetchgit {
     url = "git://oss.sgi.com/xfs/cmds/xfstests.git";
-    rev = "dfe582dd396f16ddce1909baab7376e00af07792";
-    sha256 = "1pvqzw4f0r63lzhcw2lii72bp4dwqd50xshv8ch7v529z0f5icwa";
+    rev = "b7d908a0e8eb3bc069275dedfe981f9ea3aeeec2";
+    sha256 = "0dnhqqxmxr3mq2xjnxki92vjmi3y7g9xz3lfa1s1c8ayfcm3qq85";
   };
 
   buildInputs = [ acl autoreconfHook attr gawk libaio libuuid libxfs openssl perl ];
@@ -72,7 +72,7 @@ stdenv.mkDerivation {
       ln -s @out@/lib/xfstests/$f $f
     done
 
-    export PATH=${lib.makeBinPath [acl attr bc e2fsprogs fio gawk libcap lvm2 perl procps psmisc su utillinux which xfsprogs]}:$PATH
+    export PATH=${lib.makeBinPath [acl attr bc e2fsprogs fio gawk libcap lvm2 perl procps psmisc utillinux which xfsprogs]}:$PATH
     exec ./check "$@"
   '';
 
diff --git a/pkgs/tools/networking/dibbler/default.nix b/pkgs/tools/networking/dibbler/default.nix
new file mode 100644
index 000000000000..82ef3b218d08
--- /dev/null
+++ b/pkgs/tools/networking/dibbler/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "dibbler-${version}";
+  version = "1.0.1";
+
+  src = fetchurl {
+    url = "http://www.klub.com.pl/dhcpv6/dibbler/${name}.tar.gz";
+    sha256 = "18bnwkvax02scjdg5z8gvrkvy1lhssfnlpsaqb5kkh30w1vri1i7";
+  };
+
+  configureFlags = [
+    "--enable-resolvconf"
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Portable DHCPv6 implementation";
+    homepage = http://www.klub.com.pl/dhcpv6/;
+    license = licenses.gpl2;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ fpletz ];
+  };
+}
diff --git a/pkgs/tools/networking/email/default.nix b/pkgs/tools/networking/email/default.nix
index 23501c29e23f..017da63a1e92 100644
--- a/pkgs/tools/networking/email/default.nix
+++ b/pkgs/tools/networking/email/default.nix
@@ -2,11 +2,10 @@
 
 let
   eMailSrc = fetchFromGitHub {
-    #awaiting acceptance of https://github.com/deanproxy/eMail/pull/29
-    owner = "jerith666";
+    owner = "deanproxy";
     repo = "eMail";
-    rev = "d9fd259f952b573d320916ee34e807dd3dd24b1f";
-    sha256 = "0q4ly4bhlv6lrlj5kmjs491aah1afmkjyw63i9yqnz4d2k6npvl9";
+    rev = "7d23c8f508a52bd8809e2af4290417829b6bb5ae";
+    sha256 = "1cxxzhm36civ6vjdgrk7mfmlzkih44kdii6l2xgy4r434s8rzcpn";
   };
 
   srcRoot = "eMail-${eMailSrc.rev}-src";
diff --git a/pkgs/tools/networking/getmail/default.nix b/pkgs/tools/networking/getmail/default.nix
index 3eb0e9d2a90a..6f280257692c 100644
--- a/pkgs/tools/networking/getmail/default.nix
+++ b/pkgs/tools/networking/getmail/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, buildPythonApplication }:
 
 buildPythonApplication rec {
-  version = "4.49.0";
+  version = "4.50.0";
   name = "getmail-${version}";
   namePrefix = "";
 
   src = fetchurl {
     url = "http://pyropus.ca/software/getmail/old-versions/${name}.tar.gz";
-    sha256 = "1m0yzxd05fklwbmjj1n2q4sx397c1j5qi9a0r5fv3h8pplz4lv0w";
+    sha256 = "1hcb5079mkcx3gglfycrhglrgg4jsa499br50yjrh9sal6wpgg7w";
   };
 
   doCheck = false;
diff --git a/pkgs/tools/networking/ngrok/deps.json b/pkgs/tools/networking/ngrok/deps.json
index 61dfbf337266..943967b73428 100644
--- a/pkgs/tools/networking/ngrok/deps.json
+++ b/pkgs/tools/networking/ngrok/deps.json
@@ -1,19 +1,101 @@
 [
-  {
-    "include": "../../../go-modules/libs.json",
-    "packages": [
-      "gopkg.in/yaml.v1",
-      "github.com/gorilla/websocket",
-      "github.com/rcrowley/go-metrics",
-      "github.com/inconshreveable/go-vhost",
-      "code.google.com/p/log4go",
-      "github.com/daviddengcn/go-colortext",
-      "gopkg.in/yaml.v1",
-      "github.com/inconshreveable/mousetrap",
-      "github.com/nsf/termbox-go",
-      "gopkg.in/inconshreveable/go-update.v0",
-      "github.com/kardianos/osext",
-      "github.com/kr/binarydist"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/gorilla/websocket",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/gorilla/websocket",
+            "rev": "a622679ebd7a3b813862379232f645f8e690e43f",
+            "sha256": "1nc9jbcmgya1i6dmf6sbcqsnxi9hbjg6dz1z0k7zmc6xdwlq0y4q"
+        }
+    },
+    {
+        "goPackagePath": "github.com/rcrowley/go-metrics",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/rcrowley/go-metrics",
+            "rev": "1ce93efbc8f9c568886b2ef85ce305b2217b3de3",
+            "sha256": "06gg72krlmd0z3zdq6s716blrga95pyj8dc2f2psfbknbkyrkfqa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/inconshreveable/go-vhost",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/inconshreveable/go-vhost",
+            "rev": "c4c28117502e4bf00960c8282b2d1c51c865fe2c",
+            "sha256": "1rway6sls6fl2s2jk20ajj36rrlzh9944ncc9pdd19kifix54z32"
+        }
+    },
+    {
+        "goPackagePath": "code.google.com/p/log4go",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/ccpaging/log4go",
+            "rev": "cb4cc51cd03958183d3b637d0750497d88c2f7a8",
+            "sha256": "0l9f86zzhla9hq35q4xhgs837283qrm4gxbp5lrwwls54ifiq7k2"
+        }
+    },
+    {
+        "goPackagePath": "github.com/daviddengcn/go-colortext",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/daviddengcn/go-colortext",
+            "rev": "13eaeb896f5985a1ab74ddea58707a73d875ba57",
+            "sha256": "0618xs9lc5xfp5zkkb5j47dr7i30ps3zj5fj0zpv8afqh2cc689x"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/yaml.v1",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/go-yaml/yaml",
+            "rev": "b0c168ac0cf9493da1f9bb76c34b26ffef940b4a",
+            "sha256": "0jbdy41pplf2d1j24qwr8gc5qsig6ai5ch8rwgvg72kq9q0901cy"
+        }
+    },
+    {
+        "goPackagePath": "github.com/inconshreveable/mousetrap",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/inconshreveable/mousetrap",
+            "rev": "9dbb96d2c3a964935b0870b5abaea13c98b483aa",
+            "sha256": "1f9g8vm18qv1rcb745a4iahql9vfrz0jni9mnzriab2wy1pfdl5b"
+        }
+    },
+    {
+        "goPackagePath": "github.com/nsf/termbox-go",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/nsf/termbox-go",
+            "rev": "9aecf65084a5754f12d27508fa2e6ed56851953b",
+            "sha256": "16sak07bgvmax4zxfrd4jia1dgygk733xa8vk8cdx28z98awbfsh"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/inconshreveable/go-update.v0",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/inconshreveable/go-update",
+            "rev": "d8b0b1d421aa1cbf392c05869f8abbc669bb7066",
+            "sha256": "0cvkik2w368fzimx3y29ncfgw7004qkbdf2n3jy5czvzn35q7dpa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/kardianos/osext",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/kardianos/osext",
+            "rev": "29ae4ffbc9a6fe9fb2bc5029050ce6996ea1d3bc",
+            "sha256": "1mawalaz84i16njkz6f9fd5jxhcbxkbsjnav3cmqq2dncv2hyv8a"
+        }
+    },
+    {
+        "goPackagePath": "github.com/kr/binarydist",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/kr/binarydist",
+            "rev": "9955b0ab8708602d411341e55fffd7e0700f86bd",
+            "sha256": "11wncbbbrdcxl5ff3h6w8vqfg4bxsf8709mh6vda0cv236flkyn3"
+        }
+    }
 ]
diff --git a/pkgs/tools/networking/offlineimap/default.nix b/pkgs/tools/networking/offlineimap/default.nix
index 6f74df38ad0b..8f56e07403b4 100644
--- a/pkgs/tools/networking/offlineimap/default.nix
+++ b/pkgs/tools/networking/offlineimap/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchFromGitHub, pythonPackages, sqlite3 }:
 
 pythonPackages.buildPythonApplication rec {
-  version = "7.0.4";
+  version = "7.0.5";
   name = "offlineimap-${version}";
   namePrefix = "";
 
@@ -9,7 +9,7 @@ pythonPackages.buildPythonApplication rec {
     owner = "OfflineIMAP";
     repo = "offlineimap";
     rev = "v${version}";
-    sha256 = "1ixm4qp3gljbnbi40h8n6j7c0pzk1ry8hpm4bcf7n68gc07r557n";
+    sha256 = "0gmypc0sribxzglxgymfc5x3saxnkyhbky06dhxanxm6pa1p4blh";
   };
 
   doCheck = false;
diff --git a/pkgs/tools/networking/openssh/CVE-2015-8325.patch b/pkgs/tools/networking/openssh/CVE-2015-8325.patch
deleted file mode 100644
index c752726aeae7..000000000000
--- a/pkgs/tools/networking/openssh/CVE-2015-8325.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 85bdcd7c92fe7ff133bbc4e10a65c91810f88755 Mon Sep 17 00:00:00 2001
-From: Damien Miller <djm@mindrot.org>
-Date: Wed, 13 Apr 2016 10:39:57 +1000
-Subject: [PATCH] ignore PAM environment vars when UseLogin=yes
-
-If PAM is configured to read user-specified environment variables
-and UseLogin=yes in sshd_config, then a hostile local user may
-attack /bin/login via LD_PRELOAD or similar environment variables
-set via PAM.
-
-CVE-2015-8325, found by Shayan Sadigh, via Colin Watson
----
- session.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/session.c b/session.c
-index 4859245..4653b09 100644
---- a/session.c
-+++ b/session.c
-@@ -1322,7 +1322,7 @@ do_setup_env(Session *s, const char *shell)
- 	 * Pull in any environment variables that may have
- 	 * been set by PAM.
- 	 */
--	if (options.use_pam) {
-+	if (options.use_pam && !options.use_login) {
- 		char **p;
- 
- 		p = fetch_pam_child_environment();
diff --git a/pkgs/tools/networking/openssh/default.nix b/pkgs/tools/networking/openssh/default.nix
index 6d6b43c5f8d9..dab638301820 100644
--- a/pkgs/tools/networking/openssh/default.nix
+++ b/pkgs/tools/networking/openssh/default.nix
@@ -27,11 +27,12 @@ with stdenv.lib;
 stdenv.mkDerivation rec {
   # Please ensure that openssh_with_kerberos still builds when
   # bumping the version here!
-  name = "openssh-7.2p2";
+  name = "openssh-${version}";
+  version = "7.3p1";
 
   src = fetchurl {
     url = "mirror://openbsd/OpenSSH/portable/${name}.tar.gz";
-    sha256 = "132lh9aanb0wkisji1d6cmsxi520m8nh7c7i9wi6m1s3l38q29x7";
+    sha256 = "1k5y1wi29d47cgizbryxrhc1fbjsba2x8l5mqfa9b9nadnd9iyrz";
   };
 
   prePatch = optionalString hpnSupport
@@ -44,7 +45,6 @@ stdenv.mkDerivation rec {
     [
       ./locale_archive.patch
       ./fix-host-key-algorithms-plus.patch
-      ./CVE-2015-8325.patch
 
       # See discussion in https://github.com/NixOS/nixpkgs/pull/16966
       ./dont_create_privsep_path.patch
diff --git a/pkgs/tools/networking/s3gof3r/deps.json b/pkgs/tools/networking/s3gof3r/deps.json
index d4a41d349b28..e73edde322fc 100644
--- a/pkgs/tools/networking/s3gof3r/deps.json
+++ b/pkgs/tools/networking/s3gof3r/deps.json
@@ -1,8 +1,11 @@
 [
-  {
-    "include": "../../../go-modules/libs.json",
-    "packages": [
-      "github.com/jessevdk/go-flags"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/jessevdk/go-flags",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/jessevdk/go-flags",
+            "rev": "1b89bf73cd2c3a911d7b2a279ab085c4a18cf539",
+            "sha256": "027nglc5xx1cm03z9sisg0iqrhwcj6gh5z254rrpl8p4fwrxx680"
+        }
+    }
 ]
diff --git a/pkgs/tools/networking/tlsdate/default.nix b/pkgs/tools/networking/tlsdate/default.nix
index a7721b563b3f..66ead809d0bb 100644
--- a/pkgs/tools/networking/tlsdate/default.nix
+++ b/pkgs/tools/networking/tlsdate/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit
+{ stdenv, fetchFromGitHub, fetchpatch
 , autoconf
 , automake
 , libevent
@@ -7,15 +7,25 @@
 , openssl
 }:
 
-stdenv.mkDerivation {
-  name = "tlsdate-0.0.12";
+stdenv.mkDerivation rec {
+  version = "0.0.13";
+  name = "tlsdate-${version}";
 
-  src = fetchgit {
-    url = https://github.com/ioerror/tlsdate;
-    rev = "fd04f48ed60eb773c8e34d27ef2ee12ee7559a41";
-    sha256 = "0naxlsanpgixj509z4mbzl41r2nn5wi6q2lp10a7xgcmcb4cgnbf";
+  src = fetchFromGitHub {
+    owner = "ioerror";
+    repo = "tlsdate";
+    rev = name;
+    sha256 = "0w3v63qmbhpqlxjsvf4k3zp90k6mdzi8cdpgshan9iphy1f44xgl";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "tlsdate-no_sslv3.patch";
+      url = "https://github.com/ioerror/tlsdate/commit/f9d3cba7536d1679e98172ccbddad32bc9ae490c.patch";
+      sha256 = "0prv46vxvb4paxaswmc6ix0kd5sp0552i5msdldnhg9fysbac8s0";
+    })
+  ];
+
   buildInputs = [
     autoconf
     automake
@@ -32,10 +42,10 @@ stdenv.mkDerivation {
 
   doCheck = true;
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Secure parasitic rdate replacement";
     homepage = https://github.com/ioerror/tlsdate;
-    maintainers = [ stdenv.lib.maintainers.tv ];
-    platforms = stdenv.lib.platforms.allBut [ "darwin" ];
+    maintainers = with maintainers; [ tv fpletz ];
+    platforms = platforms.allBut [ "darwin" ];
   };
 }
diff --git a/pkgs/tools/package-management/nox/default.nix b/pkgs/tools/package-management/nox/default.nix
index 04a31bd30b7c..2dffcef48fbe 100644
--- a/pkgs/tools/package-management/nox/default.nix
+++ b/pkgs/tools/package-management/nox/default.nix
@@ -1,4 +1,4 @@
-{ lib, pythonPackages, fetchurl }:
+{ lib, pythonPackages, fetchurl, git }:
 
 pythonPackages.buildPythonApplication rec {
   name = "nox-${version}";
@@ -10,7 +10,7 @@ pythonPackages.buildPythonApplication rec {
     sha256 = "11f6css8rnh7qz55z7i81cnb5h9ys98fqxq3fps3hsh64zlydj52";
   };
 
-  buildInputs = [ pythonPackages.pbr ];
+  buildInputs = [ pythonPackages.pbr git ];
 
   propagatedBuildInputs = with pythonPackages; [
       dogpile_cache
diff --git a/pkgs/tools/package-management/opkg/default.nix b/pkgs/tools/package-management/opkg/default.nix
index d89d4c58af35..059f63495d1c 100644
--- a/pkgs/tools/package-management/opkg/default.nix
+++ b/pkgs/tools/package-management/opkg/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, curl, gpgme, libarchive, bzip2, lzma, attr, acl
+{ stdenv, fetchurl, pkgconfig, curl, gpgme, libarchive, bzip2, lzma, attr, acl, libxml2
 , autoreconfHook }:
 
 stdenv.mkDerivation rec {
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "1pw7igmb4miyxl11sj9g8p8pgxg9nmn1h2hzi8b23v44hcmc1inj";
   };
 
-  buildInputs = [ pkgconfig curl gpgme libarchive bzip2 lzma attr acl
+  buildInputs = [ pkgconfig curl gpgme libarchive bzip2 lzma attr acl libxml2
     autoreconfHook ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/package-management/packagekit/default.nix b/pkgs/tools/package-management/packagekit/default.nix
index dbac7be10d79..43f025fafa40 100644
--- a/pkgs/tools/package-management/packagekit/default.nix
+++ b/pkgs/tools/package-management/packagekit/default.nix
@@ -1,23 +1,23 @@
-{ stdenv, fetchFromGitHub, intltool, glib, pkgconfig, polkit, python, sqlite, systemd
+{ stdenv, fetchFromGitHub, lib
+, intltool, glib, pkgconfig, polkit, python, sqlite, systemd
 , gobjectIntrospection, vala, gtk_doc, autoreconfHook, autoconf-archive
 , nix, boost
 , enableCommandNotFound ? false
 , enableBashCompletion ? false, bashCompletion ? null }:
 
-with stdenv.lib;
-
 stdenv.mkDerivation rec {
-  name = "packagekit-2016-06-03";
+  name = "packagekit-${version}";
+  version = "1.1.3";
 
   src = fetchFromGitHub {
     owner = "hughsie";
     repo = "PackageKit";
-    rev = "99fd83bbb26badf43c6a17a9f0c6dc054c7484c8";
-    sha256 = "0y42vl6r1wh57sbjfkn4khjs78q54wshf4p0v4nly9s7hydxpi6a";
+    rev = "PACKAGEKIT_${lib.replaceStrings ["."] ["_"] version}";
+    sha256 = "150mpar7bhlvwfpwsr6zrjn3yggvklzr6nlhk0shaxnrfkfxvvb6";
   };
 
   buildInputs = [ glib polkit systemd python gobjectIntrospection vala ]
-                  ++ optional enableBashCompletion bashCompletion;
+                  ++ lib.optional enableBashCompletion bashCompletion;
   propagatedBuildInputs = [ sqlite nix boost ];
   nativeBuildInputs = [ intltool pkgconfig autoreconfHook autoconf-archive gtk_doc ];
 
@@ -38,8 +38,8 @@ stdenv.mkDerivation rec {
     "--with-dbus-sys=$(out)/etc/dbus-1/system.d"
     "--with-systemdsystemunitdir=$(out)/lib/systemd/system/"
   ]
-  ++ optional (!enableBashCompletion) "--disable-bash-completion"
-  ++ optional (!enableCommandNotFound) "--disable-command-not-found";
+  ++ lib.optional (!enableBashCompletion) "--disable-bash-completion"
+  ++ lib.optional (!enableCommandNotFound) "--disable-command-not-found";
 
   enableParallelBuilding = true;
 
@@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
     "localstatedir=\${TMPDIR}"
   ];
 
-  meta = {
+  meta = with lib; {
     description = "System to facilitate installing and updating packages";
     longDescription = ''
       PackageKit is a system designed to make installing and updating software
diff --git a/pkgs/tools/security/hologram/deps.json b/pkgs/tools/security/hologram/deps.json
index 177c960933e8..3d40bfd2cee0 100644
--- a/pkgs/tools/security/hologram/deps.json
+++ b/pkgs/tools/security/hologram/deps.json
@@ -1,19 +1,101 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/aybabtme/rgbterm",
-      "github.com/vaughan0/go-ini",
-      "github.com/howeyc/gopass",
-      "github.com/AdRoll/hologram",
-      "github.com/mitchellh/go-homedir",
-      "github.com/goamz/goamz",
-      "github.com/nmcclain/asn1-ber",
-      "gopkg.in/asn1-ber.v1",
-      "github.com/peterbourgon/g2s",
-      "github.com/nmcclain/ldap",
-      "github.com/golang/protobuf",
-      "golang.org/x/crypto"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/crypto",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/crypto",
+            "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
+            "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/golang/protobuf",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/golang/protobuf",
+            "rev": "59b73b37c1e45995477aae817e4a653c89a858db",
+            "sha256": "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/howeyc/gopass",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/howeyc/gopass",
+            "rev": "2c70fa70727c953c51695f800f25d6b44abb368e",
+            "sha256": "152lrkfxk205rlxiign0w5wb0fmfh910yz4jhlv4f4l1qr1h2lx8"
+        }
+    },
+    {
+        "goPackagePath": "github.com/aybabtme/rgbterm",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/aybabtme/rgbterm",
+            "rev": "c07e2f009ed2311e9c35bca12ec00b38ccd48283",
+            "sha256": "1qph7drds44jzx1whqlrh1hs58k0wv0v58zyq2a81hmm72gsgzam"
+        }
+    },
+    {
+        "goPackagePath": "github.com/vaughan0/go-ini",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/vaughan0/go-ini",
+            "rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1",
+            "sha256": "1l1isi3czis009d9k5awsj4xdxgbxn4n9yqjc1ac7f724x6jacfa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/mitchellh/go-homedir",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/mitchellh/go-homedir",
+            "rev": "1f6da4a72e57d4e7edd4a7295a585e0a3999a2d4",
+            "sha256": "1l5lrsjrnwxn299mhvyxvz8hd0spkx0d31gszm4cyx21bg1xsiy9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/goamz/goamz",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/goamz/goamz",
+            "rev": "2a8fed5e89ab9e16210fc337d1aac780e8c7bbb7",
+            "sha256": "0rlinp0cvgw66qjndg4padr5s0wd3n7kjfggkx6czqj9bqaxcz4b"
+        }
+    },
+    {
+        "goPackagePath": "github.com/nmcclain/asn1-ber",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/go-asn1-ber/asn1-ber",
+            "rev": "f4b6f4a84f5cde443d1925b5ec185ee93c2bdc72",
+            "sha256": "0qdyax6yw3hvplzqc2ykpihi3m5y4nii581ay0mxy9c54bzs2nk9"
+        }
+    },
+    {
+        "goPackagePath": "gopkg.in/asn1-ber.v1",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/go-asn1-ber/asn1-ber",
+            "rev": "f4b6f4a84f5cde443d1925b5ec185ee93c2bdc72",
+            "sha256": "0qdyax6yw3hvplzqc2ykpihi3m5y4nii581ay0mxy9c54bzs2nk9"
+        }
+    },
+    {
+        "goPackagePath": "github.com/peterbourgon/g2s",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/peterbourgon/g2s",
+            "rev": "ec76db4c1ac16400ac0e17ca9c4840e1d23da5dc",
+            "sha256": "1p4p8755v2nrn54rik7yifpg9szyg44y5rpp0kryx4ycl72307rj"
+        }
+    },
+    {
+        "goPackagePath": "github.com/nmcclain/ldap",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/go-ldap/ldap",
+            "rev": "83e65426fd1c06626e88aa8a085e5bfed0208e29",
+            "sha256": "179lwaf0hvczl8g4xzkpcpzq25p1b23f7399bx5zl55iin62d8yz"
+        }
+    }
 ]
diff --git a/pkgs/tools/security/nmap/default.nix b/pkgs/tools/security/nmap/default.nix
index 351654b60326..415f8f52a475 100644
--- a/pkgs/tools/security/nmap/default.nix
+++ b/pkgs/tools/security/nmap/default.nix
@@ -13,11 +13,11 @@
 with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "nmap${optionalString graphicalSupport "-graphical"}-${version}";
-  version = "7.01";
+  version = "7.12";
 
   src = fetchurl {
     url = "http://nmap.org/dist/nmap-${version}.tar.bz2";
-    sha256 = "01bpc820fmjl1vd08a3j9fpa84psaa7c3cxc8wpzabms8ckcs7yg";
+    sha256 = "014vagh9ak10hidwzp9s6g30y5h5fhsh8wykcnc1hnn9hwm0ipv3";
   };
 
   patches = ./zenmap.patch;
@@ -40,6 +40,6 @@ stdenv.mkDerivation rec {
     homepage    = http://www.nmap.org;
     license     = licenses.gpl2;
     platforms   = platforms.all;
-    maintainers = with maintainers; [ mornfall thoughtpolice ];
+    maintainers = with maintainers; [ mornfall thoughtpolice fpletz ];
   };
 }
diff --git a/pkgs/tools/security/shc/default.nix b/pkgs/tools/security/shc/default.nix
new file mode 100644
index 000000000000..5348ecce6479
--- /dev/null
+++ b/pkgs/tools/security/shc/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "shc-${version}";
+  version = "3.9.3";
+  rev = "${version}";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "neurobin";
+    repo = "shc";
+    sha256 = "00fqzg4a0f4kp4wr8swhi5zqds3gh3gf7cgi1cipn16av0818xsa";
+  };
+
+  meta = with stdenv.lib; {
+    homepage = http://neurobin.github.io/shc;
+    description = "Shell Script Compiler";
+    platforms = stdenv.lib.platforms.linux;
+    license = licenses.gpl3;
+  };
+}
diff --git a/pkgs/tools/security/thc-hydra/default.nix b/pkgs/tools/security/thc-hydra/default.nix
index a06754cb58d2..7fcde2a03509 100644
--- a/pkgs/tools/security/thc-hydra/default.nix
+++ b/pkgs/tools/security/thc-hydra/default.nix
@@ -1,29 +1,41 @@
-{ stdenv, fetchurl, pkgconfig, openssl, libidn, ncurses, pcre, libssh, postgresql92 }:
+{ stdenv, lib, fetchurl, zlib, openssl, ncurses, libidn, pcre, libssh, libmysql, postgresql
+, withGUI ? false, makeWrapper, pkgconfig, gtk2 }:
 
-with stdenv.lib;
+let
+  makeDirs = output: subDir: pkgs: lib.concatStringsSep " " (map (path: lib.getOutput output path + "/" + subDir) pkgs);
 
-stdenv.mkDerivation rec {
+in stdenv.mkDerivation rec {
   name = "thc-hydra-${version}";
-  version = "7.5";
+  version = "8.2";
 
   src = fetchurl {
     url = "http://www.thc.org/releases/hydra-${version}.tar.gz";
-    sha256 = "1dhavbn2mcm6c2c1qw29ipbpmczax3vhhlxzwn49c8cq471yg4vj";
+    sha256 = "1i2a5glmrxdjr80gfppx6wgakflcpj3ksgng212fjzhxr9m4k24y";
   };
 
   preConfigure = ''
-   substituteInPlace configure --replace "\$LIBDIRS" "${openssl.out}/lib ${pcre.out}/lib ${libssh.out}/lib ${postgresql92.lib}/lib"
-   substituteInPlace configure --replace "\$INCDIRS" "${openssl.dev}/include ${pcre.dev}/include ${libssh.dev}/include ${postgresql92}/include"
+    substituteInPlace configure \
+      --replace "\$LIBDIRS" "${makeDirs "lib" "lib" buildInputs}" \
+      --replace "\$INCDIRS" "${makeDirs "dev" "include" buildInputs}" \
+      --replace "/usr/include/math.h" "${lib.getDev stdenv.cc.libc}/include/math.h" \
+      --replace "libcurses.so" "libncurses.so" \
+      --replace "-lcurses" "-lncurses"
   '';
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ openssl libidn ncurses pcre libssh ];
+  nativeBuildInputs = lib.optionals withGUI [ pkgconfig makeWrapper ];
+  buildInputs = [ zlib openssl ncurses libidn pcre libssh libmysql postgresql ]
+                ++ lib.optional withGUI gtk2;
 
-  meta = {
+  postInstall = lib.optionalString withGUI ''
+    wrapProgram $out/bin/xhydra \
+      --add-flags --hydra-path --add-flags "$out/bin/hydra"
+  '';
+
+  meta = with stdenv.lib; {
     description = "A very fast network logon cracker which support many different services";
     license = licenses.agpl3;
     homepage = https://www.thc.org/thc-hydra/;
     maintainers = with maintainers; [offline];
-    platforms = platforms.unix;
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/tools/system/confd/deps.json b/pkgs/tools/system/confd/deps.json
index a3d9753927f1..407870efdaa3 100644
--- a/pkgs/tools/system/confd/deps.json
+++ b/pkgs/tools/system/confd/deps.json
@@ -1,15 +1,74 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/kelseyhightower/memkv",
-      "github.com/armon/consul-api",
-      "github.com/garyburd/redigo",
-      "github.com/samuel/go-zookeeper",
-      "github.com/BurntSushi/toml",
-      "github.com/Sirupsen/logrus",
-      "github.com/coreos/go-etcd",
-      "github.com/ugorji/go"
-    ]
-  }
+    {
+        "goPackagePath": "github.com/Sirupsen/logrus",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/Sirupsen/logrus",
+            "rev": "be52937128b38f1d99787bb476c789e2af1147f1",
+            "sha256": "1m6vvd4pg4lwglhk54lv5mf6cc8h7bi0d9zb3gar4crz531r66y4"
+        }
+    },
+    {
+        "goPackagePath": "github.com/coreos/go-etcd",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/coreos/go-etcd",
+            "rev": "9847b93751a5fbaf227b893d172cee0104ac6427",
+            "sha256": "1ihq01ayqzxvn6hca5j00vl189vi5lm78f0fy2wpk5mrm3xi01l4"
+        }
+    },
+    {
+        "goPackagePath": "github.com/ugorji/go",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/ugorji/go",
+            "rev": "03e33114d4d60a1f37150325e15f51b0fa6fc4f6",
+            "sha256": "01kdzgx23cgb4k867m1pvsw14hhdr9jf2frqy6i4j4221055m57v"
+        }
+    },
+    {
+        "goPackagePath": "github.com/samuel/go-zookeeper",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/samuel/go-zookeeper",
+            "rev": "5bb5cfc093ad18a28148c578f8632cfdb4d802e4",
+            "sha256": "1kpx1ymh7rds0b2km291idnyqi0zck74nd8hnk72crgz7wmpqv6z"
+        }
+    },
+    {
+        "goPackagePath": "github.com/BurntSushi/toml",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/BurntSushi/toml",
+            "rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4",
+            "sha256": "0gkgkw04ndr5y7hrdy0r4v2drs5srwfcw2bs1gyas066hwl84xyw"
+        }
+    },
+    {
+        "goPackagePath": "github.com/kelseyhightower/memkv",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/kelseyhightower/memkv",
+            "rev": "7f9c7f36f45ba80c62fe22779ee78d9b4ca36580",
+            "sha256": "090x65kr3gqh8fc8z4rm9hc2r0v0k7rfm5vsbmhdh21f48ixw540"
+        }
+    },
+    {
+        "goPackagePath": "github.com/armon/consul-api",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/armon/consul-api",
+            "rev": "f79efe463cdbb62f6d5a55f879a63ec554eb13e5",
+            "sha256": "1rkmzfhsazj9p2b6ywvs8yramzvxfxyvplzxi0ldvhcv04887gcp"
+        }
+    },
+    {
+        "goPackagePath": "github.com/garyburd/redigo",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/garyburd/redigo",
+            "rev": "535138d7bcd717d6531c701ef5933d98b1866257",
+            "sha256": "1m7nc1gvv5yqnq8ii75f33485il6y6prf8gxl97dimsw94qccc5v"
+        }
+    }
 ]
diff --git a/pkgs/tools/system/datefudge/default.nix b/pkgs/tools/system/datefudge/default.nix
new file mode 100644
index 000000000000..d2d14ddd110b
--- /dev/null
+++ b/pkgs/tools/system/datefudge/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchgit }:
+
+stdenv.mkDerivation rec {
+  pname = "datefudge";
+  version = "1.2.1";
+  name = "${pname}-${version}";
+
+  src = fetchgit {
+    sha256 = "0l83kn6c3jr3wzs880zfa64rw81cqjjk55gjxz71rjf2balp64ps";
+    url = "git://anonscm.debian.org/users/robert/datefudge.git";
+    rev = "cd141c63bebe9b579109b2232b5e83db18f222c2";
+  };
+
+  patchPhase = ''
+    substituteInPlace Makefile \
+     --replace "/usr" "/" \
+     --replace "-o root -g root" ""
+    substituteInPlace datefudge.sh \
+     --replace "@LIBDIR@" "$out/lib/"
+    '';
+
+  preInstallPhase = "mkdir -P $out/lib/datefudge";
+
+  installFlags = [ "DESTDIR=$(out)" ];
+
+  postInstall = "chmod +x $out/lib/datefudge/datefudge.so";
+
+  meta = with stdenv.lib; {
+    description = "Fake the system date";
+    longDescription = ''
+      datefudge is a small utility that pretends that the system time is
+      different by pre-loading a small library which modifies the time,
+      gettimeofday and clock_gettime system calls.
+    '';
+    homepage = http://packages.qa.debian.org/d/datefudge.html;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ leenaars ];
+  };
+}
diff --git a/pkgs/tools/system/freeipmi/default.nix b/pkgs/tools/system/freeipmi/default.nix
index 44e249102965..76f640711a88 100644
--- a/pkgs/tools/system/freeipmi/default.nix
+++ b/pkgs/tools/system/freeipmi/default.nix
@@ -1,12 +1,12 @@
 { fetchurl, stdenv, libgcrypt, readline }:
 
 stdenv.mkDerivation rec {
-  version = "1.5.2";
+  version = "1.5.3";
   name = "freeipmi-${version}";
 
   src = fetchurl {
     url = "mirror://gnu/freeipmi/${name}.tar.gz";
-    sha256 = "0xgfwk6lxwwzq8pbyxjl5xxpybs9p4qwgb7q0ykf048xwxha4kvk";
+    sha256 = "0s4q7imc4r3g9lkd92bnvw70679q83b0irrlw895i5nc05dj4djx";
   };
 
   buildInputs = [ libgcrypt readline ];
diff --git a/pkgs/tools/system/wsmancli/default.nix b/pkgs/tools/system/wsmancli/default.nix
index 5449d53229c8..d66d4b575783 100644
--- a/pkgs/tools/system/wsmancli/default.nix
+++ b/pkgs/tools/system/wsmancli/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, autoconf, automake, libtool, pkgconfig, openwsman }:
+{ fetchurl, stdenv, autoconf, automake, libtool, pkgconfig, openwsman, openssl }:
 
 stdenv.mkDerivation rec {
   version = "2.6.0";
@@ -9,9 +9,15 @@ stdenv.mkDerivation rec {
     sha256 = "03ay6sa4ii8h6rr3l2qiqqml8xl6gplrlg4v2avdh9y6sihfyvvn";
   };
 
-  buildInputs = [ autoconf automake libtool pkgconfig openwsman ];
+  buildInputs = [ autoconf automake libtool pkgconfig openwsman openssl ];
 
-  preConfigure = "./bootstrap";
+  preConfigure = ''
+    ./bootstrap
+
+    configureFlagsArray=(
+      LIBS="-L${openssl}/lib -lssl -lcrypto"
+    )
+  '';
 
   meta = {
     description = "Openwsman command-line client";
diff --git a/pkgs/tools/text/par/default.nix b/pkgs/tools/text/par/default.nix
new file mode 100644
index 000000000000..c7a686201b0d
--- /dev/null
+++ b/pkgs/tools/text/par/default.nix
@@ -0,0 +1,36 @@
+{stdenv, fetchurl, fetchpatch}:
+
+stdenv.mkDerivation {
+  name = "par-1.52";
+
+  src = fetchurl {
+    url = http://www.nicemice.net/par/Par152.tar.gz;
+    sha256 = "33dcdae905f4b4267b4dc1f3efb032d79705ca8d2122e17efdecfd8162067082";
+  };
+
+  patches = [
+    # A patch by Jérôme Pouiller that adds support for multibyte
+    # charsets (like UTF-8), plus Debian packaging.
+    (fetchpatch {
+      url = "http://sysmic.org/dl/par/par-1.52-i18n.4.patch";
+      sha256 = "0alw44lf511jmr38jnh4j0mpp7vclgy0grkxzqf7q158vzdb6g23";
+    })
+  ];
+
+  buildPhase = ''make -f protoMakefile'';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp par $out/bin
+
+    mkdir -p $out/share/man/man1
+    cp  par.1 $out/share/man/man1
+  '';
+
+
+  meta = {
+    homepage = http://www.nicemice.net/par/;
+    description = "Paragraph reflow for email";
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/pkgs/tools/text/platinum-searcher/deps.json b/pkgs/tools/text/platinum-searcher/deps.json
index fc137e262983..5578478eb4c3 100644
--- a/pkgs/tools/text/platinum-searcher/deps.json
+++ b/pkgs/tools/text/platinum-searcher/deps.json
@@ -1,16 +1,83 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-      "github.com/BurntSushi/toml",
-      "github.com/monochromegane/conflag",
-      "github.com/monochromegane/go-home",
-      "github.com/monochromegane/terminal",
-      "github.com/monochromegane/go-gitignore",
-      "github.com/shiena/ansicolor",
-      "golang.org/x/text",
-      "gopkg.in/yaml.v2",
-      "github.com/jessevdk/go-flags"
-    ]
-  }
+    {
+        "goPackagePath": "gopkg.in/yaml.v2",
+        "fetch": {
+            "type": "git",
+            "url": "https://gopkg.in/yaml.v2",
+            "rev": "a83829b6f1293c91addabc89d0571c246397bbf4",
+            "sha256": "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh"
+        }
+    },
+    {
+        "goPackagePath": "github.com/jessevdk/go-flags",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/jessevdk/go-flags",
+            "rev": "1b89bf73cd2c3a911d7b2a279ab085c4a18cf539",
+            "sha256": "027nglc5xx1cm03z9sisg0iqrhwcj6gh5z254rrpl8p4fwrxx680"
+        }
+    },
+    {
+        "goPackagePath": "github.com/BurntSushi/toml",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/BurntSushi/toml",
+            "rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4",
+            "sha256": "0gkgkw04ndr5y7hrdy0r4v2drs5srwfcw2bs1gyas066hwl84xyw"
+        }
+    },
+    {
+        "goPackagePath": "golang.org/x/text",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/text",
+            "rev": "5eb8d4684c4796dd36c74f6452f2c0fa6c79597e",
+            "sha256": "1cjwm2pv42dbfqc6ylr7jmma902zg4gng5aarqrbjf1k2nf2vs14"
+        }
+    },
+    {
+        "goPackagePath": "github.com/monochromegane/conflag",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/monochromegane/conflag",
+            "rev": "6d68c9aa4183844ddc1655481798fe4d90d483e9",
+            "sha256": "0csfr5c8d3kbna9sqhzfp2z06wq6mc6ijja1zj2i82kzsq8534wa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/monochromegane/go-home",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/monochromegane/go-home",
+            "rev": "25d9dda593924a11ea52e4ffbc8abdb0dbe96401",
+            "sha256": "172chakrj22xfm0bcda4qj5zqf7lwr53pzwc3xj6wz8vd2bcxkww"
+        }
+    },
+    {
+        "goPackagePath": "github.com/monochromegane/terminal",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/monochromegane/terminal",
+            "rev": "2da212063ce19aed90ee5bbb00ad1ad7393d7f48",
+            "sha256": "1rddaq9pk5q57ildms35iihghqk505gb349pb0f6k3svchay38nh"
+        }
+    },
+    {
+        "goPackagePath": "github.com/monochromegane/go-gitignore",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/monochromegane/go-gitignore",
+            "rev": "38717d0a108ca0e5af632cd6845ca77d45b50729",
+            "sha256": "0r1inabpgg6sn6i47b02hcmd2p4dc1ab1mcy20mn1b2k3mpdj4b7"
+        }
+    },
+    {
+        "goPackagePath": "github.com/shiena/ansicolor",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/shiena/ansicolor",
+            "rev": "a5e2b567a4dd6cc74545b8a4f27c9d63b9e7735b",
+            "sha256": "0gwplb1b4fvav1vjf4b2dypy5rcp2w41vrbxkd1dsmac870cy75p"
+        }
+    }
 ]
diff --git a/pkgs/tools/text/reckon/Gemfile b/pkgs/tools/text/reckon/Gemfile
new file mode 100644
index 000000000000..f708ddd93664
--- /dev/null
+++ b/pkgs/tools/text/reckon/Gemfile
@@ -0,0 +1,2 @@
+source 'https://rubygems.org'
+gem 'reckon'
diff --git a/pkgs/tools/text/reckon/Gemfile.lock b/pkgs/tools/text/reckon/Gemfile.lock
new file mode 100644
index 000000000000..0ede7e2a2564
--- /dev/null
+++ b/pkgs/tools/text/reckon/Gemfile.lock
@@ -0,0 +1,21 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    chronic (0.10.2)
+    fastercsv (1.5.5)
+    highline (1.7.8)
+    reckon (0.4.4)
+      chronic (>= 0.3.0)
+      fastercsv (>= 1.5.1)
+      highline (>= 1.5.2)
+      terminal-table (>= 1.4.2)
+    terminal-table (1.6.0)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  reckon
+
+BUNDLED WITH
+   1.12.5
diff --git a/pkgs/tools/text/reckon/default.nix b/pkgs/tools/text/reckon/default.nix
new file mode 100644
index 000000000000..370fcf265d51
--- /dev/null
+++ b/pkgs/tools/text/reckon/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, bundlerEnv, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name = "reckon-${version}";
+  version = "0.4.4";
+
+  env = bundlerEnv {
+    name = "${name}-gems";
+
+    gemfile = ./Gemfile;
+    lockfile = ./Gemfile.lock;
+    gemset = ./gemset.nix;
+  };
+
+  phases = [ "installPhase" ];
+
+  buildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    makeWrapper ${env}/bin/reckon $out/bin/reckon
+  '';
+
+  meta = with lib; {
+    description = "Flexibly import bank account CSV files into Ledger for command line accounting";
+    license = licenses.mit;
+    maintainers = "mckean.kylej@gmail.com";
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/tools/text/reckon/gemset.nix b/pkgs/tools/text/reckon/gemset.nix
new file mode 100644
index 000000000000..e1e4a43188df
--- /dev/null
+++ b/pkgs/tools/text/reckon/gemset.nix
@@ -0,0 +1,42 @@
+{
+  chronic = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1hrdkn4g8x7dlzxwb1rfgr8kw3bp4ywg5l4y4i9c2g5cwv62yvvn";
+      type = "gem";
+    };
+    version = "0.10.2";
+  };
+  fastercsv = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1df3vfgw5wg0s405z0pj0rfcvnl9q6wak7ka8gn0xqg4cag1k66h";
+      type = "gem";
+    };
+    version = "1.5.5";
+  };
+  highline = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1nf5lgdn6ni2lpfdn4gk3gi47fmnca2bdirabbjbz1fk9w4p8lkr";
+      type = "gem";
+    };
+    version = "1.7.8";
+  };
+  reckon = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1p6w8w7vpl8fq4yfggrxbv6ph76psg7l5b4q29a8zvfbzzx6a0xw";
+      type = "gem";
+    };
+    version = "0.4.4";
+  };
+  terminal-table = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0hbmzfr17ji5ws5x5z3kypmb5irwwss7q7kkad0gs005ibqrxv0a";
+      type = "gem";
+    };
+    version = "1.6.0";
+  };
+}
\ No newline at end of file
diff --git a/pkgs/tools/text/sift/deps.json b/pkgs/tools/text/sift/deps.json
index 649660353ad2..3869e6e5ca9a 100644
--- a/pkgs/tools/text/sift/deps.json
+++ b/pkgs/tools/text/sift/deps.json
@@ -1,10 +1,29 @@
 [
-  {
-    "include": "../../libs.json",
-    "packages": [
-        "github.com/svent/go-flags",
-        "github.com/svent/go-nbreader",
-        "golang.org/x/crypto"
-    ]
-  }
+    {
+        "goPackagePath": "golang.org/x/crypto",
+        "fetch": {
+            "type": "git",
+            "url": "https://go.googlesource.com/crypto",
+            "rev": "575fdbe86e5dd89229707ebec0575ce7d088a4a6",
+            "sha256": "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa"
+        }
+    },
+    {
+        "goPackagePath": "github.com/svent/go-flags",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/svent/go-flags",
+            "rev": "4bcbad344f0318adaf7aabc16929701459009aa3",
+            "sha256": "1gb416fgxl9gq4q6wsv3i2grq1mzbi7lvfvmfdqbxqbv9vizzh34"
+        }
+    },
+    {
+        "goPackagePath": "github.com/svent/go-nbreader",
+        "fetch": {
+            "type": "git",
+            "url": "https://github.com/svent/go-nbreader",
+            "rev": "7cef48da76dca6a496faa7fe63e39ed665cbd219",
+            "sha256": "0hw11jj5r3f6qwydg41nc3c6aadlbkhc1qpxra2609lis0qa9h4r"
+        }
+    }
 ]
diff --git a/pkgs/tools/typesetting/hevea/default.nix b/pkgs/tools/typesetting/hevea/default.nix
index f3ef746fedfc..0e87ef5dacc1 100644
--- a/pkgs/tools/typesetting/hevea/default.nix
+++ b/pkgs/tools/typesetting/hevea/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, ocaml }:
 
 stdenv.mkDerivation rec {
-  name = "hevea-2.28";
+  name = "hevea-2.29";
 
   src = fetchurl {
     url = "http://pauillac.inria.fr/~maranget/hevea/distri/${name}.tar.gz";
-    sha256 = "14fns13wlnpiv9i05841kvi3cq4b9v2sw5x3ff6ziws28q701qnd";
+    sha256 = "1i7qkar6gjpsxqgdm90xxgp15z7gfyja0rn62n23a9aahc0hpgq6";
   };
 
   buildInputs = [ ocaml ];
diff --git a/pkgs/tools/typesetting/tex/texlive-new/bin.nix b/pkgs/tools/typesetting/tex/texlive-new/bin.nix
index f497444eb39a..b98b9103ce74 100644
--- a/pkgs/tools/typesetting/tex/texlive-new/bin.nix
+++ b/pkgs/tools/typesetting/tex/texlive-new/bin.nix
@@ -3,7 +3,7 @@
 , zlib, bzip2, ncurses, libpng, flex, bison, libX11, libICE, xproto
 , freetype, t1lib, gd, libXaw, icu, ghostscript, ed, libXt, libXpm, libXmu, libXext
 , xextproto, perl, libSM, ruby, expat, curl, libjpeg, python, fontconfig, pkgconfig
-, poppler, libpaper, graphite2, lesstif, zziplib, harfbuzz, texinfo, potrace, gmp, mpfr
+, poppler, libpaper, graphite2, zziplib, harfbuzz, texinfo, potrace, gmp, mpfr
 , xpdf, cairo, pixman, xorg, clisp
 , makeWrapper
 }:
diff --git a/pkgs/tools/video/atomicparsley/default.nix b/pkgs/tools/video/atomicparsley/default.nix
index 9cabfe31a188..bb44fe044e81 100644
--- a/pkgs/tools/video/atomicparsley/default.nix
+++ b/pkgs/tools/video/atomicparsley/default.nix
@@ -1,7 +1,7 @@
 { stdenv, pkgs, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "${product}-${version}";
+  name = "atomicparsley-${version}";
   product = "AtomicParsley";
   version = "0.9.0";
 
@@ -10,12 +10,20 @@ stdenv.mkDerivation rec {
     sha256 = "de83f219f95e6fe59099b277e3ced86f0430ad9468e845783092821dff15a72e";
   };
 
-  buildInputs = with pkgs; [ unzip ];
+  buildInputs = with pkgs; [ unzip ]
+    ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ];
   patches = [ ./casts.patch ];
   setSourceRoot = "sourceRoot=${product}-source-${version}";
   buildPhase = "bash build";
   installPhase = "install -D AtomicParsley $out/bin/AtomicParsley";
 
+  postPatch = ''
+    substituteInPlace build \
+      --replace 'g++' 'c++'
+    substituteInPlace AP_NSImage.mm \
+      --replace '_NSBitmapImageFileType' 'NSBitmapImageFileType'
+  '';
+
   meta = with stdenv.lib; {
     description = ''
       A lightweight command line program for reading, parsing and
diff --git a/pkgs/tools/virtualization/nixos-container/nixos-container.pl b/pkgs/tools/virtualization/nixos-container/nixos-container.pl
index 7ad8d34344cc..1dfe4567d8df 100755
--- a/pkgs/tools/virtualization/nixos-container/nixos-container.pl
+++ b/pkgs/tools/virtualization/nixos-container/nixos-container.pl
@@ -48,7 +48,7 @@ GetOptions(
     "ensure-unique-name" => \$ensureUniqueName,
     "auto-start" => \$autoStart,
     "system-path=s" => \$systemPath,
-    "signal=s" => \$signal
+    "signal=s" => \$signal,
     "nixos-path=s" => \$nixosPath,
     "config=s" => \$extraConfig,
     "config-file=s" => \$configFile
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 408209d63074..42cf49c1143d 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -728,6 +728,8 @@ in
 
   datamash = callPackage ../tools/misc/datamash { };
 
+  datefudge = callPackage ../tools/system/datefudge { };
+
   ddate = callPackage ../tools/misc/ddate { };
 
   deis = callPackage ../development/tools/deis {};
@@ -740,6 +742,8 @@ in
 
   dialog = callPackage ../development/tools/misc/dialog { };
 
+  dibbler = callPackage ../tools/networking/dibbler { };
+
   ding = callPackage ../applications/misc/ding {
     aspellDicts_de = aspellDicts.de;
     aspellDicts_en = aspellDicts.en;
@@ -1526,6 +1530,8 @@ in
 
     hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { };
 
+    unikey = callPackage ../tools/inputmethods/fcitx-engines/fcitx-unikey { };
+    
     m17n = callPackage ../tools/inputmethods/fcitx-engines/fcitx-m17n { };
 
     mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc {
@@ -2198,6 +2204,8 @@ in
 
   keybase-go = callPackage ../tools/security/keybase { };
 
+  kbfs = callPackage ../tools/security/kbfs { };
+
   keychain = callPackage ../tools/misc/keychain { };
 
   keyfuzz = callPackage ../tools/inputmethods/keyfuzz { };
@@ -2382,8 +2390,12 @@ in
 
   libevhtp = callPackage ../development/libraries/libevhtp { };
 
+  libircclient = callPackage ../development/libraries/libircclient { };
+
   liboauth = callPackage ../development/libraries/liboauth { };
 
+  libsidplayfp = callPackage ../development/libraries/libsidplayfp { };
+
   libsrs2 = callPackage ../development/libraries/libsrs2 { };
 
   libtermkey = callPackage ../development/libraries/libtermkey { };
@@ -3309,6 +3321,8 @@ in
 
   replace = callPackage ../tools/text/replace { };
 
+  reckon = callPackage ../tools/text/reckon { };
+
   reposurgeon = callPackage ../applications/version-management/reposurgeon { };
 
   reptyr = callPackage ../os-specific/linux/reptyr {};
@@ -3967,6 +3981,8 @@ in
 
   uemacs = callPackage ../applications/editors/uemacs { };
 
+  uftp = callPackage ../servers/uftp { };
+
   uhttpmock = callPackage ../development/libraries/uhttpmock { };
 
   uim = callPackage ../tools/inputmethods/uim {
@@ -4219,6 +4235,8 @@ in
 
   zimwriterfs = callPackage ../tools/text/zimwriterfs { };
 
+  par = callPackage ../tools/text/par { };
+
   zip = callPackage ../tools/archivers/zip { };
 
   zkfuse = callPackage ../tools/filesystems/zkfuse { };
@@ -4375,6 +4393,7 @@ in
     else {}
   ) // {
     ocamlPackages = ocamlPackages_4_02;
+    coq = coq_8_5;
   });
 
   cryptol = self.haskell.packages.lts.cryptol;
@@ -5477,7 +5496,9 @@ in
   rust = rustStable;
   rustStable = callPackage ../development/compilers/rust {};
   rustBeta = lowPrio (callPackage ../development/compilers/rust/beta.nix {});
-  rustUnstable = lowPrio (callPackage ../development/compilers/rust/head.nix {});
+  rustUnstable = lowPrio (callPackage ../development/compilers/rust/head.nix {
+    rustPlatform = recurseIntoAttrs (makeRustPlatform rustBeta);
+  });
 
   cargo = rust.cargo;
   rustc = rust.rustc;
@@ -6769,6 +6790,8 @@ in
     target = crossSystem;
   });
 
+  gdb-multitarget = lowPrio (gdb.override { multitarget = true; });
+
   valgrind = callPackage ../development/tools/analysis/valgrind { };
 
   valkyrie = callPackage ../development/tools/analysis/valkyrie { };
@@ -7172,7 +7195,7 @@ in
     inherit (darwin.apple_sdk.frameworks) Cocoa;
   };
   ffmpeg_3_1 = callPackage ../development/libraries/ffmpeg/3.1.nix {
-    inherit (darwin.apple_sdk.frameworks) Cocoa;
+    inherit (darwin.apple_sdk.frameworks) Cocoa CoreMedia;
   };
   # Aliases
   ffmpeg_0 = self.ffmpeg_0_10;
@@ -7380,6 +7403,10 @@ in
   glm = callPackage ../development/libraries/glm { };
   glm_0954 = callPackage ../development/libraries/glm/0954.nix { };
 
+  globalplatform = callPackage ../development/libraries/globalplatform { };
+  gppcscconnectionplugin =
+    callPackage ../development/libraries/globalplatform/gppcscconnectionplugin.nix { };
+
   glog = callPackage ../development/libraries/glog { };
 
   gloox = callPackage ../development/libraries/gloox { };
@@ -7500,6 +7527,8 @@ in
 
   gpgstats = callPackage ../tools/security/gpgstats { };
 
+  gpshell = callPackage ../development/tools/misc/gpshell { };
+
   grantlee = callPackage ../development/libraries/grantlee { };
 
   gsasl = callPackage ../development/libraries/gsasl { };
@@ -8203,7 +8232,9 @@ in
 
   librevisa = callPackage ../development/libraries/librevisa { };
 
-  libsamplerate = callPackage ../development/libraries/libsamplerate { };
+  libsamplerate = callPackage ../development/libraries/libsamplerate {
+    inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon CoreServices;
+  };
 
   libsieve = callPackage ../development/libraries/libsieve { };
 
@@ -8292,7 +8323,9 @@ in
 
   libmicrohttpd = callPackage ../development/libraries/libmicrohttpd { };
 
-  libmikmod = callPackage ../development/libraries/libmikmod { };
+  libmikmod = callPackage ../development/libraries/libmikmod {
+    inherit (darwin.apple_sdk.frameworks) CoreAudio;
+  };
 
   libmilter = callPackage ../development/libraries/libmilter { };
 
@@ -8684,6 +8717,7 @@ in
   mbedtls = callPackage ../development/libraries/mbedtls { };
 
   mdds_0_7_1 = callPackage ../development/libraries/mdds/0.7.1.nix { };
+  mdds_0_12_1 = callPackage ../development/libraries/mdds/0.12.1.nix { };
   mdds = callPackage ../development/libraries/mdds { };
 
   mediastreamer = callPackage ../development/libraries/mediastreamer { };
@@ -8780,9 +8814,7 @@ in
     texinfo = texinfo4;
   };
 
-  mueval = callPackage ../development/tools/haskell/mueval {
-    haskellPackages = haskell.packages.lts;
-  };
+  mueval = callPackage ../development/tools/haskell/mueval { };
 
   muparser = callPackage ../development/libraries/muparser { };
 
@@ -8829,6 +8861,8 @@ in
     nix = pkgs.nixUnstable;
   };
 
+  nlohmann_json = callPackage ../development/libraries/nlohmann_json { };
+
   nntp-proxy = callPackage ../applications/networking/nntp-proxy { };
 
   non = callPackage ../applications/audio/non { };
@@ -9047,6 +9081,8 @@ in
 
   protobuf = protobuf2_6;
   protobuf3_0 = lowPrio (callPackage ../development/libraries/protobuf/3.0.nix { });
+  # 3.0.0-beta-2 is only introduced for tensorflow. remove this version when tensorflow is moved to 3.0.
+  protobuf3_0_0b2 = lowPrio (callPackage ../development/libraries/protobuf/3.0.0-beta-2.nix { });
   protobuf2_6 = callPackage ../development/libraries/protobuf/2.6.nix { };
   protobuf2_5 = callPackage ../development/libraries/protobuf/2.5.nix { };
 
@@ -9225,7 +9261,6 @@ in
 
   lambdabot = callPackage ../development/tools/haskell/lambdabot {
     haskell-lib = haskell.lib;
-    haskellPackages = haskell.packages.lts;
   };
 
   leksah = callPackage ../development/tools/haskell/leksah {
@@ -11048,7 +11083,10 @@ in
   klibcShrunk = lowPrio (callPackage ../os-specific/linux/klibc/shrunk.nix { });
 
   linux_mptcp = callPackage ../os-specific/linux/kernel/linux-mptcp.nix {
-    kernelPatches = [ kernelPatches.bridge_stp_helper ]
+    kernelPatches =
+      [ kernelPatches.bridge_stp_helper
+        kernelPatches.hiddev_CVE_2016_5829
+      ]
       ++ lib.optionals ((platform.kernelArch or null) == "mips")
       [ kernelPatches.mips_fpureg_emu
         kernelPatches.mips_fpu_sigill
@@ -11111,7 +11149,6 @@ in
   linux_4_4 = callPackage ../os-specific/linux/kernel/linux-4.4.nix {
     kernelPatches =
       [ kernelPatches.bridge_stp_helper
-        kernelPatches.ecryptfs_fix_mmap_bug
       ]
       ++ lib.optionals ((platform.kernelArch or null) == "mips")
       [ kernelPatches.mips_fpureg_emu
@@ -11123,7 +11160,6 @@ in
   linux_4_5 = callPackage ../os-specific/linux/kernel/linux-4.5.nix {
     kernelPatches =
       [ kernelPatches.bridge_stp_helper
-        kernelPatches.qat_common_Makefile
         kernelPatches.hiddev_CVE_2016_5829
       ]
       ++ lib.optionals ((platform.kernelArch or null) == "mips")
@@ -11750,8 +11786,6 @@ in
 
   udisks_glue = callPackage ../os-specific/linux/udisks-glue { };
 
-  uksmtools = callPackage ../os-specific/linux/uksmtools { };
-
   untie = callPackage ../os-specific/linux/untie { };
 
   upower = callPackage ../os-specific/linux/upower { };
@@ -12102,7 +12136,7 @@ in
   stix-otf = callPackage ../data/fonts/stix-otf { };
 
   inherit (callPackages ../data/fonts/gdouros { })
-    aegean textfonts symbola aegyptus akkadian anatolian maya unidings musica analecta;
+    symbola aegyptus akkadian anatolian maya unidings musica analecta;
 
   iana_etc = callPackage ../data/misc/iana-etc { };
 
@@ -12257,6 +12291,19 @@ in
 
   amsn = callPackage ../applications/networking/instant-messengers/amsn { };
 
+  # Oracle JDK is recommended upstream, but unfree and requires a manual
+  # download. OpenJDK is straightforward, but may suffer from compatibility
+  # problems e.g. https://code.google.com/p/android/issues/detail?id=174496.
+  # To use Oracle JDK add an override to ~/.nixpkgs/config.nix:
+  # {
+  #   packageOverrides = pkgs: {
+  #     android-studio = pkgs.android-studio.override {
+  #       jdk = pkgs.oraclejdk8;
+  #     };
+  #   };
+  # }
+  android-studio = callPackage ../applications/editors/android-studio { };
+
   antimony = qt5.callPackage ../applications/graphics/antimony {};
 
   antiword = callPackage ../applications/office/antiword {};
@@ -12988,6 +13035,8 @@ in
 
   fbreader = callPackage ../applications/misc/fbreader { };
 
+  fehlstart = callPackage ../applications/misc/fehlstart { };
+
   fetchmail = callPackage ../applications/misc/fetchmail { };
 
   flacon = callPackage ../applications/audio/flacon { };
@@ -13687,7 +13736,6 @@ in
     inherit (gnome) GConf ORBit2 gnome_vfs;
     inherit (gnome3) gsettings_desktop_schemas defaultIconTheme;
     zip = zip.override { enableNLS = false; };
-    #glm = glm_0954;
     bluez5 = bluez5_28;
     fontsConf = makeFontsConf {
       fontDirectories = [
@@ -13713,6 +13761,7 @@ in
         freefont_ttf xorg.fontmiscmisc xorg.fontbhttf
       ];
     };
+    mdds = mdds_0_12_1;
     clucene_core = clucene_core_2;
     lcms = lcms2;
     harfbuzz = harfbuzz.override {
@@ -15796,6 +15845,10 @@ in
 
   pong3d = callPackage ../games/pong3d { };
 
+  pokerth = callPackage ../games/pokerth { };
+
+  pokerth-server = with callPackage ../games/pokerth { }; server;
+
   prboom = callPackage ../games/prboom { };
 
   privateer = callPackage ../games/privateer { };
@@ -16359,6 +16412,8 @@ in
 
     konversation = callPackage ../applications/networking/irc/konversation/1.6.nix { };
 
+    kronometer = callPackage ../tools/misc/kronometer { };
+
     krita = callPackage ../applications/graphics/krita {
       vc = vc_0_7;
       openjpeg = openjpeg_1;
@@ -16525,7 +16580,7 @@ in
 
   openspecfun = callPackage ../development/libraries/science/math/openspecfun {};
 
-  LiE = callPackage ../applications/science/math/LiE { };
+  lie = callPackage ../applications/science/math/LiE { };
 
   magma = callPackage ../development/libraries/science/math/magma { };
 
@@ -16854,6 +16909,8 @@ in
 
   gap = callPackage ../applications/science/math/gap { };
 
+  geogebra = callPackage ../applications/science/math/geogebra { };
+
   maxima = callPackage ../applications/science/math/maxima { };
 
   wxmaxima = callPackage ../applications/science/math/wxmaxima { wxGTK = wxGTK30; };
@@ -17286,6 +17343,8 @@ in
 
   sailsd = callPackage ../misc/sailsd { };
 
+  shc = callPackage ../tools/security/shc { };
+
   canon-cups-ufr2 = callPackage ../misc/cups/drivers/canon { };
 
   mfcj470dw = callPackage_i686 ../misc/cups/drivers/mfcj470dw { };
@@ -17561,6 +17620,8 @@ in
     qt = qt4;
   };
 
+  yadm = callPackage ../applications/version-management/yadm { };
+
   yafc = callPackage ../applications/networking/yafc { };
 
   yamdi = callPackage ../tools/video/yamdi { };
diff --git a/pkgs/top-level/node-packages-generated.nix b/pkgs/top-level/node-packages-generated.nix
index 808a197ad3d8..dbaa35cf7a6a 100644
--- a/pkgs/top-level/node-packages-generated.nix
+++ b/pkgs/top-level/node-packages-generated.nix
@@ -48024,6 +48024,8 @@
   "timezone" = self.by-version."timezone"."1.0.4";
   by-spec."tinycolor"."0.x" =
     self.by-version."tinycolor"."0.0.1";
+  by-spec."tinycolor"."0.0.x" =
+    self.by-version."tinycolor"."0.0.1";
   by-version."tinycolor"."0.0.1" = self.buildNodePackage {
     name = "tinycolor-0.0.1";
     version = "0.0.1";
@@ -52276,6 +52278,8 @@
   };
   by-spec."ws"."0.8.1" =
     self.by-version."ws"."0.8.1";
+  by-spec."ws"."0.8.x" =
+    self.by-version."ws"."0.8.1";
   by-version."ws"."0.8.1" = self.buildNodePackage {
     name = "ws-0.8.1";
     version = "0.8.1";
@@ -52341,6 +52345,29 @@
   };
   by-spec."ws"."^1.0.1" =
     self.by-version."ws"."1.1.0";
+  by-spec."wscat"."*" =
+    self.by-version."wscat"."1.0.1";
+  by-version."wscat"."1.0.1" = self.buildNodePackage {
+    name = "wscat-1.0.1";
+    version = "1.0.1";
+    bin = true;
+    src = fetchurl {
+      url = "https://registry.npmjs.org/wscat/-/wscat-1.0.1.tgz";
+      name = "wscat-1.0.1.tgz";
+      sha1 = "542b47c1c27334c64ececef9c2db02faf6212964";
+    };
+    deps = {
+      "commander-2.8.1" = self.by-version."commander"."2.8.1";
+      "tinycolor-0.0.1" = self.by-version."tinycolor"."0.0.1";
+      "ws-0.8.1" = self.by-version."ws"."0.8.1";
+    };
+    optionalDependencies = {
+    };
+    peerDependencies = [];
+    os = [ ];
+    cpu = [ ];
+  };
+  "wscat" = self.by-version."wscat"."1.0.1";
   by-spec."wu"."*" =
     self.by-version."wu"."2.1.0";
   by-version."wu"."2.1.0" = self.buildNodePackage {
diff --git a/pkgs/top-level/node-packages.json b/pkgs/top-level/node-packages.json
index a8bd2e05ec0a..9cb059ca136f 100644
--- a/pkgs/top-level/node-packages.json
+++ b/pkgs/top-level/node-packages.json
@@ -180,6 +180,7 @@
 , "webdrvr"
 , "webpack"
 , "winston"
+, "wscat"
 , "wu"
 , "x509"
 , { "guifi-earth": "https://github.com/jmendeth/guifi-earth/tarball/f3ee96835fd4fb0e3e12fadbd2cb782770d64854 " }
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index dd89a7c658c1..8e4896b3fee7 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -5308,12 +5308,13 @@ let self = _self // overrides; _self = with self; {
     };
   };
 
-  FileSlurper = buildPerlPackage {
-    name = "File-Slurper-0.008";
+  FileSlurper = buildPerlPackage rec {
+    name = "File-Slurper-0.009";
     src = fetchurl {
-      url = mirror://cpan/authors/id/L/LE/LEONT/File-Slurper-0.008.tar.gz;
-      sha256 = "10f685140e2cebdd0381f24b010b028f9ca2574361a78f99f4dfe87af5d5d233";
+      url = "mirror://cpan/authors/id/L/LE/LEONT/${name}.tar.gz";
+      sha256 = "3eab340deff6ba5456e7d1156b9cfcc387e1243acfc156ff92b75b3f2e120b91";
     };
+    buildInputs = [ TestWarnings ];
     meta = {
       description = "A simple, sane and efficient module to slurp a file";
       license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
@@ -7399,11 +7400,12 @@ let self = _self // overrides; _self = with self; {
   };
 
   LogHandler = buildPerlPackage rec {
-    name = "Log-Handler-0.87";
+    name = "Log-Handler-0.88";
     src = fetchurl {
       url = "mirror://cpan/authors/id/B/BL/BLOONIX/${name}.tar.gz";
-      sha256 = "aaf68894ddf51aeaec7e6e22069b5840994517a8937cc6ceaff4d73cee2cf3ed";
+      sha256 = "45bf540ab2138ed3ff93afc205b0516dc75755b86acdcc5e75c41347833c293d";
     };
+    buildInputs = [ ModuleBuild ];
     propagatedBuildInputs = [ ParamsValidate ];
     meta = {
       description = "Log messages to several outputs";
@@ -7938,6 +7940,7 @@ let self = _self // overrides; _self = with self; {
       url = "mirror://cpan/authors/id/R/RO/ROSCH/${name}.tar.gz";
       sha256 = "00wk9950i9q6qwp1vdq9xdddgk54lqd0bhcq2hnijh8xnmhvpmsc";
     };
+    outputs = [ "out" ];
     buildInputs = [ ProcWaitStat ];
   };
 
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 9fe5a47a9e61..c59632776719 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -825,7 +825,7 @@ in modules // {
     windowsSupport = true;
 
     propagatedBuildInputs = with self; [
-      paramiko jinja2 pyyaml httplib2 boto six
+      pycrypto paramiko jinja2 pyyaml httplib2 boto six
     ] ++ optional windowsSupport pywinrm;
 
     meta = {
@@ -858,7 +858,7 @@ in modules // {
     windowsSupport = true;
 
     propagatedBuildInputs = with self; [
-      paramiko jinja2 pyyaml httplib2 boto six readline
+      pycrypto paramiko jinja2 pyyaml httplib2 boto six readline
     ] ++ optional windowsSupport pywinrm;
 
     meta = with stdenv.lib; {
@@ -1214,6 +1214,27 @@ in modules // {
     };
   });
 
+  attrs = buildPythonPackage (rec {
+    pname = "attrs";
+    version = "16.0.0";
+    name = "attrs-16.0.0";
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/a/attrs/${name}.tar.gz";
+      sha256 = "1g4asv3hbx5aqz7hjzq3q6ss2cpv1rdv66sp5d21cdyjajj2fs6y";
+    };
+
+    # Mac OS X needs clang for testing
+    buildInputs = with self; [ pytest hypothesis zope_interface
+    pympler coverage ]
+     ++ optionals (stdenv.isDarwin) [ pkgs.clang ];
+
+    meta = {
+      description = "Python attributes without boilerplate";
+      homepage = https://github.com/hynek/attrs;
+      license = licenses.mit;
+    };
+   });
+
   audioread = buildPythonPackage rec {
     name = "audioread-${version}";
     version = "2.1.1";
@@ -4004,11 +4025,12 @@ in modules // {
 
   cryptography = buildPythonPackage rec {
     # also bump cryptography_vectors
-    name = "cryptography-1.2.3";
+    name = "cryptography-${version}";
+    version = "1.4";
 
     src = pkgs.fetchurl {
       url = "mirror://pypi/c/cryptography/${name}.tar.gz";
-      sha256 = "0kj511z4g21fhcr649pyzpl0zzkkc7hsgxxjys6z8wwfvmvirccf";
+      sha256 = "0a6i4914ychryj7kqqmf970incynj5lzx57n3cbv5i4hxm09a55v";
     };
 
     buildInputs = [ pkgs.openssl self.pretend self.cryptography_vectors
@@ -4024,11 +4046,12 @@ in modules // {
 
   cryptography_vectors = buildPythonPackage rec {
       # also bump cryptography
-    name = "cryptography_vectors-1.2.3";
+    name = "cryptography_vectors-${version}";
+    version = "1.4";
 
     src = pkgs.fetchurl {
       url = "mirror://pypi/c/cryptography-vectors/${name}.tar.gz";
-      sha256 = "0shawgpax79gvjrj0a313sll9gaqys7q1hxngn6j4k24lmz7bwki";
+      sha256 = "1sk6yhphk2k2vzshi0djxi0jsxd9a02259bs8gynfgf5y1g82a07";
     };
   };
 
@@ -5443,11 +5466,11 @@ in modules // {
 
   dill = buildPythonPackage rec {
     name = "dill-${version}";
-    version = "0.2.4";
+    version = "0.2.5";
 
     src = pkgs.fetchurl {
       url = "mirror://pypi/d/dill/${name}.tgz";
-      sha256 = "deca57da33ad2121ab1b9c4493bf8eb2b3a72b6426d4b9a3a853a073c68b97ca";
+      sha256 = "431c9d46e190dcdf1397234cf659d66e2e22e33b0474ed6ee2d0b16c9c0ea319";
     };
 
     propagatedBuildInputs = with self; [objgraph];
@@ -6497,7 +6520,13 @@ in modules // {
       sha256 = "1yrdxcj5rzvz8iglircz6icvyggz5fmdcd010n6w3j60yp4p84kc";
     };
 
+    # https://github.com/AGProjects/python-gnutls/issues/2
+    disabled = isPy3k;
+
     propagatedBuildInputs = with self; [ pkgs.gnutls ];
+    patchPhase = ''
+      substituteInPlace gnutls/library/__init__.py --replace "/usr/local/lib" "${pkgs.gnutls33.out}/lib"
+    '';
   };
 
   gitdb = buildPythonPackage rec {
@@ -7438,13 +7467,13 @@ in modules // {
 
   netcdf4 = buildPythonPackage rec {
     name = "netCDF4-${version}";
-    version = "1.2.1";
+    version = "1.2.4";
 
     disabled = isPyPy;
 
     src = pkgs.fetchurl {
       url = "mirror://pypi/n/netCDF4/${name}.tar.gz";
-      sha256 = "0wzg73zyjjhns4209vrcvh71gs392d16ynz76x3pl1xg2by723iy";
+      sha256 = "0lakjix9dhc26f33f03c13ffwspqcrk5j3mnnjczwxbb23ppwwx6";
     };
 
     propagatedBuildInputs = with self ; [
@@ -7751,6 +7780,29 @@ in modules // {
     };
   };
 
+  pycallgraph = buildPythonPackage rec {
+    name = "pycallgraph-${version}";
+    version = "1.0.1";
+
+    src = pkgs.fetchurl {
+      url = mirror://pypi/p/pycallgraph/pycallgraph-1.0.1.tar.gz;
+      sha256 = "0w8yr43scnckqcv5nbyd2dq4kpv74ai856lsdsf8iniik07jn9mi";
+    };
+
+    buildInputs = with self; [ pytest ];
+
+    # Tests do not work due to this bug: https://github.com/gak/pycallgraph/issues/118
+    doCheck = false;
+
+    meta = {
+      homepage = http://pycallgraph.slowchop.com;
+      description = "Call graph visualizations for Python applications";
+      maintainers = with maintainers; [ auntie ];
+      license = licenses.gpl2;
+      platform = platforms.all;
+    };
+  };
+
   pycares = buildPythonPackage rec {
     name = "pycares-${version}";
     version = "1.0.0";
@@ -9134,6 +9186,26 @@ in modules // {
     };
   };
 
+  django_environ = buildPythonPackage rec {
+    name = "django-environ-${version}";
+    version = "0.4.0";
+
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/d/django-environ/${name}.tar.gz";
+      sha256 = "0i32vsgk1xmwpi7i6f6v5hg653y9dl0fsz5qmv94skz6hwgm5kvh";
+    };
+
+    # The testsuite fails to modify the base environment
+    doCheck = false;
+    propagatedBuildInputs = with self ; [ django six ];
+
+    meta = {
+      description = "Utilize environment variables to configure your Django application";
+      homepage = https://github.com/joke2k/django-environ/;
+      license = licenses.mit;
+    };
+  };
+
   django_evolution = buildPythonPackage rec {
     name = "django_evolution-0.7.5";
     disabled = isPy3k;
@@ -9151,6 +9223,28 @@ in modules // {
     };
   };
 
+  django_guardian = buildPythonPackage rec {
+    name = "django-guardian-${version}";
+    version = "1.4.4";
+
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/d/django-guardian/${name}.tar.gz";
+      sha256 = "1m7y3brk3697hr2cvkzl8dry4pp7wkmhvxmf8db1ardz1r9d8895";
+    };
+
+    buildInputs = with self ; [ pytestrunner pytestdjango django_environ mock sqlite3 ];
+    propagatedBuildInputs = with self ; [ django six ];
+
+    checkPhase = ''
+      ${python.interpreter} nix_run_setup.py test --addopts="--ignore build"
+    '';
+
+    meta = {
+      description = "Per object permissions for Django";
+      homepage = https://github.com/django-guardian/django-guardian;
+      licenses = [ licenses.mit licenses.bsd2 ];
+    };
+  };
 
   django_tagging = buildPythonPackage rec {
     name = "django-tagging-0.3.1";
@@ -9220,11 +9314,11 @@ in modules // {
 
   django_nose = buildPythonPackage rec {
     name = "django-nose-${version}";
-    version = "1.4.3";
+    version = "1.4.4";
 
     src = pkgs.fetchurl {
       url = "mirror://pypi/d/django-nose/${name}.tar.gz";
-      sha256 = "0rl9ipa98smprlw56xqlhzhps28p84wg0640qlyn0rjyrpsdmf0r";
+      sha256 = "1fm47fkza2lk0xgc6qpi9vs78zg7q8cgl6mdan69sbycgy909ff0";
     };
 
     # vast dependency list
@@ -11678,12 +11772,12 @@ in modules // {
   };
 
   ipython = buildPythonPackage rec {
-    version = "5.0.0";
+    version = "5.1.0";
     name = "ipython-${version}";
 
     src = pkgs.fetchurl {
       url = "mirror://pypi/i/ipython/${name}.tar.gz";
-      sha256 = "7ec0737169c74056c7fc8298246db5478a2d6c90cfd19c3253222112357545df";
+      sha256 = "7ef4694e1345913182126b219aaa4a0047e191af414256da6772cf249571b961";
     };
 
     prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
@@ -12161,6 +12255,22 @@ in modules // {
     };
   };
 
+  klein = buildPythonPackage rec {
+    name = "klein-15.3.1";
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/k/klein/${name}.tar.gz";
+      sha256 = "1hl2psnn1chm698rimyn9dgcpl1mxgc8dj11b3ipp8z37yfjs3z9";
+    };
+
+    propagatedBuildInputs = with self; [ werkzeug twisted ];
+
+    meta = {
+      description = "Klein Web Micro-Framework";
+      homepage    = "https://github.com/twisted/klein";
+      license     = licenses.mit;
+    };
+   };
+
   kombu = buildPythonPackage rec {
     name = "kombu-${version}";
     version = "3.0.35";
@@ -13451,6 +13561,27 @@ in modules // {
     };
   };
 
+  multiprocess = buildPythonPackage rec {
+    name = "multiprocess-${version}";
+    version = "0.70.4";
+
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/m/multiprocess/${name}.tgz";
+      sha256 = "73f8b9b7009860e3c3c8b9bdcad7e8366b130929775f89c114d4346a9cfcb31b";
+    };
+
+    propagatedBuildInputs = with self; [ dill ];
+
+    # Python-version dependent tests
+    doCheck = false;
+
+    meta = {
+      description = "Better multiprocessing and multithreading in python";
+      homepage = https://github.com/uqfoundation;
+      license = licenses.bsd3;
+    };
+  };
+
   munkres = buildPythonPackage rec {
     name = "munkres-1.0.6";
 
@@ -13700,6 +13831,31 @@ in modules // {
     };
   };
 
+  pympler = buildPythonPackage rec {
+    pname = "Pympler";
+    version = "0.4.3";
+    name = "${pname}-${version}";
+
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/P/${pname}/${name}.tar.gz";
+      sha256 = "0mhyxqlkha98y8mi5zqcjg23r30mgdjdzs05lghbmqfdyvzjh1a3";
+    };
+
+  # Remove test asizeof.flatsize(), broken and can be missed as
+  # test is only useful on python 2.5, see https://github.com/pympler/pympler/issues/22
+   patchPhase = ''
+     substituteInPlace ./test/asizeof/test_asizeof.py --replace "n, e = test_flatsize" "#n, e = test_flatsize"
+     substituteInPlace ./test/asizeof/test_asizeof.py --replace "self.assert_(n," "#self.assert_(n,"
+     substituteInPlace ./test/asizeof/test_asizeof.py --replace "self.assert_(not e" "#self.assert_(not e"
+    '';
+
+    meta = {
+      description = "Tool to measure, monitor and analyze memory behavior";
+      homepage = http://pythonhosted.org/Pympler/;
+      license = licenses.asl20;
+    };
+  };
+
   pymysql = buildPythonPackage rec {
     name = "pymysql-${version}";
     version = "0.6.6";
@@ -14562,6 +14718,51 @@ in modules // {
     };
   };
 
+  Nuitka = let
+    # scons is needed but using it requires Python 2.7
+    # Therefore we create a separate env for it.
+    scons = pkgs.python27.withPackages(ps: [ pkgs.scons ]);
+  in buildPythonPackage rec {
+    version = "0.5.21.3";
+    name = "Nuitka-${version}";
+
+    # Latest version is not yet on PyPi
+    src = pkgs.fetchurl {
+      url = "https://github.com/kayhayen/Nuitka/archive/${version}.tar.gz";
+      sha256 = "1i2069hxb94q9kkwcbky59fin8hk1vlj90lwgmrdhn1srvig1cq3";
+    };
+
+    buildInputs = with self; stdenv.lib.optionals doCheck [ vmprof pyqt4 ];
+
+    propagatedBuildInputs = [ scons ];
+
+    postPatch = ''
+      patchShebangs tests/run-tests
+    '' + stdenv.lib.optionalString stdenv.isLinux ''
+      substituteInPlace nuitka/plugins/standard/ImplicitImports.py --replace 'locateDLL("uuid")' '"${pkgs.utillinux.out}/lib/libuuid.so"'
+    '';
+
+    # We do not want any wrappers here.
+    postFixup = '''';
+
+    checkPhase = ''
+      tests/run-tests
+    '';
+
+    # Problem with a subprocess (parts)
+    doCheck = false;
+
+    # Requires CPython
+    disabled = isPyPy;
+
+    meta = {
+      description = "Python compiler with full language support and CPython compatibility";
+      license = licenses.asl20;
+      homepage = http://nuitka.net/;
+    };
+  };
+
+
   buildNumpyPackage = callPackage ../development/python-modules/numpy.nix {
     gfortran = pkgs.gfortran;
     blas = pkgs.openblasCompat;
@@ -16480,14 +16681,15 @@ in modules // {
   };
 
   paramiko = buildPythonPackage rec {
-    name = "paramiko-1.15.1";
+    name = "paramiko-${version}";
+    version = "2.0.2";
 
     src = pkgs.fetchurl {
       url = "mirror://pypi/p/paramiko/${name}.tar.gz";
-      sha256 = "6ed97e2281bb48728692cdc621f6b86a65fdc1d46b178ce250cfec10b977a04c";
+      sha256 = "1p21s7psqj18k9a97nq26yas058i5ivzk7pi7y98l1rbl87zj6s1";
     };
 
-    propagatedBuildInputs = with self; [ pycrypto ecdsa ];
+    propagatedBuildInputs = with self; [ cryptography cryptography_vectors ];
 
     # https://github.com/paramiko/paramiko/issues/449
     doCheck = !(isPyPy || isPy33);
@@ -16535,8 +16737,27 @@ in modules // {
       license = with licenses; [ bsd3 ];
       homepage = http://github.com/dask/partd/;
     };
+  };
 
+  pathos = buildPythonPackage rec {
+    name = "pathos-${version}";
+    version = "0.2.0";
+
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/p/pathos/${name}.tgz";
+      sha256 = "e35418af733bf434da83746d46acca94375d6e306b3df330b2a1808db026a188";
+    };
+
+    propagatedBuildInputs = with self; [ dill pox ppft multiprocess ];
 
+    # Require network
+    doCheck = false;
+
+    meta = {
+      description = "Parallel graph management and execution in heterogeneous computing";
+      homepage = http://www.cacr.caltech.edu/~mmckerns/pathos.htm;
+      license = licenses.bsd3;
+    };
   };
 
   patsy = buildPythonPackage rec {
@@ -17158,12 +17379,12 @@ in modules // {
 
   pysftp = buildPythonPackage rec {
     name = "pysftp-${version}";
-    version = "0.2.8";
+    version = "0.2.9";
     disabled = isPyPy;
 
     src = pkgs.fetchurl {
       url = "mirror://pypi/p/pysftp/${name}.tar.gz";
-      sha256 = "1d69z8yngciksch1i8rivy1xl8f6g6sb7c3kk5cm3pf8304q6hhm";
+      sha256 = "0jl5qix5cxzrv4lb8rfpjkpcghbkacnxkb006ikn7mkl5s05mxgv";
     };
 
     propagatedBuildInputs = with self; [ paramiko ];
@@ -17402,7 +17623,39 @@ in modules // {
     };
   };
 
+  pox = buildPythonPackage rec {
+    name = "pox-${version}";
+    version = "0.2.2";
 
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/p/pox/${name}.tgz";
+      sha256 = "22e97ac6d2918c754e65a9581dbe02e9d00ae4a54ca48d05118f87c1ea92aa19";
+    };
+
+    meta = {
+      description = "Utilities for filesystem exploration and automated builds";
+      license = licenses.bsd3;
+      homepage = http://www.cacr.caltech.edu/~mmckerns/pox.htm;
+    };
+  };
+
+  ppft = buildPythonPackage rec {
+    name = "ppft-${version}";
+    version = "1.6.4.6";
+
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/p/ppft/${name}.tgz";
+      sha256 = "6f99c861822884cb00badbd5f364ee32b90a157084a6768040793988c6b92bff";
+    };
+
+    propagatedBuildInputs = with self; [ six ];
+
+    meta = {
+      description = "Distributed and parallel python";
+      homepage = https://github.com/uqfoundation;
+      license = licenses.bsd3;
+    };
+  };
 
   praw = buildPythonPackage rec {
     name = "praw-3.5.0";
@@ -17501,6 +17754,7 @@ in modules // {
 
   protobuf = self.protobuf2_6;
   protobuf3_0 = (self.protobufBuild pkgs.protobuf3_0).override { doCheck = false; };
+  protobuf3_0_0b2 = (self.protobufBuild pkgs.protobuf3_0_0b2).override { doCheck = false; };
   protobuf2_6 = self.protobufBuild pkgs.protobuf2_6;
   protobuf2_5 = self.protobufBuild pkgs.protobuf2_5;
   protobufBuild = protobuf: buildPythonPackage rec {
@@ -18164,6 +18418,21 @@ in modules // {
     };
   });
 
+  pydispatcher = buildPythonPackage (rec {
+    version = "2.0.5";
+    disabled = isPy35;
+    name = "pydispatcher-${version}";
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/P/PyDispatcher/PyDispatcher-${version}.tar.gz";
+      sha256 = "1bswbmhlbqdxlgbxlb6xrlm4k253sg8nvpl1whgsys8p3fg0cw2m";
+    };
+
+    meta = {
+      homepage = http://pydispatcher.sourceforge.net/;
+      description = "Signal-registration and routing infrastructure for use in multiple contexts";
+      license = licenses.bsd3;
+    };
+   });
 
   pydot = buildPythonPackage rec {
     name = "pydot-1.0.2";
@@ -21494,6 +21763,23 @@ in modules // {
     };
   };
 
+  sqlobject = buildPythonPackage rec {
+    version = "3.0.0";
+    name = "sqlobject-${version}";
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/S/SQLObject/SQLObject-${version}.tar.gz";
+      sha256 = "15g3g7f4yiyplqf54px1dsnmrw3jb7xwx97z8qzgp9ijmm5vpr8r";
+    };
+
+    propagatedBuildInputs = with self; [ pydispatcher FormEncode ];
+
+    meta = {
+      description = "Object Relational Manager for providing an object interface to your database";
+      homepage = "http://www.sqlobject.org/";
+      license = licenses.lgpl21;
+    };
+  };
+
   pgpdump = self.buildPythonPackage rec {
     name = "pgpdump-1.5";
 
@@ -23997,11 +24283,11 @@ in modules // {
   };
 
   virtualenv = buildPythonPackage rec {
-    name = "virtualenv-13.1.2";
+    name = "virtualenv-15.0.3";
 
     src = pkgs.fetchurl {
       url = "mirror://pypi/v/virtualenv/${name}.tar.gz";
-      sha256 = "1p732accxwqfjbdna39k8w8lp9gyw91vr4kzkhm8mgfxikqqxg5a";
+      sha256 = "6d9c760d3fc5fa0894b0f99b9de82a4647e1164f0b700a7f99055034bf548b1d";
     };
 
     pythonPath = [ self.recursivePthLoader ];
@@ -24107,6 +24393,29 @@ in modules // {
     };
   });
 
+  vmprof = buildPythonPackage rec {
+    version = "0.3.3";
+    name = "vmprof-${version}";
+
+    # Url using old scheme doesn't seem to work
+    src = pkgs.fetchurl {
+      url = "https://files.pythonhosted.org/packages/c3/f3/f039ca77e727c5c2d3e61967a2a5c9ecc0ef6ca235012fd5559febb77cd0/vmprof-0.3.3.tar.gz";
+      sha256 = "991bc2f1dc824c63e9b399f9e8606deded92a52378d0e449f258807d7556b039";
+    };
+
+    propagatedBuildInputs = with self; [ requests2 six];
+
+    # No tests included
+    doCheck = false;
+
+    meta = {
+      description = "A vmprof client";
+      license = licenses.mit;
+      homepage = https://vmprof.readthedocs.org/;
+    };
+
+  };
+
   vultr = buildPythonPackage rec {
     version = "0.1.2";
     name = "vultr-${version}";
@@ -25795,7 +26104,7 @@ in modules // {
     postPatch = ''
       libusb=${pkgs.libusb1.out}/lib/libusb-1.0.so
       test -f $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
-      sed -i -e "s|libname = .*|libname = \"$libusb\"|" usb/backend/libusb1.py
+      sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py
     '';
 
     # No tests included
@@ -26229,6 +26538,11 @@ in modules // {
       sha256 = "030qkrsj4as9anr8xfpk5n41qzg7w4yyjasb4cqislvyl1l1dvvs";
     };
 
+    postPatch = ''
+      substituteInPlace requirements.txt \
+        --replace 'certifi==2015.11.20.1' 'certifi==2016.2.28'
+    '';
+
     propagatedBuildInputs = with self; [
       pyyaml lxml_3_5 grequests flaskbabel flask requests2
       gevent speaklater Babel pytz dateutil pygments_2_0
@@ -27738,14 +28052,14 @@ in modules // {
 
   ovh = buildPythonPackage rec {
     name = "ovh-${version}";
-    version = "0.3.5";
+    version = "0.4.5";
     doCheck = false; #test needs packages too explicit
     buildInputs = with self; [ d2to1 ];
     propagatedBuildInputs = with self; [ requests2 ];
 
     src = pkgs.fetchurl {
       url = "mirror://pypi/o/ovh/ovh-${version}.tar.gz";
-      sha256 = "1y74lrdlgbb786mwas7ynphimfi00dgr67ncjq20kdf31jg5415n";
+      sha256 = "1wf2p1sbg34jpj97r3w5nx9pj6vp0mlprry3vw2xav3dv02qv2af";
     };
 
     meta = {
@@ -28535,15 +28849,15 @@ in modules // {
 
   tensorflowNoGpuSupport = buildPythonPackage rec {
     name = "tensorflow";
-    version = "0.8.0";
+    version = "0.9.0";
     format = "wheel";
 
     src = pkgs.fetchurl {
       url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-${version}-cp27-none-linux_x86_64.whl";
-      sha256 = "07lb6rknngq9bicd7z1q9caiqxlqn4fdx8q24s3rqvv9wi79szws";
+      sha256 = "15v7iyry8bmp5wcc1rr4bkp80f3887rl99zqf8pys5bad4gldbkh";
     };
 
-    propagatedBuildInputs = with self; [ numpy six protobuf3_0 pkgs.swig ];
+    propagatedBuildInputs = with self; [ numpy six protobuf3_0_0b2 pkgs.swig ];
 
     preFixup = ''
       RPATH="${stdenv.lib.makeLibraryPath [ pkgs.gcc.cc.lib pkgs.zlib ]}"
@@ -28559,6 +28873,24 @@ in modules // {
     };
   };
 
+  tflearn = buildPythonPackage rec {
+    name = "tflearn-0.2.1";
+
+    meta = {
+      description = "Deep learning library featuring a higher-level API for TensorFlow";
+      homepage    = "https://github.com/tflearn/tflearn";
+      license     = licenses.mit;
+      maintainers = with maintainers; [ houqp ];
+    };
+
+    propagatedBuildInputs = with self; [ scipy h5py pillow tensorflow ];
+
+    src = pkgs.fetchurl {
+      url = "mirror://pypi/t/tflearn/${name}.tar.gz";
+      sha256 = "1n884c4j35409id2bncyj5fvmmfpdqj3pk6wrv0s1znnvs0lkii0";
+    };
+  };
+
   simpleai = buildPythonPackage rec {
      version = "0.7.11";
      name = "simpleai-${version}";
diff --git a/pkgs/top-level/rust-packages.nix b/pkgs/top-level/rust-packages.nix
index 28a13adf4cf9..4acf8e867861 100644
--- a/pkgs/top-level/rust-packages.nix
+++ b/pkgs/top-level/rust-packages.nix
@@ -7,9 +7,9 @@
 { runCommand, fetchFromGitHub, git }:
 
 let
-  version = "2016-07-26";
-  rev = "b4dbf6af6672b9f1c0f51cdf4e4aeb11664f3f69";
-  sha256 = "0hzf2yn5yv6r2h4azx4rsbpab73hg3hvk4n6hqa2jr927v1zd5bv";
+  version = "2016-08-10";
+  rev = "fe018be71eeed9c1dc441a16e6a0f32eb6a46bce";
+  sha256 = "0d8rvhndkz8sz7zn79lrk5vlkpljfilrk52cb2pr5rx83cm89vmi";
 
   src = fetchFromGitHub {
       inherit rev;