summary refs log tree commit diff
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-07-22 22:33:55 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-07-22 22:33:55 +0200
commit2cacf77c1397831a07ff87fd9e500fa4fcb5ce42 (patch)
treebbd6e18656449d654ee949287d58c842db007a98
parent055ad0e4e967897e8c531c84a8ff8ec0b3ca6185 (diff)
parent3064b6a0cc4dc047fae97bdffa0725bc7fd38f2e (diff)
downloadnixlib-2cacf77c1397831a07ff87fd9e500fa4fcb5ce42.tar
nixlib-2cacf77c1397831a07ff87fd9e500fa4fcb5ce42.tar.gz
nixlib-2cacf77c1397831a07ff87fd9e500fa4fcb5ce42.tar.bz2
nixlib-2cacf77c1397831a07ff87fd9e500fa4fcb5ce42.tar.lz
nixlib-2cacf77c1397831a07ff87fd9e500fa4fcb5ce42.tar.xz
nixlib-2cacf77c1397831a07ff87fd9e500fa4fcb5ce42.tar.zst
nixlib-2cacf77c1397831a07ff87fd9e500fa4fcb5ce42.zip
Merge branch 'master' into staging
-rw-r--r--doc/language-support.xml10
-rw-r--r--nixos/doc/manual/default.nix15
-rw-r--r--nixos/doc/manual/manual.xml5
-rw-r--r--nixos/doc/manual/release-notes/release-notes.xml14
-rw-r--r--nixos/doc/manual/release-notes/rl-1310.xml12
-rw-r--r--nixos/doc/manual/release-notes/rl-1404.xml12
-rw-r--r--nixos/doc/manual/release-notes/rl-1412.xml12
-rw-r--r--nixos/doc/manual/release-notes/rl-unstable.xml49
-rw-r--r--nixos/modules/misc/ids.nix2
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/services/databases/riak.nix148
-rw-r--r--nixos/modules/services/scheduling/cron.nix65
-rw-r--r--nixos/modules/system/activation/activation-script.nix4
-rw-r--r--nixos/modules/system/boot/networkd.nix3
-rw-r--r--nixos/modules/system/boot/resolved.nix3
-rw-r--r--nixos/modules/system/boot/stage-1-init.sh6
-rw-r--r--nixos/modules/system/boot/stage-2-init.sh10
-rw-r--r--nixos/modules/system/boot/systemd.nix23
-rw-r--r--nixos/modules/tasks/network-interfaces.nix9
-rw-r--r--nixos/modules/virtualisation/container-config.nix4
-rw-r--r--nixos/modules/virtualisation/docker.nix21
-rw-r--r--nixos/release-combined.nix1
-rw-r--r--nixos/release.nix2
-rw-r--r--nixos/tests/riak.nix21
-rw-r--r--pkgs/applications/altcoins/litecoin.nix4
-rw-r--r--pkgs/applications/audio/mpc/default.nix10
-rw-r--r--pkgs/applications/editors/emacs-24/macport-24.5.nix4
-rw-r--r--pkgs/applications/editors/idea/default.nix12
-rw-r--r--pkgs/applications/graphics/processing/default.nix10
-rw-r--r--pkgs/applications/graphics/simple-scan/default.nix4
-rw-r--r--pkgs/applications/misc/khal/default.nix7
-rw-r--r--pkgs/applications/networking/browsers/chromium/source/sources.nix16
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix42
-rw-r--r--pkgs/applications/networking/dropbox/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/ekiga/default.nix1
-rw-r--r--pkgs/applications/science/electronics/kicad/default.nix4
-rw-r--r--pkgs/applications/science/electronics/verilator/default.nix4
-rw-r--r--pkgs/applications/search/recoll/default.nix8
-rw-r--r--pkgs/applications/video/kodi/default.nix14
-rw-r--r--pkgs/applications/window-managers/weston/default.nix5
-rw-r--r--pkgs/build-support/build-maven.nix16
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix5
-rw-r--r--pkgs/desktops/gnome-3/3.16/core/gnome-control-center/default.nix6
-rw-r--r--pkgs/development/compilers/closure/default.nix4
-rw-r--r--pkgs/development/compilers/coreclr/default.nix2
-rw-r--r--pkgs/development/compilers/edk2/default.nix2
-rw-r--r--pkgs/development/compilers/fsharp/default.nix4
-rw-r--r--pkgs/development/compilers/gcc/4.9/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/5/default.nix2
-rw-r--r--pkgs/development/compilers/go/1.0.nix (renamed from pkgs/development/compilers/go/default.nix)2
-rw-r--r--pkgs/development/compilers/go/1.2.nix2
-rw-r--r--pkgs/development/compilers/mono/default.nix8
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix2
-rw-r--r--pkgs/development/interpreters/pypy/default.nix1
-rw-r--r--pkgs/development/interpreters/scsh/default.nix30
-rw-r--r--pkgs/development/libraries/bobcat/default.nix4
-rw-r--r--pkgs/development/libraries/capstone/default.nix17
-rw-r--r--pkgs/development/libraries/cogl/1.20.nix5
-rw-r--r--pkgs/development/libraries/glib/default.nix2
-rw-r--r--pkgs/development/libraries/libseccomp/default.nix4
-rw-r--r--pkgs/development/libraries/libssh/0001-Reintroduce-ssh_forward_listen-Fixes-194.patch28
-rw-r--r--pkgs/development/libraries/libssh/default.nix8
-rw-r--r--pkgs/development/libraries/libwpd/default.nix6
-rw-r--r--pkgs/development/libraries/poppler/default.nix2
-rw-r--r--pkgs/development/libraries/qt-5/5.3/default.nix17
-rw-r--r--pkgs/development/libraries/qt-5/5.4/qtbase.nix25
-rw-r--r--pkgs/development/libraries/signon/default.nix18
-rw-r--r--pkgs/development/python-modules/rainbowstream/image.patch18
-rw-r--r--pkgs/development/tools/build-managers/cargo/default.nix3
-rw-r--r--pkgs/development/tools/build-managers/ninja/default.nix4
-rw-r--r--pkgs/development/tools/misc/pahole/default.nix4
-rw-r--r--pkgs/development/tools/parsing/flexc++/default.nix4
-rw-r--r--pkgs/development/tools/parsing/re2c/default.nix4
-rw-r--r--pkgs/development/tools/vagrant/default.nix10
-rw-r--r--pkgs/games/anki/default.nix2
-rw-r--r--pkgs/games/dwarf-therapist/default.nix6
-rw-r--r--pkgs/games/quake3/game/botlib.patch51
-rw-r--r--pkgs/games/quake3/game/default.nix3
-rw-r--r--pkgs/games/steam/chrootenv.nix1
-rw-r--r--pkgs/games/tibia/default.nix6
-rw-r--r--pkgs/misc/cups/filters.nix31
-rw-r--r--pkgs/misc/cups/longer-shell-path.patch13
-rw-r--r--pkgs/misc/vim-plugins/default.nix12
-rw-r--r--pkgs/misc/vim-plugins/vim-plugin-names1
-rw-r--r--pkgs/os-specific/linux/gradm/default.nix4
-rw-r--r--pkgs/os-specific/linux/jfbview/default.nix5
-rw-r--r--pkgs/os-specific/linux/kernel-headers/2.6.32.nix62
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.2.nix27
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.4.nix27
-rw-r--r--pkgs/os-specific/linux/ktap/default.nix34
-rw-r--r--pkgs/os-specific/linux/lockdep/default.nix8
-rw-r--r--pkgs/os-specific/linux/nfs-utils/default.nix15
-rw-r--r--pkgs/os-specific/linux/pax-utils/default.nix4
-rw-r--r--pkgs/os-specific/linux/statifier/default.nix4
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix2
-rw-r--r--pkgs/os-specific/linux/udev/145.nix53
-rw-r--r--pkgs/os-specific/linux/zfs/git.nix6
-rw-r--r--pkgs/servers/amqp/qpid-cpp/default.nix9
-rw-r--r--pkgs/servers/hbase/default.nix11
-rw-r--r--pkgs/servers/http/nginx/unstable.nix4
-rw-r--r--pkgs/servers/mail/spamassassin/default.nix1
-rw-r--r--pkgs/servers/nosql/riak/2.1.1.nix94
-rw-r--r--pkgs/servers/rpcbind/default.nix7
-rw-r--r--pkgs/servers/samba/4.x-heimdal-compat.patch16
-rw-r--r--pkgs/servers/samba/4.x.nix2
-rw-r--r--pkgs/servers/sip/sipwitch/default.nix4
-rw-r--r--pkgs/tools/X11/ksuperkey/default.nix26
-rw-r--r--pkgs/tools/backup/partclone/default.nix4
-rw-r--r--pkgs/tools/filesystems/ceph/generic.nix2
-rw-r--r--pkgs/tools/filesystems/ceph/git.nix6
-rw-r--r--pkgs/tools/networking/aiccu/default.nix8
-rw-r--r--pkgs/tools/networking/connmanui/default.nix9
-rw-r--r--pkgs/tools/networking/dd-agent/default.nix10
-rw-r--r--pkgs/tools/networking/nzbget/default.nix9
-rw-r--r--pkgs/tools/networking/stunnel/default.nix4
-rw-r--r--pkgs/tools/package-management/nox/default.nix6
-rw-r--r--pkgs/tools/package-management/nox/show-trace.patch41
-rw-r--r--pkgs/tools/security/chaps/default.nix2
-rw-r--r--pkgs/tools/security/knockknock/default.nix29
-rw-r--r--pkgs/tools/security/ssdeep/default.nix4
-rw-r--r--pkgs/tools/security/tor/torsocks.nix4
-rw-r--r--pkgs/tools/system/memtester/default.nix21
-rw-r--r--pkgs/tools/text/unrtf/default.nix27
-rw-r--r--pkgs/tools/text/untex/default.nix27
-rw-r--r--pkgs/tools/typesetting/tex/texlive/default.nix2
-rw-r--r--pkgs/top-level/all-packages.nix78
-rw-r--r--pkgs/top-level/go-packages.nix4
-rw-r--r--pkgs/top-level/perl-packages.nix7
-rw-r--r--pkgs/top-level/python-packages.nix51
-rw-r--r--pkgs/top-level/release-cross.nix1
130 files changed, 1026 insertions, 755 deletions
diff --git a/doc/language-support.xml b/doc/language-support.xml
index def0de1d91f2..9117af864add 100644
--- a/doc/language-support.xml
+++ b/doc/language-support.xml
@@ -1,3 +1,4 @@
+
 <chapter xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xml:id="chap-language-support">
@@ -341,7 +342,14 @@ twisted = buildPythonPackage {
   <para>By default <varname>doCheck = true</varname> is set and tests are run with
   <literal>${python.interpreter} setup.py test</literal> command in <varname>checkPhase</varname>.</para>
 
-  <para><varname>propagatedBuildInputs</varname> packages are propagated to user environment.</para>
+  <para>
+    As in Perl, dependencies on other Python packages can be specified in the
+    <varname>buildInputs</varname> and
+    <varname>propagatedBuildInputs</varname> attributes.  If something is
+    exclusively a build-time dependency, use
+    <varname>buildInputs</varname>; if it’s (also) a runtime dependency,
+    use <varname>propagatedBuildInputs</varname>.
+  </para>
 
   <para>
     By default <varname>meta.platforms</varname> is set to the same value
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix
index fdfeb5ca07c1..419df915e6a4 100644
--- a/nixos/doc/manual/default.nix
+++ b/nixos/doc/manual/default.nix
@@ -61,6 +61,16 @@ let
       echo "${version}" > version
     '';
 
+  toc = builtins.toFile "toc.xml"
+    ''
+      <toc role="chunk-toc">
+        <d:tocentry xmlns:d="http://docbook.org/ns/docbook" linkend="book-nixos-manual"><?dbhtml filename="index.html"?>
+          <d:tocentry linkend="ch-options"><?dbhtml filename="options.html"?></d:tocentry>
+          <d:tocentry linkend="ch-release-notes"><?dbhtml filename="release-notes.html"?></d:tocentry>
+        </d:tocentry>
+      </toc>
+    '';
+
 in rec {
 
   # The NixOS options in JSON format.
@@ -113,9 +123,10 @@ in rec {
         --param chunk.section.depth 0 \
         --param chunk.first.sections 1 \
         --param use.id.as.filename 1 \
-        --stringparam generate.toc "book toc chapter toc appendix toc" \
+        --stringparam generate.toc "book toc appendix toc" \
+        --stringparam chunk.toc ${toc} \
         --nonet --xinclude --output $dst/ \
-        ${docbook5_xsl}/xml/xsl/docbook/xhtml/chunkfast.xsl ./manual.xml
+        ${docbook5_xsl}/xml/xsl/docbook/xhtml/chunktoc.xsl ./manual.xml
 
       mkdir -p $dst/images/callouts
       cp ${docbook5_xsl}/xml/xsl/docbook/images/callouts/*.gif $dst/images/callouts/
diff --git a/nixos/doc/manual/manual.xml b/nixos/doc/manual/manual.xml
index f6aedfd6b668..736d1d4eff71 100644
--- a/nixos/doc/manual/manual.xml
+++ b/nixos/doc/manual/manual.xml
@@ -2,7 +2,7 @@
       xmlns:xlink="http://www.w3.org/1999/xlink"
       xmlns:xi="http://www.w3.org/2001/XInclude"
       version="5.0"
-      xml:id="NixOSManual">
+      xml:id="book-nixos-manual">
   
   <info>
     <title>NixOS Manual</title>
@@ -33,11 +33,12 @@
   <xi:include href="administration/running.xml" />
   <!-- <xi:include href="userconfiguration.xml" /> -->
   <xi:include href="development/development.xml" />
-  <xi:include href="release-notes/release-notes.xml" />
 
   <appendix xml:id="ch-options">
     <title>Configuration Options</title>
     <xi:include href="options-db.xml" />
   </appendix>
 
+  <xi:include href="release-notes/release-notes.xml" />
+
 </book>
diff --git a/nixos/doc/manual/release-notes/release-notes.xml b/nixos/doc/manual/release-notes/release-notes.xml
index a988a5b0199c..70cd2d6070b5 100644
--- a/nixos/doc/manual/release-notes/release-notes.xml
+++ b/nixos/doc/manual/release-notes/release-notes.xml
@@ -1,19 +1,17 @@
-<part   xmlns="http://docbook.org/ns/docbook"
-        xmlns:xlink="http://www.w3.org/1999/xlink"
-        xmlns:xi="http://www.w3.org/2001/XInclude"
-        version="5.0"
-        xml:id="ch-release-notes">
+<appendix xmlns="http://docbook.org/ns/docbook"
+          xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:xi="http://www.w3.org/2001/XInclude"
+          version="5.0"
+          xml:id="ch-release-notes">
 
 <title>Release Notes</title>
 
-<partintro>
 <para>This section lists the release notes for each stable version of NixOS
 and current unstable revision.</para>
-</partintro>
 
 <xi:include href="rl-unstable.xml" />
 <xi:include href="rl-1412.xml" />
 <xi:include href="rl-1404.xml" />
 <xi:include href="rl-1310.xml" />
 
-</part>
+</appendix>
diff --git a/nixos/doc/manual/release-notes/rl-1310.xml b/nixos/doc/manual/release-notes/rl-1310.xml
index 234fb5a643f6..583912d70738 100644
--- a/nixos/doc/manual/release-notes/rl-1310.xml
+++ b/nixos/doc/manual/release-notes/rl-1310.xml
@@ -1,11 +1,11 @@
-<chapter xmlns="http://docbook.org/ns/docbook"
-        xmlns:xlink="http://www.w3.org/1999/xlink"
-        xmlns:xi="http://www.w3.org/2001/XInclude"
-        version="5.0"
-        xml:id="sec-release-13.10">
+<section xmlns="http://docbook.org/ns/docbook"
+         xmlns:xlink="http://www.w3.org/1999/xlink"
+         xmlns:xi="http://www.w3.org/2001/XInclude"
+         version="5.0"
+         xml:id="sec-release-13.10">
 
 <title>Release 13.10 (“Aardvark”, 2013/10/31)</title>
 
 <para>This is the first stable release branch of NixOS.</para>
 
-</chapter>
\ No newline at end of file
+</section>
diff --git a/nixos/doc/manual/release-notes/rl-1404.xml b/nixos/doc/manual/release-notes/rl-1404.xml
index 74af1ed12741..36f67ed88b0b 100644
--- a/nixos/doc/manual/release-notes/rl-1404.xml
+++ b/nixos/doc/manual/release-notes/rl-1404.xml
@@ -1,8 +1,8 @@
-<chapter xmlns="http://docbook.org/ns/docbook"
-        xmlns:xlink="http://www.w3.org/1999/xlink"
-        xmlns:xi="http://www.w3.org/2001/XInclude"
-        version="5.0"
-        xml:id="sec-release-14.04">
+<section xmlns="http://docbook.org/ns/docbook"
+         xmlns:xlink="http://www.w3.org/1999/xlink"
+         xmlns:xi="http://www.w3.org/2001/XInclude"
+         version="5.0"
+         xml:id="sec-release-14.04">
 
 <title>Release 14.04 (“Baboon”, 2014/04/30)</title>
 
@@ -157,4 +157,4 @@ networking.firewall.enable = false;
 
 </para>
 
-</chapter>
\ No newline at end of file
+</section>
diff --git a/nixos/doc/manual/release-notes/rl-1412.xml b/nixos/doc/manual/release-notes/rl-1412.xml
index 36ae48af7592..42b51cd4a8ef 100644
--- a/nixos/doc/manual/release-notes/rl-1412.xml
+++ b/nixos/doc/manual/release-notes/rl-1412.xml
@@ -1,8 +1,8 @@
-<chapter xmlns="http://docbook.org/ns/docbook"
-        xmlns:xlink="http://www.w3.org/1999/xlink"
-        xmlns:xi="http://www.w3.org/2001/XInclude"
-        version="5.0"
-        xml:id="sec-release-14.12">
+<section xmlns="http://docbook.org/ns/docbook"
+         xmlns:xlink="http://www.w3.org/1999/xlink"
+         xmlns:xi="http://www.w3.org/2001/XInclude"
+         version="5.0"
+         xml:id="sec-release-14.12">
 
 <title>Release 14.12 (“Caterpillar”, 2014/12/30)</title>
 
@@ -174,4 +174,4 @@ now.</para></listitem>
 
 </para>
 
-</chapter>
+</section>
diff --git a/nixos/doc/manual/release-notes/rl-unstable.xml b/nixos/doc/manual/release-notes/rl-unstable.xml
index 0b7750b0591d..ecde80f2a01d 100644
--- a/nixos/doc/manual/release-notes/rl-unstable.xml
+++ b/nixos/doc/manual/release-notes/rl-unstable.xml
@@ -1,10 +1,10 @@
-<chapter xmlns="http://docbook.org/ns/docbook"
-        xmlns:xlink="http://www.w3.org/1999/xlink"
-        xmlns:xi="http://www.w3.org/2001/XInclude"
-        version="5.0"
-        xml:id="sec-release-unstable">
+<section xmlns="http://docbook.org/ns/docbook"
+         xmlns:xlink="http://www.w3.org/1999/xlink"
+         xmlns:xi="http://www.w3.org/2001/XInclude"
+         version="5.0"
+         xml:id="sec-release-unstable">
 
-<title>Unstable revision</title>
+<title>Release 15.07 (“Dingo”, 2015/07/??)</title>
 
 <para>In addition to numerous new and upgraded packages, this release has the following highlights:
 
@@ -36,12 +36,12 @@
 
 </para>
 
-<para>Following new services were added since the last release:
+<para>The following new services were added since the last release:
 
 <itemizedlist>
 <listitem><para><literal>brltty</literal></para></listitem>
 <listitem><para><literal>marathon</literal></para></listitem>
-<listitem><para><literal>Tvheadend</literal></para></listitem>
+<listitem><para><literal>tvheadend</literal></para></listitem>
 </itemizedlist>
 </para>
 
@@ -50,6 +50,12 @@ following incompatible changes:
 
 <itemizedlist>
 
+<listitem><para><command>cron</command> is no longer enabled by
+default, unless you have a non-empty
+<option>services.cron.systemCronJobs</option>. To force
+<command>cron</command> to be enabled, set
+<option>services.cron.enable = true</option>.</para></listitem>
+
 <listitem><para>Steam now doesn't need root rights to work. Instead of using
 <literal>*-steam-chrootenv</literal>, you should now just run <literal>steam</literal>.
 <literal>steamChrootEnv</literal> package was renamed to <literal>steam</literal>,
@@ -65,20 +71,6 @@ was accordingly renamed to <literal>electron</literal>
 </para></listitem>
 
 <listitem>
-    <para>
-        The default <literal>NIX_PATH</literal> for NixOS now includes
-        <literal>/nix/var/nix/profiles/per-user/root/channels</literal>, so it's
-        easy to add custom channels.
-    </para>
-    <para>
-        Moreover, whenever a <command>nixos-rebuild &lt;action&gt;
-        --upgrade</command> is issued, every channel that includes a file
-        called <filename>.update-on-nixos-rebuild</filename> will be upgraded
-        alongside of the <literal>nixos</literal> channel.
-    </para>
-</listitem>
-
-<listitem>
   <para>
 	The CUPS printing service has been updated to version <literal>2.0.2</literal>.
 	Furthermore its systemd service has been renamed to <literal>cups.service</literal>.
@@ -92,15 +84,6 @@ was accordingly renamed to <literal>electron</literal>
 
 <listitem>
   <para>
-    HPLIP (printer, scanner, and fax drivers for HP devices) has
-    been updated to version <literal>3.15.4</literal>. This release
-    adds support for the <literal>arm6l-linux</literal> and
-    <literal>arm7l-linux</literal> platforms.
-  </para>
-</listitem>
-
-<listitem>
-  <para>
     Haskell packages can no longer be found by name, i.e. the commands
     <literal>nix-env -qa cabal-install</literal> and <literal>nix-env -i
     ghc</literal> will fail, even though we <emphasis>do</emphasis> ship
@@ -124,7 +107,7 @@ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA haskellPackages.cabal-install
 
 <listitem>
   <para>
-    Previous versions of NixOS come with a feature called
+    Previous versions of NixOS came with a feature called
     <literal>ghc-wrapper</literal>, a small wrapper script that allows
     GHC to transparently pick up on libraries installed in the user's
     profile. This feature has been deprecated;
@@ -181,4 +164,4 @@ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA haskellPackages.cabal-install
 </itemizedlist>
 </para>
 
-</chapter>
+</section>
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix
index fd75db1abe77..b53b9c47b01f 100644
--- a/nixos/modules/misc/ids.nix
+++ b/nixos/modules/misc/ids.nix
@@ -226,6 +226,7 @@
       gitit = 202;
       riemanntools = 203;
       subsonic = 204;
+      riak = 205;
 
       # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
 
@@ -430,6 +431,7 @@
       gitit = 202;
       riemanntools = 203;
       subsonic = 204;
+      riak = 205;
 
       # When adding a gid, make sure it doesn't match an existing
       # uid. Users and groups with the same name should have equal
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index f771bced5ef6..7e2c42f2b8c1 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -131,6 +131,7 @@
   ./services/databases/opentsdb.nix
   ./services/databases/postgresql.nix
   ./services/databases/redis.nix
+  ./services/databases/riak.nix
   ./services/databases/virtuoso.nix
   ./services/desktops/accountsservice.nix
   ./services/desktops/geoclue2.nix
diff --git a/nixos/modules/services/databases/riak.nix b/nixos/modules/services/databases/riak.nix
new file mode 100644
index 000000000000..bee768fa42ae
--- /dev/null
+++ b/nixos/modules/services/databases/riak.nix
@@ -0,0 +1,148 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+  cfg = config.services.riak;
+
+in
+
+{
+
+  ###### interface
+
+  options = {
+
+    services.riak = {
+
+      enable = mkEnableOption "riak";
+
+      package = mkOption {
+        type = types.package;
+        example = literalExample "pkgs.riak2";
+        description = ''
+          Riak package to use.
+        '';
+      };
+
+      nodeName = mkOption {
+        type = types.string;
+        default = "riak@127.0.0.1";
+        description = ''
+          Name of the Erlang node.
+        '';
+      };
+
+      distributedCookie = mkOption {
+        type = types.string;
+        default = "riak";
+        description = ''
+          Cookie for distributed node communication.  All nodes in the
+          same cluster should use the same cookie or they will not be able to
+          communicate.
+        '';
+      };
+
+      dataDir = mkOption {
+        type = types.path;
+        default = "/var/db/riak";
+        description = ''
+          Data directory for Riak.
+        '';
+      };
+
+      logDir = mkOption {
+        type = types.path;
+        default = "/var/log/riak";
+        description = ''
+          Log directory for Riak.
+        '';
+      };
+
+      extraConfig = mkOption {
+        type = types.lines;
+        default = "";
+        description = ''
+          Additional text to be appended to <filename>riak.conf</filename>.
+        '';
+      };
+
+    };
+
+  };
+
+  ###### implementation
+
+  config = mkIf cfg.enable {
+
+    environment.systemPackages = [ cfg.package ];
+    environment.etc."riak/riak.conf".text = ''
+      nodename = ${cfg.nodeName}
+      distributed_cookie = ${cfg.distributedCookie}
+
+      platform_log_dir = ${cfg.logDir}
+      platform_etc_dir = /etc/riak
+      platform_data_dir = ${cfg.dataDir}
+
+      ${cfg.extraConfig}
+    '';
+
+    users.extraUsers.riak = {
+      name = "riak";
+      uid = config.ids.uids.riak;
+      group = "riak";
+      description = "Riak server user";
+    };
+
+    users.extraGroups.riak.gid = config.ids.gids.riak;
+
+    systemd.services.riak = {
+      description = "Riak Server";
+
+      wantedBy = [ "multi-user.target" ];
+      after = [ "network.target" ];
+
+      path = [
+        pkgs.utillinux # for `logger`
+        pkgs.bash
+      ];
+
+      environment.RIAK_DATA_DIR = "${cfg.dataDir}";
+      environment.RIAK_LOG_DIR = "${cfg.logDir}";
+      environment.RIAK_ETC_DIR = "/etc/riak";
+
+      preStart = ''
+        if ! test -e ${cfg.logDir}; then
+          mkdir -m 0755 -p ${cfg.logDir}
+          chown -R riak ${cfg.logDir}
+        fi
+
+        if ! test -e ${cfg.dataDir}; then
+          mkdir -m 0700 -p ${cfg.dataDir}
+          chown -R riak ${cfg.dataDir}
+        fi
+      '';
+
+      serviceConfig = {
+        ExecStart = "${cfg.package}/bin/riak console";
+        ExecStop = "${cfg.package}/bin/riak stop";
+        StandardInput = "tty";
+        User = "riak";
+        Group = "riak";
+        PermissionsStartOnly = true;
+        # Give Riak a decent amount of time to clean up.
+        TimeoutStopSec = 120;
+        LimitNOFILE = 65536;
+      };
+
+      unitConfig.RequiresMountsFor = [
+        "${cfg.dataDir}"
+        "${cfg.logDir}"
+        "/etc/riak"
+      ];
+    };
+
+  };
+
+}
diff --git a/nixos/modules/services/scheduling/cron.nix b/nixos/modules/services/scheduling/cron.nix
index 1f42086dc1ec..a92e8b65d2ab 100644
--- a/nixos/modules/services/scheduling/cron.nix
+++ b/nixos/modules/services/scheduling/cron.nix
@@ -4,8 +4,6 @@ with lib;
 
 let
 
-  inherit (config.services) jobsTags;
-
   # Put all the system cronjobs together.
   systemCronJobsFile = pkgs.writeText "system-crontab"
     ''
@@ -25,9 +23,9 @@ let
     sendmailPath = "/var/setuid-wrappers/sendmail";
   };
 
-  allFiles = map (f: "\"${f}\"") (
-    [ "${systemCronJobsFile}" ] ++ config.services.cron.cronFiles
-  );
+  allFiles =
+    optional (config.services.cron.systemCronJobs != []) systemCronJobsFile
+    ++ config.services.cron.cronFiles;
 
 in
 
@@ -91,36 +89,49 @@ in
 
   ###### implementation
 
-  config = mkIf (config.services.cron.enable && allFiles != []) {
+  config = mkMerge [
 
-    security.setuidPrograms = [ "crontab" ];
+    { services.cron.enable = mkDefault (allFiles != []); }
 
-    environment.systemPackages = [ cronNixosPkg ];
+    (mkIf (config.services.cron.enable && allFiles != []) {
 
-    systemd.services.cron =
-      { description = "Cron Daemon";
+      security.setuidPrograms = [ "crontab" ];
 
-        wantedBy = [ "multi-user.target" ];
+      environment.systemPackages = [ cronNixosPkg ];
 
-        preStart =
-          ''
-            rm -f /etc/crontab
-            cat ${toString allFiles} > /etc/crontab
-            chmod 0600 /etc/crontab
+      environment.etc.crontab =
+        { source = pkgs.runCommand "crontabs" { inherit allFiles; }
+            ''
+              touch $out
+              for i in $allFiles; do
+                cat "$i" >> $out
+              done
+            '';
+          mode = "0600"; # Cron requires this.
+        };
 
-            mkdir -m 710 -p /var/cron
+      systemd.services.cron =
+        { description = "Cron Daemon";
 
-            # By default, allow all users to create a crontab.  This
-            # is denoted by the existence of an empty cron.deny file.
-            if ! test -e /var/cron/cron.allow -o -e /var/cron/cron.deny; then
-                touch /var/cron/cron.deny
-            fi
-          '';
+          wantedBy = [ "multi-user.target" ];
 
-        restartTriggers = [ config.environment.etc.localtime.source ];
-        serviceConfig.ExecStart = "${cronNixosPkg}/bin/cron -n";
-      };
+          preStart =
+            ''
+              mkdir -m 710 -p /var/cron
 
-  };
+              # By default, allow all users to create a crontab.  This
+              # is denoted by the existence of an empty cron.deny file.
+              if ! test -e /var/cron/cron.allow -o -e /var/cron/cron.deny; then
+                  touch /var/cron/cron.deny
+              fi
+            '';
+
+          restartTriggers = [ config.environment.etc.localtime.source ];
+          serviceConfig.ExecStart = "${cronNixosPkg}/bin/cron -n";
+        };
+
+    })
+
+  ];
 
 }
diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix
index 2e5a70b3aa54..02b3e25a313d 100644
--- a/nixos/modules/system/activation/activation-script.nix
+++ b/nixos/modules/system/activation/activation-script.nix
@@ -114,10 +114,6 @@ in
       ''
         # Various log/runtime directories.
 
-        touch /run/utmp # must exist
-        chgrp ${toString config.ids.gids.utmp} /run/utmp
-        chmod 664 /run/utmp
-
         mkdir -m 0755 -p /run/nix/current-load # for distributed builds
         mkdir -m 0700 -p /run/nix/remote-stores
 
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index b183c0f32366..34eea9af83b1 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -641,9 +641,6 @@ in
     environment.etc."systemd/network".source =
       generateUnits "network" cfg.units [] [];
 
-    users.extraUsers.systemd-network.uid = config.ids.uids.systemd-network;
-    users.extraGroups.systemd-network.gid = config.ids.gids.systemd-network;
-
     systemd.services.systemd-networkd = {
       wantedBy = [ "multi-user.target" ];
       before = [ "network-interfaces.target" ];
diff --git a/nixos/modules/system/boot/resolved.nix b/nixos/modules/system/boot/resolved.nix
index ecd547322d3c..5a98b9b6d480 100644
--- a/nixos/modules/system/boot/resolved.nix
+++ b/nixos/modules/system/boot/resolved.nix
@@ -30,9 +30,6 @@ with lib;
       DNS=${concatStringsSep " " config.networking.nameservers}
     '';
 
-    users.extraUsers.systemd-resolve.uid = config.ids.uids.systemd-resolve;
-    users.extraGroups.systemd-resolve.gid = config.ids.gids.systemd-resolve;
-
   };
 
 }
diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh
index e8d276920a83..26cf7f06c9ed 100644
--- a/nixos/modules/system/boot/stage-1-init.sh
+++ b/nixos/modules/system/boot/stage-1-init.sh
@@ -182,9 +182,9 @@ if test -e /sys/power/resume -a -e /sys/power/disk; then
         for sd in @resumeDevices@; do
             # Try to detect resume device. According to Ubuntu bug:
             # https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/923326/comments/1
-            # When there are multiple swap devices, we can't know where will hibernate
-            # image reside. We can check all of them for swsuspend blkid.
-            resumeInfo="$(udevadm info -q property "$sd" )"
+            # when there are multiple swap devices, we can't know where the hibernate
+            # image will reside. We can check all of them for swsuspend blkid.
+            resumeInfo="$(test -e "$d" && udevadm info -q property "$sd")"
             if [ "$(echo "$resumeInfo" | sed -n 's/^ID_FS_TYPE=//p')" = "swsuspend" ]; then
                 resumeDev="$sd"
                 break
diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh
index 173453a17f71..a73070ab332f 100644
--- a/nixos/modules/system/boot/stage-2-init.sh
+++ b/nixos/modules/system/boot/stage-2-init.sh
@@ -85,8 +85,10 @@ done
 
 
 # More special file systems, initialise required directories.
-mkdir -m 0755 /dev/shm
-mount -t tmpfs -o "rw,nosuid,nodev,size=@devShmSize@" tmpfs /dev/shm
+if ! mountpoint -q /dev/shm; then
+    mkdir -m 0755 /dev/shm
+    mount -t tmpfs -o "rw,nosuid,nodev,size=@devShmSize@" tmpfs /dev/shm
+fi
 mkdir -m 0755 -p /dev/pts
 [ -e /proc/bus/usb ] && mount -t usbfs usbfs /proc/bus/usb # UML doesn't have USB by default
 mkdir -m 01777 -p /tmp
@@ -162,7 +164,9 @@ $systemConfig/activate
 # Restore the system time from the hardware clock.  We do this after
 # running the activation script to be sure that /etc/localtime points
 # at the current time zone.
-hwclock --hctosys
+if [ -e /dev/rtc ]; then
+    hwclock --hctosys
+fi
 
 
 # Record the boot configuration.
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 2ad12c51b218..1314b7277723 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -639,15 +639,17 @@ in
     system.activationScripts.systemd = stringAfter [ "groups" ]
       ''
         mkdir -m 0755 -p /var/lib/udev
-        mkdir -p /var/log/journal
-        chmod 0755 /var/log/journal
 
-        # Make all journals readable to users in the wheel and adm
-        # groups, in addition to those in the systemd-journal group.
-        # Users can always read their own journals.
-        ${pkgs.acl}/bin/setfacl -nm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal || true
+        if ! [ -e /etc/machine-id ]; then
+          ${systemd}/bin/systemd-machine-id-setup
+        fi
       '';
 
+    users.extraUsers.systemd-network.uid = config.ids.uids.systemd-network;
+    users.extraGroups.systemd-network.gid = config.ids.gids.systemd-network;
+    users.extraUsers.systemd-resolve.uid = config.ids.uids.systemd-resolve;
+    users.extraGroups.systemd-resolve.gid = config.ids.gids.systemd-resolve;
+
     # Target for ‘charon send-keys’ to hook into.
     users.extraGroups.keys.gid = config.ids.gids.keys;
 
@@ -722,6 +724,7 @@ in
         startSession = true;
       };
 
+    environment.etc."tmpfiles.d/systemd.conf".source = "${systemd}/example/tmpfiles.d/systemd.conf";
     environment.etc."tmpfiles.d/x11.conf".source = "${systemd}/example/tmpfiles.d/x11.conf";
 
     environment.etc."tmpfiles.d/nixos.conf".text =
@@ -729,10 +732,6 @@ in
         # This file is created automatically and should not be modified.
         # Please change the option ‘systemd.tmpfiles.rules’ instead.
 
-        z /var/log/journal 2755 root systemd-journal - -
-        z /var/log/journal/%m 2755 root systemd-journal - -
-        z /var/log/journal/%m/* 0640 root systemd-journal - -
-
         ${concatStringsSep "\n" cfg.tmpfiles.rules}
       '';
 
@@ -749,6 +748,10 @@ in
     systemd.targets.local-fs.unitConfig.X-StopOnReconfiguration = true;
     systemd.targets.remote-fs.unitConfig.X-StopOnReconfiguration = true;
 
+    # Don't bother with certain units in containers.
+    systemd.services.systemd-remount-fs.unitConfig.ConditionVirtualization = "!container";
+    systemd.services.systemd-random-seed.unitConfig.ConditionVirtualization = "!container";
+
   };
 
 }
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index 6361ed2cc431..a967fc77e686 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -708,11 +708,14 @@ in
         pkgs.iproute
         pkgs.iputils
         pkgs.nettools
-        pkgs.wirelesstools
+        pkgs.openresolv
+      ]
+      ++ optionals (!config.boot.isContainer) [
+        pkgs.wirelesstools # FIXME: obsolete?
         pkgs.iw
         pkgs.rfkill
-        pkgs.openresolv
-      ] ++ bridgeStp;
+      ]
+      ++ bridgeStp;
 
     systemd.targets."network-interfaces" =
       { description = "All Network Interfaces";
diff --git a/nixos/modules/virtualisation/container-config.nix b/nixos/modules/virtualisation/container-config.nix
index 67047541102c..c210c8d5f25e 100644
--- a/nixos/modules/virtualisation/container-config.nix
+++ b/nixos/modules/virtualisation/container-config.nix
@@ -19,10 +19,6 @@ with lib;
     # Shut up warnings about not having a boot loader.
     system.build.installBootLoader = "${pkgs.coreutils}/bin/true";
 
-    systemd.services.systemd-remount-fs.enable = false;
-
-    systemd.services.systemd-random-seed.enable = false;
-
   };
 
 }
diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix
index ef9cc2280db7..2339cf7c6490 100644
--- a/nixos/modules/virtualisation/docker.nix
+++ b/nixos/modules/virtualisation/docker.nix
@@ -54,6 +54,21 @@ in
           '';
       };
 
+    postStart =
+      mkOption {
+        type = types.string;
+        default = ''
+          while ! [ -e /var/run/docker.sock ]; do
+            sleep 0.1
+          done
+        '';
+        description = ''
+          The postStart phase of the systemd service. You may need to
+          override this if you are passing in flags to docker which
+          don't cause the socket file to be created.
+        '';
+      };
+
 
   };
 
@@ -106,11 +121,7 @@ in
         path = [ pkgs.kmod ];
         environment.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
 
-        postStart = ''
-          while ! [ -e /var/run/docker.sock ]; do
-            sleep 0.1
-          done
-        '';
+        postStart = cfg.postStart;
 
         # Presumably some containers are running we don't want to interrupt
         restartIfChanged = false;
diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix
index 52a1dcf99325..be8df4f4a2c6 100644
--- a/nixos/release-combined.nix
+++ b/nixos/release-combined.nix
@@ -52,7 +52,6 @@ in rec {
         (all nixos.tests.firefox)
         (all nixos.tests.firewall)
         (all nixos.tests.gnome3)
-        (all nixos.tests.installer.grub1)
         (all nixos.tests.installer.lvm)
         (all nixos.tests.installer.luksroot)
         (all nixos.tests.installer.separateBoot)
diff --git a/nixos/release.nix b/nixos/release.nix
index cf0a00dd2540..05023868fa1b 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -176,10 +176,12 @@ in rec {
   # boot that system from uboot (like for the sheevaplug).
   # The pc variant helps preparing the expression for the system tarball
   # in a machine faster than the sheevpalug
+  /*
   system_tarball_pc = forAllSystems (system: makeSystemTarball {
     module = ./modules/installer/cd-dvd/system-tarball-pc.nix;
     inherit system;
   });
+  */
 
   # Provide container tarball for lxc, libvirt-lxc, docker-lxc, ...
   containerTarball = forAllSystems (system: makeSystemTarball {
diff --git a/nixos/tests/riak.nix b/nixos/tests/riak.nix
new file mode 100644
index 000000000000..a56f51c4e50e
--- /dev/null
+++ b/nixos/tests/riak.nix
@@ -0,0 +1,21 @@
+import ./make-test.nix {
+  name = "riak";
+
+  nodes = {
+    master =
+      { pkgs, config, ... }:
+
+      {
+        services.riak.enable = true;
+        services.riak.package = pkgs.riak2;
+      };
+  };
+
+  testScript = ''
+    startAll;
+
+    $master->waitForUnit("riak");
+    $master->sleep(20); # Hopefully this is long enough!!
+    $master->succeed("RIAK_DATA_DIR='/var/db/riak' RIAK_LOG_DIR='/var/log/riak' RIAK_ETC_DIR='/etc/riak' riak ping 2>&1");
+  '';
+}
diff --git a/pkgs/applications/altcoins/litecoin.nix b/pkgs/applications/altcoins/litecoin.nix
index f2235abaaae2..4e0198b972d4 100644
--- a/pkgs/applications/altcoins/litecoin.nix
+++ b/pkgs/applications/altcoins/litecoin.nix
@@ -8,11 +8,11 @@ with stdenv.lib;
 stdenv.mkDerivation rec {
 
   name = "litecoin" + (toString (optional (!withGui) "d")) + "-" + version;
-  version = "0.9.3-preview5";
+  version = "0.10.2.2";
 
   src = fetchurl {
     url = "https://github.com/litecoin-project/litecoin/archive/v${version}.tar.gz";
-    sha256 = "0nnfz4s2g28jb5fqy6cabsryp3h2amzlyslr6g6k8r1vmzvx5ym6";
+    sha256 = "1p1h2654b7f2lyrmihcjmpmx6sjpkgsifcm2ixxb2g9jh6qq8b4m";
   };
 
   buildInputs = [ pkgconfig autoreconfHook openssl
diff --git a/pkgs/applications/audio/mpc/default.nix b/pkgs/applications/audio/mpc/default.nix
index 2f798fff7b9f..f37585d3decb 100644
--- a/pkgs/applications/audio/mpc/default.nix
+++ b/pkgs/applications/audio/mpc/default.nix
@@ -13,15 +13,15 @@ stdenv.mkDerivation rec {
 
   preConfigure =
     ''
-      export LIBMPDCLIENT_LIBS=${mpd_clientlib}/lib/libmpdclient.so.${mpd_clientlib.majorVersion}.0.${mpd_clientlib.minorVersion}
+      export LIBMPDCLIENT_LIBS=${mpd_clientlib}/lib/libmpdclient.${if stdenv.isDarwin then mpd_clientlib.majorVersion + ".dylib" else "so." + mpd_clientlib.majorVersion + ".0." + mpd_clientlib.minorVersion}
       export LIBMPDCLIENT_CFLAGS=${mpd_clientlib}
     '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "A minimalist command line interface to MPD";
     homepage = http://www.musicpd.org/clients/mpc/;
-    license = stdenv.lib.licenses.gpl2;
-    maintainers = [ stdenv.lib.maintainers.algorith ];
-    platforms = stdenv.lib.platforms.linux;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.algorith ];
+    platforms = with platforms; linux ++ darwin;
   };
 }
diff --git a/pkgs/applications/editors/emacs-24/macport-24.5.nix b/pkgs/applications/editors/emacs-24/macport-24.5.nix
index a9f3e53fb595..6ea9fbfdbb61 100644
--- a/pkgs/applications/editors/emacs-24/macport-24.5.nix
+++ b/pkgs/applications/editors/emacs-24/macport-24.5.nix
@@ -3,7 +3,7 @@
 
 stdenv.mkDerivation rec {
   emacsName = "emacs-24.5";
-  name = "${emacsName}-mac-5.8";
+  name = "${emacsName}-mac-5.9";
 
   #builder = ./builder.sh;
 
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   macportSrc = fetchurl {
     url = "ftp://ftp.math.s.chiba-u.ac.jp/emacs/${name}.tar.gz";
-    sha256 = "0ljhrag5lag8i72xfsmgk9lndqv0b3sahyyd48svj6jlg4jachir";
+    sha256 = "1xjskagjlnni1nqshszbvk8h8vhwq9sk09l25vb6fijn4g9akwqr";
   };
 
   buildInputs = [ ncurses pkgconfig texinfo libxml2 gnutls ];
diff --git a/pkgs/applications/editors/idea/default.nix b/pkgs/applications/editors/idea/default.nix
index 5d13cf6a4ce5..e394ae4d6a38 100644
--- a/pkgs/applications/editors/idea/default.nix
+++ b/pkgs/applications/editors/idea/default.nix
@@ -273,25 +273,25 @@ in
 
   pycharm-community = buildPycharm rec {
     name = "pycharm-community-${version}";
-    version = "4.5.2";
-    build = "141.1580";
+    version = "4.5.3";
+    build = "141.1899";
     description = "PyCharm Community Edition";
     license = stdenv.lib.licenses.asl20;
     src = fetchurl {
       url = "https://download.jetbrains.com/python/${name}.tar.gz";
-      sha256 = "09v1ni06h381y7d5cglifwsz81kln2y4ld7hgpz1sn56fwbi8ld9";
+      sha256 = "13f3mp7gcl27fikxjlwk7n1gyxa46q0wfgniang4knb596wlfli0";
     };
   };
 
   pycharm-professional = buildPycharm rec {
     name = "pycharm-professional-${version}";
-    version = "4.5.2";
-    build = "141.1580";
+    version = "4.5.3";
+    build = "141.1899";
     description = "PyCharm Professional Edition";
     license = stdenv.lib.licenses.unfree;
     src = fetchurl {
       url = "https://download.jetbrains.com/python/${name}.tar.gz";
-      sha256 = "1dgpzn7wgaxicgw48z83fp462g5mxsr7iwkgp11ffypz93ba2dm7";
+      sha256 = "00b66fy841vjm54n2fby5wf7y8ihihqgydr6329iv9p5s0mgzh2s";
     };
   };
 
diff --git a/pkgs/applications/graphics/processing/default.nix b/pkgs/applications/graphics/processing/default.nix
index ecce0e260bb2..69e5ccb85ec9 100644
--- a/pkgs/applications/graphics/processing/default.nix
+++ b/pkgs/applications/graphics/processing/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, ant, jre, makeWrapper, libXxf86vm, which }:
+{ fetchurl, stdenv, ant, jdk, makeWrapper, libXxf86vm, which }:
 
 stdenv.mkDerivation rec {
   name = "processing-${version}";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   # Stop it trying to download its own version of java
   patches = [ ./use-nixpkgs-jre.patch ];
 
-  buildInputs = [ ant jre makeWrapper libXxf86vm which ];
+  buildInputs = [ ant jdk makeWrapper libXxf86vm which ];
 
   buildPhase = "cd build && ant build";
 
@@ -21,12 +21,12 @@ stdenv.mkDerivation rec {
     mkdir -p $out/bin
    cp -r linux/work/* $out/${name}/
    makeWrapper $out/${name}/processing $out/bin/processing \
-     --prefix PATH : "${jre}/bin:${which}/bin" \
+     --prefix PATH : "${jdk}/bin:${which}/bin" \
      --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
    makeWrapper $out/${name}/processing-java $out/bin/processing-java \
-     --prefix PATH : "${jre}/bin:${which}/bin" \
+     --prefix PATH : "${jdk}/bin:${which}/bin" \
      --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
-   ln -s ${jre} $out/${name}/java
+   ln -s ${jdk} $out/${name}/java
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/graphics/simple-scan/default.nix b/pkgs/applications/graphics/simple-scan/default.nix
index 744f789e55ca..954b2e02136d 100644
--- a/pkgs/applications/graphics/simple-scan/default.nix
+++ b/pkgs/applications/graphics/simple-scan/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, cairo, colord, glib, gtk3, intltool, itstool, libxml2
 , makeWrapper, pkgconfig, saneBackends, systemd, vala }:
 
-let version = "3.17.3"; in
+let version = "3.17.4"; in
 stdenv.mkDerivation rec {
   name = "simple-scan-${version}";
 
   src = fetchurl {
-    sha256 = "1kb2xk4vr2nab3hfjfnfyapv2z65h99c3g7mfkmanzrng5xwrj8q";
+    sha256 = "1pslbv45g01g039zj2b01k08f763kkhzqw8wwz7yh27m7bjllnx6";
     url = "https://launchpad.net/simple-scan/3.17/${version}/+download/${name}.tar.xz";
   };
 
diff --git a/pkgs/applications/misc/khal/default.nix b/pkgs/applications/misc/khal/default.nix
index 2652af9bed92..cbc728bc1f5f 100644
--- a/pkgs/applications/misc/khal/default.nix
+++ b/pkgs/applications/misc/khal/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, pkgs, pythonPackages }:
 
 pythonPackages.buildPythonPackage rec {
-  version = "0.5.0";
+  version = "0.6.0";
   name = "khal-${version}";
 
   src = fetchurl {
-    url = "https://github.com/geier/khal/archive/v${version}.tar.gz";
-    sha256 = "1rjs5s8ky4n628rs6l5ggaj2abb4kq2avvxmimjjgxz3zh9xlz6s";
+    url = "https://pypi.python.org/packages/source/k/khal/khal-${version}.tar.gz";
+    sha256 = "16nsib70rczln0hrh93bas58lr8crvq8yipj7qnfs4hbs9b8sbhs";
   };
 
   propagatedBuildInputs = with pythonPackages; [
@@ -23,6 +23,7 @@ pythonPackages.buildPythonPackage rec {
     tzlocal
     urwid
     python.modules.sqlite3
+    pkginfo
   ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/browsers/chromium/source/sources.nix b/pkgs/applications/networking/browsers/chromium/source/sources.nix
index 5410293a7924..6b2f542f34fd 100644
--- a/pkgs/applications/networking/browsers/chromium/source/sources.nix
+++ b/pkgs/applications/networking/browsers/chromium/source/sources.nix
@@ -1,10 +1,10 @@
 # This file is autogenerated from update.sh in the parent directory.
 {
   dev = {
-    version = "45.0.2454.6";
-    sha256 = "09bhbq3hvsfiac7w6ajd6n1lcdzf2isg1s9sqabrnx9blyds7msh";
-    sha256bin32 = "1f38rfd9v91inhd9m2sfcj4bpvq5f03zn8ypvacr9mpwc47rylx3";
-    sha256bin64 = "1bfjpjisa0hqiy8kmmgh2mr6zyifpmhr7k5ai44h5szf36768bn6";
+    version = "45.0.2454.7";
+    sha256 = "19xjdp0zxr96r2fx9wf30wldalrh393p2dhqwp2n1m751vizbj5s";
+    sha256bin32 = "1id1z3m0pc2lxh4lp9r6babh098gfyz4dda931yjkxhzb9rw1v0d";
+    sha256bin64 = "1sksf651z1sqgh9pwdm5dksqnb0lzhwabxj3myg4w5kxi8s4pi8l";
   };
   beta = {
     version = "44.0.2403.89";
@@ -13,9 +13,9 @@
     sha256bin64 = "0kvrpqy3fpfzchly65nrh8z2z2i49xpa3pm2k7k18sn0x4bycji0";
   };
   stable = {
-    version = "43.0.2357.134";
-    sha256 = "0nbn25pl3rgyqmy4p5dqr0v08xzkm08lpzsaxzszqpa4w7ivp8fk";
-    sha256bin32 = "1xmybw4vs8x2rrg43f7x7yn763wfzr5f8d1jpq49r42qr365q6vs";
-    sha256bin64 = "1y79135pmkhvv4cdhdy93jhm0jdx132a6spqqyyhbcr2sn26cq62";
+    version = "44.0.2403.89";
+    sha256 = "161shml5w2i0crl57hkfnizgmii6d70lxxg4rjxmays8g6lrmpds";
+    sha256bin32 = "09a1k0xxmp6v1nfnngfkhv9vilnwvqlbgfsisbhwdnkk86pnv7r4";
+    sha256bin64 = "1i7ylif5vd0yj0gddl2kv87gh3vgzvzmz91rrrs9za2bkf2gkf0p";
   };
 }
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix
index 37d5cbe039f1..17012850a319 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/mozplugger/default.nix
@@ -1,36 +1,30 @@
-a :  
-let 
-  fetchurl = a.fetchurl;
+{ stdenv, fetchurl, firefox, libX11, xproto }:
+
+stdenv.mkDerivation rec {
+  name = "mozplugger-${version}";
+  version = "2.1.6";
 
-  version = a.lib.attrByPath ["version"] "1.12.0" a; 
-  buildInputs = with a; [
-    firefox libX11 xproto
-  ];
-in
-rec {
   src = fetchurl {
     url = "http://mozplugger.mozdev.org/files/mozplugger-${version}.tar.gz";
-    sha256 = "1vpggfmbv4h3srk80rgidd020i03hrkpb7cfxkwagkcd0zcal4hk";
+    sha256 = "1vszkq4kdbaxsrqr2xn9rq6ipza9fngdri79gvjqk3bvsdmg0k19";
   };
 
-  inherit buildInputs;
-  configureFlags = [];
-  makeFlags = ["linux" "prefix=" "root=$out"];
+  buildInputs = [ firefox libX11 xproto ];
 
-  preBuild = a.fullDepEntry(''
-    sed -e s@/usr/@"$out/"@g -i mozplugger.c
-  '') ["doUnpack" "minInit"];
+  installPhase = ''
+    mkdir -p "$out/etc" "$out/bin" "$out/lib/mozilla/plugins" "$out/share/man/man7"
+    cp mozpluggerrc "$out/etc"
+    cp mozplugger-{helper,controller,linker,update} "$out/bin"
+    cp mozplugger.so "$out/lib/mozilla/plugins"
+    cp mozplugger.7 "$out/share/man/man7"
 
-  postInstall = a.fullDepEntry(''
-    mkdir -p $out/share/${name}/plugin
-    ln -s $out/lib/mozilla/plugins/mozplugger.so $out/share/${name}/plugin
-  '') ["doMakeInstall" "minInit" "defEnsureDir"];
+    mkdir -p "$out/share/${name}/plugin"
+    ln -s "$out/lib/mozilla/plugins/mozplugger.so" "$out/share/${name}/plugin"
+  '';
 
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["preBuild" "doMakeInstall" "postInstall"];
-      
-  name = "mozplugger-" + version;
   meta = {
     description = "Mozilla plugin for launching external program for handling in-page objects";
+    homepage = http://mozplugger.mozdev.org/;
+    license = stdenv.lib.licenses.gpl2Plus;
   };
 }
diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix
index 33df71c62c38..5a37a8eb76a7 100644
--- a/pkgs/applications/networking/dropbox/default.nix
+++ b/pkgs/applications/networking/dropbox/default.nix
@@ -19,11 +19,11 @@
 
 let
   # NOTE: When updating, please also update in current stable, as older versions stop working
-  version = "3.6.7";
+  version = "3.6.9";
   sha256 =
     {
-      "x86_64-linux" = "1jwzrpw382amx0jap9m411a3yvkc9iwnw6n35kwq3infmbwjs6q8";
-      "i686-linux" = "0rjd908bhfk00qh6gvizf2fyfb3cccd78spyvh435z377x2pmxzy";
+      "x86_64-linux" = "1i260mi40siwcx9b2sj4zwszxmj1l88mpmyqncsfa72k02jz22j3";
+      "i686-linux" = "0qqc8qbfaighbhjq9y22ka6n6apl8b6cr80a9rkpk2qsk99k8h1z";
     }."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
 
   arch =
diff --git a/pkgs/applications/networking/instant-messengers/ekiga/default.nix b/pkgs/applications/networking/instant-messengers/ekiga/default.nix
index 7ce47d53d141..b7b923159117 100644
--- a/pkgs/applications/networking/instant-messengers/ekiga/default.nix
+++ b/pkgs/applications/networking/instant-messengers/ekiga/default.nix
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
 
   preAutoreconf = ''
     substituteInPlace configure.ac --replace AM_GCONF_SOURCE_2 ""
+    substituteInPlace configure.ac --replace gnome-icon-theme adwaita-icon-theme
   '';
 
   configureFlags = [
diff --git a/pkgs/applications/science/electronics/kicad/default.nix b/pkgs/applications/science/electronics/kicad/default.nix
index 1fc97abef927..0762002b8a84 100644
--- a/pkgs/applications/science/electronics/kicad/default.nix
+++ b/pkgs/applications/science/electronics/kicad/default.nix
@@ -4,13 +4,13 @@ stdenv.mkDerivation rec {
   name = "kicad-20131025";
 
   src = fetchbzr {
-    url = "https://code.launchpad.net/~kicad-stable-committers/kicad/stable";
+    url = "https://code.launchpad.net/kicad/stable";
     rev = 4024;
     sha256 = "1sv1l2zpbn6439ccz50p05hvqg6j551aqra551wck9h3929ghly5";
   };
 
   srcLibrary = fetchbzr {
-    url = "http://bazaar.launchpad.net/~kicad-lib-committers/kicad/library";
+    url = "http://bazaar.launchpad.net/~kicad-product-committers/kicad/library";
     rev = 293;
     sha256 = "1wn9a4nhqyjzzfkq6xm7ag8n5n10xy7gkq6i7yry7wxini7pzv1i";
   };
diff --git a/pkgs/applications/science/electronics/verilator/default.nix b/pkgs/applications/science/electronics/verilator/default.nix
index 635e89dadc8b..825f342b4434 100644
--- a/pkgs/applications/science/electronics/verilator/default.nix
+++ b/pkgs/applications/science/electronics/verilator/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name    = "verilator-${version}";
-  version = "3.872";
+  version = "3.874";
 
   src = fetchurl {
     url    = "http://www.veripool.org/ftp/${name}.tgz";
-    sha256 = "113ha7vy6lsi9zygiy3rnsd3dhi5y8lkfsfrh0nwzady7147l2yh";
+    sha256 = "070binwp0jnashi6w45km26vrn6200b8hdg4179lcqyzdxi8c06j";
   };
 
   enableParallelBuilding = true;
diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix
index 0eb4632a4c00..3182f4a5c66c 100644
--- a/pkgs/applications/search/recoll/default.nix
+++ b/pkgs/applications/search/recoll/default.nix
@@ -1,6 +1,7 @@
 { stdenv, fetchurl
 , qt4, xapian, file, python
 , djvulibre, groff, libxslt, unzip, xpdf, antiword, catdoc, lyx
+, libwpd, unrtf, untex
 , ghostscript, gawk, gnugrep, gnused, gnutar, gzip, libiconv }:
 
 assert stdenv.system != "powerpc-linux";
@@ -40,12 +41,11 @@ stdenv.mkDerivation rec {
       substituteInPlace  $f --replace unzip         ${unzip}/bin/unzip
       substituteInPlace  $f --replace xls2csv       ${catdoc}/bin/xls2csv
       substituteInPlace  $f --replace xsltproc      ${libxslt}/bin/xsltproc
+      substituteInPlace  $f --replace unrtf         ${unrtf}/bin/unrtf
+      substituteInPlace  $f --replace untex         ${untex}/bin/untex
+      substituteInPlace  $f --replace wpd2html      ${libwpd}/bin/wpd2html
     done
   '';
-    # TODO:
-    #substituteInPlace  $f --replace unrtf         ${unrtf}/bin/unrtf 
-    #substituteInPlace  $f --replace untex         ${untex}/bin/untex
-    #substituteInPlace  $f --replace wpd2html      ${wpd2html}/bin/wpd2html
 
   meta = with stdenv.lib; {
     description = "A full-text search tool";
diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix
index cd24f2bfc2a4..30eac05c234a 100644
--- a/pkgs/applications/video/kodi/default.nix
+++ b/pkgs/applications/video/kodi/default.nix
@@ -37,18 +37,18 @@ assert cecSupport   -> libcec != null;
 assert rtmpSupport  -> rtmpdump != null;
 
 let
-  rel = "Helix";
-  ffmpeg_2_4_6 = fetchurl {
-    url = "https://github.com/xbmc/FFmpeg/archive/2.4.6-${rel}.tar.gz";
-    sha256 = "1kxp2z2zgcbplm5398zrfgwcfacfzvbg9y9wwrmm8vgwfmj32wh8";
+  rel = "Isengard";
+  ffmpeg_2_6_3 = fetchurl {
+    url = "https://github.com/xbmc/FFmpeg/archive/2.6.3-${rel}.tar.gz";
+    sha256 = "129nwrj9i758vz9xakpp68sm1l7z4in0krq6ayyqnpsnm54r9xlc";
   };
 in stdenv.mkDerivation rec {
     name = "kodi-" + version;
-    version = "14.2";
+    version = "15.0";
 
     src = fetchurl {
       url = "https://github.com/xbmc/xbmc/archive/${version}-${rel}.tar.gz";
-      sha256 = "1x37l8db6xrvdw933p804lnwvkcm4vdb9gm5i6vmz4ha8f88bjyr";
+      sha256 = "1zqdmqffjfr5219cvpbvq9v1z5p5pzi2m9xs9lzk4jz7rxrs3nr7";
     };
 
     buildInputs = [
@@ -86,7 +86,7 @@ in stdenv.mkDerivation rec {
         --replace 'usr/share/zoneinfo' 'etc/zoneinfo'
       substituteInPlace tools/depends/target/ffmpeg/autobuild.sh \
         --replace "/bin/bash" "${bash}/bin/bash -ex"
-      cp ${ffmpeg_2_4_6} tools/depends/target/ffmpeg/ffmpeg-2.4.6-${rel}.tar.gz
+      cp ${ffmpeg_2_6_3} tools/depends/target/ffmpeg/ffmpeg-2.6.3-${rel}.tar.gz
     '';
 
     preConfigure = ''
diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix
index 9b88400ef535..d270d3a2b1d6 100644
--- a/pkgs/applications/window-managers/weston/default.nix
+++ b/pkgs/applications/window-managers/weston/default.nix
@@ -6,11 +6,12 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "weston-${wayland.version}";
+  name = "weston-${version}";
+  version = "1.8.0";
 
   src = fetchurl {
     url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
-    sha256 = "1kb6a494j56sh7iy43xwkjlr3bh0nnkq4bkimwj6qirzbya12i8w";
+    sha256 = "04nkbbdglh0pqznxkdqvak3pc53jmz24d0658bn5r0cf6agycqw9";
   };
 
   buildInputs = [
diff --git a/pkgs/build-support/build-maven.nix b/pkgs/build-support/build-maven.nix
index a1faf8060be9..ff91828eeca7 100644
--- a/pkgs/build-support/build-maven.nix
+++ b/pkgs/build-support/build-maven.nix
@@ -15,15 +15,27 @@ infoFile: let
 
   script = writeText "build-maven-repository.sh" ''
     ${lib.concatStrings (map (dep: let
-      inherit (dep) url sha1 groupId artifactId version authenticated;
+      inherit (dep)
+        url sha1 groupId artifactId version
+        authenticated metadata extension repository-id;
+
+      versionDir = dep.unresolved-version or version;
 
       fetch = (if authenticated then requireFile else fetchurl) {
         inherit url sha1;
       };
+
+      fetchMetadata = (if authenticated then requireFile else fetchurl) {
+        inherit (metadata) url sha1;
+      };
     in ''
-      dir=$out/$(echo ${groupId} | sed 's|\.|/|g')/${artifactId}/${version}
+      dir=$out/$(echo ${groupId} | sed 's|\.|/|g')/${artifactId}/${versionDir}
       mkdir -p $dir
       ln -sv ${fetch} $dir/${fetch.name}
+      ${lib.optionalString (dep ? metadata) ''
+        ln -svf ${fetchMetadata} $dir/maven-metadata-${repository-id}.xml
+        ln -sv ${fetch} $dir/$(echo ${fetch.name} | sed 's|${version}|${dep.unresolved-version}|')
+      ''}
     '') info.dependencies)}
   '';
 
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index ec024c72481d..57607ba25b95 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -7,7 +7,7 @@
 
 { name ? "", stdenv, nativeTools, nativeLibc, nativePrefix ? ""
 , cc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? stdenv.shell
-, zlib ? null, extraPackages ? []
+, zlib ? null, extraPackages ? [], extraBuildCommands ? ""
 , dyld ? null # TODO: should this be a setup-hook on dyld?
 , isGNU ? false, isClang ? false
 }:
@@ -232,7 +232,8 @@ stdenv.mkDerivation {
 
       substituteAll ${./add-flags} $out/nix-support/add-flags.sh
       cp -p ${./utils.sh} $out/nix-support/utils.sh
-    '';
+    ''
+    + extraBuildCommands;
 
   # The dynamic linker has different names on different Linux platforms.
   dynamicLinker =
diff --git a/pkgs/desktops/gnome-3/3.16/core/gnome-control-center/default.nix b/pkgs/desktops/gnome-3/3.16/core/gnome-control-center/default.nix
index 0c676c38efa9..5d6e504951f7 100644
--- a/pkgs/desktops/gnome-3/3.16/core/gnome-control-center/default.nix
+++ b/pkgs/desktops/gnome-3/3.16/core/gnome-control-center/default.nix
@@ -19,7 +19,8 @@ stdenv.mkDerivation rec {
 
   propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard gnome3.libgnomekbd ];
 
-  enableParallelBuilding = true;
+  # https://bugzilla.gnome.org/show_bug.cgi?id=752596
+  enableParallelBuilding = false;
 
   buildInputs = with gnome3;
     [ pkgconfig intltool ibus gtk glib upower libcanberra gsettings_desktop_schemas
@@ -52,7 +53,8 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with stdenv.lib; {
-    description = "Single sign-on framework for GNOME";
+    description = "Utilities to configure the GNOME desktop";
+    license = licenses.gpl2Plus;
     maintainers = with maintainers; [ lethalman ];
     platforms = platforms.linux;
   };
diff --git a/pkgs/development/compilers/closure/default.nix b/pkgs/development/compilers/closure/default.nix
index 2135e75a07ac..9d9eb42b0649 100644
--- a/pkgs/development/compilers/closure/default.nix
+++ b/pkgs/development/compilers/closure/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "closure-compiler-${version}";
-  version = "20150315";
+  version = "20150609";
 
   src = fetchurl {
     url = "http://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
-    sha256 = "1vzwyhpqbrndg7mri81f1b2yi8cshw5pghvdda9vdxgq465sa52f";
+    sha256 = "0347j50kg41agrvpb29vp69ra912ljhp206z9kbrk84lxpmx19rp";
   };
 
   phases = [ "installPhase" ];
diff --git a/pkgs/development/compilers/coreclr/default.nix b/pkgs/development/compilers/coreclr/default.nix
index 094df5b5b631..629d981893d9 100644
--- a/pkgs/development/compilers/coreclr/default.nix
+++ b/pkgs/development/compilers/coreclr/default.nix
@@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = http://dotnet.github.io/core/;
     description = ".NET is a general purpose development platform.";
-    platforms = with stdenv.lib.platforms; linux;
+    platforms = [ "x86_64-linux" ];
     maintainers = with stdenv.lib.maintainers; [ obadz ];
     license = stdenv.lib.licenses.mit;
   };
diff --git a/pkgs/development/compilers/edk2/default.nix b/pkgs/development/compilers/edk2/default.nix
index ebbac8ec3553..f68681e60232 100644
--- a/pkgs/development/compilers/edk2/default.nix
+++ b/pkgs/development/compilers/edk2/default.nix
@@ -46,7 +46,7 @@ edk2 = stdenv.mkDerivation {
       configurePhase = ''
         mkdir -v Conf
         sed -e 's|Nt32Pkg/Nt32Pkg.dsc|${projectDscPath}|' -e \
-          's|MYTOOLS|GCC48|' -e 's|IA32|${targetArch}|' -e 's|DEBUG|RELEASE|'\
+          's|MYTOOLS|GCC49|' -e 's|IA32|${targetArch}|' -e 's|DEBUG|RELEASE|'\
           < ${edk2}/BaseTools/Conf/target.template > Conf/target.txt
         sed -e 's|DEFINE GCC48_IA32_PREFIX       = /usr/bin/|DEFINE GCC48_IA32_PREFIX       = ""|' \
           -e 's|DEFINE GCC48_X64_PREFIX        = /usr/bin/|DEFINE GCC48_X64_PREFIX        = ""|' \
diff --git a/pkgs/development/compilers/fsharp/default.nix b/pkgs/development/compilers/fsharp/default.nix
index 92d80deb532e..11bae06fc749 100644
--- a/pkgs/development/compilers/fsharp/default.nix
+++ b/pkgs/development/compilers/fsharp/default.nix
@@ -4,11 +4,11 @@
 
 stdenv.mkDerivation rec {
   name = "fsharp-${version}";
-  version = "3.1.1.32";
+  version = "3.1.2.5";
 
   src = fetchurl {
     url = "https://github.com/fsharp/fsharp/archive/${version}.tar.gz";
-    sha256 = "16kqgdx0y0lmxv59mc4g7l5ll60nixg5b8bg07vxfnqrf7i6dffd";
+    sha256 = "1j6lnzvhj8fj1csb9am9xcrmmph6v3jyangkq8n1yp3dr6yxqzh1";
   };
 
   buildInputs = [ mono pkgconfig dotnetbuildhelpers autoconf automake which ];
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix
index 14641faa5fec..9069387762fd 100644
--- a/pkgs/development/compilers/gcc/4.9/default.nix
+++ b/pkgs/development/compilers/gcc/4.9/default.nix
@@ -320,7 +320,7 @@ stdenv.mkDerivation ({
       " --with-gnu-as --without-gnu-ld "
       else ""}
     --enable-lto
-    ${if enableMultilib then "--disable-libquadmath" else "--disable-multilib"}
+    ${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
     ${if enableShared then "" else "--disable-shared"}
     ${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
     ${optionalString (isl != null) "--with-isl=${isl}"}
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix
index 5e6acea35dfc..46864c0bb029 100644
--- a/pkgs/development/compilers/gcc/5/default.nix
+++ b/pkgs/development/compilers/gcc/5/default.nix
@@ -318,7 +318,7 @@ stdenv.mkDerivation ({
       " --with-gnu-as --without-gnu-ld "
       else ""}
     --enable-lto
-    ${if enableMultilib then "--disable-libquadmath" else "--disable-multilib"}
+    ${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"}
     ${if enableShared then "" else "--disable-shared"}
     ${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
     ${optionalString (isl != null) "--with-isl=${isl}"}
diff --git a/pkgs/development/compilers/go/default.nix b/pkgs/development/compilers/go/1.0.nix
index b35159c10e79..b16ce93a3c56 100644
--- a/pkgs/development/compilers/go/default.nix
+++ b/pkgs/development/compilers/go/1.0.nix
@@ -90,6 +90,6 @@ stdenv.mkDerivation {
     description = "The Go Programming language";
     license = "BSD";
     maintainers = with stdenv.lib.maintainers; [ pierron viric ];
-    platforms = stdenv.lib.platforms.linux;
+    platforms = [ "x86_64-linux" ];
   };
 }
diff --git a/pkgs/development/compilers/go/1.2.nix b/pkgs/development/compilers/go/1.2.nix
index bbedea812b8d..7aaedcb365df 100644
--- a/pkgs/development/compilers/go/1.2.nix
+++ b/pkgs/development/compilers/go/1.2.nix
@@ -87,6 +87,6 @@ stdenv.mkDerivation {
     description = "The Go Programming language";
     license = licenses.bsd3;
     maintainers = with maintainers; [ pierron viric ];
-    platforms = platforms.linux;
+    platforms = [ "x86_64-linux" ];
   };
 }
diff --git a/pkgs/development/compilers/mono/default.nix b/pkgs/development/compilers/mono/default.nix
index 66939ff1a026..3082a53137b8 100644
--- a/pkgs/development/compilers/mono/default.nix
+++ b/pkgs/development/compilers/mono/default.nix
@@ -6,13 +6,15 @@ let
 in
 stdenv.mkDerivation rec {
   name = "mono-${version}";
-  version = "4.0.1";
+  version = "4.0.2.5";
   src = fetchurl {
     url = "http://download.mono-project.com/sources/mono/${name}.tar.bz2";
-    sha256 = "1kjv1zhcmd2qfr89vkaas6541n5jfzisn3y030l6lg6lp3ria7zz";
+    sha256 = "0lfndz7l3j593wilyczb5w6kvrdbf2fsd1i46qlszfjvx975hx5h";
   };
 
-  buildInputs = [bison pkgconfig glib gettext perl libgdiplus libX11 ncurses zlib];
+  buildInputs =
+    [ bison pkgconfig glib gettext perl libgdiplus libX11 ncurses zlib
+    ];
   propagatedBuildInputs = [glib];
 
   NIX_LDFLAGS = "-lgcc_s" ;
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 837fa79859d4..0ec01cebf499 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -891,4 +891,6 @@ self: super: {
   # Hydra no longer allows building texlive packages.
   lhs2tex = dontDistribute super.lhs2tex;
 
+  # https://ghc.haskell.org/trac/ghc/ticket/9825
+  vimus = overrideCabal super.vimus (drv: { broken = pkgs.stdenv.isLinux && pkgs.stdenv.isi686; });
 }
diff --git a/pkgs/development/interpreters/pypy/default.nix b/pkgs/development/interpreters/pypy/default.nix
index 143bab575347..a4eb7439b0d5 100644
--- a/pkgs/development/interpreters/pypy/default.nix
+++ b/pkgs/development/interpreters/pypy/default.nix
@@ -114,6 +114,7 @@ let
       isPypy = true;
       buildEnv = callPackage ../python/wrapper.nix { python = self; };
       interpreter = "${self}/bin/${executable}";
+      sitePackages = "lib/${libPrefix}/site-packages";
     };
 
     enableParallelBuilding = true;  # almost no parallelization without STM
diff --git a/pkgs/development/interpreters/scsh/default.nix b/pkgs/development/interpreters/scsh/default.nix
index 98b4f55f79b8..ad2bf945f966 100644
--- a/pkgs/development/interpreters/scsh/default.nix
+++ b/pkgs/development/interpreters/scsh/default.nix
@@ -1,26 +1,22 @@
-{stdenv, fetchurl}:
-
-let
-  pname = "scsh";
-  version = "0.6.7";
-  name = "${pname}-${version}";
-in
+{ stdenv, fetchgit, autoconf, automake, autoreconfHook, scheme48 }:
 
 stdenv.mkDerivation {
-  inherit name;
+  name = "scsh-0.7pre";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/${pname}/${name}.tar.gz";
-    sha256 = "c4a9f7df2a0bb7a7aa3dafc918aa9e9a566d4ad33a55f0192889de172d1ddb7f";
+  src = fetchgit {
+    url = "git://github.com/scheme/scsh.git";
+    rev = "f99b8c5293628cfeaeb792019072e3a96841104f";
+    fetchSubmodules = true;
+    sha256 = "0fz1r0bmiii9ld91r84dqkqwhnqk0h6drdycq93zcy5ndyn12fqp";
   };
 
-  meta = {
+  buildInputs = [ autoconf automake autoreconfHook scheme48 ];
+  configureFlags = ''--with-scheme48=${scheme48}'';
+
+  meta = with stdenv.lib; {
     description = "A Scheme shell";
-    longDescription = ''
-      SCSH is an implementation of the Scheme shell.  It is implemented as
-      a heap image which is interpreted by the Scheme 48 virtual machine.
-    '';
     homepage = http://www.scsh.net/;
-    license = stdenv.lib.licenses.bsd3;
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ joachifm ];
   };
 }
diff --git a/pkgs/development/libraries/bobcat/default.nix b/pkgs/development/libraries/bobcat/default.nix
index 38dfce7583a7..2a9ee1c9c5bd 100644
--- a/pkgs/development/libraries/bobcat/default.nix
+++ b/pkgs/development/libraries/bobcat/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, gcc49, icmake, libmilter, libX11, openssl, readline
+{ stdenv, fetchurl, icmake, libmilter, libX11, openssl, readline
 , utillinux, yodl }:
 
 let version = "3.25.02"; in
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
     maintainers = with maintainers; [ nckx ];
   };
 
-  buildInputs = [ gcc49 libmilter libX11 openssl readline utillinux ];
+  buildInputs = [ libmilter libX11 openssl readline utillinux ];
   nativeBuildInputs = [ icmake yodl ];
 
   postPatch = ''
diff --git a/pkgs/development/libraries/capstone/default.nix b/pkgs/development/libraries/capstone/default.nix
index d61c82bb7d3b..a72532ee35bc 100644
--- a/pkgs/development/libraries/capstone/default.nix
+++ b/pkgs/development/libraries/capstone/default.nix
@@ -1,21 +1,16 @@
-{ stdenv, fetchurl, bash }:
+{ stdenv, fetchurl, bash, cmake }:
 
 stdenv.mkDerivation rec {
   name    = "capstone-${version}";
-  version = "2.1.2";
+  version = "3.0.4";
 
   src = fetchurl {
-    url    = "http://www.capstone-engine.org/download/${version}/${name}.tgz";
-    sha256 = "1k6px3vdcsfby3lakss5sazs875kbzkzqk7cj79xrm2y5ik1vr29";
+    url    = "https://github.com/aquynh/capstone/archive/${version}.tar.gz";
+    sha256 = "1whl5c8j6vqvz2j6ay2pyszx0jg8d3x8hq66cvgghmjchvsssvax";
   };
 
-  buildPhase = false;
-
-  patchPhase = ''
-    substituteInPlace make.sh --replace "/usr/bin/env bash" "${bash}/bin/bash"
-  '';
-
-  installPhase = "PREFIX=$out ./make.sh install";
+  buildInputs = [ cmake ];
+  enableParallelBuild = true;
 
   meta = {
     description = "advanced disassembly library";
diff --git a/pkgs/development/libraries/cogl/1.20.nix b/pkgs/development/libraries/cogl/1.20.nix
index 1489f48c9b46..5eb12fe29989 100644
--- a/pkgs/development/libraries/cogl/1.20.nix
+++ b/pkgs/development/libraries/cogl/1.20.nix
@@ -18,10 +18,9 @@ stdenv.mkDerivation rec {
 
   configureFlags = [
     "--enable-introspection"
-    "--enable-gles1"
-    "--enable-gles2"
     "--enable-kms-egl-platform"
-  ] ++ stdenv.lib.optional gstreamerSupport "--enable-cogl-gst";
+  ] ++ stdenv.lib.optional gstreamerSupport "--enable-cogl-gst"
+    ++ stdenv.lib.optionals (!stdenv.isDarwin) [ "--enable-gles1" "--enable-gles2" ];
 
   propagatedBuildInputs = with xorg; [
       glib gdk_pixbuf gobjectIntrospection
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index 5c76bc3186ba..fb9c361c5306 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -93,6 +93,8 @@ stdenv.mkDerivation rec {
        sed -e '/\/gdbus\/codegen-peer-to-peer/ s/^\/*/\/\//' -i gio/tests/gdbus-peer.c
        # All gschemas fail to pass the test, upstream bug?
        sed -e '/g_test_add_data_func/ s/^\/*/\/\//' -i gio/tests/gschema-compile.c
+       # Cannot reproduce the failing test_associations on hydra
+       sed -e '/\/appinfo\/associations/d' -i gio/tests/appinfo.c
        # Needed because of libtool wrappers
        sed -e '/g_subprocess_launcher_set_environ (launcher, envp);/a g_subprocess_launcher_setenv (launcher, "PATH", g_getenv("PATH"), TRUE);' -i gio/tests/gsubprocess.c
     '';
diff --git a/pkgs/development/libraries/libseccomp/default.nix b/pkgs/development/libraries/libseccomp/default.nix
index 61f22701111c..af9f017ac739 100644
--- a/pkgs/development/libraries/libseccomp/default.nix
+++ b/pkgs/development/libraries/libseccomp/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name    = "libseccomp-${version}";
-  version = "2.2.1";
+  version = "2.2.3";
 
   src = fetchFromGitHub {
     owner = "seccomp";
     repo = "libseccomp";
     rev = "v${version}";
-    sha256 = "153k3jflcgij19nxghmwlvqlngl84vkld514d31490c6sfkr5fy2";
+    sha256 = "0pl827qjls5b6kjj8qxxdwcn6rviqbm5xjqf0hgx6b04c836mswx";
   };
 
   buildInputs = [ autoreconfHook getopt ];
diff --git a/pkgs/development/libraries/libssh/0001-Reintroduce-ssh_forward_listen-Fixes-194.patch b/pkgs/development/libraries/libssh/0001-Reintroduce-ssh_forward_listen-Fixes-194.patch
deleted file mode 100644
index 030983d5c55e..000000000000
--- a/pkgs/development/libraries/libssh/0001-Reintroduce-ssh_forward_listen-Fixes-194.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 3c8fe6e2c595ee019408249c364b3019b6c31a8a Mon Sep 17 00:00:00 2001
-From: Mike DePaulo <mikedep333@gmail.com>
-Date: Fri, 15 May 2015 22:22:13 -0400
-Subject: [PATCH] Reintroduce ssh_forward_listen() (Fixes: #194)
-
----
- src/channels.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/channels.c b/src/channels.c
-index 7a4e71f..db5f83a 100644
---- a/src/channels.c
-+++ b/src/channels.c
-@@ -2206,6 +2206,11 @@ error:
- }
- 
- /* DEPRECATED */
-+int ssh_forward_listen(ssh_session session, const char *address, int port, int *bound_port) {
-+  return ssh_channel_listen_forward(session, address, port, bound_port);
-+}
-+
-+/* DEPRECATED */
- ssh_channel ssh_forward_accept(ssh_session session, int timeout_ms) {
-   return ssh_channel_accept(session, SSH_CHANNEL_FORWARDED_TCPIP, timeout_ms, NULL);
- }
--- 
-2.1.4
-
diff --git a/pkgs/development/libraries/libssh/default.nix b/pkgs/development/libraries/libssh/default.nix
index ef4540db2b2e..1766a685aaab 100644
--- a/pkgs/development/libraries/libssh/default.nix
+++ b/pkgs/development/libraries/libssh/default.nix
@@ -1,15 +1,13 @@
 { stdenv, fetchurl, pkgconfig, cmake, zlib, openssl, libsodium }:
 
 stdenv.mkDerivation rec {
-  name = "libssh-0.7.0";
+  name = "libssh-0.7.1";
 
   src = fetchurl {
-    url = "https://git.libssh.org/projects/libssh.git/snapshot/${name}.tar.gz";
-    sha256 = "1wfrdqhv97f4ycd9bcpgb6gw47kr7b2iq8cz5knk8a6n9c6870k0";
+    url = "https://red.libssh.org/attachments/download/154/libssh-0.7.1.tar.xz";
+    sha256 = "0v84zm957z31yyrj47n62hby38nrjk5ih0ajmgccnqrjdpwwrirg";
   };
 
-  patches = [ ./0001-Reintroduce-ssh_forward_listen-Fixes-194.patch ];
-
   postPatch = ''
     # Fix headers to use libsodium instead of NaCl
     sed -i 's,nacl/,sodium/,g' ./include/libssh/curve25519.h src/curve25519.c
diff --git a/pkgs/development/libraries/libwpd/default.nix b/pkgs/development/libraries/libwpd/default.nix
index df5917fb05cf..01ae59efdf41 100644
--- a/pkgs/development/libraries/libwpd/default.nix
+++ b/pkgs/development/libraries/libwpd/default.nix
@@ -11,4 +11,10 @@ stdenv.mkDerivation rec {
   buildInputs = [ glib libgsf libxml2 zlib librevenge ];
 
   nativeBuildInputs = [ pkgconfig ];
+
+  meta = with stdenv.lib; {
+    description = "A library for importing and exporting WordPerfect documents";
+    homepage = http://libwpd.sourceforge.net/;
+    license = licenses.lgpl21;
+  };
 }
diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix
index 4b7debda6383..f54f12031b44 100644
--- a/pkgs/development/libraries/poppler/default.nix
+++ b/pkgs/development/libraries/poppler/default.nix
@@ -4,7 +4,7 @@
 , utils ? false, suffix ? "glib"
 }:
 
-let
+let # beware: updates often break cups_filters build
   version = "0.34.0"; # even major numbers are stable
   sha256 = "1c2wa4pfzqmvzq1jpp3ps5nmzz745gcg8dnpwqpfdccy5ydbm90v";
 in
diff --git a/pkgs/development/libraries/qt-5/5.3/default.nix b/pkgs/development/libraries/qt-5/5.3/default.nix
index 693f62a63ebd..14675af48fbf 100644
--- a/pkgs/development/libraries/qt-5/5.3/default.nix
+++ b/pkgs/development/libraries/qt-5/5.3/default.nix
@@ -22,6 +22,8 @@ let
   ver = "${v_maj}.${v_min}";
 in
 
+let system-x86_64 = elem stdenv.system platforms.x86_64; in
+
 stdenv.mkDerivation rec {
   name = "qt-${ver}";
 
@@ -126,6 +128,16 @@ stdenv.mkDerivation rec {
     -no-linuxfb
     -no-kms
 
+    ${optionalString (!system-x86_64) "-no-sse2"}
+    -no-sse3
+    -no-ssse3
+    -no-sse4.1
+    -no-sse4.2
+    -no-avx
+    -no-avx2
+    -no-mips_dsp
+    -no-mips_dspr2
+
     -system-zlib
     -system-libpng
     -system-libjpeg
@@ -144,6 +156,11 @@ stdenv.mkDerivation rec {
     -${optionalString (buildTests == false) "no"}make tests
   '';
 
+  # PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag
+  # if dependency paths contain the string "pq", which can occur in the hash.
+  # To prevent these failures, we need to override PostgreSQL detection.
+  PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql}/lib -lpq";
+
   propagatedBuildInputs = [
     xlibs.libXcomposite libX11 libxcb libXext libXrender libXi
     fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre
diff --git a/pkgs/development/libraries/qt-5/5.4/qtbase.nix b/pkgs/development/libraries/qt-5/5.4/qtbase.nix
index 7ef39a408603..ecefa891332e 100644
--- a/pkgs/development/libraries/qt-5/5.4/qtbase.nix
+++ b/pkgs/development/libraries/qt-5/5.4/qtbase.nix
@@ -25,6 +25,8 @@
 
 with stdenv.lib;
 
+let system-x86_64 = elem stdenv.system platforms.x86_64; in
+
 stdenv.mkDerivation {
 
   name = "qtbase-${version}";
@@ -104,6 +106,7 @@ stdenv.mkDerivation {
     -strip
     -reduce-relocations
     -system-proxies
+    -pkg-config
 
     -gui
     -widgets
@@ -124,6 +127,16 @@ stdenv.mkDerivation {
     -no-linuxfb
     -no-kms
 
+    ${optionalString (!system-x86_64) "-no-sse2"}
+    -no-sse3
+    -no-ssse3
+    -no-sse4.1
+    -no-sse4.2
+    -no-avx
+    -no-avx2
+    -no-mips_dsp
+    -no-mips_dspr2
+
     -system-zlib
     -system-libpng
     -system-libjpeg
@@ -142,6 +155,11 @@ stdenv.mkDerivation {
     -${optionalString (buildTests == false) "no"}make tests
   '';
 
+  # PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag
+  # if dependency paths contain the string "pq", which can occur in the hash.
+  # To prevent these failures, we need to override PostgreSQL detection.
+  PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql}/lib -lpq";
+
   propagatedBuildInputs = [
     xlibs.libXcomposite libX11 libxcb libXext libXrender libXi
     fontconfig freetype openssl dbus.libs glib udev libxml2 libxslt pcre
@@ -171,12 +189,11 @@ stdenv.mkDerivation {
 
       # Don't retain build-time dependencies like gdb and ruby.
       sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $out/mkspecs/qconfig.pri
-
-      mkdir -p "$out/nix-support"
-      substitute ${./setup-hook.sh} "$out/nix-support/setup-hook" \
-        --subst-var out --subst-var-by lndir "${lndir}"
     '';
 
+  inherit lndir;
+  setupHook = ./setup-hook.sh;
+
   enableParallelBuilding = true; # often fails on Hydra, as well as qt4
 
   meta = {
diff --git a/pkgs/development/libraries/signon/default.nix b/pkgs/development/libraries/signon/default.nix
index 0bafb42e2c52..7b3defb8a589 100644
--- a/pkgs/development/libraries/signon/default.nix
+++ b/pkgs/development/libraries/signon/default.nix
@@ -1,10 +1,11 @@
-{ stdenv, fetchurl, doxygen, qt5 }:
+{ stdenv, fetchzip, doxygen, qt5 }:
 
 stdenv.mkDerivation rec {
-  name = "signon-8.56";
-  src = fetchurl {
-    url = "https://accounts-sso.googlecode.com/files/${name}.tar.bz2";
-    sha256 = "00kwysm7bga0bycclkcyslsa6aahcn98drm125l6brzhigc7qxa8";
+  name = "signon-${version}";
+  version = "8.57";
+  src = fetchzip {
+    url = "http://signond.accounts-sso.googlecode.com/archive/${version}.zip";
+    sha256 = "0q1ncmp27jrwbjkqisf0l63zzpw6bcsx5i4y86xixh8wd5arj87a";
   };
 
   buildInputs = [ qt5.base ];
@@ -14,11 +15,4 @@ stdenv.mkDerivation rec {
     qmake PREFIX=$out LIBDIR=$out/lib CMAKE_CONFIG_PATH=$out/lib/cmake/SignOnQt5
   '';
 
-  postInstall = ''
-    mv $out/lib/cmake/SignOnQt5/SignOnQtConfig.cmake \
-      $out/lib/cmake/SignOnQt5/SignOnQt5Config.cmake
-    mv $out/lib/cmake/SignOnQt5/SignOnQtConfigVersion.cmake \
-      $out/lib/cmake/SignOnQt5/SignOnQt5ConfigVersion.cmake
-  '';
-
 }
diff --git a/pkgs/development/python-modules/rainbowstream/image.patch b/pkgs/development/python-modules/rainbowstream/image.patch
new file mode 100644
index 000000000000..215152ae4fb1
--- /dev/null
+++ b/pkgs/development/python-modules/rainbowstream/image.patch
@@ -0,0 +1,18 @@
+diff --git a/rainbowstream/c_image.py b/rainbowstream/c_image.py
+index f050150..a0fb77d 100644
+--- a/rainbowstream/c_image.py
++++ b/rainbowstream/c_image.py
+@@ -12,11 +12,7 @@ def call_c():
+     """
+     Call the C program for converting RGB to Ansi colors
+     """
+-    library = expanduser('~/.image.so')
+-    sauce = join(dirname(__file__), 'image.c')
+-    if not exists(library) or getmtime(sauce) > getmtime(library):
+-        build = "cc -fPIC -shared -o %s %s" % (library, sauce)
+-        os.system(build + " >/dev/null 2>&1")
++    library = '@CLIB@'
+     image_c = ctypes.cdll.LoadLibrary(library)
+     image_c.init()
+     return image_c.rgb_to_ansi
+
diff --git a/pkgs/development/tools/build-managers/cargo/default.nix b/pkgs/development/tools/build-managers/cargo/default.nix
index d849ad5de944..9ffc9b0cbb99 100644
--- a/pkgs/development/tools/build-managers/cargo/default.nix
+++ b/pkgs/development/tools/build-managers/cargo/default.nix
@@ -11,8 +11,7 @@ buildRustPackage rec {
   src = fetchgit {
     url = "https://github.com/rust-lang/cargo.git";
     rev = "refs/tags/0.3.0";
-    sha256 = "1ckb2xd7nm8357imw6b1ci2ar8grnihzan94kvmjrijq6sz8yv9i";
-    leaveDotGit = true;
+    sha256 = "0p7p7yivydjkpqb53a8i7pjl719z3gxa6czi0255ccwsh6n9z793";
   };
 
   depsSha256 = "1sgdr2akd9xrfmf5g0lbf842b2pdj1ymxk37my0cf2x349rjsf0w";
diff --git a/pkgs/development/tools/build-managers/ninja/default.nix b/pkgs/development/tools/build-managers/ninja/default.nix
index 5ba5d86ac77a..c1ef980e82d3 100644
--- a/pkgs/development/tools/build-managers/ninja/default.nix
+++ b/pkgs/development/tools/build-managers/ninja/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   name = "ninja-${version}";
-  version = "1.5.3";
+  version = "1.6.0";
 
   src = fetchurl {
     name = "${name}.tar.gz";
     url = "https://github.com/martine/ninja/archive/v${version}.tar.gz";
-    sha256 = "1h3yfwcfl61v493vna6jia2fizh8rpig7qw2504cvkr6gid3p5bw";
+    sha256 = "1ryd1686bd31gfdjxnqm6k1ybnjmjz8v97px7lmdkr4g0vxqhgml";
   };
 
   buildInputs = [ python asciidoc re2c ];
diff --git a/pkgs/development/tools/misc/pahole/default.nix b/pkgs/development/tools/misc/pahole/default.nix
index 739cc7e5143d..38de21872b9f 100644
--- a/pkgs/development/tools/misc/pahole/default.nix
+++ b/pkgs/development/tools/misc/pahole/default.nix
@@ -11,8 +11,8 @@ stdenv.mkDerivation {
 
   postInstall = ''
     for p in $out/bin/*; do
-      rpath=`patchelf --print-rpath $p`:$out
-      patchelf --set-rpath $rpath $p
+      rpath=`patchelf --print-rpath $p || true`:$out
+      patchelf --set-rpath "$rpath" $p || true
     done
   '';
 
diff --git a/pkgs/development/tools/parsing/flexc++/default.nix b/pkgs/development/tools/parsing/flexc++/default.nix
index 515fb9d251f2..d723cc0382b3 100644
--- a/pkgs/development/tools/parsing/flexc++/default.nix
+++ b/pkgs/development/tools/parsing/flexc++/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, bobcat, gcc49, icmake, yodl }:
+{ stdenv, fetchurl, bobcat, icmake, yodl }:
 
 let version = "2.02.00"; in
 stdenv.mkDerivation rec {
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
     maintainers = with maintainers; [ nckx ];
   };
 
-  buildInputs = [ bobcat gcc49 ];
+  buildInputs = [ bobcat ];
   nativeBuildInputs = [ icmake yodl ];
 
   postPatch = ''
diff --git a/pkgs/development/tools/parsing/re2c/default.nix b/pkgs/development/tools/parsing/re2c/default.nix
index ce9941b2362b..d4b3e56ebe33 100644
--- a/pkgs/development/tools/parsing/re2c/default.nix
+++ b/pkgs/development/tools/parsing/re2c/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "re2c-${version}";
-  version = "0.14.2";
+  version = "0.14.3";
 
   src = fetchurl {
     url    = "mirror://sourceforge/re2c/re2c/${version}/${name}.tar.gz";
-    sha256 = "0c0w5w1dp9v9d0a6smjbnk6zvfs77fx1xd7damap3x3sjxiyn0m7";
+    sha256 = "113yj5h38isfsjigqvb2j3ammfmxckgwyxmm0h4fyflzb7ghcs0w";
   };
 
   meta = {
diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix
index 97136aa255ee..085807e1bfad 100644
--- a/pkgs/development/tools/vagrant/default.nix
+++ b/pkgs/development/tools/vagrant/default.nix
@@ -4,7 +4,7 @@
 assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";
 
 let
-  version = "1.7.3";
+  version = "1.7.4";
   rake = buildRubyGem {
     inherit ruby;
     name = "rake-10.3.2";
@@ -19,12 +19,12 @@ stdenv.mkDerivation rec {
     if stdenv.system == "x86_64-linux" then
       fetchurl {
         url    = "https://dl.bintray.com/mitchellh/vagrant/vagrant_${version}_x86_64.deb";
-        sha256 = "0zg2sdxgrmwqvzqw4z8d6ji8d0cby33nggv0n9ncjxp0wjiv8nkm";
+        sha256 = "0dl3cskpz7d8mmv0ah86426vlx0lj1wkjdlb5gc868dfsysw5lnw";
       }
     else
       fetchurl {
         url    = "https://dl.bintray.com/mitchellh/vagrant/vagrant_${version}_i686.deb";
-        sha256 = "0r23w49jwl3c3g4nns5xnrsrqyfkqsgln91cj30hxkw50d0ldpvs";
+        sha256 = "0sns9q48c6b2sabp6bwkppx8ffp774jhv69jrv225qrnifx12105";
       };
 
   meta = with stdenv.lib; {
@@ -93,12 +93,12 @@ stdenv.mkDerivation rec {
 
   preFixup = ''
     # 'hide' the template file from shebang-patching
-    chmod -x $out/opt/vagrant/embedded/gems/gems/bundler-1.7.11/lib/bundler/templates/Executable
+    chmod -x $out/opt/vagrant/embedded/gems/gems/bundler-1.10.5/lib/bundler/templates/Executable
     chmod -x $out/opt/vagrant/embedded/gems/gems/vagrant-${version}/plugins/provisioners/salt/bootstrap-salt.sh
   '';
 
   postFixup = ''
-    chmod +x $out/opt/vagrant/embedded/gems/gems/bundler-1.7.11/lib/bundler/templates/Executable
+    chmod +x $out/opt/vagrant/embedded/gems/gems/bundler-1.10.5/lib/bundler/templates/Executable
     chmod +x $out/opt/vagrant/embedded/gems/gems/vagrant-${version}/plugins/provisioners/salt/bootstrap-salt.sh
   '';
 }
diff --git a/pkgs/games/anki/default.nix b/pkgs/games/anki/default.nix
index af90c8267050..8c5ad4ab0d8e 100644
--- a/pkgs/games/anki/default.nix
+++ b/pkgs/games/anki/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
     buildInputs = [ python py.wrapPython lame mplayer libpulseaudio ];
 
     preConfigure = ''
-      substituteInPlace anki \
+      substituteInPlace anki/anki \
         --replace /usr/share/ $out/share/
 
       substituteInPlace Makefile \
diff --git a/pkgs/games/dwarf-therapist/default.nix b/pkgs/games/dwarf-therapist/default.nix
index 6d7eaf307367..4e676bf5f9df 100644
--- a/pkgs/games/dwarf-therapist/default.nix
+++ b/pkgs/games/dwarf-therapist/default.nix
@@ -1,7 +1,7 @@
 { stdenv, coreutils, fetchgit, qt4, dwarf_fortress, bash, makeWrapper }:
 
 let
-  version = "30.2.0pre";
+  version = "31.0.0";
   df = dwarf_fortress;
 in
 stdenv.mkDerivation rec {
@@ -9,8 +9,8 @@ stdenv.mkDerivation rec {
 
   src = fetchgit {
     url = "https://github.com/splintermind/Dwarf-Therapist.git";
-    rev = "65bb15a29d616d788c20a3344058b7277e4fadba";
-    sha256 = "1q1n9sm0lgmn52m4aigb22cdfbh2s569y1mn5cmimgj600i6c2f2";
+    rev = "refs/tags/v${version}";
+    sha256 = "02d6k8c3vm401v04ln9q405njarx869jpfyf42lwskijrzjygk9x";
   };
 
   # Needed for hashing
diff --git a/pkgs/games/quake3/game/botlib.patch b/pkgs/games/quake3/game/botlib.patch
new file mode 100644
index 000000000000..82e2c7811012
--- /dev/null
+++ b/pkgs/games/quake3/game/botlib.patch
@@ -0,0 +1,51 @@
+Retrieved from https://bugzilla.icculus.org/show_bug.cgi?id=4331,
+removed path prefix.
+
+  -- nckx <tobias.geerinckx.rice@gmail.com>
+
+PATCH: Bots don't work on 64 bit Intel CPU's
+
+botlib abuses strcpy (source and dest overlap), and the strcpy function for 64
+bit intel CPU's in the latest glibc, does not like this causing the bots to not
+load.
+
+The attached patch fixes this.
+
+Note this patch should be credited to: Andreas Bierfert (andreas.bierfert at
+lowlatency.de)
+
+See: http://bugzilla.redhat.com/show_bug.cgi?id=526338
+
+diff -up quake3-1.36/code/botlib/l_precomp.c~ quake3-1.36/code/botlib/l_precomp.c
+--- code/botlib/l_precomp.c~	2009-04-27 08:42:37.000000000 +0200
++++ code/botlib/l_precomp.c	2009-11-03 21:03:08.000000000 +0100
+@@ -948,7 +948,7 @@ void PC_ConvertPath(char *path)
+ 		if ((*ptr == '\\' || *ptr == '/') &&
+ 				(*(ptr+1) == '\\' || *(ptr+1) == '/'))
+ 		{
+-			strcpy(ptr, ptr+1);
++			memmove(ptr, ptr+1, strlen(ptr));
+ 		} //end if
+ 		else
+ 		{
+diff -up quake3-1.36/code/botlib/l_script.c~ quake3-1.36/code/botlib/l_script.c
+--- code/botlib/l_script.c~	2009-04-27 08:42:37.000000000 +0200
++++ code/botlib/l_script.c	2009-11-03 21:06:11.000000000 +0100
+@@ -1118,7 +1118,7 @@ void StripDoubleQuotes(char *string)
+ {
+ 	if (*string == '\"')
+ 	{
+-		strcpy(string, string+1);
++		memmove(string, string+1, strlen(string));
+ 	} //end if
+ 	if (string[strlen(string)-1] == '\"')
+ 	{
+@@ -1135,7 +1135,7 @@ void StripSingleQuotes(char *string)
+ {
+ 	if (*string == '\'')
+ 	{
+-		strcpy(string, string+1);
++		memmove(string, string+1, strlen(string));
+ 	} //end if
+ 	if (string[strlen(string)-1] == '\'')
+ 	{
diff --git a/pkgs/games/quake3/game/default.nix b/pkgs/games/quake3/game/default.nix
index cbcc8c290f81..ed447004345e 100644
--- a/pkgs/games/quake3/game/default.nix
+++ b/pkgs/games/quake3/game/default.nix
@@ -20,6 +20,9 @@ stdenv.mkDerivation {
     # Do an exit() instead of _exit().  This is nice for gcov.
     # Upstream also seems to do this.
     ./exit.patch
+
+    # No bots on amd64 without this patch.
+    ./botlib.patch
   ];
 
   buildInputs = [ x11 SDL mesa openal gcc46 ];
diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix
index 96f409faef87..ff4b104059d7 100644
--- a/pkgs/games/steam/chrootenv.nix
+++ b/pkgs/games/steam/chrootenv.nix
@@ -14,6 +14,7 @@ buildFHSUserEnv {
       pkgs.gnome2.zenity
       pkgs.xdg_utils
       pkgs.xlibs.xrandr
+      pkgs.which
     ]
     ++ lib.optional (config.steam.java or false) pkgs.jdk
     ++ lib.optional (config.steam.primus or false) pkgs.primus
diff --git a/pkgs/games/tibia/default.nix b/pkgs/games/tibia/default.nix
index 4d759c5f8898..03729cfae3bc 100644
--- a/pkgs/games/tibia/default.nix
+++ b/pkgs/games/tibia/default.nix
@@ -3,11 +3,11 @@
 with stdenv.lib;
 assert stdenv.isi686;
 stdenv.mkDerivation {
-  name = "tibia-10.79";
+  name = "tibia-10.80";
 
   src = fetchurl {
-    url = http://static.tibia.com/download/tibia1079.tgz;
-    sha256 = "04wpg5hdfhcp12kk2va3jdijr2p9jfmfivgqrn3cnbblxi83k2sn";
+    url = http://static.tibia.com/download/tibia1080.tgz;
+    sha256 = "0ng7gi64lsda8k3674nc2gwnr8si648nmwgghrjrcwyybgsyzfvl";
   };
 
   shell = stdenv.shell;
diff --git a/pkgs/misc/cups/filters.nix b/pkgs/misc/cups/filters.nix
index 8043cbb1506e..a860273e9eb5 100644
--- a/pkgs/misc/cups/filters.nix
+++ b/pkgs/misc/cups/filters.nix
@@ -1,35 +1,32 @@
-{ stdenv, fetchurl, pkgconfig, cups, poppler, poppler_utils, fontconfig
+{ stdenv, fetchurl, fetchpatch, pkgconfig, cups, poppler, poppler_utils, fontconfig
 , libjpeg, libpng, perl, ijs, qpdf, dbus, substituteAll, bash, avahi }:
 
 stdenv.mkDerivation rec {
   name = "cups-filters-${version}";
-  version = "1.0.61";
+  version = "1.0.71";
 
   src = fetchurl {
     url = "http://openprinting.org/download/cups-filters/${name}.tar.xz";
-    sha256 = "1bq48nnrarlbf6qc93bz1n5wlh6j420gppbck3r45sinwhz5wa7m";
+    sha256 = "07wwlqcykfjfqcwj1bxk60ggahyaw7wcx32n5s104d1qkhham01i";
   };
 
-  patches = [
-    (substituteAll {
-      src = ./longer-shell-path.patch;
-      bash = "${bash}/bin/bash";
-    })
-
-    # Fix build with poppler-0.31.0
-    (fetchurl {
-      url = "https://bugs.linuxfoundation.org/attachment.cgi?id=476";
-      name = "cups-filters-poppler-0.31.0.patch";
-      sha256 = "016pzksz4nl1sv3p5ahlnbmb7c899yrvlzq8jxic0gvdrzwd5bl4";
-    })
-  ];
+  patches = [(fetchpatch { # drop on update
+    name = "poppler-0.34.patch";
+    url = "https://bugs.linuxfoundation.org/attachment.cgi?id=493";
+    sha256 = "18za83q0b0n4hpvvw76jsv0hm89zmijvps2z5kg1srickqlxj891";
+  })];
 
   buildInputs = [
     pkgconfig cups poppler poppler_utils fontconfig libjpeg libpng perl
     ijs qpdf dbus avahi
   ];
 
-  configureFlags = "--with-pdftops=pdftops --enable-imagefilters --with-rcdir=no";
+  configureFlags = [
+    "--with-pdftops=pdftops"
+    "--enable-imagefilters"
+    "--with-rcdir=no"
+    "--with-shell=${stdenv.shell}"
+  ];
 
   makeFlags = "CUPS_SERVERBIN=$(out)/lib/cups CUPS_DATADIR=$(out)/share/cups CUPS_SERVERROOT=$(out)/etc/cups";
 
diff --git a/pkgs/misc/cups/longer-shell-path.patch b/pkgs/misc/cups/longer-shell-path.patch
deleted file mode 100644
index a15fd4832258..000000000000
--- a/pkgs/misc/cups/longer-shell-path.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/filter/foomatic-rip/foomaticrip.c b/filter/foomatic-rip/foomaticrip.c
-index 1c019aa..431d2f9 100644
---- a/filter/foomatic-rip/foomaticrip.c
-+++ b/filter/foomatic-rip/foomaticrip.c
-@@ -174,7 +174,7 @@ char cupsfilterpath[PATH_MAX] = "/usr/local/lib/cups/filter:"
-                                 "/opt/cups/filter:"
-                                 "/usr/lib/cups/filter";
- 
--char modern_shell[64] = "/bin/bash";
-+char modern_shell[128] = "@bash@";
- 
- void config_set_option(const char *key, const char *value)
- {
diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix
index bc568f739450..ba7fda90a703 100644
--- a/pkgs/misc/vim-plugins/default.nix
+++ b/pkgs/misc/vim-plugins/default.nix
@@ -59,6 +59,7 @@ rec {
   hoogle              = Hoogle;
   ipython             = vim-ipython;
   latex-live-preview  = vim-latex-live-preview;
+  multiple-cursors    = vim-multiple-cursors;
   necoGhc             = neco-ghc; # backwards compat, added 2014-10-18
   neocomplete         = neocomplete-vim;
   neosnippet          = neosnippet-vim;
@@ -451,6 +452,17 @@ rec {
 
   };
 
+  vim-multiple-cursors = buildVimPluginFrom2Nix { # created by nix#NixDerivation
+    name = "vim-multiple-cursors-2015-05-29";
+    src = fetchgit {
+      url = "git://github.com/terryma/vim-multiple-cursors";
+      rev = "3199d34f57e1e20d2dd807b31a5a72d7f7d42e96";
+      sha256 = "26b43c921b416cc19482d03435516d42a209ab104bac9979b073d0db61e95186";
+    };
+    dependencies = [];
+
+  };
+
   vim-nerdtree-tabs = buildVimPluginFrom2Nix { # created by nix#NixDerivation
     name = "vim-nerdtree-tabs-2014-09-25";
     src = fetchgit {
diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names
index f7b01d8af7f3..be9914ef8cfe 100644
--- a/pkgs/misc/vim-plugins/vim-plugin-names
+++ b/pkgs/misc/vim-plugins/vim-plugin-names
@@ -96,6 +96,7 @@
 "vim-gitgutter"
 "vim-iced-coffee-script"
 "vim-latex-live-preview"
+"vim-multiple-cursors"
 "vim-signature"
 "vim-snippets"
 "vim2hs"
diff --git a/pkgs/os-specific/linux/gradm/default.nix b/pkgs/os-specific/linux/gradm/default.nix
index d34a028220c9..97f4c1e93fa3 100644
--- a/pkgs/os-specific/linux/gradm/default.nix
+++ b/pkgs/os-specific/linux/gradm/default.nix
@@ -3,11 +3,11 @@
 
 stdenv.mkDerivation rec {
   name    = "gradm-${version}";
-  version = "3.1-201503211320";
+  version = "3.1-201507191652";
 
   src  = fetchurl {
     url    = "http://grsecurity.net/stable/${name}.tar.gz";
-    sha256 = "17yd307jqva8jqib2xr3i9kmp58f2cb4jd7an5rbk5zr1k48ap9j";
+    sha256 = "0l3s56wvk5kpd2qppl328x4alh327xnbf271lh1fan84pxbw651g";
   };
 
   buildInputs = [ gcc coreutils findutils binutils pam flex bison bash ];
diff --git a/pkgs/os-specific/linux/jfbview/default.nix b/pkgs/os-specific/linux/jfbview/default.nix
index 4b371097ee6e..34bf136ece78 100644
--- a/pkgs/os-specific/linux/jfbview/default.nix
+++ b/pkgs/os-specific/linux/jfbview/default.nix
@@ -1,5 +1,4 @@
-# FIXME: remove gcc49 when the default gcc supports C++1y
-{ stdenv, fetchFromGitHub, freetype, gcc49, imlib2, jbig2dec, libjpeg, libX11
+{ stdenv, fetchFromGitHub, freetype, imlib2, jbig2dec, libjpeg, libX11
 , mujs, mupdf, ncurses, openjpeg, openssl }:
 
 let
@@ -16,7 +15,7 @@ stdenv.mkDerivation rec {
     owner = "jichu4n";
   };
 
-  buildInputs = [ freetype gcc49 imlib2 jbig2dec libjpeg libX11 mujs mupdf
+  buildInputs = [ freetype imlib2 jbig2dec libjpeg libX11 mujs mupdf
     ncurses openjpeg openssl ];
 
   buildFlags = binaries;
diff --git a/pkgs/os-specific/linux/kernel-headers/2.6.32.nix b/pkgs/os-specific/linux/kernel-headers/2.6.32.nix
deleted file mode 100644
index 100dd0c611b3..000000000000
--- a/pkgs/os-specific/linux/kernel-headers/2.6.32.nix
+++ /dev/null
@@ -1,62 +0,0 @@
-{stdenv, fetchurl, perl, cross ? null}:
-
-assert cross == null -> stdenv.isLinux;
-
-let
-  version = "2.6.32.16";
-  kernelHeadersBaseConfig = if cross == null then
-      stdenv.platform.kernelHeadersBaseConfig
-    else
-      cross.platform.kernelHeadersBaseConfig;
-in
-
-stdenv.mkDerivation {
-  name = "linux-headers-${version}";
-
-  src = fetchurl {
-    url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2";
-    sha256 = "1ndvqvfaxachsklzzr5db1bzvfhnzz8diddrm1zlv7171fzmn13j";
-  };
-
-  targetConfig = if cross != null then cross.config else null;
-
-  platform =
-    if cross != null then cross.platform.kernelArch else
-    if stdenv.system == "i686-linux" then "i386" else
-    if stdenv.system == "x86_64-linux" then "x86_64" else
-    if stdenv.system == "powerpc-linux" then "powerpc" else
-    if stdenv.isArm then "arm" else
-    if stdenv.platform ? kernelArch then stdenv.platform.kernelArch else
-    abort "don't know what the kernel include directory is called for this platform";
-
-  buildInputs = [perl];
-
-  extraIncludeDirs =
-    if cross != null then
-	(if cross.arch == "powerpc" then ["ppc"] else [])
-    else if stdenv.system == "powerpc-linux" then ["ppc"] else [];
-
-  buildPhase = ''
-    if test -n "$targetConfig"; then
-       export ARCH=$platform
-    fi
-    make ${kernelHeadersBaseConfig}
-    make mrproper headers_check
-  '';
-
-  installPhase = ''
-    make INSTALL_HDR_PATH=$out headers_install
-
-    # Some builds (e.g. KVM) want a kernel.release.
-    mkdir -p $out/include/config
-    echo "${version}-default" > $out/include/config/kernel.release
-  '';
-
-  # !!! hacky
-  fixupPhase = ''
-    ln -s asm $out/include/asm-$platform
-    if test "$platform" = "i386" -o "$platform" = "x86_64"; then
-      ln -s asm $out/include/asm-x86
-    fi
-  '';
-}
diff --git a/pkgs/os-specific/linux/kernel/linux-3.2.nix b/pkgs/os-specific/linux/kernel/linux-3.2.nix
deleted file mode 100644
index 2fc240f6196d..000000000000
--- a/pkgs/os-specific/linux/kernel/linux-3.2.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ stdenv, fetchurl, ... } @ args:
-
-import ./generic.nix (args // rec {
-  version = "3.2.69";
-  extraMeta.branch = "3.2";
-
-  src = fetchurl {
-    url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-    sha256 = "0fs7aj3vn51dlx7yfgkx05qpki2msh6j2irwajd9bw0l26cbycd3";
-  };
-
-  # We don't provide these patches if grsecurity is enabled, because
-  # the grsec 3.2 -stable patchset already includes them.
-  kernelPatches = args.kernelPatches ++ (
-    stdenv.lib.optionals (!(args.features.grsecurity or false))
-      [ { name = "0001-AppArmor-compatibility-patch-for-v5-network-controll";
-          patch = ./apparmor-patches/3.2/0001-AppArmor-compatibility-patch-for-v5-network-controll.patch;
-        }
-        { name = "0002-AppArmor-compatibility-patch-for-v5-interface";
-          patch = ./apparmor-patches/3.2/0002-AppArmor-compatibility-patch-for-v5-interface.patch;
-        }
-        { name = "0003-AppArmor-Allow-dfa-backward-compatibility-with-broke";
-          patch = ./apparmor-patches/3.2/0003-AppArmor-Allow-dfa-backward-compatibility-with-broke.patch;
-        }]);
-
-  features.iwlwifi  = true;
-} // (args.argsOverride or {}))
diff --git a/pkgs/os-specific/linux/kernel/linux-3.4.nix b/pkgs/os-specific/linux/kernel/linux-3.4.nix
deleted file mode 100644
index a0ba7f46c687..000000000000
--- a/pkgs/os-specific/linux/kernel/linux-3.4.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ stdenv, fetchurl, ... } @ args:
-
-import ./generic.nix (args // rec {
-  version = "3.4.108";
-  extraMeta.branch = "3.4";
-
-  src = fetchurl {
-    url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-    sha256 = "0xdycfbn2j398n1763zkhiv08xsya52acic1zign4s315b45pijm";
-  };
-
-  kernelPatches = args.kernelPatches ++
-    [ { name = "0001-UBUNTU-SAUCE-AppArmor-Add-profile-introspection-file";
-        patch = ./apparmor-patches/3.4/0001-UBUNTU-SAUCE-AppArmor-Add-profile-introspection-file.patch;
-      }
-      { name = "0002-UBUNTU-SAUCE-AppArmor-basic-networking-rules";
-        patch = ./apparmor-patches/3.4/0002-UBUNTU-SAUCE-AppArmor-basic-networking-rules.patch;
-      }
-      { name = "0003-UBUNTU-SAUCE-apparmor-Add-the-ability-to-mediate-mou";
-        patch = ./apparmor-patches/3.4/0003-UBUNTU-SAUCE-apparmor-Add-the-ability-to-mediate-mou.patch;
-      }];
-
-  features.iwlwifi = true;
-  features.efiBootStub = true;
-  features.needsCifsUtils = true;
-  features.netfilterRPFilter = true;
-})
diff --git a/pkgs/os-specific/linux/ktap/default.nix b/pkgs/os-specific/linux/ktap/default.nix
deleted file mode 100644
index 2cb4f60f75b9..000000000000
--- a/pkgs/os-specific/linux/ktap/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ stdenv, fetchgit, kernel, useFFI ? false }:
-
-assert builtins.substring 0 4 kernel.version != "3.18";
-
-let
-  ffiArgs = stdenv.lib.optionalString useFFI "FFI=1";
-in
-stdenv.mkDerivation rec {
-  name = "ktap-${version}";
-  version = "0.5-e7a38ef0";
-  src = fetchgit {
-    url    = "https://github.com/ktap/ktap.git";
-    rev    = "e7a38ef06bec9a651c9e8bdb3ad66a104210d475";
-    sha256 = "07acf20e1926d3afd89b13855154b8cc792c57261e7d3cae2da70cb08844f9c8";
-  };
-
-  buildPhase = ''
-    make ${ffiArgs} KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build
-  '';
-
-  installPhase = ''
-    mkdir -p $out/sbin
-    cp ktap $out/sbin
-    make modules_install KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build INSTALL_MOD_PATH=$out
-  '';
-
-  meta = {
-    description = "A lightweight script-based dynamic tracing tool for Linux";
-    homepage    = "http://www.ktap.org";
-    license     = stdenv.lib.licenses.gpl2;
-    platforms   = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
-  };
-}
diff --git a/pkgs/os-specific/linux/lockdep/default.nix b/pkgs/os-specific/linux/lockdep/default.nix
index 612291e62e42..7765f5f8b9c2 100644
--- a/pkgs/os-specific/linux/lockdep/default.nix
+++ b/pkgs/os-specific/linux/lockdep/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   name    = "lockdep-${version}";
-  version = "3.19.1";
-  fullver = "3.19.1";
+  version = "4.1.2";
+  fullver = "4.1.2";
 
   src = fetchurl {
-    url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-    sha256 = "0qx7vxmlcwr4nvzf4wq0da7xwzqw4b67h9a5rfpxgg9mayk3czvi";
+    url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
+    sha256 = "1mdyjhnzhh254cblahqmpsk226z006z6sm9dmwvg6jlhpsw4cjhy";
   };
 
   preConfigure = "cd tools/lib/lockdep";
diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix
index 6b30104b0833..75f25e268042 100644
--- a/pkgs/os-specific/linux/nfs-utils/default.nix
+++ b/pkgs/os-specific/linux/nfs-utils/default.nix
@@ -1,18 +1,18 @@
 { fetchurl, stdenv, tcp_wrappers, utillinux, libcap, libtirpc, libevent, libnfsidmap
-, lvm2, e2fsprogs, python
+, lvm2, e2fsprogs, python, sqlite
 }:
 
 stdenv.mkDerivation rec {
-  name = "nfs-utils-1.2.5";
+  name = "nfs-utils-1.3.2"; # NOTE: when updating, remove the HACK BUG FIX below
 
   src = fetchurl {
     url = "mirror://sourceforge/nfs/${name}.tar.bz2";
-    sha256 = "16ssfkj36ljifyaskgwpd3ys8ylhi5gasq88aha3bhg5dr7yv59m";
+    sha256 = "1xwilpdr1vizq2yhpzxpwqqr9f8kn0dy2wcpc626mf30ybp7572v";
   };
 
   buildInputs =
     [ tcp_wrappers utillinux libcap libtirpc libevent libnfsidmap
-      lvm2 e2fsprogs python
+      lvm2 e2fsprogs python sqlite
     ];
 
   # FIXME: Add the dependencies needed for NFSv4 and TI-RPC.
@@ -32,14 +32,15 @@ stdenv.mkDerivation rec {
       done
       sed -i s,/usr/sbin,$out/sbin, utils/statd/statd.c
 
-      # https://bugzilla.redhat.com/show_bug.cgi?id=749195
-      sed -i s,PAGE_SIZE,getpagesize\(\), utils/blkmapd/device-process.c
+      # HACK BUG FIX: needed for 1.3.2
+      # http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=17a3e5bffb7110d46de1bf42b64b90713ff5ea50
+      sed -e 's,daemon_init(!,daemon_init(,' -i utils/statd/statd.c
     '';
 
   preBuild =
     ''
       makeFlags="sbindir=$out/sbin"
-      installFlags="statedir=$TMPDIR" # hack to make `make install' work
+      installFlags="statedir=$TMPDIR statdpath=$TMPDIR" # hack to make `make install' work
     '';
 
   # One test fails on mips.
diff --git a/pkgs/os-specific/linux/pax-utils/default.nix b/pkgs/os-specific/linux/pax-utils/default.nix
index 266fee9e493c..13d144c54b09 100644
--- a/pkgs/os-specific/linux/pax-utils/default.nix
+++ b/pkgs/os-specific/linux/pax-utils/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "pax-utils-${version}";
-  version = "1.0.3";
+  version = "1.0.5";
 
   src = fetchurl {
     url = "http://dev.gentoo.org/~vapier/dist/${name}.tar.xz";
-    sha256 = "0w2nddgany3s0znyj6zizlvn8y5vba9x49jm5nliv13p3x7ajdc5";
+    sha256 = "0vwhmnwai24h654d1zchm5qkbr030ay98l2qdp914ydgwhw9k6pn";
   };
 
   makeFlags = [
diff --git a/pkgs/os-specific/linux/statifier/default.nix b/pkgs/os-specific/linux/statifier/default.nix
index 0e1ecdd6d7d5..dd62d6d9d071 100644
--- a/pkgs/os-specific/linux/statifier/default.nix
+++ b/pkgs/os-specific/linux/statifier/default.nix
@@ -17,9 +17,9 @@ stdenv.mkDerivation {
     sed -e s@/usr/@"$out/"@g -i */Makefile src/statifier
     sed -e s@/bin/bash@"${stdenv.shell}"@g -i src/*.sh
   '';
-      
+
   meta = with stdenv.lib; {
     description = "Tool for creating static Linux binaries";
-    platforms = with platforms; [ linux ];
+    platforms = with platforms; linux;
   };
 }
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index bde6686ff0a9..b98f6e69282e 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -82,6 +82,8 @@ stdenv.mkDerivation rec {
 
       substituteInPlace src/journal/catalog.c \
         --replace /usr/lib/systemd/catalog/ $out/lib/systemd/catalog/
+
+      configureFlagsArray+=("--with-ntp-servers=0.nixos.pool.ntp.org 1.nixos.pool.ntp.org 2.nixos.pool.ntp.org 3.nixos.pool.ntp.org")
     '';
 
   # This is needed because systemd uses the gold linker, which doesn't
diff --git a/pkgs/os-specific/linux/udev/145.nix b/pkgs/os-specific/linux/udev/145.nix
deleted file mode 100644
index fd1cb8a2d8dc..000000000000
--- a/pkgs/os-specific/linux/udev/145.nix
+++ /dev/null
@@ -1,53 +0,0 @@
-{ stdenv, fetchurl, gperf, pkgconfig, glib, acl, libusb, usbutils, pciutils }:
-
-assert stdenv ? glibc;
-
-stdenv.mkDerivation rec {
-  name = "udev-145";
-
-  src = fetchurl {
-    url = "mirror://kernel/linux/utils/kernel/hotplug/${name}.tar.bz2";
-    sha256 = "1zmibp6n7d582fqx8vmg9vb2a1435hghfpz36056bc25ccwf7yiv";
-  };
-
-  buildInputs = [gperf pkgconfig glib acl libusb usbutils];
-
-  configureFlags = "--with-pci-ids-path=${pciutils}/share/pci.ids";
-
-  preConfigure =
-    ''
-      substituteInPlace extras/keymap/Makefile.in \
-        --replace /usr/include ${stdenv.glibc}/include
-    '';
-
-  postInstall =
-    ''
-      # Install some rules that really should be installed by default.
-      for i in 40-alsa.rules 40-infiniband.rules 40-isdn.rules 40-pilot-links.rules 64-device-mapper.rules 64-md-raid.rules; do
-        cp rules/packages/$i $out/libexec/rules.d/
-      done
-
-      # The path to rule_generator.functions in write_cd_rules and
-      # write_net_rules is broken.  Also, don't store the mutable
-      # persistant rules in /etc/udev/rules.d but in
-      # /var/lib/udev/rules.d.
-      for i in $out/libexec/write_cd_rules $out/libexec/write_net_rules; do
-        substituteInPlace $i \
-          --replace /lib/udev $out/libexec \
-          --replace /etc/udev/rules.d /var/lib/udev/rules.d
-      done
-
-      # Don't set PATH to /bin:/sbin; won't work in NixOS.
-      substituteInPlace $out/libexec/rule_generator.functions \
-        --replace 'PATH=' '#PATH='
-
-      # Don't hardcore the FIRMWARE_DIRS variable; obtain it from the
-      # environment of the caller.
-      sed '3,4d' -i $out/libexec/firmware.sh
-    '';
-
-  meta = {
-    homepage = http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html;
-    description = "Udev manages the /dev filesystem";
-  };
-}
diff --git a/pkgs/os-specific/linux/zfs/git.nix b/pkgs/os-specific/linux/zfs/git.nix
index 0df47e612e2b..130a02c86e8e 100644
--- a/pkgs/os-specific/linux/zfs/git.nix
+++ b/pkgs/os-specific/linux/zfs/git.nix
@@ -1,12 +1,12 @@
 { callPackage, stdenv, fetchgit, spl_git, ... } @ args:
 
 callPackage ./generic.nix (args // rec {
-  version = "2015-07-01";
+  version = "2015-05-13";
 
   src = fetchgit {
     url = git://github.com/zfsonlinux/zfs.git;
-    rev = "a7b10a931911d3a98a90965795daad031c6d33a2";
-    sha256 = "0llqbc37f4szx7mwi6j3xmxxz03g3ib7cwypmpcyi0nwkssav5xi";
+    rev = "7fec46b9d8967109ad289d208e8cf36a0c16e40c";
+    sha256 = "0gvzw6vn7wyq2g9psv0fdars7ssidqc5l85x4yym5niccy1xl437";
   };
 
   patches = [ ./nix-build.patch ];
diff --git a/pkgs/servers/amqp/qpid-cpp/default.nix b/pkgs/servers/amqp/qpid-cpp/default.nix
index 69c0a3dff41c..410bd23eb30e 100644
--- a/pkgs/servers/amqp/qpid-cpp/default.nix
+++ b/pkgs/servers/amqp/qpid-cpp/default.nix
@@ -1,14 +1,13 @@
 { stdenv, fetchurl, cmake, python, boost, libuuid, ruby }:
 
 stdenv.mkDerivation rec {
-  name = "${project}-cpp-${version}";
+  name = "qpid-cpp-${version}";
 
-  project = "qpid";
-  version = "0.26";
+  version = "0.34";
 
   src = fetchurl {
-    url = "mirror://apache/${project}/${version}/${name}.tar.gz";
-    sha256 = "1c03yi19d5h5h78h37add9csmy0mzvvmvn7zkcalwszabdhsb5yk";
+    url = "mirror://apache/qpid/cpp/${version}/${name}.tar.gz";
+    sha256 = "07ibwvw5lm7xabv32zai5x03r7l9mxm0zk7h9lbfkzmav0f41w0w";
   };
 
   buildInputs = [ cmake python boost libuuid ruby ];
diff --git a/pkgs/servers/hbase/default.nix b/pkgs/servers/hbase/default.nix
index de5be18713ed..408022f650f4 100644
--- a/pkgs/servers/hbase/default.nix
+++ b/pkgs/servers/hbase/default.nix
@@ -1,10 +1,13 @@
 { stdenv, fetchurl, jre, makeWrapper }:
-stdenv.mkDerivation {
-  name = "hbase-0.98.8";
+stdenv.mkDerivation rec {
+  name = "hbase-${version}";
+  version = "0.98.13";
+
   src = fetchurl {
-    url = http://mirror.gopotato.co.uk/apache/hbase/stable/hbase-0.98.8-hadoop2-bin.tar.gz;
-    sha256 = "0nvxaqpw8v2hg6mn2p2zxj3y6r4dj4xzxmp8rfmv6m6algn5apv6";
+    url = "mirror://apache/hbase/${version}/hbase-${version}-hadoop2-bin.tar.gz";
+    sha256 = "1av81nnnwivxf5ha6x9qrr2afl5sbyskl07prv0rdac954xmgg8n";
   };
+
   buildInputs = [ makeWrapper ];
   installPhase = ''
     mkdir -p $out
diff --git a/pkgs/servers/http/nginx/unstable.nix b/pkgs/servers/http/nginx/unstable.nix
index 907fe98d6810..990d3d52d30a 100644
--- a/pkgs/servers/http/nginx/unstable.nix
+++ b/pkgs/servers/http/nginx/unstable.nix
@@ -10,10 +10,10 @@
 with stdenv.lib;
 
 let
-  version = "1.9.2";
+  version = "1.9.3";
   mainSrc = fetchurl {
     url = "http://nginx.org/download/nginx-${version}.tar.gz";
-    sha256 = "0y7d87v9rvc4xvxaz8cag6zhdg7lfp3z65ain665q02aw5dl5dl0";
+    sha256 = "1svkyrh31g9hzfmj0xwc167sz0b1fn4i62mwipdjy9ia3cscb622";
   };
 
   rtmp-ext = fetchFromGitHub {
diff --git a/pkgs/servers/mail/spamassassin/default.nix b/pkgs/servers/mail/spamassassin/default.nix
index ea69d036f958..e46a76a9b0c0 100644
--- a/pkgs/servers/mail/spamassassin/default.nix
+++ b/pkgs/servers/mail/spamassassin/default.nix
@@ -32,6 +32,7 @@ buildPerlPackage rec {
   doCheck = false;
 
   postInstall = ''
+    mkdir -p $out/share/spamassassin
     mv "rules/"* $out/share/spamassassin/
 
     for n in "$out/bin/"*; do
diff --git a/pkgs/servers/nosql/riak/2.1.1.nix b/pkgs/servers/nosql/riak/2.1.1.nix
new file mode 100644
index 000000000000..ce160312dbbd
--- /dev/null
+++ b/pkgs/servers/nosql/riak/2.1.1.nix
@@ -0,0 +1,94 @@
+{ stdenv, lib, fetchurl, unzip, erlangR16, which, pam, coreutils }:
+
+let
+  solrName = "solr-4.7.0-yz-1.tgz";
+  yokozunaJarName = "yokozuna-2.jar";
+  yzMonitorJarName = "yz_monitor-1.jar";
+
+  srcs = {
+    riak = fetchurl {
+      url = "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/riak-2.1.1.tar.gz";
+      sha256 = "1bm5j3zknz82mkyh5zgaap73awflh4mkibdvdz164235mdxlwhdm";
+    };
+    solr = fetchurl {
+      url = "http://s3.amazonaws.com/files.basho.com/solr/${solrName}";
+      sha256 = "0brml3lb3xk26rmi05rrzpxrw92alfi9gi7p7537ny9lqg3808qp";
+    };
+    yokozunaJar = fetchurl {
+      url = "http://s3.amazonaws.com/files.basho.com/yokozuna/${yokozunaJarName}";
+      sha256 = "0xzfy181qxv27pc4f5xd0szn8vls5743273awr5rwv3608gkspj2";
+    };
+    yzMonitorJar = fetchurl {
+      url = "http://s3.amazonaws.com/files.basho.com/yokozuna/${yzMonitorJarName}";
+      sha256 = "0kb97d1a43vw759j1h5qwbhx455pidn2pi7sfxijqic37h81ri1m";
+    };
+  };
+in
+
+stdenv.mkDerivation rec {
+  name = "riak-2.1.1";
+
+  buildInputs = [
+    which unzip erlangR16 pam
+  ];
+
+  src = srcs.riak;
+
+  postPatch = ''
+    sed -i deps/node_package/priv/base/env.sh \
+      -e 's@{{platform_data_dir}}@$RIAK_DATA_DIR@' \
+      -e 's@^RUNNER_SCRIPT_DIR=.*@RUNNER_SCRIPT_DIR='$out'/bin@' \
+      -e 's@^RUNNER_BASE_DIR=.*@RUNNER_BASE_DIR='$out'@' \
+      -e 's@^RUNNER_ETC_DIR=.*@RUNNER_ETC_DIR=$RIAK_ETC_DIR@' \
+      -e 's@^RUNNER_LOG_DIR=.*@RUNNER_LOG_DIR=$RIAK_LOG_DIR@'
+  '';
+
+  preBuild = ''
+    mkdir solr-pkg
+    cp ${srcs.solr} solr-pkg/${solrName}
+    export SOLR_PKG_DIR=$(readlink -f solr-pkg)
+
+    mkdir -p deps/yokozuna/priv/java_lib
+    cp ${srcs.yokozunaJar} deps/yokozuna/priv/java_lib/${yokozunaJarName}
+
+    mkdir -p deps/yokozuna/priv/solr/lib/ext
+    cp ${srcs.yzMonitorJar} deps/yokozuna/priv/solr/lib/ext/${yzMonitorJarName}
+
+    patchShebangs .
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+
+    make locked-deps
+    make rel
+
+    runHook postBuild
+  '';
+
+  doCheck = false;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir $out
+    mv rel/riak/etc rel/riak/riak-etc
+    mkdir -p rel/riak/etc
+    mv rel/riak/riak-etc rel/riak/etc/riak
+    mv rel/riak/* $out
+
+    for prog in $out/bin/*; do
+      substituteInPlace $prog \
+        --replace '. "`cd \`dirname $0\` && /bin/pwd`/../lib/env.sh"' \
+                  ". $out/lib/env.sh"
+    done
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    maintainers = with maintainers; [ cstrahan ];
+    description = "Dynamo inspired NoSQL DB by Basho";
+    platforms   = platforms.linux;
+  };
+}
diff --git a/pkgs/servers/rpcbind/default.nix b/pkgs/servers/rpcbind/default.nix
index 6eb8a57cab4f..6eb58d458382 100644
--- a/pkgs/servers/rpcbind/default.nix
+++ b/pkgs/servers/rpcbind/default.nix
@@ -1,16 +1,19 @@
 { fetchurl, stdenv, pkgconfig, libtirpc
 , useSystemd ? true, systemd }:
 
-let version = "0.2.3";
+let version = "1.0.7";
 in stdenv.mkDerivation rec {
   name = "rpcbind-${version}";
   
   src = fetchurl {
     url = "mirror://sourceforge/rpcbind/${version}/${name}.tar.bz2";
-    sha256 = "0yyjzv4161rqxrgjcijkrawnk55rb96ha0pav48s03l2klx855wq";
+    sha256 = "14vl0kmavc1fay630f4w8l1hjfzhmcqm8d0akzahhgymh5fw1f7r";
   };
 
   patches = [ ./sunrpc.patch ];
+  postPatch = ''
+    sed -e 's|/usr/include/tirpc|${libtirpc}/include/tirpc|' -i src/Makefile.am -i src/Makefile.in
+  '';
 
   buildInputs = [ libtirpc ]
              ++ stdenv.lib.optional useSystemd systemd;
diff --git a/pkgs/servers/samba/4.x-heimdal-compat.patch b/pkgs/servers/samba/4.x-heimdal-compat.patch
deleted file mode 100644
index 35f01e4001ec..000000000000
--- a/pkgs/servers/samba/4.x-heimdal-compat.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
-index bb476e1..0a407a4 100644
---- a/source4/kdc/kdc.c
-+++ b/source4/kdc/kdc.c
-@@ -967,9 +967,9 @@ static void kdc_task_init(struct task_server *task)
- 	 * The old behavior in the _kdc_get_preferred_key()
- 	 * function is use_strongest_server_key=TRUE.
- 	 */
--	kdc->config->as_use_strongest_session_key = false;
-+	kdc->config->tgt_use_strongest_session_key = false;
-+	kdc->config->svc_use_strongest_session_key = false;
- 	kdc->config->preauth_use_strongest_session_key = false;
--	kdc->config->tgs_use_strongest_session_key = false;
- 	kdc->config->use_strongest_server_key = true;
- 
- 	/* Register hdb-samba4 hooks for use as a keytab */
diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix
index 1cdf7ad2ed00..6b8347177a04 100644
--- a/pkgs/servers/samba/4.x.nix
+++ b/pkgs/servers/samba/4.x.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
   patches =
     [ ./4.x-no-persistent-install.patch
       ./4.x-fix-ctdb-deps.patch
-    ] ++ stdenv.lib.optional enableKerberos ./4.x-heimdal-compat.patch;
+    ];
 
   buildInputs =
     [ python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42 /*
diff --git a/pkgs/servers/sip/sipwitch/default.nix b/pkgs/servers/sip/sipwitch/default.nix
index 14cd91ee1418..8eecfa1e276b 100644
--- a/pkgs/servers/sip/sipwitch/default.nix
+++ b/pkgs/servers/sip/sipwitch/default.nix
@@ -1,11 +1,11 @@
 { fetchurl, stdenv, pkgconfig, ucommon, libosip, libexosip, gnutls, zlib }:
 
 stdenv.mkDerivation rec {
-  name = "sipwitch-1.6.1";
+  name = "sipwitch-1.9.8";
 
   src = fetchurl {
     url = "mirror://gnu/sipwitch/${name}.tar.gz";
-    sha256 = "1sa4fbv8filzcxqx2viyixsq4pwgvkidn6l6g3k62gl8bvdfk7p9";
+    sha256 = "0117c5iid1vrwl7sl3pys2jlinpmx2vfp8wcdwk93m7cc6k9793b";
   };
 
   buildInputs = [ pkgconfig ucommon libosip libexosip gnutls zlib ];
diff --git a/pkgs/tools/X11/ksuperkey/default.nix b/pkgs/tools/X11/ksuperkey/default.nix
new file mode 100644
index 000000000000..233296e58ac4
--- /dev/null
+++ b/pkgs/tools/X11/ksuperkey/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchgit, libX11, libXtst, pkgconfig, inputproto, libXi, xproto, xextproto }:
+
+stdenv.mkDerivation rec {
+  name = "ksuperkey-git-2015-07-21";
+
+  buildInputs = [
+    libX11 libXtst pkgconfig inputproto libXi xproto xextproto
+  ];
+
+  src = fetchgit {
+    url = "https://github.com/hanschen/ksuperkey";
+    rev = "e75a31a0e3e80b14341e92799a7ce3232ac37639";
+    sha256 = "00be6b93daf78bae0223f002e782e30a650dded3c5a83b1adfe9439e20e398fb";
+  };
+
+  preConfigure = ''
+    makeFlags="$makeFlags PREFIX=$out"
+  '';
+
+  meta = {
+    description = "A tool to be able to bind the super key as a key rather than a modifier";
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.vozz ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/tools/backup/partclone/default.nix b/pkgs/tools/backup/partclone/default.nix
index fe2b9e00aaaf..928c0494a1cb 100644
--- a/pkgs/tools/backup/partclone/default.nix
+++ b/pkgs/tools/backup/partclone/default.nix
@@ -8,8 +8,8 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = https://codeload.github.com/Thomas-Tsai/partclone/legacy.tar.gz/stable;
-    sha256 = "0vvk6c26gf2wv5y0mxnz90bivgp84pi82qk5q5xkcz6nz3swals7";
-    name = "Thomas-Tsai-partclone-stable-0-gab3bd53.tar.gz";
+    sha256 = "12bnhljc4n4951p5c05gc7z5qwdsjpx867ad1npmgsm8d9w941sn";
+    name = "Thomas-Tsai-partclone-stable-20150722.tar.gz";
   };
 
   buildInputs = [e2fsprogs pkgconfig libuuid];
diff --git a/pkgs/tools/filesystems/ceph/generic.nix b/pkgs/tools/filesystems/ceph/generic.nix
index b899192aa3cf..bece841d5f51 100644
--- a/pkgs/tools/filesystems/ceph/generic.nix
+++ b/pkgs/tools/filesystems/ceph/generic.nix
@@ -101,7 +101,7 @@ let
   wrapArgs = "--set PYTHONPATH \"$(toPythonPath $lib)\""
     + " --prefix PYTHONPATH : \"$(toPythonPath ${python.modules.readline})\""
     + " --prefix PYTHONPATH : \"$(toPythonPath ${pythonPackages.flask})\""
-    + " --set PATH : \"$out/bin\"";
+    + " --set PATH \"$out/bin\"";
 in
 stdenv.mkDerivation {
   name="ceph-${version}";
diff --git a/pkgs/tools/filesystems/ceph/git.nix b/pkgs/tools/filesystems/ceph/git.nix
index 341c24c04a35..f65b7ea78465 100644
--- a/pkgs/tools/filesystems/ceph/git.nix
+++ b/pkgs/tools/filesystems/ceph/git.nix
@@ -1,12 +1,12 @@
 { callPackage, fetchgit, git, ... } @ args:
 
 callPackage ./generic.nix (args // rec {
-  version = "2015-07-15";
+  version = "2015-07-20";
 
   src = fetchgit {
     url = "git://github.com/ceph/ceph.git";
-    rev = "66dcbaed3c3c8e4b5367ba1cd2859271e692e7e0";
-    sha256 = "05jba4zjrkksrra6rz4kby8vv4ja8fa73wvwcw3yn3mn1x9kyz2g";
+    rev = "ce534e1e0addfe93194a553cec98799ea97affe4";
+    sha256 = "19i9fp06fdyhx5x6ryw5q81id0354601yxnywvir3i9hy51p9xaz";
   };
 
   patches = [ ./fix-pythonpath.patch ];
diff --git a/pkgs/tools/networking/aiccu/default.nix b/pkgs/tools/networking/aiccu/default.nix
index dd53234906dd..81d19646a959 100644
--- a/pkgs/tools/networking/aiccu/default.nix
+++ b/pkgs/tools/networking/aiccu/default.nix
@@ -12,6 +12,14 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ gnutls iproute makeWrapper ];
 
+  patches = [
+    (fetchurl {
+      url = "https://projects.archlinux.org/svntogit/community.git/plain/trunk/gnutls-3.4.0.patch?h=packages/aiccu&id=cc6decc4e734420e4c5d0cd28652077f6bd88d84";
+      sha256 = "1ni3lhwy3r54js124p7fhm1my82a703chvh07vrhslb4v4b71g5s";
+      name = "gnutls-3.4.0.patch";
+    })
+  ];
+
   configureFlags = "--prefix=$out";
   installPhase = ''
     install -D -m 755 unix-console/aiccu $out/bin/aiccu
diff --git a/pkgs/tools/networking/connmanui/default.nix b/pkgs/tools/networking/connmanui/default.nix
index 280d3d9f9fc6..32ae736494f7 100644
--- a/pkgs/tools/networking/connmanui/default.nix
+++ b/pkgs/tools/networking/connmanui/default.nix
@@ -2,17 +2,20 @@
 
 stdenv.mkDerivation rec {
   name = "connmanui-${version}";
-  version = "e4a8ddcca0870eb2ece5a7e3ea0296de9c86e5b2";
+  rev = "fce0af94e121bde77c7fa2ebd6a319f0180c5516";
+  version = "22062015-${rev}";
 
   src = fetchgit {
+    inherit rev;
     url = "git://github.com/tbursztyka/connman-ui.git";
-    rev = version;
-    sha256 = "0rml52v81s7hr0g6qbj5bamli08kn66hay84qicx8sy8679wg443";
+    sha256 = "2072b337379b849cc55a19a3bb40834941e3f82b3924ef5d9b29e887fd19055e";
   };
 
   buildInputs = [ autoconf automake libtool glib gtk3 dbus pkgconfig file intltool connman ];
 
   preConfigure = ''
+    rm m4/intltool.m4
+    ln -s ${intltool}/share/aclocal/intltool.m4 m4/
     set -e
     ./autogen.sh
     sed -i "s/\/usr\/bin\/file/file/g" ./configure
diff --git a/pkgs/tools/networking/dd-agent/default.nix b/pkgs/tools/networking/dd-agent/default.nix
index 8c340460b750..5838d5407be0 100644
--- a/pkgs/tools/networking/dd-agent/default.nix
+++ b/pkgs/tools/networking/dd-agent/default.nix
@@ -2,14 +2,14 @@
 , makeWrapper }:
 
 stdenv.mkDerivation rec {
-  version = "5.2.3";
+  version = "5.4.3";
   name = "dd-agent-${version}";
 
   src = fetchFromGitHub {
-    owner = "DataDog";
-    repo = "dd-agent";
-    rev = version;
-    sha256 = "05flcbzpnmhf6qskkccbfk957sl9hhydlp4p5vqhs62hkpwmqwan";
+    owner  = "datadog";
+    repo   = "dd-agent";
+    rev    = version;
+    sha256 = "07cign0ydxf1h6xsyi3iviywlm9x6d6rcaz46f3wipby6mv1s5dc";
   };
 
   buildInputs = [
diff --git a/pkgs/tools/networking/nzbget/default.nix b/pkgs/tools/networking/nzbget/default.nix
index 8d47ab1e167f..3497fd8efaf5 100644
--- a/pkgs/tools/networking/nzbget/default.nix
+++ b/pkgs/tools/networking/nzbget/default.nix
@@ -1,11 +1,14 @@
 { stdenv, fetchurl, pkgconfig, libxml2, ncurses, libsigcxx, libpar2
 , gnutls, libgcrypt, zlib }:
 
+let
+  version = "15.0";
+in
 stdenv.mkDerivation rec {
-  name = "nzbget-15.0";
+  name = "nzbget-${version}";
 
   src = fetchurl {
-    url = "mirror://sourceforge/nzbget/${name}.tar.gz";
+    url = "http://github.com/nzbget/nzbget/releases/download/v${version}/${name}-src.tar.gz";
     sha256 = "02nclq97gqr4zwww4j1l9sds2rwrwwvwvh2gkjhwvr0pb4z3zw9y";
   };
 
@@ -15,7 +18,7 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
-    homepage = http://nzbget.sourceforge.net/;
+    homepage = http://nzbget.net;
     license = licenses.gpl2Plus;
     description = "A command line tool for downloading files from news servers";
     maintainers = with maintainers; [ pSub ];
diff --git a/pkgs/tools/networking/stunnel/default.nix b/pkgs/tools/networking/stunnel/default.nix
index ef9c56deacb4..31acb8dd9ecd 100644
--- a/pkgs/tools/networking/stunnel/default.nix
+++ b/pkgs/tools/networking/stunnel/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name    = "stunnel-${version}";
-  version = "5.16";
+  version = "5.20";
 
   src = fetchurl {
     url    = "http://www.stunnel.org/downloads/${name}.tar.gz";
-    sha256 = "13b0ad7smz4949hchdgsx3yjr5i3z8flwiy8w6xalvk2n8zykdxn";
+    sha256 = "0ar940mw5sjxkh98d6wnrd366jfkqirbyf2b5kcdk1vjk9ra6dja";
   };
 
   buildInputs = [ openssl ];
diff --git a/pkgs/tools/package-management/nox/default.nix b/pkgs/tools/package-management/nox/default.nix
index bbb576400f07..2930e6fdce23 100644
--- a/pkgs/tools/package-management/nox/default.nix
+++ b/pkgs/tools/package-management/nox/default.nix
@@ -2,16 +2,14 @@
 
 pythonPackages.buildPythonPackage rec {
   name = "nox-${version}";
-  version = "0.0.1";
+  version = "0.0.2";
   namePrefix = "";
 
   src = fetchurl {
     url = "https://pypi.python.org/packages/source/n/nix-nox/nix-nox-${version}.tar.gz";
-    sha256 = "1s1jhickdhym70qrb5h4qxq1mvkpwgdppqpfb2jnpfaf1az6c207";
+    sha256 = "1wpxh5fhj8nx4yx4cvmc087cnf4iqwxf7zd7rdh2ln3pgxrjfral";
   };
 
-  patches = [ ./show-trace.patch ];
-
   buildInputs = [ pythonPackages.pbr ];
 
   pythonPath = with pythonPackages; [
diff --git a/pkgs/tools/package-management/nox/show-trace.patch b/pkgs/tools/package-management/nox/show-trace.patch
deleted file mode 100644
index 6b464d3a4b2c..000000000000
--- a/pkgs/tools/package-management/nox/show-trace.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From: Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>
-Date: Tue, 2 Jun 2015 13:04:19 +0200
-Subject: [PATCH] Run `nix-env` & `nix-shell` with `--show-trace`
-
-Evaluation is broken often enough that this seems wise.
-Debugging such errors without a backtrace is most unpleasant.
-
-diff -Naur nix-nox-0.0.1/nox/nixpkgs_repo.py nix-nox-0.0.1b/nox/nixpkgs_repo.py
---- nox/nox/nixpkgs_repo.py	2014-10-26 21:50:33.000000000 +0100
-+++ nox/nox/nixpkgs_repo.py	2015-07-03 04:46:08.114975479 +0200
-@@ -75,7 +75,7 @@
- 
- def packages(path):
-     """List all nix packages in the repo, as a set"""
--    output = subprocess.check_output(['nix-env', '-f', path, '-qaP', '--drv-path'],
-+    output = subprocess.check_output(['nix-env', '-f', path, '-qaP', '--drv-path', '--show-trace'],
-                                      universal_newlines=True)
-     return set(output.split('\n'))
- 
-diff -Naur nix-nox-0.0.1/nox/search.py nix-nox-0.0.1b/nox/search.py
---- nox/nox/search.py	2014-09-20 14:55:33.000000000 +0200
-+++ nox/nox/search.py	2015-07-03 04:46:54.264813143 +0200
-@@ -10,7 +10,7 @@
- 
- def nix_packages_json():
-     click.echo('Refreshing cache')
--    output = subprocess.check_output(['nix-env', '-qa', '--json'],
-+    output = subprocess.check_output(['nix-env', '-qa', '--json', '--show-trace'],
-                                      universal_newlines=True)
-     return json.loads(output)
- 
-@@ -70,7 +70,7 @@
-                                         value_proc=parse_input)
-         attributes = [p.attribute for p in packages]
-         if action == 'install':
--            subprocess.check_call(['nix-env', '-iA'] + attributes)
-+            subprocess.check_call(['nix-env', '-iA', '--show-trace'] + attributes)
-         elif action == 'shell':
-             attributes = [a[len('nixpkgs.'):] for a in attributes]
--            subprocess.check_call(['nix-shell', '-p'] + attributes)
-+            subprocess.check_call(['nix-shell', '-p', '--show-trace'] + attributes)
diff --git a/pkgs/tools/security/chaps/default.nix b/pkgs/tools/security/chaps/default.nix
index 9a2ae0b5114b..1d3f530dd9fc 100644
--- a/pkgs/tools/security/chaps/default.nix
+++ b/pkgs/tools/security/chaps/default.nix
@@ -75,7 +75,7 @@ stdenv.mkDerivation rec {
     description = "PKCS #11 implementation based on trusted platform module (TPM)";
     homepage = "https://www.chromium.org/developers/design-documents/chaps-technical-design";
     maintainers = [ maintainers.tstrobel ];
-    platforms = platforms.linux;
+    platforms = [ "x86_64-linux" ];
     license = licenses.bsd3;
   };
 }
diff --git a/pkgs/tools/security/knockknock/default.nix b/pkgs/tools/security/knockknock/default.nix
new file mode 100644
index 000000000000..2341d2110bfd
--- /dev/null
+++ b/pkgs/tools/security/knockknock/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, buildPythonPackage, python, pycrypto, hping }:
+
+buildPythonPackage rec {
+  rev  = "bf14bbff";
+  name = "knockknock-r${rev}";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner  = "moxie0";
+    repo   = "knockknock";
+    sha256 = "1chpfs3w2vkjrgay69pbdr116z1jldv53fi768a1i05fdqhy1px4";
+  };
+
+  propagatedBuildInputs = [ pycrypto ];
+
+  patchPhase = ''
+    substituteInPlace setup.py --replace "/etc" "$out/etc"
+    substituteInPlace knockknock.py --replace 'existsInPath("hping3")' '"${hping}/bin/hping3"'
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Simple, secure port knocking daemon and client written in Python";
+    homepage    = "http://www.thoughtcrime.org/software/knockknock/";
+    license     = licenses.gpl3;
+    maintainers = with maintainers; [ copumpkin ];
+    platforms   = with platforms; linux;
+  };
+}
+
diff --git a/pkgs/tools/security/ssdeep/default.nix b/pkgs/tools/security/ssdeep/default.nix
index 7ec4934805b4..a17fc36b013c 100644
--- a/pkgs/tools/security/ssdeep/default.nix
+++ b/pkgs/tools/security/ssdeep/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name    = "ssdeep-${version}";
-  version = "2.12";
+  version = "2.13";
 
   src = fetchurl {
     url    = "mirror://sourceforge/ssdeep/${name}.tar.gz";
-    sha256 = "1pjb3qpcn6slfqjv23jf7i8zf7950b7h27b0v0dva5pxmn3rw149";
+    sha256 = "1igqy0j7jrklb8fdlrm6ald4cyl1fda5ipfl8crzyl6bax2ajk3f";
   };
 
   # For some reason (probably a build system bug), the binary isn't
diff --git a/pkgs/tools/security/tor/torsocks.nix b/pkgs/tools/security/tor/torsocks.nix
index d4a725fa04ad..d7b0139df701 100644
--- a/pkgs/tools/security/tor/torsocks.nix
+++ b/pkgs/tools/security/tor/torsocks.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   name = "torsocks-${version}";
-  version = "2.0.0";
+  version = "2.1.0";
 
   src = fetchgit {
     url    = meta.repositories.git;
     rev    = "refs/tags/v${version}";
-    sha256 = "e3868ae8baadce1854cc9e604a5fcfa0433a15e4eb1223cc9da5b3c586db0048";
+    sha256 = "1q7rbf0j54jh17qs76b6k9hzv4sh4044qfzidjrp6gx576ysrvsf";
   };
 
   buildInputs = [ autoreconfHook ];
diff --git a/pkgs/tools/system/memtester/default.nix b/pkgs/tools/system/memtester/default.nix
new file mode 100644
index 000000000000..2663f3b852a6
--- /dev/null
+++ b/pkgs/tools/system/memtester/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "memtester-${version}";
+  version = "4.3.0";
+
+  src = fetchurl {
+    url = "http://pyropus.ca/software/memtester/old-versions/memtester-${version}.tar.gz";
+    sha256 = "127xymmyzb9r6dxqrwd69v7gf8csv8kv7fjvagbglf3wfgyy5pzr";
+  };
+
+  installFlags = [ "INSTALLPATH=$(out)" ];
+
+  meta = with stdenv.lib; {
+    description = "A userspace utility for testing the memory subsystem for faults";
+    homepage = http://pyropus.ca/software/memtester/;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.dezgeg ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/tools/text/unrtf/default.nix b/pkgs/tools/text/unrtf/default.nix
new file mode 100644
index 000000000000..6b177b8b37be
--- /dev/null
+++ b/pkgs/tools/text/unrtf/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, autoconf, automake }:
+
+stdenv.mkDerivation rec {
+  name = "unrtf-${version}";
+  version = "0.21.9";
+
+  src = fetchurl {
+    url = "https://www.gnu.org/software/unrtf/${name}.tar.gz";
+    sha256 = "1pcdzf2h1prn393dkvg93v80vh38q0v817xnbwrlwxbdz4k7i8r2";
+  };
+
+  buildInputs = [ autoconf automake ];
+
+  preConfigure = "./bootstrap";
+
+  meta = with stdenv.lib; {
+    description = "A converter from Rich Text Format to other formats";
+    longDescription = ''
+      UnRTF converts documents in Rich Text Format to other
+      formats, including HTML, LaTeX, and RTF itself.
+    '';
+    homepage = https://www.gnu.org/software/unrtf/;
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ joachifm ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/tools/text/untex/default.nix b/pkgs/tools/text/untex/default.nix
new file mode 100644
index 000000000000..e2f6142a2a0f
--- /dev/null
+++ b/pkgs/tools/text/untex/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "untex-${version}";
+  version = "1.2";
+
+  src = fetchurl {
+    url = "https://www.ctan.org/tex-archive/support/untex/${name}.tar.gz";
+    sha256 = "07p836jydd5yjy905m5ylnnac1h4cc4jsr41panqb808mlsiwmmy";
+  };
+
+  unpackPhase = "tar xf $src";
+  installTargets = "install install.man";
+  installFlags = "BINDIR=$(out)/bin MANDIR=$(out)/share/man/man1";
+  preBuild = ''
+    sed -i '1i#include <stdlib.h>\n#include <string.h>' untex.c
+    mkdir -p $out/bin $out/share/man/man1
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A utility which removes LaTeX commands from input";
+    homepage = https://www.ctan.org/pkg/untex;
+    license = licenses.gpl1;
+    maintainers = with maintainers; [ joachifm ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix
index fe8809e8263f..3acfffafde22 100644
--- a/pkgs/tools/typesetting/tex/texlive/default.nix
+++ b/pkgs/tools/typesetting/tex/texlive/default.nix
@@ -1,7 +1,7 @@
 args : with args;
 
 rec {
-  src = assert config.allowTexliveBuilds or false; fetchurl {
+  src = assert config.allowTexliveBuilds or true; fetchurl {
     url = mirror://debian/pool/main/t/texlive-bin/texlive-bin_2014.20140926.35254.orig.tar.xz;
     sha256 = "1c39x059jhn5jsy6i9j3akjbkm1kmmzssy1jyi1aw20rl2vp86w3";
   };
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c549c5145be7..e231815b41ce 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1966,6 +1966,8 @@ let
 
   kismet = callPackage ../applications/networking/sniffers/kismet { };
 
+  knockknock = callPackage ../tools/security/knockknock { };
+
   kpcli = callPackage ../tools/security/kpcli { };
 
   kst = callPackage ../tools/graphics/kst { };
@@ -1996,6 +1998,8 @@ let
 
   makebootfat = callPackage ../tools/misc/makebootfat { };
 
+  memtester = callPackage ../tools/system/memtester { };
+
   minidlna = callPackage ../tools/networking/minidlna { };
 
   mmv = callPackage ../tools/misc/mmv { };
@@ -3128,9 +3132,7 @@ let
 
   torbutton = callPackage ../tools/security/torbutton { };
 
-  torbrowser = callPackage ../tools/security/tor/torbrowser.nix {
-    stdenv = overrideCC stdenv gcc49;
-  };
+  torbrowser = callPackage ../tools/security/tor/torbrowser.nix { };
 
   touchegg = callPackage ../tools/inputmethods/touchegg { };
 
@@ -3192,6 +3194,10 @@ let
 
   unoconv = callPackage ../tools/text/unoconv { };
 
+  unrtf = callPackage ../tools/text/unrtf { };
+
+  untex = callPackage ../tools/text/untex { };
+
   upx = callPackage ../tools/compression/upx { };
 
   uriparser = callPackage ../development/libraries/uriparser {};
@@ -3683,8 +3689,12 @@ let
 
   gcc_multi =
     if system == "x86_64-linux" then lowPrio (
-      wrapCCWith (import ../build-support/cc-wrapper) glibc_multi (gcc.cc.override {
-        stdenv = overrideCC stdenv (wrapCCWith (import ../build-support/cc-wrapper) glibc_multi gcc.cc);
+      let
+        extraBuildCommands = ''
+          echo "dontMoveLib64=1" >> $out/nix-support/setup-hook
+        '';
+      in wrapCCWith (import ../build-support/cc-wrapper) glibc_multi extraBuildCommands (gcc.cc.override {
+        stdenv = overrideCC stdenv (wrapCCWith (import ../build-support/cc-wrapper) glibc_multi "" gcc.cc);
         profiledCompiler = false;
         enableMultilib = true;
       }))
@@ -3962,7 +3972,7 @@ let
 
   dotnetPackages = recurseIntoAttrs (callPackage ./dotnet-packages.nix { inherit stdenv fetchNuGet; });
 
-  go_1_0 = callPackage ../development/compilers/go { };
+  go_1_0 = callPackage ../development/compilers/go/1.0.nix { };
 
   go_1_1 =
     if stdenv.isDarwin then
@@ -4737,7 +4747,7 @@ let
 
   win32hello = callPackage ../development/compilers/visual-c++/test { };
 
-  wrapCCWith = ccWrapper: libc: baseCC: ccWrapper {
+  wrapCCWith = ccWrapper: libc: extraBuildCommands: baseCC: ccWrapper {
     nativeTools = stdenv.cc.nativeTools or false;
     nativeLibc = stdenv.cc.nativeLibc or false;
     nativePrefix = stdenv.cc.nativePrefix or "";
@@ -4746,10 +4756,10 @@ let
     dyld = if stdenv.isDarwin then darwin.dyld else null;
     isGNU = baseCC.isGNU or false;
     isClang = baseCC.isClang or false;
-    inherit stdenv binutils coreutils zlib;
+    inherit stdenv binutils coreutils zlib extraBuildCommands;
   };
 
-  wrapCC = wrapCCWith (makeOverridable (import ../build-support/cc-wrapper)) stdenv.cc.libc;
+  wrapCC = wrapCCWith (makeOverridable (import ../build-support/cc-wrapper)) stdenv.cc.libc "";
   # legacy version, used for gnat bootstrapping
   wrapGCC-old = baseGCC: (makeOverridable (import ../build-support/gcc-wrapper-old)) {
     nativeTools = stdenv.cc.nativeTools or false;
@@ -7641,6 +7651,7 @@ let
 
   opencascade = callPackage ../development/libraries/opencascade {
     tcl = tcl-8_5;
+    tk = tk-8_5;
   };
 
   opencascade_6_5 = callPackage ../development/libraries/opencascade/6.5.nix {
@@ -7888,7 +7899,8 @@ let
   };
 
   qtcreator = callPackage ../development/qtcreator {
-    qtLib = qt48.override { developerBuild = true; };
+    qtLib = qt5Full; # 3.4 only supports qt5; TODO: use modularized qt>=5.4
+    withDocumentation = false; # FIXME: fails to setup some paths
   };
 
   qtkeychain = callPackage ../development/libraries/qtkeychain { };
@@ -9001,6 +9013,7 @@ let
   };
 
   riak = callPackage ../servers/nosql/riak/1.3.1.nix { };
+  riak2 = callPackage ../servers/nosql/riak/2.1.1.nix { };
 
   influxdb = callPackage ../servers/nosql/influxdb { };
 
@@ -9592,20 +9605,6 @@ let
 
   kernelPatches = callPackage ../os-specific/linux/kernel/patches.nix { };
 
-  linux_3_2 = makeOverridable (import ../os-specific/linux/kernel/linux-3.2.nix) {
-    inherit fetchurl stdenv perl buildLinux;
-    kernelPatches = [ kernelPatches.bridge_stp_helper ];
-  };
-
-  linux_3_4 = makeOverridable (import ../os-specific/linux/kernel/linux-3.4.nix) {
-    inherit fetchurl stdenv perl buildLinux;
-    kernelPatches = [ kernelPatches.bridge_stp_helper ]
-     ++ lib.optionals ((platform.kernelArch or null) == "mips")
-      [ kernelPatches.mips_fpureg_emu
-        kernelPatches.mips_fpu_sigill
-      ];
-  };
-
   linux_rpi = makeOverridable (import ../os-specific/linux/kernel/linux-rpi.nix) {
     inherit fetchurl stdenv perl buildLinux;
     kernelPatches = [ kernelPatches.bridge_stp_helper ];
@@ -9651,16 +9650,6 @@ let
       ];
   };
 
-  linux_3_19 = makeOverridable (import ../os-specific/linux/kernel/linux-3.19.nix) {
-    inherit fetchurl stdenv perl buildLinux;
-    kernelPatches = [ kernelPatches.bridge_stp_helper ]
-      ++ lib.optionals ((platform.kernelArch or null) == "mips")
-      [ kernelPatches.mips_fpureg_emu
-        kernelPatches.mips_fpu_sigill
-        kernelPatches.mips_ext3_n32
-      ];
-  };
-
   linux_4_0 = makeOverridable (import ../os-specific/linux/kernel/linux-4.0.nix) {
     inherit fetchurl stdenv perl buildLinux;
     kernelPatches = [ kernelPatches.bridge_stp_helper ]
@@ -9758,8 +9747,6 @@ let
 
     fusionio-vsl = callPackage ../os-specific/linux/fusionio/vsl.nix { };
 
-    ktap = callPackage ../os-specific/linux/ktap { };
-
     lttng-modules = callPackage ../os-specific/linux/lttng-modules { };
 
     broadcom_sta = callPackage ../os-specific/linux/broadcom-sta/default.nix { };
@@ -9852,15 +9839,12 @@ let
   linux_latest = linuxPackages_latest.kernel;
 
   # Build the kernel modules for the some of the kernels.
-  linuxPackages_3_2 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_2 linuxPackages_3_2);
-  linuxPackages_3_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_4 linuxPackages_3_4);
   linuxPackages_rpi = linuxPackagesFor pkgs.linux_rpi linuxPackages_rpi;
   linuxPackages_3_10 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_10 linuxPackages_3_10);
   linuxPackages_3_10_tuxonice = linuxPackagesFor pkgs.linux_3_10_tuxonice linuxPackages_3_10_tuxonice;
   linuxPackages_3_12 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_12 linuxPackages_3_12);
   linuxPackages_3_14 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_14 linuxPackages_3_14);
   linuxPackages_3_18 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_18 linuxPackages_3_18);
-  linuxPackages_3_19 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_19 linuxPackages_3_19);
   linuxPackages_4_0 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_0 linuxPackages_4_0);
   linuxPackages_4_1 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_1 linuxPackages_4_1);
   linuxPackages_testing = recurseIntoAttrs (linuxPackagesFor pkgs.linux_testing linuxPackages_testing);
@@ -10193,7 +10177,6 @@ let
     cross = assert crossSystem != null; crossSystem;
   });
 
-  udev145 = callPackage ../os-specific/linux/udev/145.nix { };
   udev = pkgs.systemd;
   eudev = callPackage ../os-specific/linux/eudev {};
 
@@ -10843,7 +10826,6 @@ let
   clipit = callPackage ../applications/misc/clipit { };
 
   bomi = callPackage ../applications/video/bomi {
-    stdenv = overrideCC stdenv gcc49;
     pulseSupport = config.pulseaudio or true;
   };
 
@@ -11802,6 +11784,8 @@ let
 
   koji = callPackage ../tools/package-management/koji { };
 
+  ksuperkey = callPackage ../tools/X11/ksuperkey { };
+
   kubernetes = callPackage ../applications/networking/cluster/kubernetes { };
 
   lame = callPackage ../development/libraries/lame { };
@@ -12027,8 +12011,7 @@ let
 
   mopidy-mopify = callPackage ../applications/audio/mopidy-mopify { };
 
-  mozplugger = builderDefsPackage (import ../applications/networking/browsers/mozilla-plugins/mozplugger) {
-    inherit firefox;
+  mozplugger = callPackage ../applications/networking/browsers/mozilla-plugins/mozplugger {
     inherit (xlibs) libX11 xproto;
   };
 
@@ -12354,7 +12337,10 @@ let
 
   qiv = callPackage ../applications/graphics/qiv { };
 
-  processing = callPackage ../applications/graphics/processing { inherit (xorg) libXxf86vm; };
+  processing = callPackage ../applications/graphics/processing {
+    inherit (xorg) libXxf86vm;
+    jdk = jdk7;
+  };
 
   # perhaps there are better apps for this task? It's how I had configured my preivous system.
   # And I don't want to rewrite all rules
@@ -13400,8 +13386,7 @@ let
   zathuraCollection = recurseIntoAttrs
     (let callPackage = newScope pkgs.zathuraCollection; in
       import ../applications/misc/zathura {
-        inherit callPackage pkgs fetchurl lib;
-        stdenv = overrideCC stdenv gcc49;
+        inherit stdenv callPackage pkgs fetchurl lib;
         useMupdf = config.zathura.useMupdf or false;
       });
 
@@ -13415,7 +13400,6 @@ let
 
   girara = callPackage ../applications/misc/girara {
     gtk = gtk3;
-    stdenv = overrideCC stdenv gcc49;
   };
 
   girara-light = callPackage ../applications/misc/girara {
diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix
index bab63e87b30c..b20443674c05 100644
--- a/pkgs/top-level/go-packages.nix
+++ b/pkgs/top-level/go-packages.nix
@@ -136,6 +136,7 @@ let
     rev = "7d75e8b219c3efda2d08ae38acd6b42f8da4f5f9";
     name = "tools-${stdenv.lib.strings.substring 0 7 rev}";
     goPackagePath = "golang.org/x/tools";
+    goPackageAliases = [ "code.google.com/p/go.tools" ];
 
     preConfigure = ''
       # Make the builtin tools available here
@@ -1148,6 +1149,8 @@ let
     rev = "4734e7aca379f0d7fcdf04fbb2101696a4b45ce8";
     name = "go-etcd-${stdenv.lib.strings.substring 0 7 rev}";
     goPackagePath = "github.com/coreos/go-etcd";
+    disabled = isGo13;
+
     src = fetchFromGitHub {
       inherit rev;
       owner = "coreos";
@@ -1420,6 +1423,7 @@ let
     rev = "2688e91251d9d8e404e86dd8f096e23b2f086958";
     name = "go-systemd-${stdenv.lib.strings.substring 0 7 rev}";
     goPackagePath = "github.com/coreos/go-systemd";
+    disabled = isGo13;
 
     excludedPackages = "examples";
 
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 6848be462b96..e1e5e983b3da 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -4033,6 +4033,10 @@ let self = _self // overrides; _self = with self; {
       sha256 = "0l7vxag0v3hf7w1kjyjv02zqrjzhg6xczcv60z00l3z0fr78xi16";
     };
     propagatedBuildInputs = [ IOString ];
+    meta = {
+      description = "TTF font support for Perl";
+      license = stdenv.lib.licenses.artistic2;
+    };
   };
 
   ForksSuper = buildPerlPackage {
@@ -5660,6 +5664,9 @@ let self = _self // overrides; _self = with self; {
       sha256 = "1xmf26dfwr8achprc3n1pxgl0mkiyr6pf25wq3dqgzqkghrrsxa2";
     };
     propagatedBuildInputs = [ ];
+
+    installTargets = "install";
+
     meta = with stdenv.lib; {
       homepage    = http://dcssrv1.oit.uci.edu/indiv/ehood/mhonarch.html;
       description = "A mail-to-HTML converter";
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 08c0cfee510e..29e2919a380e 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -3120,11 +3120,11 @@ let
 
 
   elasticsearch = buildPythonPackage (rec {
-    name = "elasticsearch-1.4.0";
+    name = "elasticsearch-1.6.0";
 
     src = pkgs.fetchurl {
       url = "https://pypi.python.org/packages/source/e/elasticsearch/${name}.tar.gz";
-      md5 = "14a758debd2296d923cb6c958db98eba";
+      sha256 = "1b0b5d1qp77r83r130kb2ikhd6am0d1389rdcllr1xsajrp5kj4h";
     };
 
     # Check is disabled because running them destroy the content of the local cluster!
@@ -3133,32 +3133,29 @@ let
 
     meta = {
       description = "Official low-level client for Elasticsearch";
-
       homepage = https://github.com/elasticsearch/elasticsearch-py;
-
       license = licenses.asl20;
     };
   });
 
 
   elasticsearchdsl = buildPythonPackage (rec {
-    name = "elasticsearch-dsl-0.0.3";
+    name = "elasticsearch-dsl-0.0.4";
 
     src = pkgs.fetchurl {
       url = "https://pypi.python.org/packages/source/e/elasticsearch-dsl/${name}.tar.gz";
-      md5 = "6cbc9ed7aefb3ef804be4e3b318b2570";
+      sha256 = "0bz8p10qk7rz10glq9dm2nq9m1x6czzlqk518107x39gx18lm1a2";
     };
 
-    buildInputs = with self; [ covCore dateutil elasticsearch mock pytest pytestcov unittest2 urllib3 ];
+    buildInputs = with self; [ covCore dateutil elasticsearch mock pytest pytestcov unittest2 urllib3 pytz ];
 
     # ImportError: No module named test_elasticsearch_dsl
+    # Tests require a local instance of elasticsearch
     doCheck = false;
 
     meta = {
       description = "Python client for Elasticsearch";
-
       homepage = https://github.com/elasticsearch/elasticsearch-dsl-py;
-
       license = licenses.asl20;
     };
   });
@@ -7351,16 +7348,18 @@ let
 
 
   mechanize = buildPythonPackage (rec {
-    name = "mechanize-0.1.11";
+    name = "mechanize-0.2.5";
     disabled = isPy3k;
 
     src = pkgs.fetchurl {
-      url = "http://wwwsearch.sourceforge.net/mechanize/src/${name}.tar.gz";
-      sha256 = "1h62mwy4iz09jqz17nrb9j8y0djd500zdfqwrz9xmdwqzqwixkj2";
+      url = "https://pypi.python.org/packages/source/m/mechanize/${name}.tar.gz";
+      sha256 = "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf";
     };
 
     propagatedBuildInputs = with self; [ clientform ];
 
+    doCheck = false;
+
     meta = {
       description = "Stateful programmatic web browsing in Python";
 
@@ -7505,11 +7504,23 @@ let
 
     doCheck = false;
 
+    patches = [
+      ../development/python-modules/rainbowstream/image.patch
+    ];
+
+    postPatch = ''
+      clib=$out/${python.sitePackages}/rainbowstream/image.so
+      substituteInPlace rainbowstream/c_image.py \
+        --replace @CLIB@ $clib
+    '';
+
     preBuild = ''
       export LC_ALL="en_US.UTF-8"
     '';
 
     postInstall = ''
+      mkdir -p $out/lib
+      cc -fPIC -shared -o $clib rainbowstream/image.c
       for prog in "$out/bin/"*; do
         wrapProgram "$prog" \
           --prefix PYTHONPATH : "$PYTHONPATH"
@@ -11120,11 +11131,11 @@ let
 
 
   pyutil = buildPythonPackage (rec {
-    name = "pyutil-1.7.9";
+    name = "pyutil-2.0.0";
 
     src = pkgs.fetchurl {
       url = "http://pypi.python.org/packages/source/p/pyutil/${name}.tar.gz";
-      sha256 = "c303bb779f96073820e2eb7c9692fe15a57df491eb356839f3cb3377ed03b844";
+      sha256 = "1fsg9yz5mi2sb0h6c1vvcqchx56i89nbvdb5gfgv1ia3b2w5ra8c";
     };
 
     buildInputs = with self; [ setuptoolsDarcs setuptoolsTrial ] ++ (if doCheck then [ simplejson ] else []);
@@ -12805,13 +12816,13 @@ let
   };
 
   sqlalchemy9 = buildPythonPackage rec {
-    name = "SQLAlchemy-0.9.8";
+    name = "SQLAlchemy-0.9.9";
 
     disabled = isPyPy;
 
     src = pkgs.fetchurl {
       url = "https://pypi.python.org/packages/source/S/SQLAlchemy/${name}.tar.gz";
-      md5 = "470ca4da4a0081efc830f0d90dd91682";
+      sha256 = "14az6hhrz4bgnicz4q373z119zmaf7j5zxl1jfbfl5lix5m1z9bj";
     };
 
     buildInputs = with self; [ nose mock ]
@@ -12832,6 +12843,14 @@ let
     };
   };
 
+  sqlalchemy_1_0 = self.sqlalchemy9.override rec {
+    name = "SQLAlchemy-1.0.6";
+
+    src = pkgs.fetchurl {
+      url = "https://pypi.python.org/packages/source/S/SQLAlchemy/${name}.tar.gz";
+      sha256 = "1wv5kjf142m8g1dnbvgpbqxb8v8rm9lzgsafql2gg229xi5sba4r";
+    };
+  };
 
   sqlalchemy_imageattach = buildPythonPackage rec {
     name = "SQLAlchemy-ImageAttach-${version}";
diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix
index cef3d2dffbdb..ced90c0489ca 100644
--- a/pkgs/top-level/release-cross.nix
+++ b/pkgs/top-level/release-cross.nix
@@ -16,7 +16,6 @@ let
       #xorgserver.crossDrv = nativePlatforms;
     };
     nixUnstable.crossDrv = nativePlatforms;
-    linuxPackages_3_4.kernel.crossDrv = linux;
   };
 
   /* Basic list of packages to be natively built,