summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/rename.nix3
-rw-r--r--nixos/modules/security/pam.nix4
-rw-r--r--nixos/modules/services/misc/bepasty.nix2
-rw-r--r--nixos/modules/services/security/tor.nix434
-rw-r--r--pkgs/applications/editors/vscode-with-extensions/default.nix8
-rw-r--r--pkgs/applications/misc/buku/default.nix4
-rw-r--r--pkgs/applications/networking/dropbox/default.nix6
-rw-r--r--pkgs/applications/networking/newsreaders/quiterss/default.nix4
-rw-r--r--pkgs/applications/office/fava/default.nix2
-rw-r--r--pkgs/build-support/fetchurl/mirrors.nix10
-rw-r--r--pkgs/development/libraries/ntbtls/default.nix29
-rw-r--r--pkgs/development/python-modules/Cython/default.nix4
-rw-r--r--pkgs/development/python-modules/Flask-PyMongo/default.nix35
-rw-r--r--pkgs/development/python-modules/aafigure/default.nix4
-rw-r--r--pkgs/development/python-modules/adal/default.nix4
-rw-r--r--pkgs/development/python-modules/aiodns/default.nix4
-rw-r--r--pkgs/development/python-modules/alembic/default.nix4
-rw-r--r--pkgs/development/python-modules/argcomplete/default.nix4
-rw-r--r--pkgs/development/python-modules/asgi_ipc/default.nix4
-rw-r--r--pkgs/development/python-modules/astropy/default.nix4
-rw-r--r--pkgs/development/python-modules/async_timeout/default.nix4
-rw-r--r--pkgs/development/python-modules/audioread/default.nix4
-rw-r--r--pkgs/development/python-modules/autobahn/default.nix4
-rw-r--r--pkgs/development/python-modules/bottleneck/default.nix4
-rw-r--r--pkgs/development/python-modules/breathe/default.nix4
-rw-r--r--pkgs/development/python-modules/certifi/default.nix4
-rw-r--r--pkgs/development/python-modules/chai/default.nix4
-rw-r--r--pkgs/development/python-modules/confluent-kafka/default.nix4
-rw-r--r--pkgs/development/python-modules/coveralls/default.nix4
-rw-r--r--pkgs/development/python-modules/discordpy/default.nix4
-rw-r--r--pkgs/development/python-modules/django-polymorphic/default.nix4
-rw-r--r--pkgs/development/python-modules/django_compressor/default.nix4
-rw-r--r--pkgs/development/python-modules/djangorestframework/default.nix4
-rw-r--r--pkgs/development/python-modules/docker.nix4
-rw-r--r--pkgs/development/python-modules/dulwich.nix4
-rw-r--r--pkgs/development/python-modules/emcee/default.nix4
-rw-r--r--pkgs/development/python-modules/flake8/default.nix4
-rw-r--r--pkgs/development/python-modules/flask-migrate/default.nix4
-rw-r--r--pkgs/development/python-modules/flask-testing.nix12
-rw-r--r--pkgs/development/python-modules/fonttools/default.nix4
-rw-r--r--pkgs/development/python-modules/ftfy/default.nix4
-rw-r--r--pkgs/development/python-modules/gensim/default.nix4
-rw-r--r--pkgs/development/python-modules/html5-parser/default.nix4
-rw-r--r--pkgs/development/python-modules/ipywidgets/default.nix4
-rw-r--r--pkgs/development/python-modules/jsonpatch/default.nix26
-rw-r--r--pkgs/development/python-modules/keras/default.nix4
-rw-r--r--pkgs/development/python-modules/keystoneauth1/default.nix4
-rw-r--r--pkgs/development/python-modules/kitchen/default.nix4
-rw-r--r--pkgs/development/python-modules/ledgerblue/default.nix4
-rw-r--r--pkgs/development/python-modules/libtmux/default.nix4
-rw-r--r--pkgs/development/python-modules/llvmlite/default.nix4
-rw-r--r--pkgs/development/python-modules/m2r/default.nix4
-rw-r--r--pkgs/development/python-modules/magic-wormhole/default.nix4
-rw-r--r--pkgs/development/python-modules/marionette-harness/default.nix4
-rw-r--r--pkgs/development/python-modules/multidict/default.nix4
-rw-r--r--pkgs/development/python-modules/natsort/default.nix4
-rw-r--r--pkgs/development/python-modules/nbformat/default.nix4
-rw-r--r--pkgs/development/python-modules/numba/default.nix4
-rw-r--r--pkgs/development/python-modules/odfpy/default.nix29
-rw-r--r--pkgs/development/python-modules/oslo-config/default.nix4
-rw-r--r--pkgs/development/python-modules/pbr/default.nix4
-rw-r--r--pkgs/development/python-modules/phonenumbers/default.nix4
-rw-r--r--pkgs/development/python-modules/plotly/default.nix4
-rw-r--r--pkgs/development/python-modules/py/default.nix20
-rw-r--r--pkgs/development/python-modules/pycuda/default.nix4
-rw-r--r--pkgs/development/python-modules/pygraphviz/default.nix4
-rw-r--r--pkgs/development/python-modules/pylast/default.nix4
-rw-r--r--pkgs/development/python-modules/pyopencl/default.nix4
-rw-r--r--pkgs/development/python-modules/pypandoc/default.nix4
-rw-r--r--pkgs/development/python-modules/pyroute2/default.nix4
-rw-r--r--pkgs/development/python-modules/pyrtlsdr/default.nix31
-rw-r--r--pkgs/development/python-modules/pyscard/default.nix4
-rw-r--r--pkgs/development/python-modules/pytest-asyncio/default.nix4
-rw-r--r--pkgs/development/python-modules/pytest-django/default.nix2
-rw-r--r--pkgs/development/python-modules/pytest-forked/default.nix33
-rw-r--r--pkgs/development/python-modules/pytest-xdist/default.nix8
-rw-r--r--pkgs/development/python-modules/pytest/3_0.nix27
-rw-r--r--pkgs/development/python-modules/pytest/default.nix14
-rw-r--r--pkgs/development/python-modules/python-editor/default.nix8
-rw-r--r--pkgs/development/python-modules/qtconsole/default.nix4
-rw-r--r--pkgs/development/python-modules/relatorio/default.nix7
-rw-r--r--pkgs/development/python-modules/requests-oauthlib.nix6
-rw-r--r--pkgs/development/python-modules/rfc3986/default.nix4
-rw-r--r--pkgs/development/python-modules/semver/default.nix7
-rw-r--r--pkgs/development/python-modules/setuptools/default.nix4
-rw-r--r--pkgs/development/python-modules/setuptools_scm/default.nix24
-rw-r--r--pkgs/development/python-modules/simplejson/default.nix4
-rw-r--r--pkgs/development/python-modules/sphinx/default.nix13
-rw-r--r--pkgs/development/python-modules/sphinxcontrib-websupport/default.nix26
-rw-r--r--pkgs/development/python-modules/sqlalchemy/default.nix18
-rw-r--r--pkgs/development/python-modules/sqlmap/default.nix25
-rw-r--r--pkgs/development/python-modules/stevedore/default.nix4
-rw-r--r--pkgs/development/python-modules/stripe/default.nix4
-rw-r--r--pkgs/development/python-modules/tqdm/default.nix4
-rw-r--r--pkgs/development/python-modules/treq/default.nix4
-rw-r--r--pkgs/development/python-modules/twisted/default.nix8
-rw-r--r--pkgs/development/python-modules/txaio/default.nix4
-rw-r--r--pkgs/development/python-modules/vega/default.nix4
-rw-r--r--pkgs/development/python-modules/virtualenv/default.nix4
-rw-r--r--pkgs/development/python-modules/websockets/default.nix4
-rw-r--r--pkgs/development/python-modules/widgetsnbextension/default.nix4
-rw-r--r--pkgs/development/python-modules/xlwt/default.nix4
-rw-r--r--pkgs/development/python-modules/yamllint/default.nix4
-rw-r--r--pkgs/development/python-modules/yapf/default.nix4
-rw-r--r--pkgs/development/python-modules/yarl/default.nix4
-rw-r--r--pkgs/development/python-modules/zeep/default.nix4
-rw-r--r--pkgs/development/tools/mypy/default.nix4
-rw-r--r--pkgs/misc/vscode-extensions/default.nix17
-rw-r--r--pkgs/misc/vscode-extensions/vscode-utils.nix39
-rw-r--r--pkgs/servers/dgraph/default.nix48
-rw-r--r--pkgs/servers/dgraph/deps.nix326
-rw-r--r--pkgs/tools/inputmethods/zinnia/default.nix6
-rw-r--r--pkgs/tools/misc/bepasty/default.nix34
-rw-r--r--pkgs/tools/networking/mitmproxy/default.nix20
-rw-r--r--pkgs/tools/security/metasploit/Gemfile2
-rw-r--r--pkgs/tools/security/metasploit/Gemfile.lock106
-rw-r--r--pkgs/tools/security/metasploit/default.nix8
-rw-r--r--pkgs/tools/security/metasploit/gemset.nix196
-rw-r--r--pkgs/top-level/all-packages.nix10
-rw-r--r--pkgs/top-level/perl-packages.nix30
-rw-r--r--pkgs/top-level/python-packages.nix232
121 files changed, 1589 insertions, 670 deletions
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 08146d1f5687..2079ed544aee 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -25,6 +25,7 @@ with lib;
     (mkRenamedOptionModule [ "services" "sslh" "host" ] [ "services" "sslh" "listenAddress" ])
     (mkRenamedOptionModule [ "services" "statsd" "host" ] [ "services" "statsd" "listenAddress" ])
     (mkRenamedOptionModule [ "services" "subsonic" "host" ] [ "services" "subsonic" "listenAddress" ])
+    (mkRenamedOptionModule [ "services" "tor" "relay" "portSpec" ] [ "services" "tor" "relay" "port" ])
     (mkRenamedOptionModule [ "jobs" ] [ "systemd" "services" ])
 
     (mkRenamedOptionModule [ "services" "gitlab" "stateDir" ] [ "services" "gitlab" "statePath" ])
@@ -195,6 +196,8 @@ with lib;
     (mkRemovedOptionModule [ "services" "openvpn" "enable" ] "")
     (mkRemovedOptionModule [ "services" "printing" "cupsFilesConf" ] "")
     (mkRemovedOptionModule [ "services" "printing" "cupsdConf" ] "")
+    (mkRemovedOptionModule [ "services" "tor" "relay" "isBridge" ] "Use services.tor.relay.role instead.")
+    (mkRemovedOptionModule [ "services" "tor" "relay" "isExit" ] "Use services.tor.relay.role instead.")
     (mkRemovedOptionModule [ "services" "xserver" "startGnuPGAgent" ]
       "See the 16.09 release notes for more information.")
     (mkRemovedOptionModule [ "services" "phpfpm" "phpIni" ] "")
diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix
index 5632500df2e0..ede4ace5ed03 100644
--- a/nixos/modules/security/pam.nix
+++ b/nixos/modules/security/pam.nix
@@ -281,7 +281,7 @@ let
                 "auth optional ${pkgs.pam_mount}/lib/security/pam_mount.so"}
               ${optionalString cfg.enableKwallet
                 ("auth optional ${pkgs.plasma5.kwallet-pam}/lib/security/pam_kwallet5.so" +
-                 " kwalletd=${pkgs.libsForQt5.kwallet}/bin/kwalletd5")}
+                 " kwalletd=${pkgs.libsForQt5.kwallet.bin}/bin/kwalletd5")}
             '') + ''
           ${optionalString cfg.unixAuth
               "auth sufficient pam_unix.so ${optionalString cfg.allowNullPassword "nullok"} likeauth try_first_pass"}
@@ -350,7 +350,7 @@ let
               "session optional ${pkgs.apparmor-pam}/lib/security/pam_apparmor.so order=user,group,default debug"}
           ${optionalString (cfg.enableKwallet)
               ("session optional ${pkgs.plasma5.kwallet-pam}/lib/security/pam_kwallet5.so" +
-               " kwalletd=${pkgs.libsForQt5.kwallet}/bin/kwalletd5")}
+               " kwalletd=${pkgs.libsForQt5.kwallet.bin}/bin/kwalletd5")}
         '');
     };
 
diff --git a/nixos/modules/services/misc/bepasty.nix b/nixos/modules/services/misc/bepasty.nix
index 4d78cddcb54f..c499e428af35 100644
--- a/nixos/modules/services/misc/bepasty.nix
+++ b/nixos/modules/services/misc/bepasty.nix
@@ -3,7 +3,7 @@
 with lib;
 let
   gunicorn = pkgs.pythonPackages.gunicorn;
-  bepasty = pkgs.pythonPackages.bepasty-server;
+  bepasty = pkgs.bepasty;
   gevent = pkgs.pythonPackages.gevent;
   python = pkgs.pythonPackages.python;
   cfg = config.services.bepasty;
diff --git a/nixos/modules/services/security/tor.nix b/nixos/modules/services/security/tor.nix
index 3f1450ebfbd7..04b065f6ae4b 100644
--- a/nixos/modules/services/security/tor.nix
+++ b/nixos/modules/services/security/tor.nix
@@ -7,7 +7,7 @@ let
   torDirectory = "/var/lib/tor";
 
   opt    = name: value: optionalString (value != null) "${name} ${value}";
-  optint = name: value: optionalString (value != 0)    "${name} ${toString value}";
+  optint = name: value: optionalString (value != null && value != 0)    "${name} ${toString value}";
 
   torRc = ''
     User tor
@@ -17,7 +17,7 @@ let
       GeoIPv6File ${pkgs.tor.geoip}/share/tor/geoip6
     ''}
 
-    ${optint "ControlPort" cfg.controlPort}
+    ${optint "ControlPort" (toString cfg.controlPort)}
   ''
   # Client connection config
   + optionalString cfg.client.enable  ''
@@ -27,7 +27,8 @@ let
   ''
   # Relay config
   + optionalString cfg.relay.enable ''
-    ORPort ${cfg.relay.portSpec}
+    ORPort ${toString cfg.relay.port}
+    ${opt "Address" cfg.relay.address}
     ${opt "Nickname" cfg.relay.nickname}
     ${opt "ContactInfo" cfg.relay.contactInfo}
 
@@ -36,31 +37,32 @@ let
     ${opt "AccountingMax" cfg.relay.accountingMax}
     ${opt "AccountingStart" cfg.relay.accountingStart}
 
-    ${if cfg.relay.isExit then
+    ${if (cfg.relay.role == "exit") then
         opt "ExitPolicy" cfg.relay.exitPolicy
       else
         "ExitPolicy reject *:*"}
 
-    ${optionalString cfg.relay.isBridge ''
+    ${optionalString (elem cfg.relay.role ["bridge" "private-bridge"]) ''
       BridgeRelay 1
       ServerTransportPlugin obfs2,obfs3 exec ${pkgs.pythonPackages.obfsproxy}/bin/obfsproxy managed
+      ExtORPort auto
+      ${optionalString (cfg.relay.role == "private-bridge") ''
+        ExtraInfoStatistics 0
+        PublishServerDescriptor 0
+      ''}
     ''}
   ''
-  + hiddenServices
+  # Hidden services
+  + concatStrings (flip mapAttrsToList cfg.hiddenServices (n: v: ''
+    HiddenServiceDir ${torDirectory}/onion/${v.name}
+    ${flip concatMapStrings v.map (p: ''
+      HiddenServicePort ${toString p.port} ${p.destination}
+    '')}
+  ''))
   + cfg.extraConfig;
 
-  hiddenServices = concatStrings (mapAttrsToList (hiddenServiceDir: hs:
-    let
-      hsports = concatStringsSep "\n" (map mkHiddenServicePort hs.hiddenServicePorts);
-    in
-      "HiddenServiceDir ${hiddenServiceDir}\n${hsports}\n${hs.extraConfig}\n"
-    ) cfg.hiddenServices);
-
-    mkHiddenServicePort = hsport: let
-      trgt = optionalString (hsport.target != null) (" " + hsport.target);
-    in "HiddenServicePort ${toString hsport.virtualPort}${trgt}";
-
   torRcFile = pkgs.writeText "torrc" torRc;
+
 in
 {
   options = {
@@ -96,8 +98,8 @@ in
       };
 
       controlPort = mkOption {
-        type = types.int;
-        default = 0;
+        type = types.nullOr (types.either types.int types.str);
+        default = null;
         example = 9051;
         description = ''
           If set, Tor will accept connections on the specified port
@@ -133,9 +135,10 @@ in
           example = "192.168.0.1:9101";
           description = ''
             Bind to this address to listen for connections from
-            Socks-speaking applications. Same as socksListenAddress
-            but uses weaker circuit isolation to provide performance
-            suitable for a web browser.
+            Socks-speaking applications. Same as
+            <option>socksListenAddress</option> but uses weaker
+            circuit isolation to provide performance suitable for a
+            web browser.
            '';
          };
 
@@ -145,9 +148,9 @@ in
           example = "accept 192.168.0.0/16, reject *";
           description = ''
             Entry policies to allow/deny SOCKS requests based on IP
-            address.  First entry that matches wins. If no SocksPolicy
+            address. First entry that matches wins. If no SocksPolicy
             is set, we accept all (and only) requests from
-            SocksListenAddress.
+            <option>socksListenAddress</option>.
           '';
         };
 
@@ -176,45 +179,147 @@ in
           description = ''
             Whether to enable relaying TOR traffic for others.
 
-            See https://www.torproject.org/docs/tor-doc-relay for details.
-          '';
-        };
-
-        isBridge = mkOption {
-          type = types.bool;
-          default = false;
-          description = ''
-            Bridge relays (or "bridges") are Tor relays that aren't
-            listed in the main directory. Since there is no complete
-            public list of them, even if an ISP is filtering
-            connections to all the known Tor relays, they probably
-            won't be able to block all the bridges.
-
-            A bridge relay can't be an exit relay.
-
-            You need to set relay.enable to true for this option to
-            take effect.
+            See <link xlink:href="https://www.torproject.org/docs/tor-doc-relay" />
+            for details.
 
-            The bridge is set up with an obfuscated transport proxy.
-
-            See https://www.torproject.org/bridges.html.en for more info.
+            Setting this to true requires setting
+            <option>services.tor.relay.role</option>
+            and
+            <option>services.tor.relay.port</option>
+            options.
           '';
         };
 
-        isExit = mkOption {
-          type = types.bool;
-          default = false;
+        role = mkOption {
+          type = types.enum [ "exit" "relay" "bridge" "private-bridge" ];
           description = ''
-            An exit relay allows Tor users to access regular Internet
-            services.
-
-            Unlike running a non-exit relay, running an exit relay may
-            expose you to abuse complaints. See
-            https://www.torproject.org/faq.html.en#ExitPolicies for
-            more info.
-
-            You can specify which services Tor users may access via
-            your exit relay using exitPolicy option.
+            Your role in Tor network. There're several options:
+
+            <variablelist>
+            <varlistentry>
+              <term><literal>exit</literal></term>
+              <listitem>
+                <para>
+                  An exit relay. This allows Tor users to access regular
+                  Internet services through your public IP.
+                </para>
+
+                <important><para>
+                  Running an exit relay may expose you to abuse
+                  complaints. See
+                  <link xlink:href="https://www.torproject.org/faq.html.en#ExitPolicies" />
+                  for more info.
+                </para></important>
+
+                <para>
+                  You can specify which services Tor users may access via
+                  your exit relay using <option>exitPolicy</option> option.
+                </para>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term><literal>relay</literal></term>
+              <listitem>
+                <para>
+                  Regular relay. This allows Tor users to relay onion
+                  traffic to other Tor nodes, but not to public
+                  Internet.
+                </para>
+
+                <important><para>
+                  Note that some misconfigured and/or disrespectful
+                  towards privacy sites will block you even if your
+                  relay is not an exit relay. That is, just being listed
+                  in a public relay directory can have unwanted
+                  consequences.
+
+                  Which means you might not want to use
+                  this role if you browse public Internet from the same
+                  network as your relay, unless you want to write
+                  e-mails to those sites (you should!).
+                </para></important>
+
+                <para>
+                  See
+                  <link xlink:href="https://www.torproject.org/docs/tor-doc-relay.html.en" />
+                  for more info.
+                </para>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term><literal>bridge</literal></term>
+              <listitem>
+                <para>
+                  Regular bridge. Works like a regular relay, but
+                  doesn't list you in the public relay directory and
+                  hides your Tor node behind obfsproxy.
+                </para>
+
+                <para>
+                  Using this option will make Tor advertise your bridge
+                  to users through various mechanisms like
+                  <link xlink:href="https://bridges.torproject.org/" />, though.
+                </para>
+
+                <important>
+                  <para>
+                    WARNING: THE FOLLOWING PARAGRAPH IS NOT LEGAL ADVISE.
+                    Consult with your lawer when in doubt.
+                  </para>
+
+                  <para>
+                    This role should be safe to use in most situations
+                    (unless the act of forwarding traffic for others is
+                    a punishable offence under your local laws, which
+                    would be pretty insane as it would make ISP
+                    illegal).
+                  </para>
+                </important>
+
+                <para>
+                  See <link xlink:href="https://www.torproject.org/docs/bridges.html.en" />
+                  for more info.
+                </para>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term><literal>private-bridge</literal></term>
+              <listitem>
+                <para>
+                  Private bridge. Works like regular bridge, but does
+                  not advertise your node in any way.
+                </para>
+
+                <para>
+                  Using this role means that you won't contribute to Tor
+                  network in any way unless you advertise your node
+                  yourself in some way.
+                </para>
+
+                <para>
+                  Use this if you want to run a private bridge, for
+                  example because you'll give out your bridge address
+                  manually to your friends.
+                </para>
+
+                <para>
+                  Switching to this role after measurable time in
+                  "bridge" role is pretty useless as some Tor users
+                  would have learned about your node already. In the
+                  latter case you can still change
+                  <option>port</option> option.
+                </para>
+
+                <para>
+                  See <link xlink:href="https://www.torproject.org/docs/bridges.html.en" />
+                  for more info.
+                </para>
+              </listitem>
+            </varlistentry>
+            </variablelist>
           '';
         };
 
@@ -268,8 +373,8 @@ in
         };
 
         bandwidthRate = mkOption {
-          type = types.int;
-          default = 0;
+          type = types.nullOr types.int;
+          default = null;
           example = 100;
           description = ''
             Specify this to limit the bandwidth usage of relayed (server)
@@ -278,7 +383,7 @@ in
         };
 
         bandwidthBurst = mkOption {
-          type = types.int;
+          type = types.nullOr types.int;
           default = cfg.relay.bandwidthRate;
           example = 200;
           description = ''
@@ -288,9 +393,19 @@ in
           '';
         };
 
-        portSpec = mkOption {
-          type    = types.str;
-          example = "143";
+        address = mkOption {
+          type    = types.nullOr types.str;
+          default = null;
+          example = "noname.example.com";
+          description = ''
+            The IP address or full DNS name for advertised address of your relay.
+            Leave unset and Tor will guess.
+          '';
+        };
+
+        port = mkOption {
+          type    = types.either types.int types.str;
+          example = 143;
           description = ''
             What port to advertise for Tor connections. This corresponds to the
             <literal>ORPort</literal> section in the Tor manual; see
@@ -313,13 +428,15 @@ in
             considered first to last, and the first match wins. If you
             want to _replace_ the default exit policy, end this with
             either a reject *:* or an accept *:*. Otherwise, you're
-            _augmenting_ (prepending to) the default exit
-            policy. Leave commented to just use the default, which is
+            _augmenting_ (prepending to) the default exit policy.
+            Leave commented to just use the default, which is
             available in the man page or at
-            https://www.torproject.org/documentation.html
+            <link xlink:href="https://www.torproject.org/documentation.html" />.
 
-            Look at https://www.torproject.org/faq-abuse.html#TypicalAbuses
-            for issues you might encounter if you use the default exit policy.
+            Look at
+            <link xlink:href="https://www.torproject.org/faq-abuse.html#TypicalAbuses" />
+            for issues you might encounter if you use the default
+            exit policy.
 
             If certain IPs and ports are blocked externally, e.g. by
             your firewall, you should update your exit policy to
@@ -330,79 +447,122 @@ in
       };
 
       hiddenServices = mkOption {
-        type = types.attrsOf (types.submodule ({
-          options = {
-            hiddenServicePorts = mkOption {
-              type = types.listOf (types.submodule {
-                options = {
-                  virtualPort = mkOption {
-                    type = types.int;
-                    example = 80;
-                    description = "Virtual port.";
-                  };
-                  target = mkOption {
-                    type = types.nullOr types.str;
-                    default = null;
-                    example = "127.0.0.1:8080";
-                    description = ''
-                      Target virtual Port shall be mapped to.
-
-                      You may override the target port, address, or both by
-                      specifying a target of addr, port, addr:port, or
-                      unix:path. (You can specify an IPv6 target as
-                      [addr]:port. Unix paths may be quoted, and may use
-                      standard C escapes.)
-                    '';
-                  };
-                };
-              });
-              example = [ { virtualPort = 80; target = "127.0.0.1:8080"; } { virtualPort = 6667; } ];
-              description = ''
-                If target is <literal>null</literal> the virtual port is mapped
-                to the same port on 127.0.0.1 over TCP. You may use
-                <literal>target</literal> to overwrite this behaviour (see
-                description of target).
-
-                This corresponds to the <literal>HiddenServicePort VIRTPORT
-                [TARGET]</literal> option by looking at the tor manual
-                <citerefentry><refentrytitle>tor</refentrytitle>
-                <manvolnum>1</manvolnum></citerefentry> for more information.
-              '';
-            };
-            extraConfig = mkOption {
-              type = types.str;
-              default = "";
-              description = ''
-                Extra configuration. Contents will be added in the current
-                hidden service context.
-              '';
-            };
-          };
-        }));
+        description = ''
+          A set of static hidden services that terminate their Tor
+          circuits at this node.
+
+          Every element in this set declares a virtual onion host.
+
+          You can specify your onion address by putting corresponding
+          private key to an appropriate place in ${torDirectory}.
+
+          For services without private keys in ${torDirectory} Tor
+          daemon will generate random key pairs (which implies random
+          onion addresses) on restart. The latter could take a while,
+          please be patient.
+
+          <note><para>
+            Hidden services can be useful even if you don't intend to
+            actually <emphasis>hide</emphasis> them, since they can
+            also be seen as a kind of NAT traversal mechanism.
+
+            E.g. the example will make your sshd, whatever runs on
+            "8080" and your mail server available from anywhere where
+            the Tor network is available (which, with the help from
+            bridges, is pretty much everywhere), even if both client
+            and server machines are behind NAT you have no control
+            over.
+          </para></note>
+        '';
         default = {};
-        example = {
-          "/var/lib/tor/webserver" = {
-            hiddenServicePorts = [ { virtualPort = 80; } ];
+        example = literalExample ''
+          { "my-hidden-service-example".map = [
+              { port = 22; }                # map ssh port to this machine's ssh
+              { port = 80; toPort = 8080; } # map http port to whatever runs on 8080
+              { port = "sip"; toHost = "mail.example.com"; toPort = "imap"; } # because we can
+            ];
+          }
+        '';
+        type = types.loaOf (types.submodule ({name, config, ...}: {
+          options = {
+
+             name = mkOption {
+               type = types.str;
+               description = ''
+                 Name of this tor hidden service.
+
+                 This is purely descriptive.
+
+                 After restarting Tor daemon you should be able to
+                 find your .onion address in
+                 <literal>${torDirectory}/onion/$name/hostname</literal>.
+               '';
+             };
+
+             map = mkOption {
+               default = [];
+               description = "Port mapping for this hidden service.";
+               type = types.listOf (types.submodule ({config, ...}: {
+                 options = {
+
+                   port = mkOption {
+                     type = types.either types.int types.str;
+                     example = 80;
+                     description = ''
+                       Hidden service port to "bind to".
+                     '';
+                   };
+
+                   destination = mkOption {
+                     internal = true;
+                     type = types.str;
+                     description = "Forward these connections where?";
+                   };
+
+                   toHost = mkOption {
+                     type = types.str;
+                     default = "127.0.0.1";
+                     description = "Mapping destination host.";
+                   };
+
+                   toPort = mkOption {
+                     type = types.either types.int types.str;
+                     example = 8080;
+                     description = "Mapping destination port.";
+                   };
+
+                 };
+
+                 config = {
+                   toPort = mkDefault config.port;
+                   destination = mkDefault "${config.toHost}:${toString config.toPort}";
+                 };
+               }));
+             };
+
           };
-        };
-        description = ''
-          Configure hidden services.
 
-          Please consult the tor manual
-          <citerefentry><refentrytitle>tor</refentrytitle>
-          <manvolnum>1</manvolnum></citerefentry> for a more detailed
-          explanation. (search for 'HIDDEN').
-        '';
+          config = {
+            name = mkDefault name;
+          };
+        }));
       };
     };
   };
 
   config = mkIf cfg.enable {
-    assertions = singleton
-      { message = "Can't be both an exit and a bridge relay at the same time";
-        assertion =
-          cfg.relay.enable -> !(cfg.relay.isBridge && cfg.relay.isExit);
-      };
+    # Not sure if `cfg.relay.role == "private-bridge"` helps as tor
+    # sends a lot of stats
+    warnings = optional (cfg.relay.enable && cfg.hiddenServices != {})
+      ''
+        Running Tor hidden services on a public relay makes the
+        presence of hidden services visible through simple statistical
+        analysis of publicly available data.
+
+        You can safely ignore this warning if you don't intend to
+        actually hide your hidden services. In either case, you can
+        always create a container/VM with a separate Tor daemon instance.
+      '';
 
     users.extraGroups.tor.gid = config.ids.gids.tor;
     users.extraUsers.tor =
@@ -422,9 +582,13 @@ in
         restartTriggers = [ torRcFile ];
 
         # Translated from the upstream contrib/dist/tor.service.in
+        preStart = ''
+          install -o tor -g tor -d ${torDirectory}/onion
+          ${pkgs.tor}/bin/tor -f ${torRcFile} --verify-config
+        '';
+
         serviceConfig =
           { Type         = "simple";
-            ExecStartPre = "${pkgs.tor}/bin/tor -f ${torRcFile} --verify-config";
             ExecStart    = "${pkgs.tor}/bin/tor -f ${torRcFile} --RunAsDaemon 0";
             ExecReload   = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
             KillSignal   = "SIGINT";
diff --git a/pkgs/applications/editors/vscode-with-extensions/default.nix b/pkgs/applications/editors/vscode-with-extensions/default.nix
index 983acbbac197..c54c8a4277f1 100644
--- a/pkgs/applications/editors/vscode-with-extensions/default.nix
+++ b/pkgs/applications/editors/vscode-with-extensions/default.nix
@@ -2,7 +2,7 @@
 , vscodeExtensions ? [] }:
 
 /*
-  `vsixExtensions`
+  `vscodeExtensions`
    :  A set of vscode extensions to be installed alongside the editor. Here's a an
       example:
 
@@ -10,12 +10,12 @@
       vscode-with-extensions.override {
 
         # When the extension is already available in the default extensions set.
-        vscodeExtensions = with vscodeExtensions; [
-          nix
+        vscodeExtensions = with vscode-extensions; [
+          bbenoist.Nix
         ]   
 
         # Concise version from the vscode market place when not available in the default set.
-        ++ vscodeUtils.extensionsFromVscodeMarketplace [
+        ++ vscode-utils.extensionsFromVscodeMarketplace [
           {
             name = "code-runner";
             publisher = "formulahendry";
diff --git a/pkgs/applications/misc/buku/default.nix b/pkgs/applications/misc/buku/default.nix
index ea3ca107d24d..321e12877ebc 100644
--- a/pkgs/applications/misc/buku/default.nix
+++ b/pkgs/applications/misc/buku/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, pythonPackages, fetchFromGitHub }:
+{ stdenv, python3, fetchFromGitHub }:
 
-with pythonPackages; buildPythonApplication rec {
+with python3.pkgs; buildPythonApplication rec {
   version = "3.0"; # When updating to 3.1, make sure to remove the marked line in preCheck
   name = "buku-${version}";
 
diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix
index 25259b467bb6..a76d6bc2fa47 100644
--- a/pkgs/applications/networking/dropbox/default.nix
+++ b/pkgs/applications/networking/dropbox/default.nix
@@ -24,10 +24,10 @@
 let
   # NOTE: When updating, please also update in current stable,
   # as older versions stop working
-  version = "32.4.23";
+  version = "33.4.23";
   sha256 = {
-    "x86_64-linux" = "11jh3cyax652crhvjshi8gnvb8mpp7hfbgwqjx5n1q3j1rswm3d1";
-    "i686-linux"   = "0xf0in3ywgd53v19h0v2sg69b6y2lbvr5y6jz10x3cighzr31qfp";
+    "x86_64-linux" = "0z8sd71v0xfbq4x8gw0rjhg7kbd7r0465b1cqk1ls2fivb25qqxz";
+    "i686-linux"   = "07sj1ixpml56bx83jawslak6scb12wxwn53nnabvgnivhb9vzq97";
   }."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
 
   arch = {
diff --git a/pkgs/applications/networking/newsreaders/quiterss/default.nix b/pkgs/applications/networking/newsreaders/quiterss/default.nix
index 6c3fc4af2721..2bd6bd0a8ecb 100644
--- a/pkgs/applications/networking/newsreaders/quiterss/default.nix
+++ b/pkgs/applications/networking/newsreaders/quiterss/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "quiterss-${version}";
-  version = "0.18.6";
+  version = "0.18.7";
 
   src = fetchFromGitHub {
     owner = "QuiteRSS";
     repo = "quiterss";
     rev = "${version}";
-    sha256 = "0qklgdv6b3zg4xil9yglja33vaa25d4i7vipv5aafhlavjz16mh6";
+    sha256 = "031n07s8dd0n3d5d4v9pza59iyvaim484n1qdnpbgamls2p8iwn6";
   };
 
   nativeBuildInputs = [ pkgconfig qmake ];
diff --git a/pkgs/applications/office/fava/default.nix b/pkgs/applications/office/fava/default.nix
index 437a0cbbd133..7bc549dd0fc5 100644
--- a/pkgs/applications/office/fava/default.nix
+++ b/pkgs/applications/office/fava/default.nix
@@ -16,7 +16,7 @@ python3Packages.buildPythonApplication rec {
     sha256 = "0yn2psbn436g1w5ixn94z8ca6dfd54izg98979arn0k7slpiccvz";
   };
 
-  buildInputs = with python3Packages; [ pytest_30 ];
+  checkInputs = with python3Packages; [ pytest ];
 
   checkPhase = ''
     # pyexcel is optional
diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix
index 4861d4b7c353..d612db64c122 100644
--- a/pkgs/build-support/fetchurl/mirrors.nix
+++ b/pkgs/build-support/fetchurl/mirrors.nix
@@ -159,8 +159,9 @@ rec {
   cpan = [
     http://ftp.gwdg.de/pub/languages/perl/CPAN/
     ftp://download.xs4all.nl/pub/mirror/CPAN/
-    ftp://ftp.nl.uu.net/pub/CPAN/
+    http://ftp.tuwien.ac.at/pub/CPAN/
     http://ftp.funet.fi/pub/CPAN/
+    https://cpan.metacpan.org/
     http://cpan.perl.org/
     http://backpan.perl.org/  # for old releases
   ];
@@ -266,15 +267,14 @@ rec {
   # Apache mirrors (see http://www.apache.org/mirrors/).
   apache = [
     http://www.eu.apache.org/dist/
-    ftp://ftp.inria.fr/pub/Apache/
-    http://apache.cict.fr/
+    http://wwwftp.ciril.fr/pub/apache/
     ftp://ftp.fu-berlin.de/unix/www/apache/
-    ftp://crysys.hit.bme.hu/pub/apache/dist/
+    http://ftp.tudelft.nl/apache/
     http://mirror.cc.columbia.edu/pub/software/apache/
     http://www.apache.org/dist/
     http://archive.apache.org/dist/ # fallback for old releases
     ftp://ftp.funet.fi/pub/mirrors/apache.org/
-    http://apache.cs.uu.nl/dist/
+    http://apache.cs.uu.nl/
     http://apache.cs.utah.edu/
   ];
 
diff --git a/pkgs/development/libraries/ntbtls/default.nix b/pkgs/development/libraries/ntbtls/default.nix
new file mode 100644
index 000000000000..b095c0366adc
--- /dev/null
+++ b/pkgs/development/libraries/ntbtls/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, libgpgerror, libgcrypt, libksba, zlib }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "ntbtls-${version}";
+  version = "0.1.1";
+
+  src = fetchurl {
+    url = "mirror://gnupg/ntbtls/ntbtls-${version}.tar.bz2";
+    sha256 = "0d322kgih43vr0gvy7kdj4baql1d6fa71vgpv0z63ira9pk4q9rd";
+  };
+
+  outputs = [ "dev" "out" ];
+
+  buildInputs = [ libgcrypt libgpgerror libksba zlib ];
+
+  postInstall = ''
+    moveToOutput "bin/ntbtls-config" $dev
+  '';
+
+  meta = {
+    description = "A tiny TLS 1.2 only implementation";
+    homepage = https://www.gnupg.org/software/ntbtls/index.html;
+    license = licenses.gpl3Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ joachifm ];
+  };
+}
diff --git a/pkgs/development/python-modules/Cython/default.nix b/pkgs/development/python-modules/Cython/default.nix
index 9d09b93ed20b..3dd4b0acbafb 100644
--- a/pkgs/development/python-modules/Cython/default.nix
+++ b/pkgs/development/python-modules/Cython/default.nix
@@ -14,11 +14,11 @@
 buildPythonPackage rec {
   pname = "Cython";
   name = "${pname}-${version}";
-  version = "0.25.2";
+  version = "0.26";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi";
+    sha256 = "4c24e2c22ddaed624d35229dc5db25049e9e225c6f64f3364326836cad8f2c66";
   };
 
   # With Python 2.x on i686-linux or 32-bit ARM this test fails because the
diff --git a/pkgs/development/python-modules/Flask-PyMongo/default.nix b/pkgs/development/python-modules/Flask-PyMongo/default.nix
new file mode 100644
index 000000000000..5518dc382a8b
--- /dev/null
+++ b/pkgs/development/python-modules/Flask-PyMongo/default.nix
@@ -0,0 +1,35 @@
+{ buildPythonPackage
+, fetchPypi
+, flask
+, pymongo
+, lib
+, pytest
+}:
+
+buildPythonPackage rec {
+  pname = "Flask-PyMongo";
+  name = "${pname}-${version}";
+  version = "0.5.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "2baaa2ba5107d72b3a8bd4b5c0c8881316e35340ad1ae979cc13f1f3c8843b3d";
+  };
+
+  checkInputs = [ pytest ];
+
+  checkPhase = ''
+    py.test tests
+  '';
+
+  # Tests seem to hang
+  doCheck = false;
+
+  propagatedBuildInputs = [ flask pymongo ];
+
+  meta = {
+    homepage = "http://flask-pymongo.readthedocs.org/";
+    description = "PyMongo support for Flask applications";
+    license = lib.licenses.bsd2;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/aafigure/default.nix b/pkgs/development/python-modules/aafigure/default.nix
index 1084eca762be..120d17e6709b 100644
--- a/pkgs/development/python-modules/aafigure/default.nix
+++ b/pkgs/development/python-modules/aafigure/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "aafigure";
-  version = "0.5";
+  version = "0.6";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "090c88beb091d28a233f854e239713aa15d8d1906ea16211855345c912e8a091";
+    sha256 = "49f2c1fd2b579c1fffbac1386a2670b3f6f475cc7ff6cc04d8b984888c2d9e1e";
   };
 
   propagatedBuildInputs = [ pillow ];
diff --git a/pkgs/development/python-modules/adal/default.nix b/pkgs/development/python-modules/adal/default.nix
index 982e63882ad3..22ed76b9e59c 100644
--- a/pkgs/development/python-modules/adal/default.nix
+++ b/pkgs/development/python-modules/adal/default.nix
@@ -3,12 +3,12 @@
 
 buildPythonPackage rec {
   pname = "adal";
-  version = "0.1.0";
+  version = "0.4.6";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1f32k18ck54adqlgvh6fjhy4yavcyrwy813prjyqppqqq4bn1a09";
+    sha256 = "7c5bbf4d8a17d535e6e857b28a41cedddc2767fc57424c15d484fa779bb97325";
   };
 
   propagatedBuildInputs =  [ requests pyjwt ];
diff --git a/pkgs/development/python-modules/aiodns/default.nix b/pkgs/development/python-modules/aiodns/default.nix
index 4265a7488f66..becb9ceae725 100644
--- a/pkgs/development/python-modules/aiodns/default.nix
+++ b/pkgs/development/python-modules/aiodns/default.nix
@@ -3,12 +3,12 @@
 
 buildPythonPackage rec {
   pname = "aiodns";
-  version = "1.0.1";
+  version = "1.1.1";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "595b78b8d54115d937cf60d778c02dad76b6f789fd527dab308f99e5601e7f3d";
+    sha256 = "d8677adc679ce8d0ef706c14d9c3d2f27a0e0cc11d59730cdbaf218ad52dd9ea";
   };
 
   propagatedBuildInputs = with stdenv.lib; [ pycares ] 
diff --git a/pkgs/development/python-modules/alembic/default.nix b/pkgs/development/python-modules/alembic/default.nix
index d1262d8fab45..45bea1fe687a 100644
--- a/pkgs/development/python-modules/alembic/default.nix
+++ b/pkgs/development/python-modules/alembic/default.nix
@@ -6,11 +6,11 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "alembic";
-  version = "0.9.3";
+  version = "0.9.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "57f2ede554c0b18f1cf811cfbb3b02c586a5422df94922e3821883ba0b8c616c";
+    sha256 = "8bdcb4babaa16b9a826f8084949cc2665cb328ecf7b89b3224b0ab85bd16fd05";
   };
 
   buildInputs = [ pytest pytestcov mock coverage ];
diff --git a/pkgs/development/python-modules/argcomplete/default.nix b/pkgs/development/python-modules/argcomplete/default.nix
index 228ffa7e5217..a4318fe5fa45 100644
--- a/pkgs/development/python-modules/argcomplete/default.nix
+++ b/pkgs/development/python-modules/argcomplete/default.nix
@@ -4,11 +4,11 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "argcomplete";
-  version = "1.8.2";
+  version = "1.9.2";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0sslhl1klvh92c8hjsz3y3mmnpcqspcgi49g5cik2rpbfkhcsb3s";
+    sha256 = "d6ea272a93bb0387f758def836e73c36fff0c54170258c212de3e84f7db8d5ed";
   };
 
   doCheck = false; # bash-completion test fails with "compgen: command not found".
diff --git a/pkgs/development/python-modules/asgi_ipc/default.nix b/pkgs/development/python-modules/asgi_ipc/default.nix
index e282294ef0cc..41de61dbccae 100644
--- a/pkgs/development/python-modules/asgi_ipc/default.nix
+++ b/pkgs/development/python-modules/asgi_ipc/default.nix
@@ -2,13 +2,13 @@
   asgiref, msgpack, posix_ipc
 }:
 buildPythonPackage rec {
-  version = "1.4.0";
+  version = "1.4.1";
   pname = "asgi_ipc";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/a/asgi_ipc/${name}.tar.gz";
-    sha256 = "1bae453d771eb92c0ec558b826fc0bce75a2a61bf21187784d4e4dc11710e588";
+    sha256 = "87cc9dda476d28f335261b73f0f3070f28847718de2e64da9a80492638203e43";
   };
 
   propagatedBuildInputs = [ asgiref msgpack posix_ipc ];
diff --git a/pkgs/development/python-modules/astropy/default.nix b/pkgs/development/python-modules/astropy/default.nix
index 836ce3addea0..44ff96cf826f 100644
--- a/pkgs/development/python-modules/astropy/default.nix
+++ b/pkgs/development/python-modules/astropy/default.nix
@@ -9,13 +9,13 @@
 buildPythonPackage rec {
   
   pname = "astropy";
-  version = "1.3.3";
+  version = "2.0.1";
 
   name = "${pname}-${version}";
   doCheck = false; #Some tests are failing. More importantly setup.py hangs on completion. Needs fixing with a proper shellhook.
   src = fetchPypi {
     inherit pname version;
-    sha256 = "ed093e033fcbee5a3ec122420c3376f8a80f74663214560727d3defe82170a99";
+    sha256 = "25e0881a392a2e03b4a705cf9592f01894d23f64797323b21387efa8ea9ec03e";
   };
   propagatedBuildInputs = [ numpy cython h5py scipy ];
 
diff --git a/pkgs/development/python-modules/async_timeout/default.nix b/pkgs/development/python-modules/async_timeout/default.nix
index aa548602d372..94c2379b0e15 100644
--- a/pkgs/development/python-modules/async_timeout/default.nix
+++ b/pkgs/development/python-modules/async_timeout/default.nix
@@ -7,13 +7,13 @@
 
 let
   pname = "async-timeout";
-  version = "1.2.1";
+  version = "1.3.0";
 in buildPythonPackage rec {
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
-    sha256 = "380e9bfd4c009a14931ffe487499b0906b00b3378bb743542cfd9fbb6d8e4657";
+    sha256 = "f4651f122a9877049930ce31a8422bc202a47937627295fe5e411b2c2083481f";
   };
 
   buildInputs = [ pytestrunner ];
diff --git a/pkgs/development/python-modules/audioread/default.nix b/pkgs/development/python-modules/audioread/default.nix
index bf71cf8cfbdd..88fdcbbeba17 100644
--- a/pkgs/development/python-modules/audioread/default.nix
+++ b/pkgs/development/python-modules/audioread/default.nix
@@ -6,11 +6,11 @@
 buildPythonPackage rec {
   pname = "audioread";
   name = "${pname}-${version}";
-  version = "2.1.1";
+  version = "2.1.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "ffb601de7a9e40850d4ec3256a3a6bbe8fa40466dafb5c65f41b08e4bb963f1e";
+    sha256 = "36c3b118f097c58ba073b7d040c4319eff200756f094295677567e256282d0d7";
   };
 
   # No tests, need to disable or py3k breaks
diff --git a/pkgs/development/python-modules/autobahn/default.nix b/pkgs/development/python-modules/autobahn/default.nix
index b83d731c720a..8d647a9b52eb 100644
--- a/pkgs/development/python-modules/autobahn/default.nix
+++ b/pkgs/development/python-modules/autobahn/default.nix
@@ -6,11 +6,11 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "autobahn";
-  version = "17.5.1";
+  version = "17.8.1";
 
   src = fetchurl {
     url = "mirror://pypi/a/${pname}/${name}.tar.gz";
-    sha256 = "0p2xx20g0rj6pnp4h3231mn8zk4ag8msv69f93gai2hzl5vglcia";
+    sha256 = "72b1b1e30bd41d52e7454ef6fe78fe80ebf2341a747616e2cd854a76203a0ec4";
   };
 
   # Upstream claim python2 support, but tests require pytest-asyncio which
diff --git a/pkgs/development/python-modules/bottleneck/default.nix b/pkgs/development/python-modules/bottleneck/default.nix
index 2c1850b86abc..4eb5bcb6edc9 100644
--- a/pkgs/development/python-modules/bottleneck/default.nix
+++ b/pkgs/development/python-modules/bottleneck/default.nix
@@ -9,10 +9,10 @@
 buildPythonPackage rec {
   pname = "Bottleneck";
   name = "Bottleneck-${version}";
-  version = "1.2.0";
+  version = "1.2.1";
   src = fetchPypi {
     inherit pname version;
-    sha256 = "3bec84564a4adbe97c24e875749b949a19cfba4e4588be495cc441db7c6b05e8";
+    sha256 = "6efcde5f830aed64feafca0359b51db0e184c72af8ba6675b4a99f263922eb36";
   };
 
   checkInputs = [ nose ];
diff --git a/pkgs/development/python-modules/breathe/default.nix b/pkgs/development/python-modules/breathe/default.nix
index 9f4d89da90c0..6f539f15222c 100644
--- a/pkgs/development/python-modules/breathe/default.nix
+++ b/pkgs/development/python-modules/breathe/default.nix
@@ -1,13 +1,13 @@
 { lib, fetchurl, buildPythonPackage, docutils, six, sphinx, isPy3k }:
 
 buildPythonPackage rec {
-  version = "4.6.0";
+  version = "4.7.2";
   pname = "breathe";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/b/breathe/${name}.tar.gz";
-    sha256 = "9db2ba770f824da323b9ea3db0b98d613a4e0af094c82ccb0a82991da81b736a";
+    sha256 = "dd15efc66d65180e4c994edd15fcb642812ad04ac9c36738b28bf248d7c0be32";
   };
 
   propagatedBuildInputs = [ docutils six sphinx ];
diff --git a/pkgs/development/python-modules/certifi/default.nix b/pkgs/development/python-modules/certifi/default.nix
index a2cf4633d302..79eea0574546 100644
--- a/pkgs/development/python-modules/certifi/default.nix
+++ b/pkgs/development/python-modules/certifi/default.nix
@@ -5,12 +5,12 @@
 
 buildPythonPackage rec {
   pname = "certifi";
-  version = "2017.4.17";
+  version = "2017.7.27.1";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "f7527ebf7461582ce95f7a9e03dd141ce810d40590834f4ec20cddd54234c10a";
+    sha256 = "40523d2efb60523e113b44602298f0960e900388cf3bb6043f645cf57ea9e3f5";
   };
 
   meta = {
diff --git a/pkgs/development/python-modules/chai/default.nix b/pkgs/development/python-modules/chai/default.nix
index f5440004ebdb..aa4e5e47e728 100644
--- a/pkgs/development/python-modules/chai/default.nix
+++ b/pkgs/development/python-modules/chai/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "chai";
-  version = "1.1.1";
+  version = "1.1.2";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl";
+    sha256 = "ff8d2b6855f660cd23cd5ec79bd10264d39f24f6235773331b48e7fcd637d6cc";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/python-modules/confluent-kafka/default.nix b/pkgs/development/python-modules/confluent-kafka/default.nix
index d26008231b08..c8cbfe9d9be1 100644
--- a/pkgs/development/python-modules/confluent-kafka/default.nix
+++ b/pkgs/development/python-modules/confluent-kafka/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   name = "${pname}-${version}";
-  version = "0.9.4";
+  version = "0.11.0";
   pname = "confluent-kafka";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1v8apw9f8l01ql42jg1sfqv41yxvcbxn1a3ar01y0ni428swq6wk";
+    sha256 = "4c34bfe8f823ee3777d93820ec6578365d2bde3cd1302cbd0e44c86b68643667";
   };
 
   buildInputs = [ rdkafka requests ] ++ (if isPy3k then [ avro3k ] else [ avro ]) ;
diff --git a/pkgs/development/python-modules/coveralls/default.nix b/pkgs/development/python-modules/coveralls/default.nix
index 57431c2c2c25..f3b01c668159 100644
--- a/pkgs/development/python-modules/coveralls/default.nix
+++ b/pkgs/development/python-modules/coveralls/default.nix
@@ -13,12 +13,12 @@
 buildPythonPackage rec {
   pname = "coveralls";
   name = "${pname}-python-${version}";
-  version = "1.1";
+  version = "1.2.0";
 
   # wanted by tests
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0238hgdwbvriqxrj22zwh0rbxnhh9c6hh75i39ll631vq62h65il";
+    sha256 = "510682001517bcca1def9f6252df6ce730fcb9831c62d9fff7c7d55b6fdabdf3";
   };
 
   buildInputs = [
diff --git a/pkgs/development/python-modules/discordpy/default.nix b/pkgs/development/python-modules/discordpy/default.nix
index 53a4a51fcd87..eebcd802dd61 100644
--- a/pkgs/development/python-modules/discordpy/default.nix
+++ b/pkgs/development/python-modules/discordpy/default.nix
@@ -11,13 +11,13 @@
 
 let
   pname = "discord.py";
-  version = "0.16.8";
+  version = "0.16.10";
 in buildPythonPackage rec {
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
-    sha256 = "d775b701383e3a5762accf3816b819f357f299476701615ac30c7715a5ea79aa";
+    sha256 = "cb0b9ad5f5edf2d5afd5f5ce07381a0a089eb036004938126a5582fc8fa0cc88";
   };
 
   propagatedBuildInputs = [ asyncio aiohttp websockets pynacl ];
diff --git a/pkgs/development/python-modules/django-polymorphic/default.nix b/pkgs/development/python-modules/django-polymorphic/default.nix
index 83e8f1c4d586..e2fedfdaaf3e 100644
--- a/pkgs/development/python-modules/django-polymorphic/default.nix
+++ b/pkgs/development/python-modules/django-polymorphic/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "django-polymorphic";
-  version = "1.2";
+  version = "1.3";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1bz86711sx2b66rl2xz141xppsfmlxilkgjgq0jsavpw37vg7r3r";
+    sha256 = "8737b465ebf5fad772b4c52272189c352f5904f468d298584a3469187e3207ad";
   };
 
   checkInputs = [ django ];
diff --git a/pkgs/development/python-modules/django_compressor/default.nix b/pkgs/development/python-modules/django_compressor/default.nix
index 5d8626ec5760..1fbb4dbafe68 100644
--- a/pkgs/development/python-modules/django_compressor/default.nix
+++ b/pkgs/development/python-modules/django_compressor/default.nix
@@ -2,12 +2,12 @@
   rcssmin, rjsmin, django_appconf }:
 buildPythonPackage rec {
     pname = "django_compressor";
-    version = "2.1.1";
+    version = "2.2";
     name = "${pname}-${version}";
 
     src = fetchPypi {
       inherit pname version;
-      sha256 = "1s42dkq3qp1niaf69markd7m3ljgf2bspyz2nk0sa07f8q04004j";
+      sha256 = "9616570e5b08e92fa9eadc7a1b1b49639cce07ef392fc27c74230ab08075b30f";
     };
 
     # Need to setup django testing
diff --git a/pkgs/development/python-modules/djangorestframework/default.nix b/pkgs/development/python-modules/djangorestframework/default.nix
index 8bbce992c1b0..648ee0196825 100644
--- a/pkgs/development/python-modules/djangorestframework/default.nix
+++ b/pkgs/development/python-modules/djangorestframework/default.nix
@@ -1,12 +1,12 @@
 { stdenv, buildPythonPackage, fetchurl, django }:
 buildPythonPackage rec {
-  version = "3.6.3";
+  version = "3.6.4";
   pname = "djangorestframework";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/d/djangorestframework/${name}.tar.gz";
-    sha256 = "6aa6aafdfb7f6152a401873ecae93aff9eb54d7a74266065347cf4de68278ae4";
+    sha256 = "de8ac68b3cf6dd41b98e01dcc92dc0022a5958f096eafc181a17fa975d18ca42";
   };
 
   # Test settings are missing
diff --git a/pkgs/development/python-modules/docker.nix b/pkgs/development/python-modules/docker.nix
index 7364c5faed49..88d85dad91aa 100644
--- a/pkgs/development/python-modules/docker.nix
+++ b/pkgs/development/python-modules/docker.nix
@@ -3,13 +3,13 @@
 , ipaddress, backports_ssl_match_hostname, docker_pycreds
 }:
 buildPythonPackage rec {
-  version = "2.4.2";
+  version = "2.5.1";
   pname = "docker";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/d/docker/${name}.tar.gz";
-    sha256 = "11kl6kl82056bzcycvc2jpz59ra89vwbyzi0yaamixgcm9nzlvr1";
+    sha256 = "b876e6909d8d2360e0540364c3a952a62847137f4674f2439320ede16d6db880";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/dulwich.nix b/pkgs/development/python-modules/dulwich.nix
index 804419d0fca9..bbf43ce615c4 100644
--- a/pkgs/development/python-modules/dulwich.nix
+++ b/pkgs/development/python-modules/dulwich.nix
@@ -3,13 +3,13 @@
 , git, glibcLocales }:
 
 buildPythonPackage rec {
-  version = "0.17.3";
+  version = "0.18.2";
   pname = "dulwich";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/d/dulwich/${name}.tar.gz";
-    sha256 = "0c3eccac93823e172b05d57aaeab3d6f03c6c0f1867613606d1909a3ab4100ca";
+    sha256 = "284d0000b21ac12f94bcd5eb3d7dcc42da51e5506b9a53a11c615b46da906d9b";
   };
 
   LC_ALL = "en_US.UTF-8";
diff --git a/pkgs/development/python-modules/emcee/default.nix b/pkgs/development/python-modules/emcee/default.nix
index 3e95859fc0f8..2afcb2b2de5a 100644
--- a/pkgs/development/python-modules/emcee/default.nix
+++ b/pkgs/development/python-modules/emcee/default.nix
@@ -3,12 +3,12 @@
 
 buildPythonPackage rec {
   pname = "emcee";
-  version = "2.1.0";
+  version = "2.2.1";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0qyafp9jfya0mkxgqfvljf0rkic5fm8nimzwadyrxyvq7nd07qaw";
+    sha256 = "b83551e342b37311897906b3b8acf32979f4c5542e0a25786ada862d26241172";
   };
 
   propagatedBuildInputs = [ numpy ];
diff --git a/pkgs/development/python-modules/flake8/default.nix b/pkgs/development/python-modules/flake8/default.nix
index aec715328f9b..f7f78e709f92 100644
--- a/pkgs/development/python-modules/flake8/default.nix
+++ b/pkgs/development/python-modules/flake8/default.nix
@@ -6,11 +6,11 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "flake8";
-  version = "3.3.0";
+  version = "3.4.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "04izn1q1lgbr408l9b3vkxqmpi6mq47bxwc0iwypb02mrxns41xr";
+    sha256 = "c20044779ff848f67f89c56a0e4624c04298cd476e25253ac0c36f910a1a11d8";
   };
 
   buildInputs = [ pytest mock pytestrunner ];
diff --git a/pkgs/development/python-modules/flask-migrate/default.nix b/pkgs/development/python-modules/flask-migrate/default.nix
index 3e2c7ac4602c..dc94be8f6005 100644
--- a/pkgs/development/python-modules/flask-migrate/default.nix
+++ b/pkgs/development/python-modules/flask-migrate/default.nix
@@ -5,12 +5,12 @@ with stdenv.lib;
 
 buildPythonPackage rec {
   pname = "Flask-Migrate";
-  version = "2.0.4";
+  version = "2.1.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1e6dc83bed93aef9a4791d5daaa03b186c8ef5d96c99c7d88166da683c86e42d";
+    sha256 = "716d5b68eec53821f80b3fbcb0fd60baed0cb0e320abb30289e83217668cef7f";
   };
 
   checkInputs = optional isPy3k glibcLocales;
diff --git a/pkgs/development/python-modules/flask-testing.nix b/pkgs/development/python-modules/flask-testing.nix
index c5fe8f8bdbee..c34c53e3ffa4 100644
--- a/pkgs/development/python-modules/flask-testing.nix
+++ b/pkgs/development/python-modules/flask-testing.nix
@@ -1,14 +1,16 @@
-{ stdenv, fetchurl, buildPythonPackage, pythonOlder
+{ stdenv, fetchPypi, buildPythonPackage, pythonOlder
 , flask, blinker, twill }:
 
 with stdenv.lib;
 
 buildPythonPackage rec {
-  name = "Flask-Testing-0.6.1";
+  pname = "Flask-Testing";
+  version = "0.6.2";
+  name = "${pname}-${version}";
 
-  src = fetchurl {
-    url = "mirror://pypi/F/Flask-Testing/${name}.tar.gz";
-    sha256 = "1ckmy7kz2qkggdlm9y5wx6gvd2x7qv921dyb059ywfh15hrkkxdb";
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "f25effd266fce9b16482f4ce3423d5a7d25534aab77bc83caace5d9637bf0df0";
   };
 
   buildInputs = optionals (pythonOlder "3.0") [ twill ];
diff --git a/pkgs/development/python-modules/fonttools/default.nix b/pkgs/development/python-modules/fonttools/default.nix
index fbe837334041..c037decbc873 100644
--- a/pkgs/development/python-modules/fonttools/default.nix
+++ b/pkgs/development/python-modules/fonttools/default.nix
@@ -7,12 +7,12 @@
 
 buildPythonPackage rec {
   pname = "fonttools";
-  version = "3.13.1";
+  version = "3.15.1";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "ded1f9a6cdd6ed19a3df05ae40066d579ffded17369b976f9e701cf31b7b1f2d";
+    sha256 = "8df4b605a28e313f0f9e0a79502caba4150a521347fdbafc063e52fee34912c2";
     extension = "zip";
   };
 
diff --git a/pkgs/development/python-modules/ftfy/default.nix b/pkgs/development/python-modules/ftfy/default.nix
index c0aea9877812..e53358677029 100644
--- a/pkgs/development/python-modules/ftfy/default.nix
+++ b/pkgs/development/python-modules/ftfy/default.nix
@@ -9,11 +9,11 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "ftfy";
-  version = "4.4.3";
+  version = "5.1.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "152xdb56rhs1q4r0ck1n557sbphw7zq18r75a7kkd159ckdnc01w";        
+    sha256 = "67a29a2fad5f72aec2d8a0a7084e4f499ed040455133ee96b1c458609fc29e78";        
   };
 
   propagatedBuildInputs = [ html5lib wcwidth];
diff --git a/pkgs/development/python-modules/gensim/default.nix b/pkgs/development/python-modules/gensim/default.nix
index 3892ee105c40..837ffa8c8672 100644
--- a/pkgs/development/python-modules/gensim/default.nix
+++ b/pkgs/development/python-modules/gensim/default.nix
@@ -13,10 +13,10 @@
 buildPythonPackage rec {
   pname = "gensim";
   name = "${pname}-${version}";
-  version = "2.1.0";
+  version = "2.3.0";
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1wn7bji9b80wn1yggmh7a0dlwzdjr6cp24x4p33j2rf29lxnm2kc";
+    sha256 = "7d0dccc7d2c576e270037949874800b7cfbc86ef081ff981483f612cd18e223f";
   };
 
   propagatedBuildInputs = [ smart_open numpy six scipy
diff --git a/pkgs/development/python-modules/html5-parser/default.nix b/pkgs/development/python-modules/html5-parser/default.nix
index 549dcb89bf7f..6a579cffccf5 100644
--- a/pkgs/development/python-modules/html5-parser/default.nix
+++ b/pkgs/development/python-modules/html5-parser/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "html5-parser";
-  version = "0.4.3";
+  version = "0.4.4";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "173vzg214x7qfq201m4b09wg5nszdgwjw5q02v23k54iqm3kcpnx";
+    sha256 = "b9f3a1d4cdb8742e8e4ecafab04bff541bde4ff09af233293ed0b94028ec1ab5";
   };
 
   buildInputs = [ pkgconfig ];
diff --git a/pkgs/development/python-modules/ipywidgets/default.nix b/pkgs/development/python-modules/ipywidgets/default.nix
index dcd5b89b6b8e..ce0aed4964d3 100644
--- a/pkgs/development/python-modules/ipywidgets/default.nix
+++ b/pkgs/development/python-modules/ipywidgets/default.nix
@@ -14,12 +14,12 @@
 
 buildPythonPackage rec {
   pname = "ipywidgets";
-  version = "6.0.0";
+  version = "7.0.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "afa6248850cff14ef86117db87aeab0b12237e4eaf740e73716460ed593a43a7";
+    sha256 = "63e454202f72796044e99846881c33767c47fa050735dc1f927657b9cd2b7fcd";
   };
 
   # Tests are not distributed
diff --git a/pkgs/development/python-modules/jsonpatch/default.nix b/pkgs/development/python-modules/jsonpatch/default.nix
new file mode 100644
index 000000000000..39f36b1d9494
--- /dev/null
+++ b/pkgs/development/python-modules/jsonpatch/default.nix
@@ -0,0 +1,26 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, jsonpointer
+}:
+
+buildPythonPackage rec {
+  pname = "jsonpatch";
+  version = "1.16";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "f025c28a08ce747429ee746bb21796c3b6417ec82288f8fe6514db7398f2af8a";
+  };
+
+  # test files are missing
+  doCheck = false;
+  propagatedBuildInputs = [ jsonpointer ];
+
+  meta = {
+    description = "Library to apply JSON Patches according to RFC 6902";
+    homepage = "https://github.com/stefankoegl/python-json-patch";
+    license = lib.licenses.bsd2; # "Modified BSD license, says pypi"
+  };
+}
diff --git a/pkgs/development/python-modules/keras/default.nix b/pkgs/development/python-modules/keras/default.nix
index b15b2d0817a1..51c15ad68135 100644
--- a/pkgs/development/python-modules/keras/default.nix
+++ b/pkgs/development/python-modules/keras/default.nix
@@ -12,12 +12,12 @@
 
 buildPythonPackage rec {
   pname = "Keras";
-  version = "2.0.6";
+  version = "2.0.7";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0519480abe4ad18b2c2d1bc580eab75edd82c95083d341a1157952f4b00019bb";
+    sha256 = "a6c72ee2b94be1ffefe7e77b69582b9827211f0c356b2189459711844d3634c0";
   };
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/keystoneauth1/default.nix b/pkgs/development/python-modules/keystoneauth1/default.nix
index c2c2235836f7..17792723e4a3 100644
--- a/pkgs/development/python-modules/keystoneauth1/default.nix
+++ b/pkgs/development/python-modules/keystoneauth1/default.nix
@@ -6,13 +6,13 @@
 
 buildPythonPackage rec {
   pname = "keystoneauth1";
-  version = "1.1.0";
+  version = "3.1.0";
   name = "${pname}-${version}";
   disabled = isPyPy; # a test fails
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "05fc6xsp5mal52ijvj84sf7mrw706ihadfdf5mnq9zxn7pfl4118";
+    sha256 = "e5abfa8bbe866d52ca56afbe528d15214a60033cc1dc9804478cae7424f0f8fb";
   };
 
   buildInputs = [ pbr testtools testresources testrepository mock
diff --git a/pkgs/development/python-modules/kitchen/default.nix b/pkgs/development/python-modules/kitchen/default.nix
index 895cdedcb6e8..a35737e69baf 100644
--- a/pkgs/development/python-modules/kitchen/default.nix
+++ b/pkgs/development/python-modules/kitchen/default.nix
@@ -1,12 +1,12 @@
 { stdenv, buildPythonPackage, fetchPypi }:
 buildPythonPackage rec {
   pname = "kitchen";
-  version = "1.2.4";
+  version = "1.2.5";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq";
+    sha256 = "af9fbb60f68cbdb2ead402beb8fa7c7edadbe2aa7b5a70138b7c4b0fa88153fd";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/python-modules/ledgerblue/default.nix b/pkgs/development/python-modules/ledgerblue/default.nix
index f8faab3fbb81..0bee4dd47b55 100644
--- a/pkgs/development/python-modules/ledgerblue/default.nix
+++ b/pkgs/development/python-modules/ledgerblue/default.nix
@@ -5,11 +5,11 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "ledgerblue";
-  version = "0.1.13";
+  version = "0.1.15";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "09bsiylvgax6m47w8r0myaf61xj9j0h1spvadx6fx31qy0iqicw0";
+    sha256 = "42cbcd74615576294142d56eb9eaa7e1b67f9dd87eeb24d713336b56e8c01c5c";
   };
 
   buildInputs = [ hidapi pycrypto pillow protobuf future ecpy ];
diff --git a/pkgs/development/python-modules/libtmux/default.nix b/pkgs/development/python-modules/libtmux/default.nix
index 203b9e6bf754..2f041f0da4a2 100644
--- a/pkgs/development/python-modules/libtmux/default.nix
+++ b/pkgs/development/python-modules/libtmux/default.nix
@@ -3,11 +3,11 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "libtmux";
-  version = "0.7.3";
+  version = "0.7.4";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "111qbgq28za12la5b0aa9rr7hg8235zy0kyzzryn7fa6z3i5k5z8";
+    sha256 = "c7407aa4103d40f50f99432bf4dffe0b4591f976956b2dd7ee7bbf53ad138bd9";
   };
 
   buildInputs = [ pytest_29 ];
diff --git a/pkgs/development/python-modules/llvmlite/default.nix b/pkgs/development/python-modules/llvmlite/default.nix
index fa9c6ac18f3a..5de795f84ef9 100644
--- a/pkgs/development/python-modules/llvmlite/default.nix
+++ b/pkgs/development/python-modules/llvmlite/default.nix
@@ -11,13 +11,13 @@
 buildPythonPackage rec {
   pname = "llvmlite";
   name = "${pname}-${version}";
-  version = "0.18.0";
+  version = "0.19.0";
 
   disabled = isPyPy;
 
   src = fetchurl {
     url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
-    sha256 = "25a38af925f0523b834b92216d7f7cc997624942d5958287350c254f5e730404";
+    sha256 = "fbaeb3d584e0f6bac82a33776e9b5f0b5b4a3415a03edeff5d66f6176f0edbe2";
   };
 
   propagatedBuildInputs = [ llvm ] ++ stdenv.lib.optional (pythonOlder "3.4") enum34;
diff --git a/pkgs/development/python-modules/m2r/default.nix b/pkgs/development/python-modules/m2r/default.nix
index b79307a8084e..39498919708b 100644
--- a/pkgs/development/python-modules/m2r/default.nix
+++ b/pkgs/development/python-modules/m2r/default.nix
@@ -3,11 +3,11 @@
 buildPythonPackage rec {
   pname = "m2r";
   name = "${pname}-${version}";
-  version = "0.1.7";
+  version = "0.1.10";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "771631d051a52764fe5b660f97ad028df3aff90c9859d345ccfd17a4c7c2ab39";
+    sha256 = "cfb5b8a37defdd594eb46a794b87d9b4ca1902b0e8e309c9f2623f7275c261d6";
   };
 
   propagatedBuildInputs = [ mistune docutils ];
diff --git a/pkgs/development/python-modules/magic-wormhole/default.nix b/pkgs/development/python-modules/magic-wormhole/default.nix
index d4a356eaec44..7fedf4d48bbd 100644
--- a/pkgs/development/python-modules/magic-wormhole/default.nix
+++ b/pkgs/development/python-modules/magic-wormhole/default.nix
@@ -21,12 +21,12 @@
 
 buildPythonPackage rec {
   pname = "magic-wormhole";
-  version = "0.9.2";
+  version = "0.10.2";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "14aed4b453278651d92c3fd8955a105e2d33dcde279fa25d1d759e0e769f16b3";
+    sha256 = "55a423247faee7a0644d25f37760495978cd494ba0274fefd8cd1fad493954ee";
   };
 
   checkInputs = [ mock ];
diff --git a/pkgs/development/python-modules/marionette-harness/default.nix b/pkgs/development/python-modules/marionette-harness/default.nix
index 5b81d3da8ec6..da8949f9f6e4 100644
--- a/pkgs/development/python-modules/marionette-harness/default.nix
+++ b/pkgs/development/python-modules/marionette-harness/default.nix
@@ -13,12 +13,12 @@
 
 buildPythonPackage rec {
   pname = "marionette-harness";
-  version = "4.0.0";
+  version = "4.1.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0726zm09nwh4kkd4xirva4596svlifkkpbaywlmq2yb6ayk7d4vl";
+    sha256 = "20c188791e28d586c58acf86ff28cb704c4195a4da6eb10db7b8c6771e3f2983";
   };
 
   propagatedBuildInputs = [ mozprofile mozversion browsermob-proxy moztest 
diff --git a/pkgs/development/python-modules/multidict/default.nix b/pkgs/development/python-modules/multidict/default.nix
index faece73e172f..fc0bdf906275 100644
--- a/pkgs/development/python-modules/multidict/default.nix
+++ b/pkgs/development/python-modules/multidict/default.nix
@@ -7,13 +7,13 @@
 
 let
   pname = "multidict";
-  version = "2.1.6";
+  version = "3.1.3";
 in buildPythonPackage rec {
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
-    sha256 = "9ec33a1da4d2096949e29ddd66a352aae57fad6b5483087d54566a2f6345ae10";
+    sha256 = "875f80a046e7799b40df4b015b8fc5dae91697936872a8d7362c909a02ec6d12";
   };
 
   buildInputs = [ pytest ];
diff --git a/pkgs/development/python-modules/natsort/default.nix b/pkgs/development/python-modules/natsort/default.nix
index 79ec9f5bd896..bd48ad2559c1 100644
--- a/pkgs/development/python-modules/natsort/default.nix
+++ b/pkgs/development/python-modules/natsort/default.nix
@@ -16,7 +16,7 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "natsort";
-  version = "5.0.3";
+  version = "5.1.0";
 
   buildInputs = [
     hypothesis
@@ -34,7 +34,7 @@ buildPythonPackage rec {
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1h87n0jcsi6mgjx1pws6g1lmcn8jwabwxj8hq334jvziaq0plyym";
+    sha256 = "5db0fd17c9f8ef3d54962a6e46159ce4807c630f0931169cd15ce54f2ac395b9";
   };
 
   # do not run checks on nix_run_setup.py
diff --git a/pkgs/development/python-modules/nbformat/default.nix b/pkgs/development/python-modules/nbformat/default.nix
index 81340923fde6..6f637bae891b 100644
--- a/pkgs/development/python-modules/nbformat/default.nix
+++ b/pkgs/development/python-modules/nbformat/default.nix
@@ -12,12 +12,12 @@
 
 buildPythonPackage rec {
   pname = "nbformat";
-  version = "4.3.0";
+  version = "4.4.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "5febcce872672f1c97569e89323992bdcb8573fdad703f835e6521253191478b";
+    sha256 = "f7494ef0df60766b7cabe0a3651556345a963b74dbc16bc7c18479041170d402";
   };
   LC_ALL="en_US.UTF-8";
 
diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix
index 99c7ce008533..840df8769387 100644
--- a/pkgs/development/python-modules/numba/default.nix
+++ b/pkgs/development/python-modules/numba/default.nix
@@ -14,13 +14,13 @@
 }:
 
 buildPythonPackage rec {
-  version = "0.33.0";
+  version = "0.34.0";
   pname = "numba";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/n/numba/${name}.tar.gz";
-    sha256 = "56c5fcf3175f72b67ba8998d02870e3ea598e10c41d93289cecb9d89be7669fd";
+    sha256 = "4f86df9212cb2678598e6583973ef1df978f3e3ba497b4dc6f91848887710577";
   };
 
   NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
diff --git a/pkgs/development/python-modules/odfpy/default.nix b/pkgs/development/python-modules/odfpy/default.nix
new file mode 100644
index 000000000000..a80cd827c6d1
--- /dev/null
+++ b/pkgs/development/python-modules/odfpy/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+}:
+
+buildPythonPackage rec {
+  pname = "odfpy";
+  version = "1.3.5";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "6f8163f8464868cff9421a058f25566e41d73c8f7e849c021b86630941b44366";
+  };
+
+  checkPhase = ''
+    pushd tests
+    rm runtests
+    for file in test*.py; do
+        python  $file
+    done
+  '';
+
+  meta = {
+    description = "Python API and tools to manipulate OpenDocument files";
+    homepage = "https://joinup.ec.europa.eu/software/odfpy/home";
+    license = lib.licenses.asl20;
+  };
+}
diff --git a/pkgs/development/python-modules/oslo-config/default.nix b/pkgs/development/python-modules/oslo-config/default.nix
index a76937278c48..6323e72e2a5c 100644
--- a/pkgs/development/python-modules/oslo-config/default.nix
+++ b/pkgs/development/python-modules/oslo-config/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "oslo.config";
-  version = "2.5.0";
+  version = "4.11.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "043mavrzj7vjn7kh1dddci4sf67qwqnnn6cm0k1d19alks9hismz";
+    sha256 = "1be8aaba466a3449fdb21ee8f7025b0d3d252c8c7568b8d5d05ceff58617cd05";
   };
 
   propagatedBuildInputs = [ pbr six netaddr stevedore ];
diff --git a/pkgs/development/python-modules/pbr/default.nix b/pkgs/development/python-modules/pbr/default.nix
index 2fa6c2b39300..75052f271510 100644
--- a/pkgs/development/python-modules/pbr/default.nix
+++ b/pkgs/development/python-modules/pbr/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "pbr";
-  version = "3.0.1";
+  version = "3.1.1";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "d7e8917458094002b9a2e0030ba60ba4c834c456071f2d0c1ccb5265992ada91";
+    sha256 = "05f61c71aaefc02d8e37c0a3eeb9815ff526ea28b3b76324769e6158d7f95be1";
   };
 
   # circular dependencies with fixtures
diff --git a/pkgs/development/python-modules/phonenumbers/default.nix b/pkgs/development/python-modules/phonenumbers/default.nix
index 18cd9f021fe9..f7b7ecd0abcc 100644
--- a/pkgs/development/python-modules/phonenumbers/default.nix
+++ b/pkgs/development/python-modules/phonenumbers/default.nix
@@ -2,7 +2,7 @@
 
 buildPythonPackage rec {
   pname = "phonenumbers";
-  version = "8.7.1";
+  version = "8.8.0";
   name = "${pname}-${version}";
 
   meta = {
@@ -14,6 +14,6 @@ buildPythonPackage rec {
 
   src = fetchurl {
     url = "mirror://pypi/p/phonenumbers/${name}.tar.gz";
-    sha256 = "1zmi2xvh6v4iyfxmrqhj2byfac9xk733w663a7phib7y6wkvqlgr";
+    sha256 = "f8d5eda55e2acdfeb9db9742e1207a5cfb615ad060cabccf1e06a9ed8efd1e49";
   };
 }
diff --git a/pkgs/development/python-modules/plotly/default.nix b/pkgs/development/python-modules/plotly/default.nix
index ed62a0912818..ac3c4f1d3246 100644
--- a/pkgs/development/python-modules/plotly/default.nix
+++ b/pkgs/development/python-modules/plotly/default.nix
@@ -10,12 +10,12 @@
 
 buildPythonPackage rec {
   pname = "plotly";
-  version = "2.0.12";
+  version = "2.0.15";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0050da900e4420c15766f8dfb8d252510896511361bf485b9308bc0287f7add0";
+    sha256 = "0ecd16a11778674c63615a590e22f79307801eaf009b399bf7e46c486dec8f99";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/py/default.nix b/pkgs/development/python-modules/py/default.nix
new file mode 100644
index 000000000000..0dc3b6793281
--- /dev/null
+++ b/pkgs/development/python-modules/py/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, buildPythonPackage, fetchPypi }:
+buildPythonPackage rec {
+  pname = "py";
+  version = "1.4.34";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1qyd5z0hv8ymxy84v5vig3vps2fvhcf4bdlksb3r03h549fmhb8g";
+  };
+
+  # Circular dependency on pytest
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Library with cross-python path, ini-parsing, io, code, log facilities";
+    homepage = http://pylib.readthedocs.org/;
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/pycuda/default.nix b/pkgs/development/python-modules/pycuda/default.nix
index 71bf64b77339..83b294321b8a 100644
--- a/pkgs/development/python-modules/pycuda/default.nix
+++ b/pkgs/development/python-modules/pycuda/default.nix
@@ -22,12 +22,12 @@ let
 in
 buildPythonPackage rec {
   pname = "pycuda";
-  version = "2017.1";
+  version = "2017.1.1";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
-    sha256 = "a92725ccd8515b4d7284b9127184b6fdb61f224daa086e7fc6b926e2094b055f";
+    sha256 = "6b5a9384e38c603ee429f8a6bee424532db7b3505027ce22f7e18ad19564b563";
   };
 
   preConfigure = ''
diff --git a/pkgs/development/python-modules/pygraphviz/default.nix b/pkgs/development/python-modules/pygraphviz/default.nix
index 911779e67fd7..bed258c1673b 100644
--- a/pkgs/development/python-modules/pygraphviz/default.nix
+++ b/pkgs/development/python-modules/pygraphviz/default.nix
@@ -4,11 +4,11 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "pygraphviz";
-  version = "1.4rc1";
+  version = "1.3.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "00ck696rddjnrwfnh1zw87b9xzqfm6sqjy6kqf6kmn1xwsi6f19a";
+    sha256 = "7c294cbc9d88946be671cc0d8602aac176d8c56695c0a7d871eadea75a958408";
   };
 
   buildInputs = [ doctest-ignore-unicode mock nose ];
diff --git a/pkgs/development/python-modules/pylast/default.nix b/pkgs/development/python-modules/pylast/default.nix
index c2c6ee211c90..99bcb9357dc8 100644
--- a/pkgs/development/python-modules/pylast/default.nix
+++ b/pkgs/development/python-modules/pylast/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "pylast";
-  version = "1.8.0";
+  version = "1.9.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "85f8dd96aef0ccba5f80379c3d7bc1fabd72f59aebab040daf40a8b72268f9bd";
+    sha256 = "ae1c4105cbe704d9ac10ba57ac4c26bc576cc33978f1b578101b20c6a2360ca4";
   };
 
   propagatedBuildInputs = [ certifi six ];
diff --git a/pkgs/development/python-modules/pyopencl/default.nix b/pkgs/development/python-modules/pyopencl/default.nix
index ddab1cde1e67..362cef42b783 100644
--- a/pkgs/development/python-modules/pyopencl/default.nix
+++ b/pkgs/development/python-modules/pyopencl/default.nix
@@ -15,7 +15,7 @@
 
 buildPythonPackage rec {
   pname = "pyopencl";
-  version = "2017.1.1";
+  version = "2017.2";
   name = "${pname}-${version}";
 
   buildInputs = [ pytest opencl-headers ocl-icd ];
@@ -24,7 +24,7 @@ buildPythonPackage rec {
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "928c458a463321c6c91e7fa54bf325bf71d7a8aa5ff750ec8fed2472f6aeb323";
+    sha256 = "039b689a58eb98e27a577ac086210deae959f40d657487f3199d2d217c270ff9";
   };
 
   # gcc: error: pygpu_language_opencl.cpp: No such file or directory
diff --git a/pkgs/development/python-modules/pypandoc/default.nix b/pkgs/development/python-modules/pypandoc/default.nix
index cb7b9ed43fe0..4c694319563e 100644
--- a/pkgs/development/python-modules/pypandoc/default.nix
+++ b/pkgs/development/python-modules/pypandoc/default.nix
@@ -3,12 +3,12 @@
 
 buildPythonPackage rec {
   pname = "pypandoc";
-  version = "1.3.3";
+  version = "1.4";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0628f2kn4gqimnhpf251fgzl723hwgyl3idy69dkzyjvi45s5zm6";
+    sha256 = "e914e6d5f84a76764887e4d909b09d63308725f0cbb5293872c2c92f07c11a5b";
   };
 
   # Fix tests: first requires network access, second is a bug (reported upstream)
diff --git a/pkgs/development/python-modules/pyroute2/default.nix b/pkgs/development/python-modules/pyroute2/default.nix
index 2e60f6812e95..8465c205295c 100644
--- a/pkgs/development/python-modules/pyroute2/default.nix
+++ b/pkgs/development/python-modules/pyroute2/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "pyroute2";
-  version = "0.4.18";
+  version = "0.4.19";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/p/pyroute2/${name}.tar.gz";
-    sha256 = "bdcff9f598ff4dda7420675ee387426cd9cc79d795ea73eb684a4314d4b00b9e";
+    sha256 = "122a1e34702287b805742a6edd8fe8483608238bd1602df2d5e3274bd8e8030a";
   };
 
   # requires root priviledges
diff --git a/pkgs/development/python-modules/pyrtlsdr/default.nix b/pkgs/development/python-modules/pyrtlsdr/default.nix
new file mode 100644
index 000000000000..4ce373ee7ad2
--- /dev/null
+++ b/pkgs/development/python-modules/pyrtlsdr/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, rtl-sdr
+}:
+
+buildPythonPackage rec {
+  pname = "pyrtlsdr";
+  version = "0.2.5";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "dd041143b68628c713c2227c78c40b0b4a0cb5d08df116f7bdc5f83c529be0e4";
+  };
+
+  postPatch = ''
+    sed "s|driver_files =.*|driver_files = ['${rtl-sdr}/lib/librtlsdr.so']|" -i rtlsdr/librtlsdr.py
+  '';
+
+  # No tests that can be used.
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Python wrapper for librtlsdr (a driver for Realtek RTL2832U based SDR's)";
+    homepage = https://github.com/roger-/pyrtlsdr;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ bjornfor ];
+ };
+}
diff --git a/pkgs/development/python-modules/pyscard/default.nix b/pkgs/development/python-modules/pyscard/default.nix
index c3d271caa328..bee5d760c0c6 100644
--- a/pkgs/development/python-modules/pyscard/default.nix
+++ b/pkgs/development/python-modules/pyscard/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, buildPythonPackage, swig, pcsclite }:
 
 buildPythonPackage rec {
-  version = "1.9.5";
+  version = "1.9.6";
   pname = "pyscard";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/p/pyscard/${name}.tar.gz";
-    sha256 = "7eef027e1939b7595fc13c03616f262f90d118594fdb6f7620af46b54fa06835";
+    sha256 = "6e28143c623e2b34200d2fa9178dbc80a39b9c068b693b2e6527cdae784c6c12";
   };
 
   patchPhase = ''
diff --git a/pkgs/development/python-modules/pytest-asyncio/default.nix b/pkgs/development/python-modules/pytest-asyncio/default.nix
index 966a207e50cf..605c970cedc4 100644
--- a/pkgs/development/python-modules/pytest-asyncio/default.nix
+++ b/pkgs/development/python-modules/pytest-asyncio/default.nix
@@ -2,13 +2,13 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "pytest-asyncio";
-  version = "0.5.0";
+  version = "0.6.0";
 
   disabled = !isPy3k;
 
   src = fetchurl {
     url = "mirror://pypi/p/${pname}/${name}.tar.gz";
-    sha256 = "03sxq8fglr4lw4y6wqlbli9ypr65fxzx6hlpn5wpccx8v5472iff";
+    sha256 = "e5c6786ece4b3bbb0cca1bf68bf089756a62760e3764dc84eaee39bfab70289b";
   };
 
   buildInputs = [ pytest ];
diff --git a/pkgs/development/python-modules/pytest-django/default.nix b/pkgs/development/python-modules/pytest-django/default.nix
index 0fd485684464..a91bf9d6d0e3 100644
--- a/pkgs/development/python-modules/pytest-django/default.nix
+++ b/pkgs/development/python-modules/pytest-django/default.nix
@@ -19,7 +19,7 @@ buildPythonPackage rec {
     # Unpin setuptools-scm
     (fetchpatch {
       url = "https://github.com/pytest-dev/pytest-django/commit/25cbc3b395dcdeb92bdc9414e296680c2b9d602e.patch";
-      sha256 = "0mz3rcsv44pfzlxy3pv8mx87glmv34gy0d5aknvbzgb2a9niryws";
+      sha256 = "1mx06y4kz2zs41mb2h9bh5p4jc6s6hfsq6fghhsks5b7qak05xjp";
     })
   ];
 
diff --git a/pkgs/development/python-modules/pytest-forked/default.nix b/pkgs/development/python-modules/pytest-forked/default.nix
new file mode 100644
index 000000000000..4d04fa61f232
--- /dev/null
+++ b/pkgs/development/python-modules/pytest-forked/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, setuptools_scm
+, pytest
+}:
+
+buildPythonPackage rec {
+  pname = "pytest-forked";
+  version = "0.2";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "e4500cd0509ec4a26535f7d4112a8cc0f17d3a41c29ffd4eab479d2a55b30805";
+  };
+
+  buildInputs = [ pytest setuptools_scm ];
+
+  # Do not function
+  doCheck = false;
+
+  checkPhase = ''
+    py.test testing
+  '';
+
+  meta = {
+    description = "Run tests in isolated forked subprocesses";
+    homepage = https://github.com/pytest-dev/pytest-forked;
+    license = lib.licenses.mit;
+  };
+
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/pytest-xdist/default.nix b/pkgs/development/python-modules/pytest-xdist/default.nix
index 600c98925af4..dc1a31a89225 100644
--- a/pkgs/development/python-modules/pytest-xdist/default.nix
+++ b/pkgs/development/python-modules/pytest-xdist/default.nix
@@ -1,16 +1,16 @@
-{ stdenv, fetchPypi, buildPythonPackage, isPy3k, execnet, pytest, setuptools_scm }:
+{ stdenv, fetchPypi, buildPythonPackage, isPy3k, execnet, pytest, setuptools_scm, pytest-forked }:
 
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "pytest-xdist";
-  version = "1.18.2";
+  version = "1.20.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "10468377901b80255cf192c4603a94ffe8b1f071f5c912868da5f5cb91170dae";
+    sha256 = "7924d45c2430191fe3679a58116c74ceea13307d7822c169d65fd59a24b3a4fe";
   };
 
-  buildInputs = [ pytest setuptools_scm ];
+  buildInputs = [ pytest setuptools_scm pytest-forked];
   propagatedBuildInputs = [ execnet ];
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/pytest/3_0.nix b/pkgs/development/python-modules/pytest/3_0.nix
new file mode 100644
index 000000000000..487fe1b73c76
--- /dev/null
+++ b/pkgs/development/python-modules/pytest/3_0.nix
@@ -0,0 +1,27 @@
+{ stdenv, buildPythonPackage, fetchPypi, isPy26, argparse, hypothesis, py
+, setuptools_scm
+}:
+buildPythonPackage rec {
+  version = "3.0.7";
+  pname = "pytest";
+  name = "${pname}-${version}";
+
+  preCheck = ''
+    # don't test bash builtins
+    rm testing/test_argcomplete.py
+  '';
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "b70696ebd1a5e6b627e7e3ac1365a4bc60aaf3495e843c1e70448966c5224cab";
+  };
+
+  buildInputs = [ hypothesis setuptools_scm ];
+  propagatedBuildInputs = [ py ]
+    ++ (stdenv.lib.optional isPy26 argparse);
+
+  meta = with stdenv.lib; {
+    maintainers = with maintainers; [ domenkozar lovek323 madjar lsix ];
+    platforms = platforms.unix;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/pytest/default.nix b/pkgs/development/python-modules/pytest/default.nix
index 402c869c98c9..32ad71de7044 100644
--- a/pkgs/development/python-modules/pytest/default.nix
+++ b/pkgs/development/python-modules/pytest/default.nix
@@ -1,6 +1,8 @@
-{ stdenv, buildPythonPackage, fetchurl, isPy26, argparse, hypothesis, py }:
+{ stdenv, buildPythonPackage, fetchPypi, isPy26, argparse, hypothesis, py
+, setuptools_scm
+}:
 buildPythonPackage rec {
-  version = "3.0.7";
+  version = "3.2.1";
   pname = "pytest";
   name = "${pname}-${version}";
 
@@ -9,12 +11,12 @@ buildPythonPackage rec {
     rm testing/test_argcomplete.py
   '';
 
-  src = fetchurl {
-    url = "mirror://pypi/p/pytest/${name}.tar.gz";
-    sha256 = "b70696ebd1a5e6b627e7e3ac1365a4bc60aaf3495e843c1e70448966c5224cab";
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "4c2159d2be2b4e13fa293e7a72bdf2f06848a017150d5c6d35112ce51cfd74ce";
   };
 
-  buildInputs = [ hypothesis ];
+  buildInputs = [ hypothesis setuptools_scm ];
   propagatedBuildInputs = [ py ]
     ++ (stdenv.lib.optional isPy26 argparse);
 
diff --git a/pkgs/development/python-modules/python-editor/default.nix b/pkgs/development/python-modules/python-editor/default.nix
index bd429a67f245..d2941e4c572b 100644
--- a/pkgs/development/python-modules/python-editor/default.nix
+++ b/pkgs/development/python-modules/python-editor/default.nix
@@ -1,17 +1,21 @@
 { stdenv, buildPythonPackage, fetchPypi }:
 
 buildPythonPackage rec {
-  version = "0.4";
+  version = "1.0.3";
   pname = "python-editor";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1gykxn16anmsbcrwhx3rrhwjif95mmwvq9gjcrr9bbzkdc8sf8a4";
+    sha256 = "a3c066acee22a1c94f63938341d4fb374e3fdd69366ed6603d7b24bed1efc565";
   };
 
+  # No proper tests
+  doCheck = false;
+
   meta = with stdenv.lib; {
     description = "A library that provides the `editor` module for programmatically";
     homepage = https://github.com/fmoo/python-editor;
+    license = licenses.asl20;
   };
 }
diff --git a/pkgs/development/python-modules/qtconsole/default.nix b/pkgs/development/python-modules/qtconsole/default.nix
index b09458de5683..16d66a6db217 100644
--- a/pkgs/development/python-modules/qtconsole/default.nix
+++ b/pkgs/development/python-modules/qtconsole/default.nix
@@ -14,12 +14,12 @@
 
 buildPythonPackage rec {
   pname = "qtconsole";
-  version = "4.3.0";
+  version = "4.3.1";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "2821ccf85853b83e4958521f82e36325208787eaf79b19b83905a99cc41aa209";
+    sha256 = "eff8c2faeda567a0bef5781f419a64e9977988db101652b312b9d74ec0a5109c";
   };
 
   buildInputs = [ nose ] ++ lib.optionals isPy27 [mock];
diff --git a/pkgs/development/python-modules/relatorio/default.nix b/pkgs/development/python-modules/relatorio/default.nix
index dc42449a3398..1010766cf2da 100644
--- a/pkgs/development/python-modules/relatorio/default.nix
+++ b/pkgs/development/python-modules/relatorio/default.nix
@@ -1,16 +1,17 @@
-{ lib, fetchurl, buildPythonPackage, genshi, lxml }:
+{ lib, fetchurl, buildPythonPackage, genshi, lxml, python_magic }:
 
 buildPythonPackage rec {
   pname = "relatorio";
   name = "${pname}-${version}";
-  version = "0.6.4";
+  version = "0.7.0";
   src = fetchurl {
     url = "mirror://pypi/r/relatorio/${name}.tar.gz";
-    sha256 = "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z";
+    sha256 = "efd68d96573b15c59c24a8f420ed14210ce51de535a8470d14381f2bed69d845";
   };
   propagatedBuildInputs = [
     genshi
     lxml
+    python_magic
   ];
   meta = {
     homepage = http://relatorio.tryton.org/;
diff --git a/pkgs/development/python-modules/requests-oauthlib.nix b/pkgs/development/python-modules/requests-oauthlib.nix
index 0162d6f6eb5e..1aea747a7840 100644
--- a/pkgs/development/python-modules/requests-oauthlib.nix
+++ b/pkgs/development/python-modules/requests-oauthlib.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPythonPackage, fetchurl
+{ stdenv, buildPythonPackage, fetchPypi
 , oauthlib, requests }:
 
 buildPythonPackage rec {
@@ -6,8 +6,8 @@ buildPythonPackage rec {
   pname = "requests-oauthlib";
   name = "${pname}-${version}";
 
-  src = fetchurl {
-    url = "http://github.com/requests/requests-oauthlib/archive/v${version}.tar.gz";
+  src = fetchPypi {
+    inherit pname version;
     sha256 = "883ac416757eada6d3d07054ec7092ac21c7f35cb1d2cf82faf205637081f468";
   };
 
diff --git a/pkgs/development/python-modules/rfc3986/default.nix b/pkgs/development/python-modules/rfc3986/default.nix
index 6ebcb7416857..e95699360e94 100644
--- a/pkgs/development/python-modules/rfc3986/default.nix
+++ b/pkgs/development/python-modules/rfc3986/default.nix
@@ -3,12 +3,12 @@
 
 buildPythonPackage rec {
   pname = "rfc3986";
-  version = "1.0.0";
+  version = "1.1.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "2faacfabcc13ed89b061b5f21cbbf330f82400654b317b5907d311c3478ec4c4";
+    sha256 = "8458571c4c57e1cf23593ad860bb601b6a604df6217f829c2bc70dc4b5af941b";
   };
 
   buildInputs = [ pytest ];
diff --git a/pkgs/development/python-modules/semver/default.nix b/pkgs/development/python-modules/semver/default.nix
index a34b2d2ccfa9..2d592962558c 100644
--- a/pkgs/development/python-modules/semver/default.nix
+++ b/pkgs/development/python-modules/semver/default.nix
@@ -3,13 +3,16 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "semver";
-  version = "2.2.1";
+  version = "2.7.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "161gvsfpw0l8lnf1v19rvqc8b9f8n70cc8ppya4l0n6rwc1c1n4m";
+    sha256 = "20ffbb50248a6141bb9eba907db0e47ee4a239ddb55fe0ada8696fc241495a9d";
   };
 
+  # No tests in archive
+  doCheck = false;
+
   meta = with stdenv.lib; {
     description = "Python package to work with Semantic Versioning (http://semver.org/)";
     homepage = https://github.com/k-bx/python-semver;
diff --git a/pkgs/development/python-modules/setuptools/default.nix b/pkgs/development/python-modules/setuptools/default.nix
index fa2b810964f9..b6bf629e7467 100644
--- a/pkgs/development/python-modules/setuptools/default.nix
+++ b/pkgs/development/python-modules/setuptools/default.nix
@@ -8,13 +8,13 @@
 # Should use buildPythonPackage here somehow
 stdenv.mkDerivation rec {
   pname = "setuptools";
-  version = "36.0.1";
+  version = "36.2.7";
   name = "${python.libPrefix}-${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
     extension = "zip";
-    sha256 = "e17c4687fddd6d70a6604ac0ad25e33324cec71b5137267dd5c45e103c4b288a";
+    sha256 = "b0fe5d432d922df595e918577c51458d63f245115d141b309ac32ecfca329df5";
   };
 
   buildInputs = [ python wrapPython unzip ];
diff --git a/pkgs/development/python-modules/setuptools_scm/default.nix b/pkgs/development/python-modules/setuptools_scm/default.nix
new file mode 100644
index 000000000000..260f899f56d8
--- /dev/null
+++ b/pkgs/development/python-modules/setuptools_scm/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, buildPythonPackage, fetchPypi, pip }:
+buildPythonPackage rec {
+  pname = "setuptools_scm";
+  name = "${pname}-${version}";
+  version = "1.15.6";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9";
+  };
+
+  buildInputs = [ pip ];
+
+  # Seems to fail due to chroot and would cause circular dependency
+  # with pytest
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = https://bitbucket.org/pypa/setuptools_scm/;
+    description = "Handles managing your python package versions in scm metadata";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jgeerds ];
+  };
+}
diff --git a/pkgs/development/python-modules/simplejson/default.nix b/pkgs/development/python-modules/simplejson/default.nix
index 4deac80fb06d..846e8dc21a16 100644
--- a/pkgs/development/python-modules/simplejson/default.nix
+++ b/pkgs/development/python-modules/simplejson/default.nix
@@ -6,13 +6,13 @@
 
 buildPythonPackage rec {
   pname = "simplejson";
-  version = "3.10.0";
+  version = "3.11.1";
   name = "${pname}-${version}";
   doCheck = !stdenv.isDarwin;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "953be622e88323c6f43fad61ffd05bebe73b9fd9863a46d68b052d2aa7d71ce2";
+    sha256 = "01a22d49ddd9a168b136f26cac87d9a335660ce07aa5c630b8e3607d6f4325e7";
   };
 
   meta = {
diff --git a/pkgs/development/python-modules/sphinx/default.nix b/pkgs/development/python-modules/sphinx/default.nix
index ae08db31b2a8..605ab3b3a602 100644
--- a/pkgs/development/python-modules/sphinx/default.nix
+++ b/pkgs/development/python-modules/sphinx/default.nix
@@ -20,18 +20,21 @@
 , whoosh
 , imagesize
 , requests
+, sphinxcontrib-websupport
 }:
 
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "Sphinx";
-  version = "1.5.2";
+  version = "1.6.3";
   src = fetchPypi {
     inherit pname version;
-    sha256 = "049c48393909e4704a6ed4de76fd39c8622e165414660bfb767e981e7931c722";
+    sha256 = "af8bdb8c714552b77d01d4536e3d6d2879d6cb9d25423d29163d5788e27046e6";
   };
   LC_ALL = "en_US.UTF-8";
-  buildInputs = [ pytest simplejson mock glibcLocales html5lib ] ++ lib.optional (pythonOlder "3.4") enum34;
+
+  checkInputs = [ pytest ];
+  buildInputs = [ simplejson mock glibcLocales html5lib ] ++ lib.optional (pythonOlder "3.4") enum34;
   # Disable two tests that require network access.
   checkPhase = ''
     cd tests; ${python.interpreter} run.py --ignore py35 -k 'not test_defaults and not test_anchors_ignored'
@@ -48,8 +51,12 @@ buildPythonPackage rec {
     whoosh
     imagesize
     requests
+    sphinxcontrib-websupport
   ];
 
+  # Lots of tests. Needs network as well at some point.
+  doCheck = false;
+
   # https://github.com/NixOS/nixpkgs/issues/22501
   # Do not run `python sphinx-build arguments` but `sphinx-build arguments`.
   postPatch = ''
diff --git a/pkgs/development/python-modules/sphinxcontrib-websupport/default.nix b/pkgs/development/python-modules/sphinxcontrib-websupport/default.nix
new file mode 100644
index 000000000000..fa308dc37bb0
--- /dev/null
+++ b/pkgs/development/python-modules/sphinxcontrib-websupport/default.nix
@@ -0,0 +1,26 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, six
+}:
+
+buildPythonPackage rec {
+  pname = "sphinxcontrib-websupport";
+  version = "1.0.1";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "7a85961326aa3a400cd4ad3c816d70ed6f7c740acd7ce5d78cd0a67825072eb9";
+  };
+
+  propagatedBuildInputs = [ six ];
+
+  doCheck = false;
+
+  meta = {
+    description = "Sphinx API for Web Apps";
+    homepage = http://sphinx-doc.org/;
+    license = lib.licenses.bsd2;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/sqlalchemy/default.nix b/pkgs/development/python-modules/sqlalchemy/default.nix
index 36b04692a9e5..27a3c4ac2ae3 100644
--- a/pkgs/development/python-modules/sqlalchemy/default.nix
+++ b/pkgs/development/python-modules/sqlalchemy/default.nix
@@ -1,7 +1,7 @@
 { lib
 , fetchPypi
 , buildPythonPackage
-, pytest
+, pytest_30
 , mock
 , pytest_xdist
 , isPy3k
@@ -11,19 +11,19 @@
 buildPythonPackage rec {
   pname = "SQLAlchemy";
   name = "${pname}-${version}";
-  version = "1.1.12";
+  version = "1.1.13";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "d501527319f51a3d9eb639b654222c6f67287228a98ba102b1d0b598eb3266c9";
+    sha256 = "2a98ac87b30eaa2bee1f1044848b9590e476e7f93d033c6542e60b993a5cf898";
   };
 
-  checkInputs = [ pytest mock pytest_xdist ]
-    ++ lib.optional (!isPy3k) pysqlite;
-
-  # Test-only dependency pysqlite doesn't build on Python 3. This isn't an
-  # acceptable reason to make all dependents unavailable on Python 3 as well
-  #doCheck = !(isPyPy || isPy3k);
+  checkInputs = [
+    pytest_30
+    mock
+#     Disable pytest_xdist tests for now, because our version seems to be too new.
+#     pytest_xdist
+  ] ++ lib.optional (!isPy3k) pysqlite;
 
   checkPhase = ''
     py.test
diff --git a/pkgs/development/python-modules/sqlmap/default.nix b/pkgs/development/python-modules/sqlmap/default.nix
new file mode 100644
index 000000000000..a440abb51498
--- /dev/null
+++ b/pkgs/development/python-modules/sqlmap/default.nix
@@ -0,0 +1,25 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+}:
+
+buildPythonPackage rec {
+  pname = "sqlmap";
+  version = "1.1.8";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "f8f88fc7fe0ba81a7558902f87df31c052e27404caa26a160174747afcaebe49";
+  };
+
+  # No tests in archive
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "http://sqlmap.org";
+    license = licenses.gpl2;
+    description = "Automatic SQL injection and database takeover tool";
+    maintainers = with maintainers; [ bennofs ];
+  };
+}
diff --git a/pkgs/development/python-modules/stevedore/default.nix b/pkgs/development/python-modules/stevedore/default.nix
index 1478de78bba5..0625dd851e5b 100644
--- a/pkgs/development/python-modules/stevedore/default.nix
+++ b/pkgs/development/python-modules/stevedore/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "stevedore";
-  version = "1.21.0";
+  version = "1.25.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "12sg88ax0lv2sxr685rqdaxm9gryjrpj4fvax459zvwy1r4n83ma";
+    sha256 = "c8a373b90487b7a1b52ebaa3ca5059315bf68d9ebe15b2203c2fa675bd7e1e7e";
   };
 
   doCheck = false;
diff --git a/pkgs/development/python-modules/stripe/default.nix b/pkgs/development/python-modules/stripe/default.nix
index fc16d77b4810..8755a1d4b635 100644
--- a/pkgs/development/python-modules/stripe/default.nix
+++ b/pkgs/development/python-modules/stripe/default.nix
@@ -3,7 +3,7 @@
 
 buildPythonPackage rec {
   pname = "stripe";
-  version = "1.41.1";
+  version = "1.62.1";
   name = "${pname}-${version}";
 
   # Tests require network connectivity and there's no easy way to disable
@@ -12,7 +12,7 @@ buildPythonPackage rec {
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0zvffvq933ia5w5ll6xhx2zgvppgc6zc2mxhc6f0kypw5g2fxvz5";
+    sha256 = "7cc83b8d405a48d8a792640761519c64e373ad3514ea8bb4a9a5128f98b0b679";
   };
 
   buildInputs = [ unittest2 mock ];
diff --git a/pkgs/development/python-modules/tqdm/default.nix b/pkgs/development/python-modules/tqdm/default.nix
index 6a0dd6a36552..bc6d7c2fba98 100644
--- a/pkgs/development/python-modules/tqdm/default.nix
+++ b/pkgs/development/python-modules/tqdm/default.nix
@@ -11,12 +11,12 @@
 
 buildPythonPackage rec {
   pname = "tqdm";
-  version = "4.11.2";
+  version = "4.15.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "14baa7a9ea7723d46f60de5f8c6f20e840baa7e3e193bf0d9ec5fe9103a15254";
+    sha256 = "6ec1dc74efacf2cda936b4a6cf4082ce224c76763bdec9f17e437c8cfcaa9953";
   };
 
   buildInputs = [ nose coverage glibcLocales flake8 ];
diff --git a/pkgs/development/python-modules/treq/default.nix b/pkgs/development/python-modules/treq/default.nix
index 7bb028b233d9..5ee984941d07 100644
--- a/pkgs/development/python-modules/treq/default.nix
+++ b/pkgs/development/python-modules/treq/default.nix
@@ -4,11 +4,11 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "treq";
-  version = "17.3.1";
+  version = "17.8.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1xhcpvsl3xqw0dq9sixk80iwyiv17djigp3815sy5pfgvvggcfii";
+    sha256 = "ef72d2d5e0b24bdf29267b608fa33df0ac401743af8524438b073e1fb2b66f16";
   };
 
   propagatedBuildInputs = [ twisted requests six incremental service-identity ];
diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix
index 6898863e8afc..66a6022802fb 100644
--- a/pkgs/development/python-modules/twisted/default.nix
+++ b/pkgs/development/python-modules/twisted/default.nix
@@ -1,17 +1,17 @@
 { stdenv, buildPythonPackage, fetchurl, python,
-  zope_interface, incremental, automat, constantly
+  zope_interface, incremental, automat, constantly, hyperlink
 }:
 buildPythonPackage rec {
   pname = "Twisted";
   name = "${pname}-${version}";
-  version = "17.1.0";
+  version = "17.5.0";
 
   src = fetchurl {
     url = "mirror://pypi/T/Twisted/${name}.tar.bz2";
-    sha256 = "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv";
+    sha256 = "1sh2h23nnizcdyrl2rn7zxijglikxwz7z7grqpvq496zy2aa967i";
   };
 
-  propagatedBuildInputs = [ zope_interface incremental automat constantly ];
+  propagatedBuildInputs = [ zope_interface incremental automat constantly hyperlink ];
 
   # Patch t.p._inotify to point to libc. Without this,
   # twisted.python.runtime.platform.supportsINotify() == False
diff --git a/pkgs/development/python-modules/txaio/default.nix b/pkgs/development/python-modules/txaio/default.nix
index 98060536638e..27ce7a99fa77 100644
--- a/pkgs/development/python-modules/txaio/default.nix
+++ b/pkgs/development/python-modules/txaio/default.nix
@@ -3,11 +3,11 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "txaio";
-  version = "2.7.1";
+  version = "2.8.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1lmllmjjsqzl3w4faq2qhlgkaqn1yn1m7d99k822ib7qgz18bsly";
+    sha256 = "fe2e0e4d3a06705f86bbd351fdd1f39dae61755e44162375e024acbf32eafddb";
   };
 
   buildInputs = [ pytest mock ];
diff --git a/pkgs/development/python-modules/vega/default.nix b/pkgs/development/python-modules/vega/default.nix
index efdce1e6dba3..beed65449148 100644
--- a/pkgs/development/python-modules/vega/default.nix
+++ b/pkgs/development/python-modules/vega/default.nix
@@ -3,12 +3,12 @@
 
 buildPythonPackage rec {
   pname = "vega";
-  version = "0.4.4";
+  version = "0.5.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "08k92afnk0bivm07h1l5nh26xl2rfp7qn03aq17q1hr3fs5r6cdm";
+    sha256 = "9871bce3a00bb775d9f7f8212aa237f99f11ca7cfe6ecf246773f5559f20c38c";
   };
 
   buildInputs = [ pytest ];
diff --git a/pkgs/development/python-modules/virtualenv/default.nix b/pkgs/development/python-modules/virtualenv/default.nix
index f6d3a747ee48..df0c83605f75 100644
--- a/pkgs/development/python-modules/virtualenv/default.nix
+++ b/pkgs/development/python-modules/virtualenv/default.nix
@@ -6,12 +6,12 @@
 
 buildPythonPackage rec {
   pname = "virtualenv";
-  version = "15.0.3";
+  version = "15.1.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "6d9c760d3fc5fa0894b0f99b9de82a4647e1164f0b700a7f99055034bf548b1d";
+    sha256 = "02f8102c2436bb03b3ee6dede1919d1dac8a427541652e5ec95171ec8adbc93a";
   };
 
   # Doubt this is needed - FRidh 2017-07-07
diff --git a/pkgs/development/python-modules/websockets/default.nix b/pkgs/development/python-modules/websockets/default.nix
index 7e29b2b61902..488036552583 100644
--- a/pkgs/development/python-modules/websockets/default.nix
+++ b/pkgs/development/python-modules/websockets/default.nix
@@ -6,13 +6,13 @@
 
 let
   pname = "websockets";
-  version = "3.3";
+  version = "3.4";
 in buildPythonPackage rec {
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
-    sha256 = "305ab7fdd86afd08c2723461c949e153f7b01233f95a108619a15e41b7a74c93";
+    sha256 = "43e5b9f51dd0000a4c6f646e2ade0c886bd14a784ffac08b9e079bd17a63bcc5";
   };
 
   disabled = pythonOlder "3.3";
diff --git a/pkgs/development/python-modules/widgetsnbextension/default.nix b/pkgs/development/python-modules/widgetsnbextension/default.nix
index dda58c65f60c..80c5abeb47c1 100644
--- a/pkgs/development/python-modules/widgetsnbextension/default.nix
+++ b/pkgs/development/python-modules/widgetsnbextension/default.nix
@@ -8,11 +8,11 @@
 buildPythonPackage rec {
   pname = "widgetsnbextension";
   name = "${pname}-${version}";
-  version = "2.0.0";
+  version = "3.0.2";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "566582a84642d0c0f78b756a954450a38a8743eeb8dad04b7cab3ca66f455e6f";
+    sha256 = "e8890d87c80782ee4ea3ed9afffc89a0af8b4ff475d1608d900f728ea55f041c";
   };
 
   propagatedBuildInputs = [ notebook ];
diff --git a/pkgs/development/python-modules/xlwt/default.nix b/pkgs/development/python-modules/xlwt/default.nix
index f25646fffdbb..82364ee1d1c4 100644
--- a/pkgs/development/python-modules/xlwt/default.nix
+++ b/pkgs/development/python-modules/xlwt/default.nix
@@ -8,11 +8,11 @@
 buildPythonPackage rec {
   pname = "xlwt";
   name = "${pname}-${version}";
-  version = "1.2.0";
+  version = "1.3.0";
 
   src = fetchurl {
     url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
-    sha256 = "505669c1eb6a60823fd3e2e723b60eea95f2c56254113bf163091ed2bedb4ac9";
+    sha256 = "c59912717a9b28f1a3c2a98fd60741014b06b043936dcecbc113eaaada156c88";
   };
 
   buildInputs = [ nose ];
diff --git a/pkgs/development/python-modules/yamllint/default.nix b/pkgs/development/python-modules/yamllint/default.nix
index 1d4672312a20..2f0b12618e5d 100644
--- a/pkgs/development/python-modules/yamllint/default.nix
+++ b/pkgs/development/python-modules/yamllint/default.nix
@@ -3,12 +3,12 @@
 
 buildPythonPackage rec {
   pname = "yamllint";
-  version = "0.5.2";
+  version = "1.8.1";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0brdy1crhfng10hlw0420bv10c2xnjk8ndnhssybkzym47yrzg84";
+    sha256 = "048743567ca9511e19222233ebb53795586a2cede07b79e801577e0a9b4f173c";
   };
 
   buildInputs = [ nose ];
diff --git a/pkgs/development/python-modules/yapf/default.nix b/pkgs/development/python-modules/yapf/default.nix
index 86ef792a437c..4bdfbccadf14 100644
--- a/pkgs/development/python-modules/yapf/default.nix
+++ b/pkgs/development/python-modules/yapf/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "yapf";
-  version = "0.16.3";
+  version = "0.17.0";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1qxq41y65saljw0jk5fzinvynr9fhwzqcjsxxs8bn78in073x7a2";
+    sha256 = "5472f4c95ab9b9fe9f5bf74ece3c986bfafa1f98ad9e1e296d4c35d291c97856";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/python-modules/yarl/default.nix b/pkgs/development/python-modules/yarl/default.nix
index 0455efc31276..046b749ffa72 100644
--- a/pkgs/development/python-modules/yarl/default.nix
+++ b/pkgs/development/python-modules/yarl/default.nix
@@ -8,12 +8,12 @@
 
 let
   pname = "yarl";
-  version = "0.10.3";
+  version = "0.12.0";
 in buildPythonPackage rec {
   name = "${pname}-${version}";
   src = fetchurl {
     url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
-    sha256 = "27b24ba3ef3cb8475aea1a655a1750bb11918ba139278af21db5846ee9643138";
+    sha256 = "fc0f71ffdce882b4d4b287b0b3a68d9f2557ab14cc2c10ce4df714c42512cbde";
   };
 
   buildInputs = [ pytest pytestrunner ];
diff --git a/pkgs/development/python-modules/zeep/default.nix b/pkgs/development/python-modules/zeep/default.nix
index 8d6670aa8507..0f19e7f4e5d8 100644
--- a/pkgs/development/python-modules/zeep/default.nix
+++ b/pkgs/development/python-modules/zeep/default.nix
@@ -24,13 +24,13 @@
 
 let
   pname = "zeep";
-  version = "2.0.0";
+  version = "2.3.0";
 in buildPythonPackage {
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "5b9bd6b8772d6b505118c11d6924eb7df0decf12bbbeb43b1c27d781817361ad";
+    sha256 = "b01d81c61d7b7858b7be001615d3c995a371815f5e6902c914fea9beba30b716";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/tools/mypy/default.nix b/pkgs/development/tools/mypy/default.nix
index a68b29dee248..9f5685043171 100644
--- a/pkgs/development/tools/mypy/default.nix
+++ b/pkgs/development/tools/mypy/default.nix
@@ -3,14 +3,14 @@
 buildPythonApplication rec {
   name = "${pname}-${version}";
   pname = "mypy";
-  version = "0.511";
+  version = "0.521";
 
   # Tests not included in pip package.
   doCheck = false;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1vmfyi6zh49mi7rmns5hjgpqshq7islxwsgp80j1izf82r8xgx1z";
+    sha256 = "9d30df20cd937b80cfc6007d75426f27a232789cfa288c63bf9370f2542c9658";
   };
 
   propagatedBuildInputs = [ lxml typed-ast ];
diff --git a/pkgs/misc/vscode-extensions/default.nix b/pkgs/misc/vscode-extensions/default.nix
index 12900907c00c..d357c43abd85 100644
--- a/pkgs/misc/vscode-extensions/default.nix
+++ b/pkgs/misc/vscode-extensions/default.nix
@@ -3,16 +3,23 @@
 let
   inherit (vscode-utils) buildVscodeExtension buildVscodeMarketplaceExtension;
 in
-
+#
+# Unless there is a good reason not to, we attemp to use the same name as the 
+# extension's unique identifier (the name the extension gets when installed
+# from vscode under `~/.vscode`) and found on the marketplace extension page.
+# So an extension's attribute name should be of the form: 
+# "${mktplcRef.publisher}.${mktplcRef.name}".
+#
 rec {
-  nix = buildVscodeMarketplaceExtension {
+  bbenoist.Nix = buildVscodeMarketplaceExtension {
     mktplcRef = {
-        name = "nix";
+        name = "Nix";
         publisher = "bbenoist";
         version = "1.0.1";
         sha256 = "0zd0n9f5z1f0ckzfjr38xw2zzmcxg1gjrava7yahg5cvdcw6l35b";
     };
-
-    # TODO: Fill meta with appropriate information.
+    meta = with stdenv.lib; {
+      license = licenses.mit;
+    };
   };
 }
\ No newline at end of file
diff --git a/pkgs/misc/vscode-extensions/vscode-utils.nix b/pkgs/misc/vscode-extensions/vscode-utils.nix
index 759449a745b0..f6e906ab575b 100644
--- a/pkgs/misc/vscode-extensions/vscode-utils.nix
+++ b/pkgs/misc/vscode-extensions/vscode-utils.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, runCommand, vscode, which }:
+{ stdenv, lib, fetchurl, runCommand, vscode, unzip }:
 
 let
   extendedPkgVersion = lib.getVersion vscode;
@@ -7,13 +7,18 @@ let
   mktplcExtRefToFetchArgs = ext: {
     url = "https://${ext.publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${ext.publisher}/extension/${ext.name}/${ext.version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage";
     sha256 = ext.sha256;
-    name = "${ext.name}.vsix";
+    # The `*.vsix` file is in the end a simple zip file. Change the extension
+    # so that existing `unzip` hooks takes care of the unpacking.
+    name = "${ext.publisher}-${ext.name}.zip";
   };
 
   buildVscodeExtension = a@{
     name,
     namePrefix ? "${extendedPkgName}-extension-",
     src,
+    # Same as "Unique Identifier" on the extension's web page.
+    # For the moment, only serve as unique extension dir.
+    vscodeExtUniqueId,
     configurePhase ? ":",
     buildPhase ? ":",
     dontPatchELF ? true,
@@ -21,35 +26,18 @@ let
     buildInputs ? [],
     ...
   }:
-  stdenv.mkDerivation (a // {
+  stdenv.mkDerivation ((removeAttrs a [ "vscodeExtUniqueId" ]) //  {
 
     name = namePrefix + name;
 
+    inherit vscodeExtUniqueId;
     inherit configurePhase buildPhase dontPatchELF dontStrip;
 
-    # TODO: `which` is an encapsulation leak. It should have been hardwired
-    #       as part of the `code` wrapper. 
-    buildInputs = [ vscode which ] ++ buildInputs;
-
-    unpackPhase = ''
-      # TODO: Unfortunately, 'code' systematically creates its '.vscode' directory
-      # even tough it has nothing to write in it. We need to redirect this
-      # to a writeable location as the nix environment already has (but
-      # to a non writeable one) otherwise the write will fail.
-      # It would be preferrable if we could intercept / fix this at the source.
-      HOME="$PWD/code_null_home" code \
-        --extensions-dir "$PWD" \
-        --install-extension "${toString src}"
-
-      rm -Rf "$PWD/code_null_home"
-      cd "$(find . -mindepth 1 -type d -print -quit)"
-      ls -la
-    '';
-
+    buildInputs = [ unzip ] ++ buildInputs;
 
     installPhase = ''
-      mkdir -p "$out/share/${extendedPkgName}/extensions/${name}"
-      find . -mindepth 1 -maxdepth 1 | xargs mv -t "$out/share/${extendedPkgName}/extensions/${name}/"
+      mkdir -p "$out/share/${extendedPkgName}/extensions/${vscodeExtUniqueId}"
+      find . -mindepth 1 -maxdepth 1 | xargs mv -t "$out/share/${extendedPkgName}/extensions/${vscodeExtUniqueId}/"
     '';
 
   });
@@ -65,8 +53,9 @@ let
     ...
   }: assert "" == name; assert null == src;
   buildVscodeExtension ((removeAttrs a [ "mktplcRef" ]) // {
-    name = "${mktplcRef.name}-${mktplcRef.version}";
+    name = "${mktplcRef.publisher}-${mktplcRef.name}-${mktplcRef.version}";
     src = fetchVsixFromVscodeMarketplace mktplcRef;
+    vscodeExtUniqueId = "${mktplcRef.publisher}.${mktplcRef.name}";
   });
 
   mktplcRefAttrList = [
diff --git a/pkgs/servers/dgraph/default.nix b/pkgs/servers/dgraph/default.nix
new file mode 100644
index 000000000000..1712476b923b
--- /dev/null
+++ b/pkgs/servers/dgraph/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "dgraph-${version}";
+  version = "0.8.1";
+
+  goPackagePath = "github.com/dgraph-io/dgraph";
+
+  src = fetchFromGitHub {
+    owner = "dgraph-io";
+    repo = "dgraph";
+    rev = "v${version}";
+    sha256 = "1gls2pvgcmd364x84gz5fafs7pwkll4k352rg1lmv70wvzyydsdr";
+  };
+
+  extraOutputsToInstall = [ "dashboard" ];
+
+  goDeps = ./deps.nix;
+  subPackages = [ "cmd/dgraph" "cmd/dgraphloader" ];
+
+  # let's move the dashboard to a different output, to prevent $bin from
+  # depending on $out
+  # TODO: provide a proper npm application for the dashboard.
+  postPatch = ''
+    mv dashboard/* $dashboard
+  '';
+
+  preBuild = ''
+    export buildFlagsArray="-ldflags=\
+      -X github.com/dgraph-io/dgraph/x.dgraphVersion=${version} \
+      -X github.com/dgraph-io/dgraph/cmd/dgraph/main.uiDir=$dashboard/src/assets/"
+  '';
+
+  preFixup = stdenv.lib.optionalString stdenv.isDarwin ''
+    # Somehow on Darwin, $out/lib (which doesn't exist) ends up in RPATH.
+    # Removing it fixes cycle between $out and $bin
+    install_name_tool -delete_rpath $out/lib $bin/bin/dgraph
+    install_name_tool -delete_rpath $out/lib $bin/bin/dgraphloader
+  '';
+ 
+  meta = {
+    homepage = "https://dgraph.io/";
+    description = "Fast, Distributed Graph DB";
+    maintainers = with stdenv.lib.maintainers; [ sigma ];
+    license = stdenv.lib.licenses.agpl3;
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/pkgs/servers/dgraph/deps.nix b/pkgs/servers/dgraph/deps.nix
new file mode 100644
index 000000000000..2e03c75489b2
--- /dev/null
+++ b/pkgs/servers/dgraph/deps.nix
@@ -0,0 +1,326 @@
+[
+  {
+    goPackagePath = "github.com/AndreasBriese/bbloom";
+    fetch = {
+      type = "git";
+      url = "https://github.com/AndreasBriese/bbloom";
+      rev = "28f7e881ca57bc00e028f9ede9f0d9104cfeef5e";
+      sha256 = "03cqhqvdz8c9by5w5ls4kwnnwlm6b2kkslc6m120fanw1lgamfzp";
+    };
+  }
+  {
+    goPackagePath = "github.com/MakeNowJust/heredoc";
+    fetch = {
+      type = "git";
+      url = "https://github.com/MakeNowJust/heredoc";
+      rev = "1d91351acdc1cb2f2c995864674b754134b86ca7";
+      sha256 = "0ia1r8ibqmx6zv3wmsvgkpqlhwk79z9l38nzp4gd4f1kcb46856x";
+    };
+  }
+  {
+    goPackagePath = "github.com/beorn7/perks";
+    fetch = {
+      type = "git";
+      url = "https://github.com/beorn7/perks";
+      rev = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9";
+      sha256 = "1hrybsql68xw57brzj805xx2mghydpdiysv3gbhr7f5wlxj2514y";
+    };
+  }
+  {
+    goPackagePath = "github.com/bkaradzic/go-lz4";
+    fetch = {
+      type = "git";
+      url = "https://github.com/bkaradzic/go-lz4";
+      rev = "7224d8d8f27ef618c0a95f1ae69dbb0488abc33a";
+      sha256 = "10lmya17vdqg2pvqni0p73iahni48s1v11ya9a0hcz4jh5vw4dkb";
+    };
+  }
+  {
+    goPackagePath = "github.com/blevesearch/bleve";
+    fetch = {
+      type = "git";
+      url = "https://github.com/blevesearch/bleve";
+      rev = "a7ebb8480579777c6cd1c4750d2e6b5ff2b49bdd";
+      sha256 = "121jhd158slf4050kmghz25jrvv7gbsan31wr0nxyw9z32lyf6yx";
+    };
+  }
+  {
+    goPackagePath = "github.com/blevesearch/blevex";
+    fetch = {
+      type = "git";
+      url = "https://github.com/blevesearch/blevex";
+      rev = "507dcd576550f9f3260f11495ba2de4e96773a3e";
+      sha256 = "0i9azysvia99fjpx525qnc5rcgv45hfvl3zcs58gvgqyxpzpc78z";
+    };
+  }
+  {
+    goPackagePath = "github.com/blevesearch/go-porterstemmer";
+    fetch = {
+      type = "git";
+      url = "https://github.com/blevesearch/go-porterstemmer";
+      rev = "23a2c8e5cf1f380f27722c6d2ae8896431dc7d0e";
+      sha256 = "0rcfbrad79xd114h3dhy5d3zs3b5bcgqwm3h5ih1lk69zr9wi91d";
+    };
+  }
+  {
+    goPackagePath = "github.com/blevesearch/segment";
+    fetch = {
+      type = "git";
+      url = "https://github.com/blevesearch/segment";
+      rev = "762005e7a34fd909a84586299f1dd457371d36ee";
+      sha256 = "1nrm145sm0xlhqy3d12yipnb16ikjz9ykjcskmkgm7vjm47xkmfl";
+    };
+  }
+  {
+    goPackagePath = "github.com/cockroachdb/cmux";
+    fetch = {
+      type = "git";
+      url = "https://github.com/cockroachdb/cmux";
+      rev = "30d10be492927e2dcae0089c374c455d42414fcb";
+      sha256 = "0ixif6hwcm2dpi1si5ah49dmdyy5chillz1048jpvjzwzxyfv1nx";
+    };
+  }
+  {
+    goPackagePath = "github.com/codahale/hdrhistogram";
+    fetch = {
+      type = "git";
+      url = "https://github.com/codahale/hdrhistogram";
+      rev = "3a0bb77429bd3a61596f5e8a3172445844342120";
+      sha256 = "1zampgfjbxy192cbwdi7g86l1idxaam96d834wncnpfdwgh5kl57";
+    };
+  }
+  {
+    goPackagePath = "github.com/coreos/etcd";
+    fetch = {
+      type = "git";
+      url = "https://github.com/coreos/etcd";
+      rev = "1ebeef5cbfe69c0dab2bc701ee5307eed7a7d8d2";
+      sha256 = "12lidn1a8nwsk6nlwyfirrxkxhs4lhj53f4cd19xm8w070q0mg19";
+    };
+  }
+  {
+    goPackagePath = "github.com/davecgh/go-spew";
+    fetch = {
+      type = "git";
+      url = "https://github.com/davecgh/go-spew";
+      rev = "6d212800a42e8ab5c146b8ace3490ee17e5225f9";
+      sha256 = "01i0n1s4j7khb7n6mz2wymniz37q0vbzkgfv7rbi6p9hpg227q93";
+    };
+  }
+  {
+    goPackagePath = "github.com/dgraph-io/badger";
+    fetch = {
+      type = "git";
+      url = "https://github.com/dgraph-io/badger";
+      rev = "ad23a425b3c87b8223780cb882bed568ca14b9f0";
+      sha256 = "1xjd05vska1kanmgdhp5cvkn2i6236rqphrc9i4kfjndgwkmas57";
+    };
+  }
+  {
+    goPackagePath = "github.com/dgryski/go-farm";
+    fetch = {
+      type = "git";
+      url = "https://github.com/dgryski/go-farm";
+      rev = "d1e51a4af19092715f4ce7d8257fe5bc8f8be727";
+      sha256 = "00iijjzdg8g6jbzhdbfw8s2rf0k25gxw4x7h7r6mkxcq18n69182";
+    };
+  }
+  {
+    goPackagePath = "github.com/gogo/protobuf";
+    fetch = {
+      type = "git";
+      url = "https://github.com/gogo/protobuf";
+      rev = "e57a569e1882958f6b188cb42231d6db87701f2a";
+      sha256 = "0r3jpmp6wp4xyrh1ikr8iqld3rg4r1yhv99zxw5zd7d2zprw9yfc";
+    };
+  }
+  {
+    goPackagePath = "github.com/golang/geo";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/geo";
+      rev = "3a42ea109208469f16baf9e090135dd0e82ece5c";
+      sha256 = "1fzlakjj94gv516q7gd9qycn91lij7wmjbdv0vsrh6qnxvgqr8hw";
+    };
+  }
+  {
+    goPackagePath = "github.com/golang/protobuf";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/protobuf";
+      rev = "2bba0603135d7d7f5cb73b2125beeda19c09f4ef";
+      sha256 = "1xy0bj66qks2xlzxzlfma16w7m8g6rrwawmlhlv68bcw2k5hvvib";
+    };
+  }
+  {
+    goPackagePath = "github.com/google/codesearch";
+    fetch = {
+      type = "git";
+      url = "https://github.com/google/codesearch";
+      rev = "a45d81b686e85d01f2838439deaf72126ccd5a96";
+      sha256 = "12bv3yz0l3bmsxbasfgv7scm9j719ch6pmlspv4bd4ix7wjpyhny";
+    };
+  }
+  {
+    goPackagePath = "github.com/matttproud/golang_protobuf_extensions";
+    fetch = {
+      type = "git";
+      url = "https://github.com/matttproud/golang_protobuf_extensions";
+      rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c";
+      sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya";
+    };
+  }
+  {
+    goPackagePath = "github.com/pkg/errors";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pkg/errors";
+      rev = "17b591df37844cde689f4d5813e5cea0927d8dd2";
+      sha256 = "1f400f1682h1wdjknlh1ad95rbss09g0ia36a8w102bf2f1qfq8l";
+    };
+  }
+  {
+    goPackagePath = "github.com/pkg/profile";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pkg/profile";
+      rev = "5b67d428864e92711fcbd2f8629456121a56d91f";
+      sha256 = "0blqmvgqvdbqmh3fp9pfdxc9w1qfshrr0zy9whj0sn372bw64qnr";
+    };
+  }
+  {
+    goPackagePath = "github.com/pmezard/go-difflib";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pmezard/go-difflib";
+      rev = "792786c7400a136282c1664665ae0a8db921c6c2";
+      sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/client_golang";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/client_golang";
+      rev = "310ce84375bb84c5cbbf0d05069c92daa5673740";
+      sha256 = "11awb5bjkwqj7va3v7fgniwqkjqhmhjkp01rdvnv4xfp1laxwn7v";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/client_model";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/client_model";
+      rev = "6f3806018612930941127f2a7c6c453ba2c527d2";
+      sha256 = "1413ibprinxhni51p0755dp57r9wvbw7xgj9nmdaxmhzlqhc86j4";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/common";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/common";
+      rev = "0866df4b85a18d652b6965be022d007cdf076822";
+      sha256 = "0zw4rxs6zh9vgxz5wwhjnwa6mgac8jh7mb63viircgh08r889chp";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/procfs";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/procfs";
+      rev = "e645f4e5aaa8506fc71d6edbc5c4ff02c04c46f2";
+      sha256 = "18hwygbawbqilz7h8fl25xpbciwalkslb4igqn4cr9d8sqp7d3np";
+    };
+  }
+  {
+    goPackagePath = "github.com/stretchr/testify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/stretchr/testify";
+      rev = "976c720a22c8eb4eb6a0b4348ad85ad12491a506";
+      sha256 = "0a2gxvqzacrj9k8h022zhr8fchhn9afc6a511m07j71dzw9g4y3m";
+    };
+  }
+  {
+    goPackagePath = "github.com/tebeka/snowball";
+    fetch = {
+      type = "git";
+      url = "https://github.com/tebeka/snowball";
+      rev = "6b06bd306c4e4442a63e546752278920ae487934";
+      sha256 = "110akijkb55k5h7m6mra8fircvi4sxd5xq7lcjgyiqj96srq8v2k";
+    };
+  }
+  {
+    goPackagePath = "github.com/twpayne/go-geom";
+    fetch = {
+      type = "git";
+      url = "https://github.com/twpayne/go-geom";
+      rev = "6753ad11e46b04e21b3f286b342e73a8c4be8216";
+      sha256 = "0qyrdnp7j7lmj0qb0p7k45m757zvbwn78s1apiy46zfnb5415df1";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/crypto";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/crypto";
+      rev = "22ddb68eccda408bbf17759ac18d3120ce0d4f3f";
+      sha256 = "07ks6qal02iz24vv54qyb90wmsg9vwqc14abf68rakprpy26qwsg";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/net";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/net";
+      rev = "d1e1b351919c6738fdeb9893d5c998b161464f0c";
+      sha256 = "0qzbfah03z992zyygfp7imjjas5np2gcar5aanx5y3av5g68ggjp";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev = "abf9c25f54453410d0c6668e519582a9e1115027";
+      sha256 = "0dmpqjfif2zg6776d366js60k21g81jvsr3jm9dc7fv7w3282al4";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/text";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/text";
+      rev = "836efe42bb4aa16aaa17b9c155d8813d336ed720";
+      sha256 = "11s7bjk0karl1lx8v4n6dvdnsh702x4f2qlmnqac2qdz8hdswmi1";
+    };
+  }
+  {
+    goPackagePath = "google.golang.org/genproto";
+    fetch = {
+      type = "git";
+      url = "https://github.com/google/go-genproto";
+      rev = "b0a3dcfcd1a9bd48e63634bd8802960804cf8315";
+      sha256 = "0lkj73lyr4dzj2pxgmild0i1bl6kdgrxa3c8m44j5ms537pyxcpr";
+    };
+  }
+  {
+    goPackagePath = "google.golang.org/grpc";
+    fetch = {
+      type = "git";
+      url = "https://github.com/grpc/grpc-go";
+      rev = "2bb318258959db281674bc6fd67b5167b7ff0d65";
+      sha256 = "1g8ir87ksr8549801vdgb0n6rmxws05ky50bkgjv86370h146cqm";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/yaml.v2";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/yaml.v2";
+      rev = "a5b47d31c556af34a302ce5d659e6fea44d90de0";
+      sha256 = "0v6l48fshdjrqzyq1kwn22gy7vy434xdr1i0lm3prsf6jbln9fam";
+    };
+  }
+]
diff --git a/pkgs/tools/inputmethods/zinnia/default.nix b/pkgs/tools/inputmethods/zinnia/default.nix
index 62e9f6798b1f..18e6176b706d 100644
--- a/pkgs/tools/inputmethods/zinnia/default.nix
+++ b/pkgs/tools/inputmethods/zinnia/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "zinnia-${version}";
-  version = "2015-03-15";
+  version = "2016-08-28";
 
   src = fetchFromGitHub {
     owner = "taku910";
     repo = "zinnia";
-    rev = "d8de1180d5175d7579e6c41b000f1ab4dd9cd697";
-    sha256 = "ac09a16c04c5ef9b46626984e627250dc717d85711d14f1bbfa7f1ca0ca713dc";
+    rev = "fd74d8c8680bb3df8692279151ea6339ab68e32b";
+    sha256 = "1izjy5qw6swg0rs2ym2i72zndb90mwrfbd1iv8xbpwckbm4899lg";
   };
 
   setSourceRoot = "export sourceRoot=$(echo zinnia-*/zinnia/)";
diff --git a/pkgs/tools/misc/bepasty/default.nix b/pkgs/tools/misc/bepasty/default.nix
new file mode 100644
index 000000000000..67faf925a278
--- /dev/null
+++ b/pkgs/tools/misc/bepasty/default.nix
@@ -0,0 +1,34 @@
+{ python
+, lib
+}:
+
+with python.pkgs;
+
+buildPythonApplication rec {
+  pname = "bepasty";
+  version = "0.4.0";
+  name = "${pname}-${version}";
+
+  propagatedBuildInputs = [
+    flask
+    pygments
+    xstatic
+    xstatic-bootbox
+    xstatic-bootstrap
+    xstatic-jquery
+    xstatic-jquery-file-upload
+    xstatic-jquery-ui
+    xstatic-pygments
+  ];
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0bs79pgrjlnkmjfyj2hllbx3rw757va5w2g2aghi9cydmsl7gyi4";
+  };
+
+  meta = {
+    homepage = http://github.com/bepasty/bepasty-server;
+    description = "Binary pastebin server";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.makefu ];
+  };
+}
\ No newline at end of file
diff --git a/pkgs/tools/networking/mitmproxy/default.nix b/pkgs/tools/networking/mitmproxy/default.nix
index 7d36b6b4ac77..70a9366c07cd 100644
--- a/pkgs/tools/networking/mitmproxy/default.nix
+++ b/pkgs/tools/networking/mitmproxy/default.nix
@@ -1,6 +1,20 @@
-{ stdenv, fetchpatch, fetchFromGitHub, python3Packages }:
+{ stdenv, fetchpatch, fetchFromGitHub, python3 }:
 
-python3Packages.buildPythonPackage rec {
+let
+  # mitmproxy needs an older tornado version
+  python = python3.override {
+    packageOverrides = self: super: {
+      tornado = super.tornado.overridePythonAttrs (oldAttrs: rec {
+        version = "4.4.3";
+        name = "${oldAttrs.pname}-${version}";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "f267acc96d5cf3df0fd8a7bfb5a91c2eb4ec81d5962d1a7386ceb34c655634a8";
+        };
+      });
+    };
+  };
+in python.pkgs.buildPythonPackage rec {
   baseName = "mitmproxy";
   name = "${baseName}-${version}";
   version = "2.0.2";
@@ -21,7 +35,7 @@ python3Packages.buildPythonPackage rec {
     })
   ];
 
-  propagatedBuildInputs = with python3Packages; [
+  propagatedBuildInputs = with python.pkgs; [
     blinker click certifi construct cryptography
     cssutils editorconfig h2 html2text hyperframe
     jsbeautifier kaitaistruct passlib pyasn1 pyopenssl
diff --git a/pkgs/tools/security/metasploit/Gemfile b/pkgs/tools/security/metasploit/Gemfile
index de44760bde74..99d7556db2db 100644
--- a/pkgs/tools/security/metasploit/Gemfile
+++ b/pkgs/tools/security/metasploit/Gemfile
@@ -1,4 +1,4 @@
 # frozen_string_literal: true
 source "https://rubygems.org"
 
-gem "metasploit-framework", git: "https://github.com/rapid7/metasploit-framework", ref: "refs/tags/4.14.25"
+gem "metasploit-framework", git: "https://github.com/rapid7/metasploit-framework", ref: "refs/tags/4.16.1"
diff --git a/pkgs/tools/security/metasploit/Gemfile.lock b/pkgs/tools/security/metasploit/Gemfile.lock
index d3a88a50aeca..d15df5e56c2b 100644
--- a/pkgs/tools/security/metasploit/Gemfile.lock
+++ b/pkgs/tools/security/metasploit/Gemfile.lock
@@ -1,15 +1,17 @@
 GIT
   remote: https://github.com/rapid7/metasploit-framework
-  revision: 8a194207f07c2b8c91c1a72e57c25683d4e9f744
-  ref: refs/tags/4.14.25
+  revision: dbec1c2d2ae4bd77276cbfb3c6ee2902048b9453
+  ref: refs/tags/4.16.1
   specs:
-    metasploit-framework (4.14.25)
+    metasploit-framework (4.16.1)
       actionpack (~> 4.2.6)
       activerecord (~> 4.2.6)
       activesupport (~> 4.2.6)
       backports
       bcrypt
+      bcrypt_pbkdf
       bit-struct
+      dnsruby
       filesize
       jsobfu
       json
@@ -17,9 +19,9 @@ GIT
       metasploit-concern
       metasploit-credential
       metasploit-model
-      metasploit-payloads (= 1.2.32)
+      metasploit-payloads (= 1.3.1)
       metasploit_data_models
-      metasploit_payloads-mettle (= 0.1.9)
+      metasploit_payloads-mettle (= 0.2.0)
       msgpack
       nessus_rest
       net-ssh
@@ -32,9 +34,12 @@ GIT
       packetfu
       patch_finder
       pcaprub
-      pg
+      pdf-reader
+      pg (= 0.20.0)
       railties
       rb-readline
+      rbnacl (< 5.0.0)
+      rbnacl-libsodium
       recog
       redcarpet
       rex-arch
@@ -46,7 +51,7 @@ GIT
       rex-mime
       rex-nop
       rex-ole
-      rex-powershell
+      rex-powershell (< 0.1.73)
       rex-random_identifier
       rex-registry
       rex-rop_builder
@@ -64,62 +69,69 @@ GIT
       tzinfo
       tzinfo-data
       windows_error
+      xdr
       xmlrpc
 
 GEM
   remote: https://rubygems.org/
   specs:
-    actionpack (4.2.8)
-      actionview (= 4.2.8)
-      activesupport (= 4.2.8)
+    Ascii85 (1.0.2)
+    actionpack (4.2.9)
+      actionview (= 4.2.9)
+      activesupport (= 4.2.9)
       rack (~> 1.6)
       rack-test (~> 0.6.2)
       rails-dom-testing (~> 1.0, >= 1.0.5)
       rails-html-sanitizer (~> 1.0, >= 1.0.2)
-    actionview (4.2.8)
-      activesupport (= 4.2.8)
+    actionview (4.2.9)
+      activesupport (= 4.2.9)
       builder (~> 3.1)
       erubis (~> 2.7.0)
       rails-dom-testing (~> 1.0, >= 1.0.5)
       rails-html-sanitizer (~> 1.0, >= 1.0.3)
-    activemodel (4.2.8)
-      activesupport (= 4.2.8)
+    activemodel (4.2.9)
+      activesupport (= 4.2.9)
       builder (~> 3.1)
-    activerecord (4.2.8)
-      activemodel (= 4.2.8)
-      activesupport (= 4.2.8)
+    activerecord (4.2.9)
+      activemodel (= 4.2.9)
+      activesupport (= 4.2.9)
       arel (~> 6.0)
-    activesupport (4.2.8)
+    activesupport (4.2.9)
       i18n (~> 0.7)
       minitest (~> 5.1)
       thread_safe (~> 0.3, >= 0.3.4)
       tzinfo (~> 1.1)
     addressable (2.5.1)
       public_suffix (~> 2.0, >= 2.0.2)
+    afm (0.2.2)
     arel (6.0.4)
     arel-helpers (2.4.0)
       activerecord (>= 3.1.0, < 6)
     backports (3.8.0)
     bcrypt (3.1.11)
+    bcrypt_pbkdf (1.0.0)
     bindata (2.4.0)
     bit-struct (0.16)
     builder (3.2.3)
+    dnsruby (1.60.2)
     erubis (2.7.0)
-    faraday (0.12.1)
+    faraday (0.13.1)
       multipart-post (>= 1.2, < 3)
+    ffi (1.9.18)
     filesize (0.1.1)
-    i18n (0.8.4)
+    hashery (2.1.2)
+    i18n (0.8.6)
     jsobfu (0.4.2)
       rkelly-remix
     json (2.1.0)
     loofah (2.0.3)
       nokogiri (>= 1.5.9)
     metasm (1.0.3)
-    metasploit-concern (2.0.4)
+    metasploit-concern (2.0.5)
       activemodel (~> 4.2.6)
       activesupport (~> 4.2.6)
       railties (~> 4.2.6)
-    metasploit-credential (2.0.10)
+    metasploit-credential (2.0.12)
       metasploit-concern
       metasploit-model
       metasploit_data_models
@@ -132,8 +144,8 @@ GEM
       activemodel (~> 4.2.6)
       activesupport (~> 4.2.6)
       railties (~> 4.2.6)
-    metasploit-payloads (1.2.32)
-    metasploit_data_models (2.0.14)
+    metasploit-payloads (1.3.1)
+    metasploit_data_models (2.0.15)
       activerecord (~> 4.2.6)
       activesupport (~> 4.2.6)
       arel-helpers
@@ -143,15 +155,15 @@ GEM
       postgres_ext
       railties (~> 4.2.6)
       recog (~> 2.0)
-    metasploit_payloads-mettle (0.1.9)
+    metasploit_payloads-mettle (0.2.0)
     mini_portile2 (2.2.0)
-    minitest (5.10.2)
+    minitest (5.10.3)
     msgpack (1.1.0)
     multipart-post (2.0.0)
     nessus_rest (0.1.6)
     net-ssh (4.1.0)
     network_interface (0.0.1)
-    nexpose (6.0.0)
+    nexpose (6.1.1)
     nokogiri (1.8.0)
       mini_portile2 (~> 2.2.0)
     octokit (4.7.0)
@@ -162,6 +174,12 @@ GEM
       pcaprub
     patch_finder (1.0.2)
     pcaprub (0.12.4)
+    pdf-reader (2.0.0)
+      Ascii85 (~> 1.0.0)
+      afm (~> 0.2.1)
+      hashery (~> 2.0)
+      ruby-rc4
+      ttfunk
     pg (0.20.0)
     pg_array_parser (0.0.9)
     postgres_ext (3.0.0)
@@ -180,25 +198,29 @@ GEM
       rails-deprecated_sanitizer (>= 1.0.1)
     rails-html-sanitizer (1.0.3)
       loofah (~> 2.0)
-    railties (4.2.8)
-      actionpack (= 4.2.8)
-      activesupport (= 4.2.8)
+    railties (4.2.9)
+      actionpack (= 4.2.9)
+      activesupport (= 4.2.9)
       rake (>= 0.8.7)
       thor (>= 0.18.1, < 2.0)
     rake (12.0.0)
-    rb-readline (0.5.4)
-    recog (2.1.8)
+    rb-readline (0.5.5)
+    rbnacl (4.0.2)
+      ffi
+    rbnacl-libsodium (1.0.13)
+      rbnacl (>= 3.0.1)
+    recog (2.1.12)
       nokogiri
     redcarpet (3.4.0)
-    rex-arch (0.1.8)
+    rex-arch (0.1.11)
       rex-text
-    rex-bin_tools (0.1.3)
+    rex-bin_tools (0.1.4)
       metasm
       rex-arch
       rex-core
       rex-struct2
       rex-text
-    rex-core (0.1.10)
+    rex-core (0.1.12)
     rex-encoder (0.1.4)
       metasm
       rex-arch
@@ -226,9 +248,10 @@ GEM
       metasm
       rex-core
       rex-text
-    rex-socket (0.1.6)
+    rex-socket (0.1.8)
+      rex-core
+    rex-sslscan (0.1.5)
       rex-core
-    rex-sslscan (0.1.4)
       rex-socket
       rex-text
     rex-struct2 (0.1.2)
@@ -237,6 +260,7 @@ GEM
       rex-text
     rkelly-remix (0.0.7)
     robots (0.10.1)
+    ruby-rc4 (0.1.5)
     ruby_smb (0.0.18)
       bindata
       rubyntlm
@@ -248,13 +272,17 @@ GEM
       faraday (~> 0.8, < 1.0)
     sqlite3 (1.3.13)
     sshkey (1.9.0)
-    thor (0.19.4)
+    thor (0.20.0)
     thread_safe (0.3.6)
+    ttfunk (1.5.1)
     tzinfo (1.2.3)
       thread_safe (~> 0.1)
     tzinfo-data (1.2017.2)
       tzinfo (>= 1.0.0)
     windows_error (0.1.2)
+    xdr (2.0.0)
+      activemodel (>= 4.2.7)
+      activesupport (>= 4.2.7)
     xmlrpc (0.3.0)
 
 PLATFORMS
@@ -264,4 +292,4 @@ DEPENDENCIES
   metasploit-framework!
 
 BUNDLED WITH
-   1.14.6
+   1.15.0
diff --git a/pkgs/tools/security/metasploit/default.nix b/pkgs/tools/security/metasploit/default.nix
index 4cc287c40f27..15a30db522eb 100644
--- a/pkgs/tools/security/metasploit/default.nix
+++ b/pkgs/tools/security/metasploit/default.nix
@@ -4,6 +4,10 @@
 # 1. increment version number in expression and in Gemfile
 # 2. run $ nix-shell --command "bundler install && bundix"
 #    in metasploit in nixpkgs
+# 3. run $ sed -i '/[ ]*dependencies =/d' gemset.nix
+# 4. run $ nix-build -A metasploit ../../../../
+# 5. update sha256sum in expression
+# 6. run step 3 again
 
 let
   env = bundlerEnv {
@@ -13,13 +17,13 @@ let
   };
 in stdenv.mkDerivation rec {
   name = "metasploit-framework-${version}";
-  version = "4.14.25";
+  version = "4.16.1";
 
   src = fetchFromGitHub {
     owner = "rapid7";
     repo = "metasploit-framework";
     rev = version;
-    sha256 = "0cp1ybq29a0r7kabg4p2yj0qm90hjvr4xxp0pynb2g406sbyycjm";
+    sha256 = "1vilyy0dqzp8kbbpvs2zrv2ac7s39w2vv7mrbzgcjgh2bj7c6bg1";
   };
 
   buildInputs = [ makeWrapper ];
diff --git a/pkgs/tools/security/metasploit/gemset.nix b/pkgs/tools/security/metasploit/gemset.nix
index ff3e4d5d832e..4262e64efb04 100644
--- a/pkgs/tools/security/metasploit/gemset.nix
+++ b/pkgs/tools/security/metasploit/gemset.nix
@@ -2,42 +2,42 @@
   actionpack = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "09fbazl0ja80na2wadfp3fzmdmdy1lsb4wd2yg7anbj0zk0ap7a9";
+      sha256 = "1kgrq74gp2czzxr0f2sqrc98llz03lgq498300z2z5n4khgznwc4";
       type = "gem";
     };
-    version = "4.2.8";
+    version = "4.2.9";
   };
   actionview = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1mg4a8143q2wjhjq4mngl69jkv249z5jvg0jkdribdv4zkg586rp";
+      sha256 = "04kgp4gmahw31miz8xdq1pns14qmvvzd14fgfv7fg9klkw3bxyyp";
       type = "gem";
     };
-    version = "4.2.8";
+    version = "4.2.9";
   };
   activemodel = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "11vhh7zmp92880s5sx8r32v2p0b7xg039mfr92pjynpkz4q901ld";
+      sha256 = "1qxmivny0ka5s3iyap08sn9bp2bd9wrhqp2njfw26hr9wsjk5kfv";
       type = "gem";
     };
-    version = "4.2.8";
+    version = "4.2.9";
   };
   activerecord = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1kk4dhn8jfhqfsf1dmb3a183gix6k46xr6cjkxj0rp51w2za1ns0";
+      sha256 = "18i790dfhi4ndypd1pj9pv08knpxr2sayvvwfq7axj5jfwgpmrqb";
       type = "gem";
     };
-    version = "4.2.8";
+    version = "4.2.9";
   };
   activesupport = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0wibdzd2f5l5rlsw1a1y3j3fhw2imrrbkxggdraa6q9qbdnc66hi";
+      sha256 = "1d0a362p3m2m2kljichar2pwq0qm4vblc3njy1rdzm09ckzd45sp";
       type = "gem";
     };
-    version = "4.2.8";
+    version = "4.2.9";
   };
   addressable = {
     source = {
@@ -47,6 +47,14 @@
     };
     version = "2.5.1";
   };
+  afm = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8";
+      type = "gem";
+    };
+    version = "0.2.2";
+  };
   arel = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -63,6 +71,14 @@
     };
     version = "2.4.0";
   };
+  Ascii85 = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0j95sbxd18kc8rhcnvl1w37kflqpax1r12h1x47gh4xxn3mz4m7q";
+      type = "gem";
+    };
+    version = "1.0.2";
+  };
   backports = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -79,6 +95,14 @@
     };
     version = "3.1.11";
   };
+  bcrypt_pbkdf = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0cj4k13c7qvvck7y25i3xarvyqq8d27vl61jddifkc7llnnap1hv";
+      type = "gem";
+    };
+    version = "1.0.0";
+  };
   bindata = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -103,6 +127,14 @@
     };
     version = "3.2.3";
   };
+  dnsruby = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0qfvpkka69f8vnmda3zhkr54fjpf7pwgmbx0gcsxg3jd6c7sjs1d";
+      type = "gem";
+    };
+    version = "1.60.2";
+  };
   erubis = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -114,10 +146,18 @@
   faraday = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1wkx9844vacsk2229xbc27djf6zw15kqd60ifr78whf9mp9v6l03";
+      sha256 = "1gyqsj7vlqynwvivf9485zwmcj04v1z7gq362z0b8zw2zf4ag0hw";
       type = "gem";
     };
-    version = "0.12.1";
+    version = "0.13.1";
+  };
+  ffi = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "034f52xf7zcqgbvwbl20jwdyjwznvqnwpbaps9nk18v9lgb1dpx0";
+      type = "gem";
+    };
+    version = "1.9.18";
   };
   filesize = {
     source = {
@@ -127,13 +167,21 @@
     };
     version = "0.1.1";
   };
+  hashery = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj";
+      type = "gem";
+    };
+    version = "2.1.2";
+  };
   i18n = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1j491wrfzham4nk8q4bifah3lx7nr8wp9ahfb7vd3hxn71v7kic7";
+      sha256 = "1i3aqvzfsj786kwjj70jsjpxm6ffw5pwhalzr2abjfv2bdc7k9kw";
       type = "gem";
     };
-    version = "0.8.4";
+    version = "0.8.6";
   };
   jsobfu = {
     source = {
@@ -170,28 +218,28 @@
   metasploit-concern = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0kqby5ycxhr0jfzvjqkdgjbqqjrg8jlmcxw8myrm0875hybyl1mq";
+      sha256 = "0v9lm225fhzhnbjcc0vwb38ybikxwzlv8116rrrkndzs8qy79297";
       type = "gem";
     };
-    version = "2.0.4";
+    version = "2.0.5";
   };
   metasploit-credential = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1zblyy2yv31zap6dzf3lpkhvnafkwbzdvr6nsqmyh95ci8yy1q6r";
+      sha256 = "1flahrcl5hf4bncqs40mry6pkffvmir85kqzkad22x3dh6crw50i";
       type = "gem";
     };
-    version = "2.0.10";
+    version = "2.0.12";
   };
   metasploit-framework = {
     source = {
       fetchSubmodules = false;
-      rev = "8a194207f07c2b8c91c1a72e57c25683d4e9f744";
-      sha256 = "0q7iv9wd65ji1cay6am4dskrlibvp3wyn66gvld8p1nfnnvn5vmq";
+      rev = "dbec1c2d2ae4bd77276cbfb3c6ee2902048b9453";
+      sha256 = "06a2dc64wl8w02zimf44hch4cap7ckw42kg1x01lmcwaa8d5q09w";
       type = "git";
       url = "https://github.com/rapid7/metasploit-framework";
     };
-    version = "4.14.25";
+    version = "4.16.1";
   };
   metasploit-model = {
     source = {
@@ -204,26 +252,26 @@
   metasploit-payloads = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1dqnyzp60da6f8kgnbpjmv5xsg1hvyyd2jkkzbh69sgwp4nw3i9g";
+      sha256 = "0icha08z4c5rnyp66xcyn9c8lbv43gx7hgs9rsm3539gj8c40znx";
       type = "gem";
     };
-    version = "1.2.32";
+    version = "1.3.1";
   };
   metasploit_data_models = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0hb2wsz3d4xgjf6dlf7nzxlv6q7rcdgn1pj79xs3g8al38zi129g";
+      sha256 = "0j3ijxn6n3ack9572a74cwknijymy41c8rx34njyhg25lx4hbvah";
       type = "gem";
     };
-    version = "2.0.14";
+    version = "2.0.15";
   };
   metasploit_payloads-mettle = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "058ijqznh4xqx3d6dph5gwdsmj96z4n46rl1mm85fyxpgpkifqd1";
+      sha256 = "1y2nfzgs17pq3xvlw14jgjcksr4h8p4miypxk9a87l1h7xv7dcgn";
       type = "gem";
     };
-    version = "0.1.9";
+    version = "0.2.0";
   };
   mini_portile2 = {
     source = {
@@ -236,10 +284,10 @@
   minitest = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "11my86fnihvpndyknn3c14hc82nhsgggnhlxh8h3bdjpmfsvl0my";
+      sha256 = "05521clw19lrksqgvg2kmm025pvdhdaniix52vmbychrn2jm7kz2";
       type = "gem";
     };
-    version = "5.10.2";
+    version = "5.10.3";
   };
   msgpack = {
     source = {
@@ -284,10 +332,10 @@
   nexpose = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0jdhhzzs3b3rav6imx8jn9920cjj83yjvz35q169y0ppla2xzqbg";
+      sha256 = "0jnyvj09z8r3chhj930fdnashbfcfv0vw2drjvsrcnm7firdhdzb";
       type = "gem";
     };
-    version = "6.0.0";
+    version = "6.1.1";
   };
   nokogiri = {
     source = {
@@ -345,6 +393,14 @@
     };
     version = "0.12.4";
   };
+  pdf-reader = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0nlammdpjy3padmzxhsql7mw31jyqp88n6bdffiarv5kzl4s3y7p";
+      type = "gem";
+    };
+    version = "2.0.0";
+  };
   pg = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -420,10 +476,10 @@
   railties = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0bavl4hj7bnl3ryqi9rvykm410kflplgingkcxasfv1gdilddh4g";
+      sha256 = "1g5jnk1zllm2fr06lixq7gv8l2cwqc99akv7886gz6lshijpfyxd";
       type = "gem";
     };
-    version = "4.2.8";
+    version = "4.2.9";
   };
   rake = {
     source = {
@@ -436,18 +492,34 @@
   rb-readline = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "170m6d2298s9kfbd4y3zzj4irsnd15qlbgi6kk93m88lkh9qzy3a";
+      sha256 = "14w79a121czmvk1s953qfzww30mqjb2zc0k9qhi0ivxxk3hxg6wy";
+      type = "gem";
+    };
+    version = "0.5.5";
+  };
+  rbnacl = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "08dkigw8wdx53hviw1zqrs7rcrzqcwh9jd3dvwr72013z9fmyp48";
       type = "gem";
     };
-    version = "0.5.4";
+    version = "4.0.2";
+  };
+  rbnacl-libsodium = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1323fli41m01af13xz5xvabsjnz09si1b9l4qd2p802kq0dr61gd";
+      type = "gem";
+    };
+    version = "1.0.13";
   };
   recog = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0d12889rx9ylm0jybg9n5sqx0v413hy9zjqs9rd9qjd1kjva7y87";
+      sha256 = "0h023ykrrra74bpbibkyg083kafaswvraw4naw9p1ghcjzn9ggj3";
       type = "gem";
     };
-    version = "2.1.8";
+    version = "2.1.12";
   };
   redcarpet = {
     source = {
@@ -460,26 +532,26 @@
   rex-arch = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "13dyic499iblhddmy7w01ajr5l5rm6szagy6vz7sx138y21d1y6f";
+      sha256 = "1izzalmjwdyib8y0xlgys8qb60di6xyjk485ylgh14p47wkyc6yp";
       type = "gem";
     };
-    version = "0.1.8";
+    version = "0.1.11";
   };
   rex-bin_tools = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0skrbpyal6anh4g1nsaf9ypg5sd2ghxxmghasxw4p1s1i1xbmhwr";
+      sha256 = "01hi1cjr68adp47nxbjfprvn0r3b72r4ib82x9j33bf2pny6nvaw";
       type = "gem";
     };
-    version = "0.1.3";
+    version = "0.1.4";
   };
   rex-core = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "09xbslrwbc9d0rp24y1pdgc6650ciwicq4q7skjz74rprr9wj16f";
+      sha256 = "16dwf4pw7bpx8xvlv241imxvwhvjfv0cw9kl7ipsv40yazy5lzpk";
       type = "gem";
     };
-    version = "0.1.10";
+    version = "0.1.12";
   };
   rex-encoder = {
     source = {
@@ -564,18 +636,18 @@
   rex-socket = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0r39782f2qpq83wsi72213v344gq4rccch98i376fx8bayh0dygh";
+      sha256 = "0bkr64qrfy2mcv6cpp2z2rn9npgn9s0yyagzjh7kawbm80ldwf2h";
       type = "gem";
     };
-    version = "0.1.6";
+    version = "0.1.8";
   };
   rex-sslscan = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0r5cy1kng1ggjycn7a8vpval7clhr0yxhd7rgn2hasxl2p3c7i8v";
+      sha256 = "06gbx45q653ajcx099p0yxdqqxazfznbrqshd4nwiwg1p498lmyx";
       type = "gem";
     };
-    version = "0.1.4";
+    version = "0.1.5";
   };
   rex-struct2 = {
     source = {
@@ -617,6 +689,14 @@
     };
     version = "0.10.1";
   };
+  ruby-rc4 = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00";
+      type = "gem";
+    };
+    version = "0.1.5";
+  };
   ruby_smb = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -668,10 +748,10 @@
   thor = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "01n5dv9kql60m6a00zc0r66jvaxx98qhdny3klyj0p3w34pad2ns";
+      sha256 = "0nmqpyj642sk4g16nkbq6pj856adpv91lp4krwhqkh2iw63aszdl";
       type = "gem";
     };
-    version = "0.19.4";
+    version = "0.20.0";
   };
   thread_safe = {
     source = {
@@ -681,6 +761,14 @@
     };
     version = "0.3.6";
   };
+  ttfunk = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1mgrnqla5n51v4ivn844albsajkck7k6lviphfqa8470r46c58cd";
+      type = "gem";
+    };
+    version = "1.5.1";
+  };
   tzinfo = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -705,6 +793,14 @@
     };
     version = "0.1.2";
   };
+  xdr = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0c5cp1k4ij3xq1q6fb0f6xv5b65wy18y7bhwvsdx8wd0zyg3x96m";
+      type = "gem";
+    };
+    version = "2.0.0";
+  };
   xmlrpc = {
     source = {
       remotes = ["https://rubygems.org"];
@@ -713,4 +809,4 @@
     };
     version = "0.3.0";
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 55d982c6d654..2c6c07042f74 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1228,6 +1228,8 @@ with pkgs;
     pythonPackages = python2Packages;
   };
 
+  bepasty = callPackage ../tools/misc/bepasty { };
+
   bfg-repo-cleaner = gitAndTools.bfg-repo-cleaner;
 
   bgs = callPackage ../tools/X11/bgs { };
@@ -1266,9 +1268,7 @@ with pkgs;
 
   burp = callPackage ../tools/backup/burp { };
 
-  buku = callPackage ../applications/misc/buku {
-    pythonPackages = python3Packages;
-  };
+  buku = callPackage ../applications/misc/buku { };
 
   byzanz = callPackage ../applications/video/byzanz {};
 
@@ -9634,6 +9634,8 @@ with pkgs;
 
   nss_wrapper = callPackage ../development/libraries/nss_wrapper { };
 
+  ntbtls = callPackage ../development/libraries/ntbtls { };
+
   ntk = callPackage ../development/libraries/audio/ntk { };
 
   ntrack = callPackage ../development/libraries/ntrack { };
@@ -11093,6 +11095,8 @@ with pkgs;
 
   dex-oidc = callPackage ../servers/dex { };
 
+  dgraph = callPackage ../servers/dgraph { };
+    
   dico = callPackage ../servers/dico { };
 
   dict = callPackage ../servers/dict {
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index b570e6d22dea..f87fab44677d 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -2374,13 +2374,21 @@ let self = _self // overrides; _self = with self; {
   };
 
   Connector = buildPerlPackage rec {
-    name = "Connector-1.16";
+    name = "Connector-1.22";
     src = fetchurl {
       url = "mirror://cpan/authors/id/M/MR/MRSCOTTY/${name}.tar.gz";
-      sha256 = "0rbx4n86y5sdkff37w8djw1ahxrg79bsfgbrph3kjhh4jzd20q09";
+      sha256 = "aa178d1865817ad2dea5c79645c8e6420ca2cfb951f20c98b5154307de219016";
+    };
+    buildInputs = [ ConfigMerge ConfigStd ConfigVersioned CryptSSLeay DBDSQLite DBI IOSocketSSL LWPProtocolhttps LWPUserAgent TemplateToolkit YAML ];
+    propagatedBuildInputs = [ LogLog4perl Moose ];
+    prePatch = ''
+      # Attempts to use network.
+      rm t/01-proxy-http.t
+    '';
+    meta = {
+      description = "A generic connection to a hierarchical-structured data set";
+      license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
     };
-    buildInputs = [ Moose ConfigStd YAML PathClass DateTime Log4Perl
-      ConfigVersioned TemplateToolkit];
   };
 
   ConvertASN1 = buildPerlPackage rec {
@@ -5947,14 +5955,14 @@ let self = _self // overrides; _self = with self; {
     };
   };
 
-  GitPurePerl = buildPerlPackage {
-    name = "Git-PurePerl-0.51";
+  GitPurePerl = buildPerlPackage rec {
+    name = "Git-PurePerl-0.53";
     src = fetchurl {
-      url = mirror://cpan/authors/id/B/BR/BROQ/Git-PurePerl-0.51.tar.gz;
-      sha256 = "3775f385ae566ea392ece0913a06ffec46441a1273c19ba9a6d990574ec34d00";
+      url = "mirror://cpan/authors/id/B/BR/BROQ/${name}.tar.gz";
+      sha256 = "987c74366cc4c37ee084050f985fa254359c89c12507f5b8bfc6607de538d5a8";
     };
     buildInputs = [ Testutf8 ];
-    propagatedBuildInputs = [ ConfigGitLike DataStreamBulk DateTime FileFindRule IODigest Moose MooseXStrictConstructor MooseXTypesPathClass namespaceautoclean ];
+    propagatedBuildInputs = [ ArchiveExtract ConfigGitLike DataStreamBulk DateTime FileFindRule IODigest Moose MooseXStrictConstructor MooseXTypesPathClass namespaceautoclean ];
     doCheck = false;
     meta = {
       description = "A Pure Perl interface to Git repositories";
@@ -7075,10 +7083,10 @@ let self = _self // overrides; _self = with self; {
   };
 
   IOSocketSSL = buildPerlPackage rec {
-    name = "IO-Socket-SSL-2.039";
+    name = "IO-Socket-SSL-2.050";
     src = fetchurl {
       url = "mirror://cpan/authors/id/S/SU/SULLR/${name}.tar.gz";
-      sha256 = "c6379a76860c724a22b79ebe9e91d26bd8a04e3ce035bacfd15de3d9beaf83ac";
+      sha256 = "54e6716e40df8b1c168d8f54a0b8f215313739bd99dda17adb7c00fe94656692";
     };
     propagatedBuildInputs = [ NetSSLeay URI ];
     # Fix path to default certificate store.
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 8552ebc15f52..ff0edb75b444 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -62,7 +62,7 @@ let
 
   graphiteVersion = "0.9.15";
 
-  fetchPypi = {format ? "setuptools", ... } @attrs:
+  fetchPypi = makeOverridable( {format ? "setuptools", ... } @attrs:
     let
       fetchWheel = {pname, version, sha256, python ? "py2.py3", abi ? "none", platform ? "any"}:
       # Fetch a wheel. By default we fetch an universal wheel.
@@ -78,7 +78,7 @@ let
       fetcher = (if format == "wheel" then fetchWheel
         else if format == "setuptools" then fetchSource
         else throw "Unsupported kind ${kind}");
-    in fetcher (builtins.removeAttrs attrs ["format"]);
+    in fetcher (builtins.removeAttrs attrs ["format"]) );
 
   # This should become part of stdenv!
   sharedLibraryExtension = if stdenv.isDarwin then ".dylib" else ".so";
@@ -1672,6 +1672,10 @@ in {
       sha256 = "1ck0aijzrg9xf6hjdxnynkapnyxw0y385jb0q7wyq4jf77ayfszc";
     };
 
+    postPatch = ''
+      substituteInPlace setup.py --replace "argparse" ""
+    '';
+
     meta = {
       description = "Utility tools for control groups of Linux";
       maintainers = with maintainers; [ layus ];
@@ -2910,8 +2914,8 @@ in {
       py.test tests
     '';
 
-    # Python 3.5 str/bytes-like errors with reading files
-    doCheck = !isPy3k;
+    # https://github.com/pallets/click/issues/823
+    doCheck = false;
 
     meta = {
       homepage = http://click.pocoo.org/;
@@ -4129,7 +4133,7 @@ in {
     };
   };
 
-  pytest = self.pytest_30;
+  pytest = self.pytest_32;
 
   pytest_27 = callPackage ../development/python-modules/pytest/2_7.nix {};
 
@@ -4137,7 +4141,14 @@ in {
 
   pytest_29 = callPackage ../development/python-modules/pytest/2_9.nix {};
 
-  pytest_30 = callPackage ../development/python-modules/pytest{
+  pytest_30 = callPackage ../development/python-modules/pytest/3_0.nix {
+    hypothesis = self.hypothesis.override {
+      # hypothesis requires pytest that causes dependency cycle
+      doCheck = false;
+      pytest = null;
+    };
+  };
+  pytest_32 = callPackage ../development/python-modules/pytest{
     hypothesis = self.hypothesis.override {
       # hypothesis requires pytest that causes dependency cycle
       doCheck = false;
@@ -4184,6 +4195,9 @@ in {
 
     checkPhase = "make test";
 
+    # Requires pytest < 3.1
+    doCheck = false;
+
     meta = {
       license = licenses.mit;
       homepage = https://pypi.python.org/pypi/pytest-catchlog/;
@@ -4223,6 +4237,8 @@ in {
     };
   };
 
+  pytest-forked = callPackage ../development/python-modules/pytest-forked { };
+
   pytest-rerunfailures = buildPythonPackage rec {
     name = "${pname}-${version}";
     pname = "pytest-rerunfailures";
@@ -5410,12 +5426,12 @@ in {
 
   dropbox = buildPythonPackage rec {
     name = "dropbox-${version}";
-    version = "3.37";
-    #doCheck = false; # python 2.7.9 does verify ssl certificates
+    version = "8.0.0";
+    doCheck = false; # Set DROPBOX_TOKEN environment variable to a valid token.
 
     src = pkgs.fetchurl {
       url = "mirror://pypi/d/dropbox/${name}.tar.gz";
-      sha256 = "f65c12bd97f09e29a951bc7cb30a74e005fc4b2f8bb48778796be3f73866b173";
+      sha256 = "0bixx80zjq0286dwm4zhg8bdhc8pqlrqy4n2jg7i6m6a4gv4gak5";
     };
 
     propagatedBuildInputs = with self; [ requests urllib3 mock setuptools ];
@@ -6783,22 +6799,7 @@ in {
     };
   };
 
-  jsonpatch = buildPythonPackage rec {
-    name = "jsonpatch-1.11";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/j/jsonpatch/${name}.tar.gz";
-      sha256 = "22d0bc0f5522a4a03dd9fb4c4cdf7c1f03256546c88be4c61e5ceabd22280e47";
-    };
-
-    propagatedBuildInputs = with self; [ jsonpointer ];
-
-    meta = {
-      description = "Library to apply JSON Patches according to RFC 6902";
-      homepage = "https://github.com/stefankoegl/python-json-patch";
-      license = stdenv.lib.licenses.bsd2; # "Modified BSD license, says pypi"
-    };
-  };
+  jsonpatch = callPackage ../development/python-modules/jsonpatch { };
 
   jsonpointer = buildPythonPackage rec {
     name = "jsonpointer-1.9";
@@ -7363,25 +7364,7 @@ in {
     };
   };
 
-  odfpy = buildPythonPackage rec {
-    version = "0.9.6";
-    name = "odfpy-${version}";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/o/odfpy/${name}.tar.gz";
-      sha256 = "e458f969f1ccd7ed77d70a45fe69ad656ac61b39e36e4d32c42d4e3216030891";
-    };
-
-    buildInputs = with self; with pkgs; [ ];
-
-    propagatedBuildInputs = with self; [ ];
-
-    meta = {
-      description = "Python API and tools to manipulate OpenDocument files";
-      homepage = "https://joinup.ec.europa.eu/software/odfpy/home";
-      license = licenses.asl20;
-    };
-  };
+  odfpy = callPackage ../development/python-modules/odfpy { };
 
   oger = buildPythonPackage rec {
     name = "oger-${version}";
@@ -8208,6 +8191,8 @@ in {
     # see https://github.com/getsentry/raven-python/blob/master/setup.py
     doCheck = false;
 
+    propagatedBuildInputs = optionals (!isPy3k) [ self.contextlib2 ];
+
     meta = {
       maintainers = with maintainers; [ primeos ];
     };
@@ -8481,26 +8466,7 @@ in {
   };
 
 
-  pyrtlsdr = buildPythonPackage rec {
-    name = "pyrtlsdr-0.2.0";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/p/pyrtlsdr/${name}.zip";
-      sha256 = "cbb9086efe4320858c48f4856d09f7face191c4156510b1459ef4e5588935b6a";
-    };
-
-    postPatch = ''
-      sed "s|driver_files =.*|driver_files = ['${pkgs.rtl-sdr}/lib/librtlsdr.so']|" -i rtlsdr/librtlsdr.py
-    '';
-
-    meta = {
-      description = "Python wrapper for librtlsdr (a driver for Realtek RTL2832U based SDR's)";
-      homepage = https://github.com/roger-/pyrtlsdr;
-      license = licenses.gpl3;
-      platforms = platforms.linux;
-      maintainers = with maintainers; [ bjornfor ];
-    };
-  };
+  pyrtlsdr = callPackage ../development/python-modules/pyrtlsdr { };
 
   random2 = self.buildPythonPackage rec {
     name = "random2-1.0.1";
@@ -9887,23 +9853,7 @@ in {
     };
   };
 
-  flask-pymongo = buildPythonPackage rec {
-    name = "Flask-PyMongo-${version}";
-    version = "0.3.1";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/F/Flask-PyMongo/${name}.tar.gz";
-      sha256 = "0305qngvjrjyyabf8gxqgqvd9ffh00gr5yfrjf4nncr2my9svbyd";
-    };
-
-    propagatedBuildInputs = with self; [ flask pymongo_2_9_1 ];
-
-    meta = {
-      homepage = "http://flask-pymongo.readthedocs.org/";
-      description = "PyMongo support for Flask applications";
-      license = licenses.bsd2;
-    };
-  };
+  flask-pymongo = callPackage ../development/python-modules/Flask-PyMongo { };
 
   flask-restful = buildPythonPackage rec {
     name = "Flask-RESTful-${version}";
@@ -14587,13 +14537,17 @@ in {
       sha256 = "04ja1cl8xzqnwrd2gi6nlnxbmjri141bzwa5gybvr44d8h3k2nfa";
     };
 
-    patchPhase = ''
+    postPatch = ''
       substituteInPlace setup.py --replace "version=versioneer.get_version()" "version='${version}'"
+      substituteInPlace setup.py --replace "argparse" ""
     '';
 
     propagatedBuildInputs = with self;
       [ pyptlib argparse twisted pycrypto pyyaml ];
 
+    # No tests in archive
+    doCheck = false;
+
     meta = {
       description = "A pluggable transport proxy";
       homepage = https://www.torproject.org/projects/obfsproxy;
@@ -17166,24 +17120,7 @@ in {
   };
 
 
-  py = buildPythonPackage rec {
-    name = "py-${version}";
-    version = "1.4.31";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/p/py/${name}.tar.gz";
-      sha256 = "a6501963c725fc2554dabfece8ae9a8fb5e149c0ac0a42fd2b02c5c1c57fc114";
-    };
-
-    # Circular dependency on pytest
-    doCheck = false;
-
-    meta = {
-      description = "Library with cross-python path, ini-parsing, io, code, log facilities";
-      homepage = http://pylib.readthedocs.org/;
-      license = licenses.mit;
-    };
-  };
+  py = callPackage ../development/python-modules/py { };
 
 
   pyacoustid = buildPythonPackage rec {
@@ -18174,6 +18111,9 @@ in {
     };
 
     disabled = !isPy3k;
+    
+    # No tests in archive
+    doCheck = false;
 
     meta = {
       description = "Python package for the generation of PostScript, PDF, and SVG files";
@@ -20343,6 +20283,10 @@ in {
       rm "$out/bin/"*.bat
     '';
 
+    postPatch = ''
+      substituteInPlace setup.py --replace "argparse" ""
+    '';
+
     meta = {
       description = "Test data generator for Robot Framework";
       homepage = https://github.com/mkorpela/RoboMachine;
@@ -21038,44 +20982,7 @@ in {
     '';
   };
 
-  setuptools_scm = buildPythonPackage rec {
-    name = "setuptools_scm-${version}";
-    version = "1.15.0";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/s/setuptools_scm/${name}.tar.gz";
-      sha256 = "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs";
-    };
-
-    buildInputs = with self; [ pip ];
-    checkInputs = with self; [ pytest ];
-    # Seems to fail due to chroot
-    doCheck = false;
-
-    checkPhase = ''
-      py.test
-    '';
-
-    meta = with stdenv.lib; {
-      homepage = https://bitbucket.org/pypa/setuptools_scm/;
-      description = "Handles managing your python package versions in scm metadata";
-      license = licenses.mit;
-      maintainers = with maintainers; [ jgeerds ];
-    };
-  };
-
-  setuptools_scm_18 = self.setuptools_scm.override rec {
-    name = "setuptools_scm-${version}";
-    version = "1.8.0";
-
-    # tests fail: ImportError: cannot import name 'find_files'
-    disabled = isPy35;
-
-    src = pkgs.fetchurl {
-      url = "https://pypi.python.org/packages/source/s/setuptools_scm/${name}.tar.bz2";
-      sha256 = "00p60v2yfqy1r58pjcx9wy6dvqd7wkpfs5z1dzwf7y75c1g3dgyx";
-    };
-  };
+  setuptools_scm = callPackage ../development/python-modules/setuptools_scm { };
 
   setuptoolsDarcs = buildPythonPackage rec {
     name = "setuptools_darcs-${version}";
@@ -21419,21 +21326,7 @@ in {
     };
   };
 
-  sqlmap = buildPythonPackage {
-    name = "sqlmap-1.0.11";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/s/sqlmap/sqlmap-1.0.11.tar.gz";
-      sha256 = "1x4amyjqnd9j5g2kp9nvg8pr5sqzbhr8gd0m6d671bshvgj568vr";
-    };
-
-    meta = with pkgs.stdenv.lib; {
-      homepage = "http://sqlmap.org";
-      license = licenses.gpl2;
-      description = "Automatic SQL injection and database takeover tool";
-      maintainers = with stdenv.lib.maintainers; [ bennofs ];
-    };
-  };
+  sqlmap = callPackage ../development/python-modules/sqlmap { };
 
   pgpdump = self.buildPythonPackage rec {
     name = "pgpdump-1.5";
@@ -22228,6 +22121,8 @@ in {
     doCheck = false;
   };
 
+  sphinxcontrib-websupport = callPackage ../development/python-modules/sphinxcontrib-websupport { };
+
   hieroglyph = callPackage ../development/python-modules/hieroglyph { };
 
   sphinx_rtd_theme = buildPythonPackage (rec {
@@ -25182,7 +25077,7 @@ EOF
     # Disable broken test
     # https://github.com/zeromq/pyzmq/issues/799
     checkPhase = ''
-      py.test $out/${python.sitePackages}/zmq/ -k "not test_large_send"
+      py.test $out/${python.sitePackages}/zmq/ -k "not test_large_send and not test_recv_json_cancelled"
     '';
   };
 
@@ -26318,6 +26213,8 @@ EOF
       paste six
     ];
 
+    disabled = isPy3k; # Judging from SyntaxError
+
     meta = with stdenv.lib; {
       description = "WSGIProxy gives tools to proxy arbitrary(ish) WSGI requests to other";
       homepage = "http://pythonpaste.org/wsgiproxy/";
@@ -27485,33 +27382,6 @@ EOF
     };
   };
 
-  bepasty-server = buildPythonPackage rec {
-    name = "bepasty-server-${version}";
-    version = "0.4.0";
-    propagatedBuildInputs = with self;[
-      flask
-      pygments
-      xstatic
-      xstatic-bootbox
-      xstatic-bootstrap
-      xstatic-jquery
-      xstatic-jquery-file-upload
-      xstatic-jquery-ui
-      xstatic-pygments
-    ];
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/b/bepasty/bepasty-${version}.tar.gz";
-      sha256 = "0bs79pgrjlnkmjfyj2hllbx3rw757va5w2g2aghi9cydmsl7gyi4";
-    };
-
-    meta = {
-      homepage = http://github.com/bepasty/bepasty-server;
-      description = "Binary pastebin server";
-      license = licenses.mit;
-      maintainers = [ maintainers.makefu ];
-    };
-  };
-
   xgboost = buildPythonPackage rec {
     name = "xgboost-${version}";