summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/altcoins/bitcoin-xt.nix2
-rw-r--r--pkgs/applications/audio/ardour/default.nix2
-rw-r--r--pkgs/applications/audio/audacity/default.nix6
-rw-r--r--pkgs/applications/audio/baudline/default.nix2
-rw-r--r--pkgs/applications/audio/caudec/default.nix2
-rw-r--r--pkgs/applications/audio/dfasma/default.nix2
-rw-r--r--pkgs/applications/audio/flac/default.nix4
-rw-r--r--pkgs/applications/audio/fmit/default.nix2
-rw-r--r--pkgs/applications/audio/google-musicmanager/default.nix2
-rw-r--r--pkgs/applications/audio/iannix/default.nix6
-rw-r--r--pkgs/applications/audio/keyfinder/default.nix2
-rw-r--r--pkgs/applications/audio/milkytracker/default.nix2
-rw-r--r--pkgs/applications/audio/mopidy-mopify/default.nix4
-rw-r--r--pkgs/applications/audio/mopidy-musicbox-webclient/default.nix4
-rw-r--r--pkgs/applications/audio/mopidy-spotify-tunigo/default.nix4
-rw-r--r--pkgs/applications/audio/mopidy-spotify/default.nix4
-rw-r--r--pkgs/applications/audio/mopidy-youtube/default.nix4
-rw-r--r--pkgs/applications/audio/mopidy/default.nix23
-rw-r--r--pkgs/applications/audio/ncmpcpp/default.nix4
-rw-r--r--pkgs/applications/audio/sound-juicer/default.nix12
-rw-r--r--pkgs/applications/audio/spotify/default.nix20
-rw-r--r--pkgs/applications/audio/swh-lv2/default.nix2
-rw-r--r--pkgs/applications/audio/yoshimi/default.nix2
-rw-r--r--pkgs/applications/backup/areca/default.nix49
-rw-r--r--pkgs/applications/backup/areca/fix-javah-bug.diff24
-rw-r--r--pkgs/applications/display-managers/sddm/default.nix4
-rw-r--r--pkgs/applications/display-managers/slim/default.nix2
-rw-r--r--pkgs/applications/editors/atom/default.nix28
-rw-r--r--pkgs/applications/editors/brackets/default.nix6
-rw-r--r--pkgs/applications/editors/codeblocks/default.nix2
-rw-r--r--pkgs/applications/editors/eclipse/default.nix2
-rw-r--r--pkgs/applications/editors/edbrowse/default.nix2
-rw-r--r--pkgs/applications/editors/emacs-24/default.nix2
-rw-r--r--pkgs/applications/editors/emacs-24/macport-24.5.nix4
-rw-r--r--pkgs/applications/editors/heme/default.nix5
-rw-r--r--pkgs/applications/editors/idea/common.nix2
-rw-r--r--pkgs/applications/editors/lighttable/default.nix6
-rw-r--r--pkgs/applications/editors/music/tuxguitar/default.nix2
-rw-r--r--pkgs/applications/editors/nvpy/default.nix5
-rw-r--r--pkgs/applications/editors/sublime3/default.nix2
-rw-r--r--pkgs/applications/editors/texmacs/default.nix2
-rw-r--r--pkgs/applications/editors/vis/default.nix43
-rw-r--r--pkgs/applications/editors/vscode/default.nix109
-rw-r--r--pkgs/applications/gis/grass/default.nix2
-rw-r--r--pkgs/applications/graphics/ImageMagick/default.nix4
-rw-r--r--pkgs/applications/graphics/antimony/default.nix2
-rw-r--r--pkgs/applications/graphics/digikam/default.nix2
-rw-r--r--pkgs/applications/graphics/feh/default.nix8
-rw-r--r--pkgs/applications/graphics/geeqie/default.nix15
-rw-r--r--pkgs/applications/graphics/gimp/2.8.nix2
-rw-r--r--pkgs/applications/graphics/photoqt/default.nix12
-rw-r--r--pkgs/applications/graphics/phototonic/default.nix2
-rw-r--r--pkgs/applications/graphics/rapcad/default.nix4
-rw-r--r--pkgs/applications/graphics/sane/backends/git.nix6
-rw-r--r--pkgs/applications/graphics/seg3d/default.nix4
-rw-r--r--pkgs/applications/graphics/shotwell/default.nix4
-rw-r--r--pkgs/applications/graphics/xfig/default.nix2
-rw-r--r--pkgs/applications/misc/audio/soxr/default.nix2
-rw-r--r--pkgs/applications/misc/blender/default.nix4
-rw-r--r--pkgs/applications/misc/calibre/default.nix8
-rw-r--r--pkgs/applications/misc/cool-retro-term/default.nix6
-rw-r--r--pkgs/applications/misc/curaengine/default.nix4
-rw-r--r--pkgs/applications/misc/djvulibre/default.nix2
-rw-r--r--pkgs/applications/misc/dunst/default.nix2
-rw-r--r--pkgs/applications/misc/electrum/default.nix4
-rw-r--r--pkgs/applications/misc/get_iplayer/default.nix8
-rw-r--r--pkgs/applications/misc/girara/default.nix2
-rw-r--r--pkgs/applications/misc/golden-cheetah/default.nix37
-rw-r--r--pkgs/applications/misc/guake/default.nix5
-rw-r--r--pkgs/applications/misc/ikiwiki/default.nix2
-rw-r--r--pkgs/applications/misc/j4-dmenu-desktop/default.nix29
-rw-r--r--pkgs/applications/misc/khard/default.nix4
-rw-r--r--pkgs/applications/misc/kiwix/default.nix2
-rw-r--r--pkgs/applications/misc/monero/default.nix2
-rw-r--r--pkgs/applications/misc/mysql-workbench/default.nix2
-rw-r--r--pkgs/applications/misc/nut/default.nix2
-rw-r--r--pkgs/applications/misc/opencpn/default.nix4
-rw-r--r--pkgs/applications/misc/pcmanfm/default.nix8
-rw-r--r--pkgs/applications/misc/pdfmod/default.nix2
-rw-r--r--pkgs/applications/misc/pinfo/default.nix2
-rw-r--r--pkgs/applications/misc/playonlinux/default.nix2
-rw-r--r--pkgs/applications/misc/qtpass/default.nix6
-rw-r--r--pkgs/applications/misc/roxterm/default.nix10
-rw-r--r--pkgs/applications/misc/rtv/default.nix6
-rw-r--r--pkgs/applications/misc/rxvt/default.nix38
-rw-r--r--pkgs/applications/misc/st/default.nix4
-rw-r--r--pkgs/applications/misc/st/wayland.nix4
-rw-r--r--pkgs/applications/misc/sweethome3d/default.nix2
-rw-r--r--pkgs/applications/misc/sweethome3d/editors.nix2
-rw-r--r--pkgs/applications/misc/tilda/default.nix2
-rw-r--r--pkgs/applications/misc/tint2/default.nix46
-rw-r--r--pkgs/applications/misc/twmn/default.nix2
-rw-r--r--pkgs/applications/misc/udevil/default.nix2
-rw-r--r--pkgs/applications/misc/xca/default.nix3
-rw-r--r--pkgs/applications/misc/xdgmenumaker/default.nix38
-rw-r--r--pkgs/applications/misc/xneur/default.nix14
-rw-r--r--pkgs/applications/misc/zathura/core/default.nix2
-rw-r--r--pkgs/applications/misc/zathura/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/chromium/common.nix6
-rw-r--r--pkgs/applications/networking/browsers/chromium/plugins.nix3
-rw-r--r--pkgs/applications/networking/browsers/dwb/default.nix16
-rw-r--r--pkgs/applications/networking/browsers/firefox-bin/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/firefox-bin/sources.nix362
-rw-r--r--pkgs/applications/networking/browsers/firefox/default.nix12
-rw-r--r--pkgs/applications/networking/browsers/google-chrome/default.nix37
-rw-r--r--pkgs/applications/networking/browsers/jumanji/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/luakit/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/midori/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix62
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/nspluginwrapper/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/opera/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/qutebrowser/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/surf/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/uzbl/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/vimb/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/vimprobable2/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/vivaldi/default.nix77
-rw-r--r--pkgs/applications/networking/copy-com/default.nix2
-rw-r--r--pkgs/applications/networking/dropbox-cli/default.nix4
-rw-r--r--pkgs/applications/networking/dropbox/default.nix8
-rw-r--r--pkgs/applications/networking/feedreaders/newsbeuter/dev.nix2
-rw-r--r--pkgs/applications/networking/ike/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/baresip/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/blink/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/discord/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/hipchat/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/oneteam/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/pidgin/default.nix10
-rw-r--r--pkgs/applications/networking/instant-messengers/pybitmessage/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/sflphone/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/skype/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/slack/default.nix16
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix2
-rw-r--r--pkgs/applications/networking/irc/communi/default.nix2
-rw-r--r--pkgs/applications/networking/irc/irssi/default.nix1
-rw-r--r--pkgs/applications/networking/irc/wraith/default.nix46
-rw-r--r--pkgs/applications/networking/irc/wraith/dlopen.patch48
-rw-r--r--pkgs/applications/networking/linssid/default.nix6
-rw-r--r--pkgs/applications/networking/mailreaders/mailpile/default.nix2
-rw-r--r--pkgs/applications/networking/mailreaders/neomutt/default.nix51
-rw-r--r--pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix2
-rw-r--r--pkgs/applications/networking/mailreaders/thunderbird-bin/sources.nix234
-rw-r--r--pkgs/applications/networking/mumble/default.nix2
-rw-r--r--pkgs/applications/networking/newsreaders/liferea/default.nix2
-rw-r--r--pkgs/applications/networking/p2p/retroshare/0.6.nix2
-rw-r--r--pkgs/applications/networking/p2p/retroshare/default.nix2
-rw-r--r--pkgs/applications/networking/sniffers/ettercap/default.nix8
-rw-r--r--pkgs/applications/networking/spideroak/default.nix4
-rw-r--r--pkgs/applications/office/libreoffice/default.nix14
-rw-r--r--pkgs/applications/office/libreoffice/libreoffice-srcs.nix20
-rw-r--r--pkgs/applications/science/astronomy/celestia/default.nix2
-rw-r--r--pkgs/applications/science/biology/samtools/default.nix19
-rw-r--r--pkgs/applications/science/electronics/fritzing/default.nix2
-rw-r--r--pkgs/applications/science/electronics/tkgate/1.x.nix4
-rw-r--r--pkgs/applications/science/logic/coq/8.5.nix6
-rw-r--r--pkgs/applications/science/logic/hol/default.nix2
-rw-r--r--pkgs/applications/science/logic/mcrl2/default.nix31
-rw-r--r--pkgs/applications/science/logic/saw-tools/default.nix2
-rw-r--r--pkgs/applications/science/logic/yices/default.nix8
-rw-r--r--pkgs/applications/science/machine-learning/torch/torch-distro.nix4
-rw-r--r--pkgs/applications/science/math/R/default.nix1
-rw-r--r--pkgs/applications/science/math/mathematica/9.nix2
-rw-r--r--pkgs/applications/science/math/mathematica/default.nix2
-rw-r--r--pkgs/applications/science/math/maxima/default.nix2
-rw-r--r--pkgs/applications/science/misc/root/cmake.patch11
-rw-r--r--pkgs/applications/science/misc/root/default.nix27
-rw-r--r--pkgs/applications/science/robotics/qgroundcontrol/default.nix14
-rw-r--r--pkgs/applications/search/recoll/default.nix10
-rw-r--r--pkgs/applications/version-management/cvs-fast-export/default.nix2
-rw-r--r--pkgs/applications/version-management/cvs2svn/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/cgit/default.nix4
-rw-r--r--pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix2
-rw-r--r--pkgs/applications/version-management/mercurial/default.nix4
-rw-r--r--pkgs/applications/version-management/rabbitvcs/default.nix2
-rw-r--r--pkgs/applications/version-management/rapidsvn/default.nix4
-rw-r--r--pkgs/applications/version-management/redmine/bootstrap.nix4
-rw-r--r--pkgs/applications/version-management/reposurgeon/default.nix4
-rw-r--r--pkgs/applications/version-management/smartgithg/default.nix2
-rw-r--r--pkgs/applications/version-management/subversion/default.nix9
-rw-r--r--pkgs/applications/version-management/tortoisehg/default.nix17
-rw-r--r--pkgs/applications/video/avidemux/default.nix201
-rw-r--r--pkgs/applications/video/avidemux/wrapper.nix17
-rw-r--r--pkgs/applications/video/avxsynth/default.nix2
-rw-r--r--pkgs/applications/video/bomi/default.nix11
-rw-r--r--pkgs/applications/video/clipgrab/default.nix4
-rw-r--r--pkgs/applications/video/dvd-slideshow/default.nix2
-rw-r--r--pkgs/applications/video/gnash/default.nix4
-rw-r--r--pkgs/applications/video/kazam/default.nix4
-rw-r--r--pkgs/applications/video/kodi/default.nix16
-rw-r--r--pkgs/applications/video/miro/default.nix4
-rw-r--r--pkgs/applications/video/mpv/default.nix7
-rw-r--r--pkgs/applications/video/shotcut/default.nix6
-rw-r--r--pkgs/applications/video/vlc/default.nix5
-rw-r--r--pkgs/applications/virtualization/bochs/default.nix4
-rw-r--r--pkgs/applications/virtualization/docker/default.nix8
-rw-r--r--pkgs/applications/virtualization/openstack/keystone.nix2
-rw-r--r--pkgs/applications/virtualization/virt-manager/default.nix2
-rw-r--r--pkgs/applications/virtualization/virtinst/default.nix2
-rw-r--r--pkgs/applications/virtualization/virtualbox/default.nix13
-rw-r--r--pkgs/applications/virtualization/virtualbox/guest-additions/default.nix8
-rw-r--r--pkgs/applications/virtualization/xen/generic.nix2
-rw-r--r--pkgs/applications/window-managers/awesome/default.nix8
-rw-r--r--pkgs/applications/window-managers/bspwm/default.nix11
-rw-r--r--pkgs/applications/window-managers/fvwm/default.nix4
-rw-r--r--pkgs/applications/window-managers/jwm/default.nix16
-rw-r--r--pkgs/applications/window-managers/lemonbar/xft.nix11
-rw-r--r--pkgs/applications/window-managers/qtile/default.nix6
-rw-r--r--pkgs/applications/window-managers/sxhkd/default.nix4
-rw-r--r--pkgs/applications/window-managers/weston/default.nix12
216 files changed, 1550 insertions, 1009 deletions
diff --git a/pkgs/applications/altcoins/bitcoin-xt.nix b/pkgs/applications/altcoins/bitcoin-xt.nix
index 9b86bf2b3d5..e678d6e4acb 100644
--- a/pkgs/applications/altcoins/bitcoin-xt.nix
+++ b/pkgs/applications/altcoins/bitcoin-xt.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec{
 
   configureFlags = [
     "--with-boost-libdir=${boost.lib}/lib"
-    "--with-libcurl-headers=${curl}/include"
+    "--with-libcurl-headers=${curl.dev}/include"
   ] ++ optionals withGui [ "--with-gui=qt4" ];
 
   meta = {
diff --git a/pkgs/applications/audio/ardour/default.nix b/pkgs/applications/audio/ardour/default.nix
index 3d44dd872c7..9f047a600cb 100644
--- a/pkgs/applications/audio/ardour/default.nix
+++ b/pkgs/applications/audio/ardour/default.nix
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
   # have to do that ourself.
   patchPhase = ''
     printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${tag}-${builtins.substring 0 8 src.rev}\"; }\n' > libs/ardour/revision.cc
-    sed 's|/usr/include/libintl.h|${glibc}/include/libintl.h|' -i wscript
+    sed 's|/usr/include/libintl.h|${glibc.dev}/include/libintl.h|' -i wscript
     patchShebangs ./tools/
   '';
 
diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix
index 627d68525b9..afa8a94d200 100644
--- a/pkgs/applications/audio/audacity/default.nix
+++ b/pkgs/applications/audio/audacity/default.nix
@@ -18,6 +18,12 @@ stdenv.mkDerivation rec {
     sha256 = "19fr674mw844zmkp1476yigkcnmb6zyn78av64ccdwi3p68i00rf";
   })];
 
+  # fix with gcc-5 from http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2012-December/245884.html
+  postPatch = ''
+    substituteInPlace lib-src/libnyquist/nyquist/ffts/src/fftlib.c \
+      --replace 'inline void' 'static inline void'
+  '';
+
   preConfigure = /* we prefer system-wide libs */ ''
     mv lib-src lib-src-rm
     mkdir lib-src
diff --git a/pkgs/applications/audio/baudline/default.nix b/pkgs/applications/audio/baudline/default.nix
index 543329ef679..2d6b0434d6a 100644
--- a/pkgs/applications/audio/baudline/default.nix
+++ b/pkgs/applications/audio/baudline/default.nix
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
 
     cp -r . "$out/libexec/baudline/"
 
-    interpreter="$(echo ${stdenv.glibc}/lib/ld-linux*)"
+    interpreter="$(echo ${stdenv.glibc.out}/lib/ld-linux*)"
     for prog in "$out"/libexec/baudline/baudline*; do
         patchelf --interpreter "$interpreter" "$prog"
         ln -sr "$prog" "$out/bin/"
diff --git a/pkgs/applications/audio/caudec/default.nix b/pkgs/applications/audio/caudec/default.nix
index 978dd27facd..d84ff702ce8 100644
--- a/pkgs/applications/audio/caudec/default.nix
+++ b/pkgs/applications/audio/caudec/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
   postFixup = ''
     for executable in $(cd $out/bin && ls); do
 	wrapProgram $out/bin/$executable \
-	  --prefix PATH : "${bc}/bin:${findutils}/bin:${sox}/bin:${procps}/bin:${opusTools}/bin:${lame}/bin:${flac}/bin"
+	  --prefix PATH : "${bc}/bin:${findutils}/bin:${sox}/bin:${procps}/bin:${opusTools}/bin:${lame}/bin:${flac.bin}/bin"
     done
   '';
 
diff --git a/pkgs/applications/audio/dfasma/default.nix b/pkgs/applications/audio/dfasma/default.nix
index b2eda29ead5..94f20bc543e 100644
--- a/pkgs/applications/audio/dfasma/default.nix
+++ b/pkgs/applications/audio/dfasma/default.nix
@@ -48,7 +48,9 @@ in stdenv.mkDerivation rec {
   '';
 
   configurePhase = ''
+    runHook preConfigure
     qmake PREFIX=$out PREFIXSHORTCUT=$out dfasma.pro
+    runHook postConfigure
   '';
 
   enableParallelBuilding = true;
diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix
index 18fb48a17ba..80e4e49fb18 100644
--- a/pkgs/applications/audio/flac/default.nix
+++ b/pkgs/applications/audio/flac/default.nix
@@ -8,12 +8,12 @@ stdenv.mkDerivation rec {
     sha256 = "4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c";
   };
 
-  outputs = [ "out" "doc" ];
-
   buildInputs = [ libogg ];
 
   #doCheck = true; # takes lots of time
 
+  outputs = [ "dev" "out" "bin" "doc" ];
+
   meta = with stdenv.lib; {
     homepage = http://xiph.org/flac/;
     description = "Library and tools for encoding and decoding the FLAC lossless audio file format";
diff --git a/pkgs/applications/audio/fmit/default.nix b/pkgs/applications/audio/fmit/default.nix
index 21d1d0ef4c6..c27e049a4ae 100644
--- a/pkgs/applications/audio/fmit/default.nix
+++ b/pkgs/applications/audio/fmit/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
     ++ stdenv.lib.optionals portaudioSupport [ portaudio ];
 
   configurePhase = ''
+    runHook preConfigure
     mkdir build
     cd build
     qmake \
@@ -32,6 +33,7 @@ stdenv.mkDerivation rec {
       CONFIG+=${stdenv.lib.optionalString portaudioSupport "acs_portaudio"} \
       PREFIX="$out" PREFIXSHORTCUT="$out" \
       ../fmit.pro
+    runHook postConfigure
   '';
 
   enableParallelBuilding = true;
diff --git a/pkgs/applications/audio/google-musicmanager/default.nix b/pkgs/applications/audio/google-musicmanager/default.nix
index f86513659b6..72bec52b266 100644
--- a/pkgs/applications/audio/google-musicmanager/default.nix
+++ b/pkgs/applications/audio/google-musicmanager/default.nix
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
   buildPhase = ''
     patchelf \
       --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-      --set-rpath "$out/opt/google/musicmanager:${readline}/lib:${ncurses}/lib:${stdenv.cc.libc}/lib:${qt48}/lib:${stdenv.cc.cc}/lib:${libidn}/lib:${expat}/lib:${flac}/lib:${libvorbis}/lib" opt/google/musicmanager/MusicManager
+      --set-rpath "$out/opt/google/musicmanager:${stdenv.lib.makeLibraryPath [ readline ncurses stdenv.cc.libc.out qt48 stdenv.cc.cc libidn expat flac libvorbis ]}" opt/google/musicmanager/MusicManager
   '';
 
   dontPatchELF = true;
diff --git a/pkgs/applications/audio/iannix/default.nix b/pkgs/applications/audio/iannix/default.nix
index b2dde5b5b31..f17abf97521 100644
--- a/pkgs/applications/audio/iannix/default.nix
+++ b/pkgs/applications/audio/iannix/default.nix
@@ -13,7 +13,11 @@ stdenv.mkDerivation rec {
 
     buildInputs = [ alsaLib pkgconfig qt5.qtbase qt5.qtscript ];
 
-  configurePhase = ''qmake PREFIX=/'';
+  configurePhase = ''
+    runHook preConfigure
+    qmake PREFIX=/
+    runHook postConfigure
+  '';
 
   installFlags = [ "INSTALL_ROOT=$(out)" ];
 
diff --git a/pkgs/applications/audio/keyfinder/default.nix b/pkgs/applications/audio/keyfinder/default.nix
index ae1a8ea1edf..049920d2807 100644
--- a/pkgs/applications/audio/keyfinder/default.nix
+++ b/pkgs/applications/audio/keyfinder/default.nix
@@ -21,7 +21,9 @@ stdenv.mkDerivation rec {
   '';
 
   configurePhase = ''
+    runHook preConfigure
     qmake
+    runHook postConfigure
   '';
 
   enableParallelBuilding = true;
diff --git a/pkgs/applications/audio/milkytracker/default.nix b/pkgs/applications/audio/milkytracker/default.nix
index 8bc0aebba5a..f22ccd08a8e 100644
--- a/pkgs/applications/audio/milkytracker/default.nix
+++ b/pkgs/applications/audio/milkytracker/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
   '';
 
   preBuild=''
-    export CPATH=${zlib}/lib
+    export CPATH=${zlib.out}/lib
   '';
 
   buildInputs = [ SDL alsaLib autoconf automake libjack2 perl zlib zziplib ];
diff --git a/pkgs/applications/audio/mopidy-mopify/default.nix b/pkgs/applications/audio/mopidy-mopify/default.nix
index abb9c50d71c..0cb076556c7 100644
--- a/pkgs/applications/audio/mopidy-mopify/default.nix
+++ b/pkgs/applications/audio/mopidy-mopify/default.nix
@@ -3,11 +3,11 @@
 pythonPackages.buildPythonApplication rec {
   name = "mopidy-mopify-${version}";
 
-  version = "1.5.8";
+  version = "1.5.17";
 
   src = fetchurl {
     url = "https://github.com/dirkgroenen/mopidy-mopify/archive/${version}.tar.gz";
-    sha256 = "1gq88i5hbyskwhqf51myndqgmrndkyy6gs022sc387fy3dwxmvn0";
+    sha256 = "1qi7f5i87ygn486gxc84njl22y84xrwabpz58y5a1hw7z1lp7l8s";
   };
 
   propagatedBuildInputs = with pythonPackages; [ mopidy configobj ];
diff --git a/pkgs/applications/audio/mopidy-musicbox-webclient/default.nix b/pkgs/applications/audio/mopidy-musicbox-webclient/default.nix
index b2bca838cee..53fb4d6c2f7 100644
--- a/pkgs/applications/audio/mopidy-musicbox-webclient/default.nix
+++ b/pkgs/applications/audio/mopidy-musicbox-webclient/default.nix
@@ -3,13 +3,13 @@
 pythonPackages.buildPythonApplication rec {
   name = "mopidy-musicbox-webclient-${version}";
 
-  version = "2.0.0";
+  version = "2.2.0";
 
   src = fetchFromGitHub {
     owner = "pimusicbox";
     repo = "mopidy-musicbox-webclient";
     rev = "v${version}";
-    sha256 = "0gnw6jn55jr6q7bdp70mk3cm5f6jy8lm3s7ayfmisihhjbl3rnaq";
+    sha256 = "0v09wy40ipl0b0dpgmcdl15c5g732c9jl7zipm4sy4pr8xiy6baa";
   };
 
   propagatedBuildInputs = [ mopidy ];
diff --git a/pkgs/applications/audio/mopidy-spotify-tunigo/default.nix b/pkgs/applications/audio/mopidy-spotify-tunigo/default.nix
index 4d7c1cb7326..034a07bf027 100644
--- a/pkgs/applications/audio/mopidy-spotify-tunigo/default.nix
+++ b/pkgs/applications/audio/mopidy-spotify-tunigo/default.nix
@@ -3,13 +3,13 @@
 pythonPackages.buildPythonApplication rec {
   name = "mopidy-spotify-tunigo-${version}";
 
-  version = "0.2.1";
+  version = "1.0.0";
 
   src = fetchFromGitHub {
     owner = "trygveaa";
     repo = "mopidy-spotify-tunigo";
     rev = "v${version}";
-    sha256 = "0827wghbgrscncnshz30l97hgg0g5bsnm0ad8596zh7cai0ibss0";
+    sha256 = "1jwk0b2iz4z09qynnhcr07w15lx6i1ra09s9lp48vslqcf2fp36x";
   };
 
   propagatedBuildInputs = [ mopidy mopidy-spotify pythonPackages.tunigo ];
diff --git a/pkgs/applications/audio/mopidy-spotify/default.nix b/pkgs/applications/audio/mopidy-spotify/default.nix
index 3a717344aef..045c400a17f 100644
--- a/pkgs/applications/audio/mopidy-spotify/default.nix
+++ b/pkgs/applications/audio/mopidy-spotify/default.nix
@@ -2,11 +2,11 @@
 
 pythonPackages.buildPythonApplication rec {
   name = "mopidy-spotify-${version}";
-  version = "2.3.1";
+  version = "3.0.0";
 
   src = fetchurl {
     url = "https://github.com/mopidy/mopidy-spotify/archive/v${version}.tar.gz";
-    sha256 = "0g105kb27q1p8ssrbxkxcjgx9jkqnd9kk5smw8sjcx6f3b23wrwx";
+    sha256 = "0w7bhq6nz2xly5g72xd98r7lyzmx7nzfdpghk7vklkx0x41qccz8";
   };
 
   propagatedBuildInputs = [ mopidy pythonPackages.pyspotify ];
diff --git a/pkgs/applications/audio/mopidy-youtube/default.nix b/pkgs/applications/audio/mopidy-youtube/default.nix
index 2942cba95f0..d3eb8539a19 100644
--- a/pkgs/applications/audio/mopidy-youtube/default.nix
+++ b/pkgs/applications/audio/mopidy-youtube/default.nix
@@ -3,13 +3,13 @@
 pythonPackages.buildPythonApplication rec {
   name = "mopidy-youtube-${version}";
 
-  version = "2.0.1";
+  version = "2.0.2";
 
   src = fetchFromGitHub {
     owner = "mopidy";
     repo = "mopidy-youtube";
     rev = "v${version}";
-    sha256 = "1si7j7m5kg0cxlhkw8s2mbnpmc9mb3l69n5sgklb1yv1s55iia6z";
+    sha256 = "06r3ikyg2ch5n7fbn3sgj04hk6icpfpk1r856qch41995k3bbfg7";
   };
 
   propagatedBuildInputs = with pythonPackages; [ mopidy pafy ];
diff --git a/pkgs/applications/audio/mopidy/default.nix b/pkgs/applications/audio/mopidy/default.nix
index 29426f43de1..c1bdab8622c 100644
--- a/pkgs/applications/audio/mopidy/default.nix
+++ b/pkgs/applications/audio/mopidy/default.nix
@@ -1,23 +1,28 @@
-{ stdenv, fetchurl, pythonPackages, pygobject, gst_python, wrapGAppsHook
-, glib_networking, gst_plugins_good, gst_plugins_base, gst_plugins_ugly
+{ stdenv, fetchFromGitHub, pythonPackages, pygobject3, wrapGAppsHook
+, gst_all_1, glib_networking, gobjectIntrospection
 }:
 
 pythonPackages.buildPythonApplication rec {
   name = "mopidy-${version}";
 
-  version = "1.1.2";
+  version = "2.0.0";
 
-  src = fetchurl {
-    url = "https://github.com/mopidy/mopidy/archive/v${version}.tar.gz";
-    sha256 = "1vn4knpmnp3krmn627iv1r7xa50zl816ac6b24b8ph50cq2sqjfv";
+  src = fetchFromGitHub {
+    owner = "mopidy";
+    repo = "mopidy";
+    rev = "v${version}";
+    sha256 = "06f1y87dqc7p6kq5npmg3ki8x4iacyjzd7nq7188x20y2zglrjbm";
   };
 
-  buildInputs = [
-    wrapGAppsHook gst_plugins_base gst_plugins_good gst_plugins_ugly glib_networking
+  nativeBuildInputs = [ wrapGAppsHook ];
+
+  buildInputs = with gst_all_1; [
+    gst-plugins-base gst-plugins-good gst-plugins-ugly
+    glib_networking gobjectIntrospection
   ];
 
   propagatedBuildInputs = with pythonPackages; [
-    gst_python pygobject pykka tornado requests2
+    gst-python pygobject3 pykka tornado requests2
   ];
 
   # There are no tests
diff --git a/pkgs/applications/audio/ncmpcpp/default.nix b/pkgs/applications/audio/ncmpcpp/default.nix
index 488fe45e6c8..f0fd29697b1 100644
--- a/pkgs/applications/audio/ncmpcpp/default.nix
+++ b/pkgs/applications/audio/ncmpcpp/default.nix
@@ -15,11 +15,11 @@ assert taglibSupport -> (taglib != null);
 with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "ncmpcpp-${version}";
-  version = "0.7.2";
+  version = "0.7.3";
 
   src = fetchurl {
     url = "http://ncmpcpp.rybczak.net/stable/${name}.tar.bz2";
-    sha256 = "0fq9nk796cp7gs0gwrabb6wp7f5h7pph10hrkrik1wf4k3mzb4k3";
+    sha256 = "04mj6r0whikliblxfbz92pibwcd7a3ywkryf01a89zd4bi1jk2rc";
   };
 
   configureFlags = [ "BOOST_LIB_SUFFIX=" ]
diff --git a/pkgs/applications/audio/sound-juicer/default.nix b/pkgs/applications/audio/sound-juicer/default.nix
index c27dbad78cc..02a97dde4e2 100644
--- a/pkgs/applications/audio/sound-juicer/default.nix
+++ b/pkgs/applications/audio/sound-juicer/default.nix
@@ -5,11 +5,6 @@
 let
   major = "3.16";
   minor = "1";
-  GST_PLUGIN_PATH = stdenv.lib.makeSearchPath "lib/gstreamer-1.0" [
-    gst_all_1.gst-plugins-base
-    gst_all_1.gst-plugins-good
-    gst_all_1.gst-plugins-bad
-    gst_all_1.gst-libav ];
 
 in stdenv.mkDerivation rec {
   version = "${major}.${minor}";
@@ -24,15 +19,16 @@ in stdenv.mkDerivation rec {
                   gnome3.gsettings_desktop_schemas libmusicbrainz5 libdiscid isocodes
                   makeWrapper gnome3.dconf
                   gst_all_1.gstreamer gst_all_1.gst-plugins-base
-                  gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad ];
+                  gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad
+                  gst_all_1.gst-libav
+                ];
 
   preFixup = ''
     for f in $out/bin/* $out/libexec/*; do
       wrapProgram "$f" \
         --prefix XDG_DATA_DIRS : "${gnome3.gnome_themes_standard}/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
         --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" \
-        --prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules" \
-        --prefix GST_PLUGIN_PATH : "${GST_PLUGIN_PATH}"
+        --prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules"
     done
   '';
 
diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix
index e1eee1cdd8e..0875ca939ee 100644
--- a/pkgs/applications/audio/spotify/default.nix
+++ b/pkgs/applications/audio/spotify/default.nix
@@ -1,11 +1,11 @@
-{ fetchurl, stdenv, dpkg, xorg, alsaLib, makeWrapper, openssl_1_0_1, freetype
+{ fetchurl, stdenv, dpkg, xorg, alsaLib, makeWrapper, openssl, freetype
 , glib, pango, cairo, atk, gdk_pixbuf, gtk, cups, nspr, nss, libpng, GConf
-, libgcrypt, udev, fontconfig, dbus, expat, ffmpeg_0_10, curl, zlib, gnome }:
+, libgcrypt, libudev, fontconfig, dbus, expat, ffmpeg_0_10, curl, zlib, gnome }:
 
 assert stdenv.system == "x86_64-linux";
 
 let
-  version = "1.0.26.125.g64dc8bc6-15";
+  version = "1.0.27.71.g0a26e3b2-9";
 
   deps = [
     alsaLib
@@ -27,7 +27,7 @@ let
     nss
     pango
     stdenv.cc.cc
-    udev
+    libudev
     xorg.libX11
     xorg.libXcomposite
     xorg.libXcursor
@@ -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 = "01y4jr1r928251mj9kz1i7x93ya0ky4xaibm0q08q3zjsafianz1";
+      sha256 = "1rs08cvn0y1lzazlmzj4sn2iyacadwi6j70n5c7rvfvvs4p61p42";
     };
 
   buildInputs = [ dpkg makeWrapper ];
@@ -68,10 +68,10 @@ stdenv.mkDerivation {
       # Work around Spotify referring to a specific minor version of
       # OpenSSL.
 
-      ln -s ${openssl_1_0_1}/lib/libssl.so $libdir/libssl.so.1.0.0
-      ln -s ${openssl_1_0_1}/lib/libcrypto.so $libdir/libcrypto.so.1.0.0
-      ln -s ${nspr}/lib/libnspr4.so $libdir/libnspr4.so
-      ln -s ${nspr}/lib/libplc4.so $libdir/libplc4.so
+      ln -s ${openssl.out}/lib/libssl.so $libdir/libssl.so.1.0.0
+      ln -s ${openssl.out}/lib/libcrypto.so $libdir/libcrypto.so.1.0.0
+      ln -s ${nspr.out}/lib/libnspr4.so $libdir/libnspr4.so
+      ln -s ${nspr.out}/lib/libplc4.so $libdir/libplc4.so
 
       rpath="$out/share/spotify:$libdir"
 
@@ -104,6 +104,6 @@ stdenv.mkDerivation {
     homepage = https://www.spotify.com/;
     description = "Play music from the Spotify music service";
     license = stdenv.lib.licenses.unfree;
-    maintainers = with stdenv.lib.maintainers; [ eelco ftrvxmtrx ];
+    maintainers = with stdenv.lib.maintainers; [ eelco ftrvxmtrx sheenobu ];
   };
 }
diff --git a/pkgs/applications/audio/swh-lv2/default.nix b/pkgs/applications/audio/swh-lv2/default.nix
index 2955a9371ff..4bc7801637c 100644
--- a/pkgs/applications/audio/swh-lv2/default.nix
+++ b/pkgs/applications/audio/swh-lv2/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
   };
 
   patchPhase = ''
-    sed -e "s#xsltproc#${libxslt}/bin/xsltproc#" -i Makefile
+    sed -e "s#xsltproc#${libxslt.bin}/bin/xsltproc#" -i Makefile
     sed -e "s#PREFIX = /usr/local#PREFIX = $out#" -i Makefile
   '';
 
diff --git a/pkgs/applications/audio/yoshimi/default.nix b/pkgs/applications/audio/yoshimi/default.nix
index 9cc7f3f1fc8..ab7eb10798d 100644
--- a/pkgs/applications/audio/yoshimi/default.nix
+++ b/pkgs/applications/audio/yoshimi/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation  rec {
 
   preConfigure = "cd src";
 
-  cmakeFlags = [ "-DFLTK_MATH_LIBRARY=${stdenv.glibc}/lib/libm.so -DCMAKE_INSTALL_DATAROOTDIR=$out" ];
+  cmakeFlags = [ "-DFLTK_MATH_LIBRARY=${stdenv.glibc.out}/lib/libm.so -DCMAKE_INSTALL_DATAROOTDIR=$out" ];
 
   meta = with stdenv.lib; {
     description = "high quality software synthesizer based on ZynAddSubFX";
diff --git a/pkgs/applications/backup/areca/default.nix b/pkgs/applications/backup/areca/default.nix
new file mode 100644
index 00000000000..364e13e97a9
--- /dev/null
+++ b/pkgs/applications/backup/areca/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchurl, ant, jre, jdk, swt, acl, attr }:
+
+stdenv.mkDerivation rec {
+  name = "areca-7.5";
+
+  src = fetchurl {
+    url = "http://downloads.sourceforge.net/project/areca/areca-stable/areca-7.5/areca-7.5-src.tar.gz";
+    sha256 = "1q4ha9s96c1syplxm04bh1v1gvjq16l4pa8w25w95d2ywwvyq1xb";
+  };
+
+  sourceRoot = ".";
+
+  buildInputs = [ jdk ant acl attr ];
+
+  patches = [ ./fix-javah-bug.diff ];
+
+  postPatch = ''
+    substituteInPlace build.xml --replace "/usr/lib/java/swt.jar" "${swt}/jars/swt.jar"
+    substituteInPlace build.xml --replace "gcc" "${stdenv.cc}/bin/gcc"
+    substituteInPlace areca.sh --replace "bin/" ""
+    substituteInPlace bin/areca_run.sh --replace "/usr/java" "${jre}/lib/openjdk"
+    substituteInPlace bin/areca_run.sh --replace "/usr/lib/java/swt.jar" "${swt}/jars/swt.jar"
+
+    sed -i "s#^PROGRAM_DIR.*#PROGRAM_DIR=$out#g" bin/areca_run.sh
+    sed -i "s#^LIBRARY_PATH.*#LIBRARY_PATH=${swt}/lib:$out/lib:${acl}/lib#g" bin/areca_run.sh
+
+    # https://sourceforge.net/p/areca/bugs/563/
+    substituteInPlace bin/areca_run.sh --replace '[ "$JAVA_IMPL" = "java" ]' \
+      '[[ "$JAVA_IMPL" = "java" || "$JAVA_IMPL" = "openjdk" ]]'
+  '';
+
+  buildPhase = "ant";
+
+  installPhase = ''
+    mkdir -p $out/bin $out/lib $out/translations
+    cp areca.sh $out/bin/areca
+    cp -r bin $out
+    cp -r lib $out
+    cp -r translations $out
+    cp COPYING $out
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://www.areca-backup.org/;
+    description = "An Open Source personal backup solution";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/pkgs/applications/backup/areca/fix-javah-bug.diff b/pkgs/applications/backup/areca/fix-javah-bug.diff
new file mode 100644
index 00000000000..5d5feaf9b94
--- /dev/null
+++ b/pkgs/applications/backup/areca/fix-javah-bug.diff
@@ -0,0 +1,24 @@
+diff --git a/build.xml b/build.xml
+index 1ba08e0..9248b76 100644
+--- a/build.xml
++++ b/build.xml
+@@ -56,10 +56,16 @@
+
+     <target name="compilejni" unless="isWindows">
+         <description>JNI compilation task (builds libarecafs.so ... for unix-like operating systems only)</description>
++
+         <!--Generate the JNI header-->
+-        <javah destdir="${root}/jni" force="yes" classpath="${root}/lib/areca.jar">
+-            <class name="com.myJava.file.metadata.posix.jni.wrapper.FileAccessWrapper"/>
+-        </javah>
++	<exec executable="javah">
++		<arg value="-d"/>
++		<arg value="${root}/jni"/>
++		<arg value="-force"/>
++		<arg value="-classpath"/>
++		<arg value="${root}/lib/areca.jar"/>
++		<arg value="com.myJava.file.metadata.posix.jni.wrapper.FileAccessWrapper"/>
++	</exec>
+
+         <!-- Compile the JNI code -->
+         <exec dir="${root}/jni" executable="gcc">
diff --git a/pkgs/applications/display-managers/sddm/default.nix b/pkgs/applications/display-managers/sddm/default.nix
index e4f68d786f4..8e1812ec013 100644
--- a/pkgs/applications/display-managers/sddm/default.nix
+++ b/pkgs/applications/display-managers/sddm/default.nix
@@ -72,7 +72,7 @@ stdenv.mkDerivation {
 
   nativeBuildInputs = [ lndir makeQtWrapper ];
   buildInputs = [ unwrapped ] ++ themes;
-  inherit themes;
+  themes = map (pkg: pkg.out or pkg) themes;
   inherit unwrapped;
 
   installPhase = ''
@@ -81,7 +81,7 @@ stdenv.mkDerivation {
     mkdir -p "$out/share/sddm"
     for pkg in $unwrapped $themes; do
         local sddmDir="$pkg/share/sddm"
-        if [[ -d "$sddmDir" ]]; then
+        if [ -d "$sddmDir" ]; then
             lndir -silent "$sddmDir" "$out/share/sddm"
         fi
     done
diff --git a/pkgs/applications/display-managers/slim/default.nix b/pkgs/applications/display-managers/slim/default.nix
index 8020ecb12a5..c7710262988 100644
--- a/pkgs/applications/display-managers/slim/default.nix
+++ b/pkgs/applications/display-managers/slim/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, cmake, pkgconfig, xorg, libjpeg, libpng
-, fontconfig, freetype, pam, dbus_libs, makeWrapper, pkgs }:
+, fontconfig, freetype, pam, dbus_libs, makeWrapper }:
 
 stdenv.mkDerivation rec {
   name = "slim-1.3.6";
diff --git a/pkgs/applications/editors/atom/default.nix b/pkgs/applications/editors/atom/default.nix
index 33813ca3a66..9f8f6f5fd0c 100644
--- a/pkgs/applications/editors/atom/default.nix
+++ b/pkgs/applications/editors/atom/default.nix
@@ -1,19 +1,19 @@
-{ stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
+{ stdenv, fetchurl, lib, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
 , dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
 , gvfs, cairo, cups, expat, libgpgerror, nspr, gconf, nss, xorg, libcap, systemd
 }:
 
 let
-  atomEnv = buildEnv {
-    name = "env-atom";
-    paths = [
-      stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
-      fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
-      xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
-      xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
-      xorg.libXcursor libcap systemd
-    ];
-  };
+  atomPkgs = [
+    stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
+    fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
+    xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
+    xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
+    xorg.libXcursor libcap systemd
+  ];
+  atomLib = lib.makeLibraryPath atomPkgs;
+  atomLib64 = lib.makeSearchPathOutputs "lib64" ["lib"] atomPkgs;
+
 in stdenv.mkDerivation rec {
   name = "atom-${version}";
   version = "1.6.2";
@@ -24,7 +24,7 @@ in stdenv.mkDerivation rec {
     name = "${name}.deb";
   };
 
-  buildInputs = [ atomEnv gvfs makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   phases = [ "installPhase" "fixupPhase" ];
 
@@ -41,10 +41,10 @@ in stdenv.mkDerivation rec {
     patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
       $out/share/atom/resources/app/apm/bin/node
     wrapProgram $out/bin/atom \
-      --prefix "LD_LIBRARY_PATH" : "${atomEnv}/lib:${atomEnv}/lib64" \
+      --prefix "LD_LIBRARY_PATH" : "${atomLib}:${atomLib64}" \
       --prefix "PATH" : "${gvfs}/bin"
     wrapProgram $out/bin/apm \
-      --prefix "LD_LIBRARY_PATH" : "${atomEnv}/lib:${atomEnv}/lib64"
+      --prefix "LD_LIBRARY_PATH" : "${atomLib}:${atomLib64}"
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/editors/brackets/default.nix b/pkgs/applications/editors/brackets/default.nix
index 131675486ba..127ed981a6c 100644
--- a/pkgs/applications/editors/brackets/default.nix
+++ b/pkgs/applications/editors/brackets/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, buildEnv, gtk, glib, gdk_pixbuf, alsaLib, nss, nspr, gconf
-, cups, libgcrypt_1_5, makeWrapper, dbus, udev }:
+, cups, libgcrypt_1_5, libudev, makeWrapper, dbus }:
 let
   bracketsEnv = buildEnv {
     name = "env-brackets";
     paths = [
       gtk glib gdk_pixbuf stdenv.cc.cc alsaLib nss nspr gconf cups libgcrypt_1_5
-      dbus udev
+      dbus libudev.out
     ];
   };
 in
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
     rmdir $out/usr
     ln -sf $out/opt/brackets/brackets $out/bin/brackets
 
-    ln -s ${udev}/lib/libudev.so.1 $out/opt/brackets/lib/libudev.so.0
+    ln -s ${libudev.out}/lib/libudev.so.1 $out/opt/brackets/lib/libudev.so.0
 
     patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
       --set-rpath "${bracketsEnv}/lib:${bracketsEnv}/lib64" \
diff --git a/pkgs/applications/editors/codeblocks/default.nix b/pkgs/applications/editors/codeblocks/default.nix
index 53b7b5750a0..76df6d4d2b9 100644
--- a/pkgs/applications/editors/codeblocks/default.nix
+++ b/pkgs/applications/editors/codeblocks/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
   patches = [ ./writable-projects.patch ];
   preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file";
-  postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc}/sbin/ldconfig";
+  postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig";
   configureFlags = [ "--enable-pch=no" ]
     ++ optional contribPlugins "--with-contrib-plugins";
 
diff --git a/pkgs/applications/editors/eclipse/default.nix b/pkgs/applications/editors/eclipse/default.nix
index f4804c75ca3..e4eb6eb8f65 100644
--- a/pkgs/applications/editors/eclipse/default.nix
+++ b/pkgs/applications/editors/eclipse/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeDesktopItem, makeWrapper
+{ stdenv, lib, fetchurl, makeDesktopItem, makeWrapper
 , freetype, fontconfig, libX11, libXext, libXrender, zlib
 , glib, gtk, libXtst, jdk
 , webkitgtk2 ? null  # for internal web browser
diff --git a/pkgs/applications/editors/edbrowse/default.nix b/pkgs/applications/editors/edbrowse/default.nix
index d969552ecde..712ede2e316 100644
--- a/pkgs/applications/editors/edbrowse/default.nix
+++ b/pkgs/applications/editors/edbrowse/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     substituteInPlace src/ebjs.c --replace \"edbrowse-js\" \"$out/bin/edbrowse-js\"
   '';
 
-  NIX_CFLAGS_COMPILE = "-I${spidermonkey_24}/include/mozjs-24";
+  NIX_CFLAGS_COMPILE = "-I${spidermonkey_24.dev}/include/mozjs-24";
   makeFlags = "-C src prefix=$(out)";
 
   src = fetchurl {
diff --git a/pkgs/applications/editors/emacs-24/default.nix b/pkgs/applications/editors/emacs-24/default.nix
index ffa280d360c..6359bd7bde1 100644
--- a/pkgs/applications/editors/emacs-24/default.nix
+++ b/pkgs/applications/editors/emacs-24/default.nix
@@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
              "--with-gif=no" "--with-tiff=no" ];
 
   NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.isDarwin && withX)
-    "-I${cairo}/include/cairo";
+    "-I${cairo.dev}/include/cairo";
 
   postInstall = ''
     mkdir -p $out/share/emacs/site-lisp/
diff --git a/pkgs/applications/editors/emacs-24/macport-24.5.nix b/pkgs/applications/editors/emacs-24/macport-24.5.nix
index c778c42de85..23133ec262c 100644
--- a/pkgs/applications/editors/emacs-24/macport-24.5.nix
+++ b/pkgs/applications/editors/emacs-24/macport-24.5.nix
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags = [
-    "LDFLAGS=-L${ncurses}/lib"
+    "LDFLAGS=-L${ncurses.out}/lib"
     "--with-xml2=yes"
     "--with-gnutls=yes"
     "--with-mac"
@@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
   ];
 
   CFLAGS = "-O3";
-  LDFLAGS = "-O3 -L${ncurses}/lib";
+  LDFLAGS = "-O3 -L${ncurses.out}/lib";
 
   postInstall = ''
     mkdir -p $out/share/emacs/site-lisp/
diff --git a/pkgs/applications/editors/heme/default.nix b/pkgs/applications/editors/heme/default.nix
index 69ba674d2d4..c74e47a5243 100644
--- a/pkgs/applications/editors/heme/default.nix
+++ b/pkgs/applications/editors/heme/default.nix
@@ -10,10 +10,11 @@ stdenv.mkDerivation rec {
   postPatch = ''
     substituteInPlace Makefile \
       --replace "/usr/local" "$out" \
-      --replace "CFLAGS = " "CFLAGS = -I${ncurses}/include " \
-      --replace "LDFLAGS = " "LDFLAGS = -L${ncurses}/lib " \
+      --replace "CFLAGS = " "CFLAGS = -I${ncurses.dev}/include " \
+      --replace "LDFLAGS = " "LDFLAGS = -L${ncurses.out}/lib " \
       --replace "-lcurses" "-lncurses"
   '';
+  buildInputs = [ ncurses ];
   preBuild = ''
     mkdir -p $out/bin
     mkdir -p $out/man/man1
diff --git a/pkgs/applications/editors/idea/common.nix b/pkgs/applications/editors/idea/common.nix
index 36f600c1486..fbe6210a39b 100644
--- a/pkgs/applications/editors/idea/common.nix
+++ b/pkgs/applications/editors/idea/common.nix
@@ -37,7 +37,7 @@ with stdenv; lib.makeOverridable mkDerivation rec {
         truncate --size=$size $fname
       }
 
-      interpreter=$(echo ${stdenv.glibc}/lib/ld-linux*.so.2)
+      interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2)
       if [ "${stdenv.system}" == "x86_64-linux" ]; then
         target_size=$(get_file_size bin/fsnotifier64)
         patchelf --set-interpreter "$interpreter" bin/fsnotifier64
diff --git a/pkgs/applications/editors/lighttable/default.nix b/pkgs/applications/editors/lighttable/default.nix
index 6bf5a1a9e6d..9b87f13d623 100644
--- a/pkgs/applications/editors/lighttable/default.nix
+++ b/pkgs/applications/editors/lighttable/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, buildEnv, zlib, glib, alsaLib, makeDesktopItem
 , dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
-, cairo, cups, expat, libgpgerror, nspr, gnome3, nss, xorg, udev, libnotify
+, cairo, cups, expat, libgpgerror, nspr, gnome3, nss, xorg, libudev, libnotify
 }:
 
 let
@@ -45,9 +45,9 @@ stdenv.mkDerivation rec {
 
     mv $out/share/LightTable/light $out/bin/light
 
-    ln -s ${udev}/lib/libudev.so.1 $out/share/LightTable/libudev.so.0
+    ln -sf ${libudev.out}/lib/libudev.so.1 $out/share/LightTable/libudev.so.0
     substituteInPlace $out/bin/light \
-        --replace "/usr/lib/x86_64-linux-gnu" "${udev}/lib" \
+        --replace "/usr/lib/x86_64-linux-gnu" "${libudev.out}/lib" \
         --replace "/lib/x86_64-linux-gnu" "$out/share/LightTable" \
         --replace 'HERE=`dirname $(readlink -f $0)`' "HERE=$out/share/LightTable"
 
diff --git a/pkgs/applications/editors/music/tuxguitar/default.nix b/pkgs/applications/editors/music/tuxguitar/default.nix
index 768842a3875..65ea62b3368 100644
--- a/pkgs/applications/editors/music/tuxguitar/default.nix
+++ b/pkgs/applications/editors/music/tuxguitar/default.nix
@@ -26,7 +26,7 @@ in stdenv.mkDerivation rec {
 
     wrapProgram $out/bin/tuxguitar \
       --set JAVA "${jdk}/bin/java" \
-      --prefix LD_LIBRARY_PATH : "$out/lib/:${swt}/lib:${alsaLib}/lib" \
+      --prefix LD_LIBRARY_PATH : "$out/lib/:${swt}/lib:${alsaLib.out}/lib" \
       --prefix CLASSPATH : "${swt}/jars/swt.jar:$out/lib/tuxguitar.jar:$out/lib/itext.jar"
   '';
 
diff --git a/pkgs/applications/editors/nvpy/default.nix b/pkgs/applications/editors/nvpy/default.nix
index a6dd7bcb403..c42940440ae 100644
--- a/pkgs/applications/editors/nvpy/default.nix
+++ b/pkgs/applications/editors/nvpy/default.nix
@@ -1,12 +1,12 @@
 { pkgs, fetchurl, tk, buildPythonApplication, pythonPackages }:
 
 buildPythonApplication rec {
-  version = "0.9.2";
+  version = "0.9.7";
   name = "nvpy-${version}";
 
   src = fetchurl {
     url = "https://github.com/cpbotha/nvpy/archive/v${version}.tar.gz";
-    sha256 = "78e41b80fc5549cba8cfd92b52d6530e8dfc8e8f37e96e4b219f30c266af811d";
+    sha256 = "1rd3vlaqkg16iz6qcw6rkbq0jmyvc0843wa3brnvn1nz0kla243f";
   };
 
   buildInputs = [tk];
@@ -14,6 +14,7 @@ buildPythonApplication rec {
   propagatedBuildInputs = [
     pythonPackages.markdown
     pythonPackages.tkinter
+    pythonPackages.docutils
   ];
 
   postInstall = ''
diff --git a/pkgs/applications/editors/sublime3/default.nix b/pkgs/applications/editors/sublime3/default.nix
index ad9fc056757..507dc611fd4 100644
--- a/pkgs/applications/editors/sublime3/default.nix
+++ b/pkgs/applications/editors/sublime3/default.nix
@@ -57,7 +57,7 @@ in let
         --set NIX_REDIRECTS ${builtins.concatStringsSep ":" redirects}
 
       # Without this, plugin_host crashes, even though it has the rpath
-      wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl}/lib/libssl.so:${bzip2}/lib/libbz2.so
+      wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl.out}/lib/libssl.so:${bzip2.out}/lib/libbz2.so
     '';
   };
 in stdenv.mkDerivation {
diff --git a/pkgs/applications/editors/texmacs/default.nix b/pkgs/applications/editors/texmacs/default.nix
index e415239d76f..e51813459c6 100644
--- a/pkgs/applications/editors/texmacs/default.nix
+++ b/pkgs/applications/editors/texmacs/default.nix
@@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
   postFixup = ''
     bin="$out/libexec/TeXmacs/bin/texmacs.bin"
     rpath=$(patchelf --print-rpath "$bin")
-    patchelf --set-rpath "$rpath:${zlib}/lib" "$bin"
+    patchelf --set-rpath "$rpath:${zlib.out}/lib" "$bin"
   '';
 
   meta = {
diff --git a/pkgs/applications/editors/vis/default.nix b/pkgs/applications/editors/vis/default.nix
new file mode 100644
index 00000000000..8c7cf73f432
--- /dev/null
+++ b/pkgs/applications/editors/vis/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchFromGitHub, unzip, pkgconfig, makeWrapper, ncurses, libtermkey, lpeg, lua }:
+
+stdenv.mkDerivation rec {
+  name = "vis-nightly-${version}";
+  version = "2016-04-15";
+
+  src = fetchFromGitHub {
+    sha256 = "0a4gpwniy5r9dpfq51fxjxxnxavdjv8x76w9bbjnbnh8n63p3sj7";
+    rev = "472c559a273d3c7b0f5ee92260c5544bc3d74576";
+    repo = "vis";
+    owner = "martanne";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildInputs = [
+     unzip
+     pkgconfig
+     ncurses
+     libtermkey
+     lua
+     lpeg
+  ];
+
+  LUA_CPATH="${lpeg}/lib/lua/${lua.luaversion}/?.so;";
+  LUA_PATH="${lpeg}/share/lua/${lua.luaversion}/?.lua";
+
+  postInstall = ''
+    echo wrapping $out/bin/vis with runtime environment
+    wrapProgram $out/bin/vis \
+      --prefix LUA_CPATH : "${lpeg}/lib/lua/${lua.luaversion}/?.so" \
+      --prefix LUA_PATH : "${lpeg}/share/lua/${lua.luaversion}/?.lua" \
+      --prefix VIS_PATH : "$out/share/vis"
+  '';
+
+  meta = {
+    description = "A vim like editor";
+    homepage = http://github.com/martanne/vis;
+    license = stdenv.lib.licenses.isc;
+    maintainers = [ stdenv.lib.maintainers.vrthra ];
+  };
+}
+
diff --git a/pkgs/applications/editors/vscode/default.nix b/pkgs/applications/editors/vscode/default.nix
index 64b46c2ac6e..0d9572ebc22 100644
--- a/pkgs/applications/editors/vscode/default.nix
+++ b/pkgs/applications/editors/vscode/default.nix
@@ -1,90 +1,50 @@
-{ callPackage, stdenv, fetchurl, makeWrapper
-, jq, xlibs, gtk, python, nodejs
+{ stdenv, callPackage, fetchurl, unzip
 , ...
 } @ args:
 
 let
-  electron = callPackage ../../../development/tools/electron/default.nix (args // rec {
-    version = "0.35.6";
-    sha256 = "1bwn14769nby04zkza9jphsya2p6fjnkm1k2y4h5y2l4gnqdvmx0";
-  });
+  atomEnv = callPackage ../../../development/tools/electron/env-atom.nix (args);
+
+  version = "0.10.10";
+  rev = "5b5f4db87c10345b9d5c8d0bed745bcad4533135";
+  sha256 = if stdenv.system == "i686-linux"    then "1mmgq4fxi2h4hvz7yxgzzyvlznkb42qwr8i1g2b1akdlgnrvvpby"
+      else if stdenv.system == "x86_64-linux"  then "1zjb6mys5qs9mb21rpgpnbgq4gpnw6gsgfn5imf7ca7myk1bxnvk"
+      else if stdenv.system == "x86_64-darwin" then "0y1as2s6nhicyvdfszphhqp76iv9wcygglrl2f0jamm98g9qp66p"
+      else throw "Unsupported system: ${stdenv.system}";
+
+  urlMod = if stdenv.system == "i686-linux" then "linux-ia32"
+      else if stdenv.system == "x86_64-linux" then "linux-x64"
+      else if stdenv.system == "x86_64-darwin" then "darwin"
+      else throw "Unsupported system: ${stdenv.system}";
+
 in
   stdenv.mkDerivation rec {
     name = "vscode-${version}";
-    version = "0.10.10";
+    inherit version;
 
     src = fetchurl {
-      url = "https://github.com/Microsoft/vscode/archive/${version}.tar.gz";
-      sha256 = "1mzkip6621111xwwksqjad1kgpbhna4dhpkf6cnj2r18dkk2jmcw";
+      url = "https://az764295.vo.msecnd.net/stable/${rev}/VSCode-${urlMod}-stable.zip";
+      inherit sha256;
     };
 
-    buildInputs = [ makeWrapper jq xlibs.libX11 xlibs.xproto gtk python nodejs electron ];
-
-    extensionGalleryJSON = ''
-      {
-        \"extensionsGallery\": {
-          \"serviceUrl\": \"https://marketplace.visualstudio.com/_apis/public/gallery\",
-          \"cacheUrl\": \"https://vscode.blob.core.windows.net/gallery/index\",
-          \"itemUrl\": \"https://marketplace.visualstudio.com/items\"
-        }
-      }
-    '';
-
-    configurePhase = ''
-      # PATCH SCRIPT SHEBANGS
-      echo "PATCH SCRIPT SHEBANGS"
-      patchShebangs ./scripts
-
-      # ADD EXTENSION GALLERY URLS TO APPLICATION CONFIGURATION
-      echo "AUGMENT APPLICATION CONFIGURATION"
-      echo "$(cat ./product.json) ${extensionGalleryJSON}" | jq -s add  > tmpFile && \
-        mv tmpFile ./product.json
-    '';
-
-    buildPhase  = ''
-      # BUILD COMPILE- & RUN-TIME DEPENDENCIES
-      echo "BUILD COMPILE- & RUN-TIME DEPENDENCIES"
-      mkdir -p ./tmp
-      HOME=./tmp ./scripts/npm.sh install
-
-      # COMPILE SOURCES
-      echo "COMPILE SOURCES"
-      ./node_modules/.bin/gulp
-    '';
-
-    doCheck = true;
-    checkPhase = ''
-      # CHECK APPLICATION
-      echo "CHECK APPLICATION"
-      ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 ${electron}/bin/electron ./node_modules/.bin/_mocha
-    '';
+    buildInputs = [ unzip ];
 
     installPhase = ''
-      # PRUNE COMPILE-TIME DEPENDENCIES
-      echo "PRUNE COMPILE-TIME DEPENDENCIES"
-      npm prune --production
+      mkdir -p $out/bin
+      cp -r ./* $out/bin
 
-      # COPY FILES NEEDED FOR RUNNING APPLICATION TO OUT DIRECTORY
-      echo "COPY FILES NEEDED FOR RUNNING APPLICATION TO OUT DIRECTORY"
-      mkdir -p "$out"
-      cp -R ./.vscode "$out"/.vscode
-      cp -R ./extensions "$out"/extensions
-      cp -R ./out "$out"/out
-      cp -R ./node_modules "$out"/node_modules
-      cp ./package.json "$out"/package.json
-      cp ./product.json "$out"/product.json
-      cp ./tslint.json "$out"/tslint.json
-      # COPY LEGAL STUFF
-      cp ./LICENSE.txt "$out"/LICENSE.txt
-      cp ./OSSREADME.json "$out"/OSSREADME.json
-      cp ./ThirdPartyNotices.txt "$out"/ThirdPartyNotices.txt
+      ${if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then ''
+        patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+        $out/bin/code
+      '' else ""}
+    '';
 
-      # CREATE RUNNER SCRIPT
-      echo "CREATE RUNNER SCRIPT"
-      mkdir -p "$out"/bin
-      makeWrapper "${electron}/bin/electron" "$out/bin/vscode" \
-      --set VSCODE_DEV 1 \
-      --add-flags "$out"
+    postFixup = ''
+      ${if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then ''
+        patchelf \
+        --set-rpath "${atomEnv}/lib:${atomEnv}/lib64:$out/bin:$(patchelf --print-rpath $out/bin/code)" \
+        $out/bin/code
+      '' else ""}
     '';
 
     meta = with stdenv.lib; {
@@ -95,7 +55,8 @@ in
         It is also customizable, so users can change the editor's theme, keyboard shortcuts, and preferences.
       '';
       homepage = http://code.visualstudio.com/;
-      license = licenses.mit;
-      platforms = [ "x86_64-linux" ];
+      downloadPage = https://code.visualstudio.com/Updates;
+      license = licenses.unfree;
+      platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
     };
   }
diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix
index 39ba1f7265b..c373f8b9e27 100644
--- a/pkgs/applications/gis/grass/default.nix
+++ b/pkgs/applications/gis/grass/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
     "--with-wxwidgets"
     "--with-netcdf"
     "--with-geos"
-    "--with-postgres"
+    "--with-postgres" "--with-postgres-libs=${postgresql.lib}/lib/"
     "--with-mysql" "--with-mysql-includes=${mysql.lib}/include/mysql"
     "--with-blas"
   ];
diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix
index e75e86a4d53..ef3b7b05b18 100644
--- a/pkgs/applications/graphics/ImageMagick/default.nix
+++ b/pkgs/applications/graphics/ImageMagick/default.nix
@@ -13,7 +13,7 @@ in
 
 stdenv.mkDerivation rec {
   name = "imagemagick-${version}";
-  version = "6.9.2-0";
+  version = "6.9.3-8";
 
   src = fetchurl {
     urls = [
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
       # the original source above removes tarballs quickly
       "http://distfiles.macports.org/ImageMagick/ImageMagick-${version}.tar.xz"
     ];
-    sha256 = "17ir8bw1j7g7srqmsz3rx780sgnc21zfn0kwyj78iazrywldx8h7";
+    sha256 = "129s4cwp6cbhgsr3xr8186q5j02zpbk6kqfk4j7ayb563zsrdb4h";
   };
 
   outputs = [ "out" "doc" ];
diff --git a/pkgs/applications/graphics/antimony/default.nix b/pkgs/applications/graphics/antimony/default.nix
index dded423652c..fa9a7e0fdd3 100644
--- a/pkgs/applications/graphics/antimony/default.nix
+++ b/pkgs/applications/graphics/antimony/default.nix
@@ -32,6 +32,7 @@ in
     ];
 
     configurePhase = ''
+      runHook preConfigure
       export GITREV=${gitRev}
       export GITBRANCH=${gitBranch}
       export GITTAG=${gitTag}
@@ -39,6 +40,7 @@ in
       cd qt
       export sourceRoot=$sourceRoot/qt
       qmake antimony.pro PREFIX=$out
+      runHook postConfigure
     '';
 
     enableParallelBuilding = true;
diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix
index a41e1ad07d3..119125066bd 100644
--- a/pkgs/applications/graphics/digikam/default.nix
+++ b/pkgs/applications/graphics/digikam/default.nix
@@ -70,7 +70,7 @@ let
 
     # Help digiKam find libusb, otherwise gphoto2 support is disabled
     cmakeFlags = [
-      "-DLIBUSB_LIBRARIES=${libusb1}/lib"
+      "-DLIBUSB_LIBRARIES=${libusb1.out}/lib"
       "-DLIBUSB_INCLUDE_DIR=${libusb1}/include/libusb-1.0"
       "-DENABLE_BALOOSUPPORT=ON"
       "-DENABLE_KDEPIMLIBSSUPPORT=ON"
diff --git a/pkgs/applications/graphics/feh/default.nix b/pkgs/applications/graphics/feh/default.nix
index 8602a9a04f8..43aa8bfa1f5 100644
--- a/pkgs/applications/graphics/feh/default.nix
+++ b/pkgs/applications/graphics/feh/default.nix
@@ -2,13 +2,15 @@
 , libXinerama, curl, libexif }:
 
 stdenv.mkDerivation rec {
-  name = "feh-2.14";
+  name = "feh-2.15.2";
 
   src = fetchurl {
     url = "http://feh.finalrewind.org/${name}.tar.bz2";
-    sha256 = "0j5wxpqccnd0hl74z2vwv25n7qnik1n2mcm2jn0c0z7cjn4wsa9q";
+    sha256 = "0bnfk50y2l5zkr292l4yyws1m7ibdmr398vxj7c0djh965frpj1q";
   };
 
+  outputs = [ "out" "doc" ];
+
   nativeBuildInputs = [ makeWrapper ];
   buildInputs = [ xlibsWrapper imlib2 libjpeg libpng libXinerama curl libexif ];
 
@@ -17,7 +19,7 @@ stdenv.mkDerivation rec {
   '';
 
   postInstall = ''
-    wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg}/bin" \
+    wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg.bin}/bin" \
                                --add-flags '--theme=feh'
   '';
 
diff --git a/pkgs/applications/graphics/geeqie/default.nix b/pkgs/applications/graphics/geeqie/default.nix
index e2cc0ec5c01..6508b16d15a 100644
--- a/pkgs/applications/graphics/geeqie/default.nix
+++ b/pkgs/applications/graphics/geeqie/default.nix
@@ -1,21 +1,22 @@
-{ stdenv, fetchurl, pkgconfig, gtk, libpng, exiv2
-, lcms, intltool, gettext, libchamplain, fbida
+{ stdenv, fetchurl, pkgconfig, autoconf, automake, gtk, libpng, exiv2
+, lcms, intltool, gettext, fbida
 }:
 
 stdenv.mkDerivation rec {
   name = "geeqie-${version}";
-  version = "1.1"; # Don't upgrade to 1.2; see fee59b1235e658954b207ff6679264654c4708d2.
+  version = "1.2.3";
 
   src = fetchurl {
-    url = "mirror://sourceforge/geeqie/${name}.tar.gz";
-    sha256 = "1kzy39z9505xkayyx7rjj2wda76xy3ch1s5z35zn8yli54ffhi2m";
+    url = "http://geeqie.org/${name}.tar.xz";
+    sha256 = "2629bf33a9070fad4804b1ef051c3bf8a8fdad3bba4e6188dc20588185003248";
   };
 
+  preConfigure = "./autogen.sh";
+
   configureFlags = [ "--enable-gps" ];
 
   buildInputs = [
-    pkgconfig gtk libpng exiv2 lcms intltool gettext
-    #libchamplain
+    pkgconfig autoconf automake gtk libpng exiv2 lcms intltool gettext
   ];
 
   postInstall = ''
diff --git a/pkgs/applications/graphics/gimp/2.8.nix b/pkgs/applications/graphics/gimp/2.8.nix
index 55e85fc5ec6..b0983865692 100644
--- a/pkgs/applications/graphics/gimp/2.8.nix
+++ b/pkgs/applications/graphics/gimp/2.8.nix
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   # "screenshot" needs this.
-  NIX_LDFLAGS = "-rpath ${xorg.libX11}/lib"
+  NIX_LDFLAGS = "-rpath ${xorg.libX11.out}/lib"
     + stdenv.lib.optionalString stdenv.isDarwin " -lintl";
 
   meta = {
diff --git a/pkgs/applications/graphics/photoqt/default.nix b/pkgs/applications/graphics/photoqt/default.nix
index 9d68a44821a..f9b24581929 100644
--- a/pkgs/applications/graphics/photoqt/default.nix
+++ b/pkgs/applications/graphics/photoqt/default.nix
@@ -1,14 +1,9 @@
-{ stdenv, fetchurl, cmake, makeWrapper, exiv2, graphicsmagick
+{ stdenv, fetchurl, cmake, makeQtWrapper, exiv2, graphicsmagick
 , qtbase, qtdeclarative, qtmultimedia, qtquickcontrols, qttools
 }:
 
 let
   version = "1.3";
-  qmlPath = stdenv.lib.makeSearchPath "lib/qt5/qml/" [
-    qtquickcontrols
-    qtdeclarative
-    qtmultimedia
-  ];
 in
 stdenv.mkDerivation rec {
   name = "photoqt-${version}";
@@ -18,7 +13,8 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    cmake makeWrapper qtbase qtquickcontrols qttools exiv2 graphicsmagick
+    cmake makeQtWrapper qtbase qtquickcontrols qttools exiv2 graphicsmagick
+    qtmultimedia qtdeclarative
   ];
 
   preConfigure = ''
@@ -26,7 +22,7 @@ stdenv.mkDerivation rec {
   '';
 
   postInstall = ''
-    wrapProgram $out/bin/photoqt --set QML2_IMPORT_PATH "${qmlPath}"
+    wrapQtProgram $out/bin/photoqt
   '';
 
   meta = {
diff --git a/pkgs/applications/graphics/phototonic/default.nix b/pkgs/applications/graphics/phototonic/default.nix
index a26346add7f..4ed3a424031 100644
--- a/pkgs/applications/graphics/phototonic/default.nix
+++ b/pkgs/applications/graphics/phototonic/default.nix
@@ -16,8 +16,10 @@ stdenv.mkDerivation rec {
   buildInputs = [ qtbase exiv2 ];
 
   configurePhase = ''
+    runHook preConfigure
     sed -i 's;/usr;;' phototonic.pro
     qmake PREFIX=""
+    runHook postConfigure
   '';
 
   installFlags = [ "INSTALL_ROOT=$(out)" ];
diff --git a/pkgs/applications/graphics/rapcad/default.nix b/pkgs/applications/graphics/rapcad/default.nix
index cb92947b766..90cb360e7d5 100644
--- a/pkgs/applications/graphics/rapcad/default.nix
+++ b/pkgs/applications/graphics/rapcad/default.nix
@@ -15,8 +15,10 @@ stdenv.mkDerivation rec {
   buildInputs = [ qtbase cgal boost gmp mpfr flex bison dxflib readline ];
 
   configurePhase = ''
-    qmake;
+    runHook preConfigure
+    qmake
     sed -e "s@/usr/@$out/@g" -i $(find . -name Makefile)
+    runHook postConfigure
   '';
 
   meta = {
diff --git a/pkgs/applications/graphics/sane/backends/git.nix b/pkgs/applications/graphics/sane/backends/git.nix
index 47532972893..ae1526990f2 100644
--- a/pkgs/applications/graphics/sane/backends/git.nix
+++ b/pkgs/applications/graphics/sane/backends/git.nix
@@ -1,10 +1,10 @@
 { callPackage, fetchgit, ... } @ args:
 
 callPackage ./generic.nix (args // {
-  version = "2016-04-06";
+  version = "2016-04-14";
   src = fetchgit {
-    sha256 = "af0b5943787bfe86169cd9bbf34284152e18b6df1f692773369545047e54a288";
-    rev = "e6b6ad9d4847e86aed8be0837a19bfada881f52d";
+    sha256 = "414fa7753043f8f3775d926eede01a9dbccf6255b2b2b961a3c48b4fa76a4952";
+    rev = "19c128a23e27c1ab5a030fa6ff74da1b740629bb";
     url = "git://alioth.debian.org/git/sane/sane-backends.git";
   };
 })
diff --git a/pkgs/applications/graphics/seg3d/default.nix b/pkgs/applications/graphics/seg3d/default.nix
index 23a2d23b1ae..d645a15b02e 100644
--- a/pkgs/applications/graphics/seg3d/default.nix
+++ b/pkgs/applications/graphics/seg3d/default.nix
@@ -13,8 +13,8 @@ stdenv.mkDerivation {
   patches = [ ./cstdio.patch ];
 
   cmakeFlags = [
-    "-DM_LIBRARY=${stdenv.glibc}/lib/libm.so"
-    "-DDL_LIBRARY=${stdenv.glibc}/lib/libdl.so"
+    "-DM_LIBRARY=${stdenv.glibc.out}/lib/libm.so"
+    "-DDL_LIBRARY=${stdenv.glibc.out}/lib/libdl.so"
     "-DBUILD_UTILS=1"
     "-DBUILD_SEG3D=1"
     "-DBUILD_DATAFLOW=0"
diff --git a/pkgs/applications/graphics/shotwell/default.nix b/pkgs/applications/graphics/shotwell/default.nix
index da8bbad33ca..94094a149c9 100644
--- a/pkgs/applications/graphics/shotwell/default.nix
+++ b/pkgs/applications/graphics/shotwell/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
     sha256 = "0cgqaaikrb10plhf6zxbgqy32zqpiwyi9dpx3g8yr261q72r5c81";
   };
 
-  NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include";
+  NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include";
 
   configureFlags = [ "--disable-gsettings-convert-install" ];
 
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
   preFixup = ''
     wrapProgram "$out/bin/shotwell" \
      --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
-     --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
+     --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
      --prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules"
   '';
 
diff --git a/pkgs/applications/graphics/xfig/default.nix b/pkgs/applications/graphics/xfig/default.nix
index 6903837e5ad..c70b1029b79 100644
--- a/pkgs/applications/graphics/xfig/default.nix
+++ b/pkgs/applications/graphics/xfig/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
 
   hardeningDisable = [ "format" ];
 
-  NIX_CFLAGS_COMPILE = "-I${libXpm}/include/X11";
+  NIX_CFLAGS_COMPILE = "-I${libXpm.dev}/include/X11";
 
   patches =
     let
diff --git a/pkgs/applications/misc/audio/soxr/default.nix b/pkgs/applications/misc/audio/soxr/default.nix
index 135ae47aa84..941e1a393b1 100644
--- a/pkgs/applications/misc/audio/soxr/default.nix
+++ b/pkgs/applications/misc/audio/soxr/default.nix
@@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "0xf2w3piwz9gfr1xqyrj4k685q5dy53kq3igv663i4f4y4sg9rjl";
   };
 
+  outputs = [ "out" "doc" ]; # headers are just two and very small
+
   preConfigure = if stdenv.isDarwin then ''
     export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:"`pwd`/build/src
   '' else ''
diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix
index 0085da5b468..3e7ad83c0a1 100644
--- a/pkgs/applications/misc/blender/default.nix
+++ b/pkgs/applications/misc/blender/default.nix
@@ -10,11 +10,11 @@
 with lib;
 
 stdenv.mkDerivation rec {
-  name = "blender-2.77";
+  name = "blender-2.77a";
 
   src = fetchurl {
     url = "http://download.blender.org/source/${name}.tar.gz";
-    sha256 = "0aynm249xgrnm6h5hlp9x40ww0hn391d9ka2mg9mmqrdzhih286n";
+    sha256 = "0rswx2n52wjr4jpvg1a6mir5das2i752brjzigmm8rhayl0glw1p";
   };
 
   buildInputs =
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index bae4c83fb2b..7b789b3881d 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -40,11 +40,11 @@ stdenv.mkDerivation rec {
   installPhase = ''
     export HOME=$TMPDIR/fakehome
     export POPPLER_INC_DIR=${poppler_utils}/include/poppler
-    export POPPLER_LIB_DIR=${poppler_utils}/lib
+    export POPPLER_LIB_DIR=${poppler_utils.out}/lib
     export MAGICK_INC=${imagemagick}/include/ImageMagick
     export MAGICK_LIB=${imagemagick}/lib
-    export FC_INC_DIR=${fontconfig}/include/fontconfig
-    export FC_LIB_DIR=${fontconfig}/lib
+    export FC_INC_DIR=${fontconfig.dev}/include/fontconfig
+    export FC_LIB_DIR=${fontconfig.lib}/lib
     export PODOFO_INC_DIR=${podofo}/include/podofo
     export PODOFO_LIB_DIR=${podofo}/lib
     export SIP_BIN=${sip_4_16}/bin/sip
@@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
 
     for a in $out/bin/*; do
       wrapProgram $a --prefix PYTHONPATH : $PYTHONPATH \
-                     --prefix PATH : ${poppler_utils}/bin
+                     --prefix PATH : ${poppler_utils.out}/bin
     done
   '';
 
diff --git a/pkgs/applications/misc/cool-retro-term/default.nix b/pkgs/applications/misc/cool-retro-term/default.nix
index 92328ab9846..67b9b601139 100644
--- a/pkgs/applications/misc/cool-retro-term/default.nix
+++ b/pkgs/applications/misc/cool-retro-term/default.nix
@@ -19,7 +19,11 @@ stdenv.mkDerivation rec {
   buildInputs = [ qtbase qtquick1 qmltermwidget qtquickcontrols qtgraphicaleffects ];
   nativeBuildInputs = [ makeQtWrapper ];
 
-  configurePhase = "qmake PREFIX=$out";
+  configurePhase = ''
+    runHook preConfigure
+    qmake PREFIX=$out
+    runHook postConfigure
+  '';
 
   installPhase = "make -j $NIX_BUILD_CORES INSTALL_ROOT=$out install";
 
diff --git a/pkgs/applications/misc/curaengine/default.nix b/pkgs/applications/misc/curaengine/default.nix
index 6afd11a555c..b7db33609cc 100644
--- a/pkgs/applications/misc/curaengine/default.nix
+++ b/pkgs/applications/misc/curaengine/default.nix
@@ -10,6 +10,10 @@ stdenv.mkDerivation {
     sha256 = "0rgrsyi7951fsv3lzprlzrg55jf6pbdjfql85dylwmg9nc4y8xym";
   };
 
+  postPatch = ''
+    sed -i 's,--static,,g' Makefile
+  '';
+
   installPhase = ''
     mkdir -p $out/bin
     cp build/CuraEngine $out/bin/
diff --git a/pkgs/applications/misc/djvulibre/default.nix b/pkgs/applications/misc/djvulibre/default.nix
index b0f89cc5ea0..910b24358b4 100644
--- a/pkgs/applications/misc/djvulibre/default.nix
+++ b/pkgs/applications/misc/djvulibre/default.nix
@@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6";
   };
 
+  outputs = [ "dev" "out" "bin" ];
+
   buildInputs = [ libjpeg libtiff librsvg ] ++ libintlOrEmpty;
 
   NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
diff --git a/pkgs/applications/misc/dunst/default.nix b/pkgs/applications/misc/dunst/default.nix
index c398c3c43d0..651c74b2d21 100644
--- a/pkgs/applications/misc/dunst/default.nix
+++ b/pkgs/applications/misc/dunst/default.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
 
   postFixup = ''
     wrapProgram "$out/bin/dunst" \
-      --prefix PATH : '${dbus_daemon}/bin'
+      --prefix PATH : '${dbus_daemon.out}/bin'
   '';
 
   meta = {
diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix
index 69f41571c45..ca807f80e1b 100644
--- a/pkgs/applications/misc/electrum/default.nix
+++ b/pkgs/applications/misc/electrum/default.nix
@@ -18,11 +18,11 @@ in
 
 pythonPackages.buildPythonApplication rec {
   name = "electrum-${version}";
-  version = "2.6.3";
+  version = "2.6.4";
 
   src = fetchurl {
     url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz";
-    sha256 = "0lj3a8zg6dznpnnxyza8a05c13py52j62rqlad1zcgksm5g63vic";
+    sha256 = "0rpqpspmrmgm0bhsnlnhlwhag6zg8hnv5bcw5vkqmv86891kpd9a";
   };
 
   propagatedBuildInputs = with pythonPackages; [
diff --git a/pkgs/applications/misc/get_iplayer/default.nix b/pkgs/applications/misc/get_iplayer/default.nix
index 488a9a3732e..e5a463bb520 100644
--- a/pkgs/applications/misc/get_iplayer/default.nix
+++ b/pkgs/applications/misc/get_iplayer/default.nix
@@ -7,6 +7,7 @@ buildPerlPackage {
 
   preConfigure = "touch Makefile.PL";
   doCheck = false;
+  outputs = [ "out" "man" ];
 
   patchPhase = ''
     sed -e 's|^update_script|#update_script|' \
@@ -15,10 +16,11 @@ buildPerlPackage {
   '';
 
   installPhase = '' 
-    mkdir -p $out/bin
+    mkdir -p $out/bin $out/share/man/man1
     cp get_iplayer $out/bin
-    wrapProgram $out/bin/get_iplayer --suffix PATH : ${ffmpeg}/bin:${flvstreamer}/bin:${vlc}/bin:${rtmpdump}/bin --prefix PERL5LIB : $PERL5LIB
-  '';  
+    wrapProgram $out/bin/get_iplayer --suffix PATH : ${ffmpeg.bin}/bin:${flvstreamer}/bin:${vlc}/bin:${rtmpdump}/bin --prefix PERL5LIB : $PERL5LIB
+    cp get_iplayer.1 $out/share/man/man1
+  '';
   
   src = fetchurl {
     url = ftp://ftp.infradead.org/pub/get_iplayer/get_iplayer-2.94.tar.gz;
diff --git a/pkgs/applications/misc/girara/default.nix b/pkgs/applications/misc/girara/default.nix
index 0b721b562b5..cfa38a11861 100644
--- a/pkgs/applications/misc/girara/default.nix
+++ b/pkgs/applications/misc/girara/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ pkgconfig gtk gettext ];
 
   makeFlags = [ "PREFIX=$(out)" ]
-    ++ optional withBuildColors "TPUT=${ncurses}/bin/tput"
+    ++ optional withBuildColors "TPUT=${ncurses.out}/bin/tput"
     ++ optional (!withBuildColors) "TPUT_AVAILABLE=0"
     ;
 
diff --git a/pkgs/applications/misc/golden-cheetah/default.nix b/pkgs/applications/misc/golden-cheetah/default.nix
new file mode 100644
index 00000000000..82695bbdd7e
--- /dev/null
+++ b/pkgs/applications/misc/golden-cheetah/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, qtbase, qtsvg, qtserialport, qtwebkit, qtmultimedia
+, qttools, yacc, flex, zlib, config, makeQtWrapper }:
+stdenv.mkDerivation rec {
+  name = "golden-cheetah-${version}";
+  version = "V4.0-DEV1603";
+  src = fetchurl {
+    url = "https://github.com/GoldenCheetah/GoldenCheetah/archive/${version}.tar.gz";
+    sha256 = "12knlzqmq8b3nyl3kvcsnzrbjksgd83mzwzj97wccyfiffjl4wah";
+  };
+  buildInputs = [
+    qtbase qtsvg qtserialport qtwebkit qtmultimedia qttools yacc flex zlib
+  ];
+  nativeBuildInputs = [ makeQtWrapper ];
+  configurePhase = ''
+    runHook preConfigure
+    cp src/gcconfig.pri.in src/gcconfig.pri
+    cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri
+    echo 'QMAKE_LRELEASE = ${qttools}/bin/lrelease' >> src/gcconfig.pri
+    sed -i -e '21,23d' qwt/qwtconfig.pri # Removed forced installation to /usr/local
+    qmake PREFIX=$out build.pro
+  '' + (
+    with (config.golden-cheetah);
+    stdenv.lib.optionalString (dropbox-client-id != null && dropbox-client-secret != null) ''
+      echo 'DEFINES += GC_DROPBOX_CLIENT_ID=\\\"${config.golden-cheetah.dropbox-client-id}\\\"' >>  src/gcconfig.pri
+      echo 'DEFINES += GC_DROPBOX_CLIENT_SECRET=\\\"${config.golden-cheetah.dropbox-client-secret}\\\"' >>  src/gcconfig.pri
+    '');
+  installPhase = ''
+    mkdir -p $out/bin
+    cp src/GoldenCheetah $out/bin
+    wrapQtProgram $out/bin/GoldenCheetah --set LD_LIBRARY_PATH "${zlib.out}/lib" # patchelf doesn't seem to work
+  '';
+  meta = {
+    description = "Performance software for cyclists, runners and triathletes";
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.ocharles ];
+  };
+}
diff --git a/pkgs/applications/misc/guake/default.nix b/pkgs/applications/misc/guake/default.nix
index 4f6733e7d8d..81ac845c5cf 100644
--- a/pkgs/applications/misc/guake/default.nix
+++ b/pkgs/applications/misc/guake/default.nix
@@ -16,8 +16,7 @@ gconftool-2 --recursive-unset /apps/guake
 with lib;
 
 let inputs = [ dbus gtk2 gconf python2 libutempter vte keybinder gnome3.gnome_common ];
-    pySubDir = "lib/${python2.libPrefix}/site-packages";
-    pyPath = makeSearchPath pySubDir (attrVals [ "dbus" "notify" "pyGtkGlade" "pyxdg" ] python2Packages ++ [ gnome2.gnome_python ]);
+    pyPath = makeSearchPathOutputs python2.sitePackages ["lib"] (attrVals [ "dbus" "notify" "pyGtkGlade" "pyxdg" ] python2Packages ++ [ gnome2.gnome_python ]);
  in stdenv.mkDerivation rec {
   name = "guake-${version}";
   version = "0.8.3";
@@ -63,7 +62,7 @@ let inputs = [ dbus gtk2 gconf python2 libutempter vte keybinder gnome3.gnome_co
       wrapProgram $bin \
         --prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
         --prefix LD_LIBRARY_PATH : ${makeLibraryPath inputs} \
-        --prefix PYTHONPATH : "$out/${pySubDir}:${pyPath}:$PYTHONPATH"
+        --prefix PYTHONPATH : "$out/${python2.sitePackages}:${pyPath}:$PYTHONPATH"
     done
   '';
 
diff --git a/pkgs/applications/misc/ikiwiki/default.nix b/pkgs/applications/misc/ikiwiki/default.nix
index 1f78355ca3a..3e35b7bde4b 100644
--- a/pkgs/applications/misc/ikiwiki/default.nix
+++ b/pkgs/applications/misc/ikiwiki/default.nix
@@ -66,7 +66,7 @@ stdenv.mkDerivation {
       ${lib.optionalString bazaarSupport ''--prefix PATH : ${bazaar}/bin \''}
       ${lib.optionalString cvsSupport ''--prefix PATH : ${cvs}/bin \''}
       ${lib.optionalString cvsSupport ''--prefix PATH : ${cvsps}/bin \''}
-      ${lib.optionalString subversionSupport ''--prefix PATH : ${subversion}/bin \''}
+      ${lib.optionalString subversionSupport ''--prefix PATH : ${subversion.out}/bin \''}
       ${lib.optionalString mercurialSupport ''--prefix PATH : ${mercurial}/bin \''}
       ${lib.concatMapStrings (x: "--prefix PATH : ${x}/bin ") extraUtils}
     done
diff --git a/pkgs/applications/misc/j4-dmenu-desktop/default.nix b/pkgs/applications/misc/j4-dmenu-desktop/default.nix
new file mode 100644
index 00000000000..ad07c02f508
--- /dev/null
+++ b/pkgs/applications/misc/j4-dmenu-desktop/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, cmake, dmenu }:
+
+stdenv.mkDerivation rec {
+  name    = "j4-dmenu-desktop-${version}";
+  version = "2.14";
+
+  src = fetchFromGitHub {
+    owner  = "enkore";
+    repo   = "j4-dmenu-desktop";
+    rev    = "r${version}";
+    sha256 = "14srrkz4qx8qplgrrjv38ri4pnkxaxaq6jy89j13xhna492bq128";
+  };
+
+  postPatch = ''
+    sed -e 's,dmenu -i,${dmenu}/bin/dmenu -i,g' -i ./src/Main.hh
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  # tests are fetching an external git repository
+  cmakeFlags = [ "-DNO_TESTS:BOOL=ON" ];
+
+  meta = with stdenv.lib; {
+    description = "A wrapper for dmenu that recognize .desktop files";
+    homepage    = "https://github.com/enkore/j4-dmenu-desktop";
+    license     = licenses.gpl3;
+    maintainer  = with maintainers; [ ericsagnes ];
+  };
+}
diff --git a/pkgs/applications/misc/khard/default.nix b/pkgs/applications/misc/khard/default.nix
index 679dc10291a..c6aad7194a2 100644
--- a/pkgs/applications/misc/khard/default.nix
+++ b/pkgs/applications/misc/khard/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, pkgs, python2Packages }:
 
 python2Packages.buildPythonApplication rec {
-  version = "0.8.1";
+  version = "0.9.0";
   name = "khard-${version}";
   namePrefix = "";
 
   src = fetchurl {
     url = "https://github.com/scheibler/khard/archive/v${version}.tar.gz";
-    sha256 = "13axfrs96isirx0c483545xdmjwwfq1k7yy92xpk7l184v71rgi1";
+    sha256 = "1cj6rlvbk05cfjkl1lnyvq12sb847jjwqy5j8906p2b2x4wq72qi";
   };
 
   propagatedBuildInputs = with python2Packages; [
diff --git a/pkgs/applications/misc/kiwix/default.nix b/pkgs/applications/misc/kiwix/default.nix
index aa8492544dc..3de37fdbf20 100644
--- a/pkgs/applications/misc/kiwix/default.nix
+++ b/pkgs/applications/misc/kiwix/default.nix
@@ -93,7 +93,7 @@ stdenv.mkDerivation rec {
     make install
     cp -r src/dependencies/xulrunner $out/lib/kiwix
 
-    patchelf --set-interpreter ${glibc}/lib/ld-linux${optionalString (stdenv.system == "x86_64-linux") "-x86-64"}.so.2 $out/lib/kiwix/xulrunner/xulrunner
+    patchelf --set-interpreter ${glibc.out}/lib/ld-linux${optionalString (stdenv.system == "x86_64-linux") "-x86-64"}.so.2 $out/lib/kiwix/xulrunner/xulrunner
 
     rm $out/bin/kiwix
     makeWrapper $out/lib/kiwix/kiwix-launcher $out/bin/kiwix \
diff --git a/pkgs/applications/misc/monero/default.nix b/pkgs/applications/misc/monero/default.nix
index e7829be0364..1fa5d1a28d5 100644
--- a/pkgs/applications/misc/monero/default.nix
+++ b/pkgs/applications/misc/monero/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
   checkTarget = "test-release"; # this would be the target
 
   installPhase = ''
-    installBin \
+    install -Dt "$out/bin/" \
         src/bitmonerod \
         src/connectivity_tool \
         src/simpleminer \
diff --git a/pkgs/applications/misc/mysql-workbench/default.nix b/pkgs/applications/misc/mysql-workbench/default.nix
index 16a20015c62..056edd801c0 100644
--- a/pkgs/applications/misc/mysql-workbench/default.nix
+++ b/pkgs/applications/misc/mysql-workbench/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
     mysql.lib paramiko pcre pexpect pkgconfig pycrypto python sqlite ];
 
   preConfigure = ''
-    substituteInPlace $(pwd)/frontend/linux/workbench/mysql-workbench.in --replace "catchsegv" "${glibc}/bin/catchsegv"
+    substituteInPlace $(pwd)/frontend/linux/workbench/mysql-workbench.in --replace "catchsegv" "${glibc.bin}/bin/catchsegv"
   '';
 
   postInstall = ''
diff --git a/pkgs/applications/misc/nut/default.nix b/pkgs/applications/misc/nut/default.nix
index 3e972f672cc..25c90488092 100644
--- a/pkgs/applications/misc/nut/default.nix
+++ b/pkgs/applications/misc/nut/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
   
   postInstall = ''
     wrapProgram $out/bin/nut-scanner --prefix LD_LIBRARY_PATH : \
-      "$out/lib:${neon}/lib:${libusb}/lib:${avahi}/lib:${freeipmi}/lib"
+      "$out/lib:${neon}/lib:${libusb.out}/lib:${avahi}/lib:${freeipmi}/lib"
   '';
 
   meta = {
diff --git a/pkgs/applications/misc/opencpn/default.nix b/pkgs/applications/misc/opencpn/default.nix
index d6b9b943b6e..696232c9f8d 100644
--- a/pkgs/applications/misc/opencpn/default.nix
+++ b/pkgs/applications/misc/opencpn/default.nix
@@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
                   glib portaudio ];
 
   cmakeFlags = [
-    "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2}/lib/gtk-2.0/include"
-    "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include"
+    "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
+    "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
   ];
 
   enableParallelBuilding = true;
diff --git a/pkgs/applications/misc/pcmanfm/default.nix b/pkgs/applications/misc/pcmanfm/default.nix
index b245a6aace7..bf1bed08ed4 100644
--- a/pkgs/applications/misc/pcmanfm/default.nix
+++ b/pkgs/applications/misc/pcmanfm/default.nix
@@ -1,10 +1,10 @@
 { stdenv, fetchurl, glib, gtk, intltool, libfm, libX11, pango, pkgconfig }:
 
-stdenv.mkDerivation {
-  name = "pcmanfm-1.2.3";
+stdenv.mkDerivation rec {
+  name = "pcmanfm-1.2.4";
   src = fetchurl {
-    url = "mirror://sourceforge/pcmanfm/pcmanfm-1.2.3.tar.xz";
-    sha256 = "1033rw5jd7nlzbcdpx3bik7347kyh1sg1gkla424gq9vqqpxia6g";
+    url = "mirror://sourceforge/pcmanfm/${name}.tar.xz";
+    sha256 = "04z3vd9si24yi4c8calqncdpb9b6mbj4cs4f3fs86i6j05gvpk9q";
   };
 
   buildInputs = [ glib gtk intltool libfm libX11 pango pkgconfig ];
diff --git a/pkgs/applications/misc/pdfmod/default.nix b/pkgs/applications/misc/pdfmod/default.nix
index 23781d63664..24a0a8c6967 100644
--- a/pkgs/applications/misc/pdfmod/default.nix
+++ b/pkgs/applications/misc/pdfmod/default.nix
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
       --prefix LD_LIBRARY_PATH : ${gnome-sharp}/lib \
       --prefix LD_LIBRARY_PATH : ${gtk-sharp.gtk}/lib \
       --prefix LD_LIBRARY_PATH : ${gnome3.gconf}/lib \
-      --prefix LD_LIBRARY_PATH : ${poppler}/lib
+      --prefix LD_LIBRARY_PATH : ${poppler.out}/lib
   '';
 
   dontStrip = true;
diff --git a/pkgs/applications/misc/pinfo/default.nix b/pkgs/applications/misc/pinfo/default.nix
index 658ff410d37..222dddc0e89 100644
--- a/pkgs/applications/misc/pinfo/default.nix
+++ b/pkgs/applications/misc/pinfo/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
 
   buildInputs = [ autoreconfHook gettext texinfo ncurses readline ];
 
-  configureFlags = [ "--with-curses=${ncurses}" "--with-readline=${readline}" ];
+  configureFlags = [ "--with-curses=${ncurses.dev}" "--with-readline=${readline}" ];
 
   meta = with stdenv.lib; {
     description = "A viewer for info files";
diff --git a/pkgs/applications/misc/playonlinux/default.nix b/pkgs/applications/misc/playonlinux/default.nix
index 178fc13065b..4bf6e36f1d2 100644
--- a/pkgs/applications/misc/playonlinux/default.nix
+++ b/pkgs/applications/misc/playonlinux/default.nix
@@ -26,7 +26,7 @@ assert stdenv.isLinux;
 let
   version = "4.2.9";
 
-  binpath = stdenv.lib.makeSearchPath "bin"
+  binpath = stdenv.lib.makeBinPath
     [ cabextract
       python2Packages.python
       gettext
diff --git a/pkgs/applications/misc/qtpass/default.nix b/pkgs/applications/misc/qtpass/default.nix
index 08e7f834d6b..69730759d08 100644
--- a/pkgs/applications/misc/qtpass/default.nix
+++ b/pkgs/applications/misc/qtpass/default.nix
@@ -11,7 +11,11 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ git gnupg makeQtWrapper pass qtbase qtsvg qttools ];
 
-  configurePhase = "qmake CONFIG+=release PREFIX=$out DESTDIR=$out";
+  configurePhase = ''
+    runHook preConfigure
+    qmake CONFIG+=release PREFIX=$out DESTDIR=$out
+    runHook postConfigure
+  '';
 
   installPhase = ''
     mkdir $out/bin
diff --git a/pkgs/applications/misc/roxterm/default.nix b/pkgs/applications/misc/roxterm/default.nix
index ad7de90cad6..ec055f3055f 100644
--- a/pkgs/applications/misc/roxterm/default.nix
+++ b/pkgs/applications/misc/roxterm/default.nix
@@ -24,18 +24,18 @@ in stdenv.mkDerivation rec {
   propagatedBuildInputs =
     [ dbus_libs dbus_glib gdk_pixbuf gettext gsettings_desktop_schemas gtk2 gtk3 hicolor_icon_theme vte ];
 
-  NIX_CFLAGS_COMPILE = [ "-I${dbus_glib}/include/dbus-1.0"
-                         "-I${dbus_libs}/include/dbus-1.0"
-                         "-I${dbus_libs}/lib/dbus-1.0/include" ];
+  NIX_CFLAGS_COMPILE = [ "-I${dbus_glib.dev}/include/dbus-1.0"
+                         "-I${dbus_libs.dev}/include/dbus-1.0"
+                         "-I${dbus_libs.lib}/lib/dbus-1.0/include" ];
 
   # Fix up python path so the lockfile library is on it.
-  PYTHONPATH = stdenv.lib.makeSearchPath "lib/${pythonFull.libPrefix}/site-packages" [
+  PYTHONPATH = stdenv.lib.makeSearchPathOutputs pythonFull.sitePackages ["lib"] [
     pythonPackages.curses pythonPackages.lockfile
   ];
 
   buildPhase = ''
     # Fix up the LD_LIBRARY_PATH so that expat is on it
-    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${expat}/lib"
+    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${expat.out}/lib"
 
     python mscript.py configure --prefix="$out"
     python mscript.py build
diff --git a/pkgs/applications/misc/rtv/default.nix b/pkgs/applications/misc/rtv/default.nix
index 68097c2e254..194535c7314 100644
--- a/pkgs/applications/misc/rtv/default.nix
+++ b/pkgs/applications/misc/rtv/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub, pkgs, lib, python, pythonPackages }:
 
 pythonPackages.buildPythonApplication rec {
-  version = "1.8.0";
+  version = "1.9.0";
   name = "rtv-${version}";
 
   src = fetchFromGitHub {
     owner = "michael-lazar";
     repo = "rtv";
     rev = "v${version}";
-    sha256 = "0vp9yapm6bm4zdhd1ibbirc23ck7smrbsrask7xkrnz7qysxgsd3";
+    sha256 = "18r3i2zlcprj6d4nzhhbd6sm1fs2x28924xsm6lcxa1643gkyb7i";
   };
 
   propagatedBuildInputs = with pythonPackages; [
@@ -24,6 +24,6 @@ pythonPackages.buildPythonApplication rec {
     homepage = https://github.com/michael-lazar/rtv;
     description = "Browse Reddit from your Terminal";
     license = licenses.mit;
-    maintainers = with maintainers; [ matthiasbeyer jgeerds ];
+    maintainers = with maintainers; [ matthiasbeyer jgeerds wedens ];
   };
 }
diff --git a/pkgs/applications/misc/rxvt/default.nix b/pkgs/applications/misc/rxvt/default.nix
index c3b5fc861a8..e8914b75b8a 100644
--- a/pkgs/applications/misc/rxvt/default.nix
+++ b/pkgs/applications/misc/rxvt/default.nix
@@ -1,18 +1,38 @@
-{ stdenv, fetchurl, libX11, libXt }:
+{ stdenv, fetchurl
+, pkgconfig, libtool
+, libX11, libXt, libXpm }:
 
-stdenv.mkDerivation {
-  name = "rxvt-2.6.4";
+stdenv.mkDerivation rec {
+  name = "rxvt-${version}";
+  version = "2.7.10";
 
   src = fetchurl {
-    url = mirror://sourceforge/rxvt/rxvt-2.6.4.tar.gz;
-    sha256 = "0hi29whjv8v11nkjbq1i6ms411v6csykghmlpkmayfjn9nxr02xg";
+    url = "mirror://sourceforge/rxvt/${name}.tar.gz";
+    sha256 = "0jfl71gz3k7zh3kxdb8lxi06kajjnx7bq1rxjgk680l209jxask1";
   };
 
-  buildInputs = [ libX11 libXt ];
+  buildInputs = [ pkgconfig libtool libX11 libXt libXpm ];
 
-  meta = { 
+  configurePhase = ''
+    LIBTOOL=${libtool}/bin/libtool ./configure --prefix=$out --enable-everything --enable-smart-resize --enable-256-color
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://rxvt.sourceforge.net/;
     description = "Colour vt102 terminal emulator with less features and lower memory consumption";
-    homepage = http://www.rxvt.org/;
-    license = "GPL";
+    longDescription = ''
+      rxvt (acronym for our extended virtual terminal) is a terminal
+      emulator for the X Window System, originally written by Rob Nation
+      as an extended version of the older xvt terminal by John Bovey of
+      University of Kent. Mark Olesen extensively modified it later and
+      took over maintenance for several years.
+
+      rxvt is intended to be a slimmed-down alternate for xterm,
+      omitting some of its little-used features, like Tektronix 4014
+      emulation and toolkit-style configurability.
+    '';
+    maintainers = with maintainers; [ AndersonTorres ];
+    license = licenses.gpl2;
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/misc/st/default.nix b/pkgs/applications/misc/st/default.nix
index 234e8b6ba69..deceba0ea55 100644
--- a/pkgs/applications/misc/st/default.nix
+++ b/pkgs/applications/misc/st/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, writeText, libX11, ncurses, libXext, libXft, fontconfig
-, conf? null}:
+, conf ? null, patches ? []}:
 
 with stdenv.lib;
 
@@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
     sha256 = "0avsfc1qp8zvshsfjwwrkvk411jlqy58z225bsdhjkl1qc40qcc5";
   };
 
+  inherit patches;
+
   configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
   preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
   
diff --git a/pkgs/applications/misc/st/wayland.nix b/pkgs/applications/misc/st/wayland.nix
index ed7e0cf7ca1..4d9f0ef3f8d 100644
--- a/pkgs/applications/misc/st/wayland.nix
+++ b/pkgs/applications/misc/st/wayland.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, pkgconfig, writeText
 , ncurses, wayland, wld, libxkbcommon, fontconfig, pixman
-, conf? null}:
+, conf ? null, patches ? [] }:
 
 with stdenv.lib;
 
@@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
     sha256 = "7164da135f02405dba5ae3131dfd896e072df29ac6c0928f3b887beffb8a7d97";
   };
 
+  inherit patches;
+
   configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
   preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
 
diff --git a/pkgs/applications/misc/sweethome3d/default.nix b/pkgs/applications/misc/sweethome3d/default.nix
index 63a8d6cf789..68dd69f385d 100644
--- a/pkgs/applications/misc/sweethome3d/default.nix
+++ b/pkgs/applications/misc/sweethome3d/default.nix
@@ -48,7 +48,7 @@ let
       cp "${sweethome3dItem}/share/applications/"* $out/share/applications
 
       makeWrapper ${jre}/bin/java $out/bin/$exec \
-        --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${gsettings_desktop_schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
+        --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings_desktop_schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
         --add-flags "-jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar ${if stdenv.system == "x86_64-linux" then "-d64" else "-d32"}"
     '';
 
diff --git a/pkgs/applications/misc/sweethome3d/editors.nix b/pkgs/applications/misc/sweethome3d/editors.nix
index da038a69381..61b47dcdd2a 100644
--- a/pkgs/applications/misc/sweethome3d/editors.nix
+++ b/pkgs/applications/misc/sweethome3d/editors.nix
@@ -42,7 +42,7 @@ let
       cp ${module}-${version}.jar $out/share/java/.
       cp "${editorItem}/share/applications/"* $out/share/applications
       makeWrapper ${jre}/bin/java $out/bin/$exec \
-        --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:${gsettings_desktop_schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
+        --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings_desktop_schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
         --add-flags "-jar $out/share/java/${module}-${version}.jar ${if stdenv.system == "x86_64-linux" then "-d64" else "-d32"}"
     '';
 
diff --git a/pkgs/applications/misc/tilda/default.nix b/pkgs/applications/misc/tilda/default.nix
index bf99f0f5f65..43b7312cda6 100644
--- a/pkgs/applications/misc/tilda/default.nix
+++ b/pkgs/applications/misc/tilda/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ pkgconfig autoreconfHook gettext confuse vte gtk makeWrapper ];
 
-  LD_LIBRARY_PATH = "${expat}/lib"; # ugly hack for xgettext to work during build
+  LD_LIBRARY_PATH = "${expat.out}/lib"; # ugly hack for xgettext to work during build
 
   # The config locking scheme relies on the binary being called "tilda",
   # (`pgrep -C tilda`), so a simple `wrapProgram` won't suffice:
diff --git a/pkgs/applications/misc/tint2/default.nix b/pkgs/applications/misc/tint2/default.nix
index f4162147258..c21c0d32b73 100644
--- a/pkgs/applications/misc/tint2/default.nix
+++ b/pkgs/applications/misc/tint2/default.nix
@@ -1,37 +1,41 @@
-{ stdenv, fetchFromGitLab, pkgconfig, cmake, pango, cairo, glib, imlib2, libXinerama
-, libXrender, libXcomposite, libXdamage, libX11, libXrandr, gtk, libpthreadstubs
-, libXdmcp, librsvg, libstartup_notification
+{ stdenv, fetchFromGitLab, pkgconfig, cmake, gettext, pango, cairo, glib
+, pcre , imlib2, libXinerama , libXrender, libXcomposite, libXdamage, libX11
+, libXrandr, gtk, libpthreadstubs , libXdmcp, librsvg
+, libstartup_notification, wrapGAppsHook
 }:
 
 stdenv.mkDerivation rec {
   name = "tint2-${version}";
-  version = "0.12.7";
+  version = "0.12.9";
 
   src = fetchFromGitLab {
     owner = "o9000";
     repo = "tint2";
     rev = version;
-    sha256 = "01wb1yy7zfi01fl34yzpn1d30fykcf8ivmdlynnxp5znqrdsqm2r";
+    sha256 = "17n3yssqiwxqrwsxypzw8skwzxm2540ikbyx7kfxv2gqlbjx5y6q";
   };
 
   enableParallelBuilding = true;
 
-  buildInputs = [ pkgconfig cmake pango cairo glib imlib2 libXinerama
-    libXrender libXcomposite libXdamage libX11 libXrandr gtk libpthreadstubs
-    libXdmcp librsvg libstartup_notification
-  ];
-
-  preConfigure =
-    ''
-      substituteInPlace CMakeLists.txt --replace /etc $out/etc
-    '';
-
-  prePatch =
-    ''
-      substituteInPlace ./src/tint2conf/properties.c --replace /usr/share/ /run/current-system/sw/share/
-      substituteInPlace ./src/launcher/apps-common.c --replace /usr/share/ /run/current-system/sw/share/
-      substituteInPlace ./src/launcher/icon-theme-common.c --replace /usr/share/ /run/current-system/sw/share/
-    '';
+  nativeBuildInputs = [ pkgconfig cmake gettext wrapGAppsHook ];
+
+  buildInputs = [ pango cairo glib pcre imlib2 libXinerama libXrender
+    libXcomposite libXdamage libX11 libXrandr gtk libpthreadstubs libXdmcp
+    librsvg libstartup_notification ];
+
+  preConfigure = ''
+    substituteInPlace CMakeLists.txt --replace /etc $out/etc
+  '';
+
+  prePatch = ''
+    for f in ./src/tint2conf/properties.c \
+             ./src/launcher/apps-common.c \
+             ./src/launcher/icon-theme-common.c \
+             ./themes/*tint2rc
+    do
+      substituteInPlace $f --replace /usr/share/ /run/current-system/sw/share/
+    done
+  '';
 
   meta = {
     homepage = https://gitlab.com/o9000/tint2;
diff --git a/pkgs/applications/misc/twmn/default.nix b/pkgs/applications/misc/twmn/default.nix
index bb3f359ab8f..fbbf45877d2 100644
--- a/pkgs/applications/misc/twmn/default.nix
+++ b/pkgs/applications/misc/twmn/default.nix
@@ -12,8 +12,10 @@ stdenv.mkDerivation rec {
   buildInputs = [ qtbase qtx11extras pkgconfig boost ];
 
   configurePhase = ''
+    runHook preConfigure
     sed -i s/-Werror// twmnd/twmnd.pro
     qmake
+    runHook postConfigure
   '';
 
   installPhase = ''
diff --git a/pkgs/applications/misc/udevil/default.nix b/pkgs/applications/misc/udevil/default.nix
index 75c02d3ba6d..8ce683ec908 100644
--- a/pkgs/applications/misc/udevil/default.nix
+++ b/pkgs/applications/misc/udevil/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
       --with-mount-prog=${utillinux}/bin/mount \
       --with-umount-prog=${utillinux}/bin/umount \
       --with-losetup-prog=${utillinux}/bin/losetup \
-      --with-setfacl-prog=${acl}/bin/setfacl \
+      --with-setfacl-prog=${acl.bin}/bin/setfacl \
       --sysconfdir=$prefix/etc
   '';
   preConfigure = ''
diff --git a/pkgs/applications/misc/xca/default.nix b/pkgs/applications/misc/xca/default.nix
index ffba09e69f9..e861973b13c 100644
--- a/pkgs/applications/misc/xca/default.nix
+++ b/pkgs/applications/misc/xca/default.nix
@@ -11,7 +11,8 @@ stdenv.mkDerivation rec {
 
   postInstall = ''
     wrapProgram "$out/bin/xca" \
-      --prefix LD_LIBRARY_PATH : "${qt4}/lib:${gcc.cc}/lib:${gcc.cc}/lib64:${openssl}/lib:${libtool}/lib"
+      --prefix LD_LIBRARY_PATH : \
+        "${gcc.cc.lib}/lib64:${stdenv.lib.makeLibraryPath [ qt4 gcc.cc openssl libtool ]}"
   '';
 
   buildInputs = [ openssl qt4 libtool gcc makeWrapper ];
diff --git a/pkgs/applications/misc/xdgmenumaker/default.nix b/pkgs/applications/misc/xdgmenumaker/default.nix
new file mode 100644
index 00000000000..cf8bcb7a51b
--- /dev/null
+++ b/pkgs/applications/misc/xdgmenumaker/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, txt2tags, python2Packages }:
+
+stdenv.mkDerivation rec {
+  name = "xdgmenumaker-${version}";
+  version = "0.9";
+
+  src = fetchFromGitHub {
+    rev = version;
+    owner = "gapan";
+    repo = "xdgmenumaker";
+    sha256 = "1n29syadsgj0vpnkc8nji4k1c8gminr1xdriz5ck2bcygsgxkdrd";
+  };
+
+  nativeBuildInputs = [
+    txt2tags
+    python2Packages.wrapPython
+  ];
+
+  pythonPath = [
+    python2Packages.pyxdg
+    python2Packages.pygtk
+  ];
+
+  installPhase = ''
+    make install PREFIX=$out DESTDIR=
+    wrapProgram "$out/bin/xdgmenumaker" \
+      --prefix XDG_DATA_DIRS : "$out/share"
+    wrapPythonPrograms
+  '';
+  
+  meta = with stdenv.lib; {
+    description = "Command line tool that generates XDG menus for several window managers";
+    homepage = https://github.com/gapan/xdgmenumaker;
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.romildo ];
+  };
+}
diff --git a/pkgs/applications/misc/xneur/default.nix b/pkgs/applications/misc/xneur/default.nix
index cc08436fa03..8e3165b75d2 100644
--- a/pkgs/applications/misc/xneur/default.nix
+++ b/pkgs/applications/misc/xneur/default.nix
@@ -23,13 +23,13 @@ stdenv.mkDerivation rec {
     sed -e 's@for imlib2_dir in@for imlib2_dir in ${imlib2} @' -i configure
     sed -e 's@for xosd_dir in@for xosd_dir in ${xosd} @' -i configure
 
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk}/include/gtk-2.0"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk}/lib/gtk-2.0/include"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${cairo}/include/cairo"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pango}/include/pango-1.0"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${atk}/include/atk-1.0"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gdk_pixbuf}/include/gdk-pixbuf-2.0"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gdk_pixbuf}/lib/gdk-pixbuf-2.0/include"
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk.dev}/include/gtk-2.0"
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk.out}/lib/gtk-2.0/include"
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${cairo.dev}/include/cairo"
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pango.dev}/include/pango-1.0"
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${atk.dev}/include/atk-1.0"
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gdk_pixbuf.dev}/include/gdk-pixbuf-2.0"
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gdk_pixbuf.out}/lib/gdk-pixbuf-2.0/include"
 
     export NIX_LDFLAGS="$NIX_LDFLAGS -lnotify"
   '';
diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix
index 3a88409999f..62e7ee60cb3 100644
--- a/pkgs/applications/misc/zathura/core/default.nix
+++ b/pkgs/applications/misc/zathura/core/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
     "PREFIX=$(out)"
     "RSTTOMAN=${docutils}/bin/rst2man.py"
     "VERBOSE=1"
-    "TPUT=${ncurses}/bin/tput"
+    "TPUT=${ncurses.out}/bin/tput"
   ];
 
   postInstall = ''
diff --git a/pkgs/applications/misc/zathura/default.nix b/pkgs/applications/misc/zathura/default.nix
index 8b37e22d117..0ad3bf2adb9 100644
--- a/pkgs/applications/misc/zathura/default.nix
+++ b/pkgs/applications/misc/zathura/default.nix
@@ -30,7 +30,7 @@ rec {
 
     name = "zathura-${zathura_core.version}";
 
-    plugins_path = stdenv.lib.makeSearchPath "lib" [
+    plugins_path = stdenv.lib.makeLibraryPath [
       zathura_djvu
       zathura_ps
       (if useMupdf then zathura_pdf_mupdf else zathura_pdf_poppler)
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix
index 7bcc6242389..9fbc8959ad2 100644
--- a/pkgs/applications/networking/browsers/chromium/common.nix
+++ b/pkgs/applications/networking/browsers/chromium/common.nix
@@ -8,7 +8,7 @@
 , libusb1, pciutils, nss
 
 , python, pythonPackages, perl, pkgconfig
-, nspr, udev, kerberos
+, nspr, libudev, kerberos
 , utillinux, alsaLib
 , bison, gperf
 , glib, gtk, dbus_glib
@@ -112,7 +112,7 @@ let
     buildInputs = defaultDependencies ++ [
       which
       python perl pkgconfig
-      nspr nss udev
+      nspr nss libudev
       utillinux alsaLib
       bison gperf kerberos
       glib gtk dbus_glib
@@ -147,7 +147,7 @@ let
         }' chrome/utility/media_galleries/image_metadata_extractor.cc
       ''}
 
-      sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${udev}/lib/\1!' \
+      sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${libudev.out}/lib/\1!' \
         device/udev_linux/udev?_loader.cc
 
       sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
diff --git a/pkgs/applications/networking/browsers/chromium/plugins.nix b/pkgs/applications/networking/browsers/chromium/plugins.nix
index a0b354f0327..b7883454b34 100644
--- a/pkgs/applications/networking/browsers/chromium/plugins.nix
+++ b/pkgs/applications/networking/browsers/chromium/plugins.nix
@@ -44,6 +44,7 @@ let
 
     phases = [ "unpackPhase" "patchPhase" "installPhase" "checkPhase" ];
     outputs = [ "flash" "widevine" ];
+    out = "flash"; # outputs TODO: is this a hack?
 
     unpackCmd = let
       chan = if upstream-info.channel == "dev"    then "chrome-unstable"
@@ -64,7 +65,7 @@ let
 
     patchPhase = let
       rpaths = [ stdenv.cc.cc ];
-      mkrpath = p: "${makeSearchPath "lib64" p}:${makeSearchPath "lib" p}";
+      mkrpath = p: "${makeSearchPathOutputs "lib64" ["lib"] p}:${makeLibraryPath p}";
     in ''
       for sofile in PepperFlash/libpepflashplayer.so \
                     libwidevinecdm.so libwidevinecdmadapter.so; do
diff --git a/pkgs/applications/networking/browsers/dwb/default.nix b/pkgs/applications/networking/browsers/dwb/default.nix
index d79a5215ce2..2a8d8d753c8 100644
--- a/pkgs/applications/networking/browsers/dwb/default.nix
+++ b/pkgs/applications/networking/browsers/dwb/default.nix
@@ -2,12 +2,12 @@
 , json_c, m4, glib_networking, gsettings_desktop_schemas, dconf }:
 
 stdenv.mkDerivation {
-  name = "dwb-2015-07-07";
+  name = "dwb-2016-03-21";
 
   src = fetchgit {
-    url = "https://bitbucket.org/0mark/dwb_collect";
-    rev = "9a50dcc7134015c6cb1d26afb77840cf69f7c782";
-    sha256 = "03nyr3c0x5b1jqax0zh407vvi4j47zkj1i52lqs35j2d2sci3lkb";
+    url = "https://bitbucket.org/portix/dwb";
+    rev = "7fb82bc1db36a5d1d2436088c9b58054d2c51f96";
+    sha256 = "16y3cfk4bq89d1lzpj4ci4gq9cx5m2br5i7kmw5rv396527yvn0i";
   };
 
   buildInputs = [ pkgconfig makeWrapper gsettings_desktop_schemas libsoup
@@ -18,10 +18,10 @@ stdenv.mkDerivation {
 
   preFixup=''
     wrapProgram "$out/bin/dwb" \
-     --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules:${dconf}/lib/gio/modules" \
+     --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules:${dconf}/lib/gio/modules" \
      --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
     wrapProgram "$out/bin/dwbem" \
-     --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules"
+     --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules"
   '';
 
   meta = with stdenv.lib; {
@@ -30,9 +30,5 @@ stdenv.mkDerivation {
     platforms = platforms.mesaPlatforms;
     maintainers = with maintainers; [ pSub ];
     license = licenses.gpl3;
-
-    # dwb is no longer maintained by portix and efforts to keep it alive
-    # were not successful, see issue #7952 for discussion.
-    broken = true;
   };
 }
diff --git a/pkgs/applications/networking/browsers/firefox-bin/default.nix b/pkgs/applications/networking/browsers/firefox-bin/default.nix
index d2d6fcb5934..152089286b4 100644
--- a/pkgs/applications/networking/browsers/firefox-bin/default.nix
+++ b/pkgs/applications/networking/browsers/firefox-bin/default.nix
@@ -105,7 +105,7 @@ stdenv.mkDerivation {
       libheimdal
       libpulseaudio
       systemd
-    ] + ":" + stdenv.lib.makeSearchPath "lib64" [
+    ] + ":" + stdenv.lib.makeSearchPathOutputs "lib64" ["lib"] [
       stdenv.cc.cc
     ];
 
diff --git a/pkgs/applications/networking/browsers/firefox-bin/sources.nix b/pkgs/applications/networking/browsers/firefox-bin/sources.nix
index 1ff70cb8ccf..883b2abf44a 100644
--- a/pkgs/applications/networking/browsers/firefox-bin/sources.nix
+++ b/pkgs/applications/networking/browsers/firefox-bin/sources.nix
@@ -4,187 +4,187 @@
 # ruby generate_sources.rb > sources.nix
 
 {
-  version = "45.0.1";
+  version = "45.0.2";
   sources = [
-    { locale = "ach"; arch = "linux-i686"; sha256 = "6dff17afbbbb9ba8e064b431db1f6b6a1862ec56e11dfa8cb8ef5d89dd9f7705"; }
-    { locale = "ach"; arch = "linux-x86_64"; sha256 = "4f806511a1e7c2100d976a9753f0e7ecee483f19ca1176e1867021a55725aabf"; }
-    { locale = "af"; arch = "linux-i686"; sha256 = "0a2e0b55e43b41304895f624ae95372e4ab52b06c8892e0ef02a8e41c5ff28e5"; }
-    { locale = "af"; arch = "linux-x86_64"; sha256 = "c865d4a431c3b92347393b62c4589fe67f4323458faf1ee07367e1f432d0e839"; }
-    { locale = "an"; arch = "linux-i686"; sha256 = "d58dcdb222fad88650d65623005897de7a693d16c44d86f25694a00d7fa5111d"; }
-    { locale = "an"; arch = "linux-x86_64"; sha256 = "b00ac5cf76fe562cac8f72327cdf0e54b2c4384586fbb064deb72d2741e05268"; }
-    { locale = "ar"; arch = "linux-i686"; sha256 = "42851096189bc53d18ea26d9de1d0321b033a5601594c0515530263cf3155b12"; }
-    { locale = "ar"; arch = "linux-x86_64"; sha256 = "4d7e8760da3dac6cffa8eafeb22c759bfad3664bba7f690c0f1d1aa5284aed3c"; }
-    { locale = "as"; arch = "linux-i686"; sha256 = "706d584ea78172ec88c29d124abf2bd34881c9752231fdb3f491d0bf858fc5c5"; }
-    { locale = "as"; arch = "linux-x86_64"; sha256 = "13ed628c2ef29b8d3188274e6fc101ba622d4e1ca20880b381e62225c5f057d5"; }
-    { locale = "ast"; arch = "linux-i686"; sha256 = "9f8f5870245cf0016d4a9a540d29d31249188fa8f390c47cfd330874eb20e8dd"; }
-    { locale = "ast"; arch = "linux-x86_64"; sha256 = "9bd85381abe1335ca9208ad764477e6f2a926288058c91aee0af3a3967aa1e57"; }
-    { locale = "az"; arch = "linux-i686"; sha256 = "9e117f5aabdb8f71bcaf8073c76c4b795c957e6739471fed0f484d0ed39b5a98"; }
-    { locale = "az"; arch = "linux-x86_64"; sha256 = "06ee5bd4f1096e6728120fbed4ed6cbc88cb1003c484a15dd624254ae93ed849"; }
-    { locale = "be"; arch = "linux-i686"; sha256 = "c6091272b395905e746271176d354ff59eccc9d96c5e1ecc2e8e5c3ac65ed2f0"; }
-    { locale = "be"; arch = "linux-x86_64"; sha256 = "090ba5d28858b2c58a6a29ce0f435797a938cd788ebd3413db4ced224329d2e4"; }
-    { locale = "bg"; arch = "linux-i686"; sha256 = "1b8b5bbe6473b13fb80ca31514f7386015f5920c7a3d8391aa5549eedcfd09ce"; }
-    { locale = "bg"; arch = "linux-x86_64"; sha256 = "b49fa01d8749c1b4d327dca2379e4940d5d85d310e998cad66efecc2f485cf9c"; }
-    { locale = "bn-BD"; arch = "linux-i686"; sha256 = "3372a82af514706d8eacc5e4d35584379408db964c3cfd35ea75597ddefad7e8"; }
-    { locale = "bn-BD"; arch = "linux-x86_64"; sha256 = "798a2a405e175f8347dfd933300eba728cde6dbe47fa831552e40b87455bd921"; }
-    { locale = "bn-IN"; arch = "linux-i686"; sha256 = "3895feec666feb59a554310efc70b248d63906ca6bde59c03d9a29fa2d4cd7c2"; }
-    { locale = "bn-IN"; arch = "linux-x86_64"; sha256 = "58725666980beeb5a651683a76be2084ba9d40530a063f1f1ebf160fb4db8e0b"; }
-    { locale = "br"; arch = "linux-i686"; sha256 = "21d56c17d225a6a35711bb8354724a05ad15ec565cc70ec128384f9b8762edba"; }
-    { locale = "br"; arch = "linux-x86_64"; sha256 = "c0cc5568b2fac5ba35ef742fd1f87fbb73e1bca47240e888848ac804f4bd7714"; }
-    { locale = "bs"; arch = "linux-i686"; sha256 = "4b2d818c81bc15dad48c47847c14a00cec5b93615a23cb5d2068f4a2ef98b810"; }
-    { locale = "bs"; arch = "linux-x86_64"; sha256 = "a35a4cd723c446ac5593989f7fc4a56aace5cbf6bce757f3a92986e795ab07ba"; }
-    { locale = "ca"; arch = "linux-i686"; sha256 = "66497de3bf6069c1af68f6a50988919b8ff37afb9da7ce327a5beb014b75aa0f"; }
-    { locale = "ca"; arch = "linux-x86_64"; sha256 = "188b43172959c2ef064ef558d0b6518409eb19bb33add98d77a8bf260def55e6"; }
-    { locale = "cs"; arch = "linux-i686"; sha256 = "2ccd96ef1b831580dcfe84f62501fcebae7fdf8a803786913bd24a9cc9904ff7"; }
-    { locale = "cs"; arch = "linux-x86_64"; sha256 = "c9e1665399f055c561ec6d8df90235c3bfb3570d7ec613b959e80c5080e7c614"; }
-    { locale = "cy"; arch = "linux-i686"; sha256 = "789aadc04e83af8cc08cb9dd67bc61aef337a31d2ac17239c194de2d12608b6e"; }
-    { locale = "cy"; arch = "linux-x86_64"; sha256 = "6d695037d9000911422a6b50d09ef250044d629368900ec569a06ac245c1eb2a"; }
-    { locale = "da"; arch = "linux-i686"; sha256 = "b63788d28be0cbc37499e5ad41b8a904413c537a5786b1c2934c304f2adf4ded"; }
-    { locale = "da"; arch = "linux-x86_64"; sha256 = "a5d4cf1dec637ce5c09ee9f8be82ad32756a56ff0e8c529c945b40adb3b928e0"; }
-    { locale = "de"; arch = "linux-i686"; sha256 = "ae3b299a514423faf79bd21952f90e37a4d8e7be2cadca9a1befff4160f103e7"; }
-    { locale = "de"; arch = "linux-x86_64"; sha256 = "971b80131db7e1facd480546d9bd780bf69d2a99338d9e50415eb6583e550cdd"; }
-    { locale = "dsb"; arch = "linux-i686"; sha256 = "87c439cfbd139477055e5a8bd421aa65cb75cdb93090a54899d25411ab3d5dde"; }
-    { locale = "dsb"; arch = "linux-x86_64"; sha256 = "2a04b723d1ed3f9bab3dc9f11fc315fbce2543bfff37532e7cd7a4b9a33d7936"; }
-    { locale = "el"; arch = "linux-i686"; sha256 = "37e02fb347d8cb1f3b5079c3be055c0e37cdb3a6ab97b2928237beeb446e800e"; }
-    { locale = "el"; arch = "linux-x86_64"; sha256 = "9a439341ff9c39cfe8dcb6681221d0d78690ad063ac99a201001f5787b5ec270"; }
-    { locale = "en-GB"; arch = "linux-i686"; sha256 = "a3cc4951a826e483ddb7832333e032e9197418cacdb4250e5072de1ad2fef5d2"; }
-    { locale = "en-GB"; arch = "linux-x86_64"; sha256 = "433ecbabc4d1fabb2ebad958c4e7a0bb9cff9a657b1a641f820d5f0a7ba8c1f1"; }
-    { locale = "en-US"; arch = "linux-i686"; sha256 = "a78498b51059f46d42cf2fcb2232d57d97f2ab4e8a789151d3a26e013132dbb8"; }
-    { locale = "en-US"; arch = "linux-x86_64"; sha256 = "251e8d67abe989ddbf7cf9e78bba58eee43e3b1eb0c461a9c6c376bda6c71a87"; }
-    { locale = "en-ZA"; arch = "linux-i686"; sha256 = "d6195b72e56ca9ea366ab47885ee22b0f7bf4811b3cc937c36af53fe4e6f5d89"; }
-    { locale = "en-ZA"; arch = "linux-x86_64"; sha256 = "f82eba9a593fd6ad8a9b5b8b61d2ccf986080a1cff2af598afe930cd96423a5d"; }
-    { locale = "eo"; arch = "linux-i686"; sha256 = "b6bcfea89be5883e1e5d2899bab371b7d972d4be5717d21d522bc56679463dd9"; }
-    { locale = "eo"; arch = "linux-x86_64"; sha256 = "4908438cf56646665f91bf12e46c611818c5323979048d01bbdc4d5cf945832d"; }
-    { locale = "es-AR"; arch = "linux-i686"; sha256 = "ace48b5a36bccf1d21e17611e9ef7c21786f207da111473479473e5bc5817fe9"; }
-    { locale = "es-AR"; arch = "linux-x86_64"; sha256 = "277ec48d9b45bd41dcaa141d67f5f814845d5e0faeca97c6f5d507f8c9ce5312"; }
-    { locale = "es-CL"; arch = "linux-i686"; sha256 = "78cb60452201df5cff7ed7da54f3f876596de0a895887f8016b3d642d727e96c"; }
-    { locale = "es-CL"; arch = "linux-x86_64"; sha256 = "3be79c28ea7f7ea075fc92e418ff980176dc9707329f1043c54161e703b43028"; }
-    { locale = "es-ES"; arch = "linux-i686"; sha256 = "4bb8d2732754c1112bc8d32a26b0cfee79449447a4cb8ca368f1d41e9ba43d37"; }
-    { locale = "es-ES"; arch = "linux-x86_64"; sha256 = "f512f8f1b163c72234173944c5781550810b90c2b6a1a6f8d070b87a8f85192e"; }
-    { locale = "es-MX"; arch = "linux-i686"; sha256 = "01f2b5e09792714b6315933ec714c5d1baa77bbab5b4e4d06ecf670c47c75d40"; }
-    { locale = "es-MX"; arch = "linux-x86_64"; sha256 = "c7af08a37c116a5cb805cf0b60ef1b1a8f956fec3381ceb0288c62355b05c91b"; }
-    { locale = "et"; arch = "linux-i686"; sha256 = "0aac86a5cd520a806aedc2f8111798eebcb08919099973f7d7fc7addfbaa0584"; }
-    { locale = "et"; arch = "linux-x86_64"; sha256 = "fa0ad1bfd65d231cc58c9d79fb07cd4a98d5976e870af017642a77ebd7a4b260"; }
-    { locale = "eu"; arch = "linux-i686"; sha256 = "4bad5d7e4e2d917606f63efa079092516ff1435013adb8aedbe95a53aa2c594a"; }
-    { locale = "eu"; arch = "linux-x86_64"; sha256 = "9e390ebf06c5abc46f80ec8c77bd7572de827ee5d368de34c1252ee386687372"; }
-    { locale = "fa"; arch = "linux-i686"; sha256 = "9738ddfbaaf3e34c5546c584d9dbdeca68086e66f06b438760befb23e07593cd"; }
-    { locale = "fa"; arch = "linux-x86_64"; sha256 = "55e8f1f2547a9c7c3bb3cf7029e166ae42a3745f51b58c87d7eeaf6ecdb81952"; }
-    { locale = "ff"; arch = "linux-i686"; sha256 = "dfb266913e27299469de2a5ffedd5fa47f344d6d7e092ddf630cde726b94934d"; }
-    { locale = "ff"; arch = "linux-x86_64"; sha256 = "370e310c39f0a87cc8e3ecc5bd6c8f3bbd863b1a8d7e613a0c2fa9be7b8b988c"; }
-    { locale = "fi"; arch = "linux-i686"; sha256 = "2d10c5e21f414cc83a5413e8a2fc53124c2dadb718861410fa45e57c8ba4fd7c"; }
-    { locale = "fi"; arch = "linux-x86_64"; sha256 = "d791eda3135572d0735393ee1101383b4d20142a4279dfe615a9e20c341ea4ea"; }
-    { locale = "fr"; arch = "linux-i686"; sha256 = "94118a53c25a0fb243b63d51a64c077672c4c93d7ca964f6384e3bb8234891a1"; }
-    { locale = "fr"; arch = "linux-x86_64"; sha256 = "6ccd8216017b2593430a812ea167a97012060d41fbf610bf518b8d997ac59c53"; }
-    { locale = "fy-NL"; arch = "linux-i686"; sha256 = "bd5cfd3565353ae8d01d8c9089a364394aa0ebc4547a41dba11ced14a494ed9d"; }
-    { locale = "fy-NL"; arch = "linux-x86_64"; sha256 = "0db0aa59c0df881f901d794fdf99f5abd27db88e0c3ab2d364b22eb7326152db"; }
-    { locale = "ga-IE"; arch = "linux-i686"; sha256 = "59486516e8aa13ca113e1f2998b05509dba0546aa7b11d99ff6da55a6f069f64"; }
-    { locale = "ga-IE"; arch = "linux-x86_64"; sha256 = "1cda950ea6cc6d8957d580fd2c59784bf6cd339083f0fc3cd3a084e0326b0041"; }
-    { locale = "gd"; arch = "linux-i686"; sha256 = "602047e1669e9551f7a3501082e81e3e79287082b981d59f515887c5e892fb70"; }
-    { locale = "gd"; arch = "linux-x86_64"; sha256 = "d5b901d78e06a75d2534214bb849e31696ec44349c18b9b511e68951d29fde90"; }
-    { locale = "gl"; arch = "linux-i686"; sha256 = "d55a556321c600024ea2fc38d9671f34c490046da88a89e4ae46d9217bf64677"; }
-    { locale = "gl"; arch = "linux-x86_64"; sha256 = "3deb86b766f51a218266cf4d97e1b3332c8ca7d75cc86491d940a8b9f37c0bb5"; }
-    { locale = "gn"; arch = "linux-i686"; sha256 = "f38099f998e5bc396360856fe2543152feed086b64a85b7ac3bd2b9e3e0ad609"; }
-    { locale = "gn"; arch = "linux-x86_64"; sha256 = "af4055322dc0524a00fc3ac08a4b2eb40a305dd574b92cc591fee6a00482c4b6"; }
-    { locale = "gu-IN"; arch = "linux-i686"; sha256 = "3210857982a6628f8c2632995c248eed1bd1c719ddcbacb663839990e67b88c8"; }
-    { locale = "gu-IN"; arch = "linux-x86_64"; sha256 = "bb2154aba760896180ae747648530880127c8c46481b04a1ea0cb3b47c2a6f41"; }
-    { locale = "he"; arch = "linux-i686"; sha256 = "18b5217fee9e30bd4bb7f1ea27445ff4aede149a286c07b7c8e9740330b7e6eb"; }
-    { locale = "he"; arch = "linux-x86_64"; sha256 = "2f51ccc6e5c64976c2f81818d0a4381e508aa5f70ec2108f0e6f512a51574709"; }
-    { locale = "hi-IN"; arch = "linux-i686"; sha256 = "555318d41795c988f41655bcf4653aef259c2e3dc80fdcf95670c6ada7fe687c"; }
-    { locale = "hi-IN"; arch = "linux-x86_64"; sha256 = "683e0437ff9168e159e933bf72f6db2d95ae94bb06bc48a1d1fafd30b7028fe1"; }
-    { locale = "hr"; arch = "linux-i686"; sha256 = "c7a2cfb5f4594a3690797ee5559949154b3dd8c9e6a4dbd774e312f914e0b268"; }
-    { locale = "hr"; arch = "linux-x86_64"; sha256 = "94098ca5f069445a6514d4b7500ae10b018b4e1dba2eb7052a200c5eb707ba41"; }
-    { locale = "hsb"; arch = "linux-i686"; sha256 = "c81cde05298660186d2760e977e43e554a896105765c043caac74b09326358fb"; }
-    { locale = "hsb"; arch = "linux-x86_64"; sha256 = "4cdd381d2eb94f163637a328e5ee9369eddc0559f17861377566853e2a7ec571"; }
-    { locale = "hu"; arch = "linux-i686"; sha256 = "0af518a42e35174f838b958823ad1aa24a14ff75a6058c2171594e16d5670d77"; }
-    { locale = "hu"; arch = "linux-x86_64"; sha256 = "b4c0212fe6a8df9689d5dfcaa9ebb2a1cf07e1e9817727581411542ea9bf26b5"; }
-    { locale = "hy-AM"; arch = "linux-i686"; sha256 = "0d62e6627e3ea838089a6b8b8692d034a64b47c66af80561a23bcdd74fcc777b"; }
-    { locale = "hy-AM"; arch = "linux-x86_64"; sha256 = "0e07e77cfac6588f8b1c3579b7dfc62feafcb72e7f9f57e2618364e3c02c0527"; }
-    { locale = "id"; arch = "linux-i686"; sha256 = "9361b3c83f4b3fe84d2918810b4651bc2878eeb3cdc849c513aa3faa17bb9a72"; }
-    { locale = "id"; arch = "linux-x86_64"; sha256 = "baaa11970fb695434fc2c7829d99578f7f48debb5e11729f94b58df330608c36"; }
-    { locale = "is"; arch = "linux-i686"; sha256 = "3f1fc35dc18a684a22c05a2ce468b5a164b6c83457694f9de4e6f9a72c28c6df"; }
-    { locale = "is"; arch = "linux-x86_64"; sha256 = "046fa860343ea079db768d94c5dbc563d6564df5a177f2a5cb7fdfa965576019"; }
-    { locale = "it"; arch = "linux-i686"; sha256 = "ce736af6240e803a3c1fabb58bdae2e27e44ff593e56172b3d6d174c89f606e5"; }
-    { locale = "it"; arch = "linux-x86_64"; sha256 = "e2a8fb6e3f18b2be4b7736e3c8adf77968bc13dea7f981e20ae47430b137695c"; }
-    { locale = "ja"; arch = "linux-i686"; sha256 = "2153c10104c62a5814a4f72fab7be6ffa2e03e5c5cc5f7172820d0a139134fe6"; }
-    { locale = "ja"; arch = "linux-x86_64"; sha256 = "446a20d4ca5c7086045f8750eb0bcc850118d2f020a77f8fa4d116064b443953"; }
-    { locale = "kk"; arch = "linux-i686"; sha256 = "3ddda0311feee7c247fd309a7721f4be8458fa528e63a2e8f58c005f70007144"; }
-    { locale = "kk"; arch = "linux-x86_64"; sha256 = "4dd8f3ea040fb2d6056f0c0f615ed38f09c980cee660fba1f8aaf0fd506745eb"; }
-    { locale = "km"; arch = "linux-i686"; sha256 = "a295d9d466aef89c95989866a38080d3d1b110e4efb52b1a01479817dd1c866c"; }
-    { locale = "km"; arch = "linux-x86_64"; sha256 = "dbb249a1398c335a155ea2b2f6ac4656f8ff00b999035dce9f5a59532043f9c3"; }
-    { locale = "kn"; arch = "linux-i686"; sha256 = "357077be38c6869602a13abf1f494ec8a124a9eb2c03a395a1b30276110b6913"; }
-    { locale = "kn"; arch = "linux-x86_64"; sha256 = "11658a25f30558a6f11f28c80a98800095ef4c5879d456dc3503737a8d9cb465"; }
-    { locale = "ko"; arch = "linux-i686"; sha256 = "a653f4030480ab17d77c48b144296e78faba7ad48fdce812afbe8243299575c5"; }
-    { locale = "ko"; arch = "linux-x86_64"; sha256 = "182858b0c4bd6ece47aff2b406da7442eb3fbe148c3bc20975f6bafd2acd37ac"; }
-    { locale = "lij"; arch = "linux-i686"; sha256 = "449088107c0077318d95176a90a65219a76c851c98dd5b929452bfde2a87773f"; }
-    { locale = "lij"; arch = "linux-x86_64"; sha256 = "8b45df098143a01f915b8eee0f8b7d56b4ec73fc9cfd0fba8c5f4b8582992f80"; }
-    { locale = "lt"; arch = "linux-i686"; sha256 = "085e9873154fab87c909cef005a82f0d5ab81a8ece9adfe46766ae69418084f6"; }
-    { locale = "lt"; arch = "linux-x86_64"; sha256 = "dde643769a14714cb9990fa489389fd5cabcfb26b23c31bb32dbaa17a38f5150"; }
-    { locale = "lv"; arch = "linux-i686"; sha256 = "f6363da3c7ebd5f9d80454ad126ac1cf03ef2c9fd2eebf5cb174f0d7a9cf1e36"; }
-    { locale = "lv"; arch = "linux-x86_64"; sha256 = "41fb793c10d5eb52dd3847f9dee30c3f67c8ad5061897d9f13135b7d1666a84b"; }
-    { locale = "mai"; arch = "linux-i686"; sha256 = "96af787075b06d96a2e8a261b900f6eb590f4997354dcd9f57a8714af3432a12"; }
-    { locale = "mai"; arch = "linux-x86_64"; sha256 = "514e75157308cd6fc96c54592dd1c1f5b556c15c5b211543644f324eee09b1a2"; }
-    { locale = "mk"; arch = "linux-i686"; sha256 = "1f809ef4d0afcb13bb40459a63be49ab6e074641e8f4ce54e9d2bd89c4b0b141"; }
-    { locale = "mk"; arch = "linux-x86_64"; sha256 = "4931d99ddd6851e4e4596a808e6b6e5fe45012711723c6748b752217c70be9d6"; }
-    { locale = "ml"; arch = "linux-i686"; sha256 = "5081b42676c174226c357c798d64cade2acecf6e935bbfabdaab548d364dd1ff"; }
-    { locale = "ml"; arch = "linux-x86_64"; sha256 = "1cbaa2c64d8fc098b67f77660e18a3df3e051396a3d5e0f984294b0823324365"; }
-    { locale = "mr"; arch = "linux-i686"; sha256 = "d1cc4ef0d9938c85a21e64e4a71539d46a78c709edd1ac1dc331da8ae6af57e1"; }
-    { locale = "mr"; arch = "linux-x86_64"; sha256 = "8fc0abfe8e834c0894187fab63becd1e3d4e071609676c1d0a8fd35a4265ec60"; }
-    { locale = "ms"; arch = "linux-i686"; sha256 = "7f471e30f28f0ccf6bc285d24923be2b53415891f4f0909c31160bd09d8e2c21"; }
-    { locale = "ms"; arch = "linux-x86_64"; sha256 = "150101c5a3556664a9e3827edf36c412c64037871a5af5f66c47bed448c8931d"; }
-    { locale = "nb-NO"; arch = "linux-i686"; sha256 = "67b888c5b666e1428c182dfa79aa1a9a471c785d4dac85e6cf1f618dee9c796a"; }
-    { locale = "nb-NO"; arch = "linux-x86_64"; sha256 = "57c1aee6f309536788a9a9bd2be3046d65c9b174583de7e0b72cf45f28156f67"; }
-    { locale = "nl"; arch = "linux-i686"; sha256 = "43feb0205631ff5caa6e7d71fa37a6643b3b3fd92fc06b77cef9e9a0113bb1ce"; }
-    { locale = "nl"; arch = "linux-x86_64"; sha256 = "182481c49deb71d9344a8789db40e233326719dbe19973fedeaaa504ba771fcb"; }
-    { locale = "nn-NO"; arch = "linux-i686"; sha256 = "995abcace6138d11252b60958a8d5a13a1abf94c8017e567053468f811549b24"; }
-    { locale = "nn-NO"; arch = "linux-x86_64"; sha256 = "d449fa5534d9a7f5e772678388770f14fa32226b0366e9a2adf7cd245b911139"; }
-    { locale = "or"; arch = "linux-i686"; sha256 = "a7abea23a03ed38048e724e2f7fa234e24f0f74d8681e39bca5ef183178df923"; }
-    { locale = "or"; arch = "linux-x86_64"; sha256 = "b05963dc6e13757b4afd1a1fa72c3128cbdfc9db3ba16adc20d2fd2eb101f165"; }
-    { locale = "pa-IN"; arch = "linux-i686"; sha256 = "4a30beb8ca9feca58487264abbed2a403336835140767ebac31be24bcf4b9386"; }
-    { locale = "pa-IN"; arch = "linux-x86_64"; sha256 = "77b77274a7eac09f4d1a7163ba5555ced722369717d98ba1dab014140a4ac235"; }
-    { locale = "pl"; arch = "linux-i686"; sha256 = "699b72fd6bdda12d71521bc0e32fb1a95d933dc45f62595e6b02f5441ff6d016"; }
-    { locale = "pl"; arch = "linux-x86_64"; sha256 = "d748461e3e45a3d07aa36bde8fd265a51888e34ce0a8e23fdf893e540cc90e16"; }
-    { locale = "pt-BR"; arch = "linux-i686"; sha256 = "0b7062f911ce1d70e5300cd85328aa507c9a39ad14110a0241e23280af0f6db5"; }
-    { locale = "pt-BR"; arch = "linux-x86_64"; sha256 = "b2de3df121d0ca4b4c322533040ae5187cff9fad8e8b83997425867c051b636c"; }
-    { locale = "pt-PT"; arch = "linux-i686"; sha256 = "801a04cd65d7253c95bfb9b680abba87b45e3f0cff18f94b81945ed47154b9e7"; }
-    { locale = "pt-PT"; arch = "linux-x86_64"; sha256 = "5e6a28463b388fb2a242af899e521a7c2a4bcc48959d0f6813335fd11e3b5861"; }
-    { locale = "rm"; arch = "linux-i686"; sha256 = "57d8127547da954a6fdecaaab0006d570125ad577ad7d66e53c97e1c2194258e"; }
-    { locale = "rm"; arch = "linux-x86_64"; sha256 = "f6158506cbf3c96a5f6a551969338a65369f2be52bfa80359da3941d2f3277bb"; }
-    { locale = "ro"; arch = "linux-i686"; sha256 = "980701a87255b999c4df5d82a53b653bb513675ba93e5138bc47e91174d03c3f"; }
-    { locale = "ro"; arch = "linux-x86_64"; sha256 = "95e80b8bbd38510719463ca1b67e574f0a1d62daa8fbd09f4bba277749c57517"; }
-    { locale = "ru"; arch = "linux-i686"; sha256 = "16e6775a26756b445e5c72220297062b3e4e1ab66efd0324eb161a4d5b353874"; }
-    { locale = "ru"; arch = "linux-x86_64"; sha256 = "9bc067f5c158f33fdafd8b7ea1ab3492002ceca579a177a292a835d52c430c27"; }
-    { locale = "si"; arch = "linux-i686"; sha256 = "2fdc744bc85488514b9bcf93b017e6f6fcfd4cf7c249c1e7d307956cb62baf43"; }
-    { locale = "si"; arch = "linux-x86_64"; sha256 = "366893e7b7337ff6bdfe0def0ac88615e9cadb460fbcb17dd047f18172782208"; }
-    { locale = "sk"; arch = "linux-i686"; sha256 = "3efabb4f04376688f51df5c70fb4cfc0b382e9b6160eb625969945a8e3272a18"; }
-    { locale = "sk"; arch = "linux-x86_64"; sha256 = "dd97fc87382cca475b4b8ef8ab137b8f436e4a4792bfc06bcf0e7736e1f5e452"; }
-    { locale = "sl"; arch = "linux-i686"; sha256 = "3ba940deb5b1db31aaf07c005e62ddbd6acf44d3d0e775aab51c2eb0dc2da936"; }
-    { locale = "sl"; arch = "linux-x86_64"; sha256 = "dae438abc4cdd552bc7750ecebe958cbb7ef0edbb745d19e9b670db1e5c9fa8f"; }
-    { locale = "son"; arch = "linux-i686"; sha256 = "ef1baa4e6b333cd19df938dd13b91e091c9ed838b72767def2c0eec7a473532f"; }
-    { locale = "son"; arch = "linux-x86_64"; sha256 = "c2e45137b18717889977e0203951ddd078e1379f05875915f295b14677b6e75a"; }
-    { locale = "sq"; arch = "linux-i686"; sha256 = "d4f48c90a2bd4f8751b66653e0aed0de3f4ff9b40bba306377577ef8cbf94541"; }
-    { locale = "sq"; arch = "linux-x86_64"; sha256 = "85cf583913978c109dcaf07b22442505554813b6129862668ef78f491588a153"; }
-    { locale = "sr"; arch = "linux-i686"; sha256 = "08725f28304608e029e9e4ccf0fb478eda4b6cde138ad65a53e2f88af97e8a6c"; }
-    { locale = "sr"; arch = "linux-x86_64"; sha256 = "bfdca6d30f044bed181d45396c81f0a1d0e9b9026607e0700cc1bf225408ac20"; }
-    { locale = "sv-SE"; arch = "linux-i686"; sha256 = "01f98e4954e1a1df5b0aaf711696b6f7e7237ea3df57071479e8749c621fbbf1"; }
-    { locale = "sv-SE"; arch = "linux-x86_64"; sha256 = "b1c292410edaa4d6595b21b803287030d21ddd64e7a6a941d7627bb4cbff2435"; }
-    { locale = "ta"; arch = "linux-i686"; sha256 = "d6d62857ccfe54ab870bcbe0ea98e41d59524b3958c28ddffcfb009d6305fde0"; }
-    { locale = "ta"; arch = "linux-x86_64"; sha256 = "253080f66f47850222c676d98626c5a879ee708d1f03b3598d4ac205998676c4"; }
-    { locale = "te"; arch = "linux-i686"; sha256 = "ffa9371d8960707a0062bc6cb5ed5aa84c9e5b9b898ddc403b346b519bf6f814"; }
-    { locale = "te"; arch = "linux-x86_64"; sha256 = "69c3776bfd41bae4067da4f5f350c5f0a906c2b8d1edffe5d3907bc7ca2ee863"; }
-    { locale = "th"; arch = "linux-i686"; sha256 = "3dbead624ae46c14208a61ed8c6b515117d472a8f8bebf14478bc467da23eeee"; }
-    { locale = "th"; arch = "linux-x86_64"; sha256 = "4c0db90021ad46d67f68b3d2d928a279cdff14b7d62f8fa4e07a33135ab925b7"; }
-    { locale = "tr"; arch = "linux-i686"; sha256 = "744327c6a3c514ff7b0bc5940f1744c95c6ac47165d5b316bbea11412a2d8550"; }
-    { locale = "tr"; arch = "linux-x86_64"; sha256 = "321f096a89898ed027b95efa4f02fdaa9118eb414e35088ce259b76048bf77fd"; }
-    { locale = "uk"; arch = "linux-i686"; sha256 = "f3d0a5a328b686cf18339e50a59920fe002166b35c5b5b29c04156bc5b5c6d4b"; }
-    { locale = "uk"; arch = "linux-x86_64"; sha256 = "b15e82737c69703bcdd97f5699280338e4c2029b5eea7df98fb218a5e2a579f3"; }
-    { locale = "uz"; arch = "linux-i686"; sha256 = "dfdf28670cacfd43f71d81c609fc2961682ec2c7a64ea540e49a571195e68852"; }
-    { locale = "uz"; arch = "linux-x86_64"; sha256 = "eaacd1534711def0ab30eb9a53db2553c4cc202ec07c40bc5b2ded7e729347ac"; }
-    { locale = "vi"; arch = "linux-i686"; sha256 = "4b4753038753d814d1e5a1ff995445abec80fd74d9443cac38495193bf039762"; }
-    { locale = "vi"; arch = "linux-x86_64"; sha256 = "3051a5f8b0d47860f98839c4496298d71aeb6ef98f099937b8da9d87d7a1986c"; }
-    { locale = "xh"; arch = "linux-i686"; sha256 = "2798bca7d894a0ba223694fe585e1b9fcf60cc96d881d7570c06a4d77afc4b20"; }
-    { locale = "xh"; arch = "linux-x86_64"; sha256 = "acb1084e32bc467cd3374e6930c8f51deea38e94ddde09bf5a257d473d2579e8"; }
-    { locale = "zh-CN"; arch = "linux-i686"; sha256 = "93a3f1b92aeb7a3e7659ebe0ad7c7df966279926fe3fdc7b0047bd858482234f"; }
-    { locale = "zh-CN"; arch = "linux-x86_64"; sha256 = "047d74546e4767d728e7522d908056c8aaad9cd8152517425443b59ff580bebe"; }
-    { locale = "zh-TW"; arch = "linux-i686"; sha256 = "b710126e2d7cd6f55b0dd54811de64c30eb69f97ea8a71905b3ea49e59abdfe2"; }
-    { locale = "zh-TW"; arch = "linux-x86_64"; sha256 = "d3b52404ab397385fcbb617f6cd8cda821d3927852e0a617dd60443c2cad6b65"; }
+    { locale = "ach"; arch = "linux-i686"; sha256 = "3e925e9594f84e6bce3f24fa0a1207ec584818df4815ae04a6c882644e2f7cc6"; }
+    { locale = "ach"; arch = "linux-x86_64"; sha256 = "c960352a5288f09752ff76440278e76700a1921109f0976b4d922ceeedec8e9c"; }
+    { locale = "af"; arch = "linux-i686"; sha256 = "3067a999cc678fe225c11288ed5659a251f237e098903b2cf6f23bdbceb70a9f"; }
+    { locale = "af"; arch = "linux-x86_64"; sha256 = "f329f7f3e15cd90263d70269c946f83bca01384618a59d590ca371930e7b1939"; }
+    { locale = "an"; arch = "linux-i686"; sha256 = "564ba48104a2db7709e4b9b25cf8d2853ef8a2b919a14030d7cc59751ac8ab8c"; }
+    { locale = "an"; arch = "linux-x86_64"; sha256 = "c2628a079e4c601d54c869d3b13ec1a772353885b29a63559aa544d5f48d4873"; }
+    { locale = "ar"; arch = "linux-i686"; sha256 = "3097a13c59a324f3f9b7504b4941b1846cfbd5593c91597a2475fe87efbb61f7"; }
+    { locale = "ar"; arch = "linux-x86_64"; sha256 = "b5778932fb122de9f7070393b4ae98e190e648857c94096a495e021a3c956a04"; }
+    { locale = "as"; arch = "linux-i686"; sha256 = "b6751bdaf612b8a975122812db0e7641eb5932e6c13879d7b48f2b7f5e8a2c6a"; }
+    { locale = "as"; arch = "linux-x86_64"; sha256 = "6501b0e3c4c55eef08e94dcd6f5fab70d01f88e57630f5a999279286fc9b1058"; }
+    { locale = "ast"; arch = "linux-i686"; sha256 = "40b5f29d2a818e60d5ed1ef2f37ed5a65bf52b9138b2e4fd1c110b404fbf3910"; }
+    { locale = "ast"; arch = "linux-x86_64"; sha256 = "6f9e6266d790784d57cab715d8d6fa5e648ec20287c8d6ad746972e284f5558b"; }
+    { locale = "az"; arch = "linux-i686"; sha256 = "005ca6c0184a9c5a2eee8d49b00782872abbe202c70654d856fd519ce62ea47a"; }
+    { locale = "az"; arch = "linux-x86_64"; sha256 = "32d5179de71be41b855d0454004e43d336289a6fe4967e869d0b9fb42fe2fe71"; }
+    { locale = "be"; arch = "linux-i686"; sha256 = "0fadc3acdd104cc171a18c74e11e853a9a322017f3f63b79712dc6628246630c"; }
+    { locale = "be"; arch = "linux-x86_64"; sha256 = "3fe751e0c702fc8a03f63cba1d1f2e0897b2f729c1b607f68f9934926a3343d8"; }
+    { locale = "bg"; arch = "linux-i686"; sha256 = "80c49634c1b0acb2ee533ddd6581845270f05a3406cd7b41bf5962182166c000"; }
+    { locale = "bg"; arch = "linux-x86_64"; sha256 = "12e74f5a3b8500f18126e305d49cf26290fb145d62d888bd00fd44b412dec105"; }
+    { locale = "bn-BD"; arch = "linux-i686"; sha256 = "22511d1c27f3876bbe7c4e791accdfa205e05cd3fc4143070f8e1e75521fa12e"; }
+    { locale = "bn-BD"; arch = "linux-x86_64"; sha256 = "239e59d26a842efd2ec61dcca73f7b6aadca6d4bb969e7447bf8ef2ed880a77c"; }
+    { locale = "bn-IN"; arch = "linux-i686"; sha256 = "72f72e6528c5d9e373e21065eba623cbbfc6c82e73db0df3581a1ffebe664cbd"; }
+    { locale = "bn-IN"; arch = "linux-x86_64"; sha256 = "580564e4a1e249a7cb6c83736343af43f903df82a97f8d2e19bd749e01867339"; }
+    { locale = "br"; arch = "linux-i686"; sha256 = "1dbc1d60e99812077b1b43a6f294e9c834db5b08ad67976290a5ea6f07d44c05"; }
+    { locale = "br"; arch = "linux-x86_64"; sha256 = "2c6524b05b9ab8da113066de6d6380cad29b681921c03486618dd2b6d10ca1ae"; }
+    { locale = "bs"; arch = "linux-i686"; sha256 = "11b706f2621a8026e10de074f0cbcb6bab4a7b0a17d144640c8296ea35e92c95"; }
+    { locale = "bs"; arch = "linux-x86_64"; sha256 = "e4ff831c617918c52b3b2a9e69a1f35f8b3e825f407cf6729d7e2b479860de29"; }
+    { locale = "ca"; arch = "linux-i686"; sha256 = "1c2aefd0ab56bcfd619705aba70018873581c7482307c32842ffdb68ce441f10"; }
+    { locale = "ca"; arch = "linux-x86_64"; sha256 = "47ab6aa2c474b9b04f246822c471548b2452559d04e4ec8cc099f3686729d285"; }
+    { locale = "cs"; arch = "linux-i686"; sha256 = "f2c4028d562148ad39390853d388ed0617419e97bda55a0c6c47bf0e94145446"; }
+    { locale = "cs"; arch = "linux-x86_64"; sha256 = "28d6eb534884b2c05afe87981b894c790fe57508b3e866cdcf341e1f9c51080c"; }
+    { locale = "cy"; arch = "linux-i686"; sha256 = "684b11673d16778961115b990734888975267c3c253a8081519e53ae95df5798"; }
+    { locale = "cy"; arch = "linux-x86_64"; sha256 = "d17294841995094d6395a4e65d50e5382e845d59e5949c952e96f4fe739d9bc4"; }
+    { locale = "da"; arch = "linux-i686"; sha256 = "4f2d29d52968c1b7a96af37beeee7150504bd3c32c4178a814ab0c4f86fe9644"; }
+    { locale = "da"; arch = "linux-x86_64"; sha256 = "65d01baab9e71a5a3d92124dbcc44c158277b273e8b6bcb302f853f61babde71"; }
+    { locale = "de"; arch = "linux-i686"; sha256 = "55af9ad39962559a48720c65f66d3bbab037ff30e777439428e2467a4559f039"; }
+    { locale = "de"; arch = "linux-x86_64"; sha256 = "835ea2e3757beb74c939296aa3d00092ff3f9d6d8805b64a267bcde28de0cb94"; }
+    { locale = "dsb"; arch = "linux-i686"; sha256 = "5b419a8f5e03257718237249be9c76eee759e46147d154bf994774139bb56be8"; }
+    { locale = "dsb"; arch = "linux-x86_64"; sha256 = "90d5dae350d65c6db8b156764ccdffe0f9951be29339a68db22018840c2247c1"; }
+    { locale = "el"; arch = "linux-i686"; sha256 = "77cc23059dc3b2956f3caf5802091ba48c4a42f5d86066f06282f82cb00845b7"; }
+    { locale = "el"; arch = "linux-x86_64"; sha256 = "daa2180f15708ec07902b639fe30cdb9c2c230622a92011e1065d24b706bbc62"; }
+    { locale = "en-GB"; arch = "linux-i686"; sha256 = "15b084bfeac2e49a0d40b37a890321500eede1bed2edaa95cf3bba8981bb6a08"; }
+    { locale = "en-GB"; arch = "linux-x86_64"; sha256 = "c5d17b6386dcae9cf88b2d80b38e921646936f253616104bec5a2fbb58d25fbd"; }
+    { locale = "en-US"; arch = "linux-i686"; sha256 = "6ef1fb2322cf448afe2c09b008eb2bab0c2efa94378b2ae9889bf83ac6f779af"; }
+    { locale = "en-US"; arch = "linux-x86_64"; sha256 = "4068eb3eb07e9798ddc1449186a1c60196bb6051ca7217f6bcee5da21e41c6c5"; }
+    { locale = "en-ZA"; arch = "linux-i686"; sha256 = "4a61661b05ddd62f9e28ada0b39fe1a81cb5d737fa50d636561f79ec324e689c"; }
+    { locale = "en-ZA"; arch = "linux-x86_64"; sha256 = "ddc551e2d8d0c50ba268ba1e8fd9ecbe52e05b0de0d1bb586045206a9e745a7a"; }
+    { locale = "eo"; arch = "linux-i686"; sha256 = "236a9b6b632d1f30d63989f03783288eb8c1f144cae80b4549c0eded5dd95f1f"; }
+    { locale = "eo"; arch = "linux-x86_64"; sha256 = "0f3a07a470e146891326ac36aa38b58018a4aa9ae668c8bbedc3b95c28d3fcb4"; }
+    { locale = "es-AR"; arch = "linux-i686"; sha256 = "6feb23d97fa5a2356365d5779c18af5fc2a00b0e91c92a5127f4d576f916f7a1"; }
+    { locale = "es-AR"; arch = "linux-x86_64"; sha256 = "5e2afba4834e6c44e8717090b832c76dfb5303617bc466be5299d579e9b298dc"; }
+    { locale = "es-CL"; arch = "linux-i686"; sha256 = "3734590f319e8e281938dae65ad2e6fd7496c0c480123a6a819b3bb5d1489c69"; }
+    { locale = "es-CL"; arch = "linux-x86_64"; sha256 = "e0fcfccfe80dcc71a7d527539e42acfc6d6786a9e8491b426aab7fc3789c8cb6"; }
+    { locale = "es-ES"; arch = "linux-i686"; sha256 = "126cf64e6f7754fe0ff8a97499ccd528896ad3bbd89296271609092ade68524a"; }
+    { locale = "es-ES"; arch = "linux-x86_64"; sha256 = "c8dbda78bffec09d401b39b76d9684a03f47102955d04604cfc2e7ddb0315f2f"; }
+    { locale = "es-MX"; arch = "linux-i686"; sha256 = "8f116ccad3093783476a60ea605e324b0046b84b59c9f858dc080d2e275cac51"; }
+    { locale = "es-MX"; arch = "linux-x86_64"; sha256 = "e6a9c775983e310d3ed8a98530860ce19e7a78df16dffb95e4735007fcf82a57"; }
+    { locale = "et"; arch = "linux-i686"; sha256 = "1b2b205731ce638823bd448b3d90e919d13e24b9b92e25eebef3766bac3e8330"; }
+    { locale = "et"; arch = "linux-x86_64"; sha256 = "97ecc57e21229d46d9d152d7821e860f3f2a53c10eda7caeb865af1919c6a0fe"; }
+    { locale = "eu"; arch = "linux-i686"; sha256 = "5f0e7875993532ad234fe7af2a191619e308be726ed6ae8be01afc79f8c5f3c8"; }
+    { locale = "eu"; arch = "linux-x86_64"; sha256 = "bf2a52f3fce8ff4142cb1346cb5ce0f8b51959755698377db0807bc1e87e01eb"; }
+    { locale = "fa"; arch = "linux-i686"; sha256 = "12d593a12a0fcfcd720a6a5324b349c139f6e6759b111dab869e851241736e28"; }
+    { locale = "fa"; arch = "linux-x86_64"; sha256 = "29cb4531e485af7dae2a45a1b9a0620292eaa2764b4cd24504bce0e54c8b71ae"; }
+    { locale = "ff"; arch = "linux-i686"; sha256 = "d67f9937780713ed4c130713239254a1e0d3918f2d2f528b74651b413e281cbf"; }
+    { locale = "ff"; arch = "linux-x86_64"; sha256 = "140b199b0ce0a32fcf363946c942d733b587d9569c75f2dbab19161385f12d9b"; }
+    { locale = "fi"; arch = "linux-i686"; sha256 = "586346c2bc47b1b2693d03e4f2fe3b36de00966244120272426c597b94044595"; }
+    { locale = "fi"; arch = "linux-x86_64"; sha256 = "160d0036392cb38de1a7e15ba9d0d1acf0538ff1b575ab1d1df11d187c5ac74d"; }
+    { locale = "fr"; arch = "linux-i686"; sha256 = "f33b267d223d704beef813d0c7c8ab534152373435ef04db3b039ad56b02c556"; }
+    { locale = "fr"; arch = "linux-x86_64"; sha256 = "c141b154d5c56eefd94bfe7e391d0fa4027cee6685820e8be304c801d7064c65"; }
+    { locale = "fy-NL"; arch = "linux-i686"; sha256 = "2fff2f173cf6008b7bc17cad2ce16a43901f8484f3eb2700368acd64f98f075b"; }
+    { locale = "fy-NL"; arch = "linux-x86_64"; sha256 = "88227c796a82290c27b97cb27d8f606f1982115eb5724fe4a6169056ac000816"; }
+    { locale = "ga-IE"; arch = "linux-i686"; sha256 = "f9deacaf81e46267fd1d7297149e9f7e330bc2a58981cd65857c6add5eef6402"; }
+    { locale = "ga-IE"; arch = "linux-x86_64"; sha256 = "c376d517de3aad4152c0d5dceb8ef1a2deef1213e568404f06163f9d4adbe777"; }
+    { locale = "gd"; arch = "linux-i686"; sha256 = "f4f11f104fe964196e1588b1cddf5a43c5a8591d41ec7baf365264562240d5be"; }
+    { locale = "gd"; arch = "linux-x86_64"; sha256 = "40993cbe7c6a42c467868e8cd60eb67aa8d0b7357617f5babb415cc3ffd608e9"; }
+    { locale = "gl"; arch = "linux-i686"; sha256 = "23c4a4a47fe7150c70f8489921b756ada22e45140e01d6817f9145de32b4d35a"; }
+    { locale = "gl"; arch = "linux-x86_64"; sha256 = "d3fa81ba627c6e75fea42715d8dc4c5fdbed841429a0493081f915623ad603c4"; }
+    { locale = "gn"; arch = "linux-i686"; sha256 = "ebbf6f05f6b61a6ecb7f5c91ca4a6b87824edced41777fe35293b5ba6836a6cf"; }
+    { locale = "gn"; arch = "linux-x86_64"; sha256 = "d9917c8dc1d236e569d040db1512872ce145af934ee3fad7a7e2d5a9a845a856"; }
+    { locale = "gu-IN"; arch = "linux-i686"; sha256 = "598f3feaa412fa85619fd60ca1a48b2a691867d8aab92b39d98d12a3ebee2253"; }
+    { locale = "gu-IN"; arch = "linux-x86_64"; sha256 = "f238f84dcc0f41f99073aa4c7bff1fd2dc5f896fb1b9cae00d9d21d199383879"; }
+    { locale = "he"; arch = "linux-i686"; sha256 = "22aacab2263a799f5503e6d73d76c6c7e8c3f2d39d9a8945d7e062e4078f4eea"; }
+    { locale = "he"; arch = "linux-x86_64"; sha256 = "6288418353ab0d51ba8b7a02a302e68dc3b26e5565cb14e50316e5300cb2f696"; }
+    { locale = "hi-IN"; arch = "linux-i686"; sha256 = "2ee18b7653f9edf926ff7927d24c04e9aba503174b4fa773a136fd3e29a256db"; }
+    { locale = "hi-IN"; arch = "linux-x86_64"; sha256 = "3f18f821cbc4781a9e6d84e54e0a70e2cdd18bcb61342922b1402a3eabb75839"; }
+    { locale = "hr"; arch = "linux-i686"; sha256 = "c8633fb837adf08b257d19b88e9e5d35c2b24a658da7088a3902b4b9b833e7dd"; }
+    { locale = "hr"; arch = "linux-x86_64"; sha256 = "714fcde1e42db06a9083946bb929a182891aadfd249bf5b63aa7f6ca744bcf0b"; }
+    { locale = "hsb"; arch = "linux-i686"; sha256 = "7f86d45ceb3f551b5b371047bbcccf9a75fe2f99df632b42d838419ee0c6d757"; }
+    { locale = "hsb"; arch = "linux-x86_64"; sha256 = "add010dbfe8a842c16a8dceb019675e04acb7b8de6d952d4b4faa2a368d37f1d"; }
+    { locale = "hu"; arch = "linux-i686"; sha256 = "cc994b9cfb60517062ce3570839b5e76def0a385b4e8793156d6a4719dd707b3"; }
+    { locale = "hu"; arch = "linux-x86_64"; sha256 = "a36d229286d5422dd15d5e0f33e7fb99f6ddff3db4efabc3be244fa26c7bd24d"; }
+    { locale = "hy-AM"; arch = "linux-i686"; sha256 = "508a5d85df7508c453a991e4a9679b31270da70983607cd9d127a8e432728a3c"; }
+    { locale = "hy-AM"; arch = "linux-x86_64"; sha256 = "e21375aa7d5351a841ba05c8b0d921af1f334d37f714ed3c4303e90b5d4e34aa"; }
+    { locale = "id"; arch = "linux-i686"; sha256 = "58d7e3a898f5ae05bc7b0e99e83d8a39a7f5f935a086081af4a9d7ea98b927a3"; }
+    { locale = "id"; arch = "linux-x86_64"; sha256 = "c4b803b519780a0fd5a43fd23a3aef81d4197e860ad8e2908c5ddf2b76f538c3"; }
+    { locale = "is"; arch = "linux-i686"; sha256 = "a9fd41eb35ed7430915d9b09807555af1d8d81f5520deb4aae58e38edf3ca11a"; }
+    { locale = "is"; arch = "linux-x86_64"; sha256 = "74c6a4183f32043fcb6a3b52c71e8a23b36fc1381caff0dae8366cd80af391dc"; }
+    { locale = "it"; arch = "linux-i686"; sha256 = "b6d615f519b7664acb335a305d99bd6c6eb7db98eb29c7957b073fbeb468d63a"; }
+    { locale = "it"; arch = "linux-x86_64"; sha256 = "f65370cd57b1a885169447cc0b879dde715c58309db49f6c268db5113952a05f"; }
+    { locale = "ja"; arch = "linux-i686"; sha256 = "1b3766bd19c8841922cbe1e3a8144d9efe5ab4a3c9b2fe216811caff54607704"; }
+    { locale = "ja"; arch = "linux-x86_64"; sha256 = "68e14f495852e023534bce66626287621a7155464fd56bbe41b38b5bc7305341"; }
+    { locale = "kk"; arch = "linux-i686"; sha256 = "4a72592497d392d4f749733eeaa7964a95fcc3de007127ec198ac86f6a266382"; }
+    { locale = "kk"; arch = "linux-x86_64"; sha256 = "9d6333875c11425a467a32ebf649b7577462920592155ed54ec6130ce76073a0"; }
+    { locale = "km"; arch = "linux-i686"; sha256 = "e380caedd69287569274115aa4cee7b8d2187050d9f65a10ae36c9d48fd1d007"; }
+    { locale = "km"; arch = "linux-x86_64"; sha256 = "95794fa36975d732987012d406770710985c270c8f4e4c99407711d16279d941"; }
+    { locale = "kn"; arch = "linux-i686"; sha256 = "b0cd3f0c6da99b3e86ec4b08b962abb0d823329460e87761733db5d7987f1e5d"; }
+    { locale = "kn"; arch = "linux-x86_64"; sha256 = "47399283f7b395c5079b592c83a93487a17a2cab0e68d35c54aa6e5e647d2c66"; }
+    { locale = "ko"; arch = "linux-i686"; sha256 = "5f9b1c691d9c9a99dd280e3fff8df813aeeefe42ce5273ddf2848352bfde44f6"; }
+    { locale = "ko"; arch = "linux-x86_64"; sha256 = "360c82f93b7f529173f9259a4f475595d0ec4dc4b63b6ac46785bccd549e3dbd"; }
+    { locale = "lij"; arch = "linux-i686"; sha256 = "29f2d93c1f6695c22d4e766ee049bbe4f6fb034e22c12be407062db3deb0805c"; }
+    { locale = "lij"; arch = "linux-x86_64"; sha256 = "c47c6e13b44b8560487f39c6f668fc03ea42bf848fcb9926cf8e0e0014218fc3"; }
+    { locale = "lt"; arch = "linux-i686"; sha256 = "5915cf516690de51021eeccc66cce8142fee7882efd7add7a0bfaa5b04d65dbf"; }
+    { locale = "lt"; arch = "linux-x86_64"; sha256 = "04673232b52aae6b34b87b6a2638ad653a4e81430d21998919a56dbde10febd7"; }
+    { locale = "lv"; arch = "linux-i686"; sha256 = "6648a4a4b8be23ed6fb64efc0bb3e49c1807b5408d2df19d45a3b098b9bb605d"; }
+    { locale = "lv"; arch = "linux-x86_64"; sha256 = "769020e490b9b74608cbbb319254694f7a32c62b6397ff8c563fa27a33cbe16b"; }
+    { locale = "mai"; arch = "linux-i686"; sha256 = "5646fac52682c1053e7b58fa0b13fcf74c8b79e344ffa3a9614fa2509ef2b38d"; }
+    { locale = "mai"; arch = "linux-x86_64"; sha256 = "eb5db15e6584a5272d9c496d29ce4f500811ed4b49277b93ae432498aef80d0f"; }
+    { locale = "mk"; arch = "linux-i686"; sha256 = "8430792262871155bf07b652c5f8ae5408b0bb16fd9e6548010e86b2a1d604d0"; }
+    { locale = "mk"; arch = "linux-x86_64"; sha256 = "273812699d47c99f20d18fdcf547cd9c5386a4d8049dcb93e34c0303a9aae7a5"; }
+    { locale = "ml"; arch = "linux-i686"; sha256 = "bc3b9905214fde7623aa5567f6a6792b2c5cb32fde1172ad60b108a42a372c24"; }
+    { locale = "ml"; arch = "linux-x86_64"; sha256 = "0e21ef50fd3ecb301d0a62baf3e084723c0cc05c3a9569ce08ccf2698f40a526"; }
+    { locale = "mr"; arch = "linux-i686"; sha256 = "fb83926aa70735befc1c8c79c950a9dbb01344dfceff82aefa7640e79f659139"; }
+    { locale = "mr"; arch = "linux-x86_64"; sha256 = "ae6622f7cb9261985d8cc0bf06af9a51d7d8b391386aded9bf07576be60c5f12"; }
+    { locale = "ms"; arch = "linux-i686"; sha256 = "16b35b29882238095475719a4f8cecd5e49a8e50bfe5c2b943c604274cfb02ae"; }
+    { locale = "ms"; arch = "linux-x86_64"; sha256 = "04e390cdeabc686eee093ae2280628375b706c2b09b9aa29e788bc1663b21ad0"; }
+    { locale = "nb-NO"; arch = "linux-i686"; sha256 = "b3b931e5a38fc71aee2dc2290adb600b0d8e56923c30c748bacbbf527e2e8960"; }
+    { locale = "nb-NO"; arch = "linux-x86_64"; sha256 = "4d3c6f639e8c6579c525c6e8c5bd036b3c6abe0e2d14ee0596ac207b3f291f84"; }
+    { locale = "nl"; arch = "linux-i686"; sha256 = "40cc8d419bc536e2826766dbd9b3e58bb98730ed38926387bcadcc5b30c8b742"; }
+    { locale = "nl"; arch = "linux-x86_64"; sha256 = "4595b76ab812dd9ed16405d0863225c0d6f40dd70a96baee2632a5f8e4d2aab5"; }
+    { locale = "nn-NO"; arch = "linux-i686"; sha256 = "8cad1d60633dfb059c4e29b3a226397822ed10938909dd783b9b8c7bac0e8866"; }
+    { locale = "nn-NO"; arch = "linux-x86_64"; sha256 = "d0ac3c7ff26c4747222f2d7a1d5b4b69a861dee261ad338ed88ab8b35cf44ffc"; }
+    { locale = "or"; arch = "linux-i686"; sha256 = "b05473429fb2b844d96ee88108891e5cdc13c56526017ff6db1909ff60dbe1b5"; }
+    { locale = "or"; arch = "linux-x86_64"; sha256 = "406816e487831cd9a928fd9c140290f53d4a9575024adf71e1565d24e573abdc"; }
+    { locale = "pa-IN"; arch = "linux-i686"; sha256 = "beb60cd44b31c3c1ebfae25efb17d78d001f0009bb5a8304e319791ae535daa0"; }
+    { locale = "pa-IN"; arch = "linux-x86_64"; sha256 = "1abab6f91bd2ff22cd6d9075bcb83ddf6a190291997e5d379eff53fc10fd8c5e"; }
+    { locale = "pl"; arch = "linux-i686"; sha256 = "65ceeb5cfeaa7d2c246ba3d152ea1fb892a7d50eafd46da2f41d7ec0a4efa759"; }
+    { locale = "pl"; arch = "linux-x86_64"; sha256 = "d3565007522b0e3a4de15b913c8f1c9421d1d9614fa4f2d6657a4af730f26c87"; }
+    { locale = "pt-BR"; arch = "linux-i686"; sha256 = "7a0593b15eac64c1261e413f4a22ca2cbb5f489530ae72a637de9bc0de99f2be"; }
+    { locale = "pt-BR"; arch = "linux-x86_64"; sha256 = "243c12ea35617336d307d8040d1bee1a1827f3c8815e78185e5d5f8c2b58a5d6"; }
+    { locale = "pt-PT"; arch = "linux-i686"; sha256 = "ed06f6d30204728089609114c5d08a8b2346ca024d6e5743179d0f2f0da753bf"; }
+    { locale = "pt-PT"; arch = "linux-x86_64"; sha256 = "65cf06f13ce3930b4c6b645e0fa442003d41a3ff99d4ff6ad06039c806bf9815"; }
+    { locale = "rm"; arch = "linux-i686"; sha256 = "5b230c43a6b56c4052e054d117c2c80450b36d52b166ac3a9c9e3d13b336e44b"; }
+    { locale = "rm"; arch = "linux-x86_64"; sha256 = "341495282263ce7293350c3623d25a6fc7952429bbc36316687be402831c4376"; }
+    { locale = "ro"; arch = "linux-i686"; sha256 = "12940db350559cc1ef5dd148f2fd34cb4f445fbd1928d0d8dac6e57b0186e08e"; }
+    { locale = "ro"; arch = "linux-x86_64"; sha256 = "a53c18fcf239dce6a49a44bbb42a210b6161f5d21e64e9e33096e36b7a187bf2"; }
+    { locale = "ru"; arch = "linux-i686"; sha256 = "823ecb8bb5b772e896b51bf23ac1fa271b02c1abba9fb4c679c687586047db0b"; }
+    { locale = "ru"; arch = "linux-x86_64"; sha256 = "fd4e34dd08c5f712c68826710496ac4eab262a4356e06a02718b27dd8c65d35b"; }
+    { locale = "si"; arch = "linux-i686"; sha256 = "6cc4f9828e366d59a86922292ca8878ef4bb6cee9ee5316b8733d0704dc6f390"; }
+    { locale = "si"; arch = "linux-x86_64"; sha256 = "ed3c28af72df9960b08071d181b1d097d0326a0cd6eaae673866083f87db18f5"; }
+    { locale = "sk"; arch = "linux-i686"; sha256 = "cfa4b71bb7acdaa689a28f8aa58f7f9375c7d7e4301cce0aea0eccc60d897d2f"; }
+    { locale = "sk"; arch = "linux-x86_64"; sha256 = "736ff619f9d9848d202fe9eaa56b6a29e37e47589282adf7d97f8d7103edecfe"; }
+    { locale = "sl"; arch = "linux-i686"; sha256 = "c8af219be7f7cc7f878425b446b1c02838f651e64a0fcbfae4ec818326927097"; }
+    { locale = "sl"; arch = "linux-x86_64"; sha256 = "d3309efc0b469e9d24e7e01216b52b31ad854653f3904c76fd136d615d75609b"; }
+    { locale = "son"; arch = "linux-i686"; sha256 = "fdc1e500f8499b648cf0fd3d99601cfcd0f7d89ae09d800520793751a6b32fee"; }
+    { locale = "son"; arch = "linux-x86_64"; sha256 = "e1f7038aa136492e3d296b9ff50a3f815f4b587944783ea0ea607717788cb48b"; }
+    { locale = "sq"; arch = "linux-i686"; sha256 = "c6881862ff53402d427d998c59a741c4abd9b2713c1fbbc5315b140d02445507"; }
+    { locale = "sq"; arch = "linux-x86_64"; sha256 = "2a83117de89e2b9036c0f7fde6617d9f55fef4955432cd566692e7a2829b1128"; }
+    { locale = "sr"; arch = "linux-i686"; sha256 = "f214aa32eef11535a73449d7f2626c90b1ce78e469d96c8cc6cd53979582197b"; }
+    { locale = "sr"; arch = "linux-x86_64"; sha256 = "9931d18c18a785569aade6fd233d3c34910ece758f3355b694b553ce6c5dae7a"; }
+    { locale = "sv-SE"; arch = "linux-i686"; sha256 = "cd5695110c90744a1b750d34c7294f1109b5c7829025eb28101b6ead5bbbcb3d"; }
+    { locale = "sv-SE"; arch = "linux-x86_64"; sha256 = "f52fe8f60420171385638a9de46b2b11c03b13239a17ef9fb4f7305774bab664"; }
+    { locale = "ta"; arch = "linux-i686"; sha256 = "8910a680bc6a6e58433686a020916b072e0d5d95e896cb7fa5a212c00ee20b93"; }
+    { locale = "ta"; arch = "linux-x86_64"; sha256 = "ae727422e4b7cb2de2b098f6b4adedb2dc788b57eda7ec2ee7ac2d60b645ee64"; }
+    { locale = "te"; arch = "linux-i686"; sha256 = "0088dcb813864a4e231afd10d4aefca656131a3589b316721e2d87cb29a78dbf"; }
+    { locale = "te"; arch = "linux-x86_64"; sha256 = "6ef6aa557e691324072d201ad7876dd4d2417dfaaab08d3bfa4620c4626d1380"; }
+    { locale = "th"; arch = "linux-i686"; sha256 = "da72450d756950635c0b2d95285b5d998aeddd60b43d9ca98ac4b1b707289a96"; }
+    { locale = "th"; arch = "linux-x86_64"; sha256 = "89ac8220a7be503ecae8dd5a241df4654b93adfac6f431f08b83bb5f7f63de7f"; }
+    { locale = "tr"; arch = "linux-i686"; sha256 = "64b3e853efe96d75282e0a9ca78db876c3f03b609be0acb551d1d6a7b50e116b"; }
+    { locale = "tr"; arch = "linux-x86_64"; sha256 = "fe01dcbfe855e661c79ec63c80098d18c1a051c85fc3fb27ac3df8b9c6d1df92"; }
+    { locale = "uk"; arch = "linux-i686"; sha256 = "1052bb8de8acd200dfed598f5afc1c87a55772b89b2f2ec59b710af1d1bfea90"; }
+    { locale = "uk"; arch = "linux-x86_64"; sha256 = "986d01b61e36188f1293ee7ab1198f2583605469174e2dd9ead8eec241480cec"; }
+    { locale = "uz"; arch = "linux-i686"; sha256 = "b114d4696cf20320ec71c7ff92ac2d6477784e4f0c9f15a54701473a469e4667"; }
+    { locale = "uz"; arch = "linux-x86_64"; sha256 = "19fdc20d1b6a5b556856ad4d43d05cd7ae4bbd0207d326c9f2b0a4a0e3f9425b"; }
+    { locale = "vi"; arch = "linux-i686"; sha256 = "ec48f6eb7b3fba76d07a4ff4192fe28b4faeaf7dfa2317453f1266dd4cb5e66f"; }
+    { locale = "vi"; arch = "linux-x86_64"; sha256 = "89a9c826522dece360abc207260b6a71955d1c86f8f0b783e3013d4c7d5edfdb"; }
+    { locale = "xh"; arch = "linux-i686"; sha256 = "4671201bd924bfb4e290bdd5247b5d972b2dff986db0dd21b26ee0d30f94566f"; }
+    { locale = "xh"; arch = "linux-x86_64"; sha256 = "f381cc509369405e7a06c78c07de3ee01f8b0cf66d3300cfb10f27cab14d34b0"; }
+    { locale = "zh-CN"; arch = "linux-i686"; sha256 = "abaac014c04bd29dcb5617c489d4b047522f6ede9139781b04c0a73ff20a19a4"; }
+    { locale = "zh-CN"; arch = "linux-x86_64"; sha256 = "5da12cc28e6bad8739a0050410efb1ca22d46a42c33fed312acca29e89de007b"; }
+    { locale = "zh-TW"; arch = "linux-i686"; sha256 = "7279f9ba36dfa988ffade1f54e4f2dcced30be5fab48476d5b6d20d989204274"; }
+    { locale = "zh-TW"; arch = "linux-x86_64"; sha256 = "e943d7736ec12d269512363d20d5b2a2e8c740c81a764f44f308d497fe95f0ea"; }
   ];
 }
diff --git a/pkgs/applications/networking/browsers/firefox/default.nix b/pkgs/applications/networking/browsers/firefox/default.nix
index 552c8d4d822..7493350b28f 100644
--- a/pkgs/applications/networking/browsers/firefox/default.nix
+++ b/pkgs/applications/networking/browsers/firefox/default.nix
@@ -18,14 +18,14 @@ assert stdenv.cc ? libc && stdenv.cc.libc != null;
 
 let
 
-common = { pname, version, sha256 }: stdenv.mkDerivation rec {
+common = { pname, version, sha512 }: stdenv.mkDerivation rec {
   name = "${pname}-unwrapped-${version}";
 
   src = fetchurl {
     url =
       let ext = if lib.versionAtLeast version "41.0" then "xz" else "bz2";
       in "http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${version}/source/firefox-${version}.source.tar.${ext}";
-    inherit sha256;
+    inherit sha512;
   };
 
   buildInputs =
@@ -130,14 +130,14 @@ in {
 
   firefox-unwrapped = common {
     pname = "firefox";
-    version = "45.0.1";
-    sha256 = "1j6raz51zcj2hxk0spk5zq8xzxi5nlxxm60dpnb7cs6dv334m0fi";
+    version = "45.0.2";
+    sha512 = "8c0b7afb41a1a405fe499299d1a8b1138dac52b9ad67bfc8761b70a26f330581c2aa1d76d67075896ec3a0c3f5367b8b58365ebc8b3a01f801fa37071b3de526";
   };
 
   firefox-esr-unwrapped = common {
     pname = "firefox-esr";
-    version = "45.0.1esr";
-    sha256 = "0rkk3cr3r7v5xzbcqhyx8b633v4a16ika0wk46p0ichh9n5mci0s";
+    version = "45.0.2esr";
+    sha512 = "a1e9e9371ee47181b01252d60166c405a7835063dffb4928dfb8abb9f151edd8db1dd2b59f35d7898f1660a0fcd8e41f91a3e799c25b6dd43b6ab056bc5ad6bf";
   };
 
 }
diff --git a/pkgs/applications/networking/browsers/google-chrome/default.nix b/pkgs/applications/networking/browsers/google-chrome/default.nix
index eb51fa5c102..77f0d1693da 100644
--- a/pkgs/applications/networking/browsers/google-chrome/default.nix
+++ b/pkgs/applications/networking/browsers/google-chrome/default.nix
@@ -7,7 +7,7 @@
 , dbus_libs, gtk, gdk_pixbuf, gcc
 
 # Will crash without.
-, udev
+, libudev
 
 # Loaded at runtime.
 , libexif
@@ -39,21 +39,18 @@ let
     withCustomModes = true;
   };
 
-  env = buildEnv {
-    name = "google-chrome-env";
-    paths = [
-      glib fontconfig freetype pango cairo libX11 libXi atk gconf nss nspr
-      libXcursor libXext libXfixes libXrender libXScrnSaver libXcomposite
-      alsaLib libXdamage libXtst libXrandr expat cups
-      dbus_libs gtk gdk_pixbuf gcc
-      udev
-      libexif
-      liberation_ttf curl utillinux xdg_utils wget
-      flac harfbuzz icu libpng opusWithCustomModes snappy speechd
-      bzip2 libcap
-    ]
-    ++ optional pulseSupport libpulseaudio;
-  };
+  deps = [
+    stdenv.cc.cc
+    glib fontconfig freetype pango cairo libX11 libXi atk gconf nss nspr
+    libXcursor libXext libXfixes libXrender libXScrnSaver libXcomposite
+    alsaLib libXdamage libXtst libXrandr expat cups
+    dbus_libs gtk gdk_pixbuf gcc
+    libudev
+    libexif
+    liberation_ttf curl utillinux xdg_utils wget
+    flac harfbuzz icu libpng opusWithCustomModes snappy speechd
+    bzip2 libcap
+  ] ++ optional pulseSupport libpulseaudio;
 in stdenv.mkDerivation rec {
   inherit version;
 
@@ -61,13 +58,16 @@ in stdenv.mkDerivation rec {
 
   src = binary;
 
-  buildInputs = [ env patchelf ];
+  buildInputs = [ patchelf ];
 
   unpackPhase = ''
     ar x $src
     tar xf data.tar.xz
   '';
 
+  rpath = makeLibraryPath deps + ":" + makeSearchPathOutputs "lib64" ["lib"] deps;
+  binpath = makeBinPath deps;
+
   installPhase = ''
     case ${channel} in
       beta) appname=chrome-beta      dist=beta     ;;
@@ -76,7 +76,6 @@ in stdenv.mkDerivation rec {
     esac
 
     exe=$out/bin/google-chrome-$dist
-    rpath="${env}/lib:${env}/lib64"
 
     mkdir -p $out/bin $out/share
 
@@ -103,7 +102,7 @@ in stdenv.mkDerivation rec {
     cat > $exe << EOF
     #!${bash}/bin/sh
     export LD_LIBRARY_PATH=$rpath\''${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}
-    export PATH=${env}/bin\''${PATH:+:\$PATH}
+    export PATH=$binpath\''${PATH:+:\$PATH}
     $out/share/google/$appname/google-$appname "\$@"
     EOF
     chmod +x $exe
diff --git a/pkgs/applications/networking/browsers/jumanji/default.nix b/pkgs/applications/networking/browsers/jumanji/default.nix
index 0e962f5fc1f..ce9b9440907 100644
--- a/pkgs/applications/networking/browsers/jumanji/default.nix
+++ b/pkgs/applications/networking/browsers/jumanji/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
 
   preFixup=''
     wrapProgram "$out/bin/jumanji" \
-     --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
+     --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \
      --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
   '';
 
diff --git a/pkgs/applications/networking/browsers/luakit/default.nix b/pkgs/applications/networking/browsers/luakit/default.nix
index a3edaad37d4..2777cb15fca 100644
--- a/pkgs/applications/networking/browsers/luakit/default.nix
+++ b/pkgs/applications/networking/browsers/luakit/default.nix
@@ -45,7 +45,7 @@ stdenv.mkDerivation {
   in ''
     make DEVELOPMENT_PATHS=0 INSTALLDIR=$out DESTDIR=$out PREFIX=$out USE_GTK3=1 install
     wrapProgram $out/bin/luakit                                         \
-      --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
+      --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \
       --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/usr/share/:$out/share/:$GSETTINGS_SCHEMAS_PATH"     \
       --prefix XDG_CONFIG_DIRS : "$out/etc/xdg"                         \
       --set LUA_PATH '"${luaKitPath};${luaPath};"'                      \
diff --git a/pkgs/applications/networking/browsers/midori/default.nix b/pkgs/applications/networking/browsers/midori/default.nix
index 9eaf254b23b..23ed0bc2c1e 100644
--- a/pkgs/applications/networking/browsers/midori/default.nix
+++ b/pkgs/applications/networking/browsers/midori/default.nix
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
 
   preFixup = ''
     wrapProgram $out/bin/midori \
-      --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
+      --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \
       --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
   '';
 }
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
index 2b6b0d5b412..d1a00f1bd04 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
@@ -36,6 +36,13 @@
 
 }:
 
+/* When updating this package, test that the following derivations build:
+
+   * flashplayer
+   * flashplayer-standalone
+   * flashplayer-standalone-debugger
+*/
+
 let
   arch =
     if      stdenv.system == "x86_64-linux" then
@@ -49,66 +56,59 @@ let
   suffix =
     if      stdenv.system == "x86_64-linux" then
       if    debug then throw "no x86_64 debugging version available"
-      else             "-release.x86_64"
+      else             "_linux.x86_64"
     else if stdenv.system == "i686-linux"   then
       if    debug then "_linux_debug.i386"
       else             "_linux.i386"
     else throw "Flash Player is not supported on this platform";
 
+  saname =
+    if debug then "flashplayerdebugger"
+    else          "flashplayer";
+
   is-i686 = (stdenv.system == "i686-linux");
 in
 stdenv.mkDerivation rec {
   name = "flashplayer-${version}";
-  version = "11.2.202.577";
+  version = "11.2.202.616";
 
   src = fetchurl {
     url = "https://fpdownload.macromedia.com/pub/flashplayer/installers/archive/fp_${version}_archive.zip";
-    sha256 = "1k02d6c9y8z9lxyqyq04zsc5735cvm30mkwli71mh87fr1va2q4j";
+    sha256 = "0y4bjkla6ils4crmx61pi31s4gscy8rgiv7xccx1z0g6hba9j73l";
   };
 
-  buildInputs = [ unzip ];
+  nativeBuildInputs = [ unzip ];
+
+  sourceRoot = ".";
 
   postUnpack = ''
-    pushd $sourceRoot
-    tar -xvzf *${arch}/*${suffix}.tar.gz
+    cd *${arch}
 
-    ${ lib.optionalString is-i686 ''
-       tar -xvzf */*_sa.*.tar.gz
-       tar -xvzf */*_sa_debug.*.tar.gz
-    ''}
+    tar -xvzf *${suffix}.tar.gz
 
-    popd
+    ${lib.optionalString is-i686 ''
+       tar -xvzf *_sa[_.]*.tar.gz
+    ''}
   '';
 
-  sourceRoot = "fp_${version}_archive";
-
   dontStrip = true;
   dontPatchELF = true;
 
-  outputs = [ "out" ] ++ lib.optionals is-i686 ["sa" "saDbg" ];
+  outputs = [ "out" ] ++ lib.optional is-i686 "sa";
 
   installPhase = ''
     mkdir -p $out/lib/mozilla/plugins
     cp -pv libflashplayer.so $out/lib/mozilla/plugins
-    patchelf --set-rpath "$rpath" $out/lib/mozilla/plugins/libflashplayer.so
-
-    ${ lib.optionalString is-i686 ''
-       mkdir -p $sa/bin
-       cp flashplayer $sa/bin/
-
-       patchelf \
-         --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
-         --set-rpath "$rpath" \
-         $sa/bin/flashplayer
 
+    patchelf --set-rpath "$rpath" $out/lib/mozilla/plugins/libflashplayer.so
 
-       mkdir -p $saDbg/bin
-       cp flashplayerdebugger $saDbg/bin/
+    ${lib.optionalString is-i686 ''
+      install -Dm755 ${saname} $sa/bin/flashplayer
 
-       patchelf \
-         --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
-         --set-rpath "$rpath" \
-         $saDbg/bin/flashplayerdebugger
+      patchelf \
+        --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+        --set-rpath "$rpath" \
+        $sa/bin/flashplayer
     ''}
   '';
 
@@ -116,7 +116,7 @@ stdenv.mkDerivation rec {
     mozillaPlugin = "/lib/mozilla/plugins";
   };
 
-  rpath = stdenv.lib.makeLibraryPath
+  rpath = lib.makeLibraryPath
     [ zlib alsaLib curl nspr fontconfig freetype expat libX11
       libXext libXrender libXcursor libXt gtk glib pango atk cairo gdk_pixbuf
       libvdpau nss
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix
index ba40925e1d1..f59de7db9f5 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   # !!! fix this
   preBuild =
     ''
-      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${browser}/include/xulrunner-*) -I${browser.nspr}/include/nspr"
+      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${browser}/include/xulrunner-*) -I${browser.nspr.dev}/include/nspr"
       echo $NIX_CFLAGS_COMPILE
     '';
 
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix
index 6fd953636a8..f35e88ae89e 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, rpm, cpio, mesa, xorg, cairo
 , libpng, gtk, glib, gdk_pixbuf, fontconfig, freetype, curl
-, dbus_glib, alsaLib, libpulseaudio, udev, pango
+, dbus_glib, alsaLib, libpulseaudio, libudev, pango
 }:
 
 with stdenv.lib;
@@ -36,7 +36,7 @@ let
       alsaLib
       libpulseaudio
       dbus_glib
-      udev
+      libudev
       curl
       pango
       cairo
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/nspluginwrapper/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/nspluginwrapper/default.nix
index 51511621dce..85012f8f709 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/nspluginwrapper/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/nspluginwrapper/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, which, pkgconfig, file, glib, gtk2, gtk3, curl}:
+{stdenv, fetchurl, which, pkgconfig, file, glib, gtk2, gtk3, curl, libXt}:
 let
   srcData = # Generated upstream information 
   rec {
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
     export configureFlags="$configureFlags --target-cpu=$(uname -m)"
   '';
 
-  buildInputs = [which pkgconfig file glib gtk2 gtk3 curl];
+  buildInputs = [which pkgconfig file glib gtk2 gtk3 curl libXt];
 
   preferLocalBuild = true;
 
diff --git a/pkgs/applications/networking/browsers/opera/default.nix b/pkgs/applications/networking/browsers/opera/default.nix
index ab199ff97cd..325e855ec72 100644
--- a/pkgs/applications/networking/browsers/opera/default.nix
+++ b/pkgs/applications/networking/browsers/opera/default.nix
@@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
 
   libPath = stdenv.lib.makeLibraryPath buildInputs
     + stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
-      (":" + stdenv.lib.makeSearchPath "lib64" buildInputs);
+      (":" + stdenv.lib.makeSearchPathOutputs "lib64" ["lib"] buildInputs);
 
   preFixup =
     ''
@@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
 
   postFixup = ''
     oldRPATH=`patchelf --print-rpath $out/lib/opera/opera`
-    patchelf --set-rpath $oldRPATH:${cups}/lib $out/lib/opera/opera
+    patchelf --set-rpath $oldRPATH:${cups.out}/lib $out/lib/opera/opera
 
     # This file should normally require a gtk-update-icon-cache -q /usr/share/icons/hicolor command
     # It have no reasons to exist in a redistribuable package
diff --git a/pkgs/applications/networking/browsers/qutebrowser/default.nix b/pkgs/applications/networking/browsers/qutebrowser/default.nix
index 1be28829e35..93aff9498df 100644
--- a/pkgs/applications/networking/browsers/qutebrowser/default.nix
+++ b/pkgs/applications/networking/browsers/qutebrowser/default.nix
@@ -2,7 +2,7 @@
 , jinja2, pygments, pyyaml, pypeg2, gst-plugins-base, gst-plugins-good
 , gst-plugins-bad, gst-libav, wrapGAppsHook, glib_networking }:
 
-let version = "0.5.1"; in
+let version = "0.6.1"; in
 
 buildPythonApplication rec {
   name = "qutebrowser-${version}";
@@ -10,7 +10,7 @@ buildPythonApplication rec {
 
   src = fetchurl {
     url = "https://github.com/The-Compiler/qutebrowser/releases/download/v${version}/${name}.tar.gz";
-    sha256 = "1pxgap04rv94kgcp9a05xx2kwg3j6jv8f6d3ww7hqs2xnkj8wzqb";
+    sha256 = "1xb95yjc390h7f75l1jk252qiwcamgz2bls2978mmjkhf5hm3jm0";
   };
 
   # Needs tox
diff --git a/pkgs/applications/networking/browsers/surf/default.nix b/pkgs/applications/networking/browsers/surf/default.nix
index 7bbe84847f2..fcaaec63b9e 100644
--- a/pkgs/applications/networking/browsers/surf/default.nix
+++ b/pkgs/applications/networking/browsers/surf/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
 
   preFixup = ''
     wrapProgram "$out/bin/surf" \
-      --prefix GIO_EXTRA_MODULES : ${glib_networking}/lib/gio/modules \
+      --prefix GIO_EXTRA_MODULES : ${glib_networking.out}/lib/gio/modules \
       --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
   '';
 
diff --git a/pkgs/applications/networking/browsers/uzbl/default.nix b/pkgs/applications/networking/browsers/uzbl/default.nix
index 9e3b44f4083..0fb0db99891 100644
--- a/pkgs/applications/networking/browsers/uzbl/default.nix
+++ b/pkgs/applications/networking/browsers/uzbl/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
   preFixup = ''
     for f in $out/bin/*; do
       wrapProgram $f \
-        --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
+        --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \
         --prefix PYTHONPATH : "$PYTHONPATH" \
         --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
     done
diff --git a/pkgs/applications/networking/browsers/vimb/default.nix b/pkgs/applications/networking/browsers/vimb/default.nix
index cfbaa908902..ddaaa68f60d 100644
--- a/pkgs/applications/networking/browsers/vimb/default.nix
+++ b/pkgs/applications/networking/browsers/vimb/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
 
   preFixup = ''
     wrapProgram "$out/bin/vimb" \
-      --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
+      --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \
       --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
   '';
 
diff --git a/pkgs/applications/networking/browsers/vimprobable2/default.nix b/pkgs/applications/networking/browsers/vimprobable2/default.nix
index 2415c06dba4..e2d5061b92e 100644
--- a/pkgs/applications/networking/browsers/vimprobable2/default.nix
+++ b/pkgs/applications/networking/browsers/vimprobable2/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
 
   preFixup = ''
     wrapProgram "$out/bin/vimprobable2" \
-      --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
+      --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \
       --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
   '';
 
diff --git a/pkgs/applications/networking/browsers/vivaldi/default.nix b/pkgs/applications/networking/browsers/vivaldi/default.nix
new file mode 100644
index 00000000000..7c3c167cf32
--- /dev/null
+++ b/pkgs/applications/networking/browsers/vivaldi/default.nix
@@ -0,0 +1,77 @@
+{ stdenv, fetchurl, zlib, libX11, libXext, libSM, libICE
+, libXfixes, libXt, libXi, libXcursor, libXScrnSaver, libXcomposite, libXdamage, libXtst, libXrandr
+, alsaLib, dbus_libs, cups, libexif, ffmpeg, libudev
+, freetype, fontconfig, libXft, libXrender, libxcb, expat, libXau, libXdmcp
+, libuuid, xz
+, gstreamer, gst_plugins_base, libxml2
+, glib, gtk, pango, gdk_pixbuf, cairo, atk, gnome3
+, nss, nspr
+, patchelf
+}:
+
+let
+  archUrl = name: arch: "https://vivaldi.com/download/stable/${name}_${arch}.deb";
+in
+stdenv.mkDerivation rec {
+  version    = "1.0";
+  debversion = "stable_1.0.435.40-1";
+  product    = "vivaldi";
+  name       = "${product}-${version}";
+
+  src = if stdenv.system == "x86_64-linux"
+    then fetchurl {
+      url    = archUrl "vivaldi-${debversion}" "amd64";
+      sha256 = "12c051a40258a95f9594eed2f73fa5f591482ac2a41d5cf643811b1ea2a1efbf";
+    }
+    else if stdenv.system == "i686-linux"
+    then fetchurl {
+      url    = archUrl "vivaldi-${debversion}" "i386";
+      sha256 = "6e0b84fba38211bab9a71bc10e97398fca77c0acd82791923c1d432b20846f0f";
+    }
+    else throw "Vivaldi is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)";
+
+  unpackPhase = ''
+    ar vx ${src}
+    tar -xvf data.tar.xz
+  '';
+
+  buildInputs =
+    [ stdenv.cc.cc stdenv.cc.libc zlib libX11 libXt libXext libSM libICE
+      libXi libXft libXcursor libXfixes libXScrnSaver libXcomposite libXdamage libXtst libXrandr
+      atk alsaLib dbus_libs cups gtk gdk_pixbuf libexif ffmpeg libudev
+      freetype fontconfig libXrender libuuid expat glib nss nspr
+      gstreamer libxml2 gst_plugins_base pango cairo gnome3.gconf 
+      patchelf
+    ];
+
+  libPath = stdenv.lib.makeLibraryPath buildInputs
+    + stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
+      (":" + stdenv.lib.makeSearchPathOutputs "lib64" ["lib"] buildInputs);
+
+  buildPhase = ''
+    echo "Patching Vivaldi binaries"
+    patchelf \
+      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      --set-rpath "${libPath}" \
+    opt/vivaldi/vivaldi-bin
+    echo "Finished patching Vivaldi binaries"
+  '';
+
+  dontPatchELF = true;
+  dontStrip    = true;
+
+  installPhase = ''
+    mkdir -p "$out"
+    cp -r opt "$out"
+    mkdir "$out/bin"
+    ln -s "$out/opt/vivaldi/vivaldi" "$out/bin/vivaldi"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A Browser for our Friends, powerful and personal";
+    homepage    = "https://vivaldi.com";
+    license     = licenses.unfree;
+    maintainers = with maintainers; [ otwieracz ];
+    platforms   = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/networking/copy-com/default.nix b/pkgs/applications/networking/copy-com/default.nix
index 0ec2f5ac87a..21dc2373977 100644
--- a/pkgs/applications/networking/copy-com/default.nix
+++ b/pkgs/applications/networking/copy-com/default.nix
@@ -41,7 +41,7 @@ in stdenv.mkDerivation {
     for binary in Copy{Agent,Console,Cmd}; do
       binary="$out/${appdir}/$binary"
       ln -sv "$binary" "$out/bin"
-      patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} "$binary"
+      patchelf --set-interpreter ${stdenv.glibc.out}/lib/${interpreter} "$binary"
     done
 
     RPATH=${libPaths}:$out/${appdir}
diff --git a/pkgs/applications/networking/dropbox-cli/default.nix b/pkgs/applications/networking/dropbox-cli/default.nix
index ab79159ea6e..892d8fa3300 100644
--- a/pkgs/applications/networking/dropbox-cli/default.nix
+++ b/pkgs/applications/networking/dropbox-cli/default.nix
@@ -16,7 +16,8 @@ stdenv.mkDerivation {
   phases = "unpackPhase installPhase";
 
   installPhase = ''
-    mkdir -p "$out/bin/"
+    mkdir -p "$out/bin/" "$out/share/applications"
+    cp data/dropbox.desktop "$out/share/applications"
     substitute "dropbox.in" "$out/bin/dropbox" \
       --replace '@PACKAGE_VERSION@' ${version} \
       --replace '@DESKTOP_FILE_DIR@' "$out/share/applications" \
@@ -24,7 +25,6 @@ stdenv.mkDerivation {
       --replace '@IMAGEDATA64@' '"too-lazy-to-fix"'
     sed -i 's:db_path = .*:db_path = "${dropboxd}":' $out/bin/dropbox
     chmod +x "$out/bin/"*
-    mv $out/bin/dropbox $out/bin/dropbox-cli
     patchShebangs "$out/bin"
   '';
 
diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix
index a180e2a01ed..d27a6a7b849 100644
--- a/pkgs/applications/networking/dropbox/default.nix
+++ b/pkgs/applications/networking/dropbox/default.nix
@@ -20,11 +20,11 @@
 
 let
   # NOTE: When updating, please also update in current stable, as older versions stop working
-  version = "3.14.7";
+  version = "3.18.1";
   sha256 =
     {
-      "x86_64-linux" = "1pwmghpr0kyca2biysyk90kk9k6ffv4i95vs5rq96vc0zbckws6n";
-      "i686-linux" = "08yqrxh09cfd80kbiq1f2sirx9s85acij4khpklvvwrnf2x1i1zm";
+      "x86_64-linux" = "1qdahr8xzk3zrrv89335l3aa2gfgjn1ymfixj9zgipv34grkjghm";
+      "i686-linux" = "015bjkr2dwyac410i398qm1v60rqln539wcj5f25q776haycbcji";
     }."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
 
   arch =
@@ -36,7 +36,7 @@ let
   # relative location where the dropbox libraries are stored
   appdir = "opt/dropbox";
 
-  ldpath = stdenv.lib.makeSearchPath "lib"
+  ldpath = stdenv.lib.makeLibraryPath
     [
       dbus_libs gcc.cc glib libdrm libffi libICE libSM libX11 libXmu
       ncurses popt qtbase qtdeclarative qtwebkit zlib
diff --git a/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix
index a254535dd70..99196cdf796 100644
--- a/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix
+++ b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   '';
 
   NIX_CFLAGS_COMPILE =
-    "-I${libxml2}/include/libxml2 -I${json-c-0-11}/include/json-c";
+    "-I${libxml2.dev}/include/libxml2 -I${json-c-0-11}/include/json-c";
 
   NIX_LDFLAGS = "-lsqlite3 -lcurl -lxml2 -lstfl -ljson";
 
diff --git a/pkgs/applications/networking/ike/default.nix b/pkgs/applications/networking/ike/default.nix
index 56341b64d6c..5ea0975e15f 100644
--- a/pkgs/applications/networking/ike/default.nix
+++ b/pkgs/applications/networking/ike/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
   installPhase = ''
     make install
     for file in "$out"/bin/* "$out"/sbin/*; do
-        wrapProgram $file --prefix LD_LIBRARY_PATH ":" "$out/lib:${openssl}/lib:${gcc.cc}/lib:${stdenv.glibc}/lib::${gcc.cc}/lib64:${stdenv.glibc}/lib64:${libedit}/lib:${qt4}/lib"
+        wrapProgram $file --prefix LD_LIBRARY_PATH ":" "$out/lib:${openssl.out}/lib:${gcc.cc}/lib:${stdenv.glibc.out}/lib::${gcc.cc}/lib64:${stdenv.glibc.out}/lib64:${libedit}/lib:${qt4}/lib"
     done
   '';
 
diff --git a/pkgs/applications/networking/instant-messengers/baresip/default.nix b/pkgs/applications/networking/instant-messengers/baresip/default.nix
index 2935979ebb9..782c801356e 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.17";
+  version = "0.4.18";
   name = "baresip-${version}";
   src=fetchurl {
     url = "http://www.creytiv.com/pub/baresip-${version}.tar.gz";
-    sha256 = "106nagdyayyxj3q68bs3fsps5wnwzjh82vcmy98fp42j33q6yzny";
+    sha256 = "1qgmw0261y89zka9dgqzvirfk3bg8p5b929vqm1418859mw9i87a";
   };
   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/blink/default.nix b/pkgs/applications/networking/instant-messengers/blink/default.nix
index 8076b27d1c5..d2a08b98c07 100644
--- a/pkgs/applications/networking/instant-messengers/blink/default.nix
+++ b/pkgs/applications/networking/instant-messengers/blink/default.nix
@@ -32,7 +32,7 @@ pythonPackages.buildPythonApplication rec {
 
   postInstall = ''
     wrapProgram $out/bin/blink \
-      --prefix LD_LIBRARY_PATH ":" ${gnutls}/lib
+      --prefix LD_LIBRARY_PATH ":" ${gnutls.out}/lib
     mkdir -p "$out/share/applications"
     mkdir -p "$out/share/pixmaps"
     cp "$desktopItem"/share/applications/* "$out/share/applications"
diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix
index a072c4a5d76..86b21f90ad9 100644
--- a/pkgs/applications/networking/instant-messengers/discord/default.nix
+++ b/pkgs/applications/networking/instant-messengers/discord/default.nix
@@ -2,7 +2,7 @@
 , alsaLib, atk, cairo, cups, dbus, expat, fontconfig, freetype, gdk_pixbuf
 , glib, gnome, gtk, libnotify, libX11, libXcomposite, libXcursor, libXdamage
 , libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, nspr, nss, pango
-, udev }:
+, libudev }:
 
 let version = "0.0.1"; in
 
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
         stdenv.cc.cc alsaLib atk cairo cups dbus expat fontconfig freetype
         gdk_pixbuf glib gnome.GConf gtk libnotify libX11 libXcomposite
         libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender
-        libXtst nspr nss pango udev
+        libXtst nspr nss pango libudev
      ];
 
     installPhase = ''
@@ -35,7 +35,7 @@ stdenv.mkDerivation {
         ln -s $out/DiscordCanary $out/bin/
 
         # Putting udev in the path won't work :(
-        ln -s ${udev}/lib/libudev.so.1 $out
+        ln -s ${libudev}/lib/libudev.so.1 $out
         '';
 
     meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/instant-messengers/hipchat/default.nix b/pkgs/applications/networking/instant-messengers/hipchat/default.nix
index 6449c9d3d1a..b57b3394eea 100644
--- a/pkgs/applications/networking/instant-messengers/hipchat/default.nix
+++ b/pkgs/applications/networking/instant-messengers/hipchat/default.nix
@@ -6,7 +6,7 @@ let
 
   version = "4.0.1631";
 
-  rpath = stdenv.lib.makeSearchPath "lib" [
+  rpath = stdenv.lib.makeLibraryPath [
     xorg.libXext
     xorg.libSM
     xorg.libICE
diff --git a/pkgs/applications/networking/instant-messengers/oneteam/default.nix b/pkgs/applications/networking/instant-messengers/oneteam/default.nix
index 2ab0930842b..bec367818e2 100644
--- a/pkgs/applications/networking/instant-messengers/oneteam/default.nix
+++ b/pkgs/applications/networking/instant-messengers/oneteam/default.nix
@@ -43,7 +43,7 @@ rec {
   '' ["minInit" "doUnpack"];
 
   setVars=a.noDepEntry ''
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr}/include/nspr"
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr"
   '';
 
   cmakeBuildDir="cmake-build";
diff --git a/pkgs/applications/networking/instant-messengers/pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/default.nix
index 7e9e41ea0bf..e7266a93350 100644
--- a/pkgs/applications/networking/instant-messengers/pidgin/default.nix
+++ b/pkgs/applications/networking/instant-messengers/pidgin/default.nix
@@ -43,11 +43,11 @@ stdenv.mkDerivation rec {
   patches = [./pidgin-makefile.patch ./add-search-path.patch ];
 
   configureFlags = [
-    "--with-nspr-includes=${nspr}/include/nspr"
-    "--with-nspr-libs=${nspr}/lib"
-    "--with-nss-includes=${nss}/include/nss"
-    "--with-nss-libs=${nss}/lib"
-    "--with-ncurses-headers=${ncurses}/include"
+    "--with-nspr-includes=${nspr.dev}/include/nspr"
+    "--with-nspr-libs=${nspr.out}/lib"
+    "--with-nss-includes=${nss.dev}/include/nss"
+    "--with-nss-libs=${nss.out}/lib"
+    "--with-ncurses-headers=${ncurses.dev}/include"
     "--disable-meanwhile"
     "--disable-nm"
     "--disable-tcl"
diff --git a/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix b/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix
index c19b5ff31f9..17462cb75ad 100644
--- a/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix
+++ b/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
   postInstall = ''
     substituteInPlace $out/bin/pybitmessage \
       --replace "exec python2" "exec ${python}/bin/python" \
-      --replace "/opt/openssl-compat-bitcoin/lib/" "${openssl}/lib/"
+      --replace "/opt/openssl-compat-bitcoin/lib/" "${openssl.out}/lib/"
     wrapProgram $out/bin/pybitmessage \
       --prefix PYTHONPATH : "$(toPythonPath $out):$PYTHONPATH"
   '';
diff --git a/pkgs/applications/networking/instant-messengers/sflphone/default.nix b/pkgs/applications/networking/instant-messengers/sflphone/default.nix
index 8b259c90fe5..7322ff2bb34 100644
--- a/pkgs/applications/networking/instant-messengers/sflphone/default.nix
+++ b/pkgs/applications/networking/instant-messengers/sflphone/default.nix
@@ -40,7 +40,7 @@ rec {
       cd ..
     '';
 
-    configureFlags = "--with-expat --with-expat-inc=${expat}/include " +
+    configureFlags = "--with-expat --with-expat-inc=${expat.dev}/include " +
       "--with-expat-lib=-lexpat --with-opus ";
 
     buildInputs = [ libyaml alsaLib openssl libuuid pkgconfig libpulseaudio libsamplerate
diff --git a/pkgs/applications/networking/instant-messengers/skype/default.nix b/pkgs/applications/networking/instant-messengers/skype/default.nix
index 98672a29d0b..2f2dba18e49 100644
--- a/pkgs/applications/networking/instant-messengers/skype/default.nix
+++ b/pkgs/applications/networking/instant-messengers/skype/default.nix
@@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
 
     # Fixup desktop file
     substituteInPlace skype.desktop --replace \
-      "Icon=skype.png" "Icon=$out/libexec/skype/icons/SkypeBlue_48x48.png"
+      "Icon=skype.png" "Icon=$out/libexec/skype/icons/SkypeBlue_128x128.png"
     substituteInPlace skype.desktop --replace \
       "Terminal=0" "Terminal=false"
     mkdir -p $out/share/applications
diff --git a/pkgs/applications/networking/instant-messengers/slack/default.nix b/pkgs/applications/networking/instant-messengers/slack/default.nix
index c6e550b5e8f..d0f0dd3149c 100644
--- a/pkgs/applications/networking/instant-messengers/slack/default.nix
+++ b/pkgs/applications/networking/instant-messengers/slack/default.nix
@@ -4,9 +4,9 @@
 
 let
 
-  version = "2.0.1";
+  version = "2.0.3";
 
-  rpath = stdenv.lib.makeSearchPath "lib" [
+  rpath = stdenv.lib.makeLibraryPath [
     alsaLib
     atk
     cairo
@@ -23,6 +23,7 @@ let
     libnotify
     nspr
     nss
+    stdenv.cc.cc
     systemd
 
     xorg.libX11
@@ -41,7 +42,7 @@ let
     if stdenv.system == "x86_64-linux" then
       fetchurl {
         url = "https://slack-ssb-updates.global.ssl.fastly.net/linux_releases/slack-desktop-${version}-amd64.deb";
-        sha256 = "12d84e61ba366cc5bac105b3f9930f2dfdd64c1e5fabbb08a6877e1c98bfb9c7";
+        sha256 = "0pp8n1w9kmh3pph5kc6akdswl3z2lqwryjg9d267wgj62mslr3cg";
       }
     else
       throw "Slack is not supported on ${stdenv.system}";
@@ -57,23 +58,24 @@ in stdenv.mkDerivation {
     mkdir -p $out
     dpkg -x $src $out
     cp -av $out/usr/* $out
-    rm -rf $out/usr
+    rm -rf $out/usr $out/share/lintian
 
     # Otherwise it looks "suspicious"
     chmod -R g-w $out
 
     for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
       patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
-      patchelf --set-rpath ${rpath}:$out/share/slack $file || true
+      patchelf --set-rpath ${rpath}:$out/lib/slack $file || true
     done
 
     # Fix the symlink
     rm $out/bin/slack
-    ln -s $out/share/slack/slack $out/bin/slack
+    ln -s $out/lib/slack/slack $out/bin/slack
 
     # Fix the desktop link
     substituteInPlace $out/share/applications/slack.desktop \
-      --replace /usr/share/slack/slack $out/share/slack/slack
+      --replace /usr/bin/ $out/bin/ \
+      --replace /usr/share/ $out/share/
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix b/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix
index 29a0f188516..07bfcf3a03e 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix
@@ -24,7 +24,11 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  configurePhase = "qmake -r PREFIX=$out";
+  configurePhase = ''
+    runHook preConfigure
+    qmake -r PREFIX=$out
+    runHook postConfigure
+  '';
 
   fixupPhase = ''
     wrapQtProgram $out/bin/cutegram \
diff --git a/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix b/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix
index 206b2a07476..470724876ed 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix
@@ -20,7 +20,9 @@ stdenv.mkDerivation rec {
   '';
 
   configurePhase = ''
+    runHook preConfigure
     qmake -r PREFIX=$out
+    runHook postConfigure
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
index 2422d180869..77a0d9ee0aa 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
@@ -48,10 +48,10 @@ in stdenv.mkDerivation rec {
     "DEFINES+=TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME"
     "INCLUDEPATH+=${gtk2}/include/gtk-2.0"
     "INCLUDEPATH+=${glib}/include/glib-2.0"
-    "INCLUDEPATH+=${glib}/lib/glib-2.0/include"
+    "INCLUDEPATH+=${glib.out}/lib/glib-2.0/include"
     "INCLUDEPATH+=${cairo}/include/cairo"
     "INCLUDEPATH+=${pango}/include/pango-1.0"
-    "INCLUDEPATH+=${gtk2}/lib/gtk-2.0/include"
+    "INCLUDEPATH+=${gtk2.out}/lib/gtk-2.0/include"
     "INCLUDEPATH+=${gdk_pixbuf}/include/gdk-pixbuf-2.0"
     "INCLUDEPATH+=${atk}/include/atk-1.0"
     "INCLUDEPATH+=${libappindicator-gtk2}/include/libappindicator-0.1"
diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix
index 372531f658e..5412b0db4d6 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix
@@ -21,7 +21,9 @@ stdenv.mkDerivation rec {
   '';
 
   configurePhase = ''
+    runHook preConfigure
     qmake -r PREFIX=$out BUILD_MODE+=lib
+    runHook postConfigure
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix b/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix
index 532d68ad660..84ced8f62c6 100644
--- a/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix
@@ -11,11 +11,11 @@ let
     call_ui = x : x // {
       NIX_CFLAGS_COMPILE =
         "-I${telepathy_glib}/include/telepathy-1.0"
-        + " -I${dbus_glib}/include/dbus-1.0"
-        + " -I${dbus_libs}/include/dbus-1.0";
+        + " -I${dbus_glib.dev}/include/dbus-1.0"
+        + " -I${dbus_libs.dev}/include/dbus-1.0";
     };
     telepathy_logger_qt = x : x // {
-      NIX_CFLAGS_COMPILE = "-I${dbus_libs}/include/dbus-1.0";
+      NIX_CFLAGS_COMPILE = "-I${dbus_libs.dev}/include/dbus-1.0";
     };
   };
 
diff --git a/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix b/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix
index 173dfe9c929..aaff39ccb44 100644
--- a/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "18i00l8lnp5dghqmgmpxnn0is2a20pkisxy0sb78hnd2dz0z6xnl";
   };
 
-  NIX_CFLAGS_COMPILE = "-I${dbus_glib}/include/dbus-1.0 -I${dbus_libs}/include/dbus-1.0";
+  NIX_CFLAGS_COMPILE = "-I${dbus_glib.dev}/include/dbus-1.0 -I${dbus_libs.dev}/include/dbus-1.0";
 
   buildInputs = [ dbus_glib libxml2 sqlite telepathy_glib pkgconfig intltool
                   gobjectIntrospection dbus_libs ];
diff --git a/pkgs/applications/networking/irc/communi/default.nix b/pkgs/applications/networking/irc/communi/default.nix
index 312fd8df908..4d2605acdc9 100644
--- a/pkgs/applications/networking/irc/communi/default.nix
+++ b/pkgs/applications/networking/irc/communi/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
   enableParallelBuild = true;
 
   configurePhase = ''
+    runHook preConfigure
     export QMAKEFEATURES=${libcommuni}/features
     qmake -r \
       COMMUNI_INSTALL_PREFIX=$out \
@@ -25,6 +26,7 @@ stdenv.mkDerivation rec {
       COMMUNI_INSTALL_ICONS=$out/share/icons/hicolor \
       COMMUNI_INSTALL_DESKTOP=$out/share/applications \
       COMMUNI_INSTALL_THEMES=$out/share/communi/themes
+    runHook postConfigure
   '';
 
   postInstall = ''
diff --git a/pkgs/applications/networking/irc/irssi/default.nix b/pkgs/applications/networking/irc/irssi/default.nix
index d6b57b6cb0d..a467cead17c 100644
--- a/pkgs/applications/networking/irc/irssi/default.nix
+++ b/pkgs/applications/networking/irc/irssi/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     homepage    = http://irssi.org;
+    description = "A terminal based IRC client";
     platforms   = stdenv.lib.platforms.unix;
     maintainers = with stdenv.lib.maintainers; [ lovek323 ];
   };
diff --git a/pkgs/applications/networking/irc/wraith/default.nix b/pkgs/applications/networking/irc/wraith/default.nix
new file mode 100644
index 00000000000..f36bbc00064
--- /dev/null
+++ b/pkgs/applications/networking/irc/wraith/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchurl, openssl }:
+
+with stdenv;
+with stdenv.lib;
+
+mkDerivation rec {
+  name = "wraith-${version}";
+  version = "1.4.6";
+  src = fetchurl {
+    url = "mirror://sourceforge/wraithbotpack/wraith-v${version}.tar.gz";
+    sha256 = "0vb2hbjmwh040f5yhxvwcfxvgxa0q9zdy9vvddydn8zn782d7wl8";
+  };
+  buildInputs = [ openssl ];
+  patches = [ ./dlopen.patch ];
+  postPatch = ''
+    substituteInPlace src/libssl.cc    --subst-var-by openssl ${openssl}
+    substituteInPlace src/libcrypto.cc --subst-var-by openssl ${openssl}
+  '';
+  configureFlags = "--with-openssl=${openssl}";
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -a wraith $out/bin/wraith
+    ln -s wraith $out/bin/hub
+  '';
+
+  meta = {
+    description = "An IRC channel management bot written purely in C/C++";
+    longDescription = ''
+      Wraith is an IRC channel management bot written purely in C/C++. It has
+      been in development since late 2003. It is based on Eggdrop 1.6.12 but has
+      since evolved into something much different at its core. TCL and loadable
+      modules are currently not supported.
+
+      Maintainer's Notes:
+      Copy the binary out of the store before running it with the -C option to
+      configure it. See https://github.com/wraith/wraith/wiki/GettingStarted .
+
+      The binary will not run when moved onto non-NixOS systems; use patchelf
+      to fix its runtime dependenices.
+    '';
+    homepage = http://wraith.botpack.net/;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ elitak ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/networking/irc/wraith/dlopen.patch b/pkgs/applications/networking/irc/wraith/dlopen.patch
new file mode 100644
index 00000000000..bfc854ef9e9
--- /dev/null
+++ b/pkgs/applications/networking/irc/wraith/dlopen.patch
@@ -0,0 +1,48 @@
+diff --git a/src/libcrypto.cc b/src/libcrypto.cc
+index 0339258..68746c8 100644
+--- a/src/libcrypto.cc
++++ b/src/libcrypto.cc
+@@ -95,17 +95,9 @@ int load_libcrypto() {
+   }
+ 
+   sdprintf("Loading libcrypto");
++  dlerror(); // Clear Errors
++  libcrypto_handle = dlopen("@openssl@/lib/libcrypto.so", RTLD_LAZY|RTLD_GLOBAL);
+ 
+-  bd::Array<bd::String> libs_list(bd::String("libcrypto.so." SHLIB_VERSION_NUMBER " libcrypto.so libcrypto.so.0.9.8 libcrypto.so.7 libcrypto.so.6").split(' '));
+-
+-  for (size_t i = 0; i < libs_list.length(); ++i) {
+-    dlerror(); // Clear Errors
+-    libcrypto_handle = dlopen(bd::String(libs_list[i]).c_str(), RTLD_LAZY|RTLD_GLOBAL);
+-    if (libcrypto_handle) {
+-      sdprintf("Found libcrypto: %s", bd::String(libs_list[i]).c_str());
+-      break;
+-    }
+-  }
+   if (!libcrypto_handle) {
+     fprintf(stderr, STR("Unable to find libcrypto\n"));
+     return(1);
+diff --git a/src/libssl.cc b/src/libssl.cc
+index b432c7b..8940998 100644
+--- a/src/libssl.cc
++++ b/src/libssl.cc
+@@ -68,17 +68,9 @@ int load_libssl() {
+   }
+ 
+   sdprintf("Loading libssl");
++  dlerror(); // Clear Errors
++  libssl_handle = dlopen("@openssl@/lib/libssl.so", RTLD_LAZY);
+ 
+-  bd::Array<bd::String> libs_list(bd::String("libssl.so." SHLIB_VERSION_NUMBER " libssl.so libssl.so.0.9.8 libssl.so.7 libssl.so.6").split(' '));
+-
+-  for (size_t i = 0; i < libs_list.length(); ++i) {
+-    dlerror(); // Clear Errors
+-    libssl_handle = dlopen(bd::String(libs_list[i]).c_str(), RTLD_LAZY);
+-    if (libssl_handle) {
+-      sdprintf("Found libssl: %s", bd::String(libs_list[i]).c_str());
+-      break;
+-    }
+-  }
+   if (!libssl_handle) {
+     fprintf(stderr, STR("Unable to find libssl\n"));
+     return(1);
diff --git a/pkgs/applications/networking/linssid/default.nix b/pkgs/applications/networking/linssid/default.nix
index 76de1d208cc..4cbc5c8c796 100644
--- a/pkgs/applications/networking/linssid/default.nix
+++ b/pkgs/applications/networking/linssid/default.nix
@@ -27,7 +27,11 @@ stdenv.mkDerivation rec {
     rm -fr qwt-lib
   '';
 
-  configurePhase = "qmake linssid.pro";
+  configurePhase = ''
+    runHook preConfigure
+    qmake linssid.pro
+    runHook postConfigure
+  '';
 
   meta = with stdenv.lib; {
     description = "Graphical wireless scanning for Linux";
diff --git a/pkgs/applications/networking/mailreaders/mailpile/default.nix b/pkgs/applications/networking/mailreaders/mailpile/default.nix
index 0ace6a01b3f..5936ae6e878 100644
--- a/pkgs/applications/networking/mailreaders/mailpile/default.nix
+++ b/pkgs/applications/networking/mailreaders/mailpile/default.nix
@@ -21,7 +21,7 @@ pythonPackages.buildPythonApplication rec {
 
   postInstall = ''
     wrapProgram $out/bin/mailpile \
-      --prefix PATH ":" "${gnupg1orig}/bin:${openssl}/bin"
+      --prefix PATH ":" "${gnupg1orig}/bin:${openssl.bin}/bin"
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/mailreaders/neomutt/default.nix b/pkgs/applications/networking/mailreaders/neomutt/default.nix
new file mode 100644
index 00000000000..f4718e1ee74
--- /dev/null
+++ b/pkgs/applications/networking/mailreaders/neomutt/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchFromGitHub, which, autoconf, automake, ncurses, perl
+, cyrus_sasl, gdbm, gpgme, kerberos, libidn, notmuch, openssl }:
+
+stdenv.mkDerivation rec {
+  version = "20160416";
+  name = "neomutt-${version}";
+
+  src = fetchFromGitHub {
+    owner = "neomutt";
+    repo = "neomutt";
+    rev = "neomutt-${version}";
+    sha256 = "1sgc77fyjcf859y896w208fw4rxd0bzhp0c7cp3vacb7lqr07ngb";
+  };
+
+  buildInputs =
+    [ autoconf automake cyrus_sasl gdbm gpgme kerberos libidn ncurses
+      notmuch which openssl perl ];
+
+  configureFlags = [
+    "--enable-debug"
+    "--enable-gpgme"
+    "--enable-hcache"
+    "--enable-imap"
+    "--enable-notmuch"
+    "--enable-pgp"
+    "--enable-pop"
+    "--enable-sidebar"
+    "--enable-smtp"
+    "--with-homespool=mailbox"
+    "--with-gss"
+    "--with-mailpath="
+    "--with-ssl"
+    "--with-sasl"
+    "--with-curses"
+    "--with-regex"
+    "--with-idn"
+
+    # Look in $PATH at runtime, instead of hardcoding /usr/bin/sendmail
+    "ac_cv_path_SENDMAIL=sendmail"
+  ];
+
+  configureScript = "./prepare";
+
+  meta = with stdenv.lib; {
+    description = "A small but very powerful text-based mail client";
+    homepage = http://www.neomutt.org;
+    license = stdenv.lib.licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ hiberno cstrahan ];
+  };
+}
diff --git a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
index 388fc418de1..bbb51c7c186 100644
--- a/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
+++ b/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
@@ -105,7 +105,7 @@ stdenv.mkDerivation {
       nspr
       nss
       pango
-    ] + ":" + stdenv.lib.makeSearchPath "lib64" [
+    ] + ":" + stdenv.lib.makeSearchPathOutputs "lib64" ["lib"] [
       stdenv.cc.cc
     ];
 
diff --git a/pkgs/applications/networking/mailreaders/thunderbird-bin/sources.nix b/pkgs/applications/networking/mailreaders/thunderbird-bin/sources.nix
index 781e2d27e55..936481472a9 100644
--- a/pkgs/applications/networking/mailreaders/thunderbird-bin/sources.nix
+++ b/pkgs/applications/networking/mailreaders/thunderbird-bin/sources.nix
@@ -4,123 +4,123 @@
 # ruby generate_sources.rb > sources.nix
 
 {
-  version = "38.7.2";
+  version = "45.0";
   sources = [
-    { locale = "ar"; arch = "linux-i686"; sha256 = "63cdb91df96bc132e0b9b6c702cdc82b9583a58be11863c76c0a1a04b689b1ed"; }
-    { locale = "ar"; arch = "linux-x86_64"; sha256 = "d1dc64cc1ca886b81da71e132b31644d89b8f61b4fab5f886c00b3b8defcd49a"; }
-    { locale = "ast"; arch = "linux-i686"; sha256 = "b71ee84b0e56d7dd9b4cb40032055c8c1f8b4c18e9d679d84b71c226c928a189"; }
-    { locale = "ast"; arch = "linux-x86_64"; sha256 = "dbb80209a669529b17553d152d5b3ccffbabd5c44b1e6a7e63a2d011e5425a2c"; }
-    { locale = "be"; arch = "linux-i686"; sha256 = "358cf7d9b9b13cbd5614daa4f140a412e777f2dffe0dfa2673b33582f59e02f9"; }
-    { locale = "be"; arch = "linux-x86_64"; sha256 = "bd4ac7afafcc4b4a65e34f207f7c07b24be36c06c8e067fb75f4a22ce759fb4b"; }
-    { locale = "bg"; arch = "linux-i686"; sha256 = "853629b5625f9dd9a81d5f18d862f0f527043435a7c4624f6f78fa68541a5bba"; }
-    { locale = "bg"; arch = "linux-x86_64"; sha256 = "8d094f3d934d2ca42c38b985145bec7f72b4ddb9af7c31e30413721eaecc934d"; }
-    { locale = "bn-BD"; arch = "linux-i686"; sha256 = "d569e6211c4c011955553f3480fd8530ba6dd853b227859f95b0d8af4d9e8c6e"; }
-    { locale = "bn-BD"; arch = "linux-x86_64"; sha256 = "5ed4e24f7725864b47dcbb0602463bc95bb33c8e4413483854e0bf3f33ad9376"; }
-    { locale = "br"; arch = "linux-i686"; sha256 = "683716f591654dfc843a32198d5bbf6199bccb1a035d391293c4877f0ec47b1c"; }
-    { locale = "br"; arch = "linux-x86_64"; sha256 = "965d58b4ea4280f20d197e28e0e9eb87b29fc955e4f6e15b6582027000d0da6f"; }
-    { locale = "ca"; arch = "linux-i686"; sha256 = "eadc1248c9352574dcfcdcb3264a662d3a29f85a2f112f77a843f76d8778cba2"; }
-    { locale = "ca"; arch = "linux-x86_64"; sha256 = "cdd631c4a32d529a85f04bee01bbc7f50396b183a0f154808e801d29f0f11aab"; }
-    { locale = "cs"; arch = "linux-i686"; sha256 = "093f01ad325ba33f3f33f2efd72fb5cf3a87dd81162b094dc544744af78f3705"; }
-    { locale = "cs"; arch = "linux-x86_64"; sha256 = "f74b39dfd0d9f2241ea65d55a6e9459296796adf228def80c57dd66c3f05921d"; }
-    { locale = "cy"; arch = "linux-i686"; sha256 = "f84113f32952ae91a35d2aa166f16c4683e03fa43ce6fbd911d0f7f237b22ee8"; }
-    { locale = "cy"; arch = "linux-x86_64"; sha256 = "6e53fd624a5c968e60cd485ea7c7b80a68c164c2f165287ec68a180066c560cb"; }
-    { locale = "da"; arch = "linux-i686"; sha256 = "ff1f79558185d2a29487d15f95140716603f5978e8fcd891206ea0c5697342a0"; }
-    { locale = "da"; arch = "linux-x86_64"; sha256 = "522c53748cc7ab0faab84e124e45f3bcdb865f4b5312ff129fc50700ebc4d8ef"; }
-    { locale = "de"; arch = "linux-i686"; sha256 = "3e83bca492c325438f48880d76a259c3fbfa65eac71569a79e1fdff858268621"; }
-    { locale = "de"; arch = "linux-x86_64"; sha256 = "020655df7c19750f86a7e1778846ed53e2fe350d44a76f4ac0acaeb82c9d4100"; }
-    { locale = "dsb"; arch = "linux-i686"; sha256 = "3409d2988bb31b2dfc490e03976471e2d09139660a4c08daab518f3095b45170"; }
-    { locale = "dsb"; arch = "linux-x86_64"; sha256 = "f5d084e8efe87488fed491432d93fb74c7e14b1fbcbc2abf21af6c669110b5bf"; }
-    { locale = "el"; arch = "linux-i686"; sha256 = "514a3262c1d0e146b3dbfc24d54b73ce0a5e27e02f26692e25ba6e36897da125"; }
-    { locale = "el"; arch = "linux-x86_64"; sha256 = "924b0e1514cddbad893446bb6561ca9422d46f6f5303fa7f847550f2f92a988f"; }
-    { locale = "en-GB"; arch = "linux-i686"; sha256 = "1cff7f847a1ca8a52cfc9a733b7e223a8468a82f5ea9c7d8e1c074868a9baf27"; }
-    { locale = "en-GB"; arch = "linux-x86_64"; sha256 = "5e803270db14ba348ab7b8697d488d172b774a8d782c22f079db0e8ccda793bf"; }
-    { locale = "en-US"; arch = "linux-i686"; sha256 = "95428cacb129137747da7cab4c793f102f87a5224ad2a5adc6f52939df746432"; }
-    { locale = "en-US"; arch = "linux-x86_64"; sha256 = "828317d27c4336aebf7122e2e5268697d8d0cdcde9bf874b63798f7fc6f84fd1"; }
-    { locale = "es-AR"; arch = "linux-i686"; sha256 = "7ec8555eeb01f126671b89fd8dcc46f219bc938cf15ca8b7f67b13a1df38a101"; }
-    { locale = "es-AR"; arch = "linux-x86_64"; sha256 = "082c9ace7d6775aff0e0b379206fa5109ce5bac08686ab937b7441edd6e17d6f"; }
-    { locale = "es-ES"; arch = "linux-i686"; sha256 = "722e87bb5dbde3a7aa6ce5a913622a050a3fd1da822656a787cac6a18881737f"; }
-    { locale = "es-ES"; arch = "linux-x86_64"; sha256 = "4420c5d0b773e76bdfa4e4ac842b86f3875ad81dc5b4d0666497a30d77267720"; }
-    { locale = "et"; arch = "linux-i686"; sha256 = "a3128b1315428ec2906ff44bef49f8f448d7116bae80be7bd68bf78138cf5192"; }
-    { locale = "et"; arch = "linux-x86_64"; sha256 = "299284d934129a15b70ca9f2d26fb05773d555972b14afe9f65826aaeda7bbf6"; }
-    { locale = "eu"; arch = "linux-i686"; sha256 = "197ba5387010a6d95fff049d780829526d1676de43f1eaa16be2ae1f04f1601a"; }
-    { locale = "eu"; arch = "linux-x86_64"; sha256 = "fc8386c294d107994463311d3778ad507a8848af3be8a533fd2c5be7394b9222"; }
-    { locale = "fi"; arch = "linux-i686"; sha256 = "db764598fb0cec2fdd0e585b3396e53fa873af303c4f9a027061a0179e445705"; }
-    { locale = "fi"; arch = "linux-x86_64"; sha256 = "ea87a217ec9934fae484a32f4dcc655cac04116c9b0c73e458eaee7e595f2b77"; }
-    { locale = "fr"; arch = "linux-i686"; sha256 = "e27563fdfcfceb5ed4b2643d63d5c26834ca9afed1d887151671fd13086fd66a"; }
-    { locale = "fr"; arch = "linux-x86_64"; sha256 = "0ee8fdb3d0a1e50afa5f232fba57d84b97c428c41176e73a712a2438bc3e8796"; }
-    { locale = "fy-NL"; arch = "linux-i686"; sha256 = "a5a785c9ebfb40a7962e29603792de280c57ff5d77f7836c5048074d5c9d4178"; }
-    { locale = "fy-NL"; arch = "linux-x86_64"; sha256 = "c5bbbb471fc2af310d768e7b01ff1336f78791a42a60b4473cdab00c0bd6e980"; }
-    { locale = "ga-IE"; arch = "linux-i686"; sha256 = "9c18f2677315f8613203dc69a7877b83e787f6c0b96fb150ab7e4ba3ac712e54"; }
-    { locale = "ga-IE"; arch = "linux-x86_64"; sha256 = "ccfcca939876bcca2e3b9fd81aee747d1c94f0df02f5258c9ae43564f61c7c23"; }
-    { locale = "gd"; arch = "linux-i686"; sha256 = "60031f3767779568e49ea477fd2677adf0f437d5663a53b7d96203e2cbc85f1e"; }
-    { locale = "gd"; arch = "linux-x86_64"; sha256 = "1090d5993cfffa923be8a8bb3acb197bd7968c994a1558a1024d81283e9341b2"; }
-    { locale = "gl"; arch = "linux-i686"; sha256 = "5a67627f06ae51553730e9185a11208f6ba15c421ebc5fa3ba358a341830efae"; }
-    { locale = "gl"; arch = "linux-x86_64"; sha256 = "2f7d114cfd69859f1cecd479ad00735744efe19b8a3db1be391fcd7dfe6ca757"; }
-    { locale = "he"; arch = "linux-i686"; sha256 = "f6cd331db9669ec8d910210061e95f2c87e64afe6343f5faaf75a321a5b99471"; }
-    { locale = "he"; arch = "linux-x86_64"; sha256 = "f665b75ad6ad846c57007e747931b89d773984beedb825c87fcb07a86ab52f9b"; }
-    { locale = "hr"; arch = "linux-i686"; sha256 = "69b5baa57f47ce77373aa9505b2ccba0baf90911f2c3ebaef28b043b601ad34b"; }
-    { locale = "hr"; arch = "linux-x86_64"; sha256 = "7bd6d9e36e87cf2e3aadb4fc7dec2dea371004466bc9a84ead3f60a59af38ae8"; }
-    { locale = "hsb"; arch = "linux-i686"; sha256 = "72cd9a12387bc5dc02783bb6f6a1d55ab8444557e4d2c46c35b93ce0ab0cf394"; }
-    { locale = "hsb"; arch = "linux-x86_64"; sha256 = "27b60e8cee363317070e74702d9ba97e5d68318caba0e17fc37aad6bf0fbb362"; }
-    { locale = "hu"; arch = "linux-i686"; sha256 = "b0b8219da55e81f3feb0872333eadd0f490b251fae09244d31287f2e40339861"; }
-    { locale = "hu"; arch = "linux-x86_64"; sha256 = "fb1b52b27253280f98e01b11e6f46e01d854998831b337a52922b925570ca330"; }
-    { locale = "hy-AM"; arch = "linux-i686"; sha256 = "8474bc4a1fd0f8b27131ed3ba999402e1a56b7e04be157e571b95c470f43e779"; }
-    { locale = "hy-AM"; arch = "linux-x86_64"; sha256 = "e68036c3057ce7c369b43335397c8248e5aac83a6db6e729c8e1116ed57a20a1"; }
-    { locale = "id"; arch = "linux-i686"; sha256 = "23ea1fb9c64baf835be0a87f7633ee5b87cc05db90a652ca05f17d6b2cb1904c"; }
-    { locale = "id"; arch = "linux-x86_64"; sha256 = "52584ff6ec72359f44891e630b099fc9114e1266a11cd0d063db5ff6034ed02e"; }
-    { locale = "is"; arch = "linux-i686"; sha256 = "3e018dd9407823747dce9d32571a390a8fdff11339826bcd68c6879b8edb9c1b"; }
-    { locale = "is"; arch = "linux-x86_64"; sha256 = "f86a8cd6be21403749607690c467baa126be38e547d1b0e3f50d40477b346fde"; }
-    { locale = "it"; arch = "linux-i686"; sha256 = "82afb08b29d44aa09da71c454c42d31fbf7ee2756c6f1ddca5c456179e5a7f89"; }
-    { locale = "it"; arch = "linux-x86_64"; sha256 = "d449b869faf6438697bb7e3f692c9bca6c1a116441b08dbd84e775de62564470"; }
-    { locale = "ja"; arch = "linux-i686"; sha256 = "02bcacb390dd85bf2e7809751d840fa7c87bb8eac467d9bc2cb50a77559060f9"; }
-    { locale = "ja"; arch = "linux-x86_64"; sha256 = "8ee832167990dc9546775a1c32518e4524b0f92147ce11e149b0b447932f7ecc"; }
-    { locale = "ko"; arch = "linux-i686"; sha256 = "374b797f6d662e3deb5a05f6939f650a0ec272f7788cc7dc1a02fc0262e5c903"; }
-    { locale = "ko"; arch = "linux-x86_64"; sha256 = "e0308132773119f13443ab475d66e651182adf508b7ca04b0efb65fd84013916"; }
-    { locale = "lt"; arch = "linux-i686"; sha256 = "dce54478d896490141be7f10ef780196ce446e3312cf5623315baedc4354f992"; }
-    { locale = "lt"; arch = "linux-x86_64"; sha256 = "e4b478609faa58ab0e8de7e2f542290f9ecf268d68f32828182208337523d3f5"; }
-    { locale = "nb-NO"; arch = "linux-i686"; sha256 = "14b2df6e331ae651d1d913c2d7116466df63e9fd24aad02db7a7f3dd010820c4"; }
-    { locale = "nb-NO"; arch = "linux-x86_64"; sha256 = "779f48e75546babae4ee153ce7d16f93af9daabf70f855dd702281e948a75cba"; }
-    { locale = "nl"; arch = "linux-i686"; sha256 = "faa6893cff053c090428035964fe67af8ecf9f5b71225678754e96d38d498311"; }
-    { locale = "nl"; arch = "linux-x86_64"; sha256 = "8a3ddebc51e182175afc272f16bdb7a584d78dd7af8849844f4e02892a439efd"; }
-    { locale = "nn-NO"; arch = "linux-i686"; sha256 = "3298284a9b326eccc05343ec5795034fa46dbfe75458e19d39d23564391840ac"; }
-    { locale = "nn-NO"; arch = "linux-x86_64"; sha256 = "e1f2da61eaf58f723e0c0021eb728e2a78a8cf36db60353e58d0233c2de60f73"; }
-    { locale = "pa-IN"; arch = "linux-i686"; sha256 = "4cb1c3b16b8d70f19e14a185bfbbc505d66795ddc4d55e1575193dd018c950d6"; }
-    { locale = "pa-IN"; arch = "linux-x86_64"; sha256 = "72b2c72ee5da9c4b353868efc0431b78feaeb0be8c18eecab6df4cfa0c5c7a3c"; }
-    { locale = "pl"; arch = "linux-i686"; sha256 = "48e7d195e4b6b9144e32f4a254a40f10c59a167a05ce0f38a013f4b914511d55"; }
-    { locale = "pl"; arch = "linux-x86_64"; sha256 = "ac6b2064b76b2a5f3cfad6089897126bca7cbf64922b61474eb01b0d65638221"; }
-    { locale = "pt-BR"; arch = "linux-i686"; sha256 = "57aee02d52b638d393df6a824021a1355df83711dc50663cc67a71366004a017"; }
-    { locale = "pt-BR"; arch = "linux-x86_64"; sha256 = "451de8f95bc2eaf67d1abb7ec604f566e5cb2f6b9a8ae2f2495f10a7157a12eb"; }
-    { locale = "pt-PT"; arch = "linux-i686"; sha256 = "98391cba2a9cfd194cb427243738e588f6de9c112762a6c1e099ba7a4fe621a0"; }
-    { locale = "pt-PT"; arch = "linux-x86_64"; sha256 = "92eeb485a7da11f1d600371d596c31fff778415784b54ec2fc5ba74199f49ec5"; }
-    { locale = "rm"; arch = "linux-i686"; sha256 = "f4e3073d31b221dc2fb37162011d6ab9c0980137cd81f0d9bf70384cfda91e4a"; }
-    { locale = "rm"; arch = "linux-x86_64"; sha256 = "4694fd61f7fe2a1066e08f85f041112076d63cf0fcb99db79c5833d714684388"; }
-    { locale = "ro"; arch = "linux-i686"; sha256 = "088c29a337c926dcbe11ef19c072624014ae7b59cf0ba2a0b8f25a5a725ec796"; }
-    { locale = "ro"; arch = "linux-x86_64"; sha256 = "0cb7c16955538ce7089e3aa8e5bc5c3325c4867aadf56837e7e3a05e86c4f482"; }
-    { locale = "ru"; arch = "linux-i686"; sha256 = "b420443eec07c56afed8435c02c305d355935cb0131b672814878cc9fb0143e6"; }
-    { locale = "ru"; arch = "linux-x86_64"; sha256 = "5964971c7261ba0619d34ce70d1fcf00aa105f159e2e47853d67fe03579dcbb7"; }
-    { locale = "si"; arch = "linux-i686"; sha256 = "ffb21e8a7a02ec8ef445735bc519671f3f3bf90f994db750a4d29385d574fd24"; }
-    { locale = "si"; arch = "linux-x86_64"; sha256 = "1177e20ff9b866c4c7e49a929c1f54c47174f80a8541ad0c98d5e472c4f20d26"; }
-    { locale = "sk"; arch = "linux-i686"; sha256 = "1309eaf342d7bd7a31c1022183e13e1b02275b01228fbfbd0d5e8b3ef235cceb"; }
-    { locale = "sk"; arch = "linux-x86_64"; sha256 = "adf736651eab43de2a927cd7ad471042f35eada0a5df4a09c0bbccf75dd17b44"; }
-    { locale = "sl"; arch = "linux-i686"; sha256 = "102c828dd42872ca9472d94ff842f412bd907be1f4cec8605805fea9f75250e2"; }
-    { locale = "sl"; arch = "linux-x86_64"; sha256 = "ebb608409f3c4ab44a6818020a826be7c3402977c18b08200df6b332e0a7fd3c"; }
-    { locale = "sq"; arch = "linux-i686"; sha256 = "ff984951130343fdba5377f91e325e7cd21b7c4e25a524b4a1bc98978842e45c"; }
-    { locale = "sq"; arch = "linux-x86_64"; sha256 = "15ca7d36207f8e7a80744d0d15966015c8dc395464cf7f70c98b643059f19fcb"; }
-    { locale = "sr"; arch = "linux-i686"; sha256 = "6c93f80d249ab5558543cc7b13cf72c2abba1da0616a817661f790e5c17c24cd"; }
-    { locale = "sr"; arch = "linux-x86_64"; sha256 = "3c6c64fbc264d4a3c98ae69c92ea778a87bd84ea23ded7f63117b4c77f93b4d5"; }
-    { locale = "sv-SE"; arch = "linux-i686"; sha256 = "3a82d99b249d9a99d207fc0b1d5a1bd8523833dc61ec09dd917ff427659ec338"; }
-    { locale = "sv-SE"; arch = "linux-x86_64"; sha256 = "0bf0e9ff45b3d25ef1b31f28b91e30280e8bdb25f864a31ccac795f66e27bb68"; }
-    { locale = "ta-LK"; arch = "linux-i686"; sha256 = "d346b57092959dbc880c9dc5a8b832dc7967c171ac361aa9b7e77b5589bd4c9e"; }
-    { locale = "ta-LK"; arch = "linux-x86_64"; sha256 = "6d86d75981ba1850980c3fa498c804dc64b4328c90d12d3a5c13af2f1e47af6d"; }
-    { locale = "tr"; arch = "linux-i686"; sha256 = "179a67fbb2420615e179d1c69cc5dccf1b135a7c61aea26bda658c724655931f"; }
-    { locale = "tr"; arch = "linux-x86_64"; sha256 = "bc95ac4b30ae806658218df21f5d9aa6c26b8b8c5fc8a58090de92e347735c58"; }
-    { locale = "uk"; arch = "linux-i686"; sha256 = "8b49fbe88dcc328b94a99f3b30af9f783910dbcdea1fc5b160526409d56994f7"; }
-    { locale = "uk"; arch = "linux-x86_64"; sha256 = "2ab49ec5742c07c44028d8aa980a6bd96623c554699037fd64d28cf4744789ce"; }
-    { locale = "vi"; arch = "linux-i686"; sha256 = "6eecd8d5fa6d6a826fec7a09ba11092348a0fa74c7c7a8c1239f41392d2e2055"; }
-    { locale = "vi"; arch = "linux-x86_64"; sha256 = "fdb2a25480eee0659803432fea02794f73aa18e9fe5a4b1c1c70ac5aceb09b4f"; }
-    { locale = "zh-CN"; arch = "linux-i686"; sha256 = "64358161ecc5064ee9fd26e301136a58f32b387466d6127604772b59b44f32c5"; }
-    { locale = "zh-CN"; arch = "linux-x86_64"; sha256 = "f9f54927e4ee378f56879b6ffc121d02ad300f6982d7751e730564ed9a9d8c80"; }
-    { locale = "zh-TW"; arch = "linux-i686"; sha256 = "78a6721da743bec597c9dd1e6bededffa43d675784f3585b0d1f03989007f295"; }
-    { locale = "zh-TW"; arch = "linux-x86_64"; sha256 = "fc3460aae0c3395220644ec0ce8c139512726e62d591ef51f4900ac3c9a9e461"; }
+    { locale = "ar"; arch = "linux-i686"; sha256 = "1edc09feab9b25f333f192c07b33e0f4b3ee093145d32f4eca4e93003a396ce4"; }
+    { locale = "ar"; arch = "linux-x86_64"; sha256 = "0681fca92f04ae1c4b3a306756f050f128b0534ee93ca6bc7fa0b5d5272a3bf3"; }
+    { locale = "ast"; arch = "linux-i686"; sha256 = "f16600e6cfa49a99c6a827231e1411fefb6a0c83f9cfc44e862b3a97f7c778fc"; }
+    { locale = "ast"; arch = "linux-x86_64"; sha256 = "9c37be63be7dc3f338af3326d5917592096b94df2423d1dc81daea4e31cd8658"; }
+    { locale = "be"; arch = "linux-i686"; sha256 = "1779ec20a630b02543f51eb735f33e1b920061e328a8c0966209096f47051a18"; }
+    { locale = "be"; arch = "linux-x86_64"; sha256 = "826d926a96ec9e8d5b46ed4649ac67ebe1a67db1eb746ee5e37b1fdf0f09ddb0"; }
+    { locale = "bg"; arch = "linux-i686"; sha256 = "aa6d3070ffebb5fe9f9205cab6c6bb3b57033e5d6acbafc45ca3fc89fa35f849"; }
+    { locale = "bg"; arch = "linux-x86_64"; sha256 = "e21460bf056e8b1fe683a11b688307580a13b51db03ffb235dc32c6e50ce8ac7"; }
+    { locale = "bn-BD"; arch = "linux-i686"; sha256 = "77d6dd2686b8bd5962c70a8ea09c10cbc0f60a0c7effdf00ac346bca9b6af313"; }
+    { locale = "bn-BD"; arch = "linux-x86_64"; sha256 = "a417f6bcd228afa2be0c71206af9f06841a8dc29950a8975e6455af215911e1f"; }
+    { locale = "br"; arch = "linux-i686"; sha256 = "920c81326f5f33e1e1a3a4229d0544360aa9f7bbe5eb32db3ea30dc34764e515"; }
+    { locale = "br"; arch = "linux-x86_64"; sha256 = "be967c23e45a06532dd8a2611a31bc842ff79c6da6b63444bd9f6a3db7f834a2"; }
+    { locale = "ca"; arch = "linux-i686"; sha256 = "98d88b01ed35dbbaf5b06418a26018c86d6b07f9ce9fe999b007ce6844e3832c"; }
+    { locale = "ca"; arch = "linux-x86_64"; sha256 = "616a724f6a0a1493c321a83c274895ba7234977f2d7ab264d44dda39d34dddaf"; }
+    { locale = "cs"; arch = "linux-i686"; sha256 = "ebebf6d26d900103851e1f8ccc5cb26506902a996a5c92674f165c79ad090fde"; }
+    { locale = "cs"; arch = "linux-x86_64"; sha256 = "43b1a4ad27868b968112c86893465d8c765d383a9653b64dc27609644b7c4bfc"; }
+    { locale = "cy"; arch = "linux-i686"; sha256 = "52b7a40c87adac16d77e9a03827c0db49286f1576ead85c6a5bff3b8ab33d546"; }
+    { locale = "cy"; arch = "linux-x86_64"; sha256 = "2c413971b22bafac67729e6f5967513f4dabbff441cad4aecaa3fa363aed807a"; }
+    { locale = "da"; arch = "linux-i686"; sha256 = "aab8b9b66d9b80c94ff9b26102cec7cb9ff9c7dc859f4606bba8d48d47ebebf4"; }
+    { locale = "da"; arch = "linux-x86_64"; sha256 = "24daf3a574619b2be424b4f5bbda732b500bd6ea5eff6e3b858dfe4bb0b2cfa1"; }
+    { locale = "de"; arch = "linux-i686"; sha256 = "385860c48089394ba0bd939cc60506c62f9d4b54903ee3c0e04006e6af619408"; }
+    { locale = "de"; arch = "linux-x86_64"; sha256 = "e0e61f60915f7562151e47e3458830aa1323519ce76cbd9638559ec177da1093"; }
+    { locale = "dsb"; arch = "linux-i686"; sha256 = "e2a19f5fc03bb3ea1a97ed501540b42fea923033592b0790aa4bcd93ff619421"; }
+    { locale = "dsb"; arch = "linux-x86_64"; sha256 = "95fa2341481aa869ef1d417c617ccbe54cc0f57ac0b4cb7266c6399887e1f04a"; }
+    { locale = "el"; arch = "linux-i686"; sha256 = "3dc35863b9aea5cfdb28ecd71ad798eee711c859d27acb46fb2294861ba713d7"; }
+    { locale = "el"; arch = "linux-x86_64"; sha256 = "546a4cf57c52ef054c2c58b9792b5b8ed0933368d8f4343f78604328c4117d42"; }
+    { locale = "en-GB"; arch = "linux-i686"; sha256 = "74194c95fba578feec4ac92569be45a9b948a4ae403d62bce5e11f5047ebbf11"; }
+    { locale = "en-GB"; arch = "linux-x86_64"; sha256 = "9da80fa8d1c96e08c2338c77c67548e4a16e151c8ebddfb28da779f1bfeabefe"; }
+    { locale = "en-US"; arch = "linux-i686"; sha256 = "c4e1d0a902ab04db666ac90cf1003f8b48ed88e3291fbbf1d6b2606e805a45b0"; }
+    { locale = "en-US"; arch = "linux-x86_64"; sha256 = "843ce88b796c4705c61ab5a68a215fc82c2ee32e655c2c4d0dd244e97ae0705d"; }
+    { locale = "es-AR"; arch = "linux-i686"; sha256 = "4fe05cbcf9b1d5aee936c29f19675c1d9658630cfe0c68570244ac57a5e8612e"; }
+    { locale = "es-AR"; arch = "linux-x86_64"; sha256 = "0c3b83406c1b38249e52e0c8f17389e9861cfd5578a15a66c9bad89784d21b31"; }
+    { locale = "es-ES"; arch = "linux-i686"; sha256 = "937a41e69189e50ac893d06abcd5ab032281f0531a2cb5acbd60bfdd4fff6a75"; }
+    { locale = "es-ES"; arch = "linux-x86_64"; sha256 = "3d58ed89c2dd316fdbcf218666ca837b5200dc35462a89f41e8a83c4eb7620fa"; }
+    { locale = "et"; arch = "linux-i686"; sha256 = "46e211a049ca3e3e986db7620b087a4ec41b73b1f4051aece68881c73b342bf7"; }
+    { locale = "et"; arch = "linux-x86_64"; sha256 = "69c968a92241703e4cc71e905b35a74e4326f6b8e32cad84dbeb3ea1b802c7a1"; }
+    { locale = "eu"; arch = "linux-i686"; sha256 = "dc638be813979a640e12f1fc4bed727ce639bc8d50b1b1d084e8733a067155ef"; }
+    { locale = "eu"; arch = "linux-x86_64"; sha256 = "26362027c5e5b3d69ebaecbed10c300d232dd3ccdbf96e113f720518584f5c03"; }
+    { locale = "fi"; arch = "linux-i686"; sha256 = "947481357bacb8a91b0a49956007e8ffaf0575815d5dcff0750f4cb2890f9e22"; }
+    { locale = "fi"; arch = "linux-x86_64"; sha256 = "35716446800a69a71aaf6f91e8bab850f8f681e6acaa6f36429f71a2bdd0e04a"; }
+    { locale = "fr"; arch = "linux-i686"; sha256 = "27aeb7724e1d76d1d81bf583b94580d3745177b1983b63e4dd88ec6ae204ba13"; }
+    { locale = "fr"; arch = "linux-x86_64"; sha256 = "482aba9f35f2026e4b9dfb009f45925f87a71a21c9338fd27a52ca1113d9759e"; }
+    { locale = "fy-NL"; arch = "linux-i686"; sha256 = "7adb9045525b10914173092731ed3a4194e68b3b3661a83b008e8cb651518b0c"; }
+    { locale = "fy-NL"; arch = "linux-x86_64"; sha256 = "4177e0f51a0877633cde98bc0d81a8f6391c6a87932546dfc094deea30ea5190"; }
+    { locale = "ga-IE"; arch = "linux-i686"; sha256 = "c77fd8481fe999f3e0b63952137762947c58a397be82027755bbe2aa8bee9c8a"; }
+    { locale = "ga-IE"; arch = "linux-x86_64"; sha256 = "39c2da28763cccabf86c6713bc62862edd37605c117d9c197cdeaabbb1cab31d"; }
+    { locale = "gd"; arch = "linux-i686"; sha256 = "2be49f3b06a46ed89687de23459c42052b7a50814d32127121007c620fc56f8a"; }
+    { locale = "gd"; arch = "linux-x86_64"; sha256 = "e0f9d78a12263fe8b8d40332bcc52a7c8db374c655564394e4ed850cf4567593"; }
+    { locale = "gl"; arch = "linux-i686"; sha256 = "2f66892cf58b1aa63a748b9be966fbd07077a369a46ee4e4d241be37abfe083d"; }
+    { locale = "gl"; arch = "linux-x86_64"; sha256 = "235b01ed0a702de629a61ee0a69ff4564fe479782d85c95a69fc121e5bf96df1"; }
+    { locale = "he"; arch = "linux-i686"; sha256 = "5a3486d56950a6b14dcacf8cb40a55a7d2024c2838c52f77acc745fcbba6863e"; }
+    { locale = "he"; arch = "linux-x86_64"; sha256 = "fae68a673712cb7929baf4e54358c851846901d519359ab53b270cfd215ecc5c"; }
+    { locale = "hr"; arch = "linux-i686"; sha256 = "e2044cda9fd387af1368115a47e56c5a81d2f9fbf9135dc7b5441b88ac5bda1d"; }
+    { locale = "hr"; arch = "linux-x86_64"; sha256 = "7205a8f3b20a5a1a7af08860a99d2be2d4ec78873f7e0cb579040285c3ef85f8"; }
+    { locale = "hsb"; arch = "linux-i686"; sha256 = "a2357944e25f3d1434d33cade62d079b0dee878c8f6d1aa2d3cae94500dce14a"; }
+    { locale = "hsb"; arch = "linux-x86_64"; sha256 = "3bb4658ecd2bce8d2204859cf95f8a85f90c6eb6f15e44ac50c1824aaa884da3"; }
+    { locale = "hu"; arch = "linux-i686"; sha256 = "31da7a7cde19de47455b6cd855ed0e77efaa30e76989a26df71bce73134e384e"; }
+    { locale = "hu"; arch = "linux-x86_64"; sha256 = "4703c48e899d36eb8d6aeb0f1d0101bf39f12c921716b7aaf041068b42046dfb"; }
+    { locale = "hy-AM"; arch = "linux-i686"; sha256 = "bec4ef424007894fe85a06cf8af03da2bc48c7d68e6ecde3287a6863408e6392"; }
+    { locale = "hy-AM"; arch = "linux-x86_64"; sha256 = "028bd4d92f502c4b4b0af52f5d992abfdf4d988974d8b991194284aa5ccb25b3"; }
+    { locale = "id"; arch = "linux-i686"; sha256 = "5718068cd54ecb06e0ce7a4ddc87b923b76d7341a989a946717e2b34b1b49a0e"; }
+    { locale = "id"; arch = "linux-x86_64"; sha256 = "112928c75789795e21050b8202d49b50fdb3b10f21c3d2c140e9cbd7ba96bafe"; }
+    { locale = "is"; arch = "linux-i686"; sha256 = "4bd5abdb8fb9c389601b9e6c8fcd18e53e8c24097ee338199ee12b03f580faff"; }
+    { locale = "is"; arch = "linux-x86_64"; sha256 = "e4ee538f072398ae16c70ebcd32e06129b2d94a88104710a2b165af1b1da8541"; }
+    { locale = "it"; arch = "linux-i686"; sha256 = "2269ea4101db9f9bb961d79fa30ecece49178a747cb10fb5f90f09d14dcbacd6"; }
+    { locale = "it"; arch = "linux-x86_64"; sha256 = "04cef93ee74ff13d6ddc9cfe60440d128bc8b432be62d988094d73461138cff1"; }
+    { locale = "ja"; arch = "linux-i686"; sha256 = "762e6c0879c0983dc059f3b4550681d947b0ceb2dd82331a587463d881c7fb65"; }
+    { locale = "ja"; arch = "linux-x86_64"; sha256 = "90748465b87b0bffcf70e7c6d83d2f6ce7873b751a5c1dc2d63d18cc60a8c25a"; }
+    { locale = "ko"; arch = "linux-i686"; sha256 = "ce867efb9452465ae1f6ab0eebbe06721c3987614b42c901a12e43ce3e5a6ad5"; }
+    { locale = "ko"; arch = "linux-x86_64"; sha256 = "9aab21893818eb86a7da148650873c4e6e1faa047d35e1ff6845001d4eabb2d4"; }
+    { locale = "lt"; arch = "linux-i686"; sha256 = "3f8fec266c7e612183ea1d60e44f90c8f5c713b2af0038ca10fef9964662c0a9"; }
+    { locale = "lt"; arch = "linux-x86_64"; sha256 = "f7efb6a495e57439c287ed8cdeacbdff6980ff89493497ab384a3c3c33fccaea"; }
+    { locale = "nb-NO"; arch = "linux-i686"; sha256 = "02b0002e52a7e1c91a4f200ece1c9e1b133b7d50688e483c041cdf57ef7d8a06"; }
+    { locale = "nb-NO"; arch = "linux-x86_64"; sha256 = "d4d6f125a9af64ad1967e414cb4f5d7a4cdc636c805f9790bf1c79573900aeef"; }
+    { locale = "nl"; arch = "linux-i686"; sha256 = "16b9e1d15b64b7d44ba3f2e39aa5a772a6d26ec347170b86c6455f4591bae22b"; }
+    { locale = "nl"; arch = "linux-x86_64"; sha256 = "0d8b130e681ca5a2ebd7b2f032b5779eb148540d7802097df8430f6cf095a5f8"; }
+    { locale = "nn-NO"; arch = "linux-i686"; sha256 = "37d08bbf72c34ee677dd0fe39016f75a13e5e078ce23236b742a0de2131421dd"; }
+    { locale = "nn-NO"; arch = "linux-x86_64"; sha256 = "c76e50a850ef98f07e030564fa8ec7411ca31aa128e8b6393227e40c91b47938"; }
+    { locale = "pa-IN"; arch = "linux-i686"; sha256 = "3aef7a6aef6d05c17f757603c81f2f550c0681b3f3ae38abd02d8224c10754c0"; }
+    { locale = "pa-IN"; arch = "linux-x86_64"; sha256 = "b5434c9a814f6ece725ef1bf7f47381fe7b56e2c1c05832a75e95152b8706725"; }
+    { locale = "pl"; arch = "linux-i686"; sha256 = "215845fbfd3e76c73861b59324df380b794413b25efd1189975589bc843b9d28"; }
+    { locale = "pl"; arch = "linux-x86_64"; sha256 = "0f07a3c7f6518dbe056814e0ab257036ffabd3770bebdf2ccd053eaee499654c"; }
+    { locale = "pt-BR"; arch = "linux-i686"; sha256 = "28f668d318a441cd57c9e85dda1de98502a545933b7af2a3d2aef066952a3eb9"; }
+    { locale = "pt-BR"; arch = "linux-x86_64"; sha256 = "eae9dee3c5677e40ec3ce0c6594937671ae07be49b8488abbe94d1ba52bd3f16"; }
+    { locale = "pt-PT"; arch = "linux-i686"; sha256 = "36d9ae4720d5e673c02e2fe850f3e66786b853f1e5e81368e3e62715b612cc57"; }
+    { locale = "pt-PT"; arch = "linux-x86_64"; sha256 = "bb5156054e96d515bac61cf942560d73166c27f052abf05344d81544b3d09938"; }
+    { locale = "rm"; arch = "linux-i686"; sha256 = "79322d60677bfeb493f0ebc64d336201ff75f34af6131a8fda742518c45c7cc0"; }
+    { locale = "rm"; arch = "linux-x86_64"; sha256 = "7544877e762913619dda73a3ebbc48d81aa2519a014284b79d7fdb65de678f20"; }
+    { locale = "ro"; arch = "linux-i686"; sha256 = "d1ab21feb037542faf032668ba6875157775f5efa95b3c1a8a31cc0fc8ea0a40"; }
+    { locale = "ro"; arch = "linux-x86_64"; sha256 = "8f2ef95bd7d82086dd8369e2ec144348d085527cab8e89b33d938c93103c4e15"; }
+    { locale = "ru"; arch = "linux-i686"; sha256 = "99390a8350cdf26c69203670458fbc7b6700797a55fa37f498148dca0fbca7b7"; }
+    { locale = "ru"; arch = "linux-x86_64"; sha256 = "6a52e3d8db23fd0c1e091f1b90dc80603cd8ce345d488228f3b595f1b707bb60"; }
+    { locale = "si"; arch = "linux-i686"; sha256 = "15e8ca12df3192e174f2787aca1d4a5b992ca2f45525a5d2f06683b2e8864bd3"; }
+    { locale = "si"; arch = "linux-x86_64"; sha256 = "6b7d66bbe8cb6ed0c4a1f44a3885d5c7e4a5db79a1db98530a099e6bb7a417bc"; }
+    { locale = "sk"; arch = "linux-i686"; sha256 = "4ce5be3d7455c72ec7c6ecb56824220ab74712b1c4ee27212010cb8e12959edb"; }
+    { locale = "sk"; arch = "linux-x86_64"; sha256 = "1a3911a18156a2dce9417c84bff20b7f41b8e5f5e2a578ffe33b26db0b4bcb30"; }
+    { locale = "sl"; arch = "linux-i686"; sha256 = "a43200e303054b34c4e4e7c81f561a8c1d33c122af61e23b89b3a8cb8c0d26d5"; }
+    { locale = "sl"; arch = "linux-x86_64"; sha256 = "f7e456499b7acf5e8eae4d04abcf43210f00bab8b4b7f42e047f2ee13473f3f6"; }
+    { locale = "sq"; arch = "linux-i686"; sha256 = "9a444b55077da2817c72538c72f53e6ff945e4f88ba6c222e2676de21bae2435"; }
+    { locale = "sq"; arch = "linux-x86_64"; sha256 = "96eb242e79a7155fe85dcd7eb1b1606f9d84c72aebffed2244cb149d7d77740f"; }
+    { locale = "sr"; arch = "linux-i686"; sha256 = "79c98c7d34b327b596f0a3e417508d5bbe77fd61b761995635559cc5f88d85e7"; }
+    { locale = "sr"; arch = "linux-x86_64"; sha256 = "0041421d294f06d993dd4184b66f6fa6c58244b231a64da1b20dd76b5becb4b4"; }
+    { locale = "sv-SE"; arch = "linux-i686"; sha256 = "a17ab2cc74b4c9367c21a176eb1cd83fce74bea24996b4987644659f9ef0bc68"; }
+    { locale = "sv-SE"; arch = "linux-x86_64"; sha256 = "0fd181a6d7425db8f0077175b8905f3a646af081a9db1a2b635f8c95c99e01b2"; }
+    { locale = "ta-LK"; arch = "linux-i686"; sha256 = "34eca4b0d4d808b280045381def6976106e3e78c43d901bc512b9aea83537876"; }
+    { locale = "ta-LK"; arch = "linux-x86_64"; sha256 = "4633828b594d330c252b5e4931e85f98797ec2aa17400e546dea7a4099bfe543"; }
+    { locale = "tr"; arch = "linux-i686"; sha256 = "b8584087e44d967ec5badeee5d9ac86653709f858e65b4356e0fa8d3ea5e3369"; }
+    { locale = "tr"; arch = "linux-x86_64"; sha256 = "dda18542ba3f27cf0b2a1499121c43dc5c085ada40cd825dad119135a1fd4385"; }
+    { locale = "uk"; arch = "linux-i686"; sha256 = "5cb1e2fdbf857f93851ee1b1aa3ad00c538def17641f14742b446414706f74c1"; }
+    { locale = "uk"; arch = "linux-x86_64"; sha256 = "84dc247e8a46f0ff1b5bd7f25956e0988edab18e72649b7d4c264b6160a47de2"; }
+    { locale = "vi"; arch = "linux-i686"; sha256 = "a38fde2cbdb45552950db906b19eed3135e930da8242791811683bb2fb850fb4"; }
+    { locale = "vi"; arch = "linux-x86_64"; sha256 = "5eff491a6d6ec1b54788beb300f61fbd98be72037a769054967af7a062afec61"; }
+    { locale = "zh-CN"; arch = "linux-i686"; sha256 = "c4644e65f6d1a1cb710806026814c416268453b571531e87d71800deb3625128"; }
+    { locale = "zh-CN"; arch = "linux-x86_64"; sha256 = "dd8d802b34d76ccdeb569b86aec75f27d29c23b6c74ce6d5bfb0a5239ee581af"; }
+    { locale = "zh-TW"; arch = "linux-i686"; sha256 = "1a9e7322512caa10247f58674fbbf55d5a624ef36a9d570d8ebdb6e1c5c6889a"; }
+    { locale = "zh-TW"; arch = "linux-x86_64"; sha256 = "a84310a24bfe845e9c3992fe5441e9cbc049054fdc53f659dbea997ae17e937f"; }
   ];
 }
diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix
index 12c250ab28b..646e3dfdd0b 100644
--- a/pkgs/applications/networking/mumble/default.nix
+++ b/pkgs/applications/networking/mumble/default.nix
@@ -40,7 +40,9 @@ let
       ++ (overrides.configureFlags or [ ]);
 
     configurePhase = ''
+      runHook preConfigure
       qmake $configureFlags DEFINES+="PLUGIN_PATH=$out/lib"
+      runHook postConfigure
     '';
 
     makeFlags = [ "release" ];
diff --git a/pkgs/applications/networking/newsreaders/liferea/default.nix b/pkgs/applications/networking/newsreaders/liferea/default.nix
index 6c061940b26..08152547555 100644
--- a/pkgs/applications/networking/newsreaders/liferea/default.nix
+++ b/pkgs/applications/networking/newsreaders/liferea/default.nix
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
       wrapProgram "$f" \
         --prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${pygobject3})" \
         --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
-        --prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules:${glib_networking}/lib/gio/modules" \
+        --prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules:${glib_networking.out}/lib/gio/modules" \
         --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gnome3.gtk}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
     done
   '';
diff --git a/pkgs/applications/networking/p2p/retroshare/0.6.nix b/pkgs/applications/networking/p2p/retroshare/0.6.nix
index 855ebdd0593..020d0017053 100644
--- a/pkgs/applications/networking/p2p/retroshare/0.6.nix
+++ b/pkgs/applications/networking/p2p/retroshare/0.6.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
     sha256 = "189qndkfq9kgv3qi3wx8ivla4j8fxr4iv7c8y9rjrjaz8jwdkn5x";
   };
 
-  NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${libxml2}/include/libxml2 -I${sqlcipher}/include/sqlcipher";
+  NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/glib-2.0 -I${glib.dev}/lib/glib-2.0/include -I${libxml2.dev}/include/libxml2 -I${sqlcipher}/include/sqlcipher";
 
   patchPhase = ''
     # Fix build error
diff --git a/pkgs/applications/networking/p2p/retroshare/default.nix b/pkgs/applications/networking/p2p/retroshare/default.nix
index a139531b19a..e7fe79d66a5 100644
--- a/pkgs/applications/networking/p2p/retroshare/default.nix
+++ b/pkgs/applications/networking/p2p/retroshare/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
     sha256 = "0l2n4pr1hq66q6qa073hrdx3s3d7iw54z8ay1zy82zhk2rwhsavp";
   };
 
-  NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${libxml2}/include/libxml2";
+  NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/glib-2.0 -I${glib.dev}/lib/glib-2.0/include -I${libxml2.dev}/include/libxml2";
 
   patchPhase = ''
     sed -i 's/UpnpString_get_String(es_event->PublisherUrl)/es_event->PublisherUrl/' \
diff --git a/pkgs/applications/networking/sniffers/ettercap/default.nix b/pkgs/applications/networking/sniffers/ettercap/default.nix
index 3ff12c274d5..cc8e5dc4de0 100644
--- a/pkgs/applications/networking/sniffers/ettercap/default.nix
+++ b/pkgs/applications/networking/sniffers/ettercap/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, cmake, libpcap, libnet, zlib, curl, pcre,
-  openssl, ncurses, glib, gtk, atk, pango, flex, bison }:
+  openssl, ncurses, glib, gtk2, atk, pango, flex, bison }:
 
 stdenv.mkDerivation rec {
   name = "ettercap-${version}";
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     cmake libpcap libnet zlib curl pcre openssl ncurses
-    glib gtk atk pango flex bison
+    glib gtk2 atk pango flex bison
   ];
 
   preConfigure = ''
@@ -23,8 +23,8 @@ stdenv.mkDerivation rec {
   '';
 
   cmakeFlags = [
-    "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include"
-    "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk}/lib/gtk-2.0/include"
+    "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
+    "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
   ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/spideroak/default.nix b/pkgs/applications/networking/spideroak/default.nix
index 525e1547023..23c226b9f8a 100644
--- a/pkgs/applications/networking/spideroak/default.nix
+++ b/pkgs/applications/networking/spideroak/default.nix
@@ -16,7 +16,7 @@ let
     else if stdenv.system == "i686-linux" then "8c23271291f40aa144bbf38ceb3cc2a05bed00759c87a65bd798cf8bb289d07a"
     else throw "Spideroak client for: ${stdenv.system} not supported!";
 
-  ldpath = stdenv.lib.makeSearchPath "lib" [
+  ldpath = stdenv.lib.makeLibraryPath [
     glib fontconfig libXext libX11 freetype libXrender
   ];
 
@@ -41,7 +41,7 @@ in stdenv.mkDerivation {
     mkdir "$out/bin"
     rm "$out/usr/bin/SpiderOakONE"
 
-    patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \
+    patchelf --set-interpreter ${stdenv.glibc.out}/lib/${interpreter} \
       "$out/opt/SpiderOakONE/lib/SpiderOakONE"
 
     RPATH=$out/opt/SpiderOakONE/lib:${ldpath}
diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix
index 040b4893032..450c15bb65e 100644
--- a/pkgs/applications/office/libreoffice/default.nix
+++ b/pkgs/applications/office/libreoffice/default.nix
@@ -12,7 +12,7 @@
 , libatomic_ops, graphite2, harfbuzz, libodfgen
 , librevenge, libe-book, libmwaw, glm, glew, gst_all_1
 , gdb, commonsLogging, librdf_rasqal, makeWrapper, gsettings_desktop_schemas
-, defaultIconTheme, glib
+, defaultIconTheme, glib, ncurses
 , langs ? [ "en-US" "en-GB" "ca" "ru" "eo" "fr" "nl" "de" "sl" "pl" ]
 , withHelp ? true
 , kdeIntegration ? false
@@ -23,8 +23,8 @@ let
   langsSpaces = lib.concatStringsSep " " langs;
   major = "5";
   minor = "1";
-  patch = "0";
-  tweak = "3";
+  patch = "2";
+  tweak = "2";
   subdir = "${major}.${minor}.${patch}";
   version = "${subdir}${if tweak == "" then "" else "."}${tweak}";
 
@@ -50,14 +50,14 @@ let
 
     translations = fetchSrc {
       name = "translations";
-      sha256 = "1qqffq7646yh7rskzd1wvy0zgkdnkpdbyhvsny424lxqjglyw3px";
+      sha256 = "1w2m4hfrxb706p8bjfgklqv0j5hnivbvif3vav7sbngp5ms0vgvz";
     };
 
     # TODO: dictionaries
 
     help = fetchSrc {
       name = "help";
-      sha256 = "0ixlq6yzn6z8hsih24l934sa05vvz2vk3p03nalpqqrhm7vdzsf2";
+      sha256 = "0lr90z5fdg157lcid5w4p0zxi72c4xziiw51kh38kbbqrbb9ykfw";
     };
 
   };
@@ -66,7 +66,7 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://download.documentfoundation.org/libreoffice/src/${subdir}/libreoffice-${version}.tar.xz";
-    sha256 = "1csphxpbpc7bxrwnl5i9nvm3bh3p0j7r3h9ivsdl7cys13q066xl";
+    sha256 = "108p8jg22lg3g9wypqv5d71j4vkcpmg2x2w9l2v4z9h10agdrv2l";
   };
 
   # Openoffice will open libcups dynamically, so we link it directly
@@ -240,7 +240,7 @@ in stdenv.mkDerivation rec {
       python3 sablotron sane-backends tcsh unzip vigra which zip zlib
       mdds bluez5 glibc libcmis libwps libabw
       libxshmfence libatomic_ops graphite2 harfbuzz
-      librevenge libe-book libmwaw glm glew
+      librevenge libe-book libmwaw glm glew ncurses
       libodfgen CoinMP librdf_rasqal defaultIconTheme makeWrapper
     ]
     ++ lib.optional kdeIntegration kde4.kdelibs;
diff --git a/pkgs/applications/office/libreoffice/libreoffice-srcs.nix b/pkgs/applications/office/libreoffice/libreoffice-srcs.nix
index 21a16a5fc69..7af49d51a85 100644
--- a/pkgs/applications/office/libreoffice/libreoffice-srcs.nix
+++ b/pkgs/applications/office/libreoffice/libreoffice-srcs.nix
@@ -190,8 +190,8 @@
   brief = false;
 }
 {
-  name = "graphite2-minimal-1.3.4.tgz";
-  md5 = "5c0c9ac0996fbb4a0e17780ff5441959";
+  name = "graphite-minimal-1.3.6.tgz";
+  md5 = "17df8301bcc459e83f8a8f3aca6183b2";
   brief = false;
 }
 {
@@ -285,8 +285,8 @@
   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;
 }
 {
@@ -376,13 +376,13 @@
   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;
 }
 {
@@ -401,8 +401,8 @@
   brief = false;
 }
 {
-  name = "openssl-1.0.2a.tar.gz";
-  md5 = "a06c547dac9044161a477211049f60ef";
+  name = "openssl-1.0.2g.tar.gz";
+  md5 = "f3c710c045cdee5fd114feb69feba7aa";
   brief = true;
 }
 {
diff --git a/pkgs/applications/science/astronomy/celestia/default.nix b/pkgs/applications/science/astronomy/celestia/default.nix
index 86b0ffbcf24..f2407e1a833 100644
--- a/pkgs/applications/science/astronomy/celestia/default.nix
+++ b/pkgs/applications/science/astronomy/celestia/default.nix
@@ -59,7 +59,7 @@ stdenv.mkDerivation {
   CPPFLAGS = "-DNDEBUG";
   CFLAGS = "-O2 -fsigned-char";
   CXXFLAGS = "-O2 -fsigned-char";
-  GTK_CFLAGS = "-I${gtk2}/include/gtk-2.0 -I${gtk2}/lib/gtk-2.0/include -I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${cairo}/include/cairo -I${pango}/include/pango-1.0 -I${gdk_pixbuf}/include/gdk-pixbuf-2.0 -I${atk}/include/atk-1.0 -I${gtkglext}/include/gtkglext-1.0 -I${gtkglext}/lib/gtkglext-1.0/include";
+  GTK_CFLAGS = "-I${gtk2.dev}/include/gtk-2.0 -I${gtk2.out}/lib/gtk-2.0/include -I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include -I${cairo.dev}/include/cairo -I${pango.dev}/include/pango-1.0 -I${gdk_pixbuf.dev}/include/gdk-pixbuf-2.0 -I${atk}/include/atk-1.0 -I${gtkglext}/include/gtkglext-1.0 -I${gtkglext}/lib/gtkglext-1.0/include";
   GTK_LIBS = "-lgtk-x11-2.0 -lgtkglext-x11-1.0 -lcairo -lgdk_pixbuf-2.0 -lpango-1.0 -lgobject-2.0";
 
   installPhase = ''make MKDIR_P="mkdir -p" install'';
diff --git a/pkgs/applications/science/biology/samtools/default.nix b/pkgs/applications/science/biology/samtools/default.nix
new file mode 100644
index 00000000000..7c85513bd8e
--- /dev/null
+++ b/pkgs/applications/science/biology/samtools/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, fetchurl, zlib, ncurses }:
+
+stdenv.mkDerivation rec {
+  name = "samtools-${version}";
+  version = "1.3";
+
+  src = fetchurl {
+    url = "https://github.com/samtools/samtools/releases/download/${version}/${name}.tar.bz2";
+    sha256 = "03mnf0mhbfwhqlqfslrhfnw68s3g0fs1as354i9a584mqw1l1smy";
+  };
+
+  buildInputs = [ zlib ncurses ];
+
+  meta = with stdenv.lib; {
+    description = "Tools (written in C using htslib) for manipulating next-generation sequencing data";
+    license = licenses.mit;
+    homepage = http://www.htslib.org/;
+  };
+}
diff --git a/pkgs/applications/science/electronics/fritzing/default.nix b/pkgs/applications/science/electronics/fritzing/default.nix
index 302c6a318e6..ff0502ac0cb 100644
--- a/pkgs/applications/science/electronics/fritzing/default.nix
+++ b/pkgs/applications/science/electronics/fritzing/default.nix
@@ -17,9 +17,11 @@ stdenv.mkDerivation rec {
   buildInputs = [ qtbase qtsvg boost ];
 
   configurePhase = ''
+    runHook preConfigure
     cd fritzing-${version}.source
     echo $PATH
     qmake PREFIX=$out phoenix.pro
+    runHook postConfigure
   '';
 
   meta = {
diff --git a/pkgs/applications/science/electronics/tkgate/1.x.nix b/pkgs/applications/science/electronics/tkgate/1.x.nix
index e9849d0460c..c62ecdcd1e2 100644
--- a/pkgs/applications/science/electronics/tkgate/1.x.nix
+++ b/pkgs/applications/science/electronics/tkgate/1.x.nix
@@ -1,8 +1,8 @@
 { stdenv, fetchurl, tcl, tk, libX11, glibc, which, yacc, flex, imake, xproto, gccmakedep }:
 
 let
-  libiconvInc = stdenv.lib.optionalString stdenv.isLinux "${glibc}/include";
-  libiconvLib = stdenv.lib.optionalString stdenv.isLinux "${glibc}/lib";
+  libiconvInc = stdenv.lib.optionalString stdenv.isLinux "${glibc.dev}/include";
+  libiconvLib = stdenv.lib.optionalString stdenv.isLinux "${glibc.out}/lib";
 in
 stdenv.mkDerivation rec {
   name = "tkgate-1.8.7";
diff --git a/pkgs/applications/science/logic/coq/8.5.nix b/pkgs/applications/science/logic/coq/8.5.nix
index 104fb02fc45..1485626125d 100644
--- a/pkgs/applications/science/logic/coq/8.5.nix
+++ b/pkgs/applications/science/logic/coq/8.5.nix
@@ -6,7 +6,7 @@
 {stdenv, fetchurl, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}:
 
 let
-  version = "8.5";
+  version = "8.5pl1";
   coq-version = "8.5";
   buildIde = lablgtk != null;
   ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
@@ -23,8 +23,8 @@ stdenv.mkDerivation {
   inherit ocaml camlp5;
 
   src = fetchurl {
-    url = https://coq.inria.fr/distrib/V8.5/files/coq-8.5.tar.gz;
-    sha256 = "0gdfm6k5q1f8sz1xr9ijdkkvwqsb7v8prj21gmwv0z0yp6w2zac9";
+    url = "http://coq.inria.fr/distrib/V${version}/files/coq-${version}.tar.gz";
+    sha256 = "1w2xvm6w16khfn63bp95s25hnkn2ny3w0yqg3lq63gp11aqpbyjb";
   };
 
   buildInputs = [ pkgconfig ocaml findlib camlp5 ncurses lablgtk ];
diff --git a/pkgs/applications/science/logic/hol/default.nix b/pkgs/applications/science/logic/hol/default.nix
index f8a57aebb6d..c7fb4ffbb97 100644
--- a/pkgs/applications/science/logic/hol/default.nix
+++ b/pkgs/applications/science/logic/hol/default.nix
@@ -32,7 +32,7 @@ stdenv.mkDerivation {
   buildCommand = ''
 
     mkdir chroot-fontconfig
-    cat ${fontconfig}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf
+    cat ${fontconfig.out}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf
     sed -e 's@</fontconfig>@@' -i chroot-fontconfig/fonts.conf
     echo "<dir>${liberation_ttf}</dir>" >> chroot-fontconfig/fonts.conf
     echo "</fontconfig>" >> chroot-fontconfig/fonts.conf
diff --git a/pkgs/applications/science/logic/mcrl2/default.nix b/pkgs/applications/science/logic/mcrl2/default.nix
new file mode 100644
index 00000000000..c8493b59469
--- /dev/null
+++ b/pkgs/applications/science/logic/mcrl2/default.nix
@@ -0,0 +1,31 @@
+{stdenv, fetchurl, xlibs, cmake, subversion, mesa, qt5, boost,
+ python27, python27Packages}:
+
+stdenv.mkDerivation rec {
+  version = "201409.1";
+  build_nr = "13892";
+  name = "mcrl2-${version}";
+
+  src = fetchurl {
+    url = "http://www.mcrl2.org/download/devel/mcrl2-${version}.${build_nr}.tar.gz";
+    sha256 = "0cknpind6rma12q93rbm638ijhy8sj8nd20wnw8l0f651wm0x036";
+  };
+
+  buildInputs = [ xlibs.libX11 cmake subversion mesa qt5.qtbase boost
+                  python27 python27Packages.pyyaml python27Packages.psutil ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "A toolset for model-checking concurrent systems and protocols";
+    longDescription = ''
+      A formal specification language with an associated toolset,
+      that can be used for modelling, validation and verification of
+      concurrent systems and protocols
+    '';
+    homepage = http://www.mcrl2.org/;
+    license = licenses.boost;
+    maintainers = with maintainers; [ moretea ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/science/logic/saw-tools/default.nix b/pkgs/applications/science/logic/saw-tools/default.nix
index eebe6ff0a06..1153c0b3cf5 100644
--- a/pkgs/applications/science/logic/saw-tools/default.nix
+++ b/pkgs/applications/science/logic/saw-tools/default.nix
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
     mv doc $out/share
 
     # Hack around lack of libtinfo in NixOS
-    ln -s ${ncurses}/lib/libncursesw.so.5       $out/lib/libtinfo.so.5
+    ln -s ${ncurses.out}/lib/libncursesw.so.5       $out/lib/libtinfo.so.5
     ln -s ${stdenv.cc.libc}/lib/libpthread.so.0 $out/lib/libpthread.so.0
 
     # Add a clang symlink for easy building with a suitable compiler.
diff --git a/pkgs/applications/science/logic/yices/default.nix b/pkgs/applications/science/logic/yices/default.nix
index 5daaa444c12..f495ee257ff 100644
--- a/pkgs/applications/science/logic/yices/default.nix
+++ b/pkgs/applications/science/logic/yices/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, gmp, gperf, autoreconfHook }:
+{ stdenv, fetchurl, gmp-static, gperf, autoreconfHook }:
 
 stdenv.mkDerivation rec {
   name    = "yices-${version}";
@@ -10,10 +10,10 @@ stdenv.mkDerivation rec {
     sha256 = "1da70n0cah0dh3pk7fcrvjkszx9qmhc0csgl15jqa7bdh707k2zs";
   };
 
-  configureFlags = [ "--with-static-gmp=${gmp}/lib/libgmp.a"
-                     "--with-static-gmp-include-dir=${gmp}/include"
+  configureFlags = [ "--with-static-gmp=${gmp-static.out}/lib/libgmp.a"
+                     "--with-static-gmp-include-dir=${gmp-static.dev}/include"
                    ];
-  buildInputs = [ gmp gperf autoreconfHook ];
+  buildInputs = [ gmp-static gperf autoreconfHook ];
 
   meta = {
     description = "A high-performance theorem prover and SMT solver";
diff --git a/pkgs/applications/science/machine-learning/torch/torch-distro.nix b/pkgs/applications/science/machine-learning/torch/torch-distro.nix
index 067cb134114..5ff510a52ce 100644
--- a/pkgs/applications/science/machine-learning/torch/torch-distro.nix
+++ b/pkgs/applications/science/machine-learning/torch/torch-distro.nix
@@ -73,8 +73,8 @@ let
 
           for p in $out/bin/*; do
             wrapProgram $p \
-              --suffix LD_LIBRARY_PATH ';' "${lib.makeSearchPath "lib" runtimeDeps_}" \
-              --suffix PATH ';' "${lib.makeSearchPath "bin" runtimeDeps_}" \
+              --suffix LD_LIBRARY_PATH ';' "${lib.makeLibraryPath runtimeDeps_}" \
+              --suffix PATH ';' "${lib.makeBinPath runtimeDeps_}" \
               --suffix LUA_PATH ';' "\"$LUA_PATH\"" \
               --suffix LUA_PATH ';' "\"$out/share/lua/${lua.luaversion}/?.lua;$out/share/lua/${lua.luaversion}/?/init.lua\"" \
               --suffix LUA_CPATH ';' "\"$LUA_CPATH\"" \
diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix
index e7a19565949..2ca2cab3afd 100644
--- a/pkgs/applications/science/math/R/default.nix
+++ b/pkgs/applications/science/math/R/default.nix
@@ -48,7 +48,6 @@ stdenv.mkDerivation rec {
       CXX=$(type -p g++)
       FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran"
       JAVA_HOME="${jdk}"
-      LDFLAGS="-L${gfortran.cc}/lib"
       RANLIB=$(type -p ranlib)
       R_SHELL="${stdenv.shell}"
   '' + stdenv.lib.optionalString stdenv.isDarwin ''
diff --git a/pkgs/applications/science/math/mathematica/9.nix b/pkgs/applications/science/math/mathematica/9.nix
index 7573b8955b1..2a43cf5677f 100644
--- a/pkgs/applications/science/math/mathematica/9.nix
+++ b/pkgs/applications/science/math/mathematica/9.nix
@@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
 
   ldpath = stdenv.lib.makeLibraryPath buildInputs
     + stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
-      (":" + stdenv.lib.makeSearchPath "lib64" buildInputs);
+      (":" + stdenv.lib.makeSearchPathOutputs "lib64" ["lib"] buildInputs);
 
   phases = "unpackPhase installPhase fixupPhase";
 
diff --git a/pkgs/applications/science/math/mathematica/default.nix b/pkgs/applications/science/math/mathematica/default.nix
index 05c6f262293..c2988331c4c 100644
--- a/pkgs/applications/science/math/mathematica/default.nix
+++ b/pkgs/applications/science/math/mathematica/default.nix
@@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
 
   ldpath = stdenv.lib.makeLibraryPath buildInputs
     + stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
-      (":" + stdenv.lib.makeSearchPath "lib64" buildInputs);
+      (":" + stdenv.lib.makeSearchPathOutputs "lib64" ["lib"] buildInputs);
 
   phases = "unpackPhase installPhase fixupPhase";
 
diff --git a/pkgs/applications/science/math/maxima/default.nix b/pkgs/applications/science/math/maxima/default.nix
index e42bd0f83ee..4497356a29f 100644
--- a/pkgs/applications/science/math/maxima/default.nix
+++ b/pkgs/applications/science/math/maxima/default.nix
@@ -5,7 +5,7 @@ let
   version = "5.36.1";
 
   searchPath =
-    stdenv.lib.makeSearchPath "bin"
+    stdenv.lib.makeBinPath
       (stdenv.lib.filter (x: x != null) [ sbcl rlwrap tk gnuplot ]);
 in
 stdenv.mkDerivation {
diff --git a/pkgs/applications/science/misc/root/cmake.patch b/pkgs/applications/science/misc/root/cmake.patch
deleted file mode 100644
index 6d2d4cdc70d..00000000000
--- a/pkgs/applications/science/misc/root/cmake.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/cmake/modules/RootBuildOptions.cmake	1969-12-31 20:30:01.000000000 -0330
-+++ b/cmake/modules/RootBuildOptions.cmake	2014-01-10 14:09:29.424937408 -0330
-@@ -149,7 +149,7 @@
- 
- #---General Build options----------------------------------------------------------------------
- # use, i.e. don't skip the full RPATH for the build tree
--set(CMAKE_SKIP_BUILD_RPATH  FALSE)
-+set(CMAKE_SKIP_BUILD_RPATH  TRUE)
- # when building, don't use the install RPATH already (but later on when installing)
- set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 
- # add the automatically determined parts of the RPATH
diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix
index e61cb557e12..9795604bab1 100644
--- a/pkgs/applications/science/misc/root/default.nix
+++ b/pkgs/applications/science/misc/root/default.nix
@@ -1,31 +1,18 @@
-{ stdenv, fetchurl, fetchpatch, cmake, pkgconfig, mesa, gfortran
-, libX11,libXpm, libXft, libXext, zlib }:
+{ stdenv, fetchurl, fetchpatch, cmake, pkgconfig, python
+, libX11, libXpm, libXft, libXext, zlib }:
 
 stdenv.mkDerivation rec {
   name = "root-${version}";
-  version = "5.34.15";
+  version = "6.04.16";
 
   src = fetchurl {
-    url = "ftp://root.cern.ch/root/root_v${version}.source.tar.gz";
-    sha256 = "1bkiggcyya39a794d3d2rzzmmkbdymf86hbqhh0l1pl4f38xvp6i";
+    url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
+    sha256 = "0f58dg83aqhggkxmimsfkd1qyni2vhmykq4qa89cz6jr9p73i1vm";
   };
 
-  buildInputs = [ cmake pkgconfig gfortran mesa libX11 libXpm libXft libXext zlib ];
+  buildInputs = [ cmake pkgconfig python libX11 libXpm libXft libXext zlib ];
 
-  NIX_CFLAGS_LINK = "-lX11";
-
-  # CMAKE_INSTALL_RPATH_USE_LINK_PATH is set to FALSE in
-  # <rootsrc>/cmake/modules/RootBuildOptions.cmake.
-  # This patch sets it to TRUE.
-  patches = [
-    ./cmake.patch
-    (fetchpatch {
-      name = "fix-tm_t-member.diff";
-      url = "https://github.com/root-mirror/root/commit/"
-        + "08b08412bafc24fa635b0fdb832097a3aa2fa1d2.diff";
-      sha256 = "0apbp51pk8471gl06agx3i88dn76p6gpkgf1ssfhcyam0bjl8907";
-    })
-  ];
+  cmakeFlags = "-Drpath=ON";
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/applications/science/robotics/qgroundcontrol/default.nix b/pkgs/applications/science/robotics/qgroundcontrol/default.nix
index 47a6ee44952..692be0a88b1 100644
--- a/pkgs/applications/science/robotics/qgroundcontrol/default.nix
+++ b/pkgs/applications/science/robotics/qgroundcontrol/default.nix
@@ -28,19 +28,11 @@ stdenv.mkDerivation rec {
 
   patches = [ ./0001-fix-gcc-cmath-namespace-issues.patch ];
 
-  preConfigure = ''
-    git submodule init
-    git submodule update
-
-  '';
-
   configurePhase = ''
+    runHook preConfigure
     mkdir build
-    pushd build
-
-    qmake ../qgroundcontrol.pro
-
-    popd
+    (cd build && qmake ../qgroundcontrol.pro)
+    runHook postConfigure
   '';
 
   preBuild = "pushd build/";
diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix
index c396870f9e5..253b97aff1e 100644
--- a/pkgs/applications/search/recoll/default.nix
+++ b/pkgs/applications/search/recoll/default.nix
@@ -29,20 +29,20 @@ stdenv.mkDerivation rec {
       substituteInPlace  $f --replace antiword      ${antiword}/bin/antiword
       substituteInPlace  $f --replace awk           ${gawk}/bin/awk
       substituteInPlace  $f --replace catppt        ${catdoc}/bin/catppt
-      substituteInPlace  $f --replace djvused       ${djvulibre}/bin/djvused
-      substituteInPlace  $f --replace djvutxt       ${djvulibre}/bin/djvutxt
+      substituteInPlace  $f --replace djvused       ${djvulibre.bin}/bin/djvused
+      substituteInPlace  $f --replace djvutxt       ${djvulibre.bin}/bin/djvutxt
       substituteInPlace  $f --replace egrep         ${gnugrep}/bin/egrep
       substituteInPlace  $f --replace groff         ${groff}/bin/groff
       substituteInPlace  $f --replace gunzip        ${gzip}/bin/gunzip
-      substituteInPlace  $f --replace iconv         ${libiconv}/bin/iconv
+      substituteInPlace  $f --replace iconv         ${libiconv.bin or libiconv}/bin/iconv
       substituteInPlace  $f --replace lyx           ${lyx}/bin/lyx
-      substituteInPlace  $f --replace pdftotext     ${poppler_utils}/bin/pdftotext
+      substituteInPlace  $f --replace pdftotext     ${poppler_utils.out}/bin/pdftotext
       substituteInPlace  $f --replace pstotext      ${ghostscript}/bin/ps2ascii 
       substituteInPlace  $f --replace sed           ${gnused}/bin/sed
       substituteInPlace  $f --replace tar           ${gnutar}/bin/tar
       substituteInPlace  $f --replace unzip         ${unzip}/bin/unzip
       substituteInPlace  $f --replace xls2csv       ${catdoc}/bin/xls2csv
-      substituteInPlace  $f --replace xsltproc      ${libxslt}/bin/xsltproc
+      substituteInPlace  $f --replace xsltproc      ${libxslt.bin}/bin/xsltproc
       substituteInPlace  $f --replace unrtf         ${unrtf}/bin/unrtf
       substituteInPlace  $f --replace untex         ${untex}/bin/untex
       substituteInPlace  $f --replace wpd2html      ${libwpd}/bin/wpd2html
diff --git a/pkgs/applications/version-management/cvs-fast-export/default.nix b/pkgs/applications/version-management/cvs-fast-export/default.nix
index 62a58ee985c..eae18c39dad 100644
--- a/pkgs/applications/version-management/cvs-fast-export/default.nix
+++ b/pkgs/applications/version-management/cvs-fast-export/default.nix
@@ -39,7 +39,7 @@ mkDerivation rec {
 
   postInstall =
     let
-      binpath = makeSearchPath "bin" [ out rcs cvs git coreutils rsync ];
+      binpath = makeBinPath [ out rcs cvs git coreutils rsync ];
     in ''
       for prog in cvs-fast-export cvsconvert cvssync; do
         wrapProgram $out/bin/$prog \
diff --git a/pkgs/applications/version-management/cvs2svn/default.nix b/pkgs/applications/version-management/cvs2svn/default.nix
index 870248ed75d..85749f978d1 100644
--- a/pkgs/applications/version-management/cvs2svn/default.nix
+++ b/pkgs/applications/version-management/cvs2svn/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
     python ./setup.py install --prefix=$out
     for i in bzr svn git; do
       wrapProgram $out/bin/cvs2$i \
-          --prefix PATH : "${lib.makeSearchPath "bin" [ cvs ]}" \
+          --prefix PATH : "${lib.makeBinPath [ cvs ]}" \
           --set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH"
     done
   '';
diff --git a/pkgs/applications/version-management/git-and-tools/cgit/default.nix b/pkgs/applications/version-management/git-and-tools/cgit/default.nix
index 49e1734fe02..d144d484ed3 100644
--- a/pkgs/applications/version-management/git-and-tools/cgit/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/cgit/default.nix
@@ -28,8 +28,8 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     sed -e 's|"gzip"|"${gzip}/bin/gzip"|' \
-        -e 's|"bzip2"|"${bzip2}/bin/bzip2"|' \
-        -e 's|"xz"|"${xz}/bin/xz"|' \
+        -e 's|"bzip2"|"${bzip2.bin}/bin/bzip2"|' \
+        -e 's|"xz"|"${xz.bin}/bin/xz"|' \
         -i ui-snapshot.c
   '';
 
diff --git a/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix b/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix
index 91fe1662efe..f282fa6635b 100644
--- a/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   buildPhase = ''
     sed -i 's|/bin/cat|cat|' ./src/repository.cpp
     qmake
-    make CXXFLAGS='-I${apr}/include/apr-1 -I${subversion}/include/subversion-1 -DVER="\"${src.rev}\""'
+    make CXXFLAGS='-I${apr}/include/apr-1 -I${subversion.dev}/include/subversion-1 -DVER="\"${src.rev}\""'
   '';
 
   installPhase = ''
diff --git a/pkgs/applications/version-management/mercurial/default.nix b/pkgs/applications/version-management/mercurial/default.nix
index b99727b2c9b..f44baad4715 100644
--- a/pkgs/applications/version-management/mercurial/default.nix
+++ b/pkgs/applications/version-management/mercurial/default.nix
@@ -3,7 +3,7 @@
 , ApplicationServices, cf-private }:
 
 let
-  version = "3.7.1";
+  version = "3.7.3";
   name = "mercurial-${version}";
 in
 
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://mercurial.selenic.com/release/${name}.tar.gz";
-    sha256 = "1vfgqlb8z2k1vcx2nvcianxmml79cqqqncchw6aj40sa8hgpvlwn";
+    sha256 = "0c2vkad9piqkggyk8y310rf619qgdfcwswnk3nv21mg2fhnw96f0";
   };
 
   inherit python; # pass it so that the same version can be used in hg2git
diff --git a/pkgs/applications/version-management/rabbitvcs/default.nix b/pkgs/applications/version-management/rabbitvcs/default.nix
index 58b29c10ae3..0f2f7646ac6 100644
--- a/pkgs/applications/version-management/rabbitvcs/default.nix
+++ b/pkgs/applications/version-management/rabbitvcs/default.nix
@@ -17,7 +17,7 @@ python2Packages.buildPythonApplication rec {
       sed -ie 's|if sys\.argv\[1\] == "install":|if False:|' ./setup.py
       sed -ie "s|PREFIX = sys.prefix|PREFIX = \"$out\"|" ./setup.py
       sed -ie 's|/usr/bin/meld|${meld}/bin/meld|' ./rabbitvcs/util/configspec/configspec.ini
-      sed -ie 's|/usr/bin/svnadmin|${subversion}/bin/svnadmin|' ./rabbitvcs/ui/create.py
+      sed -ie 's|/usr/bin/svnadmin|${subversion.out}/bin/svnadmin|' ./rabbitvcs/ui/create.py
       sed -ie "s|/usr/share/doc|$out/share/doc|" ./rabbitvcs/ui/about.py
       sed -ie "s|gnome-open|xdg-open|" ./rabbitvcs/util/helper.py
     '';
diff --git a/pkgs/applications/version-management/rapidsvn/default.nix b/pkgs/applications/version-management/rapidsvn/default.nix
index 843fe9ad323..9397aa8a1e1 100644
--- a/pkgs/applications/version-management/rapidsvn/default.nix
+++ b/pkgs/applications/version-management/rapidsvn/default.nix
@@ -10,8 +10,8 @@ stdenv.mkDerivation {
 
   buildInputs = [ wxGTK subversion apr aprutil python ];
 
-  configureFlags = [ "--with-svn-include=${subversion}/include" 
-    "--with-svn-lib=${subversion}/lib" ];
+  configureFlags = [ "--with-svn-include=${subversion.dev}/include"
+    "--with-svn-lib=${subversion.out}/lib" ];
 
   meta = {
     description = "Multi-platform GUI front-end for the Subversion revision system";
diff --git a/pkgs/applications/version-management/redmine/bootstrap.nix b/pkgs/applications/version-management/redmine/bootstrap.nix
index 5971f2e9cdd..82643f18a55 100644
--- a/pkgs/applications/version-management/redmine/bootstrap.nix
+++ b/pkgs/applications/version-management/redmine/bootstrap.nix
@@ -32,8 +32,8 @@ in stdenv.mkDerivation rec {
 
     bundle config --local build.nokogiri --use-system-libraries \
       --with-iconv-dir=${libiconv} \
-      --with-xslt-dir=${libxslt} \
-      --with-xml2-dir=${libxml2} \
+      --with-xslt-dir=${libxslt.out} \
+      --with-xml2-dir=${libxml2.out} \
       --with-pkg-config \
       --with-pg-config=${postgresql}/bin/pg_config
 
diff --git a/pkgs/applications/version-management/reposurgeon/default.nix b/pkgs/applications/version-management/reposurgeon/default.nix
index 5c2dde95572..669151adbcc 100644
--- a/pkgs/applications/version-management/reposurgeon/default.nix
+++ b/pkgs/applications/version-management/reposurgeon/default.nix
@@ -46,12 +46,12 @@ mkDerivation rec {
 
   postInstall =
     let
-      binpath = makeSearchPath "bin" (
+      binpath = makeBinPath (
         filter (x: x != null)
         [ out git bazaar cvs darcs fossil mercurial
           monotone rcs src subversion cvs_fast_export ]
       );
-      pythonpath = makeSearchPath (python27.sitePackages) (
+      pythonpath = makeSearchPathOutputs python27.sitePackages ["lib"] (
         filter (x: x != null)
         [ python27Packages.readline or null python27Packages.hglib or null ]
       );
diff --git a/pkgs/applications/version-management/smartgithg/default.nix b/pkgs/applications/version-management/smartgithg/default.nix
index 292d6fc934b..51d70156e9c 100644
--- a/pkgs/applications/version-management/smartgithg/default.nix
+++ b/pkgs/applications/version-management/smartgithg/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
     pkg_path = "$out/${name}";
     bin_path = "$out/bin";
     install_freedesktop_items = ./install_freedesktop_items.sh;
-    runtime_paths = lib.makeSearchPath "bin" [
+    runtime_paths = lib.makeBinPath [
       jre
       #git mercurial subversion # the paths are requested in configuration
       which
diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix
index 08b07b64b68..da21c29e6f9 100644
--- a/pkgs/applications/version-management/subversion/default.nix
+++ b/pkgs/applications/version-management/subversion/default.nix
@@ -26,6 +26,9 @@ let
       inherit sha256;
     };
 
+  # Can't do separate $lib and $bin, as libs reference bins
+  outputs = [ "dev" "out" "man" ];
+
     buildInputs = [ zlib apr aprutil sqlite ]
       ++ stdenv.lib.optional httpSupport serf
       ++ stdenv.lib.optional pythonBindings python
@@ -65,6 +68,12 @@ let
 
       mkdir -p $out/share/bash-completion/completions
       cp tools/client-side/bash_completion $out/share/bash-completion/completions/subversion
+
+    for f in $out/lib/*.la; do
+      substituteInPlace $f --replace "${expat.dev}/lib" "${expat.out}/lib"
+      substituteInPlace $f --replace "${zlib.dev}/lib" "${zlib.out}/lib"
+      substituteInPlace $f --replace "${sqlite.dev}/lib" "${sqlite.out}/lib"
+    done
     '';
 
     inherit perlBindings pythonBindings;
diff --git a/pkgs/applications/version-management/tortoisehg/default.nix b/pkgs/applications/version-management/tortoisehg/default.nix
index ec20122d0ce..60e71351208 100644
--- a/pkgs/applications/version-management/tortoisehg/default.nix
+++ b/pkgs/applications/version-management/tortoisehg/default.nix
@@ -1,25 +1,24 @@
-{ pkgs, lib, mercurial, pyPackages ? pkgs.python27Packages }:
+{lib, fetchurl, mercurial, pythonPackages}:
 
-pkgs.buildPythonApplication rec {
+pythonPackages.buildPythonApplication rec {
     name = "tortoisehg-${version}";
-    version = "3.6";
+    version = "3.7.1";
     namePrefix = "";
 
-    src = pkgs.fetchurl {
+    src = fetchurl {
       url = "https://bitbucket.org/tortoisehg/targz/downloads/${name}.tar.gz";
-      sha256 = "ec43d13f029bb23a12129d2a2c3b3b4daf3d8121cbb5c9c23e4872f7b0b75ad8";
+      sha256 = "1ycf8knwk1rs99s5caq611sk4c4nzwyzq8g35hw5kwj15b6dl4k6";
     };
 
-    pythonPath = [ pkgs.pyqt4 mercurial ]
-       ++ (with pyPackages; [qscintilla iniparse]);
+    pythonPath = with pythonPackages; [ pyqt4 mercurial qscintilla iniparse ];
 
-    propagatedBuildInputs = with pyPackages; [ qscintilla iniparse ];
+    propagatedBuildInputs = with pythonPackages; [ qscintilla iniparse ];
 
     doCheck = false;
 
     postUnpack = ''
      substituteInPlace $sourceRoot/setup.py \
-       --replace "/usr/share/" "$out/share/"
+       --replace "sharedir = os.path.join(installcmd.install_data[rootlen:], 'share')" "sharedir = '$out/share/'"
     '';
 
     postInstall = ''
diff --git a/pkgs/applications/video/avidemux/default.nix b/pkgs/applications/video/avidemux/default.nix
index 177f3d1b20c..96017a7ba19 100644
--- a/pkgs/applications/video/avidemux/default.nix
+++ b/pkgs/applications/video/avidemux/default.nix
@@ -1,7 +1,9 @@
 { stdenv, lib, fetchurl, cmake, pkgconfig, lndir
-, zlib, gettext, libvdpau, libva, libXv, sqlite, x265
-, yasm, fribidi, gtk3, qt4
+, zlib, gettext, libvdpau, libva, libXv, sqlite
+, yasm, freetype, fontconfig, fribidi, gtk3, qt4
+, withX265 ? true, x265
 , withX264 ? true, x264
+, withXvid ? true, xvidcore
 , withLAME ? true, lame
 , withFAAC ? false, faac
 , withVorbis ? true, libvorbis
@@ -11,8 +13,7 @@
 , withVPX ? true, libvpx
 }:
 
-stdenv.mkDerivation rec {
-  name = "avidemux-${version}";
+let
   version = "2.6.12";
 
   src = fetchurl {
@@ -20,96 +21,108 @@ stdenv.mkDerivation rec {
     sha256 = "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn";
   };
 
-  nativeBuildInputs = [ cmake pkgconfig yasm lndir ];
-  buildInputs = [ zlib gettext libvdpau libva libXv sqlite x265 fribidi gtk3 qt4 ]
-             ++ lib.optional withX264 x264
-             ++ lib.optional withLAME lame
-             ++ lib.optional withFAAC faac
-             ++ lib.optional withVorbis libvorbis
-             ++ lib.optional withPulse libpulseaudio
-             ++ lib.optional withFAAD faad2
-             ++ lib.optional withOpus libopus
-             ++ lib.optional withVPX libvpx
-             ;
-
-  enableParallelBuilding = false;
-
-  outputs = [ "out" "cli" "gtk" "qt4" ];
-
-  patches = [ ./dynamic_install_dir.patch ];
-
-  buildCommand = ''
-    unpackPhase
-    cd "$sourceRoot"
-    patchPhase
-
-    export cmakeFlags="$cmakeFlags -DAVIDEMUX_SOURCE_DIR=$(pwd)"
-
-    function buildOutput() {
-      ( plugin_ui="$1"
-        output_dir="$2"
-        shift 2
-        export cmakeFlags="$cmakeFlags -DPLUGIN_UI=$plugin_ui -DCMAKE_INSTALL_PREFIX=$output_dir"
-        for i in "$@" avidemux_plugins; do
-          ( cd "$i"
-            cmakeConfigurePhase
-            buildPhase
-            installPhase
-          )
-        done
-        rm -rf avidemux_plugins/build
-      )
-    }
-
-    function buildUi() {
-      plugin_ui="$1"
-      output_dir="$2"
-      shift 2
-
-      # Hack to split builds properly
-      mkdir -p $output_dir
-      lndir $out $output_dir
-      buildOutput $plugin_ui $output_dir "$@"
-    }
-
-    function fixupUi() {
-      output_dir="$1"
-      shift
-
-      find $output_dir -lname $out\* -delete
-      find $output_dir -type f | while read -r f; do
-        rpath="$(patchelf --print-rpath $f 2>/dev/null)" || continue
-        new_rpath=""
-        IFS=':' read -ra old_rpath <<< "$rpath"
-        for p in "''${old_rpath[@]}"; do
-          new_rpath="$new_rpath:$p"
-          if [[ $p = $output_dir* ]]; then
-            new_rpath="$new_rpath:$out/''${p#$output_dir}"
-          fi
-        done
-        patchelf --set-rpath "$new_rpath" $f
-        patchelf --shrink-rpath $f
+  common = {
+    inherit version src;
+
+    patches = [ ./dynamic_install_dir.patch ];
+
+    enableParallelBuilding = false;
+
+    nativeBuildInputs = [ cmake pkgconfig yasm ];
+    buildInputs = [ zlib gettext libvdpau libva libXv sqlite fribidi fontconfig freetype ]
+                  ++ lib.optional withX264 x264
+                  ++ lib.optional withX265 x265
+                  ++ lib.optional withXvid xvidcore
+                  ++ lib.optional withLAME lame
+                  ++ lib.optional withFAAC faac
+                  ++ lib.optional withVorbis libvorbis
+                  ++ lib.optional withPulse libpulseaudio
+                  ++ lib.optional withFAAD faad2
+                  ++ lib.optional withOpus libopus
+                  ++ lib.optional withVPX libvpx
+                  ;
+
+    meta = {
+      homepage = http://fixounet.free.fr/avidemux/;
+      description = "Free video editor designed for simple video editing tasks";
+      maintainers = with stdenv.lib.maintainers; [ viric abbradar ];
+      platforms = with stdenv.lib.platforms; linux;
+      license = stdenv.lib.licenses.gpl2;
+    };
+  };
+
+  core = stdenv.mkDerivation (common // {
+    name = "avidemux-${version}";
+
+    preConfigure = ''
+      cd avidemux_core
+    '';
+  });
+
+  buildPlugin = args: stdenv.mkDerivation (common // {
+    name = "avidemux-${args.pluginName}-${version}";
+
+    buildInputs = (args.buildInputs or []) ++ common.buildInputs ++ [ lndir ];
+
+    cmakeFlags = [ "-DPLUGIN_UI=${args.pluginUi}" ];
+
+    passthru.isUi = args.isUi or false;
+
+    buildCommand = ''
+      unpackPhase
+      cd "$sourceRoot"
+      patchPhase
+
+      mkdir $out
+      lndir ${core} $out
+
+      export cmakeFlags="$cmakeFlags -DAVIDEMUX_SOURCE_DIR=$(pwd)"
+
+      for i in ${toString (args.buildDirs or [])} avidemux_plugins; do
+        ( cd "$i"
+          cmakeConfigurePhase
+          buildPhase
+          installPhase
+        )
       done
-    }
-
-    buildOutput COMMON $out avidemux_core
-    buildOutput SETTINGS $out
-    buildUi CLI $cli avidemux/cli
-    buildUi GTK $gtk avidemux/gtk
-    buildUi QT4 $qt4 avidemux/qt4
-
-    fixupPhase
-
-    fixupUi $cli
-    fixupUi $gtk
-    fixupUi $qt4
-  '';
-
-  meta = {
-    homepage = http://fixounet.free.fr/avidemux/;
-    description = "Free video editor designed for simple video editing tasks";
-    maintainers = with stdenv.lib.maintainers; [ viric abbradar ];
-    platforms = with stdenv.lib.platforms; linux;
-    license = stdenv.lib.licenses.gpl2;
+
+      fixupPhase
+    '';
+  });
+
+in {
+  avidemux_core = core;
+
+  avidemux_cli = buildPlugin {
+    pluginName = "cli";
+    pluginUi = "CLI";
+    isUi = true;
+    buildDirs = [ "avidemux/cli" ];
+  };
+
+  avidemux_qt4 = buildPlugin {
+    pluginName = "qt4";
+    buildInputs = [ qt4 ];
+    pluginUi = "QT4";
+    isUi = true;
+    buildDirs = [ "avidemux/qt4" ];
+  };
+
+  avidemux_gtk = buildPlugin {
+    pluginName = "gtk";
+    buildInputs = [ gtk3 ];
+    pluginUi = "GTK";
+    isUi = true;
+    buildDirs = [ "avidemux/gtk" ];
+  };
+
+  avidemux_common = buildPlugin {
+    pluginName = "common";
+    pluginUi = "COMMON";
+  };
+
+  avidemux_settings = buildPlugin {
+    pluginName = "settings";
+    pluginUi = "SETTINGS";
   };
 }
diff --git a/pkgs/applications/video/avidemux/wrapper.nix b/pkgs/applications/video/avidemux/wrapper.nix
index ad41f56d39d..1d1c66cb9fe 100644
--- a/pkgs/applications/video/avidemux/wrapper.nix
+++ b/pkgs/applications/video/avidemux/wrapper.nix
@@ -1,15 +1,18 @@
-{ buildEnv, avidemux, makeWrapper
+{ buildEnv, avidemux_unwrapped, makeWrapper
 # GTK version is broken upstream, see https://bugzilla.redhat.com/show_bug.cgi?id=1244340
 , withUi ? "qt4"
 }:
 
-let
-  ui = builtins.getAttr withUi avidemux;
+let ui = builtins.getAttr "avidemux_${withUi}" avidemux_unwrapped; in
 
-in buildEnv {
-  name = "avidemux-${withUi}-" + avidemux.version;
+assert ui.isUi;
 
-  paths = [ avidemux ui ];
+buildEnv {
+  name = "avidemux-${withUi}-" + ui.version;
+
+  paths = [ ui avidemux_unwrapped.avidemux_common avidemux_unwrapped.avidemux_settings ];
+
+  ignoreCollisions = true;
 
   buildInputs = [ makeWrapper ];
 
@@ -26,4 +29,6 @@ in buildEnv {
       wrapProgram $i --set ADM_ROOT_DIR $out
     done
   '';
+
+  meta = ui.meta;
 }
diff --git a/pkgs/applications/video/avxsynth/default.nix b/pkgs/applications/video/avxsynth/default.nix
index d8ec715a38c..06dcaf31b44 100644
--- a/pkgs/applications/video/avxsynth/default.nix
+++ b/pkgs/applications/video/avxsynth/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
     "--enable-subtitle"
     "--enable-ffms2"
     (enableFeature avxeditSupport "avxedit")
-    "--with-jpeg=${libjpeg}/lib"
+    "--with-jpeg=${libjpeg.out}/lib"
   ];
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
diff --git a/pkgs/applications/video/bomi/default.nix b/pkgs/applications/video/bomi/default.nix
index f1a999e5554..f9301781fc1 100644
--- a/pkgs/applications/video/bomi/default.nix
+++ b/pkgs/applications/video/bomi/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, perl, python, which, makeWrapper
+{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, perl, python, which, makeQtWrapper
 , libX11, libxcb, mesa
 , qtbase, qtdeclarative, qtquickcontrols, qttools, qtx11extras
 , ffmpeg
@@ -27,9 +27,6 @@ assert pulseSupport -> libpulseaudio != null;
 assert cddaSupport -> libcdda != null;
 assert youtubeSupport -> youtube-dl != null;
 
-let qtPath = makeSearchPath "lib/qt5/qml" [ qtdeclarative qtquickcontrols ];
-in
-
 stdenv.mkDerivation rec {
   name = "bomi-${version}";
   version = "0.9.11";
@@ -56,6 +53,7 @@ stdenv.mkDerivation rec {
                   libvdpau
                   libva
                   libbluray
+                  qtdeclarative
                   qtquickcontrols
                 ]
                 ++ optional jackSupport jack
@@ -74,8 +72,7 @@ stdenv.mkDerivation rec {
   '';
 
   postInstall = ''
-    wrapProgram $out/bin/bomi \
-      --set QML2_IMPORT_PATH ${qtPath} \
+    wrapQtProgram $out/bin/bomi \
       ${optionalString youtubeSupport "--prefix PATH ':' '${youtube-dl}/bin'"}
   '';
 
@@ -87,7 +84,7 @@ stdenv.mkDerivation rec {
                    ++ optional cddaSupport "--enable-cdda"
                    ;
 
-  nativeBuildInputs = [ pkgconfig perl python which qttools makeWrapper ];
+  nativeBuildInputs = [ pkgconfig perl python which qttools makeQtWrapper ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/applications/video/clipgrab/default.nix b/pkgs/applications/video/clipgrab/default.nix
index 961471cd9b3..e634a0caa3f 100644
--- a/pkgs/applications/video/clipgrab/default.nix
+++ b/pkgs/applications/video/clipgrab/default.nix
@@ -14,8 +14,8 @@ stdenv.mkDerivation rec {
 
   postPatch = stdenv.lib.optionalString (ffmpeg != null) ''
   substituteInPlace converter_ffmpeg.cpp \
-    --replace '"ffmpeg"' '"${ffmpeg}/bin/ffmpeg"' \
-    --replace '"ffmpeg ' '"${ffmpeg}/bin/ffmpeg '
+    --replace '"ffmpeg"' '"${ffmpeg.bin}/bin/ffmpeg"' \
+    --replace '"ffmpeg ' '"${ffmpeg.bin}/bin/ffmpeg '
   '';
 
   configurePhase = ''
diff --git a/pkgs/applications/video/dvd-slideshow/default.nix b/pkgs/applications/video/dvd-slideshow/default.nix
index fe95c2c6d7d..040a7a2e7a6 100644
--- a/pkgs/applications/video/dvd-slideshow/default.nix
+++ b/pkgs/applications/video/dvd-slideshow/default.nix
@@ -4,7 +4,7 @@ let
   wrapper = writeScript "dvd-slideshow.sh" ''
       #!/bin/bash
       # wrapper script for dvd-slideshow programs
-      export PATH=${cdrtools}/bin:${dvdauthor}/bin:${ffmpeg}/bin:${imagemagick}/bin:${lame}/bin:${mjpegtools}/bin:${sox}/bin:${transcode}/bin:${vorbis-tools}/bin:$PATH
+      export PATH=${cdrtools}/bin:${dvdauthor}/bin:${ffmpeg.bin}/bin:${imagemagick}/bin:${lame}/bin:${mjpegtools}/bin:${sox}/bin:${transcode}/bin:${vorbis-tools}/bin:$PATH
 
       dir=`dirname "$0"`
       exe=`basename "$0"`
diff --git a/pkgs/applications/video/gnash/default.nix b/pkgs/applications/video/gnash/default.nix
index f53ce93328b..0200b0c70f4 100644
--- a/pkgs/applications/video/gnash/default.nix
+++ b/pkgs/applications/video/gnash/default.nix
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
     for lib in $libs; do
       echo -n "$lib " >> macros/libslist
     done
-    echo -n "${stdenv.glibc}/lib" >> macros/libslist
+    echo -n "${stdenv.glibc.out}/lib" >> macros/libslist
 
     # Make sure to honor $TMPDIR, for chroot builds.
     for file in configure gui/Makefile.in Makefile.in
@@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
 
   preConfigure =
     '' configureFlags="                                         \
-         --with-sdl-incl=${SDL}/include/SDL                     \
+         --with-sdl-incl=${SDL.dev}/include/SDL                     \
          --with-npapi-plugindir=$out/plugins                    \
          --enable-media=gst                                     \
          --without-gconf
diff --git a/pkgs/applications/video/kazam/default.nix b/pkgs/applications/video/kazam/default.nix
index 7217f4746c8..22b47c532e5 100644
--- a/pkgs/applications/video/kazam/default.nix
+++ b/pkgs/applications/video/kazam/default.nix
@@ -34,9 +34,9 @@ python3Packages.buildPythonApplication rec {
   preFixup = ''
     wrapProgram $out/bin/kazam \
       --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
-      --prefix LD_LIBRARY_PATH ":" "${gtk3}/lib:${gst_all_1.gstreamer}/lib:${keybinder}/lib" \
+      --prefix LD_LIBRARY_PATH ":" "${gtk3.out}/lib:${gst_all_1.gstreamer}/lib:${keybinder}/lib" \
       --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" \
-      --prefix XDG_DATA_DIRS : "${gtk3}/share" \
+      --prefix XDG_DATA_DIRS : "${gtk3.out}/share" \
       --set GST_REGISTRY "/tmp/kazam.gstreamer.registry";
   '';
 
diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix
index c2b3914f850..6b21f0f6516 100644
--- a/pkgs/applications/video/kodi/default.nix
+++ b/pkgs/applications/video/kodi/default.nix
@@ -1,7 +1,7 @@
 { stdenv, lib, fetchurl, makeWrapper
 , pkgconfig, cmake, gnumake, yasm, pythonFull
 , boost, avahi, libdvdcss, lame, autoreconfHook
-, gettext, pcre, yajl, fribidi, which
+, gettext, pcre-cpp, yajl, fribidi, which
 , openssl, gperf, tinyxml2, taglib, libssh, swig, jre
 , libX11, xproto, inputproto, libxml2
 , libXt, libXmu, libXext, xextproto
@@ -56,7 +56,7 @@ in stdenv.mkDerivation rec {
       makeWrapper libxml2 gnutls
       pkgconfig cmake gnumake yasm pythonFull
       boost libmicrohttpd autoreconfHook
-      gettext pcre yajl fribidi libva
+      gettext pcre-cpp yajl fribidi libva
       openssl gperf tinyxml2 taglib libssh swig jre
       libX11 xproto inputproto which
       libXt libXmu libXext xextproto
@@ -110,15 +110,9 @@ in stdenv.mkDerivation rec {
           --prefix PATH ":" "${pythonFull}/bin" \
           --prefix PATH ":" "${glxinfo}/bin" \
           --prefix PATH ":" "${xdpyinfo}/bin" \
-          --prefix LD_LIBRARY_PATH ":" "${curl}/lib" \
-          --prefix LD_LIBRARY_PATH ":" "${systemd}/lib" \
-          --prefix LD_LIBRARY_PATH ":" "${libmad}/lib" \
-          --prefix LD_LIBRARY_PATH ":" "${libvdpau}/lib" \
-          --prefix LD_LIBRARY_PATH ":" "${libcec}/lib" \
-          --prefix LD_LIBRARY_PATH ":" "${libcec_platform}/lib" \
-          --prefix LD_LIBRARY_PATH ":" "${libass}/lib" \
-          --prefix LD_LIBRARY_PATH ":" "${rtmpdump}/lib" \
-          --prefix LD_LIBRARY_PATH ":" "${SDL2}/lib"
+          --prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath
+              [ curl systemd libmad libvdpau libcec libcec_platform rtmpdump libass SDL2 ]
+            }"
       done
     '';
 
diff --git a/pkgs/applications/video/miro/default.nix b/pkgs/applications/video/miro/default.nix
index 66f249b8e4a..07d60fe4764 100644
--- a/pkgs/applications/video/miro/default.nix
+++ b/pkgs/applications/video/miro/default.nix
@@ -33,7 +33,7 @@ buildPythonApplication rec {
     sed -i -e 's|/usr/bin/||' -e 's|/usr||' \
            -e 's/BUILD_TIME[^,]*/BUILD_TIME=0/' setup.py
 
-    sed -i -e 's|default="/usr/bin/ffmpeg"|default="${ffmpeg}/bin/ffmpeg"|' \
+    sed -i -e 's|default="/usr/bin/ffmpeg"|default="${ffmpeg.bin}/bin/ffmpeg"|' \
       plat/options.py
 
     sed -i -e 's|/usr/share/miro/themes|'"$out/share/miro/themes"'|' \
@@ -64,7 +64,7 @@ buildPythonApplication rec {
     mv "$out/bin/miro.real" "$out/bin/miro"
     wrapProgram "$out/bin/miro" \
       --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" \
-      --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
+      --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \
       --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
   '';
 
diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix
index 7fb62a5e1ac..dd5f25d3a6c 100644
--- a/pkgs/applications/video/mpv/default.nix
+++ b/pkgs/applications/video/mpv/default.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchurl, docutils, makeWrapper, perl, pkgconfig, python, which
 , ffmpeg, freefont_ttf, freetype, libass, libpthreadstubs, lua, lua5_sockets
+, libuchardet, rubberband
 , x11Support ? true, libX11 ? null, libXext ? null, mesa ? null, libXxf86vm ? null
 , xineramaSupport ? true, libXinerama ? null
 , xvSupport ? true, libXv ? null
@@ -59,11 +60,11 @@ in
 
 stdenv.mkDerivation rec {
   name = "mpv-${version}";
-  version = "0.16.0";
+  version = "0.17.0";
 
   src = fetchurl {
     url = "https://github.com/mpv-player/mpv/archive/v${version}.tar.gz";
-    sha256 = "1fiqxx85s418qynq2fp0v7cpzrz8j285hwmc4fqgn5ny1vg1jdpw";
+    sha256 = "0vms3viwqcwl1mrgmf2yy4c69fvv7xpbkyrl693l6zpwynqd4b30";
   };
 
   patchPhase = ''
@@ -89,7 +90,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ docutils makeWrapper perl pkgconfig python which ];
 
   buildInputs = [
-    ffmpeg freetype libass libpthreadstubs lua lua5_sockets
+    ffmpeg freetype libass libpthreadstubs lua lua5_sockets libuchardet rubberband
   ] ++ optionals x11Support [ libX11 libXext mesa libXxf86vm ]
     ++ optional alsaSupport alsaLib
     ++ optional xvSupport libXv
diff --git a/pkgs/applications/video/shotcut/default.nix b/pkgs/applications/video/shotcut/default.nix
index 74f9c1604b2..d2400475a0b 100644
--- a/pkgs/applications/video/shotcut/default.nix
+++ b/pkgs/applications/video/shotcut/default.nix
@@ -11,7 +11,11 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ SDL frei0r gettext makeWrapper mlt pkgconfig qtbase ];
 
-  configurePhase = "qmake PREFIX=$out";
+  configurePhase = ''
+    runHook preConfigure
+    qmake PREFIX=$out
+    runHook postConfigure
+  '';
 
   postInstall = ''
     mkdir -p $out/share/shotcut
diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix
index a84f24a303a..a23bb9a1a94 100644
--- a/pkgs/applications/video/vlc/default.nix
+++ b/pkgs/applications/video/vlc/default.nix
@@ -9,13 +9,13 @@
 , libvdpau, libsamplerate, live555, fluidsynth
 , onlyLibVLC ? false
 , qt4 ? null
-, withQt5 ? false, qtbase ? null
+, withQt5 ? false, qtbase ? null, qtx11extras ? null
 , jackSupport ? false
 }:
 
 with stdenv.lib;
 
-assert (withQt5 -> qtbase != null);
+assert (withQt5 -> qtbase != null && qtx11extras != null);
 assert (!withQt5 -> qt4 != null);
 
 stdenv.mkDerivation rec {
@@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
       fluidsynth
     ]
     ++ [(if withQt5 then qtbase else qt4)]
+    ++ optional withQt5 qtx11extras
     ++ optional jackSupport libjack2;
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/applications/virtualization/bochs/default.nix b/pkgs/applications/virtualization/bochs/default.nix
index 952ae1f922d..8c420b11f55 100644
--- a/pkgs/applications/virtualization/bochs/default.nix
+++ b/pkgs/applications/virtualization/bochs/default.nix
@@ -143,8 +143,8 @@ stdenv.mkDerivation rec {
     ++ stdenv.lib.optional busMouse "--enable-busmouse"
     ;
 
-  NIX_CFLAGS_COMPILE="-I${gtk}/include/gtk-2.0/ -I${libtool}/include/";
-  NIX_LDFLAGS="-L${libtool}/lib";
+  NIX_CFLAGS_COMPILE="-I${gtk.dev}/include/gtk-2.0/ -I${libtool}/include/";
+  NIX_LDFLAGS="-L${libtool.lib}/lib";
 
   hardeningDisable = [ "format" ];
 
diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix
index 65bb6e61117..9be979057dc 100644
--- a/pkgs/applications/virtualization/docker/default.nix
+++ b/pkgs/applications/virtualization/docker/default.nix
@@ -22,12 +22,14 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     makeWrapper go sqlite iproute bridge-utils devicemapper btrfs-progs
-    iptables e2fsprogs systemd pkgconfig
+    iptables e2fsprogs systemd pkgconfig stdenv.glibc stdenv.glibc.static
   ];
 
   dontStrip = true;
 
-  DOCKER_BUILDTAGS = [ "journald" ];
+  DOCKER_BUILDTAGS = [ "journald" ]
+    ++ optional (btrfs-progs == null) "exclude_graphdriver_btrfs"
+    ++ optional (devicemapper == null) "exclude_graphdriver_devicemapper";
 
   buildPhase = ''
     patchShebangs .
@@ -40,7 +42,7 @@ stdenv.mkDerivation rec {
     install -Dm755 ./bundles/${version}/dynbinary/docker-${version} $out/libexec/docker/docker
     install -Dm755 ./bundles/${version}/dynbinary/dockerinit-${version} $out/libexec/docker/dockerinit
     makeWrapper $out/libexec/docker/docker $out/bin/docker \
-      --prefix PATH : "${iproute}/sbin:sbin:${iptables}/sbin:${e2fsprogs}/sbin:${xz}/bin:${utillinux}/bin:${optionalString enableLxc "${lxc}/bin"}"
+      --prefix PATH : "${iproute}/sbin:sbin:${iptables}/sbin:${e2fsprogs}/sbin:${xz.bin}/bin:${utillinux}/bin:${optionalString enableLxc "${lxc}/bin"}"
 
     # systemd
     install -Dm644 ./contrib/init/systemd/docker.service $out/etc/systemd/system/docker.service
diff --git a/pkgs/applications/virtualization/openstack/keystone.nix b/pkgs/applications/virtualization/openstack/keystone.nix
index 61a366f7ab0..bbce75b5e51 100644
--- a/pkgs/applications/virtualization/openstack/keystone.nix
+++ b/pkgs/applications/virtualization/openstack/keystone.nix
@@ -33,7 +33,7 @@ pythonPackages.buildPythonApplication rec {
     ldap ldappool webtest requests2 oslotest pep8 pymongo which
   ];
 
-  makeWrapperArgs = ["--prefix PATH : '${openssl}/bin:$PATH'"];
+  makeWrapperArgs = ["--prefix PATH : '${openssl.bin}/bin:$PATH'"];
 
   postInstall = ''
     # install .ini files
diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix
index 60599d18922..e31ed7e509c 100644
--- a/pkgs/applications/virtualization/virt-manager/default.nix
+++ b/pkgs/applications/virtualization/virt-manager/default.nix
@@ -19,7 +19,7 @@ buildPythonApplication rec {
 
   propagatedBuildInputs =
     [ eventlet greenlet gflags netaddr carrot routes
-      PasteDeploy m2crypto ipy twisted sqlalchemy_migrate_0_7
+      PasteDeploy m2crypto ipy twisted
       distutils_extra simplejson readline glanceclient cheetah lockfile httplib2
       urlgrabber virtinst pyGtkGlade pythonDBus gnome_python pygobject3
       libvirt libxml2Python ipaddr vte libosinfo gobjectIntrospection gtk3 mox
diff --git a/pkgs/applications/virtualization/virtinst/default.nix b/pkgs/applications/virtualization/virtinst/default.nix
index 6064972fe95..d3c2e9e806a 100644
--- a/pkgs/applications/virtualization/virtinst/default.nix
+++ b/pkgs/applications/virtualization/virtinst/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   pythonPath = with pythonPackages;
     [ setuptools eventlet greenlet gflags netaddr carrot routes
-      PasteDeploy m2crypto ipy twisted sqlalchemy_migrate
+      PasteDeploy m2crypto ipy twisted
       distutils_extra simplejson readline glanceclient cheetah lockfile httplib2
       # !!! should libvirt be a build-time dependency?  Note that
       # libxml2Python is a dependency of libvirt.py.
diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix
index e7232f056da..ce7780277d7 100644
--- a/pkgs/applications/virtualization/virtualbox/default.nix
+++ b/pkgs/applications/virtualization/virtualbox/default.nix
@@ -83,14 +83,14 @@ in stdenv.mkDerivation {
         -e 's@MKISOFS --version@MKISOFS -version@' \
         -e 's@PYTHONDIR=.*@PYTHONDIR=${if pythonBindings then python else ""}@' \
         -i configure
-    ls kBuild/bin/linux.x86/k* tools/linux.x86/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2
-    ls kBuild/bin/linux.amd64/k* tools/linux.amd64/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2
+    ls kBuild/bin/linux.x86/k* tools/linux.x86/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2
+    ls kBuild/bin/linux.amd64/k* tools/linux.amd64/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2
     find . -type f -iname '*makefile*' -exec sed -i -e 's/depmod -a/:/g' {} +
     sed -i -e '
-      s@"libdbus-1\.so\.3"@"${dbus}/lib/libdbus-1.so.3"@g
-      s@"libasound\.so\.2"@"${alsaLib}/lib/libasound.so.2"@g
+      s@"libdbus-1\.so\.3"@"${dbus.lib}/lib/libdbus-1.so.3"@g
+      s@"libasound\.so\.2"@"${alsaLib.out}/lib/libasound.so.2"@g
       ${optionalString pulseSupport ''
-      s@"libpulse\.so\.0"@"${libpulseaudio}/lib/libpulse.so.0"@g
+      s@"libpulse\.so\.0"@"${libpulseaudio.out}/lib/libpulse.so.0"@g
       ''}
     ' src/VBox/Main/xml/Settings.cpp \
       src/VBox/Devices/Audio/{alsa,pulse}_stubs.c \
@@ -197,6 +197,9 @@ in stdenv.mkDerivation {
 
   passthru = { inherit version; /* for guest additions */ };
 
+  # Workaround for https://github.com/NixOS/patchelf/issues/93 (can be removed once this issue is addressed)
+  dontPatchELF = true;
+
   meta = {
     description = "PC emulator";
     homepage = http://www.virtualbox.org/;
diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix
index 1c85723c395..a898325f635 100644
--- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix
+++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix
@@ -65,19 +65,19 @@ stdenv.mkDerivation {
     for i in sbin/VBoxService bin/{VBoxClient,VBoxControl} lib/VBoxGuestAdditions/mount.vboxsf
     do
         ${if stdenv.system == "i686-linux" then ''
-          patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $i
+          patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $i
         ''
         else if stdenv.system == "x86_64-linux" then ''
-          patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $i
+          patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 $i
         ''
         else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions")
         }
-        patchelf --set-rpath ${stdenv.cc.cc}/lib:${dbus}/lib:${libX11}/lib:${libXt}/lib:${libXext}/lib:${libXmu}/lib:${libXfixes}/lib:${libXrandr}/lib:${libXcursor}/lib $i
+        patchelf --set-rpath ${lib.makeLibraryPath [ stdenv.cc.cc dbus libX11 libXt libXext libXmu libXfixes libXrandr libXcursor ]} $i
     done
 
     for i in lib/VBoxOGL*.so
     do
-        patchelf --set-rpath $out/lib:${dbus}/lib:${libXcomposite}/lib:${libXdamage}/lib:${libXext}/lib:${libXfixes}/lib $i
+        patchelf --set-rpath $out/lib:${dbus.lib}/lib:${libXcomposite.out}/lib:${libXdamage.out}/lib:${libXext.out}/lib:${libXfixes.out}/lib $i
     done
 
     # FIXME: Virtualbox 4.3.22 moved VBoxClient-all (required by Guest Additions
diff --git a/pkgs/applications/virtualization/xen/generic.nix b/pkgs/applications/virtualization/xen/generic.nix
index 74cc7531e4c..a62a1a20092 100644
--- a/pkgs/applications/virtualization/xen/generic.nix
+++ b/pkgs/applications/virtualization/xen/generic.nix
@@ -108,7 +108,7 @@ stdenv.mkDerivation {
         --replace /usr/bin/pkill ${procps}/bin/pkill
 
       substituteInPlace tools/xenstat/Makefile \
-        --replace /usr/include/curses.h ${ncurses}/include/curses.h
+        --replace /usr/include/curses.h ${ncurses.dev}/include/curses.h
 
       substituteInPlace tools/qemu-xen-traditional/xen-hooks.mak \
         --replace /usr/include/pci ${pciutils}/include/pci
diff --git a/pkgs/applications/window-managers/awesome/default.nix b/pkgs/applications/window-managers/awesome/default.nix
index 2991169a702..d4721c99200 100644
--- a/pkgs/applications/window-managers/awesome/default.nix
+++ b/pkgs/applications/window-managers/awesome/default.nix
@@ -63,8 +63,8 @@ stdenv.mkDerivation rec {
 
   #cmakeFlags = "-DGENERATE_MANPAGES=ON";
 
-  LD_LIBRARY_PATH = "${cairo}/lib:${pango}/lib:${gobjectIntrospection}/lib";
-  GI_TYPELIB_PATH = "${pango}/lib/girepository-1.0";
+  LD_LIBRARY_PATH = "${stdenv.lib.makeLibraryPath [ cairo pango gobjectIntrospection ]}";
+  GI_TYPELIB_PATH = "${pango.out}/lib/girepository-1.0";
   LUA_CPATH = "${lgi}/lib/lua/${lua.luaversion}/?.so";
   LUA_PATH  = "${lgi}/share/lua/${lua.luaversion}/?.lua;${lgi}/share/lua/${lua.luaversion}/lgi/?.lua";
 
@@ -73,8 +73,8 @@ stdenv.mkDerivation rec {
       --prefix LUA_CPATH ";" '"${lgi}/lib/lua/${lua.luaversion}/?.so"' \
       --prefix LUA_PATH ";" '"${lgi}/share/lua/${lua.luaversion}/?.lua;${lgi}/share/lua/${lua.luaversion}/lgi/?.lua"' \
       --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
-      --prefix LD_LIBRARY_PATH : "${cairo}/lib:${pango}/lib:${gobjectIntrospection}/lib" \
-      --prefix PATH : "${compton}/bin:${unclutter}/bin:${procps}/bin:${iproute}/sbin:${coreutils}/bin:${curl}/bin:${alsaUtils}/bin:${findutils}/bin:${xterm}/bin"
+      --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH" \
+      --prefix PATH : "${compton}/bin:${unclutter}/bin:${procps}/bin:${iproute}/sbin:${coreutils}/bin:${curl.bin}/bin:${alsaUtils}/bin:${findutils}/bin:${xterm}/bin"
 
     wrapProgram $out/bin/awesome-client \
       --prefix PATH : "${which}/bin"
diff --git a/pkgs/applications/window-managers/bspwm/default.nix b/pkgs/applications/window-managers/bspwm/default.nix
index fbe7e33baad..641716ab2fc 100644
--- a/pkgs/applications/window-managers/bspwm/default.nix
+++ b/pkgs/applications/window-managers/bspwm/default.nix
@@ -1,12 +1,13 @@
 { stdenv, fetchurl, libxcb, libXinerama, sxhkd, xcbutil, xcbutilkeysyms, xcbutilwm }:
 
 stdenv.mkDerivation rec {
-  name = "bspwm-0.9";
-  
+  name = "bspwm-${version}";
+  version = "0.9.1";
+
 
   src = fetchurl {
-    url = "https://github.com/baskerville/bspwm/archive/0.9.tar.gz";
-    sha256 = "1efb2db7b8a251bcc006d66a050cf66e9d311761c94890bebf91a32905042fde";
+    url = "https://github.com/baskerville/bspwm/archive/${version}.tar.gz";
+    sha256 = "11dvfcvr8bc116yb3pvl0k1h2gfm9rv652jbxd1c5pmc0yimifq2";
   };
 
   buildInputs = [ libxcb libXinerama xcbutil xcbutilkeysyms xcbutilwm ];
@@ -14,7 +15,7 @@ stdenv.mkDerivation rec {
   buildPhase = ''
     make PREFIX=$out
   '';
- 
+
   installPhase = ''
     make PREFIX=$out install
   '';
diff --git a/pkgs/applications/window-managers/fvwm/default.nix b/pkgs/applications/window-managers/fvwm/default.nix
index aded77a466d..77263293847 100644
--- a/pkgs/applications/window-managers/fvwm/default.nix
+++ b/pkgs/applications/window-managers/fvwm/default.nix
@@ -1,7 +1,7 @@
 { gestures ? false
 , stdenv, fetchurl, pkgconfig
 , cairo, fontconfig, freetype, libXft, libXcursor, libXinerama
-, libXpm, librsvg, libpng, fribidi, perl
+, libXpm, libXt, librsvg, libpng, fribidi, perl
 , libstroke ? null
 }:
 
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     pkgconfig cairo fontconfig freetype
-    libXft libXcursor libXinerama libXpm
+    libXft libXcursor libXinerama libXpm libXt
     librsvg libpng fribidi perl
   ] ++ stdenv.lib.optional gestures libstroke;
 
diff --git a/pkgs/applications/window-managers/jwm/default.nix b/pkgs/applications/window-managers/jwm/default.nix
index adbdef5e284..540e5d1c1e6 100644
--- a/pkgs/applications/window-managers/jwm/default.nix
+++ b/pkgs/applications/window-managers/jwm/default.nix
@@ -1,22 +1,24 @@
 { stdenv, fetchurl, pkgconfig, automake, autoconf, libtool, which, xorg,
-  libX11, libXext, libXinerama, libXpm, libXft, libXau, libXdmcp, libpng,
-  libjpeg, expat, xproto, xextproto, xineramaproto, librsvg, gettext,
+  libX11, libXext, libXinerama, libXpm, libXft, libXau, libXdmcp, libXmu,
+  libpng, libjpeg, expat, xproto, xextproto, xineramaproto, librsvg, gettext,
   freetype, fontconfig }:
 
 stdenv.mkDerivation rec {
   name = "jwm-${version}";
-  version = "1406";
+  version = "1495";
   
   src = fetchurl {
      url = "https://github.com/joewing/jwm/archive/s${version}.tar.gz";
-     sha256 = "0yk22b7cshhyfpcqnb4p59yxspx95xg9yp1kmkxi2fyw95cacab4";
+     sha256 = "0sn9la3k36k1d9qyxab1sbv2mqicq2w7q4wgy4bj8d48zc8xjy6v";
   };
 
-  nativeBuildInputs = [ pkgconfig automake autoconf libtool which ];
+  nativeBuildInputs = [ pkgconfig automake autoconf libtool which gettext ];
 
   buildInputs = [ libX11 libXext libXinerama libXpm libXft xorg.libXrender
-    libXau libXdmcp libpng libjpeg expat xproto xextproto xineramaproto
-    librsvg gettext freetype fontconfig ];
+    libXau libXdmcp libXmu libpng libjpeg expat xproto xextproto xineramaproto
+    librsvg freetype fontconfig ];
+
+  enableParallelBuilding = true;
 
   preConfigure = "./autogen.sh";
 
diff --git a/pkgs/applications/window-managers/lemonbar/xft.nix b/pkgs/applications/window-managers/lemonbar/xft.nix
index c671f1a4e03..f5dd944a43d 100644
--- a/pkgs/applications/window-managers/lemonbar/xft.nix
+++ b/pkgs/applications/window-managers/lemonbar/xft.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, perl, libxcb, libXft }:
+{ stdenv, fetchFromGitHub, perl, libxcb, libXft }:
 
 let
   version = "2015-07-23";
@@ -6,10 +6,11 @@ in
   stdenv.mkDerivation rec {
     name = "bar-xft-git-${version}";
 
-    src = fetchgit {
-      url = "https://github.com/krypt-n/bar";
-      rev = "020a3e1848ce03287886e9ff80b0b443e9aed543";
-      sha256 = "1xzs37syhlwyjfxnk36qnij5bqa0mi53lf1k851viw4qai2bfkgr";
+    src = fetchFromGitHub {
+      owner = "krypt-n";
+      repo = "bar";
+      rev = "3020df19232153f9e98ae0c8111db3de938a2719";
+      sha256 = "0a54yr534jd4l5gjzpypc0y5lh2qb2wsrd662s84jjgq8bpss8av";
     };
 
     buildInputs = [ libxcb libXft perl ];
diff --git a/pkgs/applications/window-managers/qtile/default.nix b/pkgs/applications/window-managers/qtile/default.nix
index f2f864506d3..4060b9887f7 100644
--- a/pkgs/applications/window-managers/qtile/default.nix
+++ b/pkgs/applications/window-managers/qtile/default.nix
@@ -24,9 +24,9 @@ buildPythonApplication rec {
 
   postPatch = ''
     substituteInPlace libqtile/manager.py --subst-var-by out $out
-    substituteInPlace libqtile/pangocffi.py --subst-var-by glib ${pkgs.glib}
-    substituteInPlace libqtile/pangocffi.py --subst-var-by pango ${pkgs.pango}
-    substituteInPlace libqtile/xcursors.py --subst-var-by xcb-cursor ${pkgs.xorg.xcbutilcursor}
+    substituteInPlace libqtile/pangocffi.py --subst-var-by glib ${pkgs.glib.out}
+    substituteInPlace libqtile/pangocffi.py --subst-var-by pango ${pkgs.pango.out}
+    substituteInPlace libqtile/xcursors.py --subst-var-by xcb-cursor ${pkgs.xorg.xcbutilcursor.out}
   '';
 
   buildInputs = [ pkgs.pkgconfig pkgs.glib pkgs.xorg.libxcb pkgs.cairo pkgs.pango python27Packages.xcffib ];
diff --git a/pkgs/applications/window-managers/sxhkd/default.nix b/pkgs/applications/window-managers/sxhkd/default.nix
index f9165e0bbd4..b78b15f7914 100644
--- a/pkgs/applications/window-managers/sxhkd/default.nix
+++ b/pkgs/applications/window-managers/sxhkd/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "sxhkd-${version}";
-  version = "0.5.5";
+  version = "0.5.6";
 
   src = fetchurl {
     url = "https://github.com/baskerville/sxhkd/archive/${version}.tar.gz";
-    sha256 = "04s3y2bq9502gw72jj3y2zsh96yj3qg2av3zsa8ahd2farvrysg6";
+    sha256 = "15grmzpxz5fqlbfg2slj7gb7r6nzkvjmflmbkqx7mlby9pm6wdkj";
   };
 
   buildInputs = [ asciidoc libxcb xcbutil xcbutilkeysyms xcbutilwm ];
diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix
index 862e8b0ea01..8c722784747 100644
--- a/pkgs/applications/window-managers/weston/default.nix
+++ b/pkgs/applications/window-managers/weston/default.nix
@@ -1,24 +1,24 @@
 { stdenv, fetchurl, pkgconfig, wayland, mesa, libxkbcommon, cairo, libxcb
 , libXcursor, xlibsWrapper, udev, libdrm, mtdev, libjpeg, pam, dbus, libinput
 , pango ? null, libunwind ? null, freerdp ? null, vaapi ? null, libva ? null
-, libwebp ? null, xwayland ? null
+, libwebp ? null, xwayland ? null, wayland-protocols
 # beware of null defaults, as the parameters *are* supplied by callPackage by default
 }:
 
 stdenv.mkDerivation rec {
   name = "weston-${version}";
-  version = "1.9.0";
+  version = "1.10.0";
 
   src = fetchurl {
     url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
-    sha256 = "1ks8mja6glzy2dkayi535hd6w5c5h021bqk7vzgv182g33rh66ww";
+    sha256 = "1hd5593zz5s3s07vb6linp6akbs62wy2ijh3g7gksafq016h1cp0";
   };
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [
     wayland mesa libxkbcommon cairo libxcb libXcursor xlibsWrapper udev libdrm
-    mtdev libjpeg pam dbus.libs libinput pango libunwind freerdp vaapi libva
-    libwebp
+    mtdev libjpeg pam dbus libinput pango libunwind freerdp vaapi libva
+    libwebp wayland-protocols
   ];
 
   configureFlags = [
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
     ++ stdenv.lib.optional (vaapi != null) "--enabe-vaapi-recorder"
     ++ stdenv.lib.optionals (xwayland != null) [
         "--enable-xwayland"
-        "--with-xserver-path=${xwayland}/bin/Xwayland"
+        "--with-xserver-path=${xwayland.out}/bin/Xwayland"
       ];
 
   meta = with stdenv.lib; {