summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorMatthew Justin Bauer <mjbauer95@gmail.com>2018-04-21 14:48:30 -0500
committerGitHub <noreply@github.com>2018-04-21 14:48:30 -0500
commit7a516cd0c3ee89c4b180d2d7a5b9e7c1a77bc677 (patch)
tree47edc96c97ea1f6aa7735a283f637227f1559bc1 /pkgs/servers
parenta2e40f72547a888066698a41fa54ca4c675aaad0 (diff)
parentdff29c676b07ce0f9e7de5bd4281c92717225401 (diff)
downloadnixpkgs-7a516cd0c3ee89c4b180d2d7a5b9e7c1a77bc677.tar
nixpkgs-7a516cd0c3ee89c4b180d2d7a5b9e7c1a77bc677.tar.gz
nixpkgs-7a516cd0c3ee89c4b180d2d7a5b9e7c1a77bc677.tar.bz2
nixpkgs-7a516cd0c3ee89c4b180d2d7a5b9e7c1a77bc677.tar.lz
nixpkgs-7a516cd0c3ee89c4b180d2d7a5b9e7c1a77bc677.tar.xz
nixpkgs-7a516cd0c3ee89c4b180d2d7a5b9e7c1a77bc677.tar.zst
nixpkgs-7a516cd0c3ee89c4b180d2d7a5b9e7c1a77bc677.zip
Merge branch 'master' into feat/nsd/dnssec
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/amqp/qpid-cpp/default.nix60
-rw-r--r--pkgs/servers/amqp/rabbitmq-server/default.nix59
-rw-r--r--pkgs/servers/apcupsd/default.nix8
-rw-r--r--pkgs/servers/atlassian/confluence.nix4
-rw-r--r--pkgs/servers/atlassian/jira.nix4
-rw-r--r--pkgs/servers/bird/default.nix67
-rw-r--r--pkgs/servers/bird/dont-create-sysconfdir-1.patch (renamed from pkgs/servers/bird/dont-create-sysconfdir.patch)0
-rw-r--r--pkgs/servers/bird/dont-create-sysconfdir-2.patch13
-rw-r--r--pkgs/servers/caddy/default.nix4
-rw-r--r--pkgs/servers/clickhouse/default.nix9
-rw-r--r--pkgs/servers/computing/slurm-spank-x11/default.nix39
-rw-r--r--pkgs/servers/computing/slurm/default.nix10
-rw-r--r--pkgs/servers/computing/storm/default.nix7
-rw-r--r--pkgs/servers/computing/torque/default.nix3
-rw-r--r--pkgs/servers/corosync/default.nix4
-rw-r--r--pkgs/servers/coturn/default.nix4
-rw-r--r--pkgs/servers/dante/default.nix4
-rw-r--r--pkgs/servers/dico/default.nix4
-rw-r--r--pkgs/servers/dict/default.nix8
-rw-r--r--pkgs/servers/dict/dictd-wiktionary.nix2
-rw-r--r--pkgs/servers/dict/dictd-wordnet.nix4
-rw-r--r--pkgs/servers/dict/libmaa.nix2
-rw-r--r--pkgs/servers/diod/default.nix4
-rw-r--r--pkgs/servers/dns/bind/darwin-openssl-linking-fix.patch4
-rw-r--r--pkgs/servers/dns/bind/default.nix22
-rw-r--r--pkgs/servers/dns/bind/dont-keep-configure-flags.patch49
-rw-r--r--pkgs/servers/dns/knot-dns/default.nix10
-rw-r--r--pkgs/servers/dns/knot-resolver/default.nix78
-rw-r--r--pkgs/servers/dns/nsd/default.nix16
-rw-r--r--pkgs/servers/dns/pdns-recursor/default.nix13
-rw-r--r--pkgs/servers/dns/powerdns/default.nix26
-rw-r--r--pkgs/servers/dns/powerdns/skip-sha384-test.patch14
-rw-r--r--pkgs/servers/emby/default.nix4
-rw-r--r--pkgs/servers/etcd/default.nix4
-rw-r--r--pkgs/servers/fcgiwrap/default.nix1
-rw-r--r--pkgs/servers/fleet/default.nix4
-rw-r--r--pkgs/servers/freeradius/default.nix10
-rw-r--r--pkgs/servers/ftp/bftpd/default.nix4
-rw-r--r--pkgs/servers/ftp/pure-ftpd/default.nix6
-rw-r--r--pkgs/servers/games/ghost-one/default.nix55
-rw-r--r--pkgs/servers/gotty/default.nix2
-rw-r--r--pkgs/servers/gpm/default.nix4
-rw-r--r--pkgs/servers/gpsd/default.nix4
-rw-r--r--pkgs/servers/home-assistant/appdaemon.nix57
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix463
-rw-r--r--pkgs/servers/home-assistant/default.nix108
-rw-r--r--pkgs/servers/home-assistant/frontend.nix13
-rwxr-xr-xpkgs/servers/home-assistant/parse-requirements.py114
-rw-r--r--pkgs/servers/http/apache-httpd/2.4.nix10
-rw-r--r--pkgs/servers/http/apache-modules/mod_wsgi/default.nix4
-rw-r--r--pkgs/servers/http/apt-cacher-ng/default.nix21
-rw-r--r--pkgs/servers/http/couchdb/2.0.0.nix7
-rw-r--r--pkgs/servers/http/couchdb/default.nix22
-rw-r--r--pkgs/servers/http/gatling/default.nix6
-rw-r--r--pkgs/servers/http/h2o/default.nix30
-rw-r--r--pkgs/servers/http/hiawatha/default.nix6
-rw-r--r--pkgs/servers/http/jetty/default.nix7
-rw-r--r--pkgs/servers/http/lighttpd/default.nix12
-rw-r--r--pkgs/servers/http/lwan/default.nix35
-rw-r--r--pkgs/servers/http/nginx/generic.nix2
-rw-r--r--pkgs/servers/http/nginx/mainline.nix4
-rw-r--r--pkgs/servers/http/nginx/modules.nix39
-rw-r--r--pkgs/servers/http/openresty/default.nix41
-rw-r--r--pkgs/servers/http/pshs/default.nix4
-rw-r--r--pkgs/servers/http/thttpd/default.nix4
-rw-r--r--pkgs/servers/http/tomcat/default.nix18
-rw-r--r--pkgs/servers/http/yaws/default.nix4
-rw-r--r--pkgs/servers/identd/oidentd/default.nix7
-rw-r--r--pkgs/servers/inginious/default.nix1
-rw-r--r--pkgs/servers/interlock/default.nix9
-rw-r--r--pkgs/servers/irc/ircd-hybrid/default.nix4
-rw-r--r--pkgs/servers/irc/ngircd/default.nix2
-rw-r--r--pkgs/servers/irker/default.nix6
-rw-r--r--pkgs/servers/isso/default.nix54
-rw-r--r--pkgs/servers/jackett/default.nix4
-rw-r--r--pkgs/servers/mail/archiveopteryx/default.nix7
-rw-r--r--pkgs/servers/mail/clamsmtp/default.nix22
-rw-r--r--pkgs/servers/mail/clamsmtp/header-order.patch25
-rw-r--r--pkgs/servers/mail/dovecot/default.nix24
-rw-r--r--pkgs/servers/mail/dovecot/plugins/antispam/default.nix34
-rw-r--r--pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix8
-rw-r--r--pkgs/servers/mail/dspam/default.nix6
-rw-r--r--pkgs/servers/mail/exim/default.nix24
-rw-r--r--pkgs/servers/mail/mailman/default.nix2
-rw-r--r--pkgs/servers/mail/mlmmj/default.nix4
-rw-r--r--pkgs/servers/mail/opensmtpd/extras.nix12
-rw-r--r--pkgs/servers/mail/postfix/default.nix12
-rw-r--r--pkgs/servers/mail/postgrey/default.nix6
-rw-r--r--pkgs/servers/mail/pypolicyd-spf/default.nix26
-rw-r--r--pkgs/servers/mail/rspamd/default.nix8
-rw-r--r--pkgs/servers/matrix-synapse/default.nix20
-rw-r--r--pkgs/servers/matterbridge/default.nix4
-rw-r--r--pkgs/servers/mattermost/default.nix19
-rw-r--r--pkgs/servers/mattermost/matterircd.nix6
-rw-r--r--pkgs/servers/memcached/default.nix5
-rw-r--r--pkgs/servers/metabase/default.nix27
-rw-r--r--pkgs/servers/minio/default.nix42
-rw-r--r--pkgs/servers/misc/airsonic/default.nix4
-rw-r--r--pkgs/servers/misc/client-ip-echo/client-ip-echo.nix1
-rw-r--r--pkgs/servers/misc/subsonic/default.nix4
-rw-r--r--pkgs/servers/misc/taskserver/default.nix2
-rw-r--r--pkgs/servers/monitoring/cadvisor/default.nix6
-rw-r--r--pkgs/servers/monitoring/fusion-inventory/default.nix44
-rw-r--r--pkgs/servers/monitoring/fusion-inventory/remove_software_test.patch23
-rw-r--r--pkgs/servers/monitoring/grafana/default.nix14
-rw-r--r--pkgs/servers/monitoring/heapster/default.nix2
-rw-r--r--pkgs/servers/monitoring/kapacitor/default.nix4
-rw-r--r--pkgs/servers/monitoring/longview/default.nix2
-rw-r--r--pkgs/servers/monitoring/munin/adding_sconfdir_munin-node.patch41
-rw-r--r--pkgs/servers/monitoring/munin/default.nix11
-rw-r--r--pkgs/servers/monitoring/munin/preserve_environment.patch41
-rw-r--r--pkgs/servers/monitoring/nagios/default.nix6
-rw-r--r--pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix4
-rw-r--r--pkgs/servers/monitoring/net-snmp/default.nix15
-rw-r--r--pkgs/servers/monitoring/plugins/default.nix2
-rw-r--r--pkgs/servers/monitoring/plugins/esxi.nix2
-rw-r--r--pkgs/servers/monitoring/plugins/labs_consol_de.nix6
-rw-r--r--pkgs/servers/monitoring/plugins/uptime.nix2
-rw-r--r--pkgs/servers/monitoring/prometheus/alertmanager.nix18
-rw-r--r--pkgs/servers/monitoring/prometheus/blackbox-exporter.nix4
-rw-r--r--pkgs/servers/monitoring/prometheus/default.nix80
-rw-r--r--pkgs/servers/monitoring/prometheus/dovecot-exporter-deps.nix93
-rw-r--r--pkgs/servers/monitoring/prometheus/dovecot-exporter.nix24
-rw-r--r--pkgs/servers/monitoring/prometheus/minio-exporter/default.nix15
-rw-r--r--pkgs/servers/monitoring/prometheus/minio-exporter/deps.nix84
-rw-r--r--pkgs/servers/monitoring/prometheus/node-exporter.nix4
-rw-r--r--pkgs/servers/monitoring/prometheus/postfix-exporter-deps.nix84
-rw-r--r--pkgs/servers/monitoring/prometheus/postfix-exporter.nix32
-rw-r--r--pkgs/servers/monitoring/prometheus/rabbitmq-exporter.nix26
-rw-r--r--pkgs/servers/monitoring/prometheus/rabbitmq-exporter_deps.nix165
-rw-r--r--pkgs/servers/monitoring/riemann/default.nix4
-rw-r--r--pkgs/servers/monitoring/sensu/default.nix2
-rw-r--r--pkgs/servers/monitoring/telegraf/default.nix4
-rw-r--r--pkgs/servers/monitoring/telegraf/deps-1.5.3.nix (renamed from pkgs/servers/monitoring/telegraf/deps-1.4.4.nix)47
-rw-r--r--pkgs/servers/monitoring/uchiwa/bower-packages.nix14
-rw-r--r--pkgs/servers/monitoring/uchiwa/src.nix4
-rwxr-xr-xpkgs/servers/monitoring/uchiwa/update.sh42
-rw-r--r--pkgs/servers/monitoring/zabbix/2.0.nix4
-rw-r--r--pkgs/servers/monitoring/zabbix/2.2.nix4
-rw-r--r--pkgs/servers/monitoring/zabbix/default.nix4
-rw-r--r--pkgs/servers/mpd/clientlib.nix11
-rw-r--r--pkgs/servers/mpd/default.nix4
-rw-r--r--pkgs/servers/mqtt/mosquitto/default.nix4
-rw-r--r--pkgs/servers/neard/default.nix10
-rw-r--r--pkgs/servers/nextcloud/default.nix4
-rw-r--r--pkgs/servers/nextcloud/news-updater.nix4
-rw-r--r--pkgs/servers/nosql/apache-jena/fuseki-binary.nix6
-rw-r--r--pkgs/servers/nosql/arangodb/default.nix4
-rw-r--r--pkgs/servers/nosql/cassandra/2.1.nix4
-rw-r--r--pkgs/servers/nosql/cassandra/2.2.nix4
-rw-r--r--pkgs/servers/nosql/cassandra/3.0.nix4
-rw-r--r--pkgs/servers/nosql/cassandra/3.11.nix6
-rw-r--r--pkgs/servers/nosql/cassandra/generic.nix5
-rw-r--r--pkgs/servers/nosql/eventstore/default.nix4
-rw-r--r--pkgs/servers/nosql/influxdb/default.nix4
-rw-r--r--pkgs/servers/nosql/mongodb/default.nix10
-rw-r--r--pkgs/servers/nosql/neo4j/default.nix4
-rw-r--r--pkgs/servers/nosql/redis/default.nix14
-rw-r--r--pkgs/servers/nosql/riak-cs/2.1.1.nix2
-rw-r--r--pkgs/servers/oauth2_proxy/default.nix20
-rw-r--r--pkgs/servers/oauth2_proxy/deps.nix106
-rw-r--r--pkgs/servers/openafs-client/default.nix59
-rw-r--r--pkgs/servers/openafs/default.nix89
-rw-r--r--pkgs/servers/openafs/module.nix57
-rw-r--r--pkgs/servers/openafs/srcs.nix14
-rw-r--r--pkgs/servers/openafs/tsmbac.patch62
-rw-r--r--pkgs/servers/openpts/bugs.patch12
-rw-r--r--pkgs/servers/openpts/default.nix54
-rw-r--r--pkgs/servers/openpts/ptsc.patch28
-rw-r--r--pkgs/servers/openpts/tboot.patch21
-rw-r--r--pkgs/servers/openpts/zlib.patch12
-rw-r--r--pkgs/servers/osrm-backend/4.5.0-default-profile-path.template.patch13
-rw-r--r--pkgs/servers/osrm-backend/4.5.0-gcc-binutils.patch15
-rw-r--r--pkgs/servers/osrm-backend/default.nix17
-rw-r--r--pkgs/servers/owncloud/default.nix5
-rw-r--r--pkgs/servers/p910nd/default.nix1
-rw-r--r--pkgs/servers/polipo/default.nix5
-rw-r--r--pkgs/servers/prayer/default.nix1
-rw-r--r--pkgs/servers/pulseaudio/default.nix15
-rw-r--r--pkgs/servers/quagga/default.nix4
-rw-r--r--pkgs/servers/radarr/default.nix4
-rw-r--r--pkgs/servers/radicale/default.nix1
-rw-r--r--pkgs/servers/rpcbind/default.nix7
-rw-r--r--pkgs/servers/rt/default.nix4
-rw-r--r--pkgs/servers/sabnzbd/default.nix4
-rw-r--r--pkgs/servers/samba/4.x-no-persistent-install-dynconfig.patch15
-rw-r--r--pkgs/servers/samba/4.x-no-persistent-install.patch15
-rw-r--r--pkgs/servers/samba/4.x.nix11
-rw-r--r--pkgs/servers/samba/master.nix29
-rw-r--r--pkgs/servers/samba/patch-source3__libads__kerberos_keytab.c.patch20
-rw-r--r--pkgs/servers/search/elasticsearch/2.x.nix9
-rw-r--r--pkgs/servers/search/elasticsearch/5.x.nix11
-rw-r--r--pkgs/servers/search/elasticsearch/6.x.nix41
-rw-r--r--pkgs/servers/search/elasticsearch/default.nix9
-rw-r--r--pkgs/servers/search/elasticsearch/es-home-6.x.patch26
-rw-r--r--pkgs/servers/search/groonga/default.nix4
-rw-r--r--pkgs/servers/search/sphinxsearch/default.nix4
-rw-r--r--pkgs/servers/serviio/default.nix30
-rw-r--r--pkgs/servers/shairplay/default.nix35
-rw-r--r--pkgs/servers/shairport-sync/default.nix4
-rw-r--r--pkgs/servers/shishi/default.nix2
-rw-r--r--pkgs/servers/simplehttp2server/default.nix25
-rw-r--r--pkgs/servers/simplehttp2server/deps.nix12
-rw-r--r--pkgs/servers/sip/freeswitch/default.nix4
-rw-r--r--pkgs/servers/smcroute/default.nix4
-rw-r--r--pkgs/servers/softether/4.18.nix6
-rw-r--r--pkgs/servers/softether/4.20.nix6
-rw-r--r--pkgs/servers/softether/4.25.nix53
-rw-r--r--pkgs/servers/sonarr/default.nix4
-rw-r--r--pkgs/servers/sql/cockroachdb/default.nix7
-rw-r--r--pkgs/servers/sql/mariadb/clang-isfinite.patch17
-rw-r--r--pkgs/servers/sql/mariadb/cmake-includedir.patch11
-rw-r--r--pkgs/servers/sql/mariadb/default.nix93
-rw-r--r--pkgs/servers/sql/mysql/5.5.x.nix15
-rw-r--r--pkgs/servers/sql/mysql/5.7.x.nix30
-rw-r--r--pkgs/servers/sql/mysql/jdbc/default.nix4
-rw-r--r--pkgs/servers/sql/oracle-xe/default.nix2
-rw-r--r--pkgs/servers/sql/percona/5.6.x.nix1
-rw-r--r--pkgs/servers/sql/pgbouncer/default.nix20
-rw-r--r--pkgs/servers/sql/pgpool/default.nix8
-rw-r--r--pkgs/servers/sql/pgpool/pgpool-II-3.4.14-glibc-2.26.patch12
-rw-r--r--pkgs/servers/sql/postgresql/cstore_fdw/default.nix32
-rw-r--r--pkgs/servers/sql/postgresql/default.nix38
-rw-r--r--pkgs/servers/sql/postgresql/jdbc/default.nix25
-rw-r--r--pkgs/servers/sql/postgresql/pg_cron/default.nix31
-rw-r--r--pkgs/servers/sql/postgresql/pg_hll/default.nix31
-rw-r--r--pkgs/servers/sql/postgresql/pg_repack/default.nix13
-rw-r--r--pkgs/servers/sql/postgresql/pgroonga/default.nix4
-rw-r--r--pkgs/servers/sql/postgresql/pgtap/default.nix4
-rw-r--r--pkgs/servers/sql/postgresql/timescaledb/default.nix36
-rw-r--r--pkgs/servers/sql/postgresql/topn/default.nix32
-rw-r--r--pkgs/servers/sql/sqlite/jdbc/default.nix26
-rw-r--r--pkgs/servers/sql/virtuoso/7.x.nix4
-rw-r--r--pkgs/servers/squid/4.nix15
-rw-r--r--pkgs/servers/squid/default.nix20
-rw-r--r--pkgs/servers/sslh/default.nix8
-rw-r--r--pkgs/servers/teleport/default.nix41
-rw-r--r--pkgs/servers/traefik/default.nix19
-rw-r--r--pkgs/servers/trezord/default.nix65
-rw-r--r--pkgs/servers/trezord/dynamic-link.patch18
-rw-r--r--pkgs/servers/tt-rss/default.nix15
-rw-r--r--pkgs/servers/tvheadend/default.nix7
-rw-r--r--pkgs/servers/uftp/default.nix4
-rw-r--r--pkgs/servers/unifi/default.nix4
-rw-r--r--pkgs/servers/uwsgi/default.nix10
-rw-r--r--pkgs/servers/varnish/default.nix78
-rw-r--r--pkgs/servers/varnish/digest.nix10
-rw-r--r--pkgs/servers/varnish/dynamic.nix26
-rw-r--r--pkgs/servers/varnish/geoip.nix2
-rw-r--r--pkgs/servers/varnish/modules.nix23
-rw-r--r--pkgs/servers/varnish/packages.nix22
-rw-r--r--pkgs/servers/varnish/rtstatus.nix2
-rw-r--r--pkgs/servers/web-apps/fileshelter/default.nix30
-rw-r--r--pkgs/servers/web-apps/frab/Gemfile.lock2
-rw-r--r--pkgs/servers/web-apps/frab/gemset.nix6
-rw-r--r--pkgs/servers/web-apps/klaus/default.nix40
-rw-r--r--pkgs/servers/web-apps/matomo/bootstrap.php (renamed from pkgs/servers/web-apps/piwik/bootstrap.php)0
-rw-r--r--pkgs/servers/web-apps/matomo/default.nix59
-rw-r--r--pkgs/servers/web-apps/matomo/make-localhost-default-database-host.patch13
-rw-r--r--pkgs/servers/web-apps/piwik/default.nix51
-rw-r--r--pkgs/servers/web-apps/pump.io/composition.nix16
-rw-r--r--pkgs/servers/web-apps/pump.io/default.nix53
-rwxr-xr-xpkgs/servers/web-apps/pump.io/generate.sh37
-rw-r--r--pkgs/servers/web-apps/pump.io/node-packages.json7
-rw-r--r--pkgs/servers/web-apps/pump.io/node-packages.nix4889
-rw-r--r--pkgs/servers/web-apps/restya-board/default.nix50
-rw-r--r--pkgs/servers/web-apps/restya-board/fix_request-uri.patch12
-rw-r--r--pkgs/servers/web-apps/searx/default.nix35
-rw-r--r--pkgs/servers/web-apps/shaarli/default.nix4
-rw-r--r--pkgs/servers/web-apps/shaarli/material-theme.nix8
-rw-r--r--pkgs/servers/web-apps/wallabag/default.nix21
-rw-r--r--pkgs/servers/web-apps/wallabag/wallabag-data.patch26
-rw-r--r--pkgs/servers/web-apps/wordpress/default.nix4
-rw-r--r--pkgs/servers/x11/quartz-wm/default.nix8
-rw-r--r--pkgs/servers/x11/xorg/builder.sh21
-rw-r--r--pkgs/servers/x11/xorg/default.nix97
-rwxr-xr-xpkgs/servers/x11/xorg/generate-expr-from-tarballs.pl9
-rw-r--r--pkgs/servers/x11/xorg/overrides.nix64
-rw-r--r--pkgs/servers/x11/xorg/tarballs-7.7.list15
-rw-r--r--pkgs/servers/x11/xorg/xcb-util-xrm.nix8
-rw-r--r--pkgs/servers/xmpp/biboumi/default.nix11
-rw-r--r--pkgs/servers/xmpp/ejabberd/default.nix23
-rw-r--r--pkgs/servers/xmpp/prosody/default.nix39
-rw-r--r--pkgs/servers/zookeeper/default.nix4
284 files changed, 4240 insertions, 6532 deletions
diff --git a/pkgs/servers/amqp/qpid-cpp/default.nix b/pkgs/servers/amqp/qpid-cpp/default.nix
index 6c256d14fe7..a838fa3b904 100644
--- a/pkgs/servers/amqp/qpid-cpp/default.nix
+++ b/pkgs/servers/amqp/qpid-cpp/default.nix
@@ -1,33 +1,53 @@
-{ stdenv, fetchurl, cmake, python2, boost, libuuid, ruby }:
+{ stdenv, fetchurl, cmake, python2, boost, libuuid, ruby, buildEnv, buildPythonPackage, qpid-python }:
 
-stdenv.mkDerivation rec {
+let
   name = "qpid-cpp-${version}";
-
-  version = "0.34";
+  version = "1.37.0";
 
   src = fetchurl {
     url = "mirror://apache/qpid/cpp/${version}/${name}.tar.gz";
-    sha256 = "07ibwvw5lm7xabv32zai5x03r7l9mxm0zk7h9lbfkzmav0f41w0w";
+    sha256 = "1s4hyi867i0lqn81c1crrk6fga1gmsv61675vjv5v41skz56lrsb";
   };
 
-  buildInputs = [ cmake python2 boost libuuid ruby ];
-
-  # the subdir managementgen wants to install python stuff in ${python} and
-  # the installation tries to create some folders in /var
-  patchPhase = ''
-    sed -i '/managementgen/d' CMakeLists.txt
-    sed -i '/ENV/d' src/CMakeLists.txt
-  '';
-
-  NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations -Wno-error=unused-function";
-
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://qpid.apache.org;
     repositories.git = git://git.apache.org/qpid.git;
     repositories.svn = http://svn.apache.org/repos/asf/qpid;
     description = "An AMQP message broker and a C++ messaging API";
-    license = stdenv.lib.licenses.asl20;
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.cpages ];
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ cpages ma27 ];
+  };
+
+  qpid-cpp = stdenv.mkDerivation {
+    inherit src meta name;
+
+    nativeBuildInputs = [ cmake ];
+    buildInputs = [ boost libuuid ruby python2 ];
+
+    # the subdir managementgen wants to install python stuff in ${python} and
+    # the installation tries to create some folders in /var
+    postPatch = ''
+      sed -i '/managementgen/d' CMakeLists.txt
+      sed -i '/ENV/d' src/CMakeLists.txt
+      sed -i '/management/d' CMakeLists.txt
+    '';
+
+    NIX_CFLAGS_COMPILE = [
+      "-Wno-error=deprecated-declarations"
+      "-Wno-error=unused-function"
+      "-Wno-error=int-in-bool-context"
+    ];
+  };
+
+  python-frontend = buildPythonPackage {
+    inherit name meta src;
+
+    sourceRoot = "${name}/management/python";
+
+    propagatedBuildInputs = [ qpid-python ];
   };
+in buildEnv {
+  name = "${name}-env";
+  paths = [ qpid-cpp python-frontend ];
 }
diff --git a/pkgs/servers/amqp/rabbitmq-server/default.nix b/pkgs/servers/amqp/rabbitmq-server/default.nix
index 889ec4d3745..3d4a8902c91 100644
--- a/pkgs/servers/amqp/rabbitmq-server/default.nix
+++ b/pkgs/servers/amqp/rabbitmq-server/default.nix
@@ -1,40 +1,73 @@
-{ stdenv, fetchurl, erlang, python, libxml2, libxslt, xmlto
+{ stdenv, fetchurl, runCommand
+, erlang, python, libxml2, libxslt, xmlto
 , docbook_xml_dtd_45, docbook_xsl, zip, unzip, rsync
 
 , AppKit, Carbon, Cocoa
 }:
 
-stdenv.mkDerivation rec {
-  name = "rabbitmq-server-${version}";
+let
+  # we only need that one glibc binary (28k instead of 2.7M)
+  getconf = runCommand "getconf" {} ''
+    install -D ${stdenv.lib.getBin stdenv.cc.libc}/bin/getconf $out/bin/getconf
+  '';
 
-  version = "3.6.10";
+in stdenv.mkDerivation rec {
+  name = "rabbitmq-server-${version}";
+  version = "3.6.15";
 
   src = fetchurl {
     url = "https://www.rabbitmq.com/releases/rabbitmq-server/v${version}/${name}.tar.xz";
-    sha256 = "0k1rhg1a51201b1hp6vaf4fk48hqz7m9hw55b8xnnyz2ld88jiqg";
+    sha256 = "1zdmil657mhjmd20jv47s5dfpj2liqwvyg0zv2ky3akanfpgj98y";
   };
 
   buildInputs =
     [ erlang python libxml2 libxslt xmlto docbook_xml_dtd_45 docbook_xsl zip unzip rsync ]
     ++ stdenv.lib.optionals stdenv.isDarwin [ AppKit Carbon Cocoa ];
 
-  preBuild =
-    ''
-      # Fix the "/usr/bin/env" in "calculate-relative".
-      patchShebangs .
-    '';
+  outputs = [ "out" "man" "doc" ];
+
+  postPatch = with stdenv.lib; ''
+    # patch the path to getconf
+    substituteInPlace deps/rabbit_common/src/vm_memory_monitor.erl \
+      --replace "getconf PAGESIZE" "${getconf}/bin/getconf PAGESIZE"
+  '';
+
+  preBuild = ''
+    # Fix the "/usr/bin/env" in "calculate-relative".
+    patchShebangs .
+  '';
 
   installFlags = "PREFIX=$(out) RMQ_ERLAPP_DIR=$(out)";
   installTargets = "install install-man";
 
-  postInstall =
-    ''
-      echo 'PATH=${erlang}/bin:''${PATH:+:}$PATH' >> $out/sbin/rabbitmq-env
+  postInstall = ''
+    echo 'PATH=${erlang}/bin:''${PATH:+:}$PATH' >> $out/sbin/rabbitmq-env
+
+    # we know exactly where rabbitmq is gonna be,
+    # so we patch that into the env-script
+    substituteInPlace $out/sbin/rabbitmq-env \
+      --replace 'RABBITMQ_SCRIPTS_DIR=`dirname $SCRIPT_PATH`' \
+                "RABBITMQ_SCRIPTS_DIR=$out/sbin"
+
+    # there’s a few stray files that belong into share
+    mkdir -p $doc/share/doc/rabbitmq-server
+    mv $out/LICENSE* $doc/share/doc/rabbitmq-server
+
+    # and an unecessarily copied INSTALL file
+    rm $out/INSTALL
+
+    # patched into a source file above;
+    # needs to be explicitely passed to not be stripped by fixup
+    mkdir -p $out/nix-support
+    echo "${getconf}" > $out/nix-support/dont-strip-getconf
+
     '';
 
   meta = {
     homepage = http://www.rabbitmq.com/;
     description = "An implementation of the AMQP messaging protocol";
+    license = stdenv.lib.licenses.mpl11;
     platforms = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.lib.maintainers; [ Profpatsch ];
   };
 }
diff --git a/pkgs/servers/apcupsd/default.nix b/pkgs/servers/apcupsd/default.nix
index 3b67171a474..bec61d460a7 100644
--- a/pkgs/servers/apcupsd/default.nix
+++ b/pkgs/servers/apcupsd/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, systemd, utillinux, coreutils, nettools, man
+{ stdenv, fetchurl, pkgconfig, systemd, utillinux, coreutils, wall, hostname, man
 , enableCgiScripts ? true, gd
 }:
 
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
   # There is no real reason for a bin/sbin split, so just use bin.
   preConfigure = ''
     export ac_cv_path_SHUTDOWN=${systemd}/sbin/shutdown
-    export ac_cv_path_WALL=${utillinux}/bin/wall
+    export ac_cv_path_WALL=${wall}/bin/wall
     sed -i 's|/bin/cat|${coreutils}/bin/cat|' configure
     export configureFlags="\
         --bindir=$out/bin \
@@ -46,8 +46,8 @@ stdenv.mkDerivation rec {
 
   postInstall = ''
     for file in "$out"/etc/apcupsd/*; do
-        sed -i -e 's|^WALL=.*|WALL="${utillinux}/bin/wall"|g' \
-               -e 's|^HOSTNAME=.*|HOSTNAME=`${nettools}/bin/hostname`|g' \
+        sed -i -e 's|^WALL=.*|WALL="${wall}/bin/wall"|g' \
+               -e 's|^HOSTNAME=.*|HOSTNAME=`${hostname}/bin/hostname`|g' \
                "$file"
     done
   '';
diff --git a/pkgs/servers/atlassian/confluence.nix b/pkgs/servers/atlassian/confluence.nix
index aad2f69bfa6..a5d89b493e8 100644
--- a/pkgs/servers/atlassian/confluence.nix
+++ b/pkgs/servers/atlassian/confluence.nix
@@ -5,11 +5,11 @@
 
 stdenv.mkDerivation rec {
   name = "atlassian-confluence-${version}";
-  version = "6.5.0";
+  version = "6.6.1";
 
   src = fetchurl {
     url = "https://www.atlassian.com/software/confluence/downloads/binary/${name}.tar.gz";
-    sha256 = "1prac65yczrarb38vvlp7srrhd4gb1zi5v88myfkp6rhwfrdxd0n";
+    sha256 = "0nb8rjzfd0fqd9k1yxa3dj7kxgh84dgbg9l8jyj59g74ym77qmw0";
   };
 
   phases = [ "unpackPhase" "buildPhase" "installPhase" ];
diff --git a/pkgs/servers/atlassian/jira.nix b/pkgs/servers/atlassian/jira.nix
index b99cf57e08b..fd34c1f4385 100644
--- a/pkgs/servers/atlassian/jira.nix
+++ b/pkgs/servers/atlassian/jira.nix
@@ -5,11 +5,11 @@
 
 stdenv.mkDerivation rec {
   name = "atlassian-jira-${version}";
-  version = "7.5.2";
+  version = "7.9.0";
 
   src = fetchurl {
     url = "https://downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-${version}.tar.gz";
-    sha256 = "00x00q6k4sb89aipqd28lgn8l7k7w33dpg18r1dn6l7rws1mazfx";
+    sha256 = "1xj04a78dhjzb2ms875lfg5s3qc8rw31fws92yhmbs0k1866g33b";
   };
 
   phases = [ "unpackPhase" "buildPhase" "installPhase" "fixupPhase" ];
diff --git a/pkgs/servers/bird/default.nix b/pkgs/servers/bird/default.nix
index 0e77aa1d8ee..94bd92abb4f 100644
--- a/pkgs/servers/bird/default.nix
+++ b/pkgs/servers/bird/default.nix
@@ -1,29 +1,54 @@
-{ stdenv, fetchurl, flex, bison, readline
-, enableIPv6 ? false }:
+{ lib, stdenv, fetchurl, flex, bison, readline }:
 
-stdenv.mkDerivation rec {
-  name = "bird-1.6.3";
+with lib;
 
-  src = fetchurl {
-    url = "ftp://bird.network.cz/pub/bird/${name}.tar.gz";
-    sha256 = "0z3yrxqb0p7f8b7r2gk4mvrwfzk45zx7yr9aifbvba1vgksiri9r";
-  };
+let
+
+  generic = { version, sha256, enableIPv6 ? false }:
+    stdenv.mkDerivation rec {
+      name = "bird-${version}";
+
+      src = fetchurl {
+        inherit sha256;
+        url = "ftp://bird.network.cz/pub/bird/${name}.tar.gz";
+      };
+
+      nativeBuildInputs = [ flex bison ];
+      buildInputs = [ readline ];
+
+      patches = [
+        (./. + (builtins.toPath "/dont-create-sysconfdir-${builtins.substring 0 1 version}.patch"))
+      ];
 
-  buildInputs = [ flex bison readline ];
+      configureFlags = [
+        "--localstatedir=/var"
+      ] ++ optional enableIPv6 "--enable-ipv6";
 
-  patches = [
-    ./dont-create-sysconfdir.patch
-  ];
+      meta = {
+        description = "BIRD Internet Routing Daemon";
+        homepage = http://bird.network.cz;
+        license = licenses.gpl2Plus;
+        maintainers = with maintainers; [ viric fpletz ];
+        platforms = platforms.linux;
+      };
+    };
 
-  configureFlags = [
-    "--localstatedir /var"
-  ] ++ stdenv.lib.optional enableIPv6 "--enable-ipv6";
+in
+
+{
+  bird = generic {
+    version = "1.6.3";
+    sha256 = "0z3yrxqb0p7f8b7r2gk4mvrwfzk45zx7yr9aifbvba1vgksiri9r";
+  };
+
+  bird6 = generic {
+    version = "1.6.3";
+    sha256 = "0z3yrxqb0p7f8b7r2gk4mvrwfzk45zx7yr9aifbvba1vgksiri9r";
+    enableIPv6 = true;
+  };
 
-  meta = {
-    description = "BIRD Internet Routing Daemon";
-    homepage = http://bird.network.cz;
-    license = stdenv.lib.licenses.gpl2Plus;
-    maintainers = with stdenv.lib.maintainers; [ viric fpletz ];
-    platforms  = stdenv.lib.platforms.linux;
+  bird2 = generic {
+    version = "2.0.2";
+    sha256 = "03s8hcl761y3489j1krarm3r3iy5qid26508i91yvy38ypb92pq3";
   };
 }
diff --git a/pkgs/servers/bird/dont-create-sysconfdir.patch b/pkgs/servers/bird/dont-create-sysconfdir-1.patch
index 0a11c8a2a8d..0a11c8a2a8d 100644
--- a/pkgs/servers/bird/dont-create-sysconfdir.patch
+++ b/pkgs/servers/bird/dont-create-sysconfdir-1.patch
diff --git a/pkgs/servers/bird/dont-create-sysconfdir-2.patch b/pkgs/servers/bird/dont-create-sysconfdir-2.patch
new file mode 100644
index 00000000000..fd86da8a129
--- /dev/null
+++ b/pkgs/servers/bird/dont-create-sysconfdir-2.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.in b/Makefile.in
+index fdd5e6c..45f81a1 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -165,7 +165,7 @@ tags:
+ # Install
+ 
+ install: all
+-	$(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/@runtimedir@
++	$(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir)
+ 	$(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/bird
+ 	$(INSTALL_PROGRAM) $(exedir)/birdcl $(DESTDIR)/$(sbindir)/birdcl
+ 	if test -n "@CLIENT@" ; then								\
diff --git a/pkgs/servers/caddy/default.nix b/pkgs/servers/caddy/default.nix
index c24780095db..d89e59d662e 100644
--- a/pkgs/servers/caddy/default.nix
+++ b/pkgs/servers/caddy/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "caddy-${version}";
-  version = "0.10.10";
+  version = "0.10.12";
 
   goPackagePath = "github.com/mholt/caddy";
 
@@ -12,7 +12,7 @@ buildGoPackage rec {
     owner = "mholt";
     repo = "caddy";
     rev = "v${version}";
-    sha256 = "1x7f1yz5vnsy9n50ak0vjrm4w8fqc1qvhv8fmqnsc8cgbp7f3p8w";
+    sha256 = "0vmgswln72qqay73z39qn135sl5k71zlybr2jdrcjlmp4i7hrf88";
   };
 
   buildFlagsArray = ''
diff --git a/pkgs/servers/clickhouse/default.nix b/pkgs/servers/clickhouse/default.nix
index cebff700e50..f4a6b47a45a 100644
--- a/pkgs/servers/clickhouse/default.nix
+++ b/pkgs/servers/clickhouse/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchFromGitHub, cmake, libtool, boost, double_conversion, gperftools, icu, libmysql, lz4, openssl, poco, re2, rdkafka, readline, sparsehash, unixODBC, zookeeper_mt, zstd }:
+{ stdenv, fetchFromGitHub, cmake, libtool, boost, double-conversion, gperftools
+, icu, mysql, lz4, openssl, poco, re2, rdkafka, readline, sparsehash, unixODBC
+, zookeeper_mt, zstd }:
 
 stdenv.mkDerivation rec {
   name = "clickhouse-${version}";
@@ -16,7 +18,10 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake libtool ];
 
-  buildInputs = [ boost double_conversion gperftools icu libmysql lz4 openssl poco re2 rdkafka readline sparsehash unixODBC zookeeper_mt zstd ];
+  buildInputs = [
+    boost double-conversion gperftools icu mysql.connector-c lz4 openssl poco
+    re2 rdkafka readline sparsehash unixODBC zookeeper_mt zstd
+  ];
 
   cmakeFlags = [ "-DENABLE_TESTS=OFF" "-DUNBUNDLED=ON" "-DUSE_STATIC_LIBRARIES=OFF" ];
 
diff --git a/pkgs/servers/computing/slurm-spank-x11/default.nix b/pkgs/servers/computing/slurm-spank-x11/default.nix
new file mode 100644
index 00000000000..13fad7059af
--- /dev/null
+++ b/pkgs/servers/computing/slurm-spank-x11/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchFromGitHub, slurm } :
+let
+  version = "0.2.5";
+in
+stdenv.mkDerivation {
+  name = "slurm-spank-x11-${version}";
+  version = version;
+
+  src = fetchFromGitHub {
+    owner = "hautreux";
+    repo = "slurm-spank-x11";
+    rev = version;
+    sha256 = "1dmsr7whxcxwnlvl1x4s3bqr5cr6q5ssb28vqi67w5hj4sshisry";
+  };
+
+  buildPhase = ''
+      gcc -DX11_LIBEXEC_PROG="\"$out/bin/slurm-spank-x11\"" \
+          -g -o slurm-spank-x11 slurm-spank-x11.c
+      gcc -I${slurm.dev}/include -DX11_LIBEXEC_PROG="\"$out/bin/slurm-spank-x11\"" -shared -fPIC \
+          -g -o x11.so slurm-spank-x11-plug.c
+    '';
+
+  installPhase = ''
+      mkdir -p $out/bin $out/lib
+      install -m 755 slurm-spank-x11 $out/bin
+      install -m 755 x11.so $out/lib
+    '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/hautreux/slurm-spank-x11;
+    description = "Plugin for SLURM to allow for interactive X11 sessions";
+    platforms = platforms.linux;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ markuskowa ];
+  };
+}
+
+
+
diff --git a/pkgs/servers/computing/slurm/default.nix b/pkgs/servers/computing/slurm/default.nix
index 69afd479af3..b0460f21bfa 100644
--- a/pkgs/servers/computing/slurm/default.nix
+++ b/pkgs/servers/computing/slurm/default.nix
@@ -4,11 +4,11 @@
 
 stdenv.mkDerivation rec {
   name = "slurm-${version}";
-  version = "17.02.6";
+  version = "17.11.5";
 
   src = fetchurl {
-    url = "https://www.schedmd.com/downloads/latest/slurm-17.02.6.tar.bz2";
-    sha256 = "1sp4xg15jc569r6dh61svgk2fmy3ndcgr5358yryajslf1w14mzh";
+    url = "https://download.schedmd.com/slurm/${name}.tar.bz2";
+    sha256 = "07ghyyz12k4rksm06xf7dshwp1ndm13zphdbqja99401q4xwbx9r";
   };
 
   outputs = [ "out" "dev" ];
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig libtool ];
   buildInputs = [
-    curl python munge perl pam openssl mysql.lib ncurses gtk2 lua hwloc numactl
+    curl python munge perl pam openssl mysql.connector-c ncurses gtk2 lua hwloc numactl
   ];
 
   configureFlags =
@@ -38,6 +38,8 @@ stdenv.mkDerivation rec {
     rm -f $out/lib/*.la $out/lib/slurm/*.la
   '';
 
+  enableParallelBuilding = true;
+
   meta = with stdenv.lib; {
     homepage = http://www.schedmd.com/;
     description = "Simple Linux Utility for Resource Management";
diff --git a/pkgs/servers/computing/storm/default.nix b/pkgs/servers/computing/storm/default.nix
index 0219a1bf7ec..90c87f8019d 100644
--- a/pkgs/servers/computing/storm/default.nix
+++ b/pkgs/servers/computing/storm/default.nix
@@ -4,11 +4,11 @@
 
 stdenv.mkDerivation rec {
   name = "apache-storm-" + version;
-  version = "1.0.1";
+  version = "1.2.1";
   src = fetchurl {
     url =
     "mirror://apache/storm/${name}/${name}.tar.gz";
-    sha256 = "1gr00s0fhf8ci0faf3x5dinkiw9mlnc1x1vqki8cfszvij6w0x0m";
+    sha256 = "177dqgbviagrpvalg8h67mwiwwgmiqsg0hh97hcqqcjg71ypnjkv";
   };
 
   buildInputs = [ zip unzip jzmq ];
@@ -19,8 +19,7 @@ stdenv.mkDerivation rec {
     mv examples $out/share/${name}/.
 
     rm -f lib/jzmq* || exit 1
-    mv lib $out/.
-    mv external extlib* $out/lib/.
+    mv external extlib* lib $out/.
     mv conf bin $out/.
     mv log4j2 $out/conf/.
   '';
diff --git a/pkgs/servers/computing/torque/default.nix b/pkgs/servers/computing/torque/default.nix
index 9c4bc4bda73..35c830dff8a 100644
--- a/pkgs/servers/computing/torque/default.nix
+++ b/pkgs/servers/computing/torque/default.nix
@@ -16,6 +16,9 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  # added to fix build with gcc7
+  NIX_CFLAGS_COMPILE = [ "-fpermissive" ];
+
   preConfigure = ''
    substituteInPlace ./configure \
      --replace '/usr/bin/file' '${file}/bin/file'
diff --git a/pkgs/servers/corosync/default.nix b/pkgs/servers/corosync/default.nix
index dc2f0f6fd70..145052ff8c3 100644
--- a/pkgs/servers/corosync/default.nix
+++ b/pkgs/servers/corosync/default.nix
@@ -9,11 +9,11 @@
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
-  name = "corosync-2.4.2";
+  name = "corosync-2.4.3";
 
   src = fetchurl {
     url = "http://build.clusterlabs.org/corosync/releases/${name}.tar.gz";
-    sha256 = "1aab380mv4ivy5icmwvk7941jbs6ikm21p5ijk7brr4z608k0vpj";
+    sha256 = "15y5la04qn2lh1gabyifygzpa4dx3ndk5yhmaf7azxyjx0if9rxi";
   };
 
   nativeBuildInputs = [ makeWrapper pkgconfig ];
diff --git a/pkgs/servers/coturn/default.nix b/pkgs/servers/coturn/default.nix
index 8df584435a2..f83ef4cef38 100644
--- a/pkgs/servers/coturn/default.nix
+++ b/pkgs/servers/coturn/default.nix
@@ -4,13 +4,13 @@ let inherit (stdenv.lib) optional; in
 
 stdenv.mkDerivation rec {
   name = "coturn-${version}";
-  version = "4.5.0.6";
+  version = "4.5.0.7";
 
   src = fetchFromGitHub {
     owner = "coturn";
     repo = "coturn";
     rev = "${version}";
-    sha256 = "084c3zgwmmz4s6211i5jbkzsn13703lsg7vhc2cpacazq4sgsrhb";
+    sha256 = "1781fx8lqgc54j973xzgq9d7k3g2j03va82jb4217gd3a93pa65l";
   };
 
   buildInputs = [ openssl libevent ];
diff --git a/pkgs/servers/dante/default.nix b/pkgs/servers/dante/default.nix
index 044d4fa50ab..ee139ea2652 100644
--- a/pkgs/servers/dante/default.nix
+++ b/pkgs/servers/dante/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation (rec {
   name = "dante-${version}";
-  version = "1.4.1";
+  version = "1.4.2";
 
   src = fetchurl {
     url = "https://www.inet.no/dante/files/${name}.tar.gz";
-    sha256 = "0lsg3hk8zd2h9f08s13bn4l4pvyyzkj4gr4ppwa7vj7gdyyk5lmn";
+    sha256 = "1bfafnm445afrmyxvvcl8ckq0p59yzykmr3y8qvryzrscd85g8ms";
   };
 
   configureFlags = [
diff --git a/pkgs/servers/dico/default.nix b/pkgs/servers/dico/default.nix
index c530929f79e..8958daa1a70 100644
--- a/pkgs/servers/dico/default.nix
+++ b/pkgs/servers/dico/default.nix
@@ -2,11 +2,11 @@
 , guile, python, pcre, libffi, groff }:
 
 stdenv.mkDerivation rec {
-  name = "dico-2.4";
+  name = "dico-2.5";
 
   src = fetchurl {
     url = "mirror://gnu/dico/${name}.tar.xz";
-    sha256 = "13m7vahfbdj7hb38bjgd4cmfswavvxrcpppj9n4m4rar3wyzg52g";
+    sha256 = "0szm3z4xvq0pjj8kxl4paq63byamf281kzn1la0cdm5ngavypxxq";
   };
 
   hardeningDisable = [ "format" ];
diff --git a/pkgs/servers/dict/default.nix b/pkgs/servers/dict/default.nix
index 0e6c39ec924..6868c0f8166 100644
--- a/pkgs/servers/dict/default.nix
+++ b/pkgs/servers/dict/default.nix
@@ -13,7 +13,11 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ bison flex libtool which ];
 
-  enableParallelBuilding = true;
+  # Makefile(.in) contains "clientparse.c clientparse.h: clientparse.y" which
+  # causes bison to run twice, and break the build when this happens in
+  # parallel.  Test with "make -j clientparse.c clientparse.h".  The error
+  # message may be "mv: cannot move 'y.tab.c' to 'clientparse.c'".
+  enableParallelBuilding = false;
 
   patchPhase = "patch -p0 < ${./buildfix.diff}";
   configureFlags = [
@@ -25,7 +29,7 @@ stdenv.mkDerivation rec {
     description = "Dict protocol server and client";
     homepage    = http://www.dict.org;
     license     = licenses.gpl2;
-    maintainers = with maintainers; [ mornfall ];
+    maintainers = with maintainers; [ ];
     platforms   = platforms.linux;
   };
 }
diff --git a/pkgs/servers/dict/dictd-wiktionary.nix b/pkgs/servers/dict/dictd-wiktionary.nix
index 8637d043836..13e4757fe89 100644
--- a/pkgs/servers/dict/dictd-wiktionary.nix
+++ b/pkgs/servers/dict/dictd-wiktionary.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
   meta = {
     description = "DICT version of English Wiktionary";
     homepage = http://en.wiktionary.org/;
-    maintainers = [ stdenv.lib.maintainers.mornfall ];
+    maintainers = [ ];
     platforms = stdenv.lib.platforms.all;
   };
 }
diff --git a/pkgs/servers/dict/dictd-wordnet.nix b/pkgs/servers/dict/dictd-wordnet.nix
index b6680e8b21c..13a78d61098 100644
--- a/pkgs/servers/dict/dictd-wordnet.nix
+++ b/pkgs/servers/dict/dictd-wordnet.nix
@@ -28,9 +28,9 @@ stdenv.mkDerivation rec {
          the wordnet data available to dictd and by extension for lookup with
          the dict command. '';
 
-    homepage = http://wordnet.princeton.edu/;
+    homepage = https://wordnet.princeton.edu/;
 
-    maintainers = [ stdenv.lib.maintainers.mornfall ];
+    maintainers = [ ];
     platforms = stdenv.lib.platforms.all;
   };
 }
diff --git a/pkgs/servers/dict/libmaa.nix b/pkgs/servers/dict/libmaa.nix
index 833aaa95b0c..d35a9a68303 100644
--- a/pkgs/servers/dict/libmaa.nix
+++ b/pkgs/servers/dict/libmaa.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "Dict protocol server and client";
-    maintainers = [ maintainers.mornfall ];
+    maintainers = [ ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/servers/diod/default.nix b/pkgs/servers/diod/default.nix
index dcda4e8c0bb..a233b6ba4cf 100644
--- a/pkgs/servers/diod/default.nix
+++ b/pkgs/servers/diod/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "diod-${version}";
-  version = "1.0.23";
+  version = "1.0.24";
 
   src = fetchurl {
     url = "https://github.com/chaos/diod/releases/download/${version}/${name}.tar.gz";
-    sha256 = "002vxc9fwdwshda4jydxagr63xd6nnhbc6fh73974gi2pvp6gid3";
+    sha256 = "17wckwfsqj61yixz53nwkc35z66arb1x3napahpi64m7q68jn7gl";
   };
 
   buildInputs = [ munge lua libcap perl ncurses ];
diff --git a/pkgs/servers/dns/bind/darwin-openssl-linking-fix.patch b/pkgs/servers/dns/bind/darwin-openssl-linking-fix.patch
index b7e7bfc73bf..8276c28c3f4 100644
--- a/pkgs/servers/dns/bind/darwin-openssl-linking-fix.patch
+++ b/pkgs/servers/dns/bind/darwin-openssl-linking-fix.patch
@@ -1,8 +1,8 @@
 diff --git a/configure b/configure
-index 6779cc3..4275520 100755
+index b9ad66b..a2a7382 100755
 --- a/configure
 +++ b/configure
-@@ -15707,21 +15707,6 @@ $as_echo "not found" >&6; }
+@@ -16033,21 +16033,6 @@ $as_echo "not found" >&6; }
  			*-hp-hpux*)
  				DST_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lcrypto"
  				;;
diff --git a/pkgs/servers/dns/bind/default.nix b/pkgs/servers/dns/bind/default.nix
index 427497bff0f..4002c6b3542 100644
--- a/pkgs/servers/dns/bind/default.nix
+++ b/pkgs/servers/dns/bind/default.nix
@@ -1,18 +1,19 @@
 { stdenv, lib, fetchurl, openssl, libtool, perl, libxml2
-, enableSeccomp ? false, libseccomp ? null
-, enablePython ? false, python3 ? null }:
+, enablePython ? false, python3 ? null
+, enableSeccomp ? false, libseccomp ? null, buildPackages
+}:
 
 assert enableSeccomp -> libseccomp != null;
 assert enablePython -> python3 != null;
 
-let version = "9.11.2"; in
+let version = "9.12.1"; in
 
 stdenv.mkDerivation rec {
   name = "bind-${version}";
 
   src = fetchurl {
     url = "http://ftp.isc.org/isc/bind9/${version}/${name}.tar.gz";
-    sha256 = "0yn7wgi2y8mpmvbjbkl4va7p0xsnn48m4yjx6ynb1hzp423asikz";
+    sha256 = "043mjcw405qa0ghm5dkhfsq35gsy279724fz3mjqpr1mbi14dr0n";
   };
 
   outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ];
@@ -20,12 +21,15 @@ stdenv.mkDerivation rec {
   patches = [ ./dont-keep-configure-flags.patch ./remove-mkdir-var.patch ] ++
     stdenv.lib.optional stdenv.isDarwin ./darwin-openssl-linking-fix.patch;
 
-  buildInputs = [ openssl libtool perl libxml2 ]
+  nativeBuildInputs = [ perl ];
+  buildInputs = [ openssl libtool libxml2 ]
     ++ lib.optional enableSeccomp libseccomp
     ++ lib.optional enablePython python3;
 
   STD_CDEFINES = [ "-DDIG_SIGCHASE=1" ]; # support +sigchase
 
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
   configureFlags = [
     "--localstatedir=/var"
     "--with-libtool"
@@ -38,8 +42,14 @@ stdenv.mkDerivation rec {
     "--without-gssapi"
     "--without-idn"
     "--without-idnlib"
+    "--without-lmdb"
     "--without-pkcs11"
     "--without-purify"
+    "--with-randomdev=/dev/random"
+    "--with-ecdsa"
+    "--with-gost"
+    "--without-eddsa"
+    "--with-aes"
   ] ++ lib.optional enableSeccomp "--enable-seccomp";
 
   postInstall = ''
@@ -60,7 +70,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = http://www.isc.org/software/bind;
     description = "Domain name server";
-    license = stdenv.lib.licenses.isc;
+    license = stdenv.lib.licenses.mpl20;
 
     maintainers = with stdenv.lib.maintainers; [viric peti];
     platforms = with stdenv.lib.platforms; unix;
diff --git a/pkgs/servers/dns/bind/dont-keep-configure-flags.patch b/pkgs/servers/dns/bind/dont-keep-configure-flags.patch
index 91cae62b171..5a934056d13 100644
--- a/pkgs/servers/dns/bind/dont-keep-configure-flags.patch
+++ b/pkgs/servers/dns/bind/dont-keep-configure-flags.patch
@@ -1,40 +1,41 @@
 diff --git a/bin/named/include/named/globals.h b/bin/named/include/named/globals.h
-index f354cfb..2aa0cc5 100644
+index 388dc97..3c6135c 100644
 --- a/bin/named/include/named/globals.h
 +++ b/bin/named/include/named/globals.h
-@@ -71,7 +71,9 @@ EXTERN const char *		ns_g_version		INIT(VERSION);
- EXTERN const char *		ns_g_product		INIT(PRODUCT);
- EXTERN const char *		ns_g_description	INIT(DESCRIPTION);
- EXTERN const char *		ns_g_srcid		INIT(SRCID);
+@@ -65,7 +65,9 @@ EXTERN const char *		named_g_version		INIT(VERSION);
+ EXTERN const char *		named_g_product		INIT(PRODUCT);
+ EXTERN const char *		named_g_description	INIT(DESCRIPTION);
+ EXTERN const char *		named_g_srcid		INIT(SRCID);
 +#if 0
- EXTERN const char *		ns_g_configargs		INIT(CONFIGARGS);
+ EXTERN const char *		named_g_configargs	INIT(CONFIGARGS);
 +#endif
- EXTERN const char *		ns_g_builder		INIT(BUILDER);
- EXTERN in_port_t		ns_g_port		INIT(0);
- EXTERN isc_dscp_t		ns_g_dscp		INIT(-1);
+ EXTERN const char *		named_g_builder		INIT(BUILDER);
+ EXTERN in_port_t		named_g_port		INIT(0);
+ EXTERN isc_dscp_t		named_g_dscp		INIT(-1);
 diff --git a/bin/named/main.c b/bin/named/main.c
-index 556db54..edab41d 100644
+index 4fb0566..60d56cd 100644
 --- a/bin/named/main.c
 +++ b/bin/named/main.c
-@@ -636,8 +636,10 @@ parse_command_line(int argc, char *argv[]) {
- 			       (*ns_g_description != '\0') ? " " : "",
- 			       ns_g_description, ns_g_srcid);
- 			printf("running on %s\n", ns_os_uname());
-+#if 0
+@@ -672,8 +672,10 @@ parse_command_line(int argc, char *argv[]) {
+ 			       (*named_g_description != '\0') ? " " : "",
+ 			       named_g_description, named_g_srcid);
+ 			printf("running on %s\n", named_os_uname());
++			#if 0
  			printf("built by %s with %s\n",
- 			       ns_g_builder, ns_g_configargs);
-+#endif
+ 			       named_g_builder, named_g_configargs);
++			#endif
  #ifdef __clang__
  			printf("compiled by CLANG %s\n", __VERSION__);
  #else
-@@ -998,8 +1000,10 @@ setup(void) {
- 	isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
- 		      ISC_LOG_NOTICE, "running on %s", ns_os_uname());
+@@ -1075,9 +1077,11 @@ setup(void) {
+ 		      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+ 		      "running on %s", named_os_uname());
  
 +#if 0
- 	isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
- 		      ISC_LOG_NOTICE, "built with %s", ns_g_configargs);
+ 	isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+ 		      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+ 		      "built with %s", named_g_configargs);
 +#endif
  
- 	isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
- 		      ISC_LOG_NOTICE,
+ 	isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+ 		      NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
diff --git a/pkgs/servers/dns/knot-dns/default.nix b/pkgs/servers/dns/knot-dns/default.nix
index 8ed4541edd6..de37aeaa590 100644
--- a/pkgs/servers/dns/knot-dns/default.nix
+++ b/pkgs/servers/dns/knot-dns/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, gnutls, liburcu, lmdb, libcap_ng, libidn
-, systemd, nettle, libedit, zlib, libiconv, libintlOrEmpty
+, systemd, nettle, libedit, zlib, libiconv, libintl
 }:
 
 let inherit (stdenv.lib) optional optionals; in
@@ -7,11 +7,11 @@ let inherit (stdenv.lib) optional optionals; in
 # Note: ATM only the libraries have been tested in nixpkgs.
 stdenv.mkDerivation rec {
   name = "knot-dns-${version}";
-  version = "2.6.1";
+  version = "2.6.6";
 
   src = fetchurl {
     url = "http://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz";
-    sha256 = "3013d45b4c7484268f3cad078f66f730a5bc9606e6b1061488dd821c1dce41e3";
+    sha256 = "02h8qdkja4kic3br79svws6r2pq1ijz945238v99d998d2jxh6ci";
   };
 
   outputs = [ "bin" "out" "dev" ];
@@ -20,11 +20,10 @@ stdenv.mkDerivation rec {
   buildInputs = [
     gnutls liburcu libidn
     nettle libedit
-    libiconv lmdb
+    libiconv lmdb libintl
     # without sphinx &al. for developer documentation
   ]
     ++ optionals stdenv.isLinux [ libcap_ng systemd ]
-    ++ libintlOrEmpty
     ++ optional stdenv.isDarwin zlib; # perhaps due to gnutls
 
   enableParallelBuilding = true;
@@ -43,4 +42,3 @@ stdenv.mkDerivation rec {
     maintainers = [ maintainers.vcunat ];
   };
 }
-
diff --git a/pkgs/servers/dns/knot-resolver/default.nix b/pkgs/servers/dns/knot-resolver/default.nix
index d8aed9b3143..09fda1b81b8 100644
--- a/pkgs/servers/dns/knot-resolver/default.nix
+++ b/pkgs/servers/dns/knot-resolver/default.nix
@@ -1,64 +1,55 @@
-{ stdenv, fetchurl, pkgconfig, hexdump, which
+{ stdenv, fetchurl, runCommand, pkgconfig, hexdump, which
 , knot-dns, luajit, libuv, lmdb, gnutls, nettle
 , cmocka, systemd, dns-root-data, makeWrapper
 , extraFeatures ? false /* catch-all if defaults aren't enough */
 , hiredis, libmemcached, luajitPackages
 }:
+let # un-indented, over the whole file
 
-let
-  inherit (stdenv.lib) optional optionals optionalString;
-in
-stdenv.mkDerivation rec {
+result = if extraFeatures then wrapped-full else unwrapped;
+
+inherit (stdenv.lib) optional optionals optionalString concatStringsSep;
+
+unwrapped = stdenv.mkDerivation rec {
   name = "knot-resolver-${version}";
-  version = "1.5.0";
+  version = "2.2.0";
 
   src = fetchurl {
     url = "http://secure.nic.cz/files/knot-resolver/${name}.tar.xz";
-    sha256 = "c032e63a6b922294746e1ab4002860346e7a6d92b8502965a13ba599088fcb42";
+    sha256 = "1yhlwvpl81klyfb8hhvrhii99q7wvydi3vandmq9j7dvig6z1dvv";
   };
 
   outputs = [ "out" "dev" ];
 
-  configurePhase = ":";
+  configurePhase = "patchShebangs scripts/";
 
-  nativeBuildInputs = [ pkgconfig which makeWrapper hexdump ];
+  nativeBuildInputs = [ pkgconfig which hexdump ];
 
   # http://knot-resolver.readthedocs.io/en/latest/build.html#requirements
   buildInputs = [ knot-dns luajit libuv gnutls nettle lmdb ]
-    ++ optional doInstallCheck cmocka
+    ++ optional doCheck cmocka
     ++ optional stdenv.isLinux systemd # sd_notify
-    ++ optionals extraFeatures [
-      hiredis libmemcached # additional cache backends
-    ];
-    ## optional dependencies; TODO: libedit, dnstap, http2 module?
+    ## optional dependencies; TODO: libedit, dnstap
+    ;
 
-  makeFlags = [ "PREFIX=$(out)" "ROOTHINTS=${dns-root-data}/root.hints" ];
+  makeFlags = [
+    "PREFIX=$(out)"
+    "ROOTHINTS=${dns-root-data}/root.hints"
+    "KEYFILE_DEFAULT=${dns-root-data}/root.ds"
+  ];
   CFLAGS = [ "-O2" "-DNDEBUG" ];
 
   enableParallelBuilding = true;
 
-  doInstallCheck = true;
-  installCheckTarget = "check";
+  doCheck = true;
+  doInstallCheck = false; # FIXME
   preInstallCheck = ''
-    export LD_LIBRARY_PATH="$out/lib"
-    sed '/^\thints$/c #' -i tests/config/test_config.mk
+    patchShebangs tests/config/runtest.sh
   '';
 
   postInstall = ''
-    rm "$out"/etc/kresd/root.hints # using system-wide instead
-  ''
-  # optional: to allow auto-bootstrapping root trust anchor via https
-  + (with luajitPackages; ''
-      wrapProgram "$out/sbin/kresd" \
-        --set LUA_PATH '${
-          stdenv.lib.concatStringsSep ";"
-            (map getLuaPath [ luasec luasocket ])
-          }' \
-        --set LUA_CPATH '${
-          stdenv.lib.concatStringsSep ";"
-            (map getLuaCPath [ luasec luasocket ])
-          }'
-    '');
+    rm "$out"/etc/knot-resolver/root.hints # using system-wide instead
+  '';
 
   meta = with stdenv.lib; {
     description = "Caching validating DNS resolver, from .cz domain registry";
@@ -68,5 +59,24 @@ stdenv.mkDerivation rec {
     platforms = filter (p: p != "aarch64-linux") platforms.unix;
     maintainers = [ maintainers.vcunat /* upstream developer */ ];
   };
-}
+};
+
+wrapped-full = with luajitPackages; let
+    luaPkgs =  [ luasec luasocket ]; # TODO: cqueues and others for http2 module
+  in runCommand unwrapped.name
+  {
+    nativeBuildInputs = [ makeWrapper ];
+    preferLocalBuild = true;
+    allowSubstitutes = false;
+  }
+  ''
+    mkdir -p "$out/sbin" "$out/share"
+    makeWrapper '${unwrapped}/sbin/kresd' "$out"/sbin/kresd \
+      --set LUA_PATH  '${concatStringsSep ";" (map getLuaPath  luaPkgs)}' \
+      --set LUA_CPATH '${concatStringsSep ";" (map getLuaCPath luaPkgs)}'
+    ln -sr '${unwrapped}/share/man' "$out"/share/
+    ln -sr "$out"/{sbin,bin}
+  '';
+
+in result
 
diff --git a/pkgs/servers/dns/nsd/default.nix b/pkgs/servers/dns/nsd/default.nix
index 6cf98daab5b..b4bd6175f3e 100644
--- a/pkgs/servers/dns/nsd/default.nix
+++ b/pkgs/servers/dns/nsd/default.nix
@@ -10,14 +10,16 @@
 , rootServer       ? false
 , rrtypes          ? false
 , zoneStats        ? false
+
+, configFile ? "etc/nsd/nsd.conf"
 }:
 
 stdenv.mkDerivation rec {
-  name = "nsd-4.1.16";
+  name = "nsd-4.1.20";
 
   src = fetchurl {
     url = "http://www.nlnetlabs.nl/downloads/nsd/${name}.tar.gz";
-    sha256 = "1cmaddfjb7yr87gjd5yv4d0qng0j97sy5rw5m3zxsp6c4fnng0vz";
+    sha256 = "04zph9zli3a0zx1sfphwbxx6f8whdxcjai6w0k7a565vgcfzd5wa";
   };
 
   prePatch = ''
@@ -39,7 +41,15 @@ stdenv.mkDerivation rec {
      ++ edf rootServer       "root-server"
      ++ edf rrtypes          "draft-rrtypes"
      ++ edf zoneStats        "zone-stats"
-     ++ [ "--with-ssl=${openssl.dev}" "--with-libevent=${libevent.dev}" ];
+     ++ [ "--with-ssl=${openssl.dev}"
+          "--with-libevent=${libevent.dev}"
+          "--with-nsd_conf_file=${configFile}"
+          "--with-configdir=etc/nsd"
+        ];
+
+  patchPhase = ''
+    sed 's@$(INSTALL_DATA) nsd.conf.sample $(DESTDIR)$(nsdconfigfile).sample@@g' -i Makefile.in
+  '';
 
   meta = with stdenv.lib; {
     homepage = http://www.nlnetlabs.nl;
diff --git a/pkgs/servers/dns/pdns-recursor/default.nix b/pkgs/servers/dns/pdns-recursor/default.nix
index 9b017249c15..76f1bd91e33 100644
--- a/pkgs/servers/dns/pdns-recursor/default.nix
+++ b/pkgs/servers/dns/pdns-recursor/default.nix
@@ -1,28 +1,25 @@
 { stdenv, fetchurl, pkgconfig, boost
 , openssl, systemd, lua, luajit, protobuf
-, enableLua ? false
 , enableProtoBuf ? false
 }:
-
-assert enableLua      -> lua != null && luajit != null;
 assert enableProtoBuf -> protobuf != null;
 
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "pdns-recursor-${version}";
-  version = "4.0.6";
+  version = "4.1.2";
 
   src = fetchurl {
     url = "https://downloads.powerdns.com/releases/pdns-recursor-${version}.tar.bz2";
-    sha256 = "03fnjiacvhdlkr3a2206mham0p6p24gkawashs5v12r68k32l67j";
+    sha256 = "0xpd8k7ahwrwabz05zbjmg54dmd4hm5hkbfn8m1ws6y4f7qm4inv";
   };
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [
     boost openssl systemd
-  ] ++ optional enableLua [ lua luajit ]
-    ++ optional enableProtoBuf protobuf;
+    lua luajit
+  ] ++ optional enableProtoBuf protobuf;
 
   configureFlags = [
     "--enable-reproducible"
@@ -33,7 +30,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A recursive DNS server";
-    homepage = http://www.powerdns.com/;
+    homepage = https://www.powerdns.com/;
     platforms = platforms.linux;
     license = licenses.gpl2;
     maintainers = with maintainers; [ rnhmjoj ];
diff --git a/pkgs/servers/dns/powerdns/default.nix b/pkgs/servers/dns/powerdns/default.nix
index ff21a9e8f09..cde2fe1a426 100644
--- a/pkgs/servers/dns/powerdns/default.nix
+++ b/pkgs/servers/dns/powerdns/default.nix
@@ -1,27 +1,36 @@
-{ stdenv, fetchurl, pkgconfig,
-  boost, libyamlcpp, libsodium, sqlite, protobuf,
-  libmysql, postgresql, lua, openldap, geoip, curl
+{ stdenv, fetchurl, pkgconfig
+, boost, libyamlcpp, libsodium, sqlite, protobuf, botan2
+, mysql57, postgresql, lua, openldap, geoip, curl, opendbx, unixODBC
 }:
 
 stdenv.mkDerivation rec {
   name = "powerdns-${version}";
-  version = "4.0.4";
+  version = "4.1.1";
 
   src = fetchurl {
     url = "http://downloads.powerdns.com/releases/pdns-${version}.tar.bz2";
-    sha256 = "0qypns1iqlrc5d3iwabrsi1vpb0yffy36chsb1zpqiv9vs4snx6r";
+    sha256 = "1fh4zgj0gxgcnnhnih8k6fbw18hb9brkkrfpx3mj8b4a3hr8ilq8";
   };
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ boost libmysql postgresql lua openldap sqlite protobuf geoip libyamlcpp libsodium curl ];
+  buildInputs = [
+    boost mysql57.connector-c postgresql lua openldap sqlite protobuf geoip
+    libyamlcpp libsodium curl opendbx unixODBC botan2
+  ];
+
+  patches = [
+    # checksum type not found, maybe a dependency is to old?
+    ./skip-sha384-test.patch
+  ];
 
   # nix destroy with-modules arguments, when using configureFlags
   preConfigure = ''
     configureFlagsArray=(
-      "--with-modules=bind gmysql geoip gpgsql gsqlite3 ldap lua pipe random remote"
+      "--with-modules=bind gmysql geoip godbc gpgsql gsqlite3 ldap lua mydns opendbx pipe random remote"
       --with-sqlite3
       --with-socketdir=/var/lib/powerdns
       --enable-libsodium
+      --enable-botan
       --enable-tools
       --disable-dependency-tracking
       --disable-silent-rules
@@ -29,7 +38,8 @@ stdenv.mkDerivation rec {
       --enable-unit-tests
     )
   '';
-  checkPhase = "make check";
+
+  doCheck = true;
 
   meta = with stdenv.lib; {
     description = "Authoritative DNS server";
diff --git a/pkgs/servers/dns/powerdns/skip-sha384-test.patch b/pkgs/servers/dns/powerdns/skip-sha384-test.patch
new file mode 100644
index 00000000000..3fafb38c48f
--- /dev/null
+++ b/pkgs/servers/dns/powerdns/skip-sha384-test.patch
@@ -0,0 +1,14 @@
+--- pdns-4.1.1.org/pdns/test-signers.cc	2018-02-17 11:43:15.953228279 +0000
++++ pdns-4.1.1/pdns/test-signers.cc	2018-02-17 11:44:21.089516393 +0000
+@@ -212,11 +212,6 @@
+       BOOST_CHECK_EQUAL(ds2.getZoneRepresentation(), signer.dsSHA256);
+     }
+ 
+-    auto ds4 = makeDSFromDNSKey(name, drc, DNSSECKeeper::SHA384);
+-    if (!signer.dsSHA384.empty()) {
+-      BOOST_CHECK_EQUAL(ds4.getZoneRepresentation(), signer.dsSHA384);
+-    }
+-
+     auto signature = dcke->sign(message);
+     BOOST_CHECK(dcke->verify(message, signature));
+ 
diff --git a/pkgs/servers/emby/default.nix b/pkgs/servers/emby/default.nix
index 745ed18c00f..964fa77c31a 100644
--- a/pkgs/servers/emby/default.nix
+++ b/pkgs/servers/emby/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "emby-${version}";
-  version = "3.2.36.0";
+  version = "3.3.1.0";
 
   src = fetchurl {
     url = "https://github.com/MediaBrowser/Emby/releases/download/${version}/Emby.Mono.zip";
-    sha256 = "0b75v6g7qm03jqm5za70z4x5lqks3a4cd84vblqr35zrla9vs83b";
+    sha256 = "04qq3rl3pwxnsr8z6x3dwplh6brn1nd0jpmmnvizln4ffx9wspb8";
   };
 
   buildInputs = with pkgs; [
diff --git a/pkgs/servers/etcd/default.nix b/pkgs/servers/etcd/default.nix
index 15ea30aa16c..29cb8c2223c 100644
--- a/pkgs/servers/etcd/default.nix
+++ b/pkgs/servers/etcd/default.nix
@@ -4,7 +4,7 @@ with lib;
 
 buildGoPackage rec {
   name = "etcd-${version}";
-  version = "3.1.6"; # After updating check that nixos tests pass
+  version = "3.3.1"; # After updating check that nixos tests pass
   rev = "v${version}";
 
   goPackagePath = "github.com/coreos/etcd";
@@ -13,7 +13,7 @@ buildGoPackage rec {
     inherit rev;
     owner = "coreos";
     repo = "etcd";
-    sha256 = "1qgi6zxnijzr644w2da2gbn3gw2qwk6a3z3qmdln0r2rjnm70sx0";
+    sha256 = "11gzmi05y4kpnzgqc737l0wk5svxai4z17nl92jazqga6zhyavyl";
   };
 
   subPackages = [
diff --git a/pkgs/servers/fcgiwrap/default.nix b/pkgs/servers/fcgiwrap/default.nix
index 84c24e68478..a1ec3a7deb0 100644
--- a/pkgs/servers/fcgiwrap/default.nix
+++ b/pkgs/servers/fcgiwrap/default.nix
@@ -9,6 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "07y6s4mm86cv7p1ljz94sxnqa89y9amn3vzwsnbq5hrl4vdy0zac";
   };
 
+  NIX_CFLAGS_COMPILE = "-Wno-error=implicit-fallthrough";
   configureFlags = [ "--with-systemd" "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ];
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
diff --git a/pkgs/servers/fleet/default.nix b/pkgs/servers/fleet/default.nix
index 3f600b5a122..98daab253b3 100644
--- a/pkgs/servers/fleet/default.nix
+++ b/pkgs/servers/fleet/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "fleet-${version}";
-  version = "0.11.8";
+  version = "1.0.0";
 
   src = fetchFromGitHub {
     owner = "coreos";
     repo = "fleet";
     rev = "v${version}";
-    sha256 = "13kwaa4hkiic602wnvnk13pflrxqhk2vxwpk1bn52ilwxkjyvkig";
+    sha256 = "0j48ajz19aqfzv9iyznnn39aw51y1nqcl270grmvi5cbqycmrfm0";
   };
 
   buildInputs = [ go ];
diff --git a/pkgs/servers/freeradius/default.nix b/pkgs/servers/freeradius/default.nix
index db9d1121992..a3e83f4e069 100644
--- a/pkgs/servers/freeradius/default.nix
+++ b/pkgs/servers/freeradius/default.nix
@@ -13,7 +13,7 @@
 , withMemcached ? false
 , hiredis
 , withRedis ? false
-, libmysql
+, mysql
 , withMysql ? false
 , json_c
 , withJson ? false
@@ -29,7 +29,7 @@ assert withPcap -> libpcap != null;
 assert withCap -> libcap != null;
 assert withMemcached -> libmemcached != null;
 assert withRedis -> hiredis != null;
-assert withMysql -> libmysql != null;
+assert withMysql -> mysql != null;
 assert withYubikey -> libyubikey != null;
 assert withCollectd -> collectd != null;
 
@@ -40,11 +40,11 @@ assert withCollectd -> collectd != null;
 with stdenv.lib;
 stdenv.mkDerivation rec {
   name = "freeradius-${version}";
-  version = "3.0.15";
+  version = "3.0.17";
 
   src = fetchurl {
     url = "ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-${version}.tar.gz";
-    sha256 = "1qygf5if2xjzl7kfzwl428ydz5q1m0j5sx077n12v7znlgnwaagx";
+    sha256 = "0bc35knv46z729l4h22rirqns5v6jb0fzcffnjayhs8wjysfkfyy";
   };
 
   nativeBuildInputs = [ autoreconfHook ];
@@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
     ++ optional withCap libcap
     ++ optional withMemcached libmemcached
     ++ optional withRedis hiredis
-    ++ optional withMysql libmysql
+    ++ optional withMysql mysql.connector-c
     ++ optional withJson json_c
     ++ optional withYubikey libyubikey
     ++ optional withCollectd collectd;
diff --git a/pkgs/servers/ftp/bftpd/default.nix b/pkgs/servers/ftp/bftpd/default.nix
index cc1582eb9e9..38fb7d250e3 100644
--- a/pkgs/servers/ftp/bftpd/default.nix
+++ b/pkgs/servers/ftp/bftpd/default.nix
@@ -2,11 +2,11 @@
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   pname = "bftpd";
-  version = "4.4";
+  version = "4.9";
   # or fetchFromGitHub(owner,repo,rev) or fetchgit(rev)
   src = fetchurl {
     url = "mirror://sourceforge/project/${pname}/${pname}/${name}/${name}.tar.gz";
-    sha256 = "0hgpqwv7mj1yln8ps9bbcjhl5hvs02nxjfkk9nhkr6fysfyyn1dq";
+    sha256 = "13pjil9cjggpi773m0516lszyqvwzlgcrmmj8yn9nc24rbxwvn6d";
   };
   buildInputs = [];
   preConfigure = ''
diff --git a/pkgs/servers/ftp/pure-ftpd/default.nix b/pkgs/servers/ftp/pure-ftpd/default.nix
index 4e39b78b89e..f41bb726a28 100644
--- a/pkgs/servers/ftp/pure-ftpd/default.nix
+++ b/pkgs/servers/ftp/pure-ftpd/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, openssl }:
 
 stdenv.mkDerivation rec {
-  name = "pure-ftpd-1.0.46";
+  name = "pure-ftpd-1.0.47";
 
   src = fetchurl {
     url = "https://download.pureftpd.org/pub/pure-ftpd/releases/${name}.tar.gz";
-    sha256 = "0p0arcaz63fbb03fkavbc8z6m1f90p5vbnxb8mqlvpma6mrq0286";
+    sha256 = "1b97ixva8m10vln8xrfwwwzi344bkgxqji26d0nrm1yzylbc6h27";
   };
 
   buildInputs = [ openssl ];
@@ -17,6 +17,6 @@ stdenv.mkDerivation rec {
     homepage = https://www.pureftpd.org;
     license = licenses.isc; # with some parts covered by BSD3(?)
     maintainers = [ maintainers.lethalman ];
-    platforms = platforms.unix;
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/servers/games/ghost-one/default.nix b/pkgs/servers/games/ghost-one/default.nix
deleted file mode 100644
index 63a71633923..00000000000
--- a/pkgs/servers/games/ghost-one/default.nix
+++ /dev/null
@@ -1,55 +0,0 @@
-{ stdenv, fetchurl, unzip, gmp, zlib, bzip2, boost, mysql }:
-stdenv.mkDerivation rec {
-
-  name = "ghost-one-${version}";
-  version = "1.7.265";
-
-  src = fetchurl {
-    url = "http://www.maxdevlon.com/ghost/ghostone${version}.zip";
-    sha256 = "1sm2ca3lcdr4vjg7v94d8zhqz8cdp44rg8yinzzwkgsr0hj74fv2";
-  };
-
-  buildInputs = [ unzip gmp zlib bzip2 boost mysql.client ];
-
-  patchPhase = ''
-    substituteInPlace ghost/Makefile --replace "/usr/local/lib/mysql" \
-      "${stdenv.lib.getLib mysql.client}/lib/mysql"
-  '';
-
-  buildPhase = ''
-    cd bncsutil/src/bncsutil
-    make
-    cd ../../../StormLib/stormlib/
-    make
-    mkdir -p $out/lib
-    cd ../..
-#    cp bncsutil/src/bncsutil/libbncutil.so $out/lib
-#    cp StormLib/stormlib/libStorm.so $out/lib
-    cd ghost
-    make
-    cd ..
-  '';
-
-  installPhase = ''
-    mkdir -p $out/lib
-    cp bncsutil/src/bncsutil/libbncsutil.so $out/lib
-    cp StormLib/stormlib/libStorm.so $out/lib
-
-    mkdir -p $out/bin
-    cp ghost/ghost++ $out/bin
-
-    mkdir -p $out/share/ghost-one/languages
-    cp -r mapcfgs $out/share/ghost-one
-    cp Languages/*.cfg $out/share/ghost-one/languages
-    cp language.cfg $out/share/ghost-one/languages/English.cfg
-    cp ip-to-country.csv $out/share/ghost-one/
-  '';
-
-  meta = with stdenv.lib; {
-    homepage = http://www.codelain.com/forum/;
-    description = "A Warcraft III: Reign of Chaos and Warcraft III: The Frozen Throne game hosting bot";
-    license = licenses.asl20;
-    maintainers = [ maintainers.phreedom ];
-    broken = true; # can't even get downloaded
-  };
-}
diff --git a/pkgs/servers/gotty/default.nix b/pkgs/servers/gotty/default.nix
index e63e13a218e..89f1821981f 100644
--- a/pkgs/servers/gotty/default.nix
+++ b/pkgs/servers/gotty/default.nix
@@ -19,7 +19,7 @@ buildGoPackage rec {
   meta = with stdenv.lib; {
     description = "Share your terminal as a web application";
     homepage = https://github.com/yudai/gotty;
-    maintainers = with maintainers; [ matthiasbeyer ];
+    maintainers = with maintainers; [ ];
     license = licenses.mit;
   };
 }
diff --git a/pkgs/servers/gpm/default.nix b/pkgs/servers/gpm/default.nix
index 6096aa1ed74..3cb0d3931db 100644
--- a/pkgs/servers/gpm/default.nix
+++ b/pkgs/servers/gpm/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
   name = "gpm-1.20.7";
 
   src = fetchurl {
-    url = "http://www.nico.schottelius.org/software/gpm/archives/${name}.tar.bz2";
+    url = "https://www.nico.schottelius.org/software/gpm/archives/${name}.tar.bz2";
     sha256 = "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh";
   };
 
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with stdenv.lib; {
-    homepage = http://www.nico.schottelius.org/software/gpm/;
+    homepage = https://www.nico.schottelius.org/software/gpm/;
     description = "A daemon that provides mouse support on the Linux console";
     license = licenses.gpl2;
     platforms = platforms.linux ++ platforms.cygwin;
diff --git a/pkgs/servers/gpsd/default.nix b/pkgs/servers/gpsd/default.nix
index 7670c89f0c6..b01e9418789 100644
--- a/pkgs/servers/gpsd/default.nix
+++ b/pkgs/servers/gpsd/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, scons, pkgconfig, dbus, dbus_glib
+{ fetchurl, stdenv, scons, pkgconfig, dbus, dbus-glib
 , ncurses, libX11, libXt, libXpm, libXaw, libXext
 , libusb1, docbook_xml_dtd_412, docbook_xsl, bc
 , libxslt, xmlto, gpsdUser ? "gpsd", gpsdGroup ? "dialout"
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   ];
 
   buildInputs = [
-    python2Packages.python dbus dbus_glib ncurses libX11 libXt libXpm libXaw libXext
+    python2Packages.python dbus dbus-glib ncurses libX11 libXt libXpm libXaw libXext
     libxslt libusb1
   ];
 
diff --git a/pkgs/servers/home-assistant/appdaemon.nix b/pkgs/servers/home-assistant/appdaemon.nix
new file mode 100644
index 00000000000..49313179503
--- /dev/null
+++ b/pkgs/servers/home-assistant/appdaemon.nix
@@ -0,0 +1,57 @@
+{ lib, python3, fetchpatch }:
+
+let
+  python = python3.override {
+    packageOverrides = self: super: {
+
+      aiohttp = super.aiohttp.overridePythonAttrs (oldAttrs: rec {
+        version = "2.3.10";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "8adda6583ba438a4c70693374e10b60168663ffa6564c5c75d3c7a9055290964";
+        };
+      });
+
+      yarl = super.yarl.overridePythonAttrs (oldAttrs: rec {
+        version = "1.1.0";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "6af895b45bd49254cc309ac0fe6e1595636a024953d710e01114257736184698";
+        };
+      });
+
+      aiohttp-jinja2 = super.aiohttp-jinja2.overridePythonAttrs (oldAttrs: rec {
+        version = "0.15.0";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "0f390693f46173d8ffb95669acbb0e2a3ec54ecce676703510ad47f1a6d9dc83";
+        };
+      });
+
+    };
+  };
+
+in python.pkgs.buildPythonApplication rec {
+  pname = "appdaemon";
+  version = "3.0.1";
+
+  src = python.pkgs.fetchPypi {
+    inherit pname version;
+    sha256 = "ad16773da21e34e258970bf5740d1634a36c8202ac72c6925d960308ef1c58cf";
+  };
+
+  propagatedBuildInputs = with python.pkgs; [
+    aiohttp aiohttp-jinja2 astral bcrypt daemonize feedparser iso8601
+    jinja2 pyyaml requests sseclient voluptuous websocket_client yarl
+  ];
+
+  # no tests implemented
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Sandboxed python execution environment for writing automation apps for Home Assistant";
+    homepage = https://github.com/home-assistant/appdaemon;
+    license = licenses.mit;
+    maintainers = with maintainers; [ peterhoeg dotlambda ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
new file mode 100644
index 00000000000..3a74a43d14d
--- /dev/null
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -0,0 +1,463 @@
+# Generated from parse-requirements.py
+# Do not edit!
+
+{
+  version = "0.67.1";
+  components = {
+    "abode" = ps: with ps; [  ];
+    "ads" = ps: with ps; [  ];
+    "alarm_control_panel.alarmdotcom" = ps: with ps; [  ];
+    "alarm_control_panel.concord232" = ps: with ps; [  ];
+    "alarm_control_panel.ialarm" = ps: with ps; [  ];
+    "alarm_control_panel.nx584" = ps: with ps; [  ];
+    "alarm_control_panel.simplisafe" = ps: with ps; [  ];
+    "alarm_control_panel.totalconnect" = ps: with ps; [  ];
+    "alarmdecoder" = ps: with ps; [  ];
+    "amcrest" = ps: with ps; [  ];
+    "android_ip_webcam" = ps: with ps; [  ];
+    "apcupsd" = ps: with ps; [  ];
+    "apple_tv" = ps: with ps; [  ];
+    "arduino" = ps: with ps; [  ];
+    "arlo" = ps: with ps; [  ];
+    "asterisk_mbox" = ps: with ps; [  ];
+    "august" = ps: with ps; [  ];
+    "axis" = ps: with ps; [  ];
+    "bbb_gpio" = ps: with ps; [  ];
+    "binary_sensor.concord232" = ps: with ps; [  ];
+    "binary_sensor.flic" = ps: with ps; [  ];
+    "binary_sensor.hikvision" = ps: with ps; [  ];
+    "binary_sensor.iss" = ps: with ps; [  ];
+    "binary_sensor.nx584" = ps: with ps; [  ];
+    "binary_sensor.tapsaff" = ps: with ps; [  ];
+    "binary_sensor.trend" = ps: with ps; [ numpy ];
+    "binary_sensor.workday" = ps: with ps; [  ];
+    "blink" = ps: with ps; [  ];
+    "bmw_connected_drive" = ps: with ps; [  ];
+    "calendar.caldav" = ps: with ps; [  ];
+    "calendar.todoist" = ps: with ps; [ todoist ];
+    "camera.foscam" = ps: with ps; [  ];
+    "camera.onvif" = ps: with ps; [  ];
+    "camera.proxy" = ps: with ps; [ pillow ];
+    "camera.synology" = ps: with ps; [  ];
+    "camera.uvc" = ps: with ps; [  ];
+    "camera.xeoma" = ps: with ps; [  ];
+    "canary" = ps: with ps; [  ];
+    "climate.daikin" = ps: with ps; [  ];
+    "climate.econet" = ps: with ps; [  ];
+    "climate.ephember" = ps: with ps; [  ];
+    "climate.eq3btsmart" = ps: with ps; [ construct ];
+    "climate.flexit" = ps: with ps; [  ];
+    "climate.heatmiser" = ps: with ps; [  ];
+    "climate.honeywell" = ps: with ps; [  ];
+    "climate.oem" = ps: with ps; [  ];
+    "climate.proliphix" = ps: with ps; [  ];
+    "climate.radiotherm" = ps: with ps; [  ];
+    "climate.sensibo" = ps: with ps; [  ];
+    "climate.touchline" = ps: with ps; [  ];
+    "climate.venstar" = ps: with ps; [  ];
+    "cloud" = ps: with ps; [ warrant ];
+    "coinbase" = ps: with ps; [  ];
+    "comfoconnect" = ps: with ps; [  ];
+    "config.config_entries" = ps: with ps; [  ];
+    "cover.gogogate2" = ps: with ps; [  ];
+    "cover.myq" = ps: with ps; [  ];
+    "daikin" = ps: with ps; [  ];
+    "datadog" = ps: with ps; [ datadog ];
+    "deconz" = ps: with ps; [  ];
+    "device_tracker.aruba" = ps: with ps; [ pexpect ];
+    "device_tracker.asuswrt" = ps: with ps; [ pexpect ];
+    "device_tracker.automatic" = ps: with ps; [  ];
+    "device_tracker.bbox" = ps: with ps; [  ];
+    "device_tracker.bluetooth_le_tracker" = ps: with ps; [  ];
+    "device_tracker.bluetooth_tracker" = ps: with ps; [  ];
+    "device_tracker.cisco_ios" = ps: with ps; [ pexpect ];
+    "device_tracker.fritz" = ps: with ps; [ fritzconnection ];
+    "device_tracker.google_maps" = ps: with ps; [  ];
+    "device_tracker.icloud" = ps: with ps; [  ];
+    "device_tracker.linksys_ap" = ps: with ps; [ beautifulsoup4 ];
+    "device_tracker.mikrotik" = ps: with ps; [  ];
+    "device_tracker.netgear" = ps: with ps; [  ];
+    "device_tracker.nmap_tracker" = ps: with ps; [  ];
+    "device_tracker.owntracks" = ps: with ps; [ libnacl ];
+    "device_tracker.owntracks_http" = ps: with ps; [ libnacl ];
+    "device_tracker.snmp" = ps: with ps; [ pysnmp ];
+    "device_tracker.tile" = ps: with ps; [  ];
+    "device_tracker.trackr" = ps: with ps; [  ];
+    "device_tracker.unifi" = ps: with ps; [ pyunifi ];
+    "device_tracker.unifi_direct" = ps: with ps; [ pexpect ];
+    "device_tracker.upc_connect" = ps: with ps; [ defusedxml ];
+    "device_tracker.xiaomi_miio" = ps: with ps; [  ];
+    "digital_ocean" = ps: with ps; [ digital-ocean ];
+    "discovery" = ps: with ps; [ netdisco ];
+    "dominos" = ps: with ps; [  ];
+    "doorbird" = ps: with ps; [  ];
+    "dweet" = ps: with ps; [  ];
+    "dyson" = ps: with ps; [  ];
+    "ecobee" = ps: with ps; [  ];
+    "egardia" = ps: with ps; [  ];
+    "eight_sleep" = ps: with ps; [  ];
+    "emulated_hue" = ps: with ps; [ aiohttp-cors ];
+    "enocean" = ps: with ps; [  ];
+    "envisalink" = ps: with ps; [  ];
+    "fan.xiaomi_miio" = ps: with ps; [ construct ];
+    "feedreader" = ps: with ps; [ feedparser ];
+    "ffmpeg" = ps: with ps; [ ha-ffmpeg ];
+    "folder_watcher" = ps: with ps; [ watchdog ];
+    "frontend" = ps: with ps; [  ];
+    "gc100" = ps: with ps; [  ];
+    "goalfeed" = ps: with ps; [  ];
+    "google" = ps: with ps; [ google_api_python_client oauth2client ];
+    "hdmi_cec" = ps: with ps; [  ];
+    "hive" = ps: with ps; [  ];
+    "homekit" = ps: with ps; [  ];
+    "homematic" = ps: with ps; [ pyhomematic ];
+    "homematicip_cloud" = ps: with ps; [  ];
+    "http" = ps: with ps; [ aiohttp-cors ];
+    "hue" = ps: with ps; [  ];
+    "ifttt" = ps: with ps; [  ];
+    "ihc" = ps: with ps; [  ];
+    "image_processing.dlib_face_detect" = ps: with ps; [ face_recognition ];
+    "image_processing.dlib_face_identify" = ps: with ps; [ face_recognition ];
+    "image_processing.opencv" = ps: with ps; [ numpy ];
+    "influxdb" = ps: with ps; [ influxdb ];
+    "insteon_local" = ps: with ps; [  ];
+    "insteon_plm" = ps: with ps; [  ];
+    "iota" = ps: with ps; [  ];
+    "isy994" = ps: with ps; [  ];
+    "joaoapps_join" = ps: with ps; [  ];
+    "juicenet" = ps: with ps; [  ];
+    "keyboard" = ps: with ps; [  ];
+    "keyboard_remote" = ps: with ps; [ evdev ];
+    "kira" = ps: with ps; [  ];
+    "knx" = ps: with ps; [  ];
+    "lametric" = ps: with ps; [  ];
+    "light.avion" = ps: with ps; [  ];
+    "light.blinksticklight" = ps: with ps; [ BlinkStick ];
+    "light.blinkt" = ps: with ps; [  ];
+    "light.decora" = ps: with ps; [  ];
+    "light.decora_wifi" = ps: with ps; [  ];
+    "light.flux_led" = ps: with ps; [  ];
+    "light.greenwave" = ps: with ps; [  ];
+    "light.iglo" = ps: with ps; [  ];
+    "light.lifx" = ps: with ps; [  ];
+    "light.lifx_legacy" = ps: with ps; [  ];
+    "light.limitlessled" = ps: with ps; [  ];
+    "light.mystrom" = ps: with ps; [  ];
+    "light.nanoleaf_aurora" = ps: with ps; [  ];
+    "light.osramlightify" = ps: with ps; [  ];
+    "light.piglow" = ps: with ps; [  ];
+    "light.rpi_gpio_pwm" = ps: with ps; [  ];
+    "light.sensehat" = ps: with ps; [  ];
+    "light.tikteck" = ps: with ps; [  ];
+    "light.tplink" = ps: with ps; [  ];
+    "light.xiaomi_miio" = ps: with ps; [ construct ];
+    "light.yeelight" = ps: with ps; [  ];
+    "light.yeelightsunflower" = ps: with ps; [  ];
+    "light.zengge" = ps: with ps; [  ];
+    "linode" = ps: with ps; [ linode-api ];
+    "lirc" = ps: with ps; [  ];
+    "litejet" = ps: with ps; [  ];
+    "lock.nello" = ps: with ps; [  ];
+    "lock.nuki" = ps: with ps; [  ];
+    "lock.sesame" = ps: with ps; [  ];
+    "lutron" = ps: with ps; [  ];
+    "lutron_caseta" = ps: with ps; [  ];
+    "maxcube" = ps: with ps; [  ];
+    "media_extractor" = ps: with ps; [  ];
+    "media_player.anthemav" = ps: with ps; [  ];
+    "media_player.aquostv" = ps: with ps; [  ];
+    "media_player.bluesound" = ps: with ps; [ xmltodict ];
+    "media_player.braviatv" = ps: with ps; [  ];
+    "media_player.cast" = ps: with ps; [ PyChromecast ];
+    "media_player.channels" = ps: with ps; [  ];
+    "media_player.clementine" = ps: with ps; [  ];
+    "media_player.cmus" = ps: with ps; [  ];
+    "media_player.denonavr" = ps: with ps; [  ];
+    "media_player.directv" = ps: with ps; [  ];
+    "media_player.dunehd" = ps: with ps; [  ];
+    "media_player.emby" = ps: with ps; [  ];
+    "media_player.frontier_silicon" = ps: with ps; [  ];
+    "media_player.gpmdp" = ps: with ps; [ websocket_client ];
+    "media_player.gstreamer" = ps: with ps; [  ];
+    "media_player.kodi" = ps: with ps; [ jsonrpc-async jsonrpc-websocket ];
+    "media_player.lg_netcast" = ps: with ps; [  ];
+    "media_player.liveboxplaytv" = ps: with ps; [  ];
+    "media_player.mediaroom" = ps: with ps; [  ];
+    "media_player.monoprice" = ps: with ps; [  ];
+    "media_player.mpd" = ps: with ps; [ mpd2 ];
+    "media_player.nad" = ps: with ps; [  ];
+    "media_player.nadtcp" = ps: with ps; [  ];
+    "media_player.onkyo" = ps: with ps; [ onkyo-eiscp ];
+    "media_player.openhome" = ps: with ps; [  ];
+    "media_player.panasonic_viera" = ps: with ps; [ wakeonlan ];
+    "media_player.pandora" = ps: with ps; [ pexpect ];
+    "media_player.philips_js" = ps: with ps; [  ];
+    "media_player.plex" = ps: with ps; [  ];
+    "media_player.roku" = ps: with ps; [  ];
+    "media_player.russound_rio" = ps: with ps; [  ];
+    "media_player.russound_rnet" = ps: with ps; [  ];
+    "media_player.samsungtv" = ps: with ps; [ wakeonlan ];
+    "media_player.snapcast" = ps: with ps; [  ];
+    "media_player.songpal" = ps: with ps; [  ];
+    "media_player.sonos" = ps: with ps; [  ];
+    "media_player.soundtouch" = ps: with ps; [ libsoundtouch ];
+    "media_player.spotify" = ps: with ps; [ spotipy ];
+    "media_player.vizio" = ps: with ps; [  ];
+    "media_player.vlc" = ps: with ps; [  ];
+    "media_player.webostv" = ps: with ps; [ websockets ];
+    "media_player.xiaomi_tv" = ps: with ps; [  ];
+    "media_player.yamaha" = ps: with ps; [  ];
+    "media_player.yamaha_musiccast" = ps: with ps; [  ];
+    "media_player.ziggo_mediabox_xl" = ps: with ps; [  ];
+    "melissa" = ps: with ps; [  ];
+    "mochad" = ps: with ps; [  ];
+    "modbus" = ps: with ps; [  ];
+    "mqtt" = ps: with ps; [ paho-mqtt ];
+    "mqtt.server" = ps: with ps; [ hbmqtt ];
+    "mychevy" = ps: with ps; [  ];
+    "mycroft" = ps: with ps; [  ];
+    "mysensors" = ps: with ps; [  ];
+    "neato" = ps: with ps; [  ];
+    "nest" = ps: with ps; [  ];
+    "netatmo" = ps: with ps; [  ];
+    "notify.apns" = ps: with ps; [  ];
+    "notify.aws_lambda" = ps: with ps; [ boto3 ];
+    "notify.aws_sns" = ps: with ps; [ boto3 ];
+    "notify.aws_sqs" = ps: with ps; [ boto3 ];
+    "notify.ciscospark" = ps: with ps; [  ];
+    "notify.discord" = ps: with ps; [  ];
+    "notify.free_mobile" = ps: with ps; [  ];
+    "notify.gntp" = ps: with ps; [  ];
+    "notify.hipchat" = ps: with ps; [  ];
+    "notify.html5" = ps: with ps; [ pyjwt ];
+    "notify.joaoapps_join" = ps: with ps; [  ];
+    "notify.kodi" = ps: with ps; [ jsonrpc-async ];
+    "notify.lametric" = ps: with ps; [  ];
+    "notify.mailgun" = ps: with ps; [  ];
+    "notify.mastodon" = ps: with ps; [  ];
+    "notify.matrix" = ps: with ps; [ matrix-client ];
+    "notify.message_bird" = ps: with ps; [  ];
+    "notify.pushbullet" = ps: with ps; [ pushbullet ];
+    "notify.pushetta" = ps: with ps; [  ];
+    "notify.pushover" = ps: with ps; [ python-pushover ];
+    "notify.rocketchat" = ps: with ps; [  ];
+    "notify.sendgrid" = ps: with ps; [  ];
+    "notify.simplepush" = ps: with ps; [  ];
+    "notify.slack" = ps: with ps; [  ];
+    "notify.stride" = ps: with ps; [  ];
+    "notify.twitter" = ps: with ps; [  ];
+    "notify.webostv" = ps: with ps; [  ];
+    "notify.xmpp" = ps: with ps; [ pyasn1-modules pyasn1 sleekxmpp ];
+    "notify.yessssms" = ps: with ps; [  ];
+    "nuheat" = ps: with ps; [  ];
+    "nuimo_controller" = ps: with ps; [  ];
+    "pilight" = ps: with ps; [  ];
+    "prometheus" = ps: with ps; [  ];
+    "python_script" = ps: with ps; [  ];
+    "qwikswitch" = ps: with ps; [  ];
+    "rainbird" = ps: with ps; [  ];
+    "raincloud" = ps: with ps; [  ];
+    "raspihats" = ps: with ps; [  ];
+    "recorder" = ps: with ps; [ sqlalchemy ];
+    "remember_the_milk" = ps: with ps; [ httplib2 ];
+    "remote.harmony" = ps: with ps; [  ];
+    "remote.itach" = ps: with ps; [  ];
+    "remote.xiaomi_miio" = ps: with ps; [ construct ];
+    "rflink" = ps: with ps; [  ];
+    "rfxtrx" = ps: with ps; [  ];
+    "ring" = ps: with ps; [  ];
+    "rpi_gpio" = ps: with ps; [  ];
+    "rpi_pfio" = ps: with ps; [  ];
+    "satel_integra" = ps: with ps; [  ];
+    "scene.hunterdouglas_powerview" = ps: with ps; [  ];
+    "scsgate" = ps: with ps; [  ];
+    "sensor.airvisual" = ps: with ps; [  ];
+    "sensor.alpha_vantage" = ps: with ps; [  ];
+    "sensor.bbox" = ps: with ps; [  ];
+    "sensor.bh1750" = ps: with ps; [  ];
+    "sensor.bitcoin" = ps: with ps; [  ];
+    "sensor.blockchain" = ps: with ps; [  ];
+    "sensor.bme280" = ps: with ps; [  ];
+    "sensor.bme680" = ps: with ps; [  ];
+    "sensor.broadlink" = ps: with ps; [  ];
+    "sensor.buienradar" = ps: with ps; [  ];
+    "sensor.coinmarketcap" = ps: with ps; [  ];
+    "sensor.cpuspeed" = ps: with ps; [  ];
+    "sensor.crimereports" = ps: with ps; [  ];
+    "sensor.cups" = ps: with ps; [ pycups ];
+    "sensor.darksky" = ps: with ps; [  ];
+    "sensor.deluge" = ps: with ps; [ deluge-client ];
+    "sensor.deutsche_bahn" = ps: with ps; [  ];
+    "sensor.dht" = ps: with ps; [  ];
+    "sensor.discogs" = ps: with ps; [ discogs_client ];
+    "sensor.dnsip" = ps: with ps; [ aiodns ];
+    "sensor.dovado" = ps: with ps; [  ];
+    "sensor.dsmr" = ps: with ps; [  ];
+    "sensor.dweet" = ps: with ps; [  ];
+    "sensor.ebox" = ps: with ps; [  ];
+    "sensor.eddystone_temperature" = ps: with ps; [ construct ];
+    "sensor.eliqonline" = ps: with ps; [  ];
+    "sensor.envirophat" = ps: with ps; [  ];
+    "sensor.etherscan" = ps: with ps; [  ];
+    "sensor.fastdotcom" = ps: with ps; [  ];
+    "sensor.fedex" = ps: with ps; [  ];
+    "sensor.fido" = ps: with ps; [  ];
+    "sensor.fitbit" = ps: with ps; [  ];
+    "sensor.fixer" = ps: with ps; [  ];
+    "sensor.foobot" = ps: with ps; [  ];
+    "sensor.fritzbox_callmonitor" = ps: with ps; [ fritzconnection ];
+    "sensor.fritzbox_netmonitor" = ps: with ps; [ fritzconnection ];
+    "sensor.gearbest" = ps: with ps; [  ];
+    "sensor.geizhals" = ps: with ps; [ beautifulsoup4 ];
+    "sensor.geo_rss_events" = ps: with ps; [ feedparser ];
+    "sensor.gitter" = ps: with ps; [  ];
+    "sensor.google_travel_time" = ps: with ps; [  ];
+    "sensor.gpsd" = ps: with ps; [  ];
+    "sensor.gtfs" = ps: with ps; [  ];
+    "sensor.hp_ilo" = ps: with ps; [  ];
+    "sensor.htu21d" = ps: with ps; [  ];
+    "sensor.hydroquebec" = ps: with ps; [  ];
+    "sensor.imap" = ps: with ps; [ aioimaplib ];
+    "sensor.influxdb" = ps: with ps; [ influxdb ];
+    "sensor.irish_rail_transport" = ps: with ps; [  ];
+    "sensor.kwb" = ps: with ps; [  ];
+    "sensor.lacrosse" = ps: with ps; [  ];
+    "sensor.lastfm" = ps: with ps; [ pylast ];
+    "sensor.linux_battery" = ps: with ps; [ batinfo ];
+    "sensor.loopenergy" = ps: with ps; [  ];
+    "sensor.luftdaten" = ps: with ps; [ luftdaten ];
+    "sensor.lyft" = ps: with ps; [  ];
+    "sensor.metoffice" = ps: with ps; [  ];
+    "sensor.mfi" = ps: with ps; [  ];
+    "sensor.mhz19" = ps: with ps; [  ];
+    "sensor.miflora" = ps: with ps; [  ];
+    "sensor.modem_callerid" = ps: with ps; [  ];
+    "sensor.mopar" = ps: with ps; [  ];
+    "sensor.mvglive" = ps: with ps; [  ];
+    "sensor.nederlandse_spoorwegen" = ps: with ps; [  ];
+    "sensor.neurio_energy" = ps: with ps; [  ];
+    "sensor.nut" = ps: with ps; [  ];
+    "sensor.openevse" = ps: with ps; [  ];
+    "sensor.openweathermap" = ps: with ps; [  ];
+    "sensor.otp" = ps: with ps; [  ];
+    "sensor.plex" = ps: with ps; [  ];
+    "sensor.pocketcasts" = ps: with ps; [  ];
+    "sensor.pollen" = ps: with ps; [  ];
+    "sensor.pushbullet" = ps: with ps; [ pushbullet ];
+    "sensor.qnap" = ps: with ps; [  ];
+    "sensor.ripple" = ps: with ps; [  ];
+    "sensor.sabnzbd" = ps: with ps; [  ];
+    "sensor.scrape" = ps: with ps; [ beautifulsoup4 ];
+    "sensor.season" = ps: with ps; [ ephem ];
+    "sensor.sense" = ps: with ps; [  ];
+    "sensor.sensehat" = ps: with ps; [  ];
+    "sensor.serial" = ps: with ps; [  ];
+    "sensor.serial_pm" = ps: with ps; [  ];
+    "sensor.shodan" = ps: with ps; [  ];
+    "sensor.sma" = ps: with ps; [  ];
+    "sensor.snmp" = ps: with ps; [ pysnmp ];
+    "sensor.sochain" = ps: with ps; [  ];
+    "sensor.speedtest" = ps: with ps; [  ];
+    "sensor.spotcrime" = ps: with ps; [  ];
+    "sensor.sql" = ps: with ps; [ sqlalchemy ];
+    "sensor.startca" = ps: with ps; [ xmltodict ];
+    "sensor.steam_online" = ps: with ps; [  ];
+    "sensor.swiss_hydrological_data" = ps: with ps; [ xmltodict ];
+    "sensor.swiss_public_transport" = ps: with ps; [  ];
+    "sensor.syncthru" = ps: with ps; [  ];
+    "sensor.synologydsm" = ps: with ps; [  ];
+    "sensor.systemmonitor" = ps: with ps; [ psutil ];
+    "sensor.sytadin" = ps: with ps; [ beautifulsoup4 ];
+    "sensor.tank_utility" = ps: with ps; [  ];
+    "sensor.ted5000" = ps: with ps; [ xmltodict ];
+    "sensor.temper" = ps: with ps; [  ];
+    "sensor.thinkingcleaner" = ps: with ps; [  ];
+    "sensor.tibber" = ps: with ps; [  ];
+    "sensor.transmission" = ps: with ps; [ transmissionrpc ];
+    "sensor.travisci" = ps: with ps; [  ];
+    "sensor.twitch" = ps: with ps; [  ];
+    "sensor.uber" = ps: with ps; [  ];
+    "sensor.ups" = ps: with ps; [  ];
+    "sensor.vasttrafik" = ps: with ps; [  ];
+    "sensor.waqi" = ps: with ps; [  ];
+    "sensor.waze_travel_time" = ps: with ps; [  ];
+    "sensor.whois" = ps: with ps; [  ];
+    "sensor.xbox_live" = ps: with ps; [  ];
+    "sensor.xiaomi_miio" = ps: with ps; [ construct ];
+    "sensor.yahoo_finance" = ps: with ps; [  ];
+    "sensor.yr" = ps: with ps; [ xmltodict ];
+    "sensor.yweather" = ps: with ps; [ yahooweather ];
+    "sensor.zestimate" = ps: with ps; [ xmltodict ];
+    "shiftr" = ps: with ps; [ paho-mqtt ];
+    "skybell" = ps: with ps; [  ];
+    "sleepiq" = ps: with ps; [  ];
+    "smappee" = ps: with ps; [  ];
+    "spc" = ps: with ps; [ websockets ];
+    "statsd" = ps: with ps; [ statsd ];
+    "switch.acer_projector" = ps: with ps; [ pyserial ];
+    "switch.anel_pwrctrl" = ps: with ps; [  ];
+    "switch.broadlink" = ps: with ps; [  ];
+    "switch.deluge" = ps: with ps; [ deluge-client ];
+    "switch.digitalloggers" = ps: with ps; [  ];
+    "switch.dlink" = ps: with ps; [  ];
+    "switch.edimax" = ps: with ps; [  ];
+    "switch.fritzdect" = ps: with ps; [  ];
+    "switch.hikvisioncam" = ps: with ps; [  ];
+    "switch.mfi" = ps: with ps; [  ];
+    "switch.mystrom" = ps: with ps; [  ];
+    "switch.netio" = ps: with ps; [  ];
+    "switch.orvibo" = ps: with ps; [  ];
+    "switch.rachio" = ps: with ps; [  ];
+    "switch.rainmachine" = ps: with ps; [  ];
+    "switch.rpi_rf" = ps: with ps; [  ];
+    "switch.snmp" = ps: with ps; [ pysnmp ];
+    "switch.thinkingcleaner" = ps: with ps; [  ];
+    "switch.tplink" = ps: with ps; [  ];
+    "switch.transmission" = ps: with ps; [ transmissionrpc ];
+    "switch.vesync" = ps: with ps; [  ];
+    "switch.wake_on_lan" = ps: with ps; [ wakeonlan ];
+    "switch.xiaomi_miio" = ps: with ps; [ construct ];
+    "tado" = ps: with ps; [  ];
+    "tahoma" = ps: with ps; [  ];
+    "telegram_bot" = ps: with ps; [ python-telegram-bot ];
+    "tellduslive" = ps: with ps; [  ];
+    "tellstick" = ps: with ps; [  ];
+    "tesla" = ps: with ps; [  ];
+    "thingspeak" = ps: with ps; [  ];
+    "toon" = ps: with ps; [  ];
+    "tradfri" = ps: with ps; [  ];
+    "tts" = ps: with ps; [ mutagen ];
+    "tts.amazon_polly" = ps: with ps; [ boto3 ];
+    "tts.baidu" = ps: with ps; [  ];
+    "tts.google" = ps: with ps; [  ];
+    "tts.microsoft" = ps: with ps; [  ];
+    "twilio" = ps: with ps; [ twilio ];
+    "upcloud" = ps: with ps; [  ];
+    "updater" = ps: with ps; [ distro ];
+    "upnp" = ps: with ps; [ miniupnpc ];
+    "usps" = ps: with ps; [  ];
+    "vacuum.roomba" = ps: with ps; [  ];
+    "vacuum.xiaomi_miio" = ps: with ps; [ construct ];
+    "velbus" = ps: with ps; [  ];
+    "velux" = ps: with ps; [  ];
+    "vera" = ps: with ps; [  ];
+    "verisure" = ps: with ps; [  ];
+    "volvooncall" = ps: with ps; [  ];
+    "vultr" = ps: with ps; [ vultr ];
+    "wake_on_lan" = ps: with ps; [ wakeonlan ];
+    "waterfurnace" = ps: with ps; [  ];
+    "weather.buienradar" = ps: with ps; [  ];
+    "weather.darksky" = ps: with ps; [  ];
+    "weather.metoffice" = ps: with ps; [  ];
+    "weather.openweathermap" = ps: with ps; [  ];
+    "weather.yweather" = ps: with ps; [ yahooweather ];
+    "wemo" = ps: with ps; [  ];
+    "wink" = ps: with ps; [  ];
+    "xiaomi_aqara" = ps: with ps; [  ];
+    "zabbix" = ps: with ps; [  ];
+    "zeroconf" = ps: with ps; [ zeroconf ];
+    "zha" = ps: with ps; [  ];
+    "zigbee" = ps: with ps; [  ];
+    "zwave" = ps: with ps; [ pydispatcher python_openzwave ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix
new file mode 100644
index 00000000000..0f15b21e468
--- /dev/null
+++ b/pkgs/servers/home-assistant/default.nix
@@ -0,0 +1,108 @@
+{ lib, fetchFromGitHub, python3
+, extraComponents ? []
+, extraPackages ? ps: []
+, skipPip ? true }:
+
+let
+
+  py = python3.override {
+    packageOverrides = self: super: {
+      aiohttp = super.aiohttp.overridePythonAttrs (oldAttrs: rec {
+        version = "3.1.1";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "dc5cab081d4b334d0440b019edf24fe1cb138b8114e0e22d2b0661284bc1775f";
+        };
+      });
+      pytest = super.pytest.overridePythonAttrs (oldAttrs: rec {
+        version = "3.4.2";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "117bad36c1a787e1a8a659df35de53ba05f9f3398fb9e4ac17e80ad5903eb8c5";
+        };
+      });
+      voluptuous = super.voluptuous.overridePythonAttrs (oldAttrs: rec {
+        version = "0.11.1";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "af7315c9fa99e0bfd195a21106c82c81619b42f0bd9b6e287b797c6b6b6a9918";
+        };
+      });
+      astral = super.astral.overridePythonAttrs (oldAttrs: rec {
+        version = "1.6";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "874b397ddbf0a4c1d8d644b21c2481e8a96b61343f820ad52d8a322d61a15083";
+        };
+      });
+      async-timeout = super.async-timeout.overridePythonAttrs (oldAttrs: rec {
+        version = "2.0.1";
+        src = oldAttrs.src.override {
+          inherit version;
+          sha256 = "00cff4d2dce744607335cba84e9929c3165632da2d27970dbc55802a0c7873d0";
+        };
+      });
+      hass-frontend = super.callPackage ./frontend.nix { };
+    };
+  };
+
+  componentPackages = import ./component-packages.nix;
+
+  availableComponents = builtins.attrNames componentPackages.components;
+
+  getPackages = component: builtins.getAttr component componentPackages.components;
+
+  componentBuildInputs = lib.concatMap (component: getPackages component py.pkgs) extraComponents;
+
+  # Ensure that we are using a consistent package set
+  extraBuildInputs = extraPackages py.pkgs;
+
+  # Don't forget to run parse-requirements.py after updating
+  hassVersion = "0.67.1";
+
+in with py.pkgs; buildPythonApplication rec {
+  pname = "homeassistant";
+  version = assert (componentPackages.version == hassVersion); hassVersion;
+
+  disabled = pythonOlder "3.5";
+
+  inherit availableComponents;
+
+  # PyPI tarball is missing tests/ directory
+  src = fetchFromGitHub {
+    owner = "home-assistant";
+    repo = "home-assistant";
+    rev = version;
+    sha256 = "02czbqdsdar8rjkr0r5g6j1x9caazcir2w1hp595z4cn90c0342f";
+  };
+
+  propagatedBuildInputs = [
+    # From setup.py
+    requests pyyaml pytz pip jinja2 voluptuous typing aiohttp async-timeout astral certifi attrs
+    # From http, frontend and recorder components
+    sqlalchemy aiohttp-cors hass-frontend
+  ] ++ componentBuildInputs ++ extraBuildInputs;
+
+  checkInputs = [
+    pytest requests-mock pydispatcher pytest-aiohttp
+  ];
+
+  checkPhase = ''
+    # The components' dependencies are not included, so they cannot be tested
+    py.test --ignore tests/components
+    # Some basic components should be tested however
+    # test_not_log_password fails because nothing is logged at all
+    py.test -k "not test_not_log_password" \
+      tests/components/{group,http} \
+      tests/components/test_{api,configurator,demo,discovery,frontend,init,introduction,logger,script,shell_command,system_log,websocket_api}.py
+  '';
+
+  makeWrapperArgs = lib.optional skipPip "--add-flags --skip-pip";
+
+  meta = with lib; {
+    homepage = https://home-assistant.io/;
+    description = "Open-source home automation platform running on Python 3";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ f-breidenstein dotlambda ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/frontend.nix b/pkgs/servers/home-assistant/frontend.nix
new file mode 100644
index 00000000000..fbafa87e622
--- /dev/null
+++ b/pkgs/servers/home-assistant/frontend.nix
@@ -0,0 +1,13 @@
+{ stdenv, fetchPypi, buildPythonPackage, user-agents }:
+
+buildPythonPackage rec {
+  pname = "home-assistant-frontend";
+  version = "20180404.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "ac36d4f5e30e93b02dadd2ecdc07218fde3d97ffc2f69a6f1acf5e601cd4e5ad";
+  };
+
+  propagatedBuildInputs = [ user-agents ];
+}
diff --git a/pkgs/servers/home-assistant/parse-requirements.py b/pkgs/servers/home-assistant/parse-requirements.py
new file mode 100755
index 00000000000..46e7acee178
--- /dev/null
+++ b/pkgs/servers/home-assistant/parse-requirements.py
@@ -0,0 +1,114 @@
+#! /usr/bin/env nix-shell
+#! nix-shell -i python3 -p "python3.withPackages (ps: with ps; [ ])"
+#
+# This script downloads https://github.com/home-assistant/home-assistant/blob/master/requirements_all.txt.
+# This file contains lines of the form
+#
+#     # homeassistant.components.foo
+#     # homeassistant.components.bar
+#     foobar==1.2.3
+#
+# i.e. it lists dependencies and the components that require them.
+# By parsing the file, a dictionary mapping component to dependencies is created.
+# For all of these dependencies, Nixpkgs' python3Packages are searched for appropriate names.
+# Then, a Nix attribute set mapping component name to dependencies is created.
+
+from urllib.request import urlopen
+from collections import OrderedDict
+import subprocess
+import os
+import sys
+import json
+import re
+
+GENERAL_PREFIX = '# homeassistant.'
+COMPONENT_PREFIX = GENERAL_PREFIX + 'components.'
+PKG_SET = 'python3Packages'
+
+def get_version():
+    with open(os.path.dirname(sys.argv[0]) + '/default.nix') as f:
+        m = re.search('hassVersion = "([\\d\\.]+)";', f.read())
+        return m.group(1)
+
+def fetch_reqs(version='master'):
+    requirements = {}
+    with urlopen('https://github.com/home-assistant/home-assistant/raw/{}/requirements_all.txt'.format(version)) as response:
+        components = []
+        for line in response.read().decode().splitlines():
+            if line == '':
+                components = []
+            elif line[:len(COMPONENT_PREFIX)] == COMPONENT_PREFIX:
+                component = line[len(COMPONENT_PREFIX):]
+                components.append(component)
+                if component not in requirements:
+                    requirements[component] = []
+            elif line[:len(GENERAL_PREFIX)] != GENERAL_PREFIX: # skip lines like "# homeassistant.scripts.xyz"
+                # Some dependencies are commented out because they don't build on all platforms
+                # Since they are still required for running the component, don't skip them
+                if line[:2] == '# ':
+                    line = line[2:]
+                # Some requirements are specified by url, e.g. https://example.org/foobar#xyz==1.0.0
+                # Therefore, if there's a "#" in the line, only take the part after it
+                line = line[line.find('#') + 1:]
+                for component in components:
+                    requirements[component].append(line)
+    return requirements
+
+# Store a JSON dump of Nixpkgs' python3Packages
+output = subprocess.check_output(['nix-env', '-f', os.path.dirname(sys.argv[0]) + '/../../..', '-qa', '-A', PKG_SET, '--json'])
+packages = json.loads(output)
+
+def name_to_attr_path(req):
+    attr_paths = []
+    names = [req]
+    # E.g. python-mpd2 is actually called python3.6-mpd2
+    # instead of python-3.6-python-mpd2 inside Nixpkgs
+    if req.startswith('python-') or req.startswith('python_'):
+        names.append(req[len('python-'):])
+    for name in names:
+        # treat "-" and "_" equally
+        name = re.sub('[-_]', '[-_]', name)
+        pattern = re.compile('^python\\d\\.\\d-{}-\\d'.format(name), re.I)
+        for attr_path, package in packages.items():
+            if pattern.match(package['name']):
+                attr_paths.append(attr_path)
+    # Let's hope there's only one derivation with a matching name
+    assert(len(attr_paths) <= 1)
+    if attr_paths:
+        return attr_paths[0]
+    else:
+        return None
+
+version = get_version()
+print('Generating component-packages.nix for version {}'.format(version))
+requirements = fetch_reqs(version=version)
+build_inputs = {}
+for component, reqs in OrderedDict(sorted(requirements.items())).items():
+    attr_paths = []
+    for req in reqs:
+        try:
+            name = req.split('==')[0]
+            attr_path = name_to_attr_path(name)
+            if attr_path is not None:
+                # Add attribute path without "python3Packages." prefix
+                attr_paths.append(attr_path[len(PKG_SET + '.'):])
+        except RequirementParseError:
+            continue
+    else:
+        build_inputs[component] = attr_paths
+
+# Only select components which have any dependency
+#build_inputs = {k: v for k, v in build_inputs.items() if len(v) > 0}
+
+with open(os.path.dirname(sys.argv[0]) + '/component-packages.nix', 'w') as f:
+    f.write('# Generated from parse-requirements.py\n')
+    f.write('# Do not edit!\n\n')
+    f.write('{\n')
+    f.write('  version = "{}";\n'.format(version))
+    f.write('  components = {\n')
+    for component, attr_paths in build_inputs.items():
+        f.write('    "{}" = ps: with ps; [ '.format(component))
+        f.write(' '.join(attr_paths))
+        f.write(' ];\n')
+    f.write('  };\n')
+    f.write('}\n')
diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix
index 25097a31416..dd076606da5 100644
--- a/pkgs/servers/http/apache-httpd/2.4.nix
+++ b/pkgs/servers/http/apache-httpd/2.4.nix
@@ -4,11 +4,11 @@
 , http2Support ? true, nghttp2
 , ldapSupport ? true, openldap
 , libxml2Support ? true, libxml2
+, brotliSupport ? true, brotli
 , luaSupport ? false, lua5
 }:
 
-let optional       = stdenv.lib.optional;
-    optionalString = stdenv.lib.optionalString;
+let inherit (stdenv.lib) optional optionalString;
 in
 
 assert sslSupport -> aprutil.sslSupport && openssl != null;
@@ -16,12 +16,12 @@ assert ldapSupport -> aprutil.ldapSupport && openldap != null;
 assert http2Support -> nghttp2 != null;
 
 stdenv.mkDerivation rec {
-  version = "2.4.29";
+  version = "2.4.33";
   name = "apache-httpd-${version}";
 
   src = fetchurl {
     url = "mirror://apache/httpd/httpd-${version}.tar.bz2";
-    sha256 = "777753a5a25568a2a27428b2214980564bc1c38c1abf9ccc7630b639991f7f00";
+    sha256 = "de02511859b00d17845b9abdd1f975d5ccb5d0b280c567da5bf2ad4b70846f05";
   };
 
   # FIXME: -dev depends on -doc
@@ -29,6 +29,7 @@ stdenv.mkDerivation rec {
   setOutputFlags = false; # it would move $out/modules, etc.
 
   buildInputs = [perl] ++
+    optional brotliSupport brotli ++
     optional sslSupport openssl ++
     optional ldapSupport openldap ++    # there is no --with-ldap flag
     optional libxml2Support libxml2 ++
@@ -58,6 +59,7 @@ stdenv.mkDerivation rec {
     --enable-cern-meta
     --enable-imagemap
     --enable-cgi
+    ${optionalString brotliSupport "--enable-brotli --with-brotli=${brotli}"}
     ${optionalString proxySupport "--enable-proxy"}
     ${optionalString sslSupport "--enable-ssl"}
     ${optionalString http2Support "--enable-http2 --with-nghttp2"}
diff --git a/pkgs/servers/http/apache-modules/mod_wsgi/default.nix b/pkgs/servers/http/apache-modules/mod_wsgi/default.nix
index 1e898075d19..948ef345e10 100644
--- a/pkgs/servers/http/apache-modules/mod_wsgi/default.nix
+++ b/pkgs/servers/http/apache-modules/mod_wsgi/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "mod_wsgi-${version}";
-  version = "3.5";
+  version = "4.6.4";
 
   src = fetchurl {
     url = "https://github.com/GrahamDumpleton/mod_wsgi/archive/${version}.tar.gz";
-    sha256 = "14xz422jlakdhxzsl8xs9if86yf1fnkwdg0havjyqs7my0w4qrzh";
+    sha256 = "1hyaxr9km7cj4k6b0d6xx3bplpa8483fhyk9x802sl22m3f2vc1k";
   };
 
   buildInputs = [ apacheHttpd python2 ];
diff --git a/pkgs/servers/http/apt-cacher-ng/default.nix b/pkgs/servers/http/apt-cacher-ng/default.nix
index 8958b51e873..415b1fb48a2 100644
--- a/pkgs/servers/http/apt-cacher-ng/default.nix
+++ b/pkgs/servers/http/apt-cacher-ng/default.nix
@@ -1,17 +1,28 @@
-{ stdenv, fetchurl, cmake, doxygen, zlib, openssl, bzip2, pkgconfig, libpthreadstubs }:
+{ stdenv
+, bzip2
+, cmake
+, doxygen
+, fetchurl
+, fuse
+, lzma
+, openssl
+, pkgconfig
+, systemd
+, tcp_wrappers
+, zlib
+}:
 
 stdenv.mkDerivation rec {
   name = "apt-cacher-ng-${version}";
-  version = "0.9.1";
+  version = "3.1";
 
   src = fetchurl {
     url = "http://ftp.debian.org/debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_${version}.orig.tar.xz";
-    sha256 = "1d686knvig1niapc1ib2045f7jfad3m4jvz6gkwm276fqvm4p694";
+    sha256 = "0p8cdig70vz1dgw2v8brjin5wqrk8amncphyf11f53bza5grlc91";
   };
 
-  NIX_LDFLAGS = "-lpthread";
   nativeBuildInputs = [ cmake doxygen pkgconfig ];
-  buildInputs = [ zlib openssl bzip2 libpthreadstubs ];
+  buildInputs = [ bzip2 fuse lzma openssl systemd tcp_wrappers zlib ];
 
   meta = with stdenv.lib; {
     description = "A caching proxy specialized for linux distribution files";
diff --git a/pkgs/servers/http/couchdb/2.0.0.nix b/pkgs/servers/http/couchdb/2.0.0.nix
index 1e56a2dac48..f94ff56373d 100644
--- a/pkgs/servers/http/couchdb/2.0.0.nix
+++ b/pkgs/servers/http/couchdb/2.0.0.nix
@@ -3,14 +3,15 @@
 
 stdenv.mkDerivation rec {
   name = "couchdb-${version}";
-  version = "2.0.0";
+  version = "2.1.1";
 
   src = fetchurl {
     url = "mirror://apache/couchdb/source/${version}/apache-${name}.tar.gz";
-    sha256 = "1jkfx6g9anrgmkhrkcn50axcamragranwsciw1rhmi86rglkrbyc";
+    sha256 = "1k3v9v05417087b6fcj5yv03wl6i61xqrrhp0prl9b3ir2mmbwnm";
   };
 
-  buildInputs = [ erlang icu openssl spidermonkey makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ erlang icu openssl spidermonkey ];
 
   patches = [ ./jsapi.patch ];
   postPatch = ''
diff --git a/pkgs/servers/http/couchdb/default.nix b/pkgs/servers/http/couchdb/default.nix
index 5a988d22ecb..43334819dc5 100644
--- a/pkgs/servers/http/couchdb/default.nix
+++ b/pkgs/servers/http/couchdb/default.nix
@@ -3,30 +3,18 @@
 
 stdenv.mkDerivation rec {
   name = "couchdb-${version}";
-  version = "1.6.1";
+  version = "1.7.1";
 
   src = fetchurl {
     url = "mirror://apache/couchdb/source/${version}/apache-${name}.tar.gz";
-    sha256 = "09w6ijj9l5jzh81nvc3hrlqp345ajg3haj353g9kxkik6wbinq2s";
+    sha256 = "1b9cbdrmh1i71mrwvhm17v4cf7lckpil1vvq7lpmxyn6zfk0l84i";
   };
 
-  buildInputs = [ erlang icu openssl spidermonkey curl help2man sphinx which
-    file pkgconfig ];
-
-  /* This patch removes the `-Werror` flag as there are warnings due to
-   * _BSD_SOURCE being deprecated in glibc >= 2.20
-   */
-  patchPhase = ''
-    patch src/couchdb/priv/Makefile.in <<EOF
-    392c392
-    < couchjs_CFLAGS = -g -Wall -Werror -D_BSD_SOURCE \$(CURL_CFLAGS) \$(JS_CFLAGS)
-    ---
-    > couchjs_CFLAGS = -g -Wall -D_BSD_SOURCE \$(CURL_CFLAGS) \$(JS_CFLAGS)
-    EOF
-  '';
+  nativeBuildInputs = [ help2man which file pkgconfig sphinx ];
+  buildInputs = [ erlang icu openssl spidermonkey curl ];
 
   postInstall = ''
-    sed -i -e "s|\`getopt|\`${getopt}/bin/getopt|" $out/bin/couchdb
+    substituteInPlace $out/bin/couchdb --replace getopt "${getopt}/bin/getopt"
   '';
 
   /*
diff --git a/pkgs/servers/http/gatling/default.nix b/pkgs/servers/http/gatling/default.nix
index 549beec674c..19b2d01f5be 100644
--- a/pkgs/servers/http/gatling/default.nix
+++ b/pkgs/servers/http/gatling/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchurl, libowfat, zlib, openssl }:
 
 let
-  version = "0.13";
+  version = "0.15";
 in
 stdenv.mkDerivation rec {
   name = "gatling-${version}";
 
   src = fetchurl {
-    url = "http://dl.fefe.de/${name}.tar.bz2";
-    sha256 = "0icjx20ws8gqxgpm77dx7p9zcwi1fv162in6igx04rmnyzyla8dl";
+    url = "https://www.fefe.de/gatling/${name}.tar.xz";
+    sha256 = "194srqyja3pczpbl6l169zlvx179v7ln0m6yipmhvj6hrv82k8vg";
   };
 
   buildInputs = [  libowfat zlib openssl.dev ];
diff --git a/pkgs/servers/http/h2o/default.nix b/pkgs/servers/http/h2o/default.nix
new file mode 100644
index 00000000000..cd2985960a7
--- /dev/null
+++ b/pkgs/servers/http/h2o/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub
+, pkgconfig, cmake
+, libressl_2_6, libuv, zlib
+}:
+
+with builtins;
+
+stdenv.mkDerivation rec {
+  name = "h2o-${version}";
+  version = "2.2.4";
+
+  src = fetchFromGitHub {
+    owner  = "h2o";
+    repo   = "h2o";
+    rev    = "refs/tags/v${version}";
+    sha256 = "0176x0bzjry19zs074a9i5vhncc842xikmx43wj61jky318nq4w4";
+  };
+
+  nativeBuildInputs = [ pkgconfig cmake ];
+  buildInputs = [ libressl_2_6 libuv zlib ];
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Optimized HTTP/1 and HTTP/2 server";
+    homepage    = https://h2o.examp1e.net;
+    license     = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    platforms   = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/servers/http/hiawatha/default.nix b/pkgs/servers/http/hiawatha/default.nix
index aa6f0e1f910..99900bbdb3e 100644
--- a/pkgs/servers/http/hiawatha/default.nix
+++ b/pkgs/servers/http/hiawatha/default.nix
@@ -12,11 +12,11 @@ assert enableSSL -> openssl !=null;
 
 stdenv.mkDerivation rec {
   name = "hiawatha-${version}";
-  version = "10.5";
+  version = "10.7";
 
   src = fetchurl {
     url = "https://github.com/hsleisink/hiawatha/archive/v${version}.tar.gz";
-    sha256 = "11nqdmmhq1glgsiza8pfh69wmpgwl51vb3xijmpcxv63a7ywp4fj";
+    sha256 = "1k0vgpfkmdxmkimq4ab70cqwhj5qwr4pzq7nnv957ah8cw2ijy1z";
   };
 
   buildInputs =  [ cmake libxslt zlib libxml2 ] ++ stdenv.lib.optional enableSSL openssl ;
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
     description = "An advanced and secure webserver";
     license = licenses.gpl2;
     homepage = https://www.hiawatha-webserver.org;
-    maintainer = [ maintainers.ndowens ];
+    maintainers = [ maintainers.ndowens ];
   };
 
 }
diff --git a/pkgs/servers/http/jetty/default.nix b/pkgs/servers/http/jetty/default.nix
index 98ca50c5bc4..1e99aab24c6 100644
--- a/pkgs/servers/http/jetty/default.nix
+++ b/pkgs/servers/http/jetty/default.nix
@@ -2,19 +2,18 @@
 
 stdenv.mkDerivation rec {
   name = "jetty-${version}";
-  version = "9.3.10.v20160621";
-
+  version = "9.4.8.v20171121";
   src = fetchurl {
     url = "http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/${version}/jetty-distribution-${version}.tar.gz";
     name = "jetty-distribution-${version}.tar.gz";
-    sha256 = "0xqv7bp82i95gikma70kyi91nlgsj5zabzg59ly9ga4mqf5y0zbz";
+    sha256 = "0bvwi70vdk468yqgvgq99lwrpy2y5znrl0b1cr8j6ygmsgnvvmjh";
   };
 
   phases = [ "unpackPhase" "installPhase" ];
 
   installPhase = ''
     mkdir -p $out
-    mv etc lib modules start.jar $out
+    mv etc lib modules start.ini start.jar $out
   '';
 
   meta = {
diff --git a/pkgs/servers/http/lighttpd/default.nix b/pkgs/servers/http/lighttpd/default.nix
index c3e15ed846d..7bf1b1ffa64 100644
--- a/pkgs/servers/http/lighttpd/default.nix
+++ b/pkgs/servers/http/lighttpd/default.nix
@@ -1,27 +1,31 @@
 { stdenv, fetchurl, pkgconfig, pcre, libxml2, zlib, attr, bzip2, which, file
 , openssl, enableMagnet ? false, lua5_1 ? null
 , enableMysql ? false, mysql ? null
+, enableLdap ? false, openldap ? null
 }:
 
 assert enableMagnet -> lua5_1 != null;
 assert enableMysql -> mysql != null;
+assert enableLdap -> openldap != null;
 
 stdenv.mkDerivation rec {
-  name = "lighttpd-1.4.45";
+  name = "lighttpd-1.4.49";
 
   src = fetchurl {
     url = "http://download.lighttpd.net/lighttpd/releases-1.4.x/${name}.tar.xz";
-    sha256 = "0grsqh7pdqnjx6xicd96adsx84vryb7c4n21dnxfygm3xrfj55qw";
+    sha256 = "02ff77cpvy1006cwfym38vf78xm18plyj636ll74r7kx2bblkpxf";
   };
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ pcre libxml2 zlib attr bzip2 which file openssl ]
              ++ stdenv.lib.optional enableMagnet lua5_1
-             ++ stdenv.lib.optional enableMysql mysql.lib;
+             ++ stdenv.lib.optional enableMysql mysql.connector-c
+             ++ stdenv.lib.optional enableLdap openldap;
 
   configureFlags = [ "--with-openssl" ]
                 ++ stdenv.lib.optional enableMagnet "--with-lua"
-                ++ stdenv.lib.optional enableMysql "--with-mysql";
+                ++ stdenv.lib.optional enableMysql "--with-mysql"
+                ++ stdenv.lib.optional enableLdap "--with-ldap";
 
   preConfigure = ''
     sed -i "s:/usr/bin/file:${file}/bin/file:g" configure
diff --git a/pkgs/servers/http/lwan/default.nix b/pkgs/servers/http/lwan/default.nix
new file mode 100644
index 00000000000..878211ebf02
--- /dev/null
+++ b/pkgs/servers/http/lwan/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, pkgconfig, zlib, cmake, jemalloc }:
+
+stdenv.mkDerivation rec {
+  pname = "lwan";
+  version = "0.1";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "lpereira";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1mckryzb06smky0bx2bkqwqzpnq4pb8vlgmmwsvqmwi4mmw9wmi1";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  buildInputs = [ jemalloc zlib ];
+
+  meta = with stdenv.lib; {
+    description = "Lightweight high-performance multi-threaded web server";
+    longDescription = "A lightweight and speedy web server with a low memory
+      footprint (~500KiB for 10k idle connections), with minimal system calls and
+      memory allocation.  Lwan contains a hand-crafted HTTP request parser. Files are
+      served using the most efficient way according to their size: no copies between
+      kernel and userland for files larger than 16KiB.  Smaller files are sent using
+      vectored I/O of memory-mapped buffers. Header overhead is considered before
+      compressing small files.  Features include: mustache templating engine and IPv6
+      support.
+    ";
+    homepage = "https://lwan.ws/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ leenaars ];
+  };
+}
diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix
index de30870bee8..ff0a4c65b4a 100644
--- a/pkgs/servers/http/nginx/generic.nix
+++ b/pkgs/servers/http/nginx/generic.nix
@@ -55,7 +55,7 @@ stdenv.mkDerivation {
     "--with-mail_ssl_module"
   ]
     ++ optional (gd != null) "--with-http_image_filter_module"
-    ++ optional (elem stdenv.system (with platforms; linux ++ freebsd)) "--with-file-aio"
+    ++ optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio"
     ++ map (mod: "--add-module=${mod.src}") modules;
 
   NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations";
diff --git a/pkgs/servers/http/nginx/mainline.nix b/pkgs/servers/http/nginx/mainline.nix
index 0eb8979c3ac..2bfe0329595 100644
--- a/pkgs/servers/http/nginx/mainline.nix
+++ b/pkgs/servers/http/nginx/mainline.nix
@@ -1,6 +1,6 @@
 { callPackage, ... }@args:
 
 callPackage ./generic.nix (args // {
-  version = "1.13.6";
-  sha256 = "1y7qcdpjskjc1iwwrjqsbgm74jpnf873pwv17clsy83ak1pzq4l5";
+  version = "1.13.9";
+  sha256 = "0hpsyxpxj89p5vrzv9p1hp7xjbnj5c1w6fdy626ycvsiay4a3bjz";
 })
diff --git a/pkgs/servers/http/nginx/modules.nix b/pkgs/servers/http/nginx/modules.nix
index 9f0f5ac4bb9..95e156f9627 100644
--- a/pkgs/servers/http/nginx/modules.nix
+++ b/pkgs/servers/http/nginx/modules.nix
@@ -1,22 +1,26 @@
-{ fetchFromGitHub, pkgs }:
+{ fetchFromGitHub, fetchurl, lib, pkgs }:
 
 {
   brotli = {
-    src = fetchFromGitHub {
-      owner = "google";
+    src = let gitsrc = pkgs.fetchFromGitHub {
+      owner = "eustas";
       repo = "ngx_brotli";
-      rev = "788615eab7c5e0a984278113c55248305620df14";
-      sha256 = "02514bbjdhm9m38vljdh626d3c1783jxsxawv5c6bzblwmb8xgvf";
-    };
-    inputs = [ pkgs.libbrotli ];
+      rev = "6a1174446f5a866d3d13615dd2824177570f0a69";
+      sha256 = "148xfh6w1wgql2jj922ryiddrs93dyacs903j2hnil67cpia45p6";
+    }; in pkgs.runCommandNoCC "ngx_brotli-src" {} ''
+      cp -a ${gitsrc} $out
+      substituteInPlace $out/config \
+        --replace /usr/local ${lib.getDev pkgs.brotli}
+    '';
+    inputs = [ pkgs.brotli ];
   };
 
-  rtmp = {
+  rtmp ={
     src = fetchFromGitHub {
       owner = "arut";
       repo = "nginx-rtmp-module";
-      rev = "v1.1.11";
-      sha256 = "09zrnf8lk179mpqnx92zm24xl7m3bq4ca84wc2zwi5hc8kxjbwxc";
+      rev = "v1.2.1";
+      sha256 = "0na1aam176irz6w148hnvamqy1ilbn4abhdzkva0yrm35a3ksbzn";
     };
   };
 
@@ -47,6 +51,16 @@
     '';
   };
 
+  modsecurity-nginx = {
+    src = fetchFromGitHub {
+      owner = "SpiderLabs";
+      repo = "ModSecurity-nginx";
+      rev = "v1.0.0";
+      sha256 = "0zzpdqhbdqqy8kjkszv0mrq6136ah9v3zwr1jbh312j8izmzdyi7";
+    };
+    inputs = [ pkgs.curl pkgs.geoip pkgs.libmodsecurity pkgs.libxml2 pkgs.lmdb pkgs.yajl ];
+  };
+
   echo = {
     src = fetchFromGitHub {
       owner = "openresty";
@@ -142,8 +156,8 @@
       moduleSrc = fetchFromGitHub {
         owner  = "pagespeed";
         repo   = "ngx_pagespeed";
-        rev    = "v${version}-beta";
-        sha256 = "03dvzf1lgsjxcs1jjxq95n2rhgq0wy0f9ahvgascy0fak7qx4xj9";
+        rev    = "v${version}-stable";
+        sha256 = "0ry7vmkb2bx0sspl1kgjlrzzz6lbz07313ks2lr80rrdm2zb16wp";
       };
 
       ngx_pagespeed = pkgs.runCommand
@@ -162,6 +176,7 @@
         '';
     in {
       src = ngx_pagespeed;
+      inputs = [ pkgs.zlib pkgs.libuuid ]; # psol deps
     };
 
     shibboleth = {
diff --git a/pkgs/servers/http/openresty/default.nix b/pkgs/servers/http/openresty/default.nix
index 147e24c014d..093f5f0e502 100644
--- a/pkgs/servers/http/openresty/default.nix
+++ b/pkgs/servers/http/openresty/default.nix
@@ -1,25 +1,30 @@
-{ stdenv, fetchurl, fetchgit, openssl, zlib, pcre, libxml2, libxslt, gd, geoip
-, perl }:
-
-assert stdenv.isLinux;
+{ stdenv, fetchurl, fetchgit, openssl, zlib, pcre, postgresql, libxml2, libxslt,
+gd, geoip, perl }:
 
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "openresty-${version}";
-  version = "1.9.3.1";
+  version = "1.13.6.1";
 
   src = fetchurl {
-    url = "http://openresty.org/download/ngx_openresty-${version}.tar.gz";
-    sha256 = "1fw8yxjndf5gsk44l4bsixm270fxv7f5cdiwzq9ps6j3hhgx5kyv";
+    url = "http://openresty.org/download/openresty-${version}.tar.gz";
+    sha256 = "0sv93nw1j597mdpnibmgaa3nnghdk0z6k27vavm8w2c1z9n6w96i";
   };
 
-  buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip perl ];
+  buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip postgresql ];
+  nativeBuildInputs = [ perl ];
+
+  NIX_CFLAGS_COMPILE = ["-I${libxml2.dev}/include/libxml2"];
+
+  preConfigure = ''
+    patchShebangs .
+  '';
 
   configureFlags = [
     "--with-pcre-jit"
     "--with-http_ssl_module"
-    "--with-http_spdy_module"
+    "--with-http_v2_module"
     "--with-http_realip_module"
     "--with-http_addition_module"
     "--with-http_xslt_module"
@@ -36,26 +41,22 @@ stdenv.mkDerivation rec {
     "--with-http_secure_link_module"
     "--with-http_degradation_module"
     "--with-http_stub_status_module"
+    "--with-http_postgres_module"
     "--with-ipv6"
   ];
 
-  postInstall = ''
-    mv $out/nginx/sbin/nginx $out/bin
-    mv $out/luajit/bin/luajit-2.1.0-alpha $out/bin/luajit-openresty
-    ln -s $out/bin/nginx $out/bin/openresty
-  '';
+  enableParallelBuilding = true;
 
-  preConfigure = ''
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2.dev}/include/libxml2 $additionalFlags"
-    export PATH="$PATH:${stdenv.cc.libc.bin}/bin"
-    patchShebangs .
+  postInstall = ''
+    ln -s $out/luajit/bin/luajit-2.1.0-beta3 $out/bin/luajit-openresty
+    ln -s $out/nginx/sbin/nginx $out/bin/nginx
   '';
 
   meta = {
     description = "A fast web application server built on Nginx";
     homepage    = http://openresty.org;
     license     = licenses.bsd2;
-    platforms   = platforms.linux;
-    maintainers = with maintainers; [ thoughtpolice ];
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ thoughtpolice lblasc ];
   };
 }
diff --git a/pkgs/servers/http/pshs/default.nix b/pkgs/servers/http/pshs/default.nix
index 4eb74c8cb53..a0a1addeeeb 100644
--- a/pkgs/servers/http/pshs/default.nix
+++ b/pkgs/servers/http/pshs/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "pshs-${version}";
-  version = "0.3.1";
+  version = "0.3.3";
 
   src = fetchFromGitHub {
     owner = "mgorny";
     repo = "pshs";
     rev = "v${version}";
-    sha256 = "18mhxdjlyr21gghzkrrlp0imicb6bqf741p0a21c2rkvs4bv8c1w";
+    sha256 = "04l03myh99npl78y8nss053gnc7k8q60vdbdpml19sshmwaw3fgi";
   };
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
diff --git a/pkgs/servers/http/thttpd/default.nix b/pkgs/servers/http/thttpd/default.nix
index 08e682aa716..c234a1ae1ee 100644
--- a/pkgs/servers/http/thttpd/default.nix
+++ b/pkgs/servers/http/thttpd/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "thttpd-${version}";
-  version = "2.27";
+  version = "2.28";
 
   src = fetchurl {
     url = "http://acme.com/software/thttpd/${name}.tar.gz";
-    sha256 = "0ykda5k1zzzag59zbd4bkzj1psavq0xnpy7vpk19rhx7mlvvri5i";
+    sha256 = "0a03w7wg994dizdb37pf4kd9s5lf2q414721jfqnrqpdshlzjll5";
   };
 
   prePatch = ''
diff --git a/pkgs/servers/http/tomcat/default.nix b/pkgs/servers/http/tomcat/default.nix
index 6a29ecaad56..098825d59ce 100644
--- a/pkgs/servers/http/tomcat/default.nix
+++ b/pkgs/servers/http/tomcat/default.nix
@@ -32,25 +32,25 @@ let
 in {
   tomcat7 = common {
     versionMajor = "7";
-    versionMinor = "0.81";
-    sha256 = "0mcr3caizqk6qrc0j9p91apdsg65ksawg0l6xpqk1fq6071nd5rq";
+    versionMinor = "0.82";
+    sha256 = "0vb7c5i50ral4rr39ss95k7cxnzd7fs21zd7f97d1f3qslzwl69g";
   };
 
   tomcat8 = common {
     versionMajor = "8";
-    versionMinor = "0.46";
-    sha256 = "14wb9mgb7z02j6wvvmcsfc2zkcqnijc40gzyg1mnxcy5fvf8nzpk";
+    versionMinor = "0.47";
+    sha256 = "0xv4v3i08rwzfmz7rkhglq5cbjgnfava8dw0i33vsp7dk162a4g4";
   };
 
   tomcat85 = common {
     versionMajor = "8";
-    versionMinor = "5.20";
-    sha256 = "1l5cgxzaassjnfbr4rbr3wzz45idcqa8aqhphhvlx1xl8xqv6p8a";
+    versionMinor = "5.23";
+    sha256 = "1qnww70x75c0qf2wn8mkpz5lszggjnh78dpb4chyw2fnbm3wxain";
   };
 
-  tomcatUnstable = common {
+  tomcat9 = common {
     versionMajor = "9";
-    versionMinor = "0.0.M17";
-    sha256 = "1ilvka2062m7412bj2fsdwvfxbrjyj9qxcia40hhv22prvkxw3cg";
+    versionMinor = "0.2";
+    sha256 = "0aaykzi0b2xsdmjp60ihcjzh1m95p0a79kn5l2v7vgbkyg449638";
   };
 }
diff --git a/pkgs/servers/http/yaws/default.nix b/pkgs/servers/http/yaws/default.nix
index 67172edfd36..aae4589ebbe 100644
--- a/pkgs/servers/http/yaws/default.nix
+++ b/pkgs/servers/http/yaws/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "yaws-${version}";
-  version = "2.0";
+  version = "2.0.5";
 
   src = fetchurl {
     url = "http://yaws.hyber.org/download/${name}.tar.gz";
-    sha256 = "1gwk44a07n7yvg900yrlfc6qpvjl64k2h2hddd1jaaay8lgpcch6";
+    sha256 = "00bnvf26xlhm3v3c6jzk5kcdk8jkwr1gbd2f4h329lyrpjsx30my";
   };
 
   # The tarball includes a symlink yaws -> yaws-1.95, which seems to be
diff --git a/pkgs/servers/identd/oidentd/default.nix b/pkgs/servers/identd/oidentd/default.nix
index b8eb21e492b..1abe9512f58 100644
--- a/pkgs/servers/identd/oidentd/default.nix
+++ b/pkgs/servers/identd/oidentd/default.nix
@@ -1,13 +1,14 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "oidentd-2.0.8";
+  name = "oidentd-${version}";
+  version = "2.2.2";
 
   CFLAGS = [ "--std=gnu89" ];
 
   src = fetchurl {
-    url = "mirror://sourceforge/ojnk/${name}.tar.gz";
-    sha256 = "0vzv2086rrxcaavrm3js7aqvyc0grgaqy78x61d8s7r8hz8vwk55";
+    url = "https://ftp.janikrabe.com/pub/oidentd/releases/${version}/${name}.tar.gz";
+    sha256 = "1svj7ymljp4s17d7jlx6602n9081714qsj5yymmv1s9wagzjqyn9";
   };
 
   meta = {
diff --git a/pkgs/servers/inginious/default.nix b/pkgs/servers/inginious/default.nix
index 0ffef616f37..fbe226d3e3d 100644
--- a/pkgs/servers/inginious/default.nix
+++ b/pkgs/servers/inginious/default.nix
@@ -65,6 +65,7 @@ in pythonPackages.buildPythonApplication rec {
   '';
 
   meta = {
+    broken = true;
     description = "An intelligent grader that allows secured and automated testing of code made by students";
     homepage = https://github.com/UCL-INGI/INGInious;
     license = licenses.agpl3;
diff --git a/pkgs/servers/interlock/default.nix b/pkgs/servers/interlock/default.nix
index a0b59d332a3..0df055f9690 100644
--- a/pkgs/servers/interlock/default.nix
+++ b/pkgs/servers/interlock/default.nix
@@ -1,5 +1,6 @@
-{ stdenv, lib, sudo, utillinux, coreutils, systemd, cryptsetup,
-  buildGoPackage, fetchFromGitHub }:
+{ stdenv, lib, sudo, coreutils, systemd, cryptsetup
+, mount, umount
+, buildGoPackage, fetchFromGitHub }:
 
 buildGoPackage rec {
   name = "interlock-${version}";
@@ -23,8 +24,8 @@ buildGoPackage rec {
   buildFlags = [ "-tags textsecure" ];
   postPatch = ''
     grep -lr '/s\?bin/' | xargs sed -i \
-      -e 's|/bin/mount|${utillinux}/bin/mount|' \
-      -e 's|/bin/umount|${utillinux}/bin/umount|' \
+      -e 's|/bin/mount|${mount}/bin/mount|' \
+      -e 's|/bin/umount|${umount}/bin/umount|' \
       -e 's|/bin/cp|${coreutils}/bin/cp|' \
       -e 's|/bin/mv|${coreutils}/bin/mv|' \
       -e 's|/bin/chown|${coreutils}/bin/chown|' \
diff --git a/pkgs/servers/irc/ircd-hybrid/default.nix b/pkgs/servers/irc/ircd-hybrid/default.nix
index c13a0ee3d89..c73c69e6ee5 100644
--- a/pkgs/servers/irc/ircd-hybrid/default.nix
+++ b/pkgs/servers/irc/ircd-hybrid/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, openssl, zlib }:
 
 stdenv.mkDerivation rec {
-  name = "ircd-hybrid-8.2.21";
+  name = "ircd-hybrid-8.2.24";
 
   src = fetchurl {
     url = "mirror://sourceforge/ircd-hybrid/${name}.tgz";
-    sha256 = "19cgrgmmz1c72x4gxpd39f9ckm4j9cp1gpgvlkk73d3v13znfzy3";
+    sha256 = "03nmzrhqfsxwry316nm80m9p285v65fz75ns7fg623hcy65jv97a";
   };
 
   buildInputs = [ openssl zlib ];
diff --git a/pkgs/servers/irc/ngircd/default.nix b/pkgs/servers/irc/ngircd/default.nix
index 4dd57b17fed..bdd88db0984 100644
--- a/pkgs/servers/irc/ngircd/default.nix
+++ b/pkgs/servers/irc/ngircd/default.nix
@@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
   name = "ngircd-24";
 
   src = fetchurl {
-    url = "http://ngircd.barton.de/pub/ngircd/${name}.tar.xz";
+    url = "https://ngircd.barton.de/pub/ngircd/${name}.tar.xz";
     sha256 = "020h9d1awyxqr0l42x1fhs47q7cmm17fdxzjish8p2kq23ma0gqp";
   };
 
diff --git a/pkgs/servers/irker/default.nix b/pkgs/servers/irker/default.nix
index 6ad233593a3..002760ff0fd 100644
--- a/pkgs/servers/irker/default.nix
+++ b/pkgs/servers/irker/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
     sha256 = "1hslwqa0gqsnl3l6hd5hxpn0wlachxd51infifhlwhyhd6iwgx8p";
   };
 
-  nativeBuildInputs = [ pkgconfig xmlto docbook2x ];
+  nativeBuildInputs = [ pkgconfig xmlto docbook2x docbook_xsl docbook_xml_dtd_412 ];
 
   buildInputs = [
     python
@@ -21,10 +21,6 @@ stdenv.mkDerivation rec {
     # python.pkgs.pysocks
   ];
 
-  preBuild = ''
-    export XML_CATALOG_FILES='${docbook_xsl}/xml/xsl/docbook/catalog.xml ${docbook_xml_dtd_412}/xml/dtd/docbook/catalog.xml'
-  '';
-
   postPatch = ''
     substituteInPlace Makefile \
       --replace '-o 0 -g 0' ""
diff --git a/pkgs/servers/isso/default.nix b/pkgs/servers/isso/default.nix
new file mode 100644
index 00000000000..5aafe55512b
--- /dev/null
+++ b/pkgs/servers/isso/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, python2, fetchurl, fetchFromGitHub }:
+
+let python = python2.override {
+  packageOverrides = self: super: {
+    misaka = super.misaka.overridePythonAttrs (old: rec {
+      version = "1.0.2";
+      src = old.src.override {
+        inherit version;
+        sha256 = "05rmjxlfhghj90m1kc55lx3z8igabw5y8wmly66p3hphdy4f95v1";
+      };
+      propagatedBuildInputs = [ ];
+    });
+    html5lib = super.html5lib.overridePythonAttrs (old: rec {
+      version = "0.9999999";
+      src = old.src.override {
+        inherit version;
+        sha256 = "2612a191a8d5842bfa057e41ba50bbb9dcb722419d2408c78cff4758d0754868";
+      };
+      checkInputs = with self; [ nose flake8 ];
+      propagatedBuildInputs = with self; [ six ];
+      checkPhase = ''
+        nosetests
+      '';
+    });
+  };
+};
+
+in with python.pkgs; buildPythonApplication rec {
+  pname = "isso";
+  version = "0.10.6";
+
+  # no tests on PyPI
+  src = fetchFromGitHub {
+    owner = "posativ";
+    repo = pname;
+    rev = version;
+    sha256 = "19x9xbwd15fikhchyl4i1wrqx589hdmh279xhnxdszrq898igywb";
+  };
+
+  propagatedBuildInputs = [ misaka werkzeug ipaddr configparser html5lib ];
+
+  checkInputs = [ nose ];
+
+  checkPhase = ''
+    ${python.interpreter} setup.py nosetests
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A commenting server similar to Disqus";
+    homepage = https://posativ.org/isso/;
+    license = licenses.mit;
+    maintainers = with maintainers; [ fgaz ];
+  };
+}
diff --git a/pkgs/servers/jackett/default.nix b/pkgs/servers/jackett/default.nix
index 594bc8caf5b..34d242b92a8 100644
--- a/pkgs/servers/jackett/default.nix
+++ b/pkgs/servers/jackett/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "jackett-${version}";
-  version = "0.8.151";
+  version = "0.8.823";
 
   src = fetchurl {
     url = "https://github.com/Jackett/Jackett/releases/download/v${version}/Jackett.Binaries.Mono.tar.gz";
-    sha256 = "2df2b296b5b314ed035e8d370bf5708a8b5a23957353e2e1e0007ec08a2138a0";
+    sha256 = "0hicz21dvcakqkxix70akc3rrz570j3g0a512pqrr3bdq7ay0dkk";
   };
 
   buildInputs = [ makeWrapper ];
diff --git a/pkgs/servers/mail/archiveopteryx/default.nix b/pkgs/servers/mail/archiveopteryx/default.nix
index 50f94e4688c..080cbc89775 100644
--- a/pkgs/servers/mail/archiveopteryx/default.nix
+++ b/pkgs/servers/mail/archiveopteryx/default.nix
@@ -19,6 +19,13 @@ stdenv.mkDerivation rec {
     sed -i 's:MANDIR = $(PREFIX)/man:MANDIR = '$out'/share/man:' ./Jamsettings
     sed -i 's:READMEDIR = $(PREFIX):READMEDIR = '$out'/share/doc/archiveopteryx:' ./Jamsettings
   '';
+
+  # fix build on gcc7
+  NIX_CFLAGS_COMPILE = [
+    "-Wno-error=builtin-declaration-mismatch"
+    "-Wno-error=implicit-fallthrough"
+  ];
+
   buildPhase = ''jam "-j$NIX_BUILD_CORES" '';
   installPhase = ''
     jam install
diff --git a/pkgs/servers/mail/clamsmtp/default.nix b/pkgs/servers/mail/clamsmtp/default.nix
new file mode 100644
index 00000000000..7214c08d242
--- /dev/null
+++ b/pkgs/servers/mail/clamsmtp/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "clamsmtp-" + version;
+  version = "1.10";
+
+  src = fetchurl {
+    url = "http://thewalter.net/stef/software/clamsmtp/${name}.tar.gz";
+    sha256 = "0apr1pxifw6f1rbbsdrrwzs1dnhybg4hda3qqhqcw7p14r5xnbx5";
+  };
+
+  patches = [ ./header-order.patch ];
+
+  meta = with stdenv.lib; {
+    description = "SMTP filter that allows to check for viruses using the ClamAV
+                   anti-virus software";
+    homepage = http://thewalter.net/stef/software/clamsmtp/;
+    license = licenses.bsd3;
+    maintainers = [ maintainers.ekleog ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/servers/mail/clamsmtp/header-order.patch b/pkgs/servers/mail/clamsmtp/header-order.patch
new file mode 100644
index 00000000000..102ae0a471d
--- /dev/null
+++ b/pkgs/servers/mail/clamsmtp/header-order.patch
@@ -0,0 +1,25 @@
+diff --git a/common/smtppass.c b/common/smtppass.c
+index d9be1ba..4a366f4 100644
+--- a/common/smtppass.c
++++ b/common/smtppass.c
+@@ -60,15 +60,15 @@
+ 
+ #include "usuals.h"
+ 
+-#ifdef LINUX_TRANSPARENT_PROXY
+-#include <linux/netfilter_ipv4.h>
+-#endif
+-
+ #include "compat.h"
+ #include "sock_any.h"
+ #include "stringx.h"
+ #include "sppriv.h"
+ 
++#ifdef LINUX_TRANSPARENT_PROXY
++#include <linux/netfilter_ipv4.h>
++#endif
++
+ /* -----------------------------------------------------------------------
+  *  STRUCTURES
+  */
+
diff --git a/pkgs/servers/mail/dovecot/default.nix b/pkgs/servers/mail/dovecot/default.nix
index 33da203c502..c9065d04161 100644
--- a/pkgs/servers/mail/dovecot/default.nix
+++ b/pkgs/servers/mail/dovecot/default.nix
@@ -1,25 +1,26 @@
-{ stdenv, lib, fetchurl, perl, pkgconfig, systemd, openssl
-, bzip2, zlib, inotify-tools, pam, libcap
-, clucene_core_2, icu, openldap
+{ stdenv, lib, fetchurl, fetchpatch, perl, pkgconfig, systemd, openssl
+, bzip2, zlib, lz4, inotify-tools, pam, libcap
+, clucene_core_2, icu, openldap, libsodium, libstemmer
 # Auth modules
-, withMySQL ? false, libmysql
+, withMySQL ? false, mysql
 , withPgSQL ? false, postgresql
 , withSQLite ? true, sqlite
 }:
 
 stdenv.mkDerivation rec {
-  name = "dovecot-2.2.32";
+  name = "dovecot-2.3.1";
 
   nativeBuildInputs = [ perl pkgconfig ];
-  buildInputs = [ openssl bzip2 zlib clucene_core_2 icu openldap ]
+  buildInputs =
+    [ openssl bzip2 zlib lz4 clucene_core_2 icu openldap libsodium libstemmer ]
     ++ lib.optionals (stdenv.isLinux) [ systemd pam libcap inotify-tools ]
-    ++ lib.optional withMySQL libmysql
+    ++ lib.optional withMySQL mysql.connector-c
     ++ lib.optional withPgSQL postgresql
     ++ lib.optional withSQLite sqlite;
 
   src = fetchurl {
-    url = "http://dovecot.org/releases/2.2/${name}.tar.gz";
-    sha256 = "0bmwyvi1crmrca2knvknsf517x53w7gxrclwyrvrhddgw98j22qn";
+    url = "http://dovecot.org/releases/2.3/${name}.tar.gz";
+    sha256 = "14zva4f8k64x86sm9n21cp2yvrpph6k6k52bm22a00pxjwdq50q8";
   };
 
   preConfigure = ''
@@ -58,6 +59,7 @@ stdenv.mkDerivation rec {
     "--with-ssl=openssl"
     "--with-zlib"
     "--with-bzlib"
+    "--with-lz4"
     "--with-ldap"
     "--with-lucene"
     "--with-icu"
@@ -68,9 +70,9 @@ stdenv.mkDerivation rec {
     ++ lib.optional withSQLite "--with-sqlite";
 
   meta = {
-    homepage = http://dovecot.org/;
+    homepage = https://dovecot.org/;
     description = "Open source IMAP and POP3 email server written with security primarily in mind";
-    maintainers = with stdenv.lib.maintainers; [viric peti rickynils];
+    maintainers = with stdenv.lib.maintainers; [ viric peti rickynils fpletz ];
     platforms = stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/servers/mail/dovecot/plugins/antispam/default.nix b/pkgs/servers/mail/dovecot/plugins/antispam/default.nix
deleted file mode 100644
index 1a1ba1ad448..00000000000
--- a/pkgs/servers/mail/dovecot/plugins/antispam/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ stdenv, fetchhg, autoconf, automake, dovecot, openssl }:
-
-stdenv.mkDerivation {
-  name = "dovecot-antispam-20130429";
-
-  src = fetchhg {
-    url = "http://hg.dovecot.org/dovecot-antispam-plugin/";
-    rev = "5ebc6aae4d7c";
-    sha256 = "181i79c9sf3a80mgmycfq1f77z7fpn3j2s0qiddrj16h3yklf4gv";
-  };
-
-  buildInputs = [ dovecot openssl ];
-  nativeBuildInputs = [ autoconf automake ];
-
-  preConfigure = ''
-    ./autogen.sh
-    # Ugly hack; any ideas?
-    sed "s,^dovecot_moduledir=.*,dovecot_moduledir=$out/lib/dovecot," ${dovecot}/lib/dovecot/dovecot-config > dovecot-config
-  '';
-
-  configureFlags = [
-    "--with-dovecot=."
-  ];
-
-  enableParallelBuilding = true;
-
-  meta = with stdenv.lib; {
-    homepage = http://wiki2.dovecot.org/Plugins/Antispam;
-    description = "An antispam plugin for the Dovecot IMAP server";
-    license = licenses.gpl2;
-    maintainers = with maintainers; [ abbradar ];
-    platforms = platforms.linux;
-  };
-}
diff --git a/pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix b/pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix
index 3df0b41c2ca..e98c58c891a 100644
--- a/pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix
+++ b/pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "dovecot-pigeonhole-${version}";
-  version = "0.4.20";
+  version = "0.5.1";
 
   src = fetchurl {
-    url = "http://pigeonhole.dovecot.org/releases/2.2/dovecot-2.2-pigeonhole-${version}.tar.gz";
-    sha256 = "0nxy007wmyamwj01yfiqbqjnbsd98z783b811rcavwi5iw5pvqbg";
+    url = "http://pigeonhole.dovecot.org/releases/2.3/dovecot-2.3-pigeonhole-${version}.tar.gz";
+    sha256 = "0ivmaxic6cygfphvlrvy0xgggydm7j7kjv1ssfqbr08q4rcsmc73";
   };
 
   buildInputs = [ dovecot openssl ];
@@ -33,6 +33,6 @@ stdenv.mkDerivation rec {
     description = "A sieve plugin for the Dovecot IMAP server";
     license = licenses.lgpl21;
     maintainers = [ maintainers.rickynils ];
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/servers/mail/dspam/default.nix b/pkgs/servers/mail/dspam/default.nix
index 623f0a2b0e2..b63390bb247 100644
--- a/pkgs/servers/mail/dspam/default.nix
+++ b/pkgs/servers/mail/dspam/default.nix
@@ -1,7 +1,7 @@
 { stdenv, lib, fetchurl, makeWrapper
 , gawk, gnused, gnugrep, coreutils, which
 , perl, NetSMTP
-, withMySQL ? false, zlib, libmysql
+, withMySQL ? false, zlib, mysql57
 , withPgSQL ? false, postgresql
 , withSQLite ? false, sqlite
 , withDB ? false, db
@@ -26,7 +26,7 @@ in stdenv.mkDerivation rec {
   };
 
   buildInputs = [ perl ]
-                ++ lib.optionals withMySQL [ zlib libmysql ]
+                ++ lib.optionals withMySQL [ zlib mysql57.connector-c ]
                 ++ lib.optional withPgSQL postgresql
                 ++ lib.optional withSQLite sqlite
                 ++ lib.optional withDB db;
@@ -49,7 +49,7 @@ in stdenv.mkDerivation rec {
     "--enable-preferences-extension"
     "--enable-long-usernames"
     "--enable-external-lookup"
-  ] ++ lib.optional withMySQL "--with-mysql-includes=${lib.getDev libmysql}/include/mysql"
+  ] ++ lib.optional withMySQL "--with-mysql-includes=${mysql57.connector-c}/include/mysql"
     ++ lib.optional withPgSQL "--with-pgsql-libraries=${postgresql.lib}/lib";
 
   # Lots of things are hardwired to paths like sysconfdir. That's why we install with both "prefix" and "DESTDIR"
diff --git a/pkgs/servers/mail/exim/default.nix b/pkgs/servers/mail/exim/default.nix
index b4cec18d030..393ce2c5cda 100644
--- a/pkgs/servers/mail/exim/default.nix
+++ b/pkgs/servers/mail/exim/default.nix
@@ -1,23 +1,18 @@
-{ coreutils, fetchurl, db, openssl, pcre, perl, pkgconfig, stdenv, fetchpatch }:
+{ coreutils, db, fetchurl, openldap, openssl, pcre, perl, pkgconfig, stdenv
+, enableLDAP ? false
+}:
 
 stdenv.mkDerivation rec {
-  name = "exim-4.89";
+  name = "exim-4.91";
 
   src = fetchurl {
     url = "http://ftp.exim.org/pub/exim/exim4/${name}.tar.xz";
-    sha256 = "09lndv34jsxwglq5zsh9y4xaqj5g37g9ca4x0zb25fvvm4f0lj8c";
+    sha256 = "066ip7a5lqfn9rcr14j4nm0kqysw6mzvbbb0ip50lmfm0fqsqmzc";
   };
 
-  patches = [
-    (fetchpatch {
-      name = "CVE-2017-1000369.patch";
-      url = "https://anonscm.debian.org/git/pkg-exim4/exim4.git/plain/debian/patches/79_CVE-2017-1000369.patch?h=4.89-2%2bdeb9u1";
-      sha256 = "0v46zywgkv1rdqhybqqrd0rwkdaj6q1f4x0a3vm9p0wz8vad3023";
-    })
-  ];
-
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ coreutils db openssl pcre perl ];
+  buildInputs = [ coreutils db openssl pcre perl ]
+    ++ stdenv.lib.optional enableLDAP openldap;
 
   preBuild = ''
     sed '
@@ -41,6 +36,11 @@ stdenv.mkDerivation rec {
       s:^# \(RM_COMMAND\)=.*:\1=${coreutils}/bin/rm:
       s:^# \(TOUCH_COMMAND\)=.*:\1=${coreutils}/bin/touch:
       s:^# \(PERL_COMMAND\)=.*:\1=${perl}/bin/perl:
+      ${stdenv.lib.optionalString enableLDAP ''
+        s:^# \(LDAP_LIB_TYPE=OPENLDAP2\)$:\1:
+        s:^# \(LOOKUP_LDAP=yes\)$:\1:
+        s:^# \(LOOKUP_LIBS\)=.*:\1=-lldap:
+      ''}
       #/^\s*#.*/d
       #/^\s*$/d
     ' < src/EDITME > Local/Makefile
diff --git a/pkgs/servers/mail/mailman/default.nix b/pkgs/servers/mail/mailman/default.nix
index d64e41f3007..8ff20869b94 100644
--- a/pkgs/servers/mail/mailman/default.nix
+++ b/pkgs/servers/mail/mailman/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "1r6sjapjmbav45xibjzc2a8y1xf4ikz09470ma1kw7iz174wn8z7";
   };
 
-  buildInputs = [ python pythonPackages.dns ];
+  buildInputs = [ python pythonPackages.dnspython ];
 
   patches = [ ./fix-var-prefix.patch ];
 
diff --git a/pkgs/servers/mail/mlmmj/default.nix b/pkgs/servers/mail/mlmmj/default.nix
index ddf4fd5d880..f11400c190a 100644
--- a/pkgs/servers/mail/mlmmj/default.nix
+++ b/pkgs/servers/mail/mlmmj/default.nix
@@ -3,11 +3,11 @@
 stdenv.mkDerivation rec {
 
   name = "mlmmj-${version}";
-  version = "1.2.19.0";
+  version = "1.3.0";
 
   src = fetchurl {
     url = "http://mlmmj.org/releases/${name}.tar.gz";
-    sha256 = "18n7b41nfdj7acvmqzkkz984d26xvz14xk8kmrnzv23dkda364m0";
+    sha256 = "1sghqvwizvm1a9w56r34qy5njaq1c26bagj85r60h32gh3fx02bn";
   };
 
   postInstall = ''
diff --git a/pkgs/servers/mail/opensmtpd/extras.nix b/pkgs/servers/mail/opensmtpd/extras.nix
index 5e5170afbc7..6b63c317d78 100644
--- a/pkgs/servers/mail/opensmtpd/extras.nix
+++ b/pkgs/servers/mail/opensmtpd/extras.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchurl, openssl, libevent, libasr,
-  python2, pkgconfig, lua5, perl, mariadb, postgresql, sqlite, hiredis }:
+  python2, pkgconfig, lua5, perl, mysql, postgresql, sqlite, hiredis }:
+
 stdenv.mkDerivation rec {
   name = "opensmtpd-extras-${version}";
   version = "5.7.1";
@@ -11,7 +12,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ openssl libevent
-    libasr python2 lua5 perl mariadb.client postgresql sqlite hiredis ];
+    libasr python2 lua5 perl mysql.connector-c postgresql sqlite hiredis ];
 
   configureFlags = [
     "--sysconfdir=/etc"
@@ -54,7 +55,7 @@ stdenv.mkDerivation rec {
     "--with-perl=${perl}"
     "--with-filter-perl"
 
-  ] ++ stdenv.lib.optional (mariadb != null) [
+  ] ++ stdenv.lib.optional (mysql != null) [
     "--with-table-mysql"
 
   ] ++ stdenv.lib.optional (postgresql != null) [
@@ -67,13 +68,14 @@ stdenv.mkDerivation rec {
     "--with-table-redis"
   ];
 
-  NIX_CFLAGS_COMPILE = stdenv.lib.optional (hiredis != null) [ "-I${hiredis}/include/hiredis" ];
+  NIX_CFLAGS_COMPILE = stdenv.lib.optional (hiredis != null) "-I${hiredis}/include/hiredis" ++
+    stdenv.lib.optional (mysql != null) "-L${mysql.connector-c}/lib/mysql";
 
   meta = with stdenv.lib; {
     homepage = https://www.opensmtpd.org/;
     description = "Extra plugins for the OpenSMTPD mail server";
     license = licenses.isc;
-    platforms = platforms.unix;
+    platforms = platforms.linux;
     maintainers = with maintainers; [ gebner ];
   };
 }
diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix
index 7b6be5ec39e..a5168ebd4df 100644
--- a/pkgs/servers/mail/postfix/default.nix
+++ b/pkgs/servers/mail/postfix/default.nix
@@ -1,7 +1,7 @@
 { stdenv, lib, fetchurl, makeWrapper, gnused, db, openssl, cyrus_sasl, libnsl
 , coreutils, findutils, gnugrep, gawk, icu, pcre
 , withPgSQL ? false, postgresql
-, withMySQL ? false, libmysql
+, withMySQL ? false, mysql
 , withSQLite ? false, sqlite
 , withLDAP ? false, openldap
 }:
@@ -11,7 +11,7 @@ let
     "-DUSE_TLS" "-DUSE_SASL_AUTH" "-DUSE_CYRUS_SASL" "-I${cyrus_sasl.dev}/include/sasl"
     "-DHAS_DB_BYPASS_MAKEDEFS_CHECK"
    ] ++ lib.optional withPgSQL "-DHAS_PGSQL"
-     ++ lib.optionals withMySQL [ "-DHAS_MYSQL" "-I${lib.getDev libmysql}/include/mysql" ]
+     ++ lib.optionals withMySQL [ "-DHAS_MYSQL" "-I${mysql.connector-c}/include/mysql" "-L${mysql.connector-c}/lib/mysql" ]
      ++ lib.optional withSQLite "-DHAS_SQLITE"
      ++ lib.optional withLDAP "-DHAS_LDAP");
    auxlibs = lib.concatStringsSep " " ([
@@ -25,17 +25,17 @@ in stdenv.mkDerivation rec {
 
   name = "postfix-${version}";
 
-  version = "3.2.3";
+  version = "3.3.0";
 
   src = fetchurl {
     url = "ftp://ftp.cs.uu.nl/mirror/postfix/postfix-release/official/${name}.tar.gz";
-    sha256 = "1gs025smgynrlsg44cypjam99ds92mc9q46l5085d9sy0xfrf2sv";
+    sha256 = "0fggpbsc9jkrbaw9hy0zw9h32plmfvcv0x860pbih0g346byhhkr";
   };
 
   nativeBuildInputs = [ makeWrapper ];
   buildInputs = [ db openssl cyrus_sasl icu libnsl pcre ]
                 ++ lib.optional withPgSQL postgresql
-                ++ lib.optional withMySQL libmysql
+                ++ lib.optional withMySQL mysql.connector-c
                 ++ lib.optional withSQLite sqlite
                 ++ lib.optional withLDAP openldap;
 
@@ -90,7 +90,7 @@ in stdenv.mkDerivation rec {
   meta = {
     homepage = http://www.postfix.org/;
     description = "A fast, easy to administer, and secure mail server";
-    license = lib.licenses.bsdOriginal;
+    license = with lib.licenses; [ ipl10 epl20 ];
     platforms = lib.platforms.linux;
     maintainers = [ lib.maintainers.rickynils ];
   };
diff --git a/pkgs/servers/mail/postgrey/default.nix b/pkgs/servers/mail/postgrey/default.nix
index 95f460e917b..1836d0e5cf3 100644
--- a/pkgs/servers/mail/postgrey/default.nix
+++ b/pkgs/servers/mail/postgrey/default.nix
@@ -8,18 +8,18 @@ let
     policy-test-flags = mk-perl-flags (with perlPackages; [
       ParseSyslog
     ]);
-    version = "1.36";
+    version = "1.37";
     name = "postgrey-${version}";
 in runCommand name {
   src = fetchurl {
     url = "http://postgrey.schweikert.ch/pub/${name}.tar.gz";
-    sha256 = "09jzb246ki988389r9gryigriv9sravk40q75fih5n0q4p2ghax2";
+    sha256 = "1xx51xih4711vrvc6d57il9ccallbljj5zhgqdb07jzmz11rakgz";
   };
   meta = with stdenv.lib; {
     description = "A postfix policy server to provide greylisting";
     homepage = https://postgrey.schweikert.ch/;
     platforms = postfix.meta.platforms;
-    licenses = licenses.gpl2;
+    license = licenses.gpl2;
   };
 } ''
     mkdir -p $out/bin
diff --git a/pkgs/servers/mail/pypolicyd-spf/default.nix b/pkgs/servers/mail/pypolicyd-spf/default.nix
new file mode 100644
index 00000000000..d5e410a86c1
--- /dev/null
+++ b/pkgs/servers/mail/pypolicyd-spf/default.nix
@@ -0,0 +1,26 @@
+{ lib, buildPythonApplication, fetchurl, pyspf }:
+
+buildPythonApplication rec {
+  name = "pypolicyd-spf-${version}";
+  majorVersion = "2.0";
+  version = "${majorVersion}.2";
+
+  src = fetchurl {
+    url = "https://launchpad.net/pypolicyd-spf/${majorVersion}/${version}/+download/${name}.tar.gz";
+    sha256 = "1nm8y1jjgx6mxrbcxrbdnmkf8vglwp0wiw6jipzh641wb24gi76z";
+  };
+
+  propagatedBuildInputs = [ pyspf ];
+
+  preBuild = ''
+    substituteInPlace setup.py --replace "'/etc'" "'$out/etc'"
+  '';
+
+  meta = with lib; {
+    homepage = https://launchpad.net/pypolicyd-spf/;
+    description = "Postfix policy engine for Sender Policy Framework (SPF) checking";
+    maintainers = with maintainers; [ abbradar ];
+    license = licenses.asl20;
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/servers/mail/rspamd/default.nix b/pkgs/servers/mail/rspamd/default.nix
index 13834f95282..3e313279806 100644
--- a/pkgs/servers/mail/rspamd/default.nix
+++ b/pkgs/servers/mail/rspamd/default.nix
@@ -1,22 +1,22 @@
 { stdenv, fetchFromGitHub, cmake, perl
-, file, glib, gmime, libevent, luajit, openssl, pcre, pkgconfig, sqlite, ragel }:
+, file, glib, gmime, libevent, luajit, openssl, pcre, pkgconfig, sqlite, ragel, icu, libfann }:
 
 let libmagic = file;  # libmagic provided by file package ATM
 in
 
 stdenv.mkDerivation rec {
   name = "rspamd-${version}";
-  version = "1.4.3";
+  version = "1.6.6";
 
   src = fetchFromGitHub {
     owner = "vstakhov";
     repo = "rspamd";
     rev = version;
-    sha256 = "1wrqi8vsd61rc48x2gyhc0xrir9pr372lpkyhwgx1rpxzdxsdwh9";
+    sha256 = "04jqrki7rlxywdig264kavy1h5882rspi2drkbdzrk35jjq8rh3h";
   };
 
   nativeBuildInputs = [ cmake pkgconfig perl ];
-  buildInputs = [ glib gmime libevent libmagic luajit openssl pcre sqlite ragel ];
+  buildInputs = [ glib gmime libevent libmagic luajit openssl pcre sqlite ragel icu libfann];
 
   postPatch = ''
     substituteInPlace conf/common.conf --replace "\$CONFDIR/rspamd.conf.local" "/etc/rspamd/rspamd.conf.local"
diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix
index 73498e5b884..3cf46053969 100644
--- a/pkgs/servers/matrix-synapse/default.nix
+++ b/pkgs/servers/matrix-synapse/default.nix
@@ -1,4 +1,4 @@
-{ lib, pkgs, stdenv, pythonPackages, fetchurl, fetchFromGitHub }:
+{ lib, pkgs, stdenv, pythonPackages, fetchurl, fetchFromGitHub, fetchpatch }:
 let
   matrix-angular-sdk = pythonPackages.buildPythonPackage rec {
     name = "matrix-angular-sdk-${version}";
@@ -10,37 +10,41 @@ let
     };
   };
   matrix-synapse-ldap3 = pythonPackages.buildPythonPackage rec {
-    name = "matrix-synapse-ldap3-${version}";
-    version = "0.1.2";
+    pname = "matrix-synapse-ldap3";
+    version = "0.1.3";
 
     src = fetchFromGitHub {
       owner = "matrix-org";
       repo = "matrix-synapse-ldap3";
       rev = "v${version}";
-      sha256 = "16pivz1lhs1c3z84rxxy8khyvn0hqxwxaz552br1y9ri0maa0aq8";
+      sha256 = "0ss7ld3bpmqm8wcs64q1kb7vxlpmwk9lsgq0mh21a9izyfc7jb2l";
     };
 
     propagatedBuildInputs = with pythonPackages; [ service-identity ldap3 twisted ];
+
+    checkInputs = with pythonPackages; [ ldaptor mock ];
   };
 in pythonPackages.buildPythonApplication rec {
   name = "matrix-synapse-${version}";
-  version = "0.24.1";
+  version = "0.27.2";
 
   src = fetchFromGitHub {
     owner = "matrix-org";
     repo = "synapse";
     rev = "v${version}";
-    sha256 = "08w8sawq0nj28dzi9wc4rsg9z2qv528djj4zbcs5c4yc3mylq1nq";
+    sha256 = "00hcjs5hbayamckcsfd92s7f3da9jv5nm5ygvwinyc7ml7gn66i3";
   };
 
-  patches = [ ./matrix-synapse.patch ];
+  patches = [
+    ./matrix-synapse.patch
+  ];
 
   propagatedBuildInputs = with pythonPackages; [
     blist canonicaljson daemonize dateutil frozendict pillow pyasn1
     pydenticon pymacaroons-pynacl pynacl pyopenssl pysaml2 pytz requests
     signedjson systemd twisted ujson unpaddedbase64 pyyaml
     matrix-angular-sdk bleach netaddr jinja2 psycopg2
-    psutil msgpack lxml matrix-synapse-ldap3
+    psutil msgpack-python lxml matrix-synapse-ldap3
     phonenumbers jsonschema affinity bcrypt
   ];
 
diff --git a/pkgs/servers/matterbridge/default.nix b/pkgs/servers/matterbridge/default.nix
index 1fe07a74f83..14662ff6cc2 100644
--- a/pkgs/servers/matterbridge/default.nix
+++ b/pkgs/servers/matterbridge/default.nix
@@ -2,13 +2,13 @@
 
 buildGoPackage rec {
   name = "matterbridge-${version}";
-  version = "1.1.0";
+  version = "1.7.1";
 
   goPackagePath = "github.com/42wim/matterbridge";
 
   src = fetchurl {
     url = "https://github.com/42wim/matterbridge/archive/v${version}.tar.gz";
-    sha256 = "1br3rf500jdklzpxg1lkagglvmqshhligfkhndi8plg9hmzpd8qp";
+    sha256 = "0ajc7xswmwhc2xn937sv3b76s8hblfn9x9rj5825hi3d3s8zqq88";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/servers/mattermost/default.nix b/pkgs/servers/mattermost/default.nix
index 2bfe929784b..936e457eb33 100644
--- a/pkgs/servers/mattermost/default.nix
+++ b/pkgs/servers/mattermost/default.nix
@@ -1,27 +1,32 @@
 { stdenv, fetchurl, fetchFromGitHub, buildGoPackage }:
 
+let
+  version = "4.8.0";
+  goPackagePath = "github.com/mattermost/mattermost-server";
+  buildFlags = "-ldflags \"-X '${goPackagePath}/model.BuildNumber=nixpkgs-${version}'\"";
+in
+
 buildGoPackage rec {
   name = "mattermost-${version}";
-  version = "4.3.0";
 
   src = fetchFromGitHub {
     owner = "mattermost";
     repo = "mattermost-server";
     rev = "v${version}";
-    sha256 = "05119h3x81p8plfjq99khfywc3plv2zynvf83vkhj48zqk61wvbq";
+    sha256 = "16yf4p0n3klgh0zw2ikbahj9cy1wcxbwg86pld0yz63cfvfz5ns4";
   };
 
   webApp = fetchurl {
     url = "https://releases.mattermost.com/${version}/mattermost-team-${version}-linux-amd64.tar.gz";
-    sha256 = "0d30zj036nz6vwpiv0mn656j5r4br6y4x8iqc5jn785fiwk2pdls";
+    sha256 = "0ykp9apsv2514bircgay0xi0jigiai65cnb8q77v1qxjzdyx8s75";
   };
 
-  goPackagePath = "github.com/mattermost/mattermost-server";
+  inherit goPackagePath;
 
   buildPhase = ''
     runHook preBuild
     cd go/src/${goPackagePath}/cmd/platform
-    go install
+    go install ${buildFlags}
     runHook postBuild
   '';
 
@@ -35,10 +40,10 @@ buildGoPackage rec {
   '';
 
   meta = with stdenv.lib; {
-    description = "Open-Source, self-hosted Slack-alternative";
+    description = "Open-source, self-hosted Slack-alternative";
     homepage = https://www.mattermost.org;
     license = with licenses; [ agpl3 asl20 ];
-    maintainers = with maintainers; [ fpletz ];
+    maintainers = with maintainers; [ fpletz ryantm ];
     platforms = platforms.unix;
   };
 }
diff --git a/pkgs/servers/mattermost/matterircd.nix b/pkgs/servers/mattermost/matterircd.nix
index 02a4e3bd66f..d489deb5944 100644
--- a/pkgs/servers/mattermost/matterircd.nix
+++ b/pkgs/servers/mattermost/matterircd.nix
@@ -2,16 +2,16 @@
 
 buildGoPackage rec {
   name = "matterircd-${version}";
-  version = "0.12.0";
+  version = "0.16.5";
 
   src = fetchFromGitHub {
     owner = "42wim";
     repo = "matterircd";
     rev = "v${version}";
-    sha256 = "1fgpfyb78l1kl0kja2fjqc4ik1q869cmhx6xdmp9ff2qcqk22cj0";
+    sha256 = "1rsmc2dpf25rkl8c085xwssbry3hv1gv318m7rdj616agx4m7yr2";
   };
 
-  goPackagePath = "github.com/42vim/matterircd";
+  goPackagePath = "github.com/42wim/matterircd";
 
   meta = with stdenv.lib; {
     inherit (src.meta) homepage;
diff --git a/pkgs/servers/memcached/default.nix b/pkgs/servers/memcached/default.nix
index fabd5b83724..e326aff0d7e 100644
--- a/pkgs/servers/memcached/default.nix
+++ b/pkgs/servers/memcached/default.nix
@@ -1,11 +1,12 @@
 {stdenv, fetchurl, cyrus_sasl, libevent}:
 
 stdenv.mkDerivation rec {
-  name = "memcached-1.4.39";
+  version = "1.5.7";
+  name = "memcached-${version}";
 
   src = fetchurl {
     url = "http://memcached.org/files/${name}.tar.gz";
-    sha256 = "0dfpmx0fqgp55j4vl06cz63fwx5kzhzipdm7n2kxjkvyg1ybzi13";
+    sha256 = "0ijfiy1w4hk3j8hhra6kablq8kjabvcdvsl8cwd4drvszjl0ddsv";
   };
 
   buildInputs = [cyrus_sasl libevent];
diff --git a/pkgs/servers/metabase/default.nix b/pkgs/servers/metabase/default.nix
new file mode 100644
index 00000000000..d36810b9f5c
--- /dev/null
+++ b/pkgs/servers/metabase/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, makeWrapper, jre }:
+
+stdenv.mkDerivation rec {
+  name = "metabase-${version}";
+  version = "0.28.6";
+
+  src = fetchurl {
+    url = "http://downloads.metabase.com/v${version}/metabase.jar";
+    sha256 = "1dzs57yyx6k93gvyva9y38xdb4pbvdliad3zzgk3vs74fp1zh2vq";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  unpackPhase = "true";
+
+  installPhase = ''
+    makeWrapper ${jre}/bin/java $out/bin/metabase --add-flags "-jar $src"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "The easy, open source way for everyone in your company to ask questions and learn from data.";
+    homepage    = https://metabase.com;
+    license     = licenses.agpl3;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ schneefux thoughtpolice ];
+  };
+}
diff --git a/pkgs/servers/minio/default.nix b/pkgs/servers/minio/default.nix
index c9dfe9136df..786a188bbfd 100644
--- a/pkgs/servers/minio/default.nix
+++ b/pkgs/servers/minio/default.nix
@@ -1,38 +1,28 @@
-{ lib, stdenv, fetchurl, go }:
+{ stdenv, buildGoPackage, fetchFromGitHub }:
 
-stdenv.mkDerivation rec {
+buildGoPackage rec {
   name = "minio-${version}";
 
-  version = "2017-09-29T19-16-56Z";
+  version = "2018-03-30T00-38-44Z";
 
-  src = fetchurl {
-    url = "https://github.com/minio/minio/archive/RELEASE.${version}.tar.gz";
-    sha256 = "1h028gyfvyh5x6k4fsj4s64sgzqy7jgln6kvs27bnxzigj6dp2wx";
+  src = fetchFromGitHub {
+    owner = "minio";
+    repo = "minio";
+    rev = "RELEASE.${version}";
+    sha256 = "17vam9ifi632yfxakanxi2660wqgqrhrhhzywrgh2jmzljippf80";
   };
 
-  buildInputs = [ go ];
+  goPackagePath = "github.com/minio/minio";
 
-  unpackPhase = ''
-    d=$TMPDIR/src/github.com/minio/minio
-    mkdir -p $d
-    tar xf $src -C $d --strip-component 1
-    export GOPATH=$TMPDIR
-    cd $d
-  '';
+  buildFlagsArray = [''-ldflags=
+    -X github.com/minio/minio/cmd.Version=${version}
+  ''];
 
-  buildPhase = ''
-    mkdir -p $out/bin
-    go build -o $out/bin/minio \
-      --ldflags "-X github.com/minio/minio/cmd.Version=${version}"
-  '';
-
-  installPhase = "true";
-
-  meta = {
+  meta = with stdenv.lib; {
     homepage = https://www.minio.io/;
     description = "An S3-compatible object storage server";
-    maintainers = with lib.maintainers; [ eelco bachp ];
-    platforms = lib.platforms.x86_64;
-    license = lib.licenses.asl20;
+    maintainers = with maintainers; [ eelco bachp ];
+    platforms = platforms.unix;
+    license = licenses.asl20;
   };
 }
diff --git a/pkgs/servers/misc/airsonic/default.nix b/pkgs/servers/misc/airsonic/default.nix
index 57040f46947..7fc041d8198 100644
--- a/pkgs/servers/misc/airsonic/default.nix
+++ b/pkgs/servers/misc/airsonic/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "airsonic-${version}";
-  version = "10.0.1";
+  version = "10.1.1";
 
   src = fetchurl {
     url = "https://github.com/airsonic/airsonic/releases/download/v${version}/airsonic.war";
-    sha256 = "1qky8dz49200f6100ivkn5g7i0hzkv3gpq2r0cj6z53s8d1ayblc";
+    sha256 = "0acj6la88lnbfdp0nilvsll48zfig7sgibgwfjjckialppyg4ir6";
   };
 
   buildCommand = ''
diff --git a/pkgs/servers/misc/client-ip-echo/client-ip-echo.nix b/pkgs/servers/misc/client-ip-echo/client-ip-echo.nix
index 08c08d7d3c1..92bbc309ed3 100644
--- a/pkgs/servers/misc/client-ip-echo/client-ip-echo.nix
+++ b/pkgs/servers/misc/client-ip-echo/client-ip-echo.nix
@@ -13,4 +13,5 @@ mkDerivation {
   executableHaskellDepends = [ base bytestring network ];
   description = "accepts TCP connections and echoes the client's IP address back to it";
   license = stdenv.lib.licenses.lgpl3;
+  broken = true; # 2018-04-10
 }
diff --git a/pkgs/servers/misc/subsonic/default.nix b/pkgs/servers/misc/subsonic/default.nix
index b84dd21c357..f546b0b075e 100644
--- a/pkgs/servers/misc/subsonic/default.nix
+++ b/pkgs/servers/misc/subsonic/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, jre }:
 
-let version = "6.0"; in
+let version = "6.1.3"; in
 
 stdenv.mkDerivation rec {
   name = "subsonic-${version}";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://sourceforge/subsonic/subsonic-${version}-standalone.tar.gz";
-    sha256 = "0aw7lz7bkhqvjj3lkk68n2aqr5l84s91cgifg2379w2j7dgd056z";
+    sha256 = "1v21gfymaqcx6n6d88hvha60q9hgj5z1wsac5gcwq7cjah1893jx";
   };
 
   inherit jre;
diff --git a/pkgs/servers/misc/taskserver/default.nix b/pkgs/servers/misc/taskserver/default.nix
index 0511c822ebe..466c3873c60 100644
--- a/pkgs/servers/misc/taskserver/default.nix
+++ b/pkgs/servers/misc/taskserver/default.nix
@@ -38,6 +38,6 @@ stdenv.mkDerivation rec {
     homepage = http://taskwarrior.org;
     license = stdenv.lib.licenses.mit;
     platforms = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [ matthiasbeyer makefu ];
+    maintainers = with stdenv.lib.maintainers; [ makefu ];
   };
 }
diff --git a/pkgs/servers/monitoring/cadvisor/default.nix b/pkgs/servers/monitoring/cadvisor/default.nix
index cb9e43a5c88..0480d056c59 100644
--- a/pkgs/servers/monitoring/cadvisor/default.nix
+++ b/pkgs/servers/monitoring/cadvisor/default.nix
@@ -2,16 +2,16 @@
 
 stdenv.mkDerivation rec {
   name = "cadvisor-${version}";
-  version = "0.26.1";
+  version = "0.29.1";
 
   src = fetchFromGitHub {
     owner = "google";
     repo = "cadvisor";
     rev = "v${version}";
-    sha256 = "0rv245acz2r12c6ga2ln01961sh36w15ay0nfpfcg8inz679dnvg";
+    sha256 = "132mpcp35cymm2zqig0yrvhnvgn72k7cmn6gla0v7r0yxfl879m3";
   };
 
-  buildInputs = [ go ];
+  nativeBuildInputs = [ go ];
 
   buildPhase = ''
     mkdir -p Godeps/_workspace/src/github.com/google/
diff --git a/pkgs/servers/monitoring/fusion-inventory/default.nix b/pkgs/servers/monitoring/fusion-inventory/default.nix
index 2e694ede497..34b4e87bf65 100644
--- a/pkgs/servers/monitoring/fusion-inventory/default.nix
+++ b/pkgs/servers/monitoring/fusion-inventory/default.nix
@@ -1,22 +1,44 @@
-{ stdenv, fetchurl, buildPerlPackage, perlPackages
+{ stdenv, lib, fetchurl, buildPerlPackage, perlPackages, gnused, nix, dmidecode, pciutils, usbutils, iproute, nettools
+, fetchFromGitHub, makeWrapper
 }:
 
 buildPerlPackage rec {
-  version = "2.3.18";
   name = "FusionInventory-Agent-${version}";
-  src = fetchurl {
-    url = "mirror://cpan/authors/id/G/GR/GROUSSE/${name}.tar.gz";
-    sha256 = "543d96fa61b8f2a2bc599fe9f694f19d1f2094dc5506bc514d00b8a445bc5401";
+  version = "2.3.21";
+
+  src = fetchFromGitHub {
+    owner = "fusioninventory";
+    repo = "fusioninventory-agent";
+    rev = version;
+    sha256 = "034clffcn0agx85macjgml4lyhvvck7idn94pqd2c77pk6crvw2y";
   };
 
-  patches = [ ./remove_software_test.patch ];
+  patches = [
+    ./remove_software_test.patch
+    # support for os-release file
+    (fetchurl {
+      url = https://github.com/fusioninventory/fusioninventory-agent/pull/396.diff;
+      sha256 = "0bxrjmff80ab01n23xggci32ajsah6zvcmz5x4hj6ayy6dzwi6jb";
+    })
+    # support for Nix software inventory
+    (fetchurl {
+      url = https://github.com/fusioninventory/fusioninventory-agent/pull/397.diff;
+      sha256 = "0pyf7mp0zsb3zcqb6yysr1zfp54p9ciwjn1pzayw6s9flmcgrmbw";
+    })
+    ];
 
   postPatch = ''
+
     patchShebangs bin
+
+    substituteInPlace "lib/FusionInventory/Agent/Tools/Linux.pm" \
+      --replace /sbin/ip ${iproute}/sbin/ip
+    substituteInPlace "lib/FusionInventory/Agent/Task/Inventory/Linux/Networks.pm" \
+      --replace /sbin/ip ${iproute}/sbin/ip
   '';
 
   buildTools = [];
-  buildInputs = with perlPackages; [
+  buildInputs = [ makeWrapper ] ++ (with perlPackages; [
     CGI
     DataStructureUtil
     FileCopyRecursive
@@ -28,6 +50,7 @@ buildPerlPackage rec {
     IPCRun
     JSON
     LWPProtocolhttps
+    ModuleInstall
     NetSNMP
     TestCompile
     TestDeep
@@ -35,7 +58,7 @@ buildPerlPackage rec {
     TestMockModule
     TestMockObject
     TestNoWarnings
-  ];
+  ]);
   propagatedBuildInputs = with perlPackages; [
     FileWhich
     LWP
@@ -52,7 +75,10 @@ buildPerlPackage rec {
     cp -r lib $out
 
     for cur in $out/bin/*; do
-      sed -e "s|./lib|$out/lib|" -i "$cur"
+      if [ -x "$cur" ]; then
+        sed -e "s|./lib|$out/lib|" -i "$cur"
+        wrapProgram "$cur" --prefix PATH : ${lib.makeBinPath [nix dmidecode pciutils usbutils nettools iproute]}
+      fi
     done
   '';
 
diff --git a/pkgs/servers/monitoring/fusion-inventory/remove_software_test.patch b/pkgs/servers/monitoring/fusion-inventory/remove_software_test.patch
index 5449f4d3740..b360f418aa0 100644
--- a/pkgs/servers/monitoring/fusion-inventory/remove_software_test.patch
+++ b/pkgs/servers/monitoring/fusion-inventory/remove_software_test.patch
@@ -28,7 +28,7 @@ index 8ee7ff02c..bd5551ab3 100755
  skip 'live SNMP test disabled', 6 unless $ENV{TEST_LIVE_SNMP};
  
 diff --git a/t/apps/agent.t b/t/apps/agent.t
-index f417b4106..12207f192 100755
+index c0f6fc52f..c83837d70 100755
 --- a/t/apps/agent.t
 +++ b/t/apps/agent.t
 @@ -12,7 +12,7 @@ use XML::TreePP;
@@ -40,15 +40,28 @@ index f417b4106..12207f192 100755
  
  my ($content, $out, $err, $rc);
  
-@@ -73,11 +73,6 @@ subtest "first inventory execution and content" => sub {
+@@ -71,11 +71,6 @@ subtest "first inventory execution and content" => sub {
+     check_content_ok($out);
  };
  
- ok(
+-ok(
 -    exists $content->{REQUEST}->{CONTENT}->{SOFTWARES},
 -    'inventory has software'
 -);
 -
--ok(
+ ok(
      exists $content->{REQUEST}->{CONTENT}->{ENVS},
      'inventory has environment variables'
- );
+diff --git a/t/tasks/inventory/linux/softwares.t b/t/tasks/inventory/linux/softwares.t
+index 72a0e578c..13944f34f 100755
+--- a/t/tasks/inventory/linux/softwares.t
++++ b/t/tasks/inventory/linux/softwares.t
+@@ -89,7 +89,7 @@ my $rpm_packages = [
+         PUBLISHER   => 'Mageia.Org',
+         NAME        => 'xfsprogs',
+         COMMENTS    => 'Utilities for managing the XFS filesystem',
+-        INSTALLDATE => '25/03/2012',
++        INSTALLDATE => '24/03/2012',
+         FILESIZE    => '3628382',
+         FROM        => 'rpm',
+         ARCH        => 'x86_64',
diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix
index c186fc2835f..d2a0d046389 100644
--- a/pkgs/servers/monitoring/grafana/default.nix
+++ b/pkgs/servers/monitoring/grafana/default.nix
@@ -1,28 +1,28 @@
 { lib, buildGoPackage, fetchurl, fetchFromGitHub, phantomjs2 }:
 
 buildGoPackage rec {
-  version = "4.6.1";
-  name = "grafana-v${version}";
+  version = "5.0.4";
+  name = "grafana-${version}";
   goPackagePath = "github.com/grafana/grafana";
 
   src = fetchFromGitHub {
     rev = "v${version}";
     owner = "grafana";
     repo = "grafana";
-    sha256 = "1l606dbx3rfbqbr30iirsc2lkzqa2kc6160g2sn0205mdz8b31zj";
+    sha256 = "18f69985a5j6fd2ax6z50yfss70phdh1vwyx0z69j145zac3sf90";
   };
 
   srcStatic = fetchurl {
-    url = "https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-${version}.linux-x64.tar.gz";
-    sha256 = "04756ry3b8fyk91lzacsixha6l4q1g532krxz759d17sfrnbaz2q";
+    url = "https://grafana-releases.s3.amazonaws.com/release/grafana-${version}.linux-x64.tar.gz";
+    sha256 = "0xdpqf8n3ds0g7nhbiwahhdj0hfc4biz69rhkl48vm31idlr92sc";
   };
 
   preBuild = "export GOPATH=$GOPATH:$NIX_BUILD_TOP/go/src/${goPackagePath}/Godeps/_workspace";
   postInstall = ''
     tar -xvf $srcStatic
     mkdir -p $bin/share/grafana
-    mv grafana-*/{public,conf,vendor} $bin/share/grafana/
-    ln -sf ${phantomjs2}/bin/phantomjs $bin/share/grafana/vendor/phantomjs/phantomjs
+    mv grafana-*/{public,conf,tools} $bin/share/grafana/
+    ln -sf ${phantomjs2}/bin/phantomjs $bin/share/grafana/tools/phantomjs/phantomjs
   '';
 
   meta = with lib; {
diff --git a/pkgs/servers/monitoring/heapster/default.nix b/pkgs/servers/monitoring/heapster/default.nix
index db3c518c729..39c04857638 100644
--- a/pkgs/servers/monitoring/heapster/default.nix
+++ b/pkgs/servers/monitoring/heapster/default.nix
@@ -10,7 +10,7 @@ buildGoPackage rec {
     inherit rev;
     owner = "kubernetes";
     repo = "heapster";
-    sha256 = "057z9imgd2gvcbvahja3i26jzgm33dmfaxraakmcr4a2xfhj50hq";
+    sha256 = "1vg83207y7yigydnnhlvzs3s94vx02i56lqgs6a96c6i3mr3ydpb";
   };
 
   preBuild = ''
diff --git a/pkgs/servers/monitoring/kapacitor/default.nix b/pkgs/servers/monitoring/kapacitor/default.nix
index 804826941f2..409801e8b7d 100644
--- a/pkgs/servers/monitoring/kapacitor/default.nix
+++ b/pkgs/servers/monitoring/kapacitor/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "kapacitor-${version}";
-  version = "1.0.0";
+  version = "1.4.0";
 
   goPackagePath = "github.com/influxdata/kapacitor";
 
@@ -10,7 +10,7 @@ buildGoPackage rec {
     owner = "influxdata";
     repo = "kapacitor";
     rev = "v${version}";
-    sha256 = "14l9bhj6qdif79s4dyqqbnjgj3m4iarvw0ckld1wdhpdgvl8w9qh";
+    sha256 = "1qanf7qljzqqkyw2cdazg0ll13q8a3fs3sqydcgfbgpdmf707sj2";
   };
 
   meta = with lib; {
diff --git a/pkgs/servers/monitoring/longview/default.nix b/pkgs/servers/monitoring/longview/default.nix
index 212ab8513a9..dcc6f6f16b7 100644
--- a/pkgs/servers/monitoring/longview/default.nix
+++ b/pkgs/servers/monitoring/longview/default.nix
@@ -63,6 +63,6 @@ stdenv.mkDerivation rec {
     license = licenses.gpl2Plus;
     maintainers = [ maintainers.rvl ];
     inherit version;
-    platforms = platforms.linux;
+    platforms = [ "x86_64-linux" "i686-linux" ];
   };
 }
diff --git a/pkgs/servers/monitoring/munin/adding_sconfdir_munin-node.patch b/pkgs/servers/monitoring/munin/adding_sconfdir_munin-node.patch
new file mode 100644
index 00000000000..6e14d613703
--- /dev/null
+++ b/pkgs/servers/monitoring/munin/adding_sconfdir_munin-node.patch
@@ -0,0 +1,41 @@
+commit af5fa3623bb9a73052f9154be4a0f38c60ea42a2
+Author: Kjetil Orbekk <kjetil.orbekk@gmail.com>
+Date:   Thu Nov 23 21:21:36 2017 -0500
+
+    node: add --sconfdir to set plugin configuration dir
+
+diff --git a/node/sbin/munin-node b/node/sbin/munin-node
+index 909c8c4e..0ccf3941 100755
+--- a/node/sbin/munin-node
++++ b/node/sbin/munin-node
+@@ -100,9 +100,11 @@ sub parse_args
+     my @ORIG_ARGV  = @ARGV;
+ 
+     my $servicedir_cmdline;
++    my $sconfdir_cmdline;
+     print_usage_and_exit() unless GetOptions(
+         "config=s"     => \$conffile,
+         "servicedir=s" => \$servicedir_cmdline,
++        "sconfdir=s"   => \$sconfdir_cmdline,
+         "debug!"       => \$DEBUG,
+         "pidebug!"     => \$PIDEBUG,
+         "paranoia!"    => \$paranoia,
+@@ -112,6 +114,7 @@ sub parse_args
+ 
+     # We untaint the args brutally, since the sysadm should know what he does
+     $servicedir = $1 if defined $servicedir_cmdline && $servicedir_cmdline =~ m/(.*)/;
++    $sconfdir = $1 if defined $sconfdir_cmdline && $sconfdir_cmdline =~ m/(.*)/;
+ 
+     # Reset ARGV (for HUPing)
+     @ARGV = @ORIG_ARGV;
+@@ -175,6 +178,10 @@ Use E<lt>fileE<gt> as configuration file. [@@CONFDIR@@/munin-node.conf]
+ 
+ Override plugin directory [@@CONFDIR@@/plugins/]
+ 
++=item B<< --sconfdir <dir> >>
++
++Override plugin configuration directory [@@CONFDIR@@/plugin-conf.d/]
++
+ =item B< --[no]paranoia >
+ 
+ Only run plugins owned by root. Check permissions as well. [--noparanoia]
diff --git a/pkgs/servers/monitoring/munin/default.nix b/pkgs/servers/monitoring/munin/default.nix
index 7882572b6c8..62fc3c6f8f5 100644
--- a/pkgs/servers/monitoring/munin/default.nix
+++ b/pkgs/servers/monitoring/munin/default.nix
@@ -3,14 +3,14 @@
 }:
 
 stdenv.mkDerivation rec {
-  version = "2.0.33";
+  version = "2.0.37";
   name = "munin-${version}";
 
   src = fetchFromGitHub {
     owner = "munin-monitoring";
     repo = "munin";
     rev = version;
-    sha256 = "0rs05b7926mjd58sdry33i91m1h3v3svl0wg2gmhljl8wqidac5w";
+    sha256 = "10niyzckx90dwdr4d7vj07d1qjy3nk7xzp30nqnlxzbaww7n5v78";
   };
 
   buildInputs = [ 
@@ -67,6 +67,9 @@ stdenv.mkDerivation rec {
 
     # https://github.com/munin-monitoring/munin/pull/134
     ./adding_servicedir_munin-node.patch
+
+    ./adding_sconfdir_munin-node.patch
+    ./preserve_environment.patch
   ];
 
   preBuild = ''
@@ -102,8 +105,8 @@ stdenv.mkDerivation rec {
     find "$out/lib/plugins" -type f -print0 | xargs -0 -L1 \
         sed -i -e "s|/usr/bin/||g" -e "s|/usr/sbin/||g" -e "s|\<bc\>|${bc}/bin/bc|g"
 
-    if test -e $out/nix-support/propagated-native-build-inputs; then
-        ln -s $out/nix-support/propagated-native-build-inputs $out/nix-support/propagated-user-env-packages
+    if test -e $out/nix-support/propagated-build-inputs; then
+        ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages
     fi
 
     for file in "$out"/bin/munindoc "$out"/sbin/munin-* "$out"/lib/munin-* "$out"/www/cgi/*; do
diff --git a/pkgs/servers/monitoring/munin/preserve_environment.patch b/pkgs/servers/monitoring/munin/preserve_environment.patch
new file mode 100644
index 00000000000..ef66f48ecb4
--- /dev/null
+++ b/pkgs/servers/monitoring/munin/preserve_environment.patch
@@ -0,0 +1,41 @@
+commit d94c29b7397362857b81d8c877a989fdb28490d8
+Author: Kjetil Orbekk <kjetil.orbekk@gmail.com>
+Date:   Tue Nov 21 15:37:42 2017 -0500
+
+    Keep environment variables instead of overwriting them.
+
+diff --git a/common/lib/Munin/Common/Defaults.pm b/common/lib/Munin/Common/Defaults.pm
+index 131f52c0..bbf42697 100644
+--- a/common/lib/Munin/Common/Defaults.pm
++++ b/common/lib/Munin/Common/Defaults.pm
+@@ -71,7 +71,7 @@ sub export_to_environment {
+ 
+     my %defaults = %{$class->get_defaults()};
+     while (my ($k, $v) = each %defaults) {
+-        $ENV{$k} = $v;
++        $ENV{$k} = $ENV{$k} || $v;
+     }
+ 
+     return
+diff --git a/node/lib/Munin/Node/Service.pm b/node/lib/Munin/Node/Service.pm
+index 1b4f6114..be58bd77 100644
+--- a/node/lib/Munin/Node/Service.pm
++++ b/node/lib/Munin/Node/Service.pm
+@@ -122,7 +122,7 @@ sub export_service_environment {
+     # We append the USER to the MUNIN_PLUGSTATE, to avoid CVE-2012-3512
+     my $uid = $self->_resolve_uid($service);
+     my $user = getpwuid($uid);
+-    $ENV{MUNIN_PLUGSTATE} = "$Munin::Common::Defaults::MUNIN_PLUGSTATE/$user";
++    $ENV{MUNIN_PLUGSTATE} = "$ENV{MUNIN_PLUGSTATE}/$user";
+ 
+     # Provide a consistent default state-file.
+     $ENV{MUNIN_STATEFILE} = "$ENV{MUNIN_PLUGSTATE}/$service-$ENV{MUNIN_MASTER_IP}";
+@@ -243,7 +243,7 @@ sub exec_service
+ 
+     # XXX - Create the statedir for the user
+     my $uid = $self->_resolve_uid($service);
+-    Munin::Node::OS->mkdir_subdir("$Munin::Common::Defaults::MUNIN_PLUGSTATE", $uid);
++    Munin::Node::OS->mkdir_subdir("$ENV{MUNIN_PLUGSTATE}", $uid);
+ 
+     $self->change_real_and_effective_user_and_group($service);
+ 
diff --git a/pkgs/servers/monitoring/nagios/default.nix b/pkgs/servers/monitoring/nagios/default.nix
index 5d7becb1652..47bc6d58da9 100644
--- a/pkgs/servers/monitoring/nagios/default.nix
+++ b/pkgs/servers/monitoring/nagios/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "nagios-${version}";
-  version = "4.2.4";
+  version = "4.3.4";
 
   src = fetchurl {
     url = "mirror://sourceforge/nagios/nagios-4.x/${name}/${name}.tar.gz";
-    sha256 = "0w0blbwiw0ps04b7gkyyk89qkgwsxh6gydhmggbm1kl3ar3mq1dh";
+    sha256 = "1wa4m952sb23dqi5w759adimsp21bkhp598rpq9dnhz3v497h2y9";
   };
 
   patches = [ ./nagios.patch ];
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A host, service and network monitoring program";
-    homepage    = http://www.nagios.org/;
+    homepage    = https://www.nagios.org/;
     license     = stdenv.lib.licenses.gpl2;
     platforms   = stdenv.lib.platforms.linux;
     maintainers = with stdenv.lib.maintainers; [ thoughtpolice relrod ];
diff --git a/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix b/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix
index 4989a01c9e3..deac45eadb6 100644
--- a/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix
+++ b/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "check_ssl_cert-${version}";
-  version = "1.51.0";
+  version = "1.64.0";
 
   src = fetchFromGitHub {
     owner = "matteocorti";
     repo = "check_ssl_cert";
     rev = "v${version}";
-    sha256 = "07g4dhwp1plzmlqazapn0s0hysmf3kk0pa2x0wns482xm1v1mr05";
+    sha256 = "0pq297sbz9hzcaccnnsfmra0bac81cki9xfrnb22a1hgfhqjxy5r";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/servers/monitoring/net-snmp/default.nix b/pkgs/servers/monitoring/net-snmp/default.nix
index 1d0b5fb8336..77dcfa43c43 100644
--- a/pkgs/servers/monitoring/net-snmp/default.nix
+++ b/pkgs/servers/monitoring/net-snmp/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, autoreconfHook, file, openssl, perl, unzip }:
+{ stdenv, fetchurl, fetchpatch, autoreconfHook, file, openssl, perl, unzip }:
 
 stdenv.mkDerivation rec {
   name = "net-snmp-5.7.3";
@@ -8,6 +8,19 @@ stdenv.mkDerivation rec {
     sha256 = "0gkss3zclm23zwpqfhddca8278id7pk6qx1mydpimdrrcndwgpz8";
   };
 
+  patches =
+    let fetchAlpinePatch = name: sha256: fetchpatch {
+      url = "https://git.alpinelinux.org/cgit/aports/plain/main/net-snmp/${name}?id=f25d3fb08341b60b6ccef424399f060dfcf3f1a5";
+      inherit name sha256;
+    };
+  in [
+    (fetchAlpinePatch "CVE-2015-5621.patch" "05098jyvd9ddr5q26z7scbbvk1bk6x4agpjm6pyprvpc1zpi0y09")
+    (fetchAlpinePatch "fix-Makefile-PL.patch" "14ilnkj3cr6mpi242hrmmmv8nv4dj0fdgn42qfk9aa7scwsc0lc7")
+    (fetchAlpinePatch "fix-includes.patch" "0zpkbb6k366qpq4dax5wknwprhwnhighcp402mlm7950d39zfa3m")
+    (fetchAlpinePatch "netsnmp-swinst-crash.patch" "0gh164wy6zfiwiszh58fsvr25k0ns14r3099664qykgpmickkqid")
+    (fetchAlpinePatch "remove-U64-typedef.patch" "1msxyhcqkvhqa03dwb50288g7f6nbrcd9cs036m9xc8jdgjb8k8j")
+  ];
+
   preConfigure =
     ''
       perlversion=$(perl -e 'use Config; print $Config{version};')
diff --git a/pkgs/servers/monitoring/plugins/default.nix b/pkgs/servers/monitoring/plugins/default.nix
index 808257ca121..a0f7341571c 100644
--- a/pkgs/servers/monitoring/plugins/default.nix
+++ b/pkgs/servers/monitoring/plugins/default.nix
@@ -62,7 +62,7 @@ _EOF
   '';
 
   meta = {
-    description = "Official monitoring plugins for Nagios/Ichinga/Sensu and others.";
+    description = "Official monitoring plugins for Nagios/Icinga/Sensu and others.";
     homepage    = https://www.monitoring-plugins.org;
     license     = licenses.gpl2;
     platforms   = platforms.linux;
diff --git a/pkgs/servers/monitoring/plugins/esxi.nix b/pkgs/servers/monitoring/plugins/esxi.nix
index 312caab954b..e458e130ba4 100644
--- a/pkgs/servers/monitoring/plugins/esxi.nix
+++ b/pkgs/servers/monitoring/plugins/esxi.nix
@@ -32,6 +32,6 @@ in python2Packages.buildPythonApplication rec {
   meta = with stdenv.lib; {
     homepage = https://www.claudiokuenzler.com/nagios-plugins/;
     license = licenses.gpl2;
-    maintainer = with maintainers; [ peterhoeg ];
+    maintainers = with maintainers; [ peterhoeg ];
   };
 }
diff --git a/pkgs/servers/monitoring/plugins/labs_consol_de.nix b/pkgs/servers/monitoring/plugins/labs_consol_de.nix
index 441d9595bbd..9f33835c885 100644
--- a/pkgs/servers/monitoring/plugins/labs_consol_de.nix
+++ b/pkgs/servers/monitoring/plugins/labs_consol_de.nix
@@ -46,9 +46,9 @@ let
     '';
 
     meta = with stdenv.lib; {
-      homepage   = https://labs.consol.de/;
-      license    = licenses.gpl2;
-      maintainer = with maintainers; [ peterhoeg ];
+      homepage    = https://labs.consol.de/;
+      license     = licenses.gpl2;
+      maintainers = with maintainers; [ peterhoeg ];
       inherit description;
     };
   };
diff --git a/pkgs/servers/monitoring/plugins/uptime.nix b/pkgs/servers/monitoring/plugins/uptime.nix
index 2f26bc26ba4..9f03c9ea96f 100644
--- a/pkgs/servers/monitoring/plugins/uptime.nix
+++ b/pkgs/servers/monitoring/plugins/uptime.nix
@@ -21,6 +21,6 @@ stdenv.mkDerivation rec {
     description = "Uptime check plugin for Sensu/Nagios/others";
     homepage    = https://github.com/madrisan/nagios-plugins-uptime;
     license     = licenses.gpl3;
-    maintainer  = with maintainers; [ peterhoeg ];
+    maintainers = with maintainers; [ peterhoeg ];
   };
 }
diff --git a/pkgs/servers/monitoring/prometheus/alertmanager.nix b/pkgs/servers/monitoring/prometheus/alertmanager.nix
index 444aa92ec2e..2f9016b7499 100644
--- a/pkgs/servers/monitoring/prometheus/alertmanager.nix
+++ b/pkgs/servers/monitoring/prometheus/alertmanager.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "alertmanager-${version}";
-  version = "0.9.1";
+  version = "0.14.0";
   rev = "v${version}";
 
   goPackagePath = "github.com/prometheus/alertmanager";
@@ -11,31 +11,25 @@ buildGoPackage rec {
     inherit rev;
     owner = "prometheus";
     repo = "alertmanager";
-    sha256 = "1lkfj63pp4jf58xmn015r7s42p1wyj6fryihpmdn0k76b0ccwqzj";
+    sha256 = "0f6yi19zffxnp3dlr4zs52b7bllks3kjxkdn9zvvi5lvpkzmba5j";
   };
 
   # Tests exist, but seem to clash with the firewall.
   doCheck = false;
 
-  buildFlagsArray = let t = "${goPackagePath}/version"; in ''
+  buildFlagsArray = let t = "${goPackagePath}/vendor/github.com/prometheus/common/version"; in ''
     -ldflags=
        -X ${t}.Version=${version}
-       -X ${t}.Revision=unknown
+       -X ${t}.Revision=${src.rev}
        -X ${t}.Branch=unknown
        -X ${t}.BuildUser=nix@nixpkgs
        -X ${t}.BuildDate=unknown
        -X ${t}.GoVersion=${stdenv.lib.getVersion go}
   '';
 
-  postBuild = ''
-    $NIX_BUILD_TOP/go/bin/artifacts
-  '';
-
   postInstall = ''
-    rm $bin/bin/artifacts
-    mkdir -p $bin/share/man/man1 $bin/etc/bash_completion.d
-    cp -v amtool*.1 $bin/share/man/man1
-    cp -v amtool_completion.sh $bin/etc/bash_completion.d
+    mkdir -p $bin/etc/bash_completion.d
+    $NIX_BUILD_TOP/go/bin/amtool --completion-script-bash > $bin/etc/bash_completion.d/amtool_completion.sh
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix b/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix
index c5aa7f91bd6..798f31c3458 100644
--- a/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix
+++ b/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "blackbox_exporter-${version}";
-  version = "0.10.0";
+  version = "0.12.0";
   rev = version;
 
   goPackagePath = "github.com/prometheus/blackbox_exporter";
@@ -11,7 +11,7 @@ buildGoPackage rec {
     rev = "v${version}";
     owner = "prometheus";
     repo = "blackbox_exporter";
-    sha256 = "0xxlmg6yin63pghlvjj8amf0h5plnichvcrmcq67bffhz6d792gc";
+    sha256 = "0gd3vymk3qdfjnf0rx9kwc6v0jv7f8l30igvj2v7bljar2d6hzxf";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/servers/monitoring/prometheus/default.nix b/pkgs/servers/monitoring/prometheus/default.nix
index 46c02c6bb95..3287bc6f258 100644
--- a/pkgs/servers/monitoring/prometheus/default.nix
+++ b/pkgs/servers/monitoring/prometheus/default.nix
@@ -1,42 +1,56 @@
 { stdenv, go, buildGoPackage, fetchFromGitHub }:
 
-buildGoPackage rec {
-  name = "prometheus-${version}";
-  version = "1.8.1";
-  rev = "v${version}";
-
+let
   goPackagePath = "github.com/prometheus/prometheus";
 
-  src = fetchFromGitHub {
-    inherit rev;
-    owner = "prometheus";
-    repo = "prometheus";
+  generic = { version, sha256, ... }@attrs:
+    let attrs' = builtins.removeAttrs attrs ["version" "sha256"]; in
+      buildGoPackage ({
+        name = "prometheus-${version}";
+
+        inherit goPackagePath;
+
+        src = fetchFromGitHub {
+          rev = "v${version}";
+          owner = "prometheus";
+          repo = "prometheus";
+          inherit sha256;
+        };
+
+        doCheck = true;
+
+        buildFlagsArray = let t = "${goPackagePath}/version"; in ''
+          -ldflags=
+             -X ${t}.Version=${version}
+             -X ${t}.Revision=unknown
+             -X ${t}.Branch=unknown
+             -X ${t}.BuildUser=nix@nixpkgs
+             -X ${t}.BuildDate=unknown
+             -X ${t}.GoVersion=${stdenv.lib.getVersion go}
+        '';
+
+        preInstall = ''
+          mkdir -p "$bin/share/doc/prometheus" "$bin/etc/prometheus"
+          cp -a $src/documentation/* $bin/share/doc/prometheus
+          cp -a $src/console_libraries $src/consoles $bin/etc/prometheus
+        '';
+
+        meta = with stdenv.lib; {
+          description = "Service monitoring system and time series database";
+          homepage = https://prometheus.io;
+          license = licenses.asl20;
+          maintainers = with maintainers; [ benley fpletz ];
+          platforms = platforms.unix;
+        };
+    } // attrs');
+in rec {
+  prometheus_1 = generic {
+    version = "1.8.1";
     sha256 = "07xvpjhhxc0r73qfmkvf94zhv19zv76privw6blg35k5nxcnj7j4";
   };
 
-  docheck = true;
-
-  buildFlagsArray = let t = "${goPackagePath}/version"; in ''
-    -ldflags=
-       -X ${t}.Version=${version}
-       -X ${t}.Revision=unknown
-       -X ${t}.Branch=unknown
-       -X ${t}.BuildUser=nix@nixpkgs
-       -X ${t}.BuildDate=unknown
-       -X ${t}.GoVersion=${stdenv.lib.getVersion go}
-  '';
-
-  preInstall = ''
-    mkdir -p "$bin/share/doc/prometheus" "$bin/etc/prometheus"
-    cp -a $src/documentation/* $bin/share/doc/prometheus
-    cp -a $src/console_libraries $src/consoles $bin/etc/prometheus
-  '';
-
-  meta = with stdenv.lib; {
-    description = "Service monitoring system and time series database";
-    homepage = https://prometheus.io;
-    license = licenses.asl20;
-    maintainers = with maintainers; [ benley fpletz ];
-    platforms = platforms.unix;
+  prometheus_2 = generic {
+    version = "2.2.1";
+    sha256 = "1zwxjmj8jh02i4y3i3zrkz7ml66zyhg3ad1npjzf3319mglsp7ch";
   };
 }
diff --git a/pkgs/servers/monitoring/prometheus/dovecot-exporter-deps.nix b/pkgs/servers/monitoring/prometheus/dovecot-exporter-deps.nix
new file mode 100644
index 00000000000..c2dea18ee81
--- /dev/null
+++ b/pkgs/servers/monitoring/prometheus/dovecot-exporter-deps.nix
@@ -0,0 +1,93 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
+[
+  {
+    goPackagePath = "github.com/alecthomas/template";
+    fetch = {
+      type = "git";
+      url = "https://github.com/alecthomas/template";
+      rev = "a0175ee3bccc567396460bf5acd36800cb10c49c";
+      sha256 = "0qjgvvh26vk1cyfq9fadyhfgdj36f1iapbmr5xp6zqipldz8ffxj";
+    };
+  }
+  {
+    goPackagePath = "github.com/alecthomas/units";
+    fetch = {
+      type = "git";
+      url = "https://github.com/alecthomas/units";
+      rev = "2efee857e7cfd4f3d0138cc3cbb1b4966962b93a";
+      sha256 = "1j65b91qb9sbrml9cpabfrcf07wmgzzghrl7809hjjhrmbzri5bl";
+    };
+  }
+  {
+    goPackagePath = "github.com/beorn7/perks";
+    fetch = {
+      type = "git";
+      url = "https://github.com/beorn7/perks";
+      rev = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9";
+      sha256 = "1hrybsql68xw57brzj805xx2mghydpdiysv3gbhr7f5wlxj2514y";
+    };
+  }
+  {
+    goPackagePath = "github.com/golang/protobuf";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/protobuf";
+      rev = "bbd03ef6da3a115852eaf24c8a1c46aeb39aa175";
+      sha256 = "1pyli3dcagi7jzpiazph4fhkz7a3z4bhd25nwbb7g0iy69b8z1g4";
+    };
+  }
+  {
+    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/prometheus/client_golang";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/client_golang";
+      rev = "c3324c1198cf3374996e9d3098edd46a6b55afc9";
+      sha256 = "19qcz5bpzj5kqyhmbq5kxr8nrqqlszazzq6w0wldis1yk1wwww00";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/client_model";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/client_model";
+      rev = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c";
+      sha256 = "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/common";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/common";
+      rev = "e4aa40a9169a88835b849a6efb71e05dc04b88f0";
+      sha256 = "0m1n616d694jca0qjwjn5ci7scfgm2jpi94dhi356arm9lhda4jc";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/procfs";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/procfs";
+      rev = "54d17b57dd7d4a3aa092476596b3f8a933bde349";
+      sha256 = "1b5218hi6k9i637k6xc7ynpll577zbnrhjm9jr2iczy3j0rr4rvr";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/alecthomas/kingpin.v2";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/alecthomas/kingpin.v2";
+      rev = "947dcec5ba9c011838740e680966fd7087a71d0d";
+      sha256 = "0mndnv3hdngr3bxp7yxfd47cas4prv98sqw534mx7vp38gd88n5r";
+    };
+  }
+]
diff --git a/pkgs/servers/monitoring/prometheus/dovecot-exporter.nix b/pkgs/servers/monitoring/prometheus/dovecot-exporter.nix
new file mode 100644
index 00000000000..86f43116f74
--- /dev/null
+++ b/pkgs/servers/monitoring/prometheus/dovecot-exporter.nix
@@ -0,0 +1,24 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "dovecot_exporter-${version}";
+  version = "0.1.1";
+
+  goPackagePath = "github.com/kumina/dovecot_exporter";
+
+  src = fetchFromGitHub {
+    owner = "kumina";
+    repo = "dovecot_exporter";
+    rev = version;
+    sha256 = "0i7nfgkb5jqdbgr16i29jdsvh69dx9qgn6nazpw78k0lgy7mpidn";
+  };
+
+  goDeps = ./dovecot-exporter-deps.nix;
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Prometheus metrics exporter for Dovecot";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ willibutz ];
+  };
+}
diff --git a/pkgs/servers/monitoring/prometheus/minio-exporter/default.nix b/pkgs/servers/monitoring/prometheus/minio-exporter/default.nix
index c89574e3fff..59314f1f282 100644
--- a/pkgs/servers/monitoring/prometheus/minio-exporter/default.nix
+++ b/pkgs/servers/monitoring/prometheus/minio-exporter/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
+{ stdenv, lib, buildGoPackage, fetchFromGitHub, fetchpatch }:
 
 buildGoPackage rec {
   name = "minio-exporter-${version}";
-  version = "0.1.0";
+  version = "0.2.0";
   rev = "v${version}";
 
   goPackagePath = "github.com/joe-pll/minio-exporter";
@@ -11,9 +11,18 @@ buildGoPackage rec {
     inherit rev;
     owner = "joe-pll";
     repo = "minio-exporter";
-    sha256 = "14lz4dg0n213b6xy12fh4r20k1rcnflnfg6gjskk5zr8h7978hjx";
+    sha256 = "1my3ii5s479appiapw8gjzkq1pk62fl7d7if8ljvdj6qw4man6aa";
   };
 
+  # Required to make 0.2.0 build against latest dependencies
+  # TODO: Remove on update to 0.3.0
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/joe-pll/minio-exporter/commit/50ab89d42322dc3e2696326a9ae4d3f951f646de.patch";
+      sha256 = "0aiixhvb4x8c8abrlf1i4hmca9i6xd6b638a5vfkvawx0q7gxl97";
+    })
+  ];
+
   goDeps = ./deps.nix;
 
   meta = with stdenv.lib; {
diff --git a/pkgs/servers/monitoring/prometheus/minio-exporter/deps.nix b/pkgs/servers/monitoring/prometheus/minio-exporter/deps.nix
index 562d77f3a2f..1993975e2bf 100644
--- a/pkgs/servers/monitoring/prometheus/minio-exporter/deps.nix
+++ b/pkgs/servers/monitoring/prometheus/minio-exporter/deps.nix
@@ -1,4 +1,4 @@
-# This file was generated by go2nix.
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
 [
   {
     goPackagePath = "github.com/alecthomas/template";
@@ -32,8 +32,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/go-ini/ini";
-      rev = "c787282c39ac1fc618827141a1f762240def08a3";
-      sha256 = "0c784qichlpqdk1zwafislskchr7f4dl7fy3g3w7xg2w63xpd7r0";
+      rev = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a";
+      sha256 = "0mhgxw5q6b0pryhikx3k4wby7g32rwjjljzihi47lwn34kw5y1qn";
     };
   }
   {
@@ -41,8 +41,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/golang/protobuf";
-      rev = "130e6b02ab059e7b717a096f397c5b60111cae74";
-      sha256 = "0zk4d7gcykig9ld8f5h86fdxshm2gs93a2xkpf52jd5m4z59q26s";
+      rev = "1e59b77b52bf8e4b449a57e6f79f21226d571845";
+      sha256 = "19bkh81wnp6njg3931wky6hsnnl2d1ig20vfjxpv450sd3k6yys8";
     };
   }
   {
@@ -55,30 +55,30 @@
     };
   }
   {
-    goPackagePath = "github.com/minio/go-homedir";
+    goPackagePath = "github.com/minio/minio-go";
     fetch = {
       type = "git";
-      url = "https://github.com/minio/go-homedir";
-      rev = "21304a94172ae3a09dee2cd86a12fb6f842138c7";
-      sha256 = "1kvz91gvdrpzddlpcbf0a2kf75bfqzd40kwzq29jwhf1y5ii6cq4";
+      url = "https://github.com/minio/minio-go";
+      rev = "d218e4cb1bfc13dcef0eb5c3e74507a35be0dd3a";
+      sha256 = "0d3am33xaavdffz791qi2s0vnkpjw9vlr5p5g4lw7h5vhmy1sjb4";
     };
   }
   {
-    goPackagePath = "github.com/minio/minio-go";
+    goPackagePath = "github.com/minio/minio";
     fetch = {
       type = "git";
-      url = "https://github.com/minio/minio-go";
-      rev = "cb3571b7d8d904c4714033deb984d0a0b66955be";
-      sha256 = "165filzwslnqdgsp8wf5k1zm8wcpnsffsaffw25igy0ik8swr06w";
+      url = "https://github.com/minio/minio";
+      rev = "bb73c84b104bc447eb603d63481cdc54b8ab3c83";
+      sha256 = "1gjkgdf59yxfr2a7pl3f7z3iid86zsd85xqxcv1s0d46v7j07iga";
     };
   }
   {
-    goPackagePath = "github.com/minio/minio";
+    goPackagePath = "github.com/mitchellh/go-homedir";
     fetch = {
       type = "git";
-      url = "https://github.com/minio/minio";
-      rev = "60cc6184d253efee4a3120683517028342229e21";
-      sha256 = "0n2l163v45jraylv43jwqm0cxin68vw8cw7k21qniahhr46y4dqf";
+      url = "https://github.com/mitchellh/go-homedir";
+      rev = "b8bc1bf767474819792c23f32d8286a45736f1c6";
+      sha256 = "13ry4lylalkh4g2vny9cxwvryslzyzwp9r92z0b10idhdq3wad1q";
     };
   }
   {
@@ -86,8 +86,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/prometheus/client_golang";
-      rev = "353b8c3f3776541879f9abfd8fa8b1ae162ab394";
-      sha256 = "068fk3bdfsaij37973c66065w2cn46ahwjs44pw9v1mqk8bsrn3a";
+      rev = "06bc6e01f4baf4ee783ffcd23abfcb0b0f9dfada";
+      sha256 = "0dvv21214sn702kc25y5l0gd9d11358976d3w31fgwx7456mjx26";
     };
   }
   {
@@ -95,8 +95,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/prometheus/client_model";
-      rev = "6f3806018612930941127f2a7c6c453ba2c527d2";
-      sha256 = "1413ibprinxhni51p0755dp57r9wvbw7xgj9nmdaxmhzlqhc86j4";
+      rev = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c";
+      sha256 = "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998";
     };
   }
   {
@@ -104,8 +104,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/prometheus/common";
-      rev = "2f17f4a9d485bf34b4bfaccc273805040e4f86c8";
-      sha256 = "0r1dyipnd7n9vp4p6gs1y4v7ggq4avj06pr90l4qrjll55h281js";
+      rev = "89604d197083d4781071d3c65855d24ecfb0a563";
+      sha256 = "169rdlaf2mk9z4fydz7ajmngyhmf3q1lk96yhvx46bn986x5xkyn";
     };
   }
   {
@@ -113,8 +113,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/prometheus/procfs";
-      rev = "e645f4e5aaa8506fc71d6edbc5c4ff02c04c46f2";
-      sha256 = "18hwygbawbqilz7h8fl25xpbciwalkslb4igqn4cr9d8sqp7d3np";
+      rev = "b15cd069a83443be3154b719d0cc9fe8117f09fb";
+      sha256 = "1cr45wg2m40bj2za8f32mq09rjlcnk5kfam0h0hr8wcb015k4wxj";
     };
   }
   {
@@ -122,8 +122,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/sirupsen/logrus";
-      rev = "89742aefa4b206dcf400792f3bd35b542998eb3b";
-      sha256 = "0hk7fabx59msg2y0iik6xvfp80s73ybrwlcshbm9ds91iqbkcxi6";
+      rev = "d682213848ed68c0a260ca37d6dd5ace8423f5ba";
+      sha256 = "0nzyqwzx3k7nqfq8q7yv32gaf3ymq3bpwhkmw1hj2zakq5a93d8x";
     };
   }
   {
@@ -131,8 +131,17 @@
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/crypto";
-      rev = "76eec36fa14229c4b25bb894c2d0e591527af429";
-      sha256 = "1c57fdg70vhf7pigiwb2xdap6ak0c0s2pzaj9pq000aqfw54i4s8";
+      rev = "a6600008915114d9c087fad9f03d75087b1a74df";
+      sha256 = "099vyf8133bjwaqcv377d9akam3j5xwamwqrihmjhvzbvqs649yc";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/net";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/net";
+      rev = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec";
+      sha256 = "0bdwdxy2gz48icnh023r5fga3z4x6c8gry8jlfjqr5w12y3s281g";
     };
   }
   {
@@ -140,8 +149,17 @@
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/sys";
-      rev = "314a259e304ff91bd6985da2a7149bbf91237993";
-      sha256 = "0vya62c3kmhmqx6awlxx8hc84987xkym9rhs0q28vlhwk9kczdaa";
+      rev = "2c42eef0765b9837fbdab12011af7830f55f88f0";
+      sha256 = "0gj9nwryyzf9rn33gl3zm6rxvg1zhrhwi36akipqj37x4g86h3gz";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/text";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/text";
+      rev = "e19ae1496984b1c655b8044a65c0300a3c878dd3";
+      sha256 = "1cvnnx8nwx5c7gr6ajs7sldhbqh52n7h6fsa3i21l2lhx6xrsh4w";
     };
   }
   {
@@ -149,8 +167,8 @@
     fetch = {
       type = "git";
       url = "https://gopkg.in/alecthomas/kingpin.v2";
-      rev = "1087e65c9441605df944fb12c33f0fe7072d18ca";
-      sha256 = "18llqzkdqf62qbqcv2fd3j0igl6cwwn4dissf5skkvxrcxjcmmj0";
+      rev = "947dcec5ba9c011838740e680966fd7087a71d0d";
+      sha256 = "0mndnv3hdngr3bxp7yxfd47cas4prv98sqw534mx7vp38gd88n5r";
     };
   }
 ]
diff --git a/pkgs/servers/monitoring/prometheus/node-exporter.nix b/pkgs/servers/monitoring/prometheus/node-exporter.nix
index 8b70ad423e9..497f20ac55e 100644
--- a/pkgs/servers/monitoring/prometheus/node-exporter.nix
+++ b/pkgs/servers/monitoring/prometheus/node-exporter.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "node_exporter-${version}";
-  version = "0.15.0";
+  version = "0.15.2";
   rev = "v${version}";
 
   goPackagePath = "github.com/prometheus/node_exporter";
@@ -11,7 +11,7 @@ buildGoPackage rec {
     inherit rev;
     owner = "prometheus";
     repo = "node_exporter";
-    sha256 = "0v1m6m9fmlw66s9v50y2rfr5kbpb9mxbwpcab4cmgcjs1y7wcn49";
+    sha256 = "1vxbkps80ba8c0ndawijg07am5gyc8y49h8fd0ky5h05zmkp25qv";
   };
 
   # FIXME: megacli test fails
diff --git a/pkgs/servers/monitoring/prometheus/postfix-exporter-deps.nix b/pkgs/servers/monitoring/prometheus/postfix-exporter-deps.nix
new file mode 100644
index 00000000000..194651f4332
--- /dev/null
+++ b/pkgs/servers/monitoring/prometheus/postfix-exporter-deps.nix
@@ -0,0 +1,84 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
+[
+  {
+    goPackagePath = "github.com/beorn7/perks";
+    fetch = {
+      type = "git";
+      url = "https://github.com/beorn7/perks";
+      rev = "3a771d992973f24aa725d07868b467d1ddfceafb";
+      sha256 = "1l2lns4f5jabp61201sh88zf3b0q793w4zdgp9nll7mmfcxxjif3";
+    };
+  }
+  {
+    goPackagePath = "github.com/coreos/go-systemd";
+    fetch = {
+      type = "git";
+      url = "https://github.com/coreos/go-systemd";
+      rev = "d1b7d058aa2adfc795ad17ff4aaa2bc64ec11c78";
+      sha256 = "1nz3v1b90hnmj2vjjwq96pr6psxlndqjyd30v9sgiwygzb7db9mv";
+    };
+  }
+  {
+    goPackagePath = "github.com/coreos/pkg";
+    fetch = {
+      type = "git";
+      url = "https://github.com/coreos/pkg";
+      rev = "97fdf19511ea361ae1c100dd393cc47f8dcfa1e1";
+      sha256 = "1srn87wih25l09f75483hnxsr8fc6rq3bk7w1x8125ym39p6mg21";
+    };
+  }
+  {
+    goPackagePath = "github.com/golang/protobuf";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/protobuf";
+      rev = "e09c5db296004fbe3f74490e84dcd62c3c5ddb1b";
+      sha256 = "1acnmalkqwrq6k3l71c4pyws0zn18r2609kqaq55lhbdcjgzid31";
+    };
+  }
+  {
+    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/prometheus/client_golang";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/client_golang";
+      rev = "82f5ff156b29e276022b1a958f7d385870fb9814";
+      sha256 = "111j329yrlgvh73dm80gawwxsh9dgjkw74254kyj5c2rfmra7znz";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/client_model";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/client_model";
+      rev = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c";
+      sha256 = "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/common";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/common";
+      rev = "d0f7cd64bda49e08b22ae8a730aa57aa0db125d6";
+      sha256 = "1d4hfbb66xsf0wq317fwhgrwakqzhvryw4d7ip851lwrpql5fqcx";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/procfs";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/procfs";
+      rev = "8b1c2da0d56deffdbb9e48d4414b4e674bd8083e";
+      sha256 = "0x128p15h35mgwqxkigfkk1lfrcz9g697ahl8v6xp9kwvcqvjrrf";
+    };
+  }
+]
diff --git a/pkgs/servers/monitoring/prometheus/postfix-exporter.nix b/pkgs/servers/monitoring/prometheus/postfix-exporter.nix
new file mode 100644
index 00000000000..3c2f01c0a5c
--- /dev/null
+++ b/pkgs/servers/monitoring/prometheus/postfix-exporter.nix
@@ -0,0 +1,32 @@
+{ stdenv, buildGoPackage, fetchFromGitHub, systemd, makeWrapper }:
+
+buildGoPackage rec {
+  name = "postfix_exporter-${version}";
+  version = "0.1.1";
+
+  goPackagePath = "github.com/kumina/postfix_exporter";
+
+  src = fetchFromGitHub {
+    owner = "kumina";
+    repo = "postfix_exporter";
+    rev = version;
+    sha256 = "1p2j66jzzgyv2w832pw57g02vrac6ldrblqllgwyy0i8krb3ibyz";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ systemd ];
+
+  goDeps = ./postfix-exporter-deps.nix;
+
+  postInstall = ''
+    wrapProgram $bin/bin/postfix_exporter \
+      --prefix LD_LIBRARY_PATH : "${systemd.lib}/lib"
+  '';
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "A Prometheus exporter for Postfix";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ willibutz ];
+  };
+}
diff --git a/pkgs/servers/monitoring/prometheus/rabbitmq-exporter.nix b/pkgs/servers/monitoring/prometheus/rabbitmq-exporter.nix
new file mode 100644
index 00000000000..34120ad3fda
--- /dev/null
+++ b/pkgs/servers/monitoring/prometheus/rabbitmq-exporter.nix
@@ -0,0 +1,26 @@
+# This file was generated by https://github.com/kamilchm/go2nix v2.0-dev
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "rabbitmq_exporter-${version}";
+  version = "0.25.2";
+
+  goPackagePath = "github.com/kbudde/rabbitmq_exporter";
+
+  src = fetchFromGitHub {
+    owner = "kbudde";
+    repo = "rabbitmq_exporter";
+    rev = "8238c5d9ad509dab94e631cdecf3d75155fbdee4";
+    sha256 = "1zb21jms2wlmiw5vhk1wyhv0xrv5a9y08y9q6x92hv727kjqjr6w";
+  };
+
+  goDeps = ./rabbitmq-exporter_deps.nix;
+
+  meta = with stdenv.lib; {
+    description = "Prometheus exporter for RabbitMQ";
+    homepage = https://github.com/kbudde/rabbitmq_exporter;
+    license = licenses.mit;
+    maintainers = with maintainers; [ ocharles ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/servers/monitoring/prometheus/rabbitmq-exporter_deps.nix b/pkgs/servers/monitoring/prometheus/rabbitmq-exporter_deps.nix
new file mode 100644
index 00000000000..7a15a6a7b68
--- /dev/null
+++ b/pkgs/servers/monitoring/prometheus/rabbitmq-exporter_deps.nix
@@ -0,0 +1,165 @@
+# This file was generated by https://github.com/kamilchm/go2nix v2.0-dev
+[
+  {
+    goPackagePath = "github.com/Sirupsen/logrus";
+    fetch = {
+      type = "git";
+      url = "https://github.com/Sirupsen/logrus";
+      rev = "95cd2b9c79aa5e72ab0bc69b7ccc2be15bf850f6";
+      sha256 = "1rkkhl68iw523bwxmp2prdrp8pk62xfp52wifzvbmqf8v1svwsqv";
+    };
+  }
+  {
+    goPackagePath = "github.com/beorn7/perks";
+    fetch = {
+      type = "git";
+      url = "https://github.com/beorn7/perks";
+      rev = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9";
+      sha256 = "1hrybsql68xw57brzj805xx2mghydpdiysv3gbhr7f5wlxj2514y";
+    };
+  }
+  {
+    goPackagePath = "github.com/cenk/backoff";
+    fetch = {
+      type = "git";
+      url = "https://github.com/cenk/backoff";
+      rev = "61153c768f31ee5f130071d08fc82b85208528de";
+      sha256 = "08x77mgb9zsj047n74rx6c16jjx985lmy4s6fl58mdgxgxjv54y5";
+    };
+  }
+  {
+    goPackagePath = "github.com/fsouza/go-dockerclient";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fsouza/go-dockerclient";
+      rev = "1d4f4ae73768d3ca16a6fb964694f58dc5eba601";
+      sha256 = "1s3m8jq8z1cm5rkn7dmjacf38n6ihkkzbdfang2aa2cgs5wl28y0";
+    };
+  }
+  {
+    goPackagePath = "github.com/golang/protobuf";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/protobuf";
+      rev = "1e59b77b52bf8e4b449a57e6f79f21226d571845";
+      sha256 = "19bkh81wnp6njg3931wky6hsnnl2d1ig20vfjxpv450sd3k6yys8";
+    };
+  }
+  {
+    goPackagePath = "github.com/kbudde/gobert";
+    fetch = {
+      type = "git";
+      url = "https://github.com/kbudde/gobert";
+      rev = "a6daecb9ddeb548b7cfb3f5ac9deef9ded522730";
+      sha256 = "06g036w4dny8wdjwvprjjcdh0vx851qphgrvilrn5lghv3jdr29z";
+    };
+  }
+  {
+    goPackagePath = "github.com/kylelemons/godebug";
+    fetch = {
+      type = "git";
+      url = "https://github.com/kylelemons/godebug";
+      rev = "d65d576e9348f5982d7f6d83682b694e731a45c6";
+      sha256 = "0bc8j9kwkp0hrsz0sm7hav7cm5jp9d6ql8r2b3mz78xb1g65xhbc";
+    };
+  }
+  {
+    goPackagePath = "github.com/matttproud/golang_protobuf_extensions";
+    fetch = {
+      type = "git";
+      url = "https://github.com/matttproud/golang_protobuf_extensions";
+      rev = "3247c84500bff8d9fb6d579d800f20b3e091582c";
+      sha256 = "12hcych25wf725zxdkpnyx4wa0gyxl8v4m8xmhdmmaki9bbmqd0d";
+    };
+  }
+  {
+    goPackagePath = "github.com/pkg/errors";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pkg/errors";
+      rev = "645ef00459ed84a119197bfb8d8205042c6df63d";
+      sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/client_golang";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/client_golang";
+      rev = "c5b7fccd204277076155f10851dad72b76a49317";
+      sha256 = "1xqny3147g12n4j03kxm8s9mvdbs3ln6i56c655mybrn9jjy48kd";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/client_model";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/client_model";
+      rev = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c";
+      sha256 = "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/common";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/common";
+      rev = "2e54d0b93cba2fd133edc32211dcc32c06ef72ca";
+      sha256 = "14kn5w7imcxxlfdqxl21fsnlf1ms7200g3ldy29hwamldv8qlm7j";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/procfs";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/procfs";
+      rev = "a6e9df898b1336106c743392c48ee0b71f5c4efa";
+      sha256 = "0zyprdp9bnpywcb6b9dzwyiji60mgf0s9wnw98zndfg3xrgnkasz";
+    };
+  }
+  {
+    goPackagePath = "github.com/streadway/amqp";
+    fetch = {
+      type = "git";
+      url = "https://github.com/streadway/amqp";
+      rev = "ff791c2d22d3f1588b4e2cc71a9fba5e1da90654";
+      sha256 = "1drridn4k1n7qy82msvw9r18w4pmrah1nip36wixz098nzalz55x";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/crypto";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/crypto";
+      rev = "94eea52f7b742c7cbe0b03b22f0c4c8631ece122";
+      sha256 = "095zyvjb0m2pz382500miqadhk7w3nis8z3j941z8cq4rdafijvi";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/net";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/net";
+      rev = "a8b9294777976932365dabb6640cf1468d95c70f";
+      sha256 = "112v83jfwd1brwaanjijvb7da4dx1iqk8b4bf9ahx0hvir56c2g8";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev = "8b4580aae2a0dd0c231a45d3ccb8434ff533b840";
+      sha256 = "1w66xqnpkskvj22a3f841qg4rgf0lzcrxp8678s6n07yw8qdh92p";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/ory-am/dockertest.v3";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/ory-am/dockertest.v3";
+      rev = "a7951f7a8442f0e70d36e499ed4d744f00af2963";
+      sha256 = "13qv0vl79m2wirhbjs0k2a3cjl6ib7sw6rg98v95xxpn8r39ijzw";
+    };
+  }
+]
diff --git a/pkgs/servers/monitoring/riemann/default.nix b/pkgs/servers/monitoring/riemann/default.nix
index 64585de51ff..b930c1ab1f6 100644
--- a/pkgs/servers/monitoring/riemann/default.nix
+++ b/pkgs/servers/monitoring/riemann/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "riemann-${version}";
-  version = "0.2.12";
+  version = "0.3.0";
 
   src = fetchurl {
     url = "https://github.com/riemann/riemann/releases/download/${version}/${name}.tar.bz2";
-    sha256 = "1x57gi301rg6faxm4q5scq9dpp0v9nqiwjpsgigdb8whmjr1zwkr";
+    sha256 = "151zd8nkhigphdx6g9jhmza6963qvlnki013j1g7lyqaz43qyk1c";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/servers/monitoring/sensu/default.nix b/pkgs/servers/monitoring/sensu/default.nix
index c0a2c3ca49e..dba0c32b353 100644
--- a/pkgs/servers/monitoring/sensu/default.nix
+++ b/pkgs/servers/monitoring/sensu/default.nix
@@ -9,7 +9,7 @@ bundlerEnv rec {
 
   meta = with lib; {
     description = "A monitoring framework that aims to be simple, malleable, and scalable";
-    homepage    = http://sensuapp.org/;
+    homepage    = https://sensuapp.org/;
     license     = licenses.mit;
     maintainers = with maintainers; [ theuni peterhoeg ];
     platforms   = platforms.unix;
diff --git a/pkgs/servers/monitoring/telegraf/default.nix b/pkgs/servers/monitoring/telegraf/default.nix
index f71ed052d04..e06aaa9faa4 100644
--- a/pkgs/servers/monitoring/telegraf/default.nix
+++ b/pkgs/servers/monitoring/telegraf/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "telegraf-${version}";
-  version = "1.4.4";
+  version = "1.5.3";
 
   goPackagePath = "github.com/influxdata/telegraf";
 
@@ -12,7 +12,7 @@ buildGoPackage rec {
     owner = "influxdata";
     repo = "telegraf";
     rev = "${version}";
-    sha256 = "1hyjbx0hwyh39dgij86xlznaqnzh8m0yk96phqgxs328dlcxfl07";
+    sha256 = "0h3v80qvb9xmkmgbp46sqh76y4k84c0da586vdy3xmmbrbagnypv";
   };
 
   buildFlagsArray = [ ''-ldflags=
diff --git a/pkgs/servers/monitoring/telegraf/deps-1.4.4.nix b/pkgs/servers/monitoring/telegraf/deps-1.5.3.nix
index 0cfcf03dd14..916b4688a06 100644
--- a/pkgs/servers/monitoring/telegraf/deps-1.4.4.nix
+++ b/pkgs/servers/monitoring/telegraf/deps-1.5.3.nix
@@ -14,8 +14,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/Shopify/sarama";
-      rev = "c01858abb625b73a3af51d0798e4ad42c8147093";
-      sha256 = "139fyfi2h6qas83kan0kpm9d92985nl1fyhijswy37d6ia86797w";
+      rev = "3b1b38866a79f06deddf0487d5c27ba0697ccd65";
+      sha256 = "02qwlqd1kdgwlv39fimpbzjhgw8shzkkad82kfwdy8lppscb20br";
     };
   }
   {
@@ -77,8 +77,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/bsm/sarama-cluster";
-      rev = "ccdc0803695fbce22f1706d04ded46cd518fd832";
-      sha256 = "1jbb03bygjzzs6wyxp6cp057kyiyv80schwlhgi366nizp52hd56";
+      rev = "abf039439f66c1ce78017f560b490612552f6472";
+      sha256 = "16013ac7jv72mdiv84vhk4av1vb5q8xq3fhv253fz2a17h9ld78q";
     };
   }
   {
@@ -127,6 +127,15 @@
     };
   }
   {
+    goPackagePath = "github.com/dgrijalva/jwt-go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/dgrijalva/jwt-go";
+      rev = "dbeaa9332f19a944acb5736b4456cfcc02140e29";
+      sha256 = "0zk6l6kzsjdijfn7c4h0aywdjx5j2hjwi67vy1k6wr46hc8ks2hs";
+    };
+  }
+  {
     goPackagePath = "github.com/docker/docker";
     fetch = {
       type = "git";
@@ -275,8 +284,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/jackc/pgx";
-      rev = "b84338d7d62598f75859b2b146d830b22f1b9ec8";
-      sha256 = "13q763a31yya8ij6m5zbnri7wc88hjwwn1rw4v7dmwbwsrqn885c";
+      rev = "63f58fd32edb5684b9e9f4cfaac847c6b42b3917";
+      sha256 = "1n9cbdwzpagnrisxwq0frqdnkmyfg2qlxsr890527d32633hp0h2";
     };
   }
   {
@@ -325,6 +334,24 @@
     };
   }
   {
+    goPackagePath = "github.com/mitchellh/mapstructure";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mitchellh/mapstructure";
+      rev = "d0303fe809921458f417bcf828397a65db30a7e4";
+      sha256 = "1fjwi5ghc1ibyx93apz31n4hj6gcq1hzismpdfbg2qxwshyg0ya8";
+    };
+  }
+  {
+    goPackagePath = "github.com/multiplay/go-ts3";
+    fetch = {
+      type = "git";
+      url = "https://github.com/multiplay/go-ts3";
+      rev = "07477f49b8dfa3ada231afc7b7b17617d42afe8e";
+      sha256 = "1z2cfqhm6g48vzscargw6vl9idfppdcm3wq1xfwy73l1s77q4n9n";
+    };
+  }
+  {
     goPackagePath = "github.com/naoina/go-stringutil";
     fetch = {
       type = "git";
@@ -365,8 +392,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/nsqio/go-nsq";
-      rev = "a53d495e81424aaf7a7665a9d32a97715c40e953";
-      sha256 = "04npqz6ajr4r2w5jfvfzppr307qrwr57w4c1ppq9p9ddf7hx3wpz";
+      rev = "eee57a3ac4174c55924125bb15eeeda8cffb6e6f";
+      sha256 = "194wdmgsc0qhdjx95ka7blly58r9bj2vc0bgls7jawzszfpsbx8x";
     };
   }
   {
@@ -482,8 +509,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/shirou/gopsutil";
-      rev = "48fc5612898a1213aa5d6a0fb2d4f7b968e898fb";
-      sha256 = "14mwpxd2v3y4mr0g37g99vhy9jkaaaw29d3j7427rpv568vyb8sd";
+      rev = "384a55110aa5ae052eb93ea94940548c1e305a99";
+      sha256 = "00idmnsmalxhm1y60lhm9vyck1ay7gbp0r35fgs8bbiwq351bs23";
     };
   }
   {
diff --git a/pkgs/servers/monitoring/uchiwa/bower-packages.nix b/pkgs/servers/monitoring/uchiwa/bower-packages.nix
index db23987d4aa..618c3a33cd7 100644
--- a/pkgs/servers/monitoring/uchiwa/bower-packages.nix
+++ b/pkgs/servers/monitoring/uchiwa/bower-packages.nix
@@ -1,15 +1,15 @@
 # Generated by bower2nix v3.2.0 (https://github.com/rvl/bower2nix)
 { fetchbower, buildEnv }:
 buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
-  (fetchbower "uchiwa-web" "0.26.3" "0.26.3" "1qc69jk3730skdg2vdqncjwg15vywb1a9f8jqk6kwggmkwdklr0p")
-  (fetchbower "angular" "1.6.6" "~1.6.3" "1hc71mpipbdz6ban4zkagdhmn3rw28ksjkr6nwmbzfcpk59gnzkb")
+  (fetchbower "uchiwa-web" "1.1.2" "1.1.2" "174flmnqjm0avpvi71ii5cvas2wkgz42is38r7n4zyrhagzlj66k")
+  (fetchbower "angular" "1.6.8" "~1.6.3" "07bwbahxaz5myjj7sqv7k211avs23a9j7msl373h1qvp05fblajf")
   (fetchbower "angular-bootstrap" "2.2.0" "~2.2.0" "11r2nlwp6xrim2y6lnrr8v064mx3bmlxchqpg1i803v9zxz3q53d")
-  (fetchbower "angular-cookies" "1.6.6" "~1.6.3" "0qfk0az32fmrn71ywjl63k7hgan0f0bb4d7fx7q5ch2kd75rzkfm")
+  (fetchbower "angular-cookies" "1.6.8" "~1.6.3" "0p3skdg2pmzgwm9a0gyl1vhq4lcwyrymmii7lxlrmypjhwm83il6")
   (fetchbower "angular-gravatar" "0.4.2" "~0.4.2" "14jrzvjwx64awh9z95054manp8qd57fvinqhmakipz5x12i7qrwi")
   (fetchbower "angular-moment" "1.0.1" "~1.0.1" "0zkn52s9l15d6b5zfx52g5jpib23rpb637m0p1hzc429w5bbl0rj")
-  (fetchbower "angular-resource" "1.6.6" "~1.6.3" "1fxd188qa16zbidr4kbwnw7gqcc0bjpvpa7xcmv22nbfk5akjz5b")
-  (fetchbower "angular-route" "1.6.6" "~1.6.3" "05saq9lb7xqhr1f4k2hdc2qlq0nacbgr36qsv7izvvmgh6irn1iq")
-  (fetchbower "angular-sanitize" "1.6.6" "~1.6.3" "1cikmvq456pvxdmrqw0dp04y3ar9n0nxrgv583m7cy6z228sx1hl")
+  (fetchbower "angular-resource" "1.6.8" "~1.6.3" "0pnv12c61i8giwj0fmzf38f3x6ckf24g6izrak9y7zy28nlb3y5q")
+  (fetchbower "angular-route" "1.6.8" "~1.6.3" "0k8sy5dkn589w8ykn65fhrcrfi7wkn7gagwwl5j5zgzj4m91wlar")
+  (fetchbower "angular-sanitize" "1.6.8" "~1.6.3" "0q7hy5iyjlf745yisphwa5b8rvkhc43zwwmiwfkqcdcbf3w6564l")
   (fetchbower "angular-toastr" "1.6.0" "1.6.0" "1szigf1m28bgpfyg8hbm5rffr5zi7wr9n73nc1fqhk0yqh7gzysh")
   (fetchbower "angular-tools/ng-jsoneditor" "ea138469f157d8f2b54ec5b8dcf4b08a55b61459" "ea138469f157d8f2b54ec5b8dcf4b08a55b61459" "1j3vysr01niabc9fxcpixhcq1lyx2fr4q4wpmxhmiqki431h9hq8")
   (fetchbower "angular-ua-parser" "0.0.2" "0.0.2" "0gb0vmwksnydlm6hklfq1n4ak2967wcmnx3cx9cgiv7v7vk3w2m9")
@@ -21,5 +21,5 @@ buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
   (fetchbower "moment-picker" "0.9.11" "~0.9.7" "0p2g6rp2kcixydrga9lfihg4bxb598rvpi8n8l59mp549diy7vsb")
   (fetchbower "ua-parser-js" "0.7.17" "~0.7.12" "1dx46rm9han9fj409rjxrlnrk9zxmaqbnn62ljnh32ihngd4yxh0")
   (fetchbower "jsoneditor" "5.5.11" "~5.5.10" "1gfsf8jqnd3hb3r9s9246mg40iqxk2ix8k4bjnrsbfmg6cd3xw6x")
-  (fetchbower "jquery" "3.2.1" ">= 1.9.0" "03vn0kq07yxl3i5shc6b0mjck1vdbz1x0jspd3wwb169mvlsxxn3")
+  (fetchbower "jquery" "3.3.1" ">= 1.9.0" "1l891s3vgnpi1g8ksplid9jvrvnnv6lci8vraix4ssy50i264rkx")
 ]; }
diff --git a/pkgs/servers/monitoring/uchiwa/src.nix b/pkgs/servers/monitoring/uchiwa/src.nix
index 924a92a2785..3e0ead7b495 100644
--- a/pkgs/servers/monitoring/uchiwa/src.nix
+++ b/pkgs/servers/monitoring/uchiwa/src.nix
@@ -1,4 +1,4 @@
 {
-  version = "0.26.3-1";
-  sha256  = "13gklnrzhcj7s7j1ga5pa7ijwav0w9a96lqh4m7858mmm92v0bsk";
+    version = "1.1.2-1";
+    sha256  = "0fmzpjwmv7fkl0ihy2gzcgfd384k3wnifg42gzap770d6kl6yj1c";
 }
diff --git a/pkgs/servers/monitoring/uchiwa/update.sh b/pkgs/servers/monitoring/uchiwa/update.sh
new file mode 100755
index 00000000000..10da7f8adbf
--- /dev/null
+++ b/pkgs/servers/monitoring/uchiwa/update.sh
@@ -0,0 +1,42 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl.bin git.out nix jq.out nodePackages.bower2nix
+
+set -euo pipefail
+IFS=$'\n\t'
+
+# set -x
+
+REPO=sensu/uchiwa
+VERSION=0.0.1
+SHA="1111111111111111111111111111111111111111111111111111"
+DIR=$(pwd)
+
+write_src() {
+  cat <<_EOF > $DIR/src.nix
+{
+    version = "${VERSION}";
+    sha256  = "${SHA}";
+}
+_EOF
+}
+
+LATEST_VERSION=$(curl https://api.github.com/repos/${REPO}/tags -s | jq '.[0]' -r | jq .name -r)
+echo "Latest version: ${LATEST_VERSION}"
+
+VERSION=${1:-${LATEST_VERSION}}
+echo "Updating to: ${VERSION}"
+
+TOP=$(git rev-parse --show-toplevel)
+
+cd $(dirname $0)
+
+write_src
+pushd $TOP >/dev/null
+SHA=$(nix-prefetch-url -A uchiwa.src)
+popd >/dev/null
+write_src
+
+curl https://raw.githubusercontent.com/${REPO}/${VERSION}/bower.json -s > bower.json
+rm -f bower-packages.nix
+bower2nix bower.json $DIR/bower-packages.nix
+rm -f bower.json
diff --git a/pkgs/servers/monitoring/zabbix/2.0.nix b/pkgs/servers/monitoring/zabbix/2.0.nix
index afc6f4e3159..da2d1388c46 100644
--- a/pkgs/servers/monitoring/zabbix/2.0.nix
+++ b/pkgs/servers/monitoring/zabbix/2.0.nix
@@ -5,12 +5,12 @@ assert enableJabber -> minmay != null;
 
 let
 
-  version = "2.0.11";
+  version = "2.0.21";
   branch = "2.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/zabbix/zabbix-${version}.tar.gz";
-    sha256 = "1vqxlqwhnz02wrca08vrqbq8k19qp84hbdplmqk7d9699njim46i";
+    sha256 = "14g22x2zy5xqnh2xg23xy5gjd49d1i8pks7pkidwdwa9acwgfx71";
   };
 
   preConfigure =
diff --git a/pkgs/servers/monitoring/zabbix/2.2.nix b/pkgs/servers/monitoring/zabbix/2.2.nix
index e951d3706e9..1cc604f6491 100644
--- a/pkgs/servers/monitoring/zabbix/2.2.nix
+++ b/pkgs/servers/monitoring/zabbix/2.2.nix
@@ -10,12 +10,12 @@ assert enableJabber -> minmay != null;
 
 let
 
-  version = "2.2.16";
+  version = "2.2.20";
   branch = "2.2";
 
   src = fetchurl {
     url = "mirror://sourceforge/zabbix/zabbix-${version}.tar.gz";
-    sha256 = "0hc0y3p8p6pxri7w3n311ry3m5hb440kgwwkiqlihbhsq73xiz1w";
+    sha256 = "00pfpyj3vydwx9dn0bklh1p5j0bp2awi4hvv4kgliyav8l0416hk";
   };
 
   preConfigure =
diff --git a/pkgs/servers/monitoring/zabbix/default.nix b/pkgs/servers/monitoring/zabbix/default.nix
index cd541f82d23..be52698ed83 100644
--- a/pkgs/servers/monitoring/zabbix/default.nix
+++ b/pkgs/servers/monitoring/zabbix/default.nix
@@ -44,7 +44,7 @@ in
 
     meta = {
       description = "An enterprise-class open source distributed monitoring solution";
-      homepage = http://www.zabbix.com/;
+      homepage = https://www.zabbix.com/;
       license = "GPL";
       maintainers = [ stdenv.lib.maintainers.eelco ];
       platforms = stdenv.lib.platforms.linux;
@@ -60,7 +60,7 @@ in
 
     meta = with stdenv.lib; {
       description = "An enterprise-class open source distributed monitoring solution (client-side agent)";
-      homepage = http://www.zabbix.com/;
+      homepage = https://www.zabbix.com/;
       license = licenses.gpl2;
       maintainers = [ maintainers.eelco ];
       platforms = platforms.linux;
diff --git a/pkgs/servers/mpd/clientlib.nix b/pkgs/servers/mpd/clientlib.nix
index d9adc0f3102..478d4372267 100644
--- a/pkgs/servers/mpd/clientlib.nix
+++ b/pkgs/servers/mpd/clientlib.nix
@@ -1,23 +1,24 @@
-{ stdenv, fetchFromGitHub, meson, ninja }:
+{ stdenv, fetchFromGitHub, meson, ninja, fixDarwinDylibNames }:
 
 stdenv.mkDerivation rec {
-  version = "2.13";
+  version = "2.14";
   name = "libmpdclient-${version}";
 
   src = fetchFromGitHub {
     owner  = "MusicPlayerDaemon";
     repo   = "libmpdclient";
     rev    = "v${version}";
-    sha256 = "1g1n6rk8kn87mbjqxxj0vi7haj8xx21xmqlzbrx2fvyp5357zvsq";
+    sha256 = "15vn9m4qcsccff5rg7jkzy5503skz6bmqqk6qc2smgvjgwn533sm";
   };
 
-  nativeBuildInputs = [ meson ninja ];
+  nativeBuildInputs = [ meson ninja ]
+  ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
 
   meta = with stdenv.lib; {
     description = "Client library for MPD (music player daemon)";
     homepage = https://www.musicpd.org/libs/libmpdclient/;
     license = licenses.gpl2;
     platforms = platforms.unix;
-    maintainers = with maintainers; [ mornfall ehmry ];
+    maintainers = with maintainers; [ ehmry ];
   };
 }
diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix
index a323cd4802c..fde66a71e2e 100644
--- a/pkgs/servers/mpd/default.nix
+++ b/pkgs/servers/mpd/default.nix
@@ -34,7 +34,7 @@ let
   opt = stdenv.lib.optional;
   mkFlag = c: f: if c then "--enable-${f}" else "--disable-${f}";
   major = "0.20";
-  minor = "10";
+  minor = "18";
 
 in stdenv.mkDerivation rec {
   name = "mpd-${version}";
@@ -44,7 +44,7 @@ in stdenv.mkDerivation rec {
     owner  = "MusicPlayerDaemon";
     repo   = "MPD";
     rev    = "v${version}";
-    sha256 = "0i170kfn68x683fsm5rba0zbpjfr1r7s6a8nvdbva2yl0aizfzhs";
+    sha256 = "020vdn94fwjbldnkgr2h3dk9sm6f5k59qic568mw88yi7cr3mjsh";
   };
 
   patches = [ ./x86.patch ];
diff --git a/pkgs/servers/mqtt/mosquitto/default.nix b/pkgs/servers/mqtt/mosquitto/default.nix
index c157064fcb2..bce69370d2b 100644
--- a/pkgs/servers/mqtt/mosquitto/default.nix
+++ b/pkgs/servers/mqtt/mosquitto/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "mosquitto";
-  version = "1.4.14";
+  version = "1.4.15";
 
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "http://mosquitto.org/files/source/mosquitto-${version}.tar.gz";
-    sha256 = "1la2577h7hcyj7lq26vizj0sh2zmi9m7nbxjp3aalayi66kiysqm";
+    sha256 = "10wsm1n4y61nz45zwk4zjhvrfd86r2cq33370m5wjkivb8j3wfvx";
   };
 
   buildInputs = [ openssl libuuid libwebsockets c-ares libuv ]
diff --git a/pkgs/servers/neard/default.nix b/pkgs/servers/neard/default.nix
index 3a1e91b26eb..de317ada6e4 100644
--- a/pkgs/servers/neard/default.nix
+++ b/pkgs/servers/neard/default.nix
@@ -1,11 +1,11 @@
-{ stdenv, fetchgit, autoreconfHook, pkgconfig, systemd, glib, dbus, libnl, pythonPackages }:
+{ stdenv, fetchurl, autoreconfHook, pkgconfig, systemd, glib, dbus, libnl, pythonPackages }:
 
 stdenv.mkDerivation rec {
-  name = "neard-0.15-post-git-20510929";
+  name = "neard-0.16";
 
-  src = fetchgit {
-    url    = "https://git.kernel.org/pub/scm/network/nfc/neard.git";
-    sha256 = "07dny1l8n46v0yn30zqa8bkyj8ay01xphc124nhf2sqwbff7nf2m";
+  src = fetchurl {
+    url = "https://git.kernel.org/pub/scm/network/nfc/neard.git/snapshot/${name}.tar.gz";
+    sha256 = "0bpdmyxvd3z54p95apz4bjb5jp8hbc04sicjapcryjwa8mh6pbil";
   };
 
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
diff --git a/pkgs/servers/nextcloud/default.nix b/pkgs/servers/nextcloud/default.nix
index ec4e78a54ec..e6baf9e64d8 100644
--- a/pkgs/servers/nextcloud/default.nix
+++ b/pkgs/servers/nextcloud/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name= "nextcloud-${version}";
-  version = "12.0.3";
+  version = "13.0.1";
 
   src = fetchurl {
     url = "https://download.nextcloud.com/server/releases/${name}.tar.bz2";
-    sha256 = "0wgvvpk7h7psy41a32f0ljh6iasjsqbf4pxi8nhybl46m35srg48";
+    sha256 = "048x3x6d11m75ghxjcjzm8amjm6ljirv6djbl53awwp9f5532hsp";
   };
 
   installPhase = ''
diff --git a/pkgs/servers/nextcloud/news-updater.nix b/pkgs/servers/nextcloud/news-updater.nix
index a78b3d59095..0fcb5047549 100644
--- a/pkgs/servers/nextcloud/news-updater.nix
+++ b/pkgs/servers/nextcloud/news-updater.nix
@@ -2,11 +2,11 @@
 
 python3Packages.buildPythonApplication rec {
   name = "nextcloud-news-updater-${version}";
-  version = "10.0.0";
+  version = "10.0.1";
 
   src = fetchurl {
     url = "mirror://pypi/n/nextcloud_news_updater/nextcloud_news_updater-${version}.tar.gz";
-    sha256 = "00pscz0p4s10y1ymb6sm0gx4a5wdbhimn30582x8i28n58nnl8j0";
+    sha256 = "14jj3w417wfsm1ki34d980b0s6vfn8i29g4c66qb2fizdq1d0z6q";
   };
 
   doCheck = false;
diff --git a/pkgs/servers/nosql/apache-jena/fuseki-binary.nix b/pkgs/servers/nosql/apache-jena/fuseki-binary.nix
index 6b15c165dfd..bd291356b43 100644
--- a/pkgs/servers/nosql/apache-jena/fuseki-binary.nix
+++ b/pkgs/servers/nosql/apache-jena/fuseki-binary.nix
@@ -3,10 +3,10 @@ let
   s = # Generated upstream information
   rec {
     baseName="apache-jena-fuseki";
-    version = "3.5.0";
+    version = "3.7.0";
     name="${baseName}-${version}";
     url="http://archive.apache.org/dist/jena/binaries/apache-jena-fuseki-${version}.tar.gz";
-    sha256 = "0pdq103vqpkbwi84yyigw4dy60ch7xzazaj3gfcbipg73v81wpvp";
+    sha256 = "1824rvdrs9yhjinac2vkvkxvns8bfdvy91k5ghzzk0nrdcj31pmr";
   };
   buildInputs = [
     makeWrapper
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
     for i in "$out"/bin/*; do
       wrapProgram "$i" \
         --prefix "PATH" : "${java}/bin/" \
-        --set "FUSEKI_HOME" '"''${FUSEKI_HOME:-'"$out"'}"' \
+        --set-default "FUSEKI_HOME" "$out" \
         ;
     done
   '';
diff --git a/pkgs/servers/nosql/arangodb/default.nix b/pkgs/servers/nosql/arangodb/default.nix
index 786b142c732..d460284ef04 100644
--- a/pkgs/servers/nosql/arangodb/default.nix
+++ b/pkgs/servers/nosql/arangodb/default.nix
@@ -3,14 +3,14 @@
 
 let
 in stdenv.mkDerivation rec {
-  version = "3.2.3";
+  version = "3.3.7";
   name    = "arangodb-${version}";
 
   src = fetchFromGitHub {
     repo = "arangodb";
     owner = "arangodb";
     rev = "v${version}";
-    sha256 = "1ndd7wxw2lz1ywnz3kp0pz1jmby2jakhl00kn8jwghcbipvnx9b5";
+    sha256 = "1464nl2ampfkcd2kh1hmc18hh8ya73mjmxizm6wgl5yvkh56a82x";
   };
 
   buildInputs = [
diff --git a/pkgs/servers/nosql/cassandra/2.1.nix b/pkgs/servers/nosql/cassandra/2.1.nix
index 3514ae84350..fd3b2d3aa28 100644
--- a/pkgs/servers/nosql/cassandra/2.1.nix
+++ b/pkgs/servers/nosql/cassandra/2.1.nix
@@ -1,6 +1,6 @@
 { callPackage, ... } @ args:
 
 callPackage ./generic.nix (args // {
-  version = "2.1.15";
-  sha256 = "1yc6r4gmxz9c4zghzn6bz5wswz7dz61w7p4x9s5gqnixfp2mlapp";
+  version = "2.1.19";
+  sha256 = "1qlc62j3hf5831yrrbydn3z19zrn6bpirarinys6bmhshr7mhpyr";
 })
diff --git a/pkgs/servers/nosql/cassandra/2.2.nix b/pkgs/servers/nosql/cassandra/2.2.nix
index b467fcfdff5..3d276128c00 100644
--- a/pkgs/servers/nosql/cassandra/2.2.nix
+++ b/pkgs/servers/nosql/cassandra/2.2.nix
@@ -1,6 +1,6 @@
 { callPackage, ... } @ args:
 
 callPackage ./generic.nix (args // {
-  version = "2.2.9";
-  sha256 = "1wc2l8l7i43r0yc6qqi3wj4pm0969kjkh2pgx80wglzxm7275hv5";
+  version = "2.2.11";
+  sha256 = "0r39mm5ibdn9dqv11n4x33vcb5247r6fl6r07l6frqp6i36ilvl6";
 })
diff --git a/pkgs/servers/nosql/cassandra/3.0.nix b/pkgs/servers/nosql/cassandra/3.0.nix
index 04348568baf..b6621ec9548 100644
--- a/pkgs/servers/nosql/cassandra/3.0.nix
+++ b/pkgs/servers/nosql/cassandra/3.0.nix
@@ -1,6 +1,6 @@
 { callPackage, ... } @ args:
 
 callPackage ./generic.nix (args // {
-  version = "3.0.9";
-  sha256 = "16jdh20cr4h47ldjqlnp2cdnb9zshqvnll6995s2a75d8m030c0g";
+  version = "3.0.15";
+  sha256 = "1n92wpp5gm41r4agjwjw9ymnnn114pmaqf04c1dx3fksk100wd5g";
 })
diff --git a/pkgs/servers/nosql/cassandra/3.11.nix b/pkgs/servers/nosql/cassandra/3.11.nix
new file mode 100644
index 00000000000..4647260b1e2
--- /dev/null
+++ b/pkgs/servers/nosql/cassandra/3.11.nix
@@ -0,0 +1,6 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // {
+  version = "3.11.1";
+  sha256 = "1vgh4ysnl4xg8g5v6zm78h3sq308r7s17ppbw0ck4bwyfnbddvkg";
+})
diff --git a/pkgs/servers/nosql/cassandra/generic.nix b/pkgs/servers/nosql/cassandra/generic.nix
index f5f29bcdac7..48875b093a8 100644
--- a/pkgs/servers/nosql/cassandra/generic.nix
+++ b/pkgs/servers/nosql/cassandra/generic.nix
@@ -10,7 +10,8 @@ let
     gawk
     which
     jre
-  ] ++ stdenv.lib.optional stdenv.isLinux procps);
+    procps
+  ]);
 in
 
 stdenv.mkDerivation rec {
@@ -65,6 +66,6 @@ stdenv.mkDerivation rec {
     description = "A massively scalable open source NoSQL database";
     platforms = platforms.unix;
     license = licenses.asl20;
-    maintainers = with maintainers; [ nckx cransom ];
+    maintainers = with maintainers; [ cransom ];
   };
 }
diff --git a/pkgs/servers/nosql/eventstore/default.nix b/pkgs/servers/nosql/eventstore/default.nix
index e6bf634b554..3ec00dfa16e 100644
--- a/pkgs/servers/nosql/eventstore/default.nix
+++ b/pkgs/servers/nosql/eventstore/default.nix
@@ -5,12 +5,12 @@
 
 stdenv.mkDerivation rec {
   name = "EventStore-${version}";
-  version = "4.0.3";
+  version = "4.1.0";
   src = fetchFromGitHub {
     owner  = "EventStore";
     repo   = "EventStore";
     rev    = "oss-v${version}";
-    sha256 = "1905bnqyyiqprva67cp49rgib324iipw2l71jzj0ynzi7kxr4mgg";
+    sha256 = "0mvjz327kfg157fwvy8xkkf5h0g3v373pfwr70cslsy96n45jp10";
   };
 
   buildPhase = ''
diff --git a/pkgs/servers/nosql/influxdb/default.nix b/pkgs/servers/nosql/influxdb/default.nix
index 5043c36f8c2..972bd53d95e 100644
--- a/pkgs/servers/nosql/influxdb/default.nix
+++ b/pkgs/servers/nosql/influxdb/default.nix
@@ -11,6 +11,10 @@ buildGoPackage rec {
     sha256 = "048ap70hdfkxhy0y8q1jsb0lql1i99jnf3cqaqar6qs2ynzsw9hd";
   };
 
+  buildFlagsArray = [ ''-ldflags=
+    -X main.version=${version}
+  '' ];
+
   goPackagePath = "github.com/influxdata/influxdb";
 
   excludedPackages = "test";
diff --git a/pkgs/servers/nosql/mongodb/default.nix b/pkgs/servers/nosql/mongodb/default.nix
index 969cd183c5c..b9e850e8dfd 100644
--- a/pkgs/servers/nosql/mongodb/default.nix
+++ b/pkgs/servers/nosql/mongodb/default.nix
@@ -7,7 +7,7 @@
 
 with stdenv.lib;
 
-let version = "3.4.2";
+let version = "3.4.10";
     system-libraries = [
       "pcre"
       #"asio" -- XXX use package?
@@ -44,7 +44,7 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://fastdl.mongodb.org/src/mongodb-src-r${version}.tar.gz";
-    sha256 = "0n8vspccrpd2z9xk3yjpz4gprd730dfacw914ksjzz9iadn0zdi9";
+    sha256 = "1wz2mhl9z0b1bdkg6m8v8mvw9k60mdv5ybq554xn3yjj9z500f24";
   };
 
   nativeBuildInputs = [ scons ];
@@ -61,12 +61,6 @@ in stdenv.mkDerivation rec {
         name = "boost160.patch";
         sha256 = "0bvsf3499zj55pzamwjmsssr6x63w434944w76273fr5rxwzcmh8";
       })
-      # probably not needed for > 3.4.10
-      (fetchpatch {
-        url = https://github.com/mongodb/mongo/commit/218a7b1d4ea3d3b.diff;
-        name = "pcre-8.41.patch";
-        sha256 = "1dra51gw130bq78l2yfkdaj0jkha95ikpv4ig21rapbl63ip3znj";
-      })
     ];
 
   postPatch = ''
diff --git a/pkgs/servers/nosql/neo4j/default.nix b/pkgs/servers/nosql/neo4j/default.nix
index c907f081e22..bc67e7eaf43 100644
--- a/pkgs/servers/nosql/neo4j/default.nix
+++ b/pkgs/servers/nosql/neo4j/default.nix
@@ -4,11 +4,11 @@ with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "neo4j-${version}";
-  version = "3.1.2";
+  version = "3.3.4";
 
   src = fetchurl {
     url = "http://dist.neo4j.org/neo4j-community-${version}-unix.tar.gz";
-    sha256 = "0kvbsm9mjwqyl3q2myif28a0f11i4rfq3hik07w9cdnrwyd75s40";
+    sha256 = "072pk0x1iyg6kasjah8qpki2z462qp0rvgn93y6ngi6zvrpdlbyc";
   };
 
   buildInputs = [ makeWrapper jre8 which gawk ];
diff --git a/pkgs/servers/nosql/redis/default.nix b/pkgs/servers/nosql/redis/default.nix
index 9ef0987d9b9..07489b62728 100644
--- a/pkgs/servers/nosql/redis/default.nix
+++ b/pkgs/servers/nosql/redis/default.nix
@@ -1,22 +1,14 @@
-{ stdenv, fetchurl, fetchpatch, lua }:
+{ stdenv, fetchurl, lua }:
 
 stdenv.mkDerivation rec {
-  version = "4.0.2";
+  version = "4.0.9";
   name = "redis-${version}";
 
   src = fetchurl {
     url = "http://download.redis.io/releases/${name}.tar.gz";
-    sha256 = "04s8cgvwjj1979s3hg8zkwc9pyn3jkjpz5zidp87kfcipifr385i";
+    sha256 = "0465bv6yxnwmas3wzg07vmrprv2pxhnr56hn5pxrybwf66y76kyz";
   };
 
-  patches = [
-    (fetchpatch {
-      name = "CVE-2017-15047.patch";
-      url = https://github.com/antirez/redis/commit/ffcf7d5ab1e98d84c28af9bea7be76c6737820ad.patch;
-      sha256 = "0cgx3lm0n7jxhsly8v9hdvy6vlamj3ck2jsid4fwyapz6907h64l";
-    })
-  ];
-
   buildInputs = [ lua ];
   makeFlags = "PREFIX=$(out)";
 
diff --git a/pkgs/servers/nosql/riak-cs/2.1.1.nix b/pkgs/servers/nosql/riak-cs/2.1.1.nix
index a0df98faf36..4d0bb6c687d 100644
--- a/pkgs/servers/nosql/riak-cs/2.1.1.nix
+++ b/pkgs/servers/nosql/riak-cs/2.1.1.nix
@@ -64,6 +64,6 @@ stdenv.mkDerivation rec {
     description = "Dynamo inspired NoSQL DB by Basho with S3 compatibility";
     platforms   = [ "x86_64-linux" "x86_64-darwin" ];
     license     = licenses.asl20;
-    maintainer  = with maintainers; [ mdaiter ];
+    maintainers = with maintainers; [ mdaiter ];
   };
 }
diff --git a/pkgs/servers/oauth2_proxy/default.nix b/pkgs/servers/oauth2_proxy/default.nix
index b58fc342ded..d9919005e39 100644
--- a/pkgs/servers/oauth2_proxy/default.nix
+++ b/pkgs/servers/oauth2_proxy/default.nix
@@ -1,17 +1,25 @@
-{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
+{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
 
 buildGoPackage rec {
   name = "oauth2_proxy-${version}";
-  version = "20160120-${stdenv.lib.strings.substring 0 7 rev}";
-  rev = "10f47e325b782a60b8689653fa45360dee7fbf34";
+  version = "20180325-${stdenv.lib.strings.substring 0 7 rev}";
+  rev = "a94b0a8b25e553f7333f7b84aeb89d9d18ec259b";
   
   goPackagePath = "github.com/bitly/oauth2_proxy";
 
-  src = fetchgit {
+  src = fetchFromGitHub {
     inherit rev;
-    url = "https://github.com/bitly/oauth2_proxy";
-    sha256 = "13f6kaq15f6ial9gqzrsx7i94jhd5j70js2k93qwxcw1vkh1b6si";
+    repo = "oauth2_proxy";
+    owner = "bitly";
+    sha256 = "07m258s9fxjsgixggw0d1zicd7l6l2rkm5mh3zdjdaj20sqcj217";
   };
 
   goDeps = ./deps.nix;
+
+  meta = with lib; {
+    description = "A reverse proxy that provides authentication with Google, Github or other provider";
+    homepage = https://github.com/bitly/oauth2_proxy/;
+    license = licenses.mit;
+    maintainers = [ maintainers.yorickvp ];
+  };
 }
diff --git a/pkgs/servers/oauth2_proxy/deps.nix b/pkgs/servers/oauth2_proxy/deps.nix
index 37ddbbde64e..435c7d12782 100644
--- a/pkgs/servers/oauth2_proxy/deps.nix
+++ b/pkgs/servers/oauth2_proxy/deps.nix
@@ -1,20 +1,21 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
 [
   {
-    goPackagePath = "gopkg.in/fsnotify.v1";
+    goPackagePath = "cloud.google.com/go";
     fetch = {
       type = "git";
-      url = "https://gopkg.in/fsnotify.v1";
-      rev = "96c060f6a6b7e0d6f75fddd10efeaca3e5d1bcb0";
-      sha256 = "1308z1by82fbymcra26wjzw7lpjy91kbpp2skmwqcq4q1iwwzvk2";
+      url = "https://code.googlesource.com/gocloud";
+      rev = "d27f27d9b3cf75c9901d9981f9af50bbfd9002da";
+      sha256 = "18vdhkymm4cqh5fjyz0ia0bc2mpmarjk6w6zh9ydm2d4nkj36cm5";
     };
   }
   {
-    goPackagePath = "golang.org/x/net";
+    goPackagePath = "github.com/BurntSushi/toml";
     fetch = {
       type = "git";
-      url = "https://go.googlesource.com/net";
-      rev = "62ac18b461605b4be188bbc7300e9aa2bc836cd4";
-      sha256 = "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p";
+      url = "https://github.com/BurntSushi/toml";
+      rev = "a368813c5e648fee92e5f6c30e3944ff9d5e8895";
+      sha256 = "1sjxs2lwc8jpln80s4rlzp7nprbcljhy5mz4rf9995gq93wqnym5";
     };
   }
   {
@@ -22,17 +23,26 @@
     fetch = {
       type = "git";
       url = "https://github.com/bitly/go-simplejson";
-      rev = "18db6e68d8fd9cbf2e8ebe4c81a78b96fd9bf05a";
-      sha256 = "0lj9cxyncchlw6p35j0yym5q5waiz0giw6ri41qdwm8y3dghwwiy";
+      rev = "0c965951289cce37dec52ad1f34200fefc816777";
+      sha256 = "0ys37wshd430dizzbg39x5mw55daih2q4qj5l9gr3qbmq9qdn0f3";
     };
   }
   {
-    goPackagePath = "github.com/BurntSushi/toml";
+    goPackagePath = "github.com/coreos/go-oidc";
     fetch = {
       type = "git";
-      url = "https://github.com/BurntSushi/toml";
-      rev = "056c9bc7be7190eaa7715723883caffa5f8fa3e4";
-      sha256 = "0gkgkw04ndr5y7hrdy0r4v2drs5srwfcw2bs1gyas066hwl84xyw";
+      url = "https://github.com/coreos/go-oidc";
+      rev = "065b426bd41667456c1a924468f507673629c46b";
+      sha256 = "10xhrh70rccgydi708dc9xl4ivmjnzhh1skd1ij6xl1i3x8lk3g6";
+    };
+  }
+  {
+    goPackagePath = "github.com/mbland/hmacauth";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mbland/hmacauth";
+      rev = "44256dfd4bfa7594cfa73587a464ca890e85971a";
+      sha256 = "1d5pbjgc5j8pi3frsjp5gqg7j12bxdbl55nhy01cv4c96hay2ij1";
     };
   }
   {
@@ -40,26 +50,35 @@
     fetch = {
       type = "git";
       url = "https://github.com/mreiferson/go-options";
-      rev = "7c174072188d0cfbe6f01bb457626abb22bdff52";
-      sha256 = "0ksyi2cb4k6r2fxamljg42qbz5hdcb9kv5i7y6cx4ajjy0xznwgm";
+      rev = "77551d20752b54535462404ad9d877ebdb26e53d";
+      sha256 = "02c18zrx038gbas58l90xzsz9m5q3gpjprdcwmnvxsn0zvld0vpj";
     };
   }
   {
-    goPackagePath = "google.golang.org/api";
+    goPackagePath = "github.com/pquerna/cachecontrol";
     fetch = {
       type = "git";
-      url = "https://code.googlesource.com/google-api-go-client";
-      rev = "a5c3e2a4792aff40e59840d9ecdff0542a202a80";
-      sha256 = "1kigddnbyrl9ddpj5rs8njvf1ck54ipi4q1282k0d6b3am5qfbj8";
+      url = "https://github.com/pquerna/cachecontrol";
+      rev = "525d0eb5f91d30e3b1548de401b7ef9ea6898520";
+      sha256 = "13r6qz9pghy9fapps5h9mhblggnjq2nfxysvf2jp4scanc5vw2y3";
     };
   }
   {
-    goPackagePath = "google.golang.org/cloud";
+    goPackagePath = "golang.org/x/crypto";
     fetch = {
       type = "git";
-      url = "https://code.googlesource.com/gocloud";
-      rev = "6335269abf9002cf5a84613c13cda6010842b834";
-      sha256 = "15xrqxna5ms0r634k3bfzyymn431dvqcjwbsap8ay60x371kzbwf";
+      url = "https://go.googlesource.com/crypto";
+      rev = "88942b9c40a4c9d203b82b3731787b672d6e809b";
+      sha256 = "0jw1faq8krcxwf1fv3w75apk1ncnykwg8y5ahs5rasjmspvkv8cw";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/net";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/net";
+      rev = "6078986fec03a1dcc236c34816c71b0e05018fda";
+      sha256 = "0qbl17mzpq7anwyzy6hdvxqk7f6q2xlm6f9dknkwlszfd4id2fwb";
     };
   }
   {
@@ -67,17 +86,44 @@
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/oauth2";
-      rev = "397fe7649477ff2e8ced8fc0b2696f781e53745a";
-      sha256 = "0fza0l7iwh6llkq2yzqn7dxi138vab0da64lnghfj1p71fprjzn8";
+      rev = "fdc9e635145ae97e6c2cb777c48305600cf515cb";
+      sha256 = "0pznj7pb2rjar005dvppimdynarm8smj6vnqz9wvd9fxyn0q0yww";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev = "13d03a9a82fba647c21a0ef8fba44a795d0f0835";
+      sha256 = "1lmyd4mk7lbgnxyvr6ndfdfafazp9a4cc6c0a2q2j4n53g2vwbgk";
+    };
+  }
+  {
+    goPackagePath = "google.golang.org/api";
+    fetch = {
+      type = "git";
+      url = "https://code.googlesource.com/google-api-go-client";
+      rev = "e4126357c891acdef6dcd7805daa4c6533be6544";
+      sha256 = "19c874pr7vhhiyw7zn6v625g8i70gqzi3rr645kai6pnd1w7s27n";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/fsnotify.v1";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/fsnotify/fsnotify.v1";
+      rev = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9";
+      sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g";
     };
   }
   {
-    goPackagePath = "github.com/18F/hmacauth";
+    goPackagePath = "gopkg.in/square/go-jose.v2";
     fetch = {
       type = "git";
-      url = "https://github.com/18F/hmacauth";
-      rev = "9232a6386b737d7d1e5c1c6e817aa48d5d8ee7cd";
-      sha256 = "056mcqrf2bv0g9gn2ixv19srk613h4sasl99w9375mpvmadb3pz1";
+      url = "https://gopkg.in/square/go-jose.v2";
+      rev = "552e98edab5d620205ff1a8960bf52a5a10aad03";
+      sha256 = "03w6rgxkvdv3vcfr23s6wbck431w7dwnw0jy7qnyl0qihxzn40rv";
     };
   }
 ]
diff --git a/pkgs/servers/openafs-client/default.nix b/pkgs/servers/openafs-client/default.nix
deleted file mode 100644
index d7ed2849d60..00000000000
--- a/pkgs/servers/openafs-client/default.nix
+++ /dev/null
@@ -1,59 +0,0 @@
-{ stdenv, fetchurl, fetchgit, which, autoconf, automake, flex, yacc,
-  kernel, glibc, ncurses, perl, kerberos, fetchpatch }:
-
-stdenv.mkDerivation rec {
-  name = "openafs-${version}-${kernel.version}";
-  version = "1.6.21.1";
-
-  src = fetchurl {
-    url = "http://www.openafs.org/dl/openafs/${version}/openafs-${version}-src.tar.bz2";
-    sha256 = "0nisxnfl8nllcfmi7mxj1gngkpxd4jp1wapbkhz07qwqynq9dn5f";
-  };
-
-  nativeBuildInputs = [ autoconf automake flex yacc perl which ];
-
-  buildInputs = [ ncurses ];
-
-  hardeningDisable = [ "pic" ];
-
-  patches = [
-   (fetchpatch {
-      name = "fix-stdint-include.patch";
-      url = "http://git.openafs.org/?p=openafs.git;a=patch;h=c193e5cba18273a062d4162118c7055b54f7eb5e";
-      sha256 = "1yc4gygcazwsslf6mzk1ai92as5jbsjv7212jcbb2dw83jydhc09";
-    })
-  ];
-
-  preConfigure = ''
-    ln -s "${kernel.dev}/lib/modules/"*/build $TMP/linux
-
-    patchShebangs .
-    for i in `grep -l -R '/usr/\(include\|src\)' .`; do
-      echo "Patch /usr/include and /usr/src in $i"
-      substituteInPlace $i \
-        --replace "/usr/include" "${glibc.dev}/include" \
-        --replace "/usr/src" "$TMP"
-    done
-
-    ./regen.sh
-
-    ${stdenv.lib.optionalString (kerberos != null)
-      "export KRB5_CONFIG=${kerberos}/bin/krb5-config"}
-
-    configureFlagsArray=(
-      "--with-linux-kernel-build=$TMP/linux"
-      ${stdenv.lib.optionalString (kerberos != null) "--with-krb5"}
-      "--sysconfdir=/etc/static"
-      "--disable-linux-d_splice-alias-extra-iput"
-    )
-  '';
-
-  meta = with stdenv.lib; {
-    description = "Open AFS client";
-    homepage = https://www.openafs.org;
-    license = licenses.ipl10;
-    platforms = platforms.linux;
-    maintainers = [ maintainers.z77z ];
-    broken = versionOlder kernel.version "3.18";
-  };
-}
diff --git a/pkgs/servers/openafs/default.nix b/pkgs/servers/openafs/default.nix
new file mode 100644
index 00000000000..3f92299c2a0
--- /dev/null
+++ b/pkgs/servers/openafs/default.nix
@@ -0,0 +1,89 @@
+{ stdenv, fetchurl, fetchgit, which, autoconf, automake, flex, yacc
+, glibc, perl, kerberos, libxslt, docbook_xsl, docbook_xml_dtd_43
+, ncurses # Extra ncurses utilities. Only needed for debugging.
+, tsmbac ? null # Tivoli Storage Manager Backup Client from IBM
+}:
+
+with (import ./srcs.nix { inherit fetchurl; });
+
+stdenv.mkDerivation rec {
+  name = "openafs-${version}";
+  inherit version srcs;
+
+  nativeBuildInputs = [ autoconf automake flex yacc perl which libxslt ];
+
+  buildInputs = [ ncurses ];
+
+  patches = stdenv.lib.optional (tsmbac != null) ./tsmbac.patch;
+
+  outputs = [ "out" "dev" "man" "doc" ];
+
+  preConfigure = ''
+
+    patchShebangs .
+    for i in `grep -l -R '/usr/\(include\|src\)' .`; do
+      echo "Patch /usr/include and /usr/src in $i"
+      substituteInPlace $i \
+        --replace "/usr/include" "${glibc.dev}/include" \
+        --replace "/usr/src" "$TMP"
+    done
+
+    for i in ./doc/xml/{AdminGuide,QuickStartUnix,UserGuide}/*.xml; do
+      substituteInPlace "''${i}" --replace "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
+        "${docbook_xml_dtd_43}/xml/dtd/docbook/docbookx.dtd"
+    done
+
+    ./regen.sh
+
+    ${stdenv.lib.optionalString (kerberos != null)
+      "export KRB5_CONFIG=${kerberos.dev}/bin/krb5-config"}
+
+    export AFS_SYSKVERS=26
+
+    configureFlagsArray=(
+      ${stdenv.lib.optionalString (kerberos != null) "--with-krb5"}
+      "--sysconfdir=/etc"
+      "--localstatedir=/var"
+      "--disable-kernel-module"
+      "--disable-fuse-client"
+      "--with-html-xsl=${docbook_xsl}/share/xml/docbook-xsl/html/chunk.xsl"
+      ${stdenv.lib.optionalString (tsmbac != null) "--enable-tivoli-tsm"}
+      ${stdenv.lib.optionalString (ncurses == null) "--disable-gtx"}
+      "--disable-linux-d_splice-alias-extra-iput"
+    )
+  '' + stdenv.lib.optionalString (tsmbac != null) ''
+    export XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I${tsmbac}/lib64/sample -DXBSA_TSMLIB=\\\"${tsmbac}/lib64/libApiTSM64.so\\\""
+    export XBSA_XLIBS="-ldl"
+  '';
+
+  buildFlags = [ "all_nolibafs" ];
+
+  postBuild = ''
+    for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do
+      make -C "''${d}" html
+    done
+  '';
+
+  postInstall = ''
+    mkdir -p $doc/share/doc/openafs/{AdminGuide,QuickStartUnix,UserGuide}
+    cp -r doc/{arch,examples,pdf,protocol,txt} README NEWS $doc/share/doc/openafs
+    for d in AdminGuide QuickStartUnix UserGuide ; do
+      cp "doc/xml/''${d}"/*.html "$doc/share/doc/openafs/''${d}"
+    done
+
+    rm -r $out/lib/{openafs,afs,*.a}
+    rm $out/bin/kpasswd
+    rm $out/sbin/{kas,kdb,ka-forwarder,kadb_check}
+    rm $out/libexec/openafs/kaserver
+    rm $man/share/man/man{1/kpasswd*,5/kaserver*,8/{ka*,kdb*}}
+  '';
+
+  meta = with stdenv.lib; {
+    outputsToInstall = [ "out" "doc" "man" ];
+    description = "Open AFS client";
+    homepage = https://www.openafs.org;
+    license = licenses.ipl10;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.z77z maintainers.spacefrogg ];
+  };
+}
diff --git a/pkgs/servers/openafs/module.nix b/pkgs/servers/openafs/module.nix
new file mode 100644
index 00000000000..8cd9287a777
--- /dev/null
+++ b/pkgs/servers/openafs/module.nix
@@ -0,0 +1,57 @@
+{ stdenv, fetchurl, which, autoconf, automake, flex, yacc
+, kernel, glibc, perl }:
+
+with (import ./srcs.nix { inherit fetchurl; });
+
+let
+  modDestDir = "$out/lib/modules/${kernel.modDirVersion}/extra/openafs";
+  kernelBuildDir = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
+
+in stdenv.mkDerivation rec {
+  name = "openafs-${version}-${kernel.version}";
+  inherit version src;
+
+  nativeBuildInputs = [ autoconf automake flex perl yacc which ] ++ kernel.moduleBuildDependencies;
+
+  hardeningDisable = [ "pic" ];
+
+  configureFlags = [
+    "--with-linux-kernel-build=${kernelBuildDir}"
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
+    "--disable-linux-d_splice-alias-extra-iput"
+  ];
+
+  preConfigure = ''
+    patchShebangs .
+    for i in `grep -l -R '/usr/\(include\|src\)' .`; do
+      echo "Patch /usr/include and /usr/src in $i"
+      substituteInPlace $i \
+        --replace "/usr/include" "${glibc.dev}/include" \
+        --replace "/usr/src" "${kernelBuildDir}"
+    done
+
+    ./regen.sh -q
+
+  '';
+
+  buildPhase = ''
+    make V=1 only_libafs
+  '';
+
+  installPhase = ''
+    mkdir -p ${modDestDir}
+    cp src/libafs/MODLOAD-*/libafs-${kernel.version}.* ${modDestDir}/libafs.ko
+    xz -f ${modDestDir}/libafs.ko
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Open AFS client kernel module";
+    homepage = https://www.openafs.org;
+    license = licenses.ipl10;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.z77z maintainers.spacefrogg ];
+    broken = versionOlder kernel.version "3.18";
+  };
+
+}
diff --git a/pkgs/servers/openafs/srcs.nix b/pkgs/servers/openafs/srcs.nix
new file mode 100644
index 00000000000..9e9ff623e5c
--- /dev/null
+++ b/pkgs/servers/openafs/srcs.nix
@@ -0,0 +1,14 @@
+{ fetchurl }:
+rec {
+  version = "1.6.22.2";
+  src = fetchurl {
+    url = "http://www.openafs.org/dl/openafs/${version}/openafs-${version}-src.tar.bz2";
+    sha256 = "15j17igignsfzv5jb47ryczsrz3zsmiqwnj38dx9gzz95807rkyf";
+  };
+
+  srcs = [ src
+    (fetchurl {
+      url = "http://www.openafs.org/dl/openafs/${version}/openafs-${version}-doc.tar.bz2";
+      sha256 = "1lpydca95nx5pmqvplb9n3akmxbzvhhypswh0s589ywxpv3zynxm";
+    })];
+}
diff --git a/pkgs/servers/openafs/tsmbac.patch b/pkgs/servers/openafs/tsmbac.patch
new file mode 100644
index 00000000000..412765fe8a5
--- /dev/null
+++ b/pkgs/servers/openafs/tsmbac.patch
@@ -0,0 +1,62 @@
+diff -ru3 openafs-1.6.18.1/acinclude.m4 openafs-1.6.18.1.new/acinclude.m4
+--- openafs-1.6.18.1/acinclude.m4	2016-06-21 17:13:39.000000000 +0200
++++ openafs-1.6.18.1.new/acinclude.m4	2016-11-02 18:44:30.423039662 +0100
+@@ -1373,45 +1373,7 @@
+ 
+ dnl check for tivoli
+ AC_MSG_CHECKING(for tivoli tsm butc support)
+-XBSA_CFLAGS=""
+-if test "$enable_tivoli_tsm" = "yes"; then
+-	XBSADIR1=/usr/tivoli/tsm/client/api/bin/xopen
+-	XBSADIR2=/opt/tivoli/tsm/client/api/bin/xopen
+-	XBSADIR3=/usr/tivoli/tsm/client/api/bin/sample
+-	XBSADIR4=/opt/tivoli/tsm/client/api/bin/sample
+-	XBSADIR5=/usr/tivoli/tsm/client/api/bin64/sample
+-	XBSADIR6=/opt/tivoli/tsm/client/api/bin64/sample
+-
+-	if test -r "$XBSADIR3/dsmapifp.h"; then
+-		XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR3"
+-		XBSA_XLIBS="-ldl"
+-		AC_MSG_RESULT([yes, $XBSA_CFLAGS])
+-	elif test -r "$XBSADIR4/dsmapifp.h"; then
+-		XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR4"
+-		XBSA_XLIBS="-ldl"
+-		AC_MSG_RESULT([yes, $XBSA_CFLAGS])
+-	elif test -r "$XBSADIR5/dsmapifp.h"; then
+-		XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR5"
+-		XBSA_XLIBS="-ldl"
+-		AC_MSG_RESULT([yes, $XBSA_CFLAGS])
+-	elif test -r "$XBSADIR6/dsmapifp.h"; then
+-		XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR6"
+-		XBSA_XLIBS="-ldl"
+-		AC_MSG_RESULT([yes, $XBSA_CFLAGS])
+-	elif test -r "$XBSADIR1/xbsa.h"; then
+-		XBSA_CFLAGS="-Dxbsa -I$XBSADIR1"
+-		XBSA_XLIBS=""
+-		AC_MSG_RESULT([yes, $XBSA_CFLAGS])
+-	elif test -r "$XBSADIR2/xbsa.h"; then
+-		XBSA_CFLAGS="-Dxbsa -I$XBSADIR2"
+-		XBSA_XLIBS=""
+-		AC_MSG_RESULT([yes, $XBSA_CFLAGS])
+-	else
+-		AC_MSG_RESULT([no, missing xbsa.h and dsmapifp.h header files])
+-	fi
+-else
+-	AC_MSG_RESULT([no])
+-fi
++AC_MSG_RESULT([yes])
+ AC_SUBST(XBSA_CFLAGS)
+ AC_SUBST(XBSA_XLIBS) 
+ 
+diff -ru3 openafs-1.6.18.1/src/butc/afsxbsa.c openafs-1.6.18.1.new/src/butc/afsxbsa.c
+--- openafs-1.6.18.1/src/butc/afsxbsa.c	2016-06-21 17:13:39.000000000 +0200
++++ openafs-1.6.18.1.new/src/butc/afsxbsa.c	2016-11-02 18:45:10.734662987 +0100
+@@ -651,7 +651,7 @@
+ #if defined(AFS_AIX_ENV)
+         dynlib = dlopen("/usr/lib/libApiDS.a(dsmapish.o)", RTLD_NOW | RTLD_LOCAL | RTLD_MEMBER);
+ #elif defined (AFS_AMD64_LINUX26_ENV)
+-	dynlib = dlopen("/usr/lib64/libApiTSM64.so", RTLD_NOW | RTLD_LOCAL);
++	dynlib = dlopen(XBSA_TSMLIB, RTLD_NOW | RTLD_LOCAL);
+ #elif defined(AFS_SUN5_ENV) || defined(AFS_LINUX26_ENV)
+         dynlib = dlopen("/usr/lib/libApiDS.so", RTLD_NOW | RTLD_LOCAL);
+ #else
diff --git a/pkgs/servers/openpts/bugs.patch b/pkgs/servers/openpts/bugs.patch
deleted file mode 100644
index d818bafbc9f..00000000000
--- a/pkgs/servers/openpts/bugs.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urNp openpts-0.2.6-cvs-patched/src/fsm.c openpts-0.2.6-current/src/fsm.c
---- openpts-0.2.6-cvs-patched/src/fsm.c	2012-01-05 03:49:15.000000000 -0500
-+++ openpts-0.2.6-current/src/fsm.c	2012-01-09 12:11:17.338706205 -0500
-@@ -934,7 +934,7 @@ char *getEventString(OPENPTS_PCR_EVENT_W
-     /* event */
-     event = eventWrapper->event;
-     if (event != NULL) {
--        // len = snprintf(buf, size, "PCR[%d],TYPE=%d", (int)event->ulPcrIndex, event->eventType);
-+        snprintf(buf, size, "PCR[%d],TYPE=%d", (int)event->ulPcrIndex, event->eventType);
-     } else {
-         LOG(LOG_ERR, "NULL event\n");  // TODO(munetoh)
-         xfree(buf);
diff --git a/pkgs/servers/openpts/default.nix b/pkgs/servers/openpts/default.nix
deleted file mode 100644
index 27731af3803..00000000000
--- a/pkgs/servers/openpts/default.nix
+++ /dev/null
@@ -1,54 +0,0 @@
-{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool, trousers, openssl, libxml2, libuuid, gettext, perl }:
-
-stdenv.mkDerivation rec {
-  name = "openpts-${version}";
-  version = "0.2.6";
-
-  src = fetchurl {
-    url = "http://jaist.dl.osdn.jp/openpts/54410/openpts-${version}.tar.gz";
-    sha256 = "1b5phshl49fxr5y3g5zz75gm0n4cw8i7n29x5f1a95xkwrjpazi0";
-  };
-
-  # patches from https://apps.fedoraproject.org/packages/openpts/sources/patches/
-  patches = [ ./bugs.patch ./zlib.patch ./tboot.patch ./ptsc.patch ];
-
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ autoconf automake libtool trousers openssl libxml2 libuuid gettext ];
-
-  preConfigure = ''
-    substituteInPlace include/Makefile.am --replace "./cvs2msg.pl" "${perl}/bin/perl cvs2msg.pl";
-    $SHELL bootstrap.sh
-    '';
-
-  configureFlags = [ "--with-tss" "--with-aru" "--with-tboot" "--enable-tnc" "--with-aide" ];
-
-  NIX_CFLAGS_COMPILE = "-I${trousers}/include/trousers -I${trousers}/include/tss -Wno-deprecated-declarations";
-
-  preInstall = ''
-    mkdir -p $out
-    mkdir -p $out/etc
-    cp -p dist/ptsc.conf.in $out/etc/ptsc.conf
-    cp -p dist/ptsv.conf.in $out/etc/ptsv.conf
-    mkdir -p $out/share/openpts/models
-    cp -p models/*.uml $out/share/openpts/models/
-
-    mkdir -p $out/share/openpts/tpm_emulator
-    cp dist/tpm_emulator/README.rhel $out/share/openpts/tpm_emulator/README
-    cp dist/tpm_emulator/binary_bios_measurements $out/share/openpts/tpm_emulator/
-    cp dist/tpm_emulator/tcsd $out/share/openpts/tpm_emulator/
-
-    mkdir -p $out/share/openpts/tboot
-    cp dist/tboot/README.fedora15 $out/share/openpts/tboot/README
-    cp dist/tboot/ptsc.conf.fedora15 $out/share/openpts/tboot/ptsc.conf
-    cp dist/tboot/tcsd.conf.fedora15 $out/share/openpts/tboot/tcsd.conf
-    cp dist/tboot/tcsd.fedora15 $out/share/openpts/tboot/tcsd
-    '';
-
-  meta = {
-    description = "TCG Platform Trust Service (PTS)";
-    homepage = http://sourceforge.jp/projects/openpts;
-    license = stdenv.lib.licenses.cpl10;
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [ tstrobel ];
-  };
-}
diff --git a/pkgs/servers/openpts/ptsc.patch b/pkgs/servers/openpts/ptsc.patch
deleted file mode 100644
index b6fcde74074..00000000000
--- a/pkgs/servers/openpts/ptsc.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -urNp openpts-0.2.6-patched/src/ptsc.c openpts-0.2.6-current/src/ptsc.c
---- openpts-0.2.6-patched/src/ptsc.c	2012-08-21 15:57:07.733841433 -0400
-+++ openpts-0.2.6-current/src/ptsc.c	2012-08-21 16:13:26.479732504 -0400
-@@ -457,7 +457,10 @@ void ptsc_lock(void) {
-             exit(1);
-         }
-         oldgrp = getegid();
--        setegid(grp.gr_gid);
-+        if(setegid(grp.gr_gid) != 0){
-+		LOG(LOG_ERR, "setegid fail");
-+		exit(1);
-+	}
-     }
- 
-     oldmask = umask(0);
-@@ -467,7 +470,10 @@ void ptsc_lock(void) {
-     }
-     if (grpent) {
-         chmod(LOCK_DIR, 02775);
--        setegid(oldgrp);
-+	if(setegid(oldgrp) != 0){
-+		LOG(LOG_ERR, "setegid fail");
-+		exit(1);
-+        }
-     }
-     fd = open(LOCK_FILE, O_RDWR | O_CREAT | O_TRUNC, 0660);
-     if (fd < 0) {
-
diff --git a/pkgs/servers/openpts/tboot.patch b/pkgs/servers/openpts/tboot.patch
deleted file mode 100644
index 6ecee583920..00000000000
--- a/pkgs/servers/openpts/tboot.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -urNp openpts-0.2.6-patched/src/tboot2iml.c openpts-0.2.6-current/src/tboot2iml.c
---- openpts-0.2.6-patched/src/tboot2iml.c	2012-07-23 16:30:12.381361421 -0400
-+++ openpts-0.2.6-current/src/tboot2iml.c	2012-07-23 17:25:59.053945778 -0400
-@@ -531,7 +531,7 @@ int sinit_acm_hash(char *filename, int s
- 
- 
- int sha1sum_unzip(char *filename, int *filesize, BYTE *digest) {
--    FILE *fp;
-+    gzFile fp;
-     char buf[2048];
-     SHA_CTX sha_ctx;
-     int len;
-@@ -541,7 +541,7 @@ int sha1sum_unzip(char *filename, int *f
- 
-     /* open */
-     fp = gzopen(filename, "rb");
--    if (fp == NULL) {
-+    if (fp == Z_NULL) {
-         LOG(LOG_ERR, "File %s does not exist\n", filename);
-         return 0;
-     }
diff --git a/pkgs/servers/openpts/zlib.patch b/pkgs/servers/openpts/zlib.patch
deleted file mode 100644
index 7fa3fce10fe..00000000000
--- a/pkgs/servers/openpts/zlib.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urNp openpts-0.2.6-cvs-patched/src/Makefile.am openpts-0.2.6-current/src/Makefile.am
---- openpts-0.2.6-cvs-patched/src/Makefile.am	2012-01-05 03:49:15.000000000 -0500
-+++ openpts-0.2.6-current/src/Makefile.am	2012-01-09 14:12:02.507361732 -0500
-@@ -30,7 +30,7 @@ localedir = $(datadir)/locale
- 
- 
- AM_CPPFLAGS = -I$(top_srcdir)/include $(LIBXML2_CFLAGS) $(TSS_CFLAGS) -I../include -DLOCALEDIR=\"$(localedir)\"
--AM_LDFLAGS = $(LIBXML2_LIBS) $(LIBCRYPTO_LIBS) $(TSS_LIBS) -lopenpts
-+AM_LDFLAGS = $(LIBXML2_LIBS) $(LIBCRYPTO_LIBS) $(TSS_LIBS) -lz -lopenpts
- # $(LIBINTL) -lopenpts
- 
- if HAVE_LIBUUID
diff --git a/pkgs/servers/osrm-backend/4.5.0-default-profile-path.template.patch b/pkgs/servers/osrm-backend/4.5.0-default-profile-path.template.patch
deleted file mode 100644
index 12fcdb4fd02..00000000000
--- a/pkgs/servers/osrm-backend/4.5.0-default-profile-path.template.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/extractor/extractor_options.cpp b/extractor/extractor_options.cpp
-index d14d8d9..c64d7fd 100644
---- a/extractor/extractor_options.cpp
-+++ b/extractor/extractor_options.cpp
-@@ -50,7 +50,7 @@ bool ExtractorOptions::ParseArguments(int argc, char *argv[], ExtractorConfig &e
-     boost::program_options::options_description config_options("Configuration");
-     config_options.add_options()("profile,p",
-                                  boost::program_options::value<boost::filesystem::path>(
--                                     &extractor_config.profile_path)->default_value("profile.lua"),
-+                                     &extractor_config.profile_path)->default_value("@out@/profiles/car.lua"),
-                                  "Path to LUA routing profile")(
-         "threads,t",
-         boost::program_options::value<unsigned int>(&extractor_config.requested_num_threads)
diff --git a/pkgs/servers/osrm-backend/4.5.0-gcc-binutils.patch b/pkgs/servers/osrm-backend/4.5.0-gcc-binutils.patch
deleted file mode 100644
index 87b9b9501c4..00000000000
--- a/pkgs/servers/osrm-backend/4.5.0-gcc-binutils.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -127,8 +127,9 @@ if(CMAKE_BUILD_TYPE MATCHES Release)
-     if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND
-         NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9.0" AND NOT MINGW)
-       message(STATUS "Using gcc specific binutils for LTO.")
--      set(CMAKE_AR     "/usr/bin/gcc-ar")
--      set(CMAKE_RANLIB "/usr/bin/gcc-ranlib")
-+      # Just let PATH do its job
-+      set(CMAKE_AR     "gcc-ar")
-+      set(CMAKE_RANLIB "gcc-ranlib")
-     endif()
-   endif (HAS_LTO_FLAG)
- endif()
diff --git a/pkgs/servers/osrm-backend/default.nix b/pkgs/servers/osrm-backend/default.nix
index 8846f50c886..b7c85a8f9a4 100644
--- a/pkgs/servers/osrm-backend/default.nix
+++ b/pkgs/servers/osrm-backend/default.nix
@@ -1,24 +1,18 @@
-{stdenv, fetchFromGitHub, cmake, luabind, libosmpbf, stxxl, tbb, boost, expat, protobuf, bzip2, zlib, substituteAll}:
+{stdenv, fetchFromGitHub, cmake, pkgconfig, bzip2, libxml2, libzip, boost, lua, luabind, tbb, expat}:
 
 stdenv.mkDerivation rec {
   name = "osrm-backend-${version}";
-  version = "4.9.1";
+  version = "5.16.4";
 
   src = fetchFromGitHub {
     rev = "v${version}";
     owner  = "Project-OSRM";
     repo   = "osrm-backend";
-    sha256 = "1r4dwniwxgfppnb9asdh98w5qxqwkjhp9gc5fabmck0gk73cwkcc";
+    sha256 = "01wghly0rqv4f9lfabmbfddjp2pclcfip45rmn0fvnj5c6x23v6v";
   };
 
-  patches = [
-    ./4.5.0-gcc-binutils.patch
-    (substituteAll {
-      src = ./4.5.0-default-profile-path.template.patch;
-    })
-  ];
-
-  buildInputs = [ cmake luabind libosmpbf stxxl tbb boost expat protobuf bzip2 zlib ];
+  nativeBuildInputs = [ cmake pkgconfig ];
+  buildInputs = [ bzip2 libxml2 libzip boost lua luabind tbb expat ];
 
   postInstall = "mkdir -p $out/share/osrm-backend && cp -r ../profiles $out/share/osrm-backend/profiles";
 
@@ -26,6 +20,7 @@ stdenv.mkDerivation rec {
     homepage = https://github.com/Project-OSRM/osrm-backend/wiki;
     description = "Open Source Routing Machine computes shortest paths in a graph. It was designed to run well with map data from the Openstreetmap Project";
     license = stdenv.lib.licenses.bsd2;
+    maintainers = with stdenv.lib.maintainers;[ erictapen ];
     platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/servers/owncloud/default.nix b/pkgs/servers/owncloud/default.nix
index c452ac869fc..f02e67740b6 100644
--- a/pkgs/servers/owncloud/default.nix
+++ b/pkgs/servers/owncloud/default.nix
@@ -32,11 +32,6 @@ let
 
 in {
 
-  owncloud705 = common {
-    versiona = "7.0.5";
-    sha256 = "1j21b7ljvbhni9l0b1cpzlhsjy36scyas1l1j222mqdg2srfsi9y";
-  };
-
   owncloud70 = common {
     versiona = "7.0.15";
     sha256 = "1b2a0fccxlkqyyzsymx7qw8qbhsks3i6h1ybvxv8nn8hgw33nqv7";
diff --git a/pkgs/servers/p910nd/default.nix b/pkgs/servers/p910nd/default.nix
index 0f7cc19339d..bcf1255ff4a 100644
--- a/pkgs/servers/p910nd/default.nix
+++ b/pkgs/servers/p910nd/default.nix
@@ -40,6 +40,5 @@ stdenv.mkDerivation rec {
     downloadPage = http://sourceforge.net/projects/p910nd/;
     license = licenses.gpl2;
     platforms = platforms.linux;
-    maintainers = with maintainers; [ nckx ];
   };
 }
diff --git a/pkgs/servers/polipo/default.nix b/pkgs/servers/polipo/default.nix
index 1ca18d7d3a7..a7a0791b852 100644
--- a/pkgs/servers/polipo/default.nix
+++ b/pkgs/servers/polipo/default.nix
@@ -18,5 +18,8 @@ stdenv.mkDerivation rec {
     license = licenses.mit;
     maintainers = with maintainers; [ phreedom ehmry ];
     platforms = platforms.all;
+    knownVulnerabilities = [
+      "Unmaintained upstream: https://github.com/jech/polipo/commit/4d42ca1b5849"
+    ];
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/servers/prayer/default.nix b/pkgs/servers/prayer/default.nix
index e4b457d0c17..7997d0ebcd8 100644
--- a/pkgs/servers/prayer/default.nix
+++ b/pkgs/servers/prayer/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
       ${ssl} \
       -e 's/CCLIENT_LIBS=.*/CCLIENT_LIBS=-lc-client/' \
       -e 's,^PREFIX .*,PREFIX='$out, \
+      -e 's,^CCLIENT_DIR=.*,CCLIENT_DIR=${uwimap}/include/c-client,' \
       Config
     sed -i -e s,/usr/bin/perl,${perl}/bin/perl, \
       templates/src/*.pl
diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix
index 85ee3ddcf74..ed4a8889c67 100644
--- a/pkgs/servers/pulseaudio/default.nix
+++ b/pkgs/servers/pulseaudio/default.nix
@@ -36,14 +36,23 @@
 
 stdenv.mkDerivation rec {
   name = "${if libOnly then "lib" else ""}pulseaudio-${version}";
-  version = "11.0";
+  version = "11.1";
 
   src = fetchurl {
     url = "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-${version}.tar.xz";
-    sha256 = "0sf92knqkvqmfhrbz4vlsagzqlps72wycpmln5dygicg07a0a8q7";
+    sha256 = "17ndr6kc7hpv4ih4gygwlcpviqifbkvnk4fbwf4n25kpb991qlpj";
   };
 
-  patches = [ ./caps-fix.patch ];
+  patches = [ ./caps-fix.patch (fetchpatch {
+    name = "glibc-2.27.patch";
+    url = "https://cgit.freedesktop.org/pulseaudio/pulseaudio/patch/?id=dfb0460fb4743aec047cdf755a660a9ac2d0f3fb";
+    sha256 = "1bi6rbfdjyl6wn0jql4k18xa4hm5l2lpf1sc5j77f8l6jw956afv";
+  }) ]
+    ++ stdenv.lib.optional stdenv.hostPlatform.isMusl (fetchpatch {
+      name = "padsp-fix.patch";
+      url = "https://git.alpinelinux.org/cgit/aports/plain/testing/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch?id=167be02bf4618a90328e2b234f6a63a5dc05f244";
+      sha256 = "0gf4w25zi123ghk0njapysvrlljkc3hyanacgiswfnnm1i8sab1q";
+    });
 
   outputs = [ "out" "dev" ];
 
diff --git a/pkgs/servers/quagga/default.nix b/pkgs/servers/quagga/default.nix
index 68c9b7a5936..c6f150938ac 100644
--- a/pkgs/servers/quagga/default.nix
+++ b/pkgs/servers/quagga/default.nix
@@ -3,11 +3,11 @@
 
 stdenv.mkDerivation rec {
   name = "quagga-${version}";
-  version = "1.2.2";
+  version = "1.2.4";
 
   src = fetchurl {
     url = "mirror://savannah/quagga/${name}.tar.gz";
-    sha256 = "0c99rjjc62xl5kwvx2pwyvs0709vbwax1qydqbqf6r7fpvr24bjj";
+    sha256 = "1lsksqxij5f1llqn86pkygrf5672kvrqn1kvxghi169hqf1c0r73";
   };
 
   buildInputs =
diff --git a/pkgs/servers/radarr/default.nix b/pkgs/servers/radarr/default.nix
index 3b86cf1758c..5fd23476d7d 100644
--- a/pkgs/servers/radarr/default.nix
+++ b/pkgs/servers/radarr/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "radarr-${version}";
-  version = "0.2.0.846";
+  version = "0.2.0.995";
 
   src = fetchurl {
     url = "https://github.com/Radarr/Radarr/releases/download/v${version}/Radarr.develop.${version}.linux.tar.gz";
-    sha256 = "1lpr05aaf6a9p2msmsh0j8krxk83sf5d3avrh5qpyjap5j3phvky";
+    sha256 = "04sgs292qz65fcg5vsps0fk2669xzvyfw1rbc5sbbk3hig5lhlns";
   };
 
   buildInputs = [ makeWrapper ];
diff --git a/pkgs/servers/radicale/default.nix b/pkgs/servers/radicale/default.nix
index 6752e5b80b7..937bf327995 100644
--- a/pkgs/servers/radicale/default.nix
+++ b/pkgs/servers/radicale/default.nix
@@ -21,6 +21,7 @@ python3Packages.buildPythonApplication {
   propagatedBuildInputs = with python3Packages; [
     vobject
     passlib
+    pytz
   ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/servers/rpcbind/default.nix b/pkgs/servers/rpcbind/default.nix
index 9e211b8df74..6b3d60bcaea 100644
--- a/pkgs/servers/rpcbind/default.nix
+++ b/pkgs/servers/rpcbind/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, pkgconfig, libnsl, libtirpc
+{ fetchurl, stdenv, pkgconfig, libnsl, libtirpc, fetchpatch
 , useSystemd ? true, systemd }:
 
 stdenv.mkDerivation rec {
@@ -12,6 +12,11 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./sunrpc.patch
+    (fetchpatch {
+      name = "CVE-2017-8779.patch";
+      url = "https://raw.githubusercontent.com/guidovranken/rpcbomb/e6da9e489aa8ad000b0ad5ac9abc5b4eefc3a769/rpcbind_patch.txt";
+      sha256 = "0w231w8fxihgrn526np078j3vbj3ylvjvxjmfpjvqhga5zg821ab";
+    })
   ];
 
   buildInputs = [ libnsl libtirpc ]
diff --git a/pkgs/servers/rt/default.nix b/pkgs/servers/rt/default.nix
index 82818037072..dcbfc40d7dd 100644
--- a/pkgs/servers/rt/default.nix
+++ b/pkgs/servers/rt/default.nix
@@ -33,11 +33,11 @@
 stdenv.mkDerivation rec {
   name = "rt-${version}";
 
-  version = "4.4.0";
+  version = "4.4.2";
 
   src = fetchurl {
     url = "https://download.bestpractical.com/pub/rt/release/${name}.tar.gz";
-    sha256 = "1hgz50fxv9zdcngww083aqh8vzyk148lm7mcivxflpnsqfw3696x";
+    sha256 = "0s5ykc5imcii66zkzcb8lf8adkr8zlbc2ikcpkaxzcccikhndqxj";
   };
 
   patches = [ ./override-generated.patch ];
diff --git a/pkgs/servers/sabnzbd/default.nix b/pkgs/servers/sabnzbd/default.nix
index b754807dc9b..d46f5677b9f 100644
--- a/pkgs/servers/sabnzbd/default.nix
+++ b/pkgs/servers/sabnzbd/default.nix
@@ -4,7 +4,7 @@ let
   pythonEnv = python2.withPackages(ps: with ps; [ cryptography cheetah yenc ]);
   path = stdenv.lib.makeBinPath [ par2cmdline unrar unzip p7zip ];
 in stdenv.mkDerivation rec {
-  version = "1.2.1";
+  version = "2.3.2";
   pname = "sabnzbd";
   name = "${pname}-${version}";
 
@@ -12,7 +12,7 @@ in stdenv.mkDerivation rec {
     owner = pname;
     repo = pname;
     rev = version;
-    sha256 = "1rw6f455p0n8qigzkvnlr0d6rzkx2mpzhcp7m0j8fwqdbq831q8y";
+    sha256 = "0c0ap8bygvz643fgfvvmwshcyfblq2c5jziqwgpf30g6rsbfv2v0";
   };
 
   buildInputs = [ pythonEnv makeWrapper ];
diff --git a/pkgs/servers/samba/4.x-no-persistent-install-dynconfig.patch b/pkgs/servers/samba/4.x-no-persistent-install-dynconfig.patch
new file mode 100644
index 00000000000..7e3652dbe7b
--- /dev/null
+++ b/pkgs/servers/samba/4.x-no-persistent-install-dynconfig.patch
@@ -0,0 +1,15 @@
+diff -ru3 samba-4.4.6/dynconfig/wscript samba-4.4.6-new/dynconfig/wscript
+--- samba-4.4.6/dynconfig/wscript	2016-01-26 14:45:46.000000000 +0300
++++ samba-4.4.6-new/dynconfig/wscript	2016-10-15 22:21:18.159705132 +0300
+@@ -416,11 +416,3 @@
+                         public_headers=os_path_relpath(os.path.join(Options.launch_dir, version_header), bld.curdir),
+                         header_path='samba',
+                         cflags=cflags)
+-
+-    # install some extra empty directories
+-    bld.INSTALL_DIRS("", "${CONFIGDIR} ${PRIVATE_DIR} ${LOGFILEBASE}");
+-    bld.INSTALL_DIRS("", "${PRIVATE_DIR} ${PRIVILEGED_SOCKET_DIR}")
+-    bld.INSTALL_DIRS("", "${STATEDIR} ${CACHEDIR}");
+-
+-    # these might be on non persistent storage
+-    bld.INSTALL_DIRS("", "${LOCKDIR} ${PIDDIR} ${SOCKET_DIR}")
diff --git a/pkgs/servers/samba/4.x-no-persistent-install.patch b/pkgs/servers/samba/4.x-no-persistent-install.patch
index efb539bfaea..1c360f6b2c7 100644
--- a/pkgs/servers/samba/4.x-no-persistent-install.patch
+++ b/pkgs/servers/samba/4.x-no-persistent-install.patch
@@ -37,18 +37,3 @@ diff -ru3 samba-4.4.6/ctdb/wscript samba-4.4.6-new/ctdb/wscript
      # Unit tests
      ctdb_unit_tests = [
          'db_hash_test',
-diff -ru3 samba-4.4.6/dynconfig/wscript samba-4.4.6-new/dynconfig/wscript
---- samba-4.4.6/dynconfig/wscript	2016-01-26 14:45:46.000000000 +0300
-+++ samba-4.4.6-new/dynconfig/wscript	2016-10-15 22:21:18.159705132 +0300
-@@ -416,11 +416,3 @@
-                         public_headers=os_path_relpath(os.path.join(Options.launch_dir, version_header), bld.curdir),
-                         header_path='samba',
-                         cflags=cflags)
--
--    # install some extra empty directories
--    bld.INSTALL_DIRS("", "${CONFIGDIR} ${PRIVATE_DIR} ${LOGFILEBASE}");
--    bld.INSTALL_DIRS("", "${PRIVATE_DIR} ${PRIVILEGED_SOCKET_DIR}")
--    bld.INSTALL_DIRS("", "${STATEDIR} ${CACHEDIR}");
--
--    # these might be on non persistent storage
--    bld.INSTALL_DIRS("", "${LOCKDIR} ${PIDDIR} ${SOCKET_DIR}")
diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix
index 8adb90496c3..ba7e9c923e3 100644
--- a/pkgs/servers/samba/4.x.nix
+++ b/pkgs/servers/samba/4.x.nix
@@ -1,7 +1,7 @@
 { lib, stdenv, fetchurl, python, pkgconfig, perl, libxslt, docbook_xsl
 , docbook_xml_dtd_42, docbook_xml_dtd_45, readline, talloc
 , popt, iniparser, libbsd, libarchive, libiconv, gettext
-, kerberos, zlib, openldap, cups, pam, avahi, acl, libaio, fam, libceph, glusterfs
+, krb5Full, zlib, openldap, cups, pam, avahi, acl, libaio, fam, libceph, glusterfs
 , gnutls, libgcrypt, libgpgerror
 , ncurses, libunwind, libibverbs, librdmacm, systemd
 
@@ -19,23 +19,25 @@ with lib;
 
 stdenv.mkDerivation rec {
   name = "samba-${version}";
-  version = "4.6.8";
+  version = "4.7.6";
 
   src = fetchurl {
     url = "mirror://samba/pub/samba/stable/${name}.tar.gz";
-    sha256 = "0pap686cl0j5c9v1v09krpqdk416x3851fbcap5ysp1zajrfw7aq";
+    sha256 = "0vkxqp3wh7bpn1fd45lznmrpn2ma1fq75yq28vi08rggr07y7v8y";
   };
 
   outputs = [ "out" "dev" "man" ];
 
   patches =
     [ ./4.x-no-persistent-install.patch
+      ./patch-source3__libads__kerberos_keytab.c.patch
+      ./4.x-no-persistent-install-dynconfig.patch
     ];
 
   buildInputs =
     [ python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42 /*
       docbook_xml_dtd_45 */ readline talloc popt iniparser
-      libbsd libarchive zlib acl fam libiconv gettext libunwind kerberos
+      libbsd libarchive zlib acl fam libiconv gettext libunwind krb5Full
     ]
     ++ optionals stdenv.isLinux [ libaio pam systemd ]
     ++ optionals (enableInfiniband && stdenv.isLinux) [ libibverbs librdmacm ]
@@ -59,6 +61,7 @@ stdenv.mkDerivation rec {
     [ "--with-static-modules=NONE"
       "--with-shared-modules=ALL"
       "--with-system-mitkrb5"
+      "--with-system-mitkdc" "${krb5Full}"
       "--enable-fhs"
       "--sysconfdir=/etc"
       "--localstatedir=/var"
diff --git a/pkgs/servers/samba/master.nix b/pkgs/servers/samba/master.nix
new file mode 100644
index 00000000000..df1f9feb4de
--- /dev/null
+++ b/pkgs/servers/samba/master.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub
+, samba4
+, nettle
+} :
+
+  (samba4.overrideAttrs(oldAttrs: rec {
+    name = "samba-unstable-${version}";
+    version = "2018-03-09";
+
+    src = fetchFromGitHub {
+      owner = "samba-team";
+      repo = "samba";
+      rev = "9e954bcbf43d67a18ee55f84cda0b09028f96b92";
+      sha256 = "07j1pwm4kax6pq21gq9gpmp7dhj5afdyvkhgyl3yz334mb41q11g";
+    };
+
+    # Remove unnecessary install flags, same as <4.8 patch
+    postPatch = oldAttrs.postPatch + ''
+      sed -i '423,433d' dynconfig/wscript
+    '';
+
+    patches = [ ./4.x-no-persistent-install.patch ];
+    buildInputs = [ nettle ] ++ oldAttrs.buildInputs;
+    meta.branch = "master";
+  })).override {
+    # samba4.8+ removed the ability to disable LDAP.
+    # Enable for base derivation here:
+    enableLDAP = true;
+  }
diff --git a/pkgs/servers/samba/patch-source3__libads__kerberos_keytab.c.patch b/pkgs/servers/samba/patch-source3__libads__kerberos_keytab.c.patch
new file mode 100644
index 00000000000..9f6577c65c1
--- /dev/null
+++ b/pkgs/servers/samba/patch-source3__libads__kerberos_keytab.c.patch
@@ -0,0 +1,20 @@
+--- old/source3/libads/kerberos_keytab.c	2017-12-23 14:23:53.247467000 +0100
++++ new/source3/libads/kerberos_keytab.c	2017-12-23 18:57:07.135340000 +0100
+@@ -32,8 +32,6 @@
+ 
+ #ifdef HAVE_KRB5
+ 
+-#ifdef HAVE_ADS
+-
+ /* This MAX_NAME_LEN is a constant defined in krb5.h */
+ #ifndef MAX_KEYTAB_NAME_LEN
+ #define MAX_KEYTAB_NAME_LEN 1100
+@@ -85,6 +83,8 @@
+ 	return ret;
+ }
+ 
++#ifdef HAVE_ADS
++
+ /**********************************************************************
+  Adds a single service principal, i.e. 'host' to the system keytab
+ ***********************************************************************/
diff --git a/pkgs/servers/search/elasticsearch/2.x.nix b/pkgs/servers/search/elasticsearch/2.x.nix
index 30beec7b873..28244d1b3dc 100644
--- a/pkgs/servers/search/elasticsearch/2.x.nix
+++ b/pkgs/servers/search/elasticsearch/2.x.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeWrapper, jre, utillinux, getopt }:
+{ stdenv, fetchurl, makeWrapper, jre, utillinux }:
 
 with stdenv.lib;
 
@@ -13,8 +13,7 @@ stdenv.mkDerivation rec {
 
   patches = [ ./es-home-2.x.patch ./es-classpath-2.x.patch ];
 
-  buildInputs = [ makeWrapper jre ] ++
-    (if (!stdenv.isDarwin) then [utillinux] else [getopt]);
+  buildInputs = [ makeWrapper jre utillinux ];
 
   installPhase = ''
     mkdir -p $out
@@ -24,9 +23,7 @@ stdenv.mkDerivation rec {
     mv $out/bin/plugin $out/bin/elasticsearch-plugin
     wrapProgram $out/bin/elasticsearch \
       --prefix ES_CLASSPATH : "$out/lib/${name}.jar":"$out/lib/*" \
-      ${if (!stdenv.isDarwin)
-        then ''--prefix PATH : "${utillinux}/bin/"''
-        else ''--prefix PATH : "${getopt}/bin"''} \
+      --prefix PATH : "${utillinux}/bin" \
       --set JAVA_HOME "${jre}"
     wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre}"
   '';
diff --git a/pkgs/servers/search/elasticsearch/5.x.nix b/pkgs/servers/search/elasticsearch/5.x.nix
index fb988b54630..c80bbbcfde9 100644
--- a/pkgs/servers/search/elasticsearch/5.x.nix
+++ b/pkgs/servers/search/elasticsearch/5.x.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, elk5Version, makeWrapper, jre_headless, utillinux, getopt }:
+{ stdenv, fetchurl, elk5Version, makeWrapper, jre_headless, utillinux }:
 
 with stdenv.lib;
 
@@ -8,13 +8,12 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://artifacts.elastic.co/downloads/elasticsearch/${name}.tar.gz";
-    sha256 = "0pvi6akicg0i3bz3lbc6k9rznxw7d25flg9wbs2dyxv8i2rrqvq0";
+    sha256 = "0sm99m4m4mmigj6ll22kyaw7zkp1s2i0mhzx15fzidnybdnlifb4";
   };
 
   patches = [ ./es-home-5.x.patch ./es-classpath-5.x.patch ];
 
-  buildInputs = [ makeWrapper jre_headless ] ++
-    (if (!stdenv.isDarwin) then [utillinux] else [getopt]);
+  buildInputs = [ makeWrapper jre_headless utillinux ];
 
   installPhase = ''
     mkdir -p $out
@@ -24,9 +23,7 @@ stdenv.mkDerivation rec {
 
     wrapProgram $out/bin/elasticsearch \
       --prefix ES_CLASSPATH : "$out/lib/*" \
-      ${if (!stdenv.isDarwin)
-        then ''--prefix PATH : "${utillinux}/bin/"''
-        else ''--prefix PATH : "${getopt}/bin"''} \
+      --prefix PATH : "${utillinux}/bin" \
       --set JAVA_HOME "${jre_headless}" \
       --set ES_JVM_OPTIONS "$out/config/jvm.options"
 
diff --git a/pkgs/servers/search/elasticsearch/6.x.nix b/pkgs/servers/search/elasticsearch/6.x.nix
new file mode 100644
index 00000000000..06caf191587
--- /dev/null
+++ b/pkgs/servers/search/elasticsearch/6.x.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, elk6Version, makeWrapper, jre_headless, utillinux }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  version = elk6Version;
+  name = "elasticsearch-${version}";
+
+  src = fetchurl {
+    url = "https://artifacts.elastic.co/downloads/elasticsearch/${name}.tar.gz";
+    sha256 = "13hf00khq33yw6zv022vcrsf6vm43isx40x7ww8r1lqx3vmg3rli";
+  };
+
+  patches = [ ./es-home-6.x.patch ];
+
+  postPatch = ''
+    sed -i "s|ES_CLASSPATH=\"\$ES_HOME/lib/\*\"|ES_CLASSPATH=\"$out/lib/*\"|" ./bin/elasticsearch-env
+  '';
+
+  buildInputs = [ makeWrapper jre_headless utillinux ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -R bin config lib modules plugins $out
+
+    chmod -x $out/bin/*.*
+
+    wrapProgram $out/bin/elasticsearch \
+      --prefix PATH : "${utillinux}/bin/" \
+      --set JAVA_HOME "${jre_headless}"
+
+    wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre_headless}"
+  '';
+
+  meta = {
+    description = "Open Source, Distributed, RESTful Search Engine";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ apeschar basvandijk ];
+  };
+}
diff --git a/pkgs/servers/search/elasticsearch/default.nix b/pkgs/servers/search/elasticsearch/default.nix
index 16f01030290..f4780603f50 100644
--- a/pkgs/servers/search/elasticsearch/default.nix
+++ b/pkgs/servers/search/elasticsearch/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeWrapper, jre, utillinux, getopt }:
+{ stdenv, fetchurl, makeWrapper, jre, utillinux }:
 
 with stdenv.lib;
 
@@ -12,8 +12,7 @@ stdenv.mkDerivation rec {
 
   patches = [ ./es-home.patch ];
 
-  buildInputs = [ makeWrapper jre ] ++
-    (if (!stdenv.isDarwin) then [utillinux] else [getopt]);
+  buildInputs = [ makeWrapper jre utillinux ];
 
   installPhase = ''
     mkdir -p $out
@@ -25,9 +24,7 @@ stdenv.mkDerivation rec {
     # set ES_CLASSPATH and JAVA_HOME
     wrapProgram $out/bin/elasticsearch \
       --prefix ES_CLASSPATH : "$out/lib/${name}.jar":"$out/lib/*":"$out/lib/sigar/*" \
-      ${if (!stdenv.isDarwin)
-        then ''--prefix PATH : "${utillinux}/bin/"''
-        else ''--prefix PATH : "${getopt}/bin"''} \
+      --prefix PATH : "${utillinux}/bin" \
       --set JAVA_HOME "${jre}"
     wrapProgram $out/bin/elasticsearch-plugin \
       --prefix ES_CLASSPATH : "$out/lib/${name}.jar":"$out/lib/*":"$out/lib/sigar/*" \
diff --git a/pkgs/servers/search/elasticsearch/es-home-6.x.patch b/pkgs/servers/search/elasticsearch/es-home-6.x.patch
new file mode 100644
index 00000000000..aba8d396a69
--- /dev/null
+++ b/pkgs/servers/search/elasticsearch/es-home-6.x.patch
@@ -0,0 +1,26 @@
+diff -Naur a/bin/elasticsearch-env b/bin/elasticsearch-env
+--- a/bin/elasticsearch-env	2017-12-12 13:31:51.000000000 +0100
++++ b/bin/elasticsearch-env	2017-12-18 19:51:12.282809695 +0100
+@@ -19,18 +19,10 @@
+   fi
+ done
+ 
+-# determine Elasticsearch home; to do this, we strip from the path until we find
+-# bin, and then strip bin (there is an assumption here that there is no nested
+-# directory under bin also named bin)
+-ES_HOME=`dirname "$SCRIPT"`
+-
+-# now make ES_HOME absolute
+-ES_HOME=`cd "$ES_HOME"; pwd`
+-
+-while [ "`basename "$ES_HOME"`" != "bin" ]; do
+-  ES_HOME=`dirname "$ES_HOME"`
+-done
+-ES_HOME=`dirname "$ES_HOME"`
++if [ -z "$ES_HOME" ]; then
++    echo "You must set the ES_HOME var" >&2
++    exit 1
++fi
+ 
+ # now set the classpath
+ ES_CLASSPATH="$ES_HOME/lib/*"
diff --git a/pkgs/servers/search/groonga/default.nix b/pkgs/servers/search/groonga/default.nix
index 950056ccb1d..063ad8c3f57 100644
--- a/pkgs/servers/search/groonga/default.nix
+++ b/pkgs/servers/search/groonga/default.nix
@@ -7,11 +7,11 @@
 stdenv.mkDerivation rec {
 
   name    = "groonga-${version}";
-  version = "7.0.8";
+  version = "8.0.1";
 
   src = fetchurl {
     url    = "http://packages.groonga.org/source/groonga/${name}.tar.gz";
-    sha256 = "1j5biji86dicm8whbqjgjmyycxsfl5qfyxqfc4bxaspd6w18vj87";
+    sha256 = "074r71dcv1l8rm6an7b8iyfpcxbk00iysmzszssknqg8mrqvsphg";
   };
 
   buildInputs = with stdenv.lib;
diff --git a/pkgs/servers/search/sphinxsearch/default.nix b/pkgs/servers/search/sphinxsearch/default.nix
index ead0c095d5c..7ba23f61fed 100644
--- a/pkgs/servers/search/sphinxsearch/default.nix
+++ b/pkgs/servers/search/sphinxsearch/default.nix
@@ -1,8 +1,8 @@
 { stdenv, fetchurl, pkgconfig,
-  version ? "2.2.8",
+  version ? "2.2.11",
   mainSrc ? fetchurl {
     url = "http://sphinxsearch.com/files/sphinx-${version}-release.tar.gz";
-    sha256 = "1q6jdw5g81k7ciw9fhwklb5ifgb8zna39795m0x0lbvwjbk3ampv";
+    sha256 = "1aa1mh32y019j8s3sjzn4vwi0xn83dwgl685jnbgh51k16gh6qk6";
   }
 }:
 
diff --git a/pkgs/servers/serviio/default.nix b/pkgs/servers/serviio/default.nix
new file mode 100644
index 00000000000..876cc01592e
--- /dev/null
+++ b/pkgs/servers/serviio/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "serviio-${version}";
+  version = "1.9";
+
+  src = fetchurl {
+    url = "http://download.serviio.org/releases/${name}-linux.tar.gz";
+    sha256 = "0vi9dwpdrk087gpi0xib0hwpvdmaf9g99nfdfx2r3wmmdzw7wysl";
+  };
+
+  phases = ["unpackPhase" "installPhase"];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -R config legal lib library plugins LICENCE.txt NOTICE.txt README.txt RELEASE_NOTES.txt $out
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://serviio.org;
+    description = "UPnP Media Streaming Server";
+    longDescription = ''
+      Serviio is a free media server. It allows you to stream your media files (music, video or images)
+      to any DLNA-certified renderer device (e.g. a TV set, Bluray player, games console) on your home network.
+    '';
+    license = licenses.unfree;
+    maintainers = [ maintainers.thpham ];
+    platforms = platforms.linux;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/servers/shairplay/default.nix b/pkgs/servers/shairplay/default.nix
new file mode 100644
index 00000000000..f9b17b947cf
--- /dev/null
+++ b/pkgs/servers/shairplay/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig
+, avahi, libao }:
+
+stdenv.mkDerivation rec {
+  name = "shairplay-${version}";
+  version = "2016-01-01";
+
+  src = fetchFromGitHub {
+    owner  = "juhovh";
+    repo   = "shairplay";
+    rev    = "ce80e005908f41d0e6fde1c4a21e9cb8ee54007b";
+    sha256 = "10b4bmqgf4rf1wszvj066mc42p90968vqrmyqyrdal4k6f8by1r6";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+
+  buildInputs = [ avahi libao ];
+
+  enableParallelBuilding = true;
+
+  # the build will fail without complaining about a reference to /tmp
+  preFixup = stdenv.lib.optionalString stdenv.isLinux ''
+    patchelf \
+      --set-rpath "${stdenv.lib.makeLibraryPath buildInputs}:$out/lib" \
+      $out/bin/shairplay
+  '';
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Apple airplay and raop protocol server";
+    license     = licenses.mit;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/pkgs/servers/shairport-sync/default.nix b/pkgs/servers/shairport-sync/default.nix
index 79f2012c7a9..f7a9fc65835 100644
--- a/pkgs/servers/shairport-sync/default.nix
+++ b/pkgs/servers/shairport-sync/default.nix
@@ -2,11 +2,11 @@
 , libdaemon, popt, pkgconfig, libconfig, libpulseaudio, soxr }:
 
 stdenv.mkDerivation rec {
-  version = "3.0.2";
+  version = "3.1.7";
   name = "shairport-sync-${version}";
 
   src = fetchFromGitHub {
-    sha256 = "1lpfl591lhk66a5jfp86j669iswjzj503x02hg9h3211vxv3h9pa";
+    sha256 = "1ip8vlyly190fhcd55am5xvqisvch8mnw50xwbm663dapdb1f8ys";
     rev = version;
     repo = "shairport-sync";
     owner = "mikebrady";
diff --git a/pkgs/servers/shishi/default.nix b/pkgs/servers/shishi/default.nix
index 535571f46e2..1540a6f1fd1 100644
--- a/pkgs/servers/shishi/default.nix
+++ b/pkgs/servers/shishi/default.nix
@@ -14,7 +14,7 @@ let
   mkWith = mkFlag "with-" "without-";
   mkOther = mkFlag "" "" true;
 
-  shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
+  shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
 
   optPam = shouldUsePkg pam;
   optLibidn = shouldUsePkg libidn;
diff --git a/pkgs/servers/simplehttp2server/default.nix b/pkgs/servers/simplehttp2server/default.nix
new file mode 100644
index 00000000000..083a224d155
--- /dev/null
+++ b/pkgs/servers/simplehttp2server/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "simplehttp2server-${version}";
+  version = "3.1.3";
+
+  goPackagePath = "github.com/GoogleChromeLabs/simplehttp2server";
+
+  src = fetchFromGitHub {
+     owner = "GoogleChromeLabs";
+     repo = "simplehttp2server";
+     rev = version;
+     sha256 = "113mcfvy1m91wask5039mhr0187nlw325ac32785yl4bb4igi8aw";
+  };
+
+  goDeps = ./deps.nix;
+
+  meta = with stdenv.lib; {
+     homepage = https://github.com/GoogleChromeLabs/simplehttp2server;
+     description = "HTTP/2 server for development purposes";
+     license = licenses.asl20;
+     maintainers = with maintainers; [ yrashk ];
+  };
+
+}
diff --git a/pkgs/servers/simplehttp2server/deps.nix b/pkgs/servers/simplehttp2server/deps.nix
new file mode 100644
index 00000000000..e6a26bf2506
--- /dev/null
+++ b/pkgs/servers/simplehttp2server/deps.nix
@@ -0,0 +1,12 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
+[
+  {
+    goPackagePath = "github.com/NYTimes/gziphandler";
+    fetch = {
+      type = "git";
+      url = "https://github.com/NYTimes/gziphandler";
+      rev = "289a3b81f5aedc99f8d6eb0f67827c142f1310d8";
+      sha256 = "1r9ly9wdqjcc4nwv71mfldf1f5cjm4r34vvkdm5wabmdqqqwkbyx";
+    };
+  }
+]
diff --git a/pkgs/servers/sip/freeswitch/default.nix b/pkgs/servers/sip/freeswitch/default.nix
index 9a1ea5b5580..a952dbada66 100644
--- a/pkgs/servers/sip/freeswitch/default.nix
+++ b/pkgs/servers/sip/freeswitch/default.nix
@@ -3,11 +3,11 @@
 , ldns, libedit, yasm, which, lua, libopus, libsndfile }:
 
 stdenv.mkDerivation rec {
-  name = "freeswitch-1.6.15";
+  name = "freeswitch-1.6.20";
 
   src = fetchurl {
     url = "http://files.freeswitch.org/freeswitch-releases/${name}.tar.bz2";
-    sha256 = "071g7229shr9srwzspx29fcx3ccj3rwakkydpc4vdf1q3lldd2ld";
+    sha256 = "0hqz68abs5x5vzf1mndcvdi35nrhmnklzdrnrk8dyvzvz67hp2ah";
   };
   postPatch = ''
     patchShebangs     libs/libvpx/build/make/rtcd.pl
diff --git a/pkgs/servers/smcroute/default.nix b/pkgs/servers/smcroute/default.nix
index d9a4f4733f7..b1d614bc5cf 100644
--- a/pkgs/servers/smcroute/default.nix
+++ b/pkgs/servers/smcroute/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "smcroute-${version}";
-  version = "2.3.1";
+  version = "2.4.0";
 
   src = fetchFromGitHub {
     owner = "troglobit";
     repo = "smcroute";
     rev = version;
-    sha256 = "0a1sgf9p39gbfrh7bhfg1hjqa6y18i7cig7bffmv7spqnvb50zx5";
+    sha256 = "12xwdwvl9h269armwak7grm4g944j2c89srha4lqx2zndx1ycg1r";
   };
 
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/pkgs/servers/softether/4.18.nix b/pkgs/servers/softether/4.18.nix
index 69c6cbe2c86..5b0d15136f8 100644
--- a/pkgs/servers/softether/4.18.nix
+++ b/pkgs/servers/softether/4.18.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchurl
-, openssl, readline, ncurses, zlib }:
+, openssl, readline, ncurses, zlib
+, dataDir ? "/var/lib/softether" }:
 
 let
   os = if stdenv.isLinux then "1"
@@ -17,7 +18,6 @@ stdenv.mkDerivation rec {
   version = "4.18";
   build = "9570";
   compiledDate = "2015.07.26";
-  dataDir = "/var/lib/softether";
 
   src = fetchurl {
     url = "http://www.softether-download.com/files/softether/v${version}-${build}-rtm-${compiledDate}-tree/Source_Code/softether-src-v${version}-${build}-rtm.tar.gz";
@@ -48,6 +48,6 @@ stdenv.mkDerivation rec {
     homepage = https://www.softether.org/;
     license = licenses.gpl2;
     maintainers = [ maintainers.rick68 ];
-    platforms = platforms.linux;
+    platforms = filter (p: p != "aarch64-linux") platforms.linux;
   };
 }
diff --git a/pkgs/servers/softether/4.20.nix b/pkgs/servers/softether/4.20.nix
index c6ef5a3a4df..91dd0d0411f 100644
--- a/pkgs/servers/softether/4.20.nix
+++ b/pkgs/servers/softether/4.20.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchurl
-, openssl, readline, ncurses, zlib }:
+, openssl, readline, ncurses, zlib
+, dataDir ? "/var/lib/softether" }:
 
 let
   os = if stdenv.isLinux then "1"
@@ -17,7 +18,6 @@ stdenv.mkDerivation rec {
   version = "4.20";
   build = "9608";
   compiledDate = "2016.04.17";
-  dataDir = "/var/lib/softether";
 
   src = fetchurl {
     url = "http://www.softether-download.com/files/softether/v${version}-${build}-rtm-${compiledDate}-tree/Source_Code/softether-src-v${version}-${build}-rtm.tar.gz";
@@ -48,6 +48,6 @@ stdenv.mkDerivation rec {
     homepage = https://www.softether.org/;
     license = licenses.gpl2;
     maintainers = [ maintainers.rick68 ];
-    platforms = platforms.linux;
+    platforms = filter (p: p != "aarch64-linux") platforms.linux;
   };
 }
diff --git a/pkgs/servers/softether/4.25.nix b/pkgs/servers/softether/4.25.nix
new file mode 100644
index 00000000000..04053174f4e
--- /dev/null
+++ b/pkgs/servers/softether/4.25.nix
@@ -0,0 +1,53 @@
+{ stdenv, fetchurl
+, openssl, readline, ncurses, zlib
+, dataDir ? "/var/lib/softether" }:
+
+let
+  os = if stdenv.isLinux then "1"
+       else if stdenv.isFreeBSD then "2"
+       else if stdenv.isSunOS then "3"
+       else if stdenv.isDarwin then "4"
+       else if stdenv.isOpenBSD then "5"
+       else "";
+  cpuBits = if stdenv.is64bit then "2" else "1";
+
+in
+
+stdenv.mkDerivation rec {
+  name = "softether-${version}";
+  version = "4.25";
+  build = "9656";
+  compiledDate = "2018.01.15";
+
+  src = fetchurl {
+    url = "http://www.softether-download.com/files/softether/v${version}-${build}-rtm-${compiledDate}-tree/Source_Code/softether-src-v${version}-${build}-rtm.tar.gz";
+    sha256 = "1y1m8lf0xfh7m70d15wj2jjf5a5qhi3j49ciwqmsscsqvb1xwimr";
+  };
+
+  buildInputs = [ openssl readline ncurses zlib ];
+
+  preConfigure = ''
+      echo "${os}
+      ${cpuBits}
+      " | ./configure
+      rm configure
+  '';
+
+  buildPhase = ''
+      mkdir -p $out/bin
+      sed -i \
+          -e "/INSTALL_BINDIR=/s|/usr/bin|/bin|g" \
+          -e "/_DIR=/s|/usr|${dataDir}|g" \
+          -e "s|\$(INSTALL|$out/\$(INSTALL|g" \
+          -e "/echo/s|echo $out/|echo |g" \
+          Makefile
+  '';
+
+  meta = with stdenv.lib; {
+    description = "An Open-Source Free Cross-platform Multi-protocol VPN Program";
+    homepage = https://www.softether.org/;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.rick68 ];
+    platforms = filter (p: p != "aarch64-linux") platforms.linux;
+  };
+}
diff --git a/pkgs/servers/sonarr/default.nix b/pkgs/servers/sonarr/default.nix
index f41676a79bc..e7114b957dc 100644
--- a/pkgs/servers/sonarr/default.nix
+++ b/pkgs/servers/sonarr/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "sonarr-${version}";
-  version = "2.0.0.5054";
+  version = "2.0.0.5163";
 
   src = fetchurl {
     url = "http://download.sonarr.tv/v2/master/mono/NzbDrone.master.${version}.mono.tar.gz";
-    sha256 = "15qr8hwv89zv71h4q94nrxl8625viip7m185wqcyzma8wrx5i1zi";
+    sha256 = "037rs0cb7dfiblfy02x2l4amv9dmx1wiz5pa97vpczfgk5gq99y3";
   };
 
   buildInputs = [
diff --git a/pkgs/servers/sql/cockroachdb/default.nix b/pkgs/servers/sql/cockroachdb/default.nix
index be9a02031ff..aba997d75f1 100644
--- a/pkgs/servers/sql/cockroachdb/default.nix
+++ b/pkgs/servers/sql/cockroachdb/default.nix
@@ -1,16 +1,17 @@
-{ stdenv, buildGoPackage, fetchurl, cmake, xz, which, autoconf }:
+{ stdenv, buildGoPackage, fetchurl, cmake, xz, which, autoconf, ncurses6, libedit }:
 
 buildGoPackage rec {
   name = "cockroach-${version}";
-  version = "1.1.1";
+  version = "2.0.0";
 
   goPackagePath = "github.com/cockroachdb/cockroach";
 
   src = fetchurl {
     url = "https://binaries.cockroachdb.com/cockroach-v${version}.src.tgz";
-    sha256 = "0d2nlm291k4x7hqi0kh76j6pj8b1dwbdww5f95brf0a9bl1n7qxr";
+    sha256 = "0x8hf5qwvgb2w6dcnvy20v77nf19f0l1pb40jf31rm72xhk3bwvy";
   };
 
+  buildInputs = [ (if stdenv.isDarwin then libedit else ncurses6) ];
   nativeBuildInputs = [ cmake xz which autoconf ];
 
   buildPhase = ''
diff --git a/pkgs/servers/sql/mariadb/clang-isfinite.patch b/pkgs/servers/sql/mariadb/clang-isfinite.patch
new file mode 100644
index 00000000000..8da527d5784
--- /dev/null
+++ b/pkgs/servers/sql/mariadb/clang-isfinite.patch
@@ -0,0 +1,17 @@
+diff --git a/include/my_global.h b/include/my_global.h
+index cb31ae2..2866f87 100644
+--- a/include/my_global.h
++++ b/include/my_global.h
+@@ -803,12 +803,6 @@ inline unsigned long long my_double2ulonglong(double d)
+ #endif
+ 
+ #ifndef isfinite
+-#ifdef HAVE_FINITE
+-#define isfinite(x) finite(x)
+-#else
+-#define finite(x) (1.0 / fabs(x) > 0.0)
+-#endif /* HAVE_FINITE */
+-#elif (__cplusplus >= 201103L)
+ #include <cmath>
+ static inline bool isfinite(double x) { return std::isfinite(x); }
+ #endif /* isfinite */
diff --git a/pkgs/servers/sql/mariadb/cmake-includedir.patch b/pkgs/servers/sql/mariadb/cmake-includedir.patch
new file mode 100644
index 00000000000..0c4fe7d321e
--- /dev/null
+++ b/pkgs/servers/sql/mariadb/cmake-includedir.patch
@@ -0,0 +1,11 @@
+--- a/include/CMakeLists.txt	2017-12-25 05:59:07.204144374 +0100
++++ b/include/CMakeLists.txt	2017-12-25 05:59:26.339552817 +0100
+@@ -94,7 +94,7 @@
+ ENDIF()
+ 
+ MACRO(INSTALL_COMPAT_HEADER file footer)
+-  INSTALL(CODE "FILE(WRITE \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDEDIR}/${file}
++  INSTALL(CODE "FILE(WRITE ${INSTALL_INCLUDEDIR}/${file}
+ \"/* Do not edit this file directly, it was auto-generated by cmake */
+ 
+ #warning This file should not be included by clients, include only <mysql.h>
diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix
index d6731a5b7dc..60462f83d10 100644
--- a/pkgs/servers/sql/mariadb/default.nix
+++ b/pkgs/servers/sql/mariadb/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, cmake, pkgconfig, ncurses, zlib, xz, lzo, lz4, bzip2, snappy
-, openssl, pcre, boost, judy, bison, libxml2
+, libiconv, openssl, pcre, boost, judy, bison, libxml2
 , libaio, libevent, groff, jemalloc, cracklib, systemd, numactl, perl
 , fixDarwinDylibNames, cctools, CoreServices
 }:
@@ -11,31 +11,32 @@ let # in mariadb # spans the whole file
 mariadb = everything // {
   inherit client; # libmysqlclient.so in .out, necessary headers in .dev and utils in .bin
   server = everything; # a full single-output build, including everything in `client` again
-  lib = client; # compat. with the old mariadb split
+  inherit connector-c; # libmysqlclient.so
 };
 
 common = rec { # attributes common to both builds
-  version = "10.1.28";
+  version = "10.2.14";
 
   src = fetchurl {
-    url    = "https://downloads.mariadb.org/f/mariadb-${version}/source/mariadb-${version}.tar.gz/from/http%3A//ftp.hosteurope.de/mirror/archive.mariadb.org/?serve";
-    sha256 = "1g9b0c04qhgcgw6xw29bvdjjjacr7kn82crc7apvvi10ykzwhb99";
+    url    = "https://downloads.mariadb.org/f/mariadb-${version}/source/mariadb-${version}.tar.gz";
+    sha256 = "0zizf3q0hdkmsn6rpwdbfm5xkj21cwpnnzq9knjfpwcadqnyqhrl";
     name   = "mariadb-${version}.tar.gz";
   };
 
-  prePatch = ''
-    substituteInPlace cmake/libutils.cmake \
-      --replace /usr/bin/libtool libtool
-    sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
-  '';
-
   nativeBuildInputs = [ cmake pkgconfig ];
 
   buildInputs = [
-    ncurses openssl zlib pcre jemalloc
+    ncurses openssl zlib pcre jemalloc libiconv
   ] ++ stdenv.lib.optionals stdenv.isLinux [ libaio systemd ]
     ++ stdenv.lib.optionals stdenv.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ];
 
+  prePatch = ''
+    sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
+  '';
+
+  patches = [ ./cmake-includedir.patch ]
+    ++ stdenv.lib.optional stdenv.cc.isClang ./clang-isfinite.patch;
+
   cmakeFlags = [
     "-DBUILD_CONFIG=mysql_release"
     "-DMANUFACTURER=NixOS.org"
@@ -61,6 +62,7 @@ common = rec { # attributes common to both builds
     "-DPLUGIN_AUTH_GSSAPI_CLIENT=NO"
   ]
     ++ optional stdenv.isDarwin "-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib"
+    ++ optional stdenv.hostPlatform.isMusl "-DWITHOUT_TOKUDB=1" # mariadb docs say disable this for musl
     ;
 
   preConfigure = ''
@@ -72,7 +74,7 @@ common = rec { # attributes common to both builds
     find "''${!outputBin}/bin" -name '*test*' -delete
   '';
 
-  passthru.mysqlVersion = "5.6";
+  passthru.mysqlVersion = "5.7";
 
   meta = with stdenv.lib; {
     description = "An enhanced, drop-in replacement for MySQL";
@@ -83,7 +85,6 @@ common = rec { # attributes common to both builds
   };
 };
 
-
 client = stdenv.mkDerivation (common // {
   name = "mariadb-client-${common.version}";
 
@@ -97,21 +98,23 @@ client = stdenv.mkDerivation (common // {
 
   preConfigure = common.preConfigure + ''
     cmakeFlags="$cmakeFlags \
-      -DINSTALL_BINDIR=$bin/bin -DINSTALL_SCRIPTDIR=$bin/bin \
+      -DINSTALL_BINDIR=$bin/bin \
+      -DINSTALL_SCRIPTDIR=$bin/bin \
       -DINSTALL_SUPPORTFILESDIR=$bin/share/mysql \
-      -DINSTALL_DOCDIR=$bin/share/doc/mysql -DINSTALL_DOCREADMEDIR=$bin/share/doc/mysql \
+      -DINSTALL_DOCDIR=$bin/share/doc/mysql \
+      -DINSTALL_DOCREADMEDIR=$bin/share/doc/mysql \
       "
   '';
 
   # prevent cycle; it needs to reference $dev
   postInstall = common.postInstall + ''
     moveToOutput bin/mysql_config "$dev"
+    moveToOutput bin/mariadb_config "$dev"
   '';
 
   enableParallelBuilding = true; # the client should be OK
 });
 
-
 everything = stdenv.mkDerivation (common // {
   name = "mariadb-${common.version}";
 
@@ -120,9 +123,7 @@ everything = stdenv.mkDerivation (common // {
   buildInputs = common.buildInputs ++ [
     xz lzo lz4 bzip2 snappy
     libxml2 boost judy libevent cracklib
-  ]
-    ++ optionals (stdenv.isLinux && !stdenv.isArm) [ numactl ]
-    ;
+  ] ++ optional (stdenv.isLinux && !stdenv.isArm) numactl;
 
   cmakeFlags = common.cmakeFlags ++ [
     "-DMYSQL_DATADIR=/var/lib/mysql"
@@ -135,6 +136,8 @@ everything = stdenv.mkDerivation (common // {
     "-DINSTALL_DOCREADMEDIR=share/doc/mysql"
     "-DINSTALL_DOCDIR=share/doc/mysql"
     "-DINSTALL_SHAREDIR=share/mysql"
+    "-DINSTALL_MYSQLTESTDIR=OFF"
+    "-DINSTALL_SQLBENCHDIR=OFF"
 
     "-DENABLED_LOCAL_INFILE=ON"
     "-DWITH_READLINE=ON"
@@ -153,12 +156,54 @@ everything = stdenv.mkDerivation (common // {
   ];
 
   postInstall = common.postInstall + ''
-    rm -r "$out"/{mysql-test,sql-bench,data} # Don't need testing data
+    rm -r "$out"/data # Don't need testing data
     rm "$out"/share/man/man1/mysql-test-run.pl.1
-
-    # Don't install mysqlbug to prevent a dependency on gcc.
-    rm $out/bin/mysqlbug
+    rm "$out"/bin/rcmysql
   '';
+
+  CXXFLAGS = optionalString stdenv.isi686 "-fpermissive"
+    + optionalString stdenv.isDarwin " -std=c++11";
 });
 
+connector-c = stdenv.mkDerivation rec {
+  name = "mariadb-connector-c-${version}";
+  version = "2.3.4";
+
+  src = fetchurl {
+    url = "https://downloads.mariadb.org/interstitial/connector-c-${version}/mariadb-connector-c-${version}-src.tar.gz/from/http%3A//ftp.hosteurope.de/mirror/archive.mariadb.org/?serve";
+    sha256 = "1g1sq5knarxkfhpkcczr6qxmq12pid65cdkqnhnfs94av89hbswb";
+    name   = "mariadb-connector-c-${version}-src.tar.gz";
+  };
+
+  # outputs = [ "dev" "out" ]; FIXME: cmake variables don't allow that < 3.0
+  cmakeFlags = [
+    "-DWITH_EXTERNAL_ZLIB=ON"
+    "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
+  ];
+
+  # The cmake setup-hook uses $out/lib by default, this is not the case here.
+  preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
+    cmakeFlagsArray+=("-DCMAKE_INSTALL_NAME_DIR=$out/lib/mariadb")
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  propagatedBuildInputs = [ openssl zlib ];
+  buildInputs = [ libiconv ];
+
+  enableParallelBuilding = true;
+
+  postFixup = ''
+    ln -sv mariadb_config $out/bin/mysql_config
+    ln -sv mariadb $out/lib/mysql
+    ln -sv mariadb $out/include/mysql
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Client library that can be used to connect to MySQL or MariaDB";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ globin ];
+    platforms = platforms.all;
+  };
+};
+
 in mariadb
diff --git a/pkgs/servers/sql/mysql/5.5.x.nix b/pkgs/servers/sql/mysql/5.5.x.nix
index 28e7824cd42..29d25b77afc 100644
--- a/pkgs/servers/sql/mysql/5.5.x.nix
+++ b/pkgs/servers/sql/mysql/5.5.x.nix
@@ -3,7 +3,8 @@
 
 # Note: zlib is not required; MySQL can use an internal zlib.
 
-stdenv.mkDerivation rec {
+let
+self = stdenv.mkDerivation rec {
   name = "mysql-${version}";
   version = "5.5.58";
 
@@ -48,6 +49,7 @@ stdenv.mkDerivation rec {
     "-DINSTALL_SHAREDIR=share/mysql"
   ];
 
+  NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; # since gcc-7
   NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
 
   prePatch = ''
@@ -59,11 +61,16 @@ stdenv.mkDerivation rec {
     rm $out/share/man/man1/mysql-test-run.pl.1
   '';
 
-  passthru.mysqlVersion = "5.5";
+  passthru = {
+    client = self;
+    connector-c = self;
+    server = self;
+    mysqlVersion = "5.5";
+  };
 
   meta = {
-    homepage = http://www.mysql.com/;
+    homepage = https://www.mysql.com/;
     description = "The world's most popular open source database";
     platforms = stdenv.lib.platforms.unix;
   };
-}
+}; in self
diff --git a/pkgs/servers/sql/mysql/5.7.x.nix b/pkgs/servers/sql/mysql/5.7.x.nix
index 687993e0dc5..15e8569fd09 100644
--- a/pkgs/servers/sql/mysql/5.7.x.nix
+++ b/pkgs/servers/sql/mysql/5.7.x.nix
@@ -3,7 +3,8 @@
 
 # Note: zlib is not required; MySQL can use an internal zlib.
 
-stdenv.mkDerivation rec {
+let
+self = stdenv.mkDerivation rec {
   name = "mysql-${version}";
   version = "5.7.20";
 
@@ -22,15 +23,20 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  outputs = [ "out" "static" ];
+
   cmakeFlags = [
     "-DWITH_SSL=yes"
-    "-DWITH_READLINE=yes"
     "-DWITH_EMBEDDED_SERVER=yes"
+    "-DWITH_UNITTEST=no"
     "-DWITH_ZLIB=yes"
+    "-DWITH_ARCHIVE_STORAGE_ENGINE=yes"
+    "-DWITH_BLACKHOLE_STORAGE_ENGINE=yes"
+    "-DWITH_FEDERATED_STORAGE_ENGINE=yes"
+    "-DCMAKE_VERBOSE_MAKEFILE=yes"
     "-DHAVE_IPV6=yes"
     "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
     "-DMYSQL_DATADIR=/var/lib/mysql"
-    "-DINSTALL_SYSCONFDIR=etc/mysql"
     "-DINSTALL_INFODIR=share/mysql/docs"
     "-DINSTALL_MANDIR=share/man"
     "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
@@ -43,6 +49,7 @@ stdenv.mkDerivation rec {
     "-DINSTALL_SHAREDIR=share/mysql"
   ];
 
+  CXXFLAGS = "-fpermissive";
   NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
 
   prePatch = ''
@@ -50,15 +57,22 @@ stdenv.mkDerivation rec {
   '';
   postInstall = ''
     sed -i -e "s|basedir=\"\"|basedir=\"$out\"|" $out/bin/mysql_install_db
-    rm -r $out/mysql-test "$out"/lib/*.a
-    rm $out/share/man/man1/mysql-test-run.pl.1
+    install -vD $out/lib/*.a -t $static/lib
+    rm -r $out/mysql-test
+    rm $out/share/man/man1/mysql-test-run.pl.1 $out/lib/*.a
+    ln -s libmysqlclient${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libmysqlclient_r${stdenv.hostPlatform.extensions.sharedLibrary}
   '';
 
-  passthru.mysqlVersion = "5.7";
+  passthru = {
+    client = self;
+    connector-c = self;
+    server = self;
+    mysqlVersion = "5.7";
+  };
 
   meta = {
-    homepage = http://www.mysql.com/;
+    homepage = https://www.mysql.com/;
     description = "The world's most popular open source database";
     platforms = stdenv.lib.platforms.unix;
   };
-}
+}; in self
diff --git a/pkgs/servers/sql/mysql/jdbc/default.nix b/pkgs/servers/sql/mysql/jdbc/default.nix
index 046eb6cfca9..66e62b823d9 100644
--- a/pkgs/servers/sql/mysql/jdbc/default.nix
+++ b/pkgs/servers/sql/mysql/jdbc/default.nix
@@ -1,12 +1,12 @@
 {stdenv, fetchurl, ant, unzip}:
 
 stdenv.mkDerivation rec {
-  name = "mysql-connector-java-5.1.39";
+  name = "mysql-connector-java-5.1.46";
   builder = ./builder.sh;
 
   src = fetchurl {
     url = "http://dev.mysql.com/get/Downloads/Connector-J/${name}.zip";
-    sha256 = "0d0g51hfx7a2r6nbni8yramg4vpqk0sql0aaib6q576a0nnrq78r";
+    sha256 = "0dfjshrrx0ndfb6xbdpwhn1f1jkw0km57rgpar0ny8ixmgdnlwnm";
   };
 
   buildInputs = [ unzip ant ];
diff --git a/pkgs/servers/sql/oracle-xe/default.nix b/pkgs/servers/sql/oracle-xe/default.nix
index e86406cd469..9068ca70cc6 100644
--- a/pkgs/servers/sql/oracle-xe/default.nix
+++ b/pkgs/servers/sql/oracle-xe/default.nix
@@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
       makeWrapper "$i" "$out/bin/''${i##*/}" \
         --set ORACLE_HOME "$out/libexec/oracle" \
         --set ORACLE_SID XE \
-        --set NLS_LANG '$("'"$out"'/libexec/oracle/bin/nls_lang.sh")' \
+        --run "export NLS_LANG=\$($out/libexec/oracle/bin/nls_lang.sh)" \
         --prefix PATH : "$out/libexec/oracle/bin"
     done
   '';
diff --git a/pkgs/servers/sql/percona/5.6.x.nix b/pkgs/servers/sql/percona/5.6.x.nix
index fc6c54f82c9..e440f11b2e4 100644
--- a/pkgs/servers/sql/percona/5.6.x.nix
+++ b/pkgs/servers/sql/percona/5.6.x.nix
@@ -57,5 +57,6 @@ stdenv.mkDerivation rec {
     platforms = platforms.linux;
     license = licenses.gpl2;
     maintainers = with maintainers; [ grahamc ];
+    broken = true; # 2018-04-11
   };
 }
diff --git a/pkgs/servers/sql/pgbouncer/default.nix b/pkgs/servers/sql/pgbouncer/default.nix
new file mode 100644
index 00000000000..7906546ec1c
--- /dev/null
+++ b/pkgs/servers/sql/pgbouncer/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, openssl, libevent }:
+
+stdenv.mkDerivation rec {
+  name = "pgbouncer-${version}";
+  version = "1.8.1";
+
+  src = fetchurl {
+    url = "https://pgbouncer.github.io/downloads/files/${version}/${name}.tar.gz";
+    sha256 = "1j4d7rkivg3vg27pvirigq9cy4v7pi48x7w57baq131c5lmdx2zs";
+  };
+
+  buildInputs = [ libevent openssl ];
+
+  meta = with stdenv.lib; {
+    homepage = https://pgbouncer.github.io;
+    description = "Lightweight connection pooler for PostgreSQL";
+    license = licenses.isc;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/servers/sql/pgpool/default.nix b/pkgs/servers/sql/pgpool/default.nix
index 775621e64b4..781d25490d2 100644
--- a/pkgs/servers/sql/pgpool/default.nix
+++ b/pkgs/servers/sql/pgpool/default.nix
@@ -1,14 +1,16 @@
 { stdenv, fetchurl, postgresql, openssl, pam ? null, libmemcached ? null }:
 
 stdenv.mkDerivation rec {
-  name = "pgpool-II-3.4.2";
+  name = "pgpool-II-3.4.14";
 
   src = fetchurl {
     name = "${name}.tar.gz";
     url = "http://www.pgpool.net/download.php?f=${name}.tar.gz";
-    sha256 = "0lf3fvwc2ib4md25a3hnv822nhy9ac06vg0ndw8q9bry66hzwcfh";
+    sha256 = "1paak83f4lv48xckmf2znryrvhmdz86w4v97mcw2gxm50hcl74sw";
   };
 
+  patches = [ ./pgpool-II-3.4.14-glibc-2.26.patch ];
+
   buildInputs = [ postgresql openssl pam libmemcached ];
 
   configureFlags = [
@@ -22,6 +24,8 @@ stdenv.mkDerivation rec {
     "sysconfdir=\${out}/etc"
   ];
 
+  enableParallelBuilding = true;
+
   meta = with stdenv.lib; {
     homepage = http://pgpool.net/mediawiki/index.php;
     description = "A middleware that works between postgresql servers and postgresql clients";
diff --git a/pkgs/servers/sql/pgpool/pgpool-II-3.4.14-glibc-2.26.patch b/pkgs/servers/sql/pgpool/pgpool-II-3.4.14-glibc-2.26.patch
new file mode 100644
index 00000000000..6efffff0c6d
--- /dev/null
+++ b/pkgs/servers/sql/pgpool/pgpool-II-3.4.14-glibc-2.26.patch
@@ -0,0 +1,12 @@
+diff --git a/src/watchdog/wd_lifecheck.c b/src/watchdog/wd_lifecheck.c
+index 1e72307..5cf68a3 100644
+--- a/src/watchdog/wd_lifecheck.c
++++ b/src/watchdog/wd_lifecheck.c
+@@ -26,6 +26,7 @@
+ #include <ctype.h>
+ #include <time.h>
+ #include <string.h>
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <netdb.h>
diff --git a/pkgs/servers/sql/postgresql/cstore_fdw/default.nix b/pkgs/servers/sql/postgresql/cstore_fdw/default.nix
new file mode 100644
index 00000000000..70b8abf2502
--- /dev/null
+++ b/pkgs/servers/sql/postgresql/cstore_fdw/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, postgresql, protobufc }:
+
+stdenv.mkDerivation rec {
+  name = "cstore_fdw-${version}";
+  version = "1.6.0";
+
+  nativeBuildInputs = [ protobufc ];
+  buildInputs = [ postgresql ];
+
+  src = fetchFromGitHub {
+    owner  = "citusdata";
+    repo   = "cstore_fdw";
+    rev    = "refs/tags/v${version}";
+    sha256 = "08jbx4hs2r742flilydp0ajjwv8ffnvq82nidh48irrfa4i7n0l0";
+  };
+
+  installPhase = ''
+    mkdir -p $out/{lib,share/extension}
+
+    cp *.so      $out/lib
+    cp *.sql     $out/share/extension
+    cp *.control $out/share/extension
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Columnar storage for PostgreSQL";
+    homepage    = https://www.citusdata.com/;
+    maintainers = with maintainers; [ thoughtpolice ];
+    platforms   = platforms.linux;
+    license     = licenses.asl20;
+  };
+}
diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix
index cf3349dc166..a2093962ea9 100644
--- a/pkgs/servers/sql/postgresql/default.nix
+++ b/pkgs/servers/sql/postgresql/default.nix
@@ -58,16 +58,18 @@ let
         # Prevent a retained dependency on gcc-wrapper.
         substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv.cc}/bin/ld ld
 
-        # Remove static libraries in case dynamic are available.
-        for i in $out/lib/*.a; do
-          name="$(basename "$i")"
-          if [ -e "$lib/lib/''${name%.a}.so" ] || [ -e "''${i%.a}.so" ]; then
-            rm "$i"
-          fi
-        done
+        if [ -z "''${dontDisableStatic:-}" ]; then
+          # Remove static libraries in case dynamic are available.
+          for i in $out/lib/*.a; do
+            name="$(basename "$i")"
+            if [ -e "$lib/lib/''${name%.a}.so" ] || [ -e "''${i%.a}.so" ]; then
+              rm "$i"
+            fi
+          done
+        fi
       '';
 
-    postFixup = lib.optionalString (!stdenv.isDarwin)
+    postFixup = lib.optionalString (!stdenv.isDarwin && stdenv.hostPlatform.libc == "glibc")
       ''
         # initdb needs access to "locale" command from glibc.
         wrapProgram $out/bin/initdb --prefix PATH ":" ${glibc.bin}/bin
@@ -91,33 +93,33 @@ let
 in {
 
   postgresql93 = common {
-    version = "9.3.19";
+    version = "9.3.22";
     psqlSchema = "9.3";
-    sha256 = "1d9gmi1psg4aa6h6ylvsrdm5jnnb7p36pn4h2qrvl9z9v4n8g7pv";
+    sha256 = "06p9rk2bav41ybp8ra1bpf44avw9kl5s1wyql21n5awvlm5fs60v";
   };
 
   postgresql94 = common {
-    version = "9.4.14";
+    version = "9.4.17";
     psqlSchema = "9.4";
-    sha256 = "0szc0navrcjnpyafw2sai8cmwr3znsy0w6031lv7n1ab20xg4zcf";
+    sha256 = "1inpkwbr2xappz3kq3jr3hsn6mwn167nijcx406q8aq56p9hqcks";
   };
 
   postgresql95 = common {
-    version = "9.5.9";
+    version = "9.5.12";
     psqlSchema = "9.5";
-    sha256 = "1m6d4y3m3ir20dzl6q3s3yvmr0a7hq3si2v1hg5hanmbck3db379";
+    sha256 = "167nlrpsnqz63gafgn21j4yc2f5g1mpfkz8qxjxk2xs6crf6zs02";
   };
 
   postgresql96 = common {
-    version = "9.6.5";
+    version = "9.6.8";
     psqlSchema = "9.6";
-    sha256 = "0k3ls2x182jz6djjiqj9kycddabdl2gk1y1ajq1vipnxwfki5nh6";
+    sha256 = "0w7bwf19wbdd3jjbjv03cnx56qka4801srcbsayk9v792awv7zga";
   };
 
   postgresql100 = common {
-    version = "10.0";
+    version = "10.3";
     psqlSchema = "10.0";
-    sha256 = "1lbzwpmdxmk5bh0ix0rn72qbd52dq5cb55nzajscb0bvwa95abvi";
+    sha256 = "06lkcwsf851z49zqcws5yc77s2yrbaazf2nvbk38hpp31rw6i8kf";
   };
 
 }
diff --git a/pkgs/servers/sql/postgresql/jdbc/default.nix b/pkgs/servers/sql/postgresql/jdbc/default.nix
index 39b574ae96d..62ebf6b4453 100644
--- a/pkgs/servers/sql/postgresql/jdbc/default.nix
+++ b/pkgs/servers/sql/postgresql/jdbc/default.nix
@@ -1,24 +1,21 @@
-{ stdenv, fetchurl, ant, jdk }:
-
-let version = "9.3-1100"; in
+{ stdenv, fetchMavenArtifact }:
 
 stdenv.mkDerivation rec {
   name = "postgresql-jdbc-${version}";
+  version = "42.2.2";
 
-  src = fetchurl {
-    url = "http://jdbc.postgresql.org/download/postgresql-jdbc-${version}.src.tar.gz";
-    sha256 = "0mbdzhzg4ws0i7ps98rg0q5n68lsrdm2klj7y7skaix0rpa57gp6";
+  src = fetchMavenArtifact {
+    artifactId = "postgresql";
+    groupId = "org.postgresql";
+    sha256 = "0w7sfi1gmzqhyhr4iq9znv8hff41xwwqcblkyd9ph0m34r0555hr";
+    inherit version;
   };
 
-  buildInputs = [ ant jdk ];
-
-  buildPhase = "ant";
+  phases = [ "installPhase" ];
 
-  installPhase =
-    ''
-      mkdir -p $out/share/java
-      cp jars/*.jar $out/share/java
-    '';
+  installPhase = ''
+    install -D $src/share/java/*_postgresql-${version}.jar $out/share/java/postgresql-jdbc.jar
+  '';
 
   meta = with stdenv.lib; {
     homepage = https://jdbc.postgresql.org/;
diff --git a/pkgs/servers/sql/postgresql/pg_cron/default.nix b/pkgs/servers/sql/postgresql/pg_cron/default.nix
new file mode 100644
index 00000000000..c5a7a40546e
--- /dev/null
+++ b/pkgs/servers/sql/postgresql/pg_cron/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, postgresql }:
+
+stdenv.mkDerivation rec {
+  name = "pg_cron-${version}";
+  version = "1.0.2";
+
+  buildInputs = [ postgresql ];
+
+  src = fetchFromGitHub {
+    owner  = "citusdata";
+    repo   = "pg_cron";
+    rev    = "refs/tags/v${version}";
+    sha256 = "0z743bbal9j0pvqskznfj0zvjsqvdl7p90d4fdrl0sc0crc3nvyx";
+  };
+
+  installPhase = ''
+    mkdir -p $out/{lib,share/extension}
+
+    cp *.so      $out/lib
+    cp *.sql     $out/share/extension
+    cp *.control $out/share/extension
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Run Cron jobs through PostgreSQL";
+    homepage    = https://www.citusdata.com/;
+    maintainers = with maintainers; [ thoughtpolice ];
+    platforms   = platforms.linux;
+    license     = licenses.postgresql;
+  };
+}
diff --git a/pkgs/servers/sql/postgresql/pg_hll/default.nix b/pkgs/servers/sql/postgresql/pg_hll/default.nix
new file mode 100644
index 00000000000..6c453f6a40c
--- /dev/null
+++ b/pkgs/servers/sql/postgresql/pg_hll/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, postgresql }:
+
+stdenv.mkDerivation rec {
+  name = "pg_hll-${version}";
+  version = "2.10.2-${builtins.substring 0 7 src.rev}";
+
+  buildInputs = [ postgresql ];
+
+  src = fetchFromGitHub {
+    owner  = "citusdata";
+    repo   = "postgresql-hll";
+    rev    = "9af41684d479a3097bab87d04936702c9e6baf5c";
+    sha256 = "044x9v9kjhxb0idqb9f5i7c3yygxxsqliswl4kspqy9f9qcblckl";
+  };
+
+  installPhase = ''
+    mkdir -p $out/{lib,share/extension}
+
+    cp *.so      $out/lib
+    cp *.sql     $out/share/extension
+    cp *.control $out/share/extension
+  '';
+
+  meta = with stdenv.lib; {
+    description = "HyperLogLog for PostgreSQL";
+    homepage    = https://www.citusdata.com/;
+    maintainers = with maintainers; [ thoughtpolice ];
+    platforms   = platforms.linux;
+    license     = licenses.asl20;
+  };
+}
diff --git a/pkgs/servers/sql/postgresql/pg_repack/default.nix b/pkgs/servers/sql/postgresql/pg_repack/default.nix
index 0a25b314506..50c9c68bb5f 100644
--- a/pkgs/servers/sql/postgresql/pg_repack/default.nix
+++ b/pkgs/servers/sql/postgresql/pg_repack/default.nix
@@ -1,17 +1,16 @@
 { stdenv, fetchFromGitHub, postgresql, openssl, zlib, readline }:
 
 stdenv.mkDerivation rec {
-    name = "pg_repack-${version}.1";
-    version = "1.4.0";
-    rev = "ver_${version}.1";
+    name = "pg_repack-${version}";
+    version = "1.4.2";
 
     buildInputs = [ postgresql openssl zlib readline ];
 
     src = fetchFromGitHub {
-      owner = "reorg";
-      repo = "pg_repack";
-      inherit rev;
-      sha256 = "1ym2dlhgcizyy4p5dcfw7kadrq6g34pv3liyfx604irprzhw9k74";
+      owner  = "reorg";
+      repo   = "pg_repack";
+      rev    = "refs/tags/ver_${version}";
+      sha256 = "1yv5x7dgiv1miazbngkrkdbc2zpwklj6nlligghjvv83bcl8969q";
     };
 
     installPhase = ''
diff --git a/pkgs/servers/sql/postgresql/pgroonga/default.nix b/pkgs/servers/sql/postgresql/pgroonga/default.nix
index 78ad88bc904..eb6f5f94810 100644
--- a/pkgs/servers/sql/postgresql/pgroonga/default.nix
+++ b/pkgs/servers/sql/postgresql/pgroonga/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "pgroonga-${version}";
-  version = "1.1.9";
+  version = "2.0.5";
 
   src = fetchurl {
     url = "http://packages.groonga.org/source/pgroonga/${name}.tar.gz";
-    sha256 = "07afgwll8nxfb7ziw3qrvw0ryjjw3994vj2f6alrjwpg7ynb46ag";
+    sha256 = "1c4m1rg3122y8rndgz7sj9a49l3v9nm0qbpa04pls20pxzx21g5a";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/servers/sql/postgresql/pgtap/default.nix b/pkgs/servers/sql/postgresql/pgtap/default.nix
index b17446ca778..1206e50926e 100644
--- a/pkgs/servers/sql/postgresql/pgtap/default.nix
+++ b/pkgs/servers/sql/postgresql/pgtap/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "pgtap-${version}";
-  version = "0.97.0";
+  version = "0.98.0";
 
   src = fetchFromGitHub {
     owner = "theory";
     repo = "pgtap";
     rev = "v${version}";
-    sha256 = "1vzc8pxzi0rbywmrvx7i5awngsvzcz75i4jl9bk2vqr223chax6f";
+    sha256 = "17r3b409k05pbypmwdwgm1fl669jc6a1391szyxizx784k44a369";
   };
 
   nativeBuildInputs = [ postgresql perl perlPackages.TAPParserSourceHandlerpgTAP which ];
diff --git a/pkgs/servers/sql/postgresql/timescaledb/default.nix b/pkgs/servers/sql/postgresql/timescaledb/default.nix
index 223bd6e470b..e1a4aed3b7e 100644
--- a/pkgs/servers/sql/postgresql/timescaledb/default.nix
+++ b/pkgs/servers/sql/postgresql/timescaledb/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, postgresql }:
+{ stdenv, fetchFromGitHub, cmake, postgresql }:
 
 # # To enable on NixOS:
 # config.services.postgresql = {
@@ -8,29 +8,37 @@
 
 stdenv.mkDerivation rec {
   name = "timescaledb-${version}";
-  version = "0.6.0";
+  version = "0.9.1";
 
+  nativeBuildInputs = [ cmake ];
   buildInputs = [ postgresql ];
 
   src = fetchFromGitHub {
-    owner = "timescale";
-    repo = "timescaledb";
-    rev = version;
-    sha256 = "061z1ll3x7ca7fj12rl2difkdvmqykksqhpsql552qkkylg7iq4d";
+    owner  = "timescale";
+    repo   = "timescaledb";
+    rev    = "refs/tags/${version}";
+    sha256 = "00k8fk5a1xpv9nxlmafnngk31wh80h6m72vsl1hnyq7nhby7ylic";
   };
 
-  installPhase = ''
-    mkdir -p $out/bin
-    install -D timescaledb.so      -t $out/lib
-    install -D timescaledb.control -t $out/share/extension
-    cp -dpR    sql/*                  $out/share/extension/
+  # Fix the install phase which tries to install into the pgsql extension dir,
+  # and cannot be manually overridden. This is rather fragile but works OK.
+  patchPhase = ''
+    for x in CMakeLists.txt sql/CMakeLists.txt; do
+      substituteInPlace "$x" \
+        --replace 'DESTINATION "''${PG_SHAREDIR}/extension"' "DESTINATION \"$out/share/extension\""
+    done
+
+    for x in src/CMakeLists.txt src/loader/CMakeLists.txt; do
+      substituteInPlace "$x" \
+        --replace 'DESTINATION ''${PG_PKGLIBDIR}' "DESTINATION \"$out/lib\""
+    done
   '';
 
   meta = with stdenv.lib; {
     description = "Scales PostgreSQL for time-series data via automatic partitioning across time and space";
-    homepage = https://www.timescale.com/;
+    homepage    = https://www.timescale.com/;
     maintainers = with maintainers; [ volth ];
-    platforms = platforms.linux;
-    license = licenses.postgresql;
+    platforms   = platforms.linux;
+    license     = licenses.postgresql;
   };
 }
diff --git a/pkgs/servers/sql/postgresql/topn/default.nix b/pkgs/servers/sql/postgresql/topn/default.nix
new file mode 100644
index 00000000000..6886c80cf50
--- /dev/null
+++ b/pkgs/servers/sql/postgresql/topn/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, postgresql, protobufc }:
+
+stdenv.mkDerivation rec {
+  name = "pg_topn-${version}";
+  version = "2.0.2";
+
+  nativeBuildInputs = [ protobufc ];
+  buildInputs = [ postgresql ];
+
+  src = fetchFromGitHub {
+    owner  = "citusdata";
+    repo   = "postgresql-topn";
+    rev    = "refs/tags/v${version}";
+    sha256 = "00hc3hgnqv9xaalizbcvprb7s55sydj2qgk3rhgrdlwg2g025h62";
+  };
+
+  installPhase = ''
+    mkdir -p $out/{lib,share/extension}
+
+    cp *.so      $out/lib
+    cp *.sql     $out/share/extension
+    cp *.control $out/share/extension
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Efficient querying of 'top values' for PostgreSQL";
+    homepage    = https://www.citusdata.com/;
+    maintainers = with maintainers; [ thoughtpolice ];
+    platforms   = platforms.linux;
+    license     = licenses.agpl3;
+  };
+}
diff --git a/pkgs/servers/sql/sqlite/jdbc/default.nix b/pkgs/servers/sql/sqlite/jdbc/default.nix
new file mode 100644
index 00000000000..5b0425c410f
--- /dev/null
+++ b/pkgs/servers/sql/sqlite/jdbc/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  version = "3.20.0";
+  pname = "sqlite-jdbc";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/xerial/${pname}/downloads/${name}.jar";
+    sha256 = "0wxfxnq2ghiwy2mwz3rljgmy1lciafhrw80lprvqz6iw8l51qfql";
+  };
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    install -D "${src}" "$out/share/java/${name}.jar"
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/xerial/sqlite-jdbc";
+    description = "SQLite JDBC Driver";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ jraygauthier ];
+  };
+}
+
diff --git a/pkgs/servers/sql/virtuoso/7.x.nix b/pkgs/servers/sql/virtuoso/7.x.nix
index a24daa70812..bf2a51f6596 100644
--- a/pkgs/servers/sql/virtuoso/7.x.nix
+++ b/pkgs/servers/sql/virtuoso/7.x.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, libxml2, openssl, readline, gawk }:
 
 stdenv.mkDerivation rec {
-  name = "virtuoso-opensource-7.0.0";
+  name = "virtuoso-opensource-7.2.4.2";
 
   src = fetchurl {
     url = "mirror://sourceforge/virtuoso/${name}.tar.gz";
-    sha256 = "1z0jdzayv45y57jj8kii6csqfjhswcs8s2krqqfhab54xy6gynbl";
+    sha256 = "12dqam1gc1v93l0bj0vlpvjqppki6y1hqrlznywxnw0rrz9pb002";
   };
 
   buildInputs = [ libxml2 openssl readline gawk ];
diff --git a/pkgs/servers/squid/4.nix b/pkgs/servers/squid/4.nix
index 9f43af418e6..4c76173a280 100644
--- a/pkgs/servers/squid/4.nix
+++ b/pkgs/servers/squid/4.nix
@@ -2,16 +2,20 @@
 , expat, libxml2, openssl }:
 
 stdenv.mkDerivation rec {
-  name = "squid-4.0.21";
+  name = "squid-4.0.24";
 
   src = fetchurl {
     url = "http://www.squid-cache.org/Versions/v4/${name}.tar.xz";
-    sha256 = "0cwfj3qpl72k5l1h2rvkv1xg0720rifk4wcvi49z216hznyqwk8m";
+    sha256 = "01vayx86sakfy9zz2q5cvzv97865l1zb0jkqbh7wqz9hcgbs0789";
   };
 
   buildInputs = [
-    perl openldap pam db cyrus_sasl libcap expat libxml2 openssl
-  ];
+    perl openldap db cyrus_sasl expat libxml2 openssl
+  ] ++ stdenv.lib.optionals stdenv.isLinux [ libcap pam ];
+
+  prePatch = ''
+    substituteInPlace configure --replace "/usr/local/include/libxml2" "${libxml2.dev}/include/libxml2"
+  '';
 
   configureFlags = [
     "--enable-ipv6"
@@ -19,12 +23,11 @@ stdenv.mkDerivation rec {
     "--disable-arch-native"
     "--with-openssl"
     "--enable-ssl-crtd"
-    "--enable-linux-netfilter"
     "--enable-storeio=ufs,aufs,diskd,rock"
     "--enable-removal-policies=lru,heap"
     "--enable-delay-pools"
     "--enable-x-accelerator-vary"
-  ];
+  ] ++ stdenv.lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isMusl) "--enable-linux-netfilter";
 
   meta = with stdenv.lib; {
     description = "A caching proxy for the Web supporting HTTP, HTTPS, FTP, and more";
diff --git a/pkgs/servers/squid/default.nix b/pkgs/servers/squid/default.nix
index 2da0316483b..8d39fbbcef4 100644
--- a/pkgs/servers/squid/default.nix
+++ b/pkgs/servers/squid/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, perl, openldap, pam, db, cyrus_sasl, libcap
+{ stdenv, fetchurl, fetchpatch, perl, openldap, pam, db, cyrus_sasl, libcap
 , expat, libxml2, openssl }:
 
 stdenv.mkDerivation rec {
@@ -10,7 +10,20 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    perl openldap pam db cyrus_sasl libcap expat libxml2 openssl
+    perl openldap db cyrus_sasl expat libxml2 openssl
+  ] ++ stdenv.lib.optionals stdenv.isLinux [ libcap pam ];
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2018-1000024.patch";
+      url = http://www.squid-cache.org/Versions/v3/3.5/changesets/SQUID-2018_1.patch;
+      sha256 = "0vzxr4rmybz0w4c1hi3szvqawbzl4r4b8wyvq9vgq1mzkk5invpg";
+    })
+    (fetchpatch {
+      name = "CVE-2018-1000027.patch";
+      url = http://www.squid-cache.org/Versions/v3/3.5/changesets/SQUID-2018_2.patch;
+      sha256 = "1a8hwk9z7h1j0c57anfzp3bwjd4pjbyh8aks4ca79nwz4d0y6wf3";
+    })
   ];
 
   configureFlags = [
@@ -19,12 +32,11 @@ stdenv.mkDerivation rec {
     "--disable-arch-native"
     "--with-openssl"
     "--enable-ssl-crtd"
-    "--enable-linux-netfilter"
     "--enable-storeio=ufs,aufs,diskd,rock"
     "--enable-removal-policies=lru,heap"
     "--enable-delay-pools"
     "--enable-x-accelerator-vary"
-  ];
+  ] ++ stdenv.lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isMusl) "--enable-linux-netfilter";
 
   meta = with stdenv.lib; {
     description = "A caching proxy for the Web supporting HTTP, HTTPS, FTP, and more";
diff --git a/pkgs/servers/sslh/default.nix b/pkgs/servers/sslh/default.nix
index 7b98ded5dc1..bbb9b6ca519 100644
--- a/pkgs/servers/sslh/default.nix
+++ b/pkgs/servers/sslh/default.nix
@@ -1,17 +1,17 @@
-{ stdenv, fetchurl, libcap, libconfig, perl, tcp_wrappers }:
+{ stdenv, fetchurl, libcap, libconfig, perl, tcp_wrappers, pcre }:
 
 stdenv.mkDerivation rec {
   name = "sslh-${version}";
-  version = "1.18";
+  version = "1.19c";
 
   src = fetchurl {
     url = "http://www.rutschle.net/tech/sslh/sslh-v${version}.tar.gz";
-    sha256 = "1ba5fxd2s6jh9n3wbp2a782q7syc4m6qvfrggnscdbywfyrsa08n";
+    sha256 = "1wvvqj9r293skgqi28q4ixz7zwf301h1bf514p41xbi7ifldy4dv";
   };
 
   postPatch = "patchShebangs *.sh";
 
-  buildInputs = [ libcap libconfig perl tcp_wrappers ];
+  buildInputs = [ libcap libconfig perl tcp_wrappers pcre ];
 
   makeFlags = "USELIBCAP=1 USELIBWRAP=1";
 
diff --git a/pkgs/servers/teleport/default.nix b/pkgs/servers/teleport/default.nix
new file mode 100644
index 00000000000..0f08d94a052
--- /dev/null
+++ b/pkgs/servers/teleport/default.nix
@@ -0,0 +1,41 @@
+# This file was generated by https://github.com/kamilchm/go2nix v2.0-dev
+{ stdenv, buildGoPackage, zip, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "teleport-${version}";
+  version = "2.4.1";
+
+  # This repo has a private submodule "e" which fetchgit cannot handle without failing.
+  src = fetchFromGitHub {
+    owner = "gravitational";
+    repo = "teleport";
+    rev = "v${version}";
+    sha256 = "09kmlihv4aqc39f9cyv2vm0kqgdf9vmdrgds5krnzqdgy3svyg7y";
+  };
+
+  goPackagePath = "github.com/gravitational/teleport";
+  subPackages = [ "tool/tctl" "tool/teleport" "tool/tsh" ];
+  buildInputs = [ zip ];
+  postBuild = ''
+    pushd .
+    cd $NIX_BUILD_TOP/go/src/github.com/gravitational/teleport
+    mkdir -p build
+    echo "making webassets"
+    make build/webassets.zip
+    cat build/webassets.zip >> $NIX_BUILD_TOP/go/bin/teleport
+    rm -fr build/webassets.zip
+    cd $NIX_BUILD_TOP/go/bin
+    zip -q -A teleport
+    popd
+    '';
+
+  dontStrip = true;
+
+  meta = {
+    description = "A SSH CA management suite";
+    homepage = "https://gravitational.com/teleport/";
+    license = stdenv.lib.licenses.asl20;
+    maintainers = [ stdenv.lib.maintainers.tomberek ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/servers/traefik/default.nix b/pkgs/servers/traefik/default.nix
index f1fb1a34fc2..d38405688fc 100644
--- a/pkgs/servers/traefik/default.nix
+++ b/pkgs/servers/traefik/default.nix
@@ -1,24 +1,19 @@
-{ stdenv, buildGoPackage, fetchurl, bash, go-bindata}:
+{ stdenv, buildGoPackage, fetchFromGitHub, bash, go-bindata}:
 
 buildGoPackage rec {
   name = "traefik-${version}";
-  version = "1.3.8";
+  version = "1.5.2";
 
   goPackagePath = "github.com/containous/traefik";
 
-  src = fetchurl {
-    url = "https://github.com/containous/traefik/releases/download/v${version}/traefik-v${version}.src.tar.gz";
-    sha256 = "6fce36dd30bb5ae5f91e69f2950f22fe7a74b920e80c6b441a0721122f6a6174";
+  src = fetchFromGitHub {
+    owner = "containous";
+    repo = "traefik";
+    rev = "v${version}";
+    sha256 = "0cv05nm7jj1g2630l5zmzpmsrjx712ba3l7klh8nqs02mzykzsha";
   };
 
   buildInputs = [ go-bindata bash ];
-  unpackPhase = ''
-    runHook preUnpack
-    mkdir traefik
-    tar -C traefik -xvzf $src
-    export sourceRoot="traefik"
-    runHook postUnpack
-  '';
 
   buildPhase = ''
     runHook preBuild
diff --git a/pkgs/servers/trezord/default.nix b/pkgs/servers/trezord/default.nix
index bdc37b700e5..a3c50564621 100644
--- a/pkgs/servers/trezord/default.nix
+++ b/pkgs/servers/trezord/default.nix
@@ -1,65 +1,26 @@
-{ stdenv, fetchgit, fetchFromGitHub, curl, cmake, boost, gcc, protobuf, pkgconfig, jsoncpp
-, libusb1, libmicrohttpd
-}:
+{ stdenv, buildGoPackage, fetchFromGitHub }:
 
-let
-  version = "1.2.1";
-in
+buildGoPackage rec {
+  name = "trezord-go-${version}";
+  version = "2.0.12";
 
-stdenv.mkDerivation rec {
-  name = "trezord-${version}";
+  # Fixes Cgo related build failures (see https://github.com/NixOS/nixpkgs/issues/25959 )
+  hardeningDisable = [ "fortify" ];
 
-  src = fetchgit {
-    url    = "https://github.com/trezor/trezord";
-    rev    = "refs/tags/v${version}";
-    sha256 = "1iaxmwyidjdcrc6jg0859v6v5x3qnz5b0p78pq0bypvmgyijhpm4";
-  };
+  goPackagePath = "github.com/trezor/trezord-go";
 
-  common = fetchFromGitHub {
-    owner = "trezor";
-    repo = "trezor-common";
-    rev = "b55fb61218431e9c99c9d6c1673801902fc9e92e";
-    sha256 = "1zanbgz1qjs8wfwp0z91sqcvj77a9iis694k415jyd2dn4riqhdg";
+  src = fetchFromGitHub {
+    owner  = "trezor";
+    repo   = "trezord-go";
+    rev    = "v${version}";
+    sha256 = "03pz223jjfbd0g9gkk21q6d27jc8vd1bc1jz00i0f3dzvsyfx5g6";
   };
 
   meta = with stdenv.lib; {
-    description = "TREZOR Bridge daemon for TREZOR bitcoin hardware wallet";
+    description = "TREZOR Communication Daemon aka TREZOR Bridge";
     homepage = https://mytrezor.com;
     license = licenses.gpl3;
     maintainers = with stdenv.lib.maintainers; [ canndrew jb55 ];
     platforms = platforms.linux;
   };
-
-  patches = [ ./dynamic-link.patch ];
-
-  nativeBuildInputs = [
-    cmake
-    gcc
-    pkgconfig
-  ];
-
-  buildInputs = [
-    curl
-    boost
-    protobuf
-    libusb1
-    libmicrohttpd
-    jsoncpp
-  ];
-
-  preConfigure = ''
-    ( cd src/config
-      ln -s $common/protob/config.proto
-      protoc -I . --cpp_out=. config.proto
-    )
-  '';
-
-  LD_LIBRARY_PATH = "${stdenv.lib.makeLibraryPath [ curl ]}";
-  cmakeFlags = [ "-DJSONCPP_LIBRARY='${jsoncpp}/lib/libjsoncpp.so'" ];
-
-  installPhase = ''
-    mkdir -p $out/bin
-    cp trezord $out/bin
-  '';
 }
-
diff --git a/pkgs/servers/trezord/dynamic-link.patch b/pkgs/servers/trezord/dynamic-link.patch
deleted file mode 100644
index 0f1f448a3f7..00000000000
--- a/pkgs/servers/trezord/dynamic-link.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7c0e2cf..0e3f4ac 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -59,13 +59,6 @@ target_link_libraries(trezord ${OS_LIBRARIES})
- find_package(CURL REQUIRED)
- find_package(libmicrohttpd REQUIRED)
- 
--# add static libs
--if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
--  set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
--  set(BUILD_SHARED_LIBS off)
--  set(Boost_USE_STATIC_LIBS on)
--  set(CMAKE_FIND_STATIC FIRST)
--endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- find_package(Boost 1.53.0 REQUIRED
-   regex thread system unit_test_framework program_options chrono)
- find_package(Protobuf 2.5.0 REQUIRED)
diff --git a/pkgs/servers/tt-rss/default.nix b/pkgs/servers/tt-rss/default.nix
index 8724adfdad6..6f584bfabd3 100644
--- a/pkgs/servers/tt-rss/default.nix
+++ b/pkgs/servers/tt-rss/default.nix
@@ -1,13 +1,13 @@
-{ stdenv, fetchgit }:
+{ stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
   name = "tt-rss-${version}";
-  version = "17.4";
+  version = "2018-04-05";
+  rev = "963c22646b3e1bd544bd957bf34175b996bd6e53";
 
-  src = fetchgit {
-    url = "https://git.tt-rss.org/git/tt-rss.git";
-    rev = "refs/tags/${version}";
-    sha256 = "07ng21n4pva56cxnxkzd6vzs381zn67psqpm51ym5wnl644jqh08";
+  src = fetchurl {
+    url = "https://git.tt-rss.org/git/tt-rss/archive/${rev}.tar.gz";
+    sha256 = "02vjw5cag5x0rpiqalfrqf7iz21rp8ml5wnfd8pdkxbr8182bw3h";
   };
 
   installPhase = ''
@@ -19,8 +19,7 @@ stdenv.mkDerivation rec {
     description = "Web-based news feed (RSS/Atom) aggregator";
     license = licenses.gpl2Plus;
     homepage = http://tt-rss.org;
-    maintainers = with maintainers; [ zohl ];
+    maintainers = with maintainers; [ globin zohl ];
     platforms = platforms.all;
   };
 }
-
diff --git a/pkgs/servers/tvheadend/default.nix b/pkgs/servers/tvheadend/default.nix
index 7ff0796811a..c0a3b5a28c3 100644
--- a/pkgs/servers/tvheadend/default.nix
+++ b/pkgs/servers/tvheadend/default.nix
@@ -3,7 +3,7 @@
 , which, zlib }:
 
 let
-  version = "4.2.1";
+  version = "4.2.6";
 
 in stdenv.mkDerivation rec {
   name = "tvheadend-${version}";
@@ -12,7 +12,7 @@ in stdenv.mkDerivation rec {
     owner  = "tvheadend";
     repo   = "tvheadend";
     rev    = "v${version}";
-    sha256 = "1lhk8psvifmn4kjwyfxjj21z0apyr59zizzsfd4j22v7bk66rrl9";
+    sha256 = "0rnhk0r34mfmz3cnf735nzkkyal7pnv16hfyrs0g4v5rk99rlab3";
   };
 
   buildInputs = [
@@ -39,7 +39,8 @@ in stdenv.mkDerivation rec {
   preConfigure = ''
     patchShebangs ./configure
 
-    substituteInPlace src/config.c --replace /usr/bin/tar ${gnutar}/bin/tar
+    substituteInPlace src/config.c \
+      --replace /usr/bin/tar ${gnutar}/bin/tar
 
     # the version detection script `support/version` reads this file if it
     # exists, so let's just use that
diff --git a/pkgs/servers/uftp/default.nix b/pkgs/servers/uftp/default.nix
index 102868c0d46..d1ec31d6b85 100644
--- a/pkgs/servers/uftp/default.nix
+++ b/pkgs/servers/uftp/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "uftp-${version}";
-  version = "4.9.4";
+  version = "4.9.6";
 
   src = fetchurl {
     url = "mirror://sourceforge/uftp-multicast/source-tar/uftp-${version}.tar.gz";
-    sha256 = "1npfl7n1w2l0j6c6iizw1szzq0lz9wy6jb55qmwhfkzwj0zd7mqp";
+    sha256 = "0byg7ff39i32ljzqxn6rhiz3zs1b04y50xpvzmjx5v8pmdajn0sz";
   };
 
   buildInputs = [ openssl ];
diff --git a/pkgs/servers/unifi/default.nix b/pkgs/servers/unifi/default.nix
index 71bc0de6d91..e9d2fd07dc5 100644
--- a/pkgs/servers/unifi/default.nix
+++ b/pkgs/servers/unifi/default.nix
@@ -6,11 +6,11 @@
 
 stdenv.mkDerivation rec {
   name = "unifi-controller-${version}";
-  version = "5.6.22";
+  version = "5.6.36";
 
   src = fetchurl {
     url = "https://dl.ubnt.com/unifi/${version}/unifi_sysvinit_all.deb";
-    sha256 = "1ffphdi4df3jhlcl68amb90f5pj7cwyrql4qwbswynh9d623880l";
+    sha256 = "075q7vm56fdsjwh72y2cb1pirl2pxdkvqnhvd3bf1c2n64mvp6bi";
   };
 
   buildInputs = [ dpkg ];
diff --git a/pkgs/servers/uwsgi/default.nix b/pkgs/servers/uwsgi/default.nix
index d30129d93d9..bb3f7985533 100644
--- a/pkgs/servers/uwsgi/default.nix
+++ b/pkgs/servers/uwsgi/default.nix
@@ -4,7 +4,7 @@
 , pam, withPAM ? false
 , systemd, withSystemd ? false
 , python2, python3, ncurses
-, ruby, php-embed
+, ruby, php-embed, mysql
 }:
 
 let pythonPlugin = pkg : lib.nameValuePair "python${if pkg ? isPy2 then "2" else "3"}" {
@@ -33,8 +33,8 @@ let pythonPlugin = pkg : lib.nameValuePair "python${if pkg ? isPy2 then "2" else
                   (lib.nameValuePair "php" {
                     # usage: https://uwsgi-docs.readthedocs.io/en/latest/PHP.html#running-php-apps-with-nginx
                     path = "plugins/php";
-                    preBuild = "touch unix.h";
                     inputs = [ php-embed ] ++ php-embed.buildInputs;
+                    NIX_CFLAGS_LINK = [ "-L${mysql.connector-c}/lib/mysql" ];
                   })
                 ];
 
@@ -49,11 +49,11 @@ in
 
 stdenv.mkDerivation rec {
   name = "uwsgi-${version}";
-  version = "2.0.15";
+  version = "2.0.17";
 
   src = fetchurl {
     url = "http://projects.unbit.it/downloads/${name}.tar.gz";
-    sha256 = "1zvj28wp3c1hacpd4c6ra5ilwvvfq3l8y6gn8i7mnncpddlzjbjp";
+    sha256 = "1wlbaairsmhp6bx5wv282q9pgh6w7w6yrb8vxjznfaxrinsfkhix";
   };
 
   nativeBuildInputs = [ python3 pkgconfig ];
@@ -89,7 +89,7 @@ stdenv.mkDerivation rec {
     ${lib.concatMapStringsSep "\n" (x: x.install or "") needed}
   '';
 
-  NIX_CFLAGS_LINK = [ "-lsystemd" ];
+  NIX_CFLAGS_LINK = [ "-lsystemd" ] ++ lib.concatMap (x: x.NIX_CFLAGS_LINK or []) needed;
 
   meta = with stdenv.lib; {
     homepage = http://uwsgi-docs.readthedocs.org/en/latest/;
diff --git a/pkgs/servers/varnish/default.nix b/pkgs/servers/varnish/default.nix
index 468cc86d889..85192b11c30 100644
--- a/pkgs/servers/varnish/default.nix
+++ b/pkgs/servers/varnish/default.nix
@@ -1,37 +1,53 @@
 { stdenv, fetchurl, pcre, libxslt, groff, ncurses, pkgconfig, readline, libedit
 , python, pythonPackages, makeWrapper }:
 
-stdenv.mkDerivation rec {
-  version = "5.1.3";
-  name = "varnish-${version}";
-
-  src = fetchurl {
-    url = "http://repo.varnish-cache.org/source/${name}.tar.gz";
-    sha256 = "0km50hzjzi1kq85lr3hq519nrp261wb91ixq48vhyd41llycjfbl";
+let
+  common = { version, sha256 }:
+    stdenv.mkDerivation rec {
+      name = "varnish-${version}";
+
+      src = fetchurl {
+        url = "http://varnish-cache.org/_downloads/${name}.tgz";
+        inherit sha256;
+      };
+
+      nativeBuildInputs = [ pkgconfig ];
+      buildInputs = [
+        pcre libxslt groff ncurses readline python libedit
+        pythonPackages.docutils makeWrapper
+      ];
+
+      buildFlags = "localstatedir=/var/spool";
+
+      postInstall = ''
+        wrapProgram "$out/sbin/varnishd" --prefix PATH : "${stdenv.lib.makeBinPath [ stdenv.cc ]}"
+      '';
+
+      # https://github.com/varnishcache/varnish-cache/issues/1875
+      NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isi686 "-fexcess-precision=standard";
+
+      outputs = [ "out" "dev" "man" ];
+
+      meta = with stdenv.lib; {
+        description = "Web application accelerator also known as a caching HTTP reverse proxy";
+        homepage = https://www.varnish-cache.org;
+        license = licenses.bsd2;
+        maintainers = with maintainers; [ garbas fpletz ];
+        platforms = platforms.unix;
+      };
+    };
+in
+{
+  varnish4 = common {
+    version = "4.1.9";
+    sha256 = "11zwyasz2fn9qxc87r175wb5ba7388sd79mlygjmqn3yv2m89n12";
   };
-
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [
-    pcre libxslt groff ncurses readline python libedit
-    pythonPackages.docutils makeWrapper
-  ];
-
-  buildFlags = "localstatedir=/var/spool";
-
-  postInstall = ''
-    wrapProgram "$out/sbin/varnishd" --prefix PATH : "${stdenv.lib.makeBinPath [ stdenv.cc ]}"
-  '';
-
-  # https://github.com/varnishcache/varnish-cache/issues/1875
-  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isi686 "-fexcess-precision=standard";
-
-  outputs = [ "out" "dev" "man" ];
-
-  meta = with stdenv.lib; {
-    description = "Web application accelerator also known as a caching HTTP reverse proxy";
-    homepage = https://www.varnish-cache.org;
-    license = licenses.bsd2;
-    maintainers = with maintainers; [ garbas fpletz ];
-    platforms = platforms.linux ++ platforms.darwin;
+  varnish5 = common {
+    version = "5.2.1";
+    sha256 = "1cqlj12m426c1lak1hr1fx5zcfsjjvka3hfirz47hvy1g2fjqidq";
+  };
+  varnish6 = common {
+    version = "6.0.0";
+    sha256 = "1vhbdch33m6ig4ijy57zvrramhs9n7cba85wd8rizgxjjnf87cn7";
   };
 }
diff --git a/pkgs/servers/varnish/digest.nix b/pkgs/servers/varnish/digest.nix
index 530ae504771..2ccb0419c04 100644
--- a/pkgs/servers/varnish/digest.nix
+++ b/pkgs/servers/varnish/digest.nix
@@ -1,22 +1,22 @@
 { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, varnish, libmhash, docutils }:
 
 stdenv.mkDerivation rec {
-  version = "1.0.1";
-  name = "varnish-digest-${version}";
+  version = "1.0.2";
+  name = "${varnish.name}-digest-${version}";
 
   src = fetchFromGitHub {
     owner = "varnish";
     repo = "libvmod-digest";
     rev = "libvmod-digest-${version}";
-    sha256 = "0v18bqbsblhajpx5qvczic3psijhx5l2p2qlw1dkd6zl33hhppy7";
+    sha256 = "0jwkqqalydn0pwfdhirl5zjhbc3hldvhh09hxrahibr72fgmgpbx";
   };
 
   nativeBuildInputs = [ autoreconfHook pkgconfig docutils ];
   buildInputs = [ varnish libmhash ];
 
   postPatch = ''
-    substituteInPlace autogen.sh  --replace "-I \''${dataroot}/aclocal"                  ""
-    substituteInPlace Makefile.am --replace "-I \''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" ""
+    substituteInPlace autogen.sh  --replace "''${dataroot}/aclocal"                  "${varnish.dev}/share/aclocal"
+    substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
   '';
 
   configureFlags = [ "VMOD_DIR=$(out)/lib/varnish/vmods" ];
diff --git a/pkgs/servers/varnish/dynamic.nix b/pkgs/servers/varnish/dynamic.nix
new file mode 100644
index 00000000000..711bc1cf78f
--- /dev/null
+++ b/pkgs/servers/varnish/dynamic.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, varnish, python, docutils }:
+
+stdenv.mkDerivation rec {
+  version = "0.3";
+  name = "${varnish.name}-dynamic-${version}";
+
+  src = fetchFromGitHub {
+    owner = "nigoroll";
+    repo = "libvmod-dynamic";
+    rev = "475be183fddbd727c3d2523f0518effa9aa881f8"; # 5.2 branch for Varnish-5.2 https://github.com/nigoroll/libvmod-dynamic/commits/5.2
+    sha256 = "12a42lbv0vf6fn3qnvngw893kmbd006f8pgab4ir7irc8855xjgf";
+  };
+
+  nativeBuildInputs = [ pkgconfig docutils autoreconfHook ];
+  buildInputs = [ varnish python ];
+  postPatch = ''
+    substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
+  '';
+  configureFlags = [ "VMOD_DIR=$(out)/lib/varnish/vmods" ];
+
+  meta = with stdenv.lib; {
+    description = "Dynamic director similar to the DNS director from Varnish 3";
+    homepage = https://github.com/nigoroll/libvmod-dynamic;
+    inherit (varnish.meta) license platforms maintainers;
+  };
+}
diff --git a/pkgs/servers/varnish/geoip.nix b/pkgs/servers/varnish/geoip.nix
index 7816b27b14f..d1790252065 100644
--- a/pkgs/servers/varnish/geoip.nix
+++ b/pkgs/servers/varnish/geoip.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   version = "1.0.2";
-  name = "varnish-geoip-${version}";
+  name = "${varnish.name}-geoip-${version}";
 
   src = fetchFromGitHub {
     owner = "varnish";
diff --git a/pkgs/servers/varnish/modules.nix b/pkgs/servers/varnish/modules.nix
index c37fae4ba3d..7775221d163 100644
--- a/pkgs/servers/varnish/modules.nix
+++ b/pkgs/servers/varnish/modules.nix
@@ -1,17 +1,26 @@
-{ stdenv, fetchurl, pkgconfig, varnish, python, docutils }:
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, varnish, python, docutils, removeReferencesTo }:
 
 stdenv.mkDerivation rec {
-  version = "0.10.2";
-  name = "varnish-modules-${version}";
+  version = "0.14.0";
+  name = "${varnish.name}-modules-${version}";
 
-  src = fetchurl {
-    url = "https://download.varnish-software.com/varnish-modules/varnish-modules-${version}.tar.gz";
-    sha256 = "0inw76pm8kcidh0lq7gm3c3bh8v6yps0z7j6ar617b8wf730w1im";
+  src = fetchFromGitHub {
+    owner = "varnish";
+    repo = "varnish-modules";
+    rev = version;
+    sha256 = "17fkbr4i70qgdqsrx1x28ag20xkfyz1v3q3d3ywmv409aczqhm40";
   };
 
-  nativeBuildInputs = [ pkgconfig docutils ];
+  nativeBuildInputs = [ pkgconfig autoreconfHook docutils removeReferencesTo ];
   buildInputs = [ varnish python ];
 
+  postPatch = ''
+    substituteInPlace bootstrap   --replace "''${dataroot}/aclocal"                  "${varnish.dev}/share/aclocal"
+    substituteInPlace Makefile.am --replace "''${LIBVARNISHAPI_DATAROOTDIR}/aclocal" "${varnish.dev}/share/aclocal"
+  '';
+
+  postInstall = "find $out -type f -exec remove-references-to -t ${varnish.dev} '{}' +"; # varnish.dev captured only as __FILE__ in assert messages
+
   meta = with stdenv.lib; {
     description = "Collection of Varnish Cache modules (vmods) by Varnish Software";
     homepage = https://github.com/varnish/varnish-modules;
diff --git a/pkgs/servers/varnish/packages.nix b/pkgs/servers/varnish/packages.nix
new file mode 100644
index 00000000000..f468ac58e6c
--- /dev/null
+++ b/pkgs/servers/varnish/packages.nix
@@ -0,0 +1,22 @@
+{ callPackage, varnish4, varnish5, varnish6 }:
+
+{
+  varnish4Packages = {
+    varnish = varnish4;
+    digest   = callPackage ./digest.nix   { varnish = varnish4; };
+    rtstatus = callPackage ./rtstatus.nix { varnish = varnish4; }; # varnish4 only
+    modules  = callPackage ./modules.nix  { varnish = varnish4; }; # varnish4 and varnish5 only
+    geoip    = callPackage ./geoip.nix    { varnish = varnish4; }; # varnish4 and varnish5 only
+  };
+  varnish5Packages = {
+    varnish = varnish5;
+    digest   = callPackage ./digest.nix   { varnish = varnish5; };
+    dynamic  = callPackage ./dynamic.nix  { varnish = varnish5; }; # varnish5 only (upstream has a separate branch for varnish4)
+    modules  = callPackage ./modules.nix  { varnish = varnish5; }; # varnish4 and varnish5 only
+    geoip    = callPackage ./geoip.nix    { varnish = varnish5; }; # varnish4 and varnish5 only
+  };
+  varnish6Packages = {
+    varnish = varnish6;
+    digest   = callPackage ./digest.nix   { varnish = varnish6; };
+  };
+}
diff --git a/pkgs/servers/varnish/rtstatus.nix b/pkgs/servers/varnish/rtstatus.nix
index 1efa6d5e798..99c0bb17659 100644
--- a/pkgs/servers/varnish/rtstatus.nix
+++ b/pkgs/servers/varnish/rtstatus.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   version = "1.2.0";
-  name = "varnish-rtstatus-${version}";
+  name = "${varnish.name}-rtstatus-${version}";
 
   src = fetchurl {
     url = "https://download.varnish-software.com/libvmod-rtstatus/libvmod-rtstatus-${version}.tar.gz";
diff --git a/pkgs/servers/web-apps/fileshelter/default.nix b/pkgs/servers/web-apps/fileshelter/default.nix
new file mode 100644
index 00000000000..d0be4f575dd
--- /dev/null
+++ b/pkgs/servers/web-apps/fileshelter/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, libzip, boost, wt3, libconfig, pkgconfig } :
+
+stdenv.mkDerivation rec {
+  name = "fileshelter";
+  version = "3.0.0";
+
+  src = fetchFromGitHub {
+    owner = "epoupon";
+    repo = "fileshelter";
+    rev = "v${version}";
+    sha256 = "1n9hrls3l9gf8wfz6m9bylma1b1hdvdqsksv2dlp1zdgjdzv200b";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  buildInputs = [ libzip boost wt3 libconfig ];
+
+  postInstall = ''
+    ln -s ${wt3}/share/Wt/resources $out/share/fileshelter/docroot/resources
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/epoupon/fileshelter;
+    description = "FileShelter is a 'one-click' file sharing web application";
+    maintainers = [ maintainers.willibutz ];
+    license = licenses.gpl3;
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/servers/web-apps/frab/Gemfile.lock b/pkgs/servers/web-apps/frab/Gemfile.lock
index 530c54ebd89..06502ef59ad 100644
--- a/pkgs/servers/web-apps/frab/Gemfile.lock
+++ b/pkgs/servers/web-apps/frab/Gemfile.lock
@@ -180,7 +180,7 @@ GEM
       pry (~> 0.10)
     pry-rails (0.3.4)
       pry (>= 0.9.10)
-    puma (3.6.0)
+    puma (3.9.1)
     rack (1.6.4)
     rack-test (0.6.3)
       rack (>= 1.0)
diff --git a/pkgs/servers/web-apps/frab/gemset.nix b/pkgs/servers/web-apps/frab/gemset.nix
index 9f881579f42..449fbf1a5b6 100644
--- a/pkgs/servers/web-apps/frab/gemset.nix
+++ b/pkgs/servers/web-apps/frab/gemset.nix
@@ -628,10 +628,10 @@
   puma = {
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "1rmcny3jr1jj01f9fqijwmikj212a5iql7ghifklm77x4a8pp399";
+      sha256 = "1k13n500r7v480rcbxm7k09hip0zi7p8zvy3vajj8g9hb7gdcwnp";
       type = "gem";
     };
-    version = "3.6.0";
+    version = "3.9.1";
   };
   rack = {
     source = {
@@ -929,4 +929,4 @@
     };
     version = "0.9.5";
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/servers/web-apps/klaus/default.nix b/pkgs/servers/web-apps/klaus/default.nix
new file mode 100644
index 00000000000..81d1e57e7a0
--- /dev/null
+++ b/pkgs/servers/web-apps/klaus/default.nix
@@ -0,0 +1,40 @@
+{ lib, python, fetchFromGitHub }:
+
+python.pkgs.buildPythonApplication rec {
+  pname = "klaus";
+  version = "1.2.2";
+
+  src = fetchFromGitHub {
+    owner = "jonashaag";
+    repo = pname;
+    rev = version;
+    sha256 = "0hkl1ycyd5ccijmknr3yfp3ga43y01m7390xnibqqgaisfvcm9wp";
+  };
+
+  prePatch = ''
+    substituteInPlace runtests.sh \
+      --replace "mkdir -p \$builddir" "mkdir -p \$builddir && pwd"
+  '';
+
+  propagatedBuildInputs = with python.pkgs; [
+    six flask pygments dulwich httpauth humanize
+  ];
+
+  checkInputs = with python.pkgs; [
+    pytest requests python-ctags3
+  ] ++ lib.optional (!isPy3k) mock;
+
+  checkPhase = ''
+    ./runtests.sh
+  '';
+
+  # Needs to set up some git repos
+  doCheck = false;
+
+  meta = with lib; {
+    description = "The first Git web viewer that Just Works";
+    homepage    = https://github.com/jonashaag/klaus;
+    license     = licenses.isc;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/pkgs/servers/web-apps/piwik/bootstrap.php b/pkgs/servers/web-apps/matomo/bootstrap.php
index a8163f33e5c..a8163f33e5c 100644
--- a/pkgs/servers/web-apps/piwik/bootstrap.php
+++ b/pkgs/servers/web-apps/matomo/bootstrap.php
diff --git a/pkgs/servers/web-apps/matomo/default.nix b/pkgs/servers/web-apps/matomo/default.nix
new file mode 100644
index 00000000000..c8a918c2bd2
--- /dev/null
+++ b/pkgs/servers/web-apps/matomo/default.nix
@@ -0,0 +1,59 @@
+{ stdenv, fetchurl, makeWrapper, php }:
+
+stdenv.mkDerivation rec {
+  name = "matomo-${version}";
+  version = "3.4.0";
+
+  src = fetchurl {
+    # TODO: As soon as the tarballs are renamed as well on future releases, this should be enabled again
+    # url = "https://builds.matomo.org/${name}.tar.gz";
+    url = "https://builds.matomo.org/piwik-${version}.tar.gz";
+    sha256 = "1hnja8mvjvlbqgw7maa76lxd5hxxg7d5ggq9wyrff25mapj398wc";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  # make-localhost-default-database-server.patch:
+  #   This changes the default value of the database server field
+  #   from 127.0.0.1 to localhost.
+  #   unix socket authentication only works with localhost,
+  #   but password-based SQL authentication works with both.
+  # TODO: is upstream interested in this?
+  patches = [ ./make-localhost-default-database-host.patch ];
+
+  # this bootstrap.php adds support for getting PIWIK_USER_PATH
+  # from an environment variable. Point it to a mutable location
+  # to be able to use matomo read-only from the nix store
+  postPatch = ''
+    cp ${./bootstrap.php} bootstrap.php
+  '';
+
+  # TODO: future versions might rename the PIWIK_… variables to MATOMO_…
+  # TODO: Move more unnecessary files from share/, especially using PIWIK_INCLUDE_PATH.
+  #       See https://forum.matomo.org/t/bootstrap-php/5926/10 and
+  #       https://github.com/matomo-org/matomo/issues/11654#issuecomment-297730843
+  installPhase = ''
+    runHook preInstall
+
+    # copy evertything to share/, used as webroot folder, and then remove what's known to be not needed
+    mkdir -p $out/share
+    cp -ra * $out/share/
+    # tmp/ is created by matomo in PIWIK_USER_PATH
+    rmdir $out/share/tmp
+    # config/ needs to be copied to PIWIK_USER_PATH anyway
+    mv $out/share/config $out/
+
+    makeWrapper ${php}/bin/php $out/bin/matomo-console \
+      --add-flags "$out/share/console"
+
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A real-time web analytics application";
+    license = licenses.gpl3Plus;
+    homepage = https://matomo.org/;
+    platforms = platforms.all;
+    maintainers = [ maintainers.florianjacob ];
+  };
+}
diff --git a/pkgs/servers/web-apps/matomo/make-localhost-default-database-host.patch b/pkgs/servers/web-apps/matomo/make-localhost-default-database-host.patch
new file mode 100644
index 00000000000..48808ac2ccc
--- /dev/null
+++ b/pkgs/servers/web-apps/matomo/make-localhost-default-database-host.patch
@@ -0,0 +1,13 @@
+diff --git a/plugins/Installation/FormDatabaseSetup.php b/plugins/Installation/FormDatabaseSetup.php
+index 9364f49870..2625cbb91b 100644
+--- a/plugins/Installation/FormDatabaseSetup.php
++++ b/plugins/Installation/FormDatabaseSetup.php
+@@ -82,7 +82,7 @@ class FormDatabaseSetup extends QuickForm2
+ 
+         // default values
+         $this->addDataSource(new HTML_QuickForm2_DataSource_Array(array(
+-                                                                       'host'          => '127.0.0.1',
++                                                                       'host'          => 'localhost',
+                                                                        'type'          => $defaultDatabaseType,
+                                                                        'tables_prefix' => 'matomo_',
+                                                                   )));
diff --git a/pkgs/servers/web-apps/piwik/default.nix b/pkgs/servers/web-apps/piwik/default.nix
deleted file mode 100644
index e5d6876ecbf..00000000000
--- a/pkgs/servers/web-apps/piwik/default.nix
+++ /dev/null
@@ -1,51 +0,0 @@
-{ stdenv, fetchurl, makeWrapper, php }:
-
-stdenv.mkDerivation rec {
-  name = "piwik-${version}";
-  version = "3.2.0";
-
-  src = fetchurl {
-    url = "https://builds.piwik.org/${name}.tar.gz";
-    sha512 = "21hss97mms5vavfzw41v2p3qsxx0ar8xa3dnr4d2fw2mps8jg3s5ng9i725lqrbl96q7855fh9ymabjsi1zr4q9nif2yap0izaakxib";
-  };
-
-  nativeBuildInputs = [ makeWrapper ];
-
-  # regarding the 127.0.0.1 substitute:
-  #   This replaces the default value of the database server field.
-  #   unix socket authentication only works with localhost,
-  #   but password-based SQL authentication works with both.
-  postPatch = ''
-    substituteInPlace plugins/Installation/FormDatabaseSetup.php \
-      --replace "=> '127.0.0.1'," "=> 'localhost',"
-    cp ${./bootstrap.php} bootstrap.php
-  '';
-
-  # TODO: Move more unnecessary files from share/, especially using PIWIK_INCLUDE_PATH.
-  #       See https://forum.piwik.org/t/bootstrap-php/5926/10 and
-  #       https://github.com/piwik/piwik/issues/11654#issuecomment-297730843
-  installPhase = ''
-    runHook preInstall
-
-    # copy evertything to share/, used as webroot folder, and then remove what's known to be not needed
-    mkdir -p $out/share
-    cp -ra * $out/share/
-    # tmp/ is created by piwik in PIWIK_USER_PATH
-    rmdir $out/share/tmp
-    # config/ needs to be copied to PIWIK_USER_PATH anyway
-    mv $out/share/config $out/
-
-    makeWrapper ${php}/bin/php $out/bin/piwik-console \
-      --add-flags "$out/share/console"
-
-    runHook postInstall
-  '';
-
-  meta = with stdenv.lib; {
-    description = "A real-time web analytics application";
-    license = licenses.gpl3Plus;
-    homepage = https://piwik.org/;
-    platforms = platforms.all;
-    maintainers = [ maintainers.florianjacob ];
-  };
-}
diff --git a/pkgs/servers/web-apps/pump.io/composition.nix b/pkgs/servers/web-apps/pump.io/composition.nix
deleted file mode 100644
index ee4dab5ad64..00000000000
--- a/pkgs/servers/web-apps/pump.io/composition.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-# This file has been generated by node2nix 1.2.0. Do not edit!
-
-{pkgs ? import <nixpkgs> {
-    inherit system;
-  }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-4_x"}:
-
-let
-  nodeEnv = import ../../../development/node-packages/node-env.nix {
-    inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
-    inherit nodejs;
-  };
-in
-import ./node-packages.nix {
-  inherit (pkgs) fetchurl fetchgit;
-  inherit nodeEnv;
-}
\ No newline at end of file
diff --git a/pkgs/servers/web-apps/pump.io/default.nix b/pkgs/servers/web-apps/pump.io/default.nix
deleted file mode 100644
index f888566cad6..00000000000
--- a/pkgs/servers/web-apps/pump.io/default.nix
+++ /dev/null
@@ -1,53 +0,0 @@
-{ pkgs, system, stdenv, fetchurl, makeWrapper, nodejs, graphicsmagick }:
-
-with stdenv.lib;
-
-let
-  # To regenerate composition.nix, run generate.sh.
-  nodePackages = import ./composition.nix {
-    inherit pkgs system nodejs;
-  };
-in
-nodePackages.package.override (oldAttrs: {
-  buildInputs = oldAttrs.buildInputs ++ [ makeWrapper ];
-
-  postInstall = ''
-    for prog in pump pump-authorize pump-follow pump-post-note pump-register-app pump-register-user pump-stop-following; do
-      wrapProgram "$out/bin/$prog" \
-        --prefix PATH : ${graphicsmagick}/bin:$out/bin
-    done
-  '';
-
-  passthru.names = ["pump.io"];
-
-  meta = {
-    description = "Social server with an ActivityStreams API";
-    homepage = http://pump.io/;
-    license = licenses.asl20;
-    platforms = platforms.unix;
-    maintainers = [ maintainers.rvl ];
-    longDescription = ''
-      This is pump.io. It's a stream server that does most of what
-      people really want from a social network.
-
-      What's it for?
-
-      I post something and my followers see it. That's the rough idea
-      behind the pump.
-
-      There's an API defined in the API.md file. It uses
-      activitystrea.ms JSON as the main data and command format.
-
-      You can post almost anything that can be represented with
-      activity streams -- short or long text, bookmarks, images,
-      video, audio, events, geo checkins. You can follow friends,
-      create lists of people, and so on.
-
-      The software is useful for at least these scenarios:
-
-      * Mobile-first social networking
-      * Activity stream functionality for an existing app
-      * Experimenting with social software
-    '';
-  };
-})
diff --git a/pkgs/servers/web-apps/pump.io/generate.sh b/pkgs/servers/web-apps/pump.io/generate.sh
deleted file mode 100755
index 6dc91c72c09..00000000000
--- a/pkgs/servers/web-apps/pump.io/generate.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /usr/bin/env nix-shell
-#! nix-shell -i bash -p nodePackages.node2nix curl jshon
-
-set -e
-
-# Normally, this node2nix invocation would be sufficient:
-#   exec node2nix --input node-packages.json --composition composition.nix
-#
-# But pump.io soft-depends on extra modules, which have to be *inside*
-# its own node_modules, not beside them.
-#
-# So we hack these extra deps into package.json and feed that into
-# node2nix.
-#
-# Also jshon does funny things with slashes in strings, which can be
-# fixed with sed.
-
-VERSION="3.0.0"
-URL="https://registry.npmjs.org/pump.io/-/pump.io-$VERSION.tgz"
-SHA1="ycfm7ak83xi8mgafhp9q0n6n3kzmdz16"
-
-curl https://raw.githubusercontent.com/e14n/pump.io/v$VERSION/package.json | \
-    jshon -e dependencies              \
-          -s '*' -i databank-mongodb   \
-          -s '*' -i databank-redis     \
-          -s '*' -i databank-lrucache  \
-          -p | sed 's=\\/=/=g' > full-package.json
-
-node2nix --input full-package.json --composition composition.nix --node-env ../../../development/node-packages/node-env.nix
-
-# overriding nodePackages src doesn't seem to work, so...
-sed -i "s|src = ./.|src = fetchurl { url = \"$URL\"; sha1 = \"$SHA1\"; }|" node-packages.nix
-
-# fetchgit or node2nix is having problems with submodules or something.
-# This is the sha256 for connect-auth which is a npm dep hosted on
-# github and containing submodules.
-sed -i "s|d08fecbb72aff14ecb39dc310e8965ba92228f0c0def41fbde3db5ea7a1aac19|1b052xpj10hanx21286i5w0jrwxxkiwbdzpdngg9s2j1m7a9543b|" node-packages.nix
diff --git a/pkgs/servers/web-apps/pump.io/node-packages.json b/pkgs/servers/web-apps/pump.io/node-packages.json
deleted file mode 100644
index 294da7ab2f1..00000000000
--- a/pkgs/servers/web-apps/pump.io/node-packages.json
+++ /dev/null
@@ -1,7 +0,0 @@
-[
-  "pump.io",
-  "databank-mongodb",
-  "databank-redis",
-  "databank-memcached",
-  "databank-lrucache"
-]
diff --git a/pkgs/servers/web-apps/pump.io/node-packages.nix b/pkgs/servers/web-apps/pump.io/node-packages.nix
deleted file mode 100644
index ca27c79fab9..00000000000
--- a/pkgs/servers/web-apps/pump.io/node-packages.nix
+++ /dev/null
@@ -1,4889 +0,0 @@
-# This file has been generated by node2nix 1.2.0. Do not edit!
-
-{nodeEnv, fetchurl, fetchgit, globalBuildInputs ? []}:
-
-let
-  sources = {
-    "bcrypt-0.8.7" = {
-      name = "bcrypt";
-      packageName = "bcrypt";
-      version = "0.8.7";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/bcrypt/-/bcrypt-0.8.7.tgz";
-        sha1 = "bc3875a9afd0a7b2cd231a6a7f218a5ce156b093";
-      };
-    };
-    "bunyan-1.8.9" = {
-      name = "bunyan";
-      packageName = "bunyan";
-      version = "1.8.9";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/bunyan/-/bunyan-1.8.9.tgz";
-        sha1 = "2c7c9d422ea64ee2465d52b4decd72de0657401a";
-      };
-    };
-    "colors-1.1.2" = {
-      name = "colors";
-      packageName = "colors";
-      version = "1.1.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz";
-        sha1 = "168a4701756b6a7f51a12ce0c97bfa28c084ed63";
-      };
-    };
-    "connect-2.30.2" = {
-      name = "connect";
-      packageName = "connect";
-      version = "2.30.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/connect/-/connect-2.30.2.tgz";
-        sha1 = "8da9bcbe8a054d3d318d74dfec903b5c39a1b609";
-      };
-    };
-    "connect-auth-git://github.com/e14n/connect-auth" = {
-      name = "connect-auth";
-      packageName = "connect-auth";
-      version = "0.6.0";
-      src = fetchgit {
-        url = "git://github.com/e14n/connect-auth";
-        rev = "ae4e3c4c86a5d266be7bd91c2b99856f9a37b1ec";
-        sha256 = "1b052xpj10hanx21286i5w0jrwxxkiwbdzpdngg9s2j1m7a9543b";
-      };
-    };
-    "connect-databank-1.0.3" = {
-      name = "connect-databank";
-      packageName = "connect-databank";
-      version = "1.0.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/connect-databank/-/connect-databank-1.0.3.tgz";
-        sha1 = "dad24f08dc385d9c3a94f1a52730aec0c7d13b02";
-      };
-    };
-    "connect-multiparty-2.0.0" = {
-      name = "connect-multiparty";
-      packageName = "connect-multiparty";
-      version = "2.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/connect-multiparty/-/connect-multiparty-2.0.0.tgz";
-        sha1 = "57a7b61cc7b31b6eef4a62878d60d771b23699ab";
-      };
-    };
-    "crypto-cacerts-0.1.0" = {
-      name = "crypto-cacerts";
-      packageName = "crypto-cacerts";
-      version = "0.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/crypto-cacerts/-/crypto-cacerts-0.1.0.tgz";
-        sha1 = "3499c6dff949ab005d4ad4a3f09c48ced6c88a41";
-      };
-    };
-    "databank-0.19.8" = {
-      name = "databank";
-      packageName = "databank";
-      version = "0.19.8";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/databank/-/databank-0.19.8.tgz";
-        sha1 = "bf73d6b4fc002045793faeff2b1c3fabc9999844";
-      };
-    };
-    "dateformat-1.0.12" = {
-      name = "dateformat";
-      packageName = "dateformat";
-      version = "1.0.12";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz";
-        sha1 = "9f124b67594c937ff706932e4a642cca8dbbfee9";
-      };
-    };
-    "dialback-client-0.2.0" = {
-      name = "dialback-client";
-      packageName = "dialback-client";
-      version = "0.2.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/dialback-client/-/dialback-client-0.2.0.tgz";
-        sha1 = "051806a88a6cc18ffb25adf13eda232e354ebcb6";
-      };
-    };
-    "dompurify-0.8.5" = {
-      name = "dompurify";
-      packageName = "dompurify";
-      version = "0.8.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/dompurify/-/dompurify-0.8.5.tgz";
-        sha1 = "5bc591b61e222243cc827ca382d7a2e2660c1a44";
-      };
-    };
-    "emailjs-1.0.8" = {
-      name = "emailjs";
-      packageName = "emailjs";
-      version = "1.0.8";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/emailjs/-/emailjs-1.0.8.tgz";
-        sha1 = "d4240db7670dc78aff97352092d8460edc130f66";
-      };
-    };
-    "express-3.21.2" = {
-      name = "express";
-      packageName = "express";
-      version = "3.21.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/express/-/express-3.21.2.tgz";
-        sha1 = "0c2903ee5c54e63d65a96170764703550665a3de";
-      };
-    };
-    "express-session-1.15.2" = {
-      name = "express-session";
-      packageName = "express-session";
-      version = "1.15.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/express-session/-/express-session-1.15.2.tgz";
-        sha1 = "d98516443a4ccb8688e1725ae584c02daa4093d4";
-      };
-    };
-    "gm-1.23.0" = {
-      name = "gm";
-      packageName = "gm";
-      version = "1.23.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/gm/-/gm-1.23.0.tgz";
-        sha1 = "80a2fe9cbf131515024846444658461269f52661";
-      };
-    };
-    "helmet-3.5.0" = {
-      name = "helmet";
-      packageName = "helmet";
-      version = "3.5.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/helmet/-/helmet-3.5.0.tgz";
-        sha1 = "e1d6de27d2e3317d3182e00d672df3d0e1e12539";
-      };
-    };
-    "jade-1.11.0" = {
-      name = "jade";
-      packageName = "jade";
-      version = "1.11.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/jade/-/jade-1.11.0.tgz";
-        sha1 = "9c80e538c12d3fb95c8d9bb9559fa0cc040405fd";
-      };
-    };
-    "jankyqueue-0.1.1" = {
-      name = "jankyqueue";
-      packageName = "jankyqueue";
-      version = "0.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/jankyqueue/-/jankyqueue-0.1.1.tgz";
-        sha1 = "4181b0318fb32e77aee8c54af73f97660f2e88d2";
-      };
-    };
-    "jsdom-7.2.2" = {
-      name = "jsdom";
-      packageName = "jsdom";
-      version = "7.2.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz";
-        sha1 = "40b402770c2bda23469096bee91ab675e3b1fc6e";
-      };
-    };
-    "method-override-2.3.8" = {
-      name = "method-override";
-      packageName = "method-override";
-      version = "2.3.8";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/method-override/-/method-override-2.3.8.tgz";
-        sha1 = "178234bf4bab869f89df9444b06fc6147b44828c";
-      };
-    };
-    "mkdirp-0.5.1" = {
-      name = "mkdirp";
-      packageName = "mkdirp";
-      version = "0.5.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz";
-        sha1 = "30057438eac6cf7f8c4767f38648d6697d75c903";
-      };
-    };
-    "oauth-evanp-0.9.10-evanp.2" = {
-      name = "oauth-evanp";
-      packageName = "oauth-evanp";
-      version = "0.9.10-evanp.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/oauth-evanp/-/oauth-evanp-0.9.10-evanp.2.tgz";
-        sha1 = "9b5fb3508cea584420855957d56531405cf53a02";
-      };
-    };
-    "octal-1.0.0" = {
-      name = "octal";
-      packageName = "octal";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/octal/-/octal-1.0.0.tgz";
-        sha1 = "63e7162a68efbeb9e213588d58e989d1e5c4530b";
-      };
-    };
-    "optimist-0.6.1" = {
-      name = "optimist";
-      packageName = "optimist";
-      version = "0.6.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz";
-        sha1 = "da3ea74686fa21a19a111c326e90eb15a0196686";
-      };
-    };
-    "rimraf-2.6.1" = {
-      name = "rimraf";
-      packageName = "rimraf";
-      version = "2.6.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz";
-        sha1 = "c2338ec643df7a1b7fe5c54fa86f57428a55f33d";
-      };
-    };
-    "sanitize-html-1.14.1" = {
-      name = "sanitize-html";
-      packageName = "sanitize-html";
-      version = "1.14.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.14.1.tgz";
-        sha1 = "730ffa2249bdf18333effe45b286173c9c5ad0b8";
-      };
-    };
-    "schlock-0.2.1" = {
-      name = "schlock";
-      packageName = "schlock";
-      version = "0.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/schlock/-/schlock-0.2.1.tgz";
-        sha1 = "2a9aaeaa209a5422eadc5dfc005e2c2f15241f99";
-      };
-    };
-    "send-0.13.2" = {
-      name = "send";
-      packageName = "send";
-      version = "0.13.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/send/-/send-0.13.2.tgz";
-        sha1 = "765e7607c8055452bba6f0b052595350986036de";
-      };
-    };
-    "showdown-1.6.4" = {
-      name = "showdown";
-      packageName = "showdown";
-      version = "1.6.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/showdown/-/showdown-1.6.4.tgz";
-        sha1 = "056bbb654ecdb8d8643ae12d6d597893ccaf46c6";
-      };
-    };
-    "sockjs-0.3.18" = {
-      name = "sockjs";
-      packageName = "sockjs";
-      version = "0.3.18";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/sockjs/-/sockjs-0.3.18.tgz";
-        sha1 = "d9b289316ca7df77595ef299e075f0f937eb4207";
-      };
-    };
-    "ssl-config-0.0.9" = {
-      name = "ssl-config";
-      packageName = "ssl-config";
-      version = "0.0.9";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/ssl-config/-/ssl-config-0.0.9.tgz";
-        sha1 = "905ed1b7ddd0564aa9395cd4ae7146907351ff2c";
-      };
-    };
-    "step-1.0.0" = {
-      name = "step";
-      packageName = "step";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/step/-/step-1.0.0.tgz";
-        sha1 = "b300e9d2ae9057d4d78633aae2303813a94bdff2";
-      };
-    };
-    "ua-parser-js-0.7.12" = {
-      name = "ua-parser-js";
-      packageName = "ua-parser-js";
-      version = "0.7.12";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.12.tgz";
-        sha1 = "04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb";
-      };
-    };
-    "underscore-1.8.3" = {
-      name = "underscore";
-      packageName = "underscore";
-      version = "1.8.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz";
-        sha1 = "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022";
-      };
-    };
-    "underscore-contrib-0.3.0" = {
-      name = "underscore-contrib";
-      packageName = "underscore-contrib";
-      version = "0.3.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz";
-        sha1 = "665b66c24783f8fa2b18c9f8cbb0e2c7d48c26c7";
-      };
-    };
-    "uuid-3.0.1" = {
-      name = "uuid";
-      packageName = "uuid";
-      version = "3.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz";
-        sha1 = "6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1";
-      };
-    };
-    "validator-4.4.0" = {
-      name = "validator";
-      packageName = "validator";
-      version = "4.4.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/validator/-/validator-4.4.0.tgz";
-        sha1 = "35e29555dd5f7826f970a4eaecff9e6df6df3da6";
-      };
-    };
-    "webfinger-0.4.2" = {
-      name = "webfinger";
-      packageName = "webfinger";
-      version = "0.4.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/webfinger/-/webfinger-0.4.2.tgz";
-        sha1 = "3477a6d97799461896039fcffc650b73468ee76d";
-      };
-    };
-    "databank-mongodb-1.0.0" = {
-      name = "databank-mongodb";
-      packageName = "databank-mongodb";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/databank-mongodb/-/databank-mongodb-1.0.0.tgz";
-        sha1 = "66f229698df1d4f7e9e3ad849a30174b2aae527b";
-      };
-    };
-    "databank-redis-0.19.6" = {
-      name = "databank-redis";
-      packageName = "databank-redis";
-      version = "0.19.6";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/databank-redis/-/databank-redis-0.19.6.tgz";
-        sha1 = "dd476b81b8200269ea0cc85f6b6decd05799bce9";
-      };
-    };
-    "databank-lrucache-0.1.3" = {
-      name = "databank-lrucache";
-      packageName = "databank-lrucache";
-      version = "0.1.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/databank-lrucache/-/databank-lrucache-0.1.3.tgz";
-        sha1 = "a68fbf6bb5f2e1dab81f5a410065484889a0eeef";
-      };
-    };
-    "bindings-1.2.1" = {
-      name = "bindings";
-      packageName = "bindings";
-      version = "1.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz";
-        sha1 = "14ad6113812d2d37d72e67b4cacb4bb726505f11";
-      };
-    };
-    "nan-2.3.5" = {
-      name = "nan";
-      packageName = "nan";
-      version = "2.3.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/nan/-/nan-2.3.5.tgz";
-        sha1 = "822a0dc266290ce4cd3a12282ca3e7e364668a08";
-      };
-    };
-    "dtrace-provider-0.8.1" = {
-      name = "dtrace-provider";
-      packageName = "dtrace-provider";
-      version = "0.8.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.1.tgz";
-        sha1 = "cd4d174a233bea1bcf4a1fbfa5798f44f48cda9f";
-      };
-    };
-    "mv-2.1.1" = {
-      name = "mv";
-      packageName = "mv";
-      version = "2.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz";
-        sha1 = "ae6ce0d6f6d5e0a4f7d893798d03c1ea9559b6a2";
-      };
-    };
-    "safe-json-stringify-1.0.4" = {
-      name = "safe-json-stringify";
-      packageName = "safe-json-stringify";
-      version = "1.0.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.0.4.tgz";
-        sha1 = "81a098f447e4bbc3ff3312a243521bc060ef5911";
-      };
-    };
-    "moment-2.18.1" = {
-      name = "moment";
-      packageName = "moment";
-      version = "2.18.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz";
-        sha1 = "c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f";
-      };
-    };
-    "nan-2.5.1" = {
-      name = "nan";
-      packageName = "nan";
-      version = "2.5.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/nan/-/nan-2.5.1.tgz";
-        sha1 = "d5b01691253326a97a2bbee9e61c55d8d60351e2";
-      };
-    };
-    "ncp-2.0.0" = {
-      name = "ncp";
-      packageName = "ncp";
-      version = "2.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz";
-        sha1 = "195a21d6c46e361d2fb1281ba38b91e9df7bdbb3";
-      };
-    };
-    "rimraf-2.4.5" = {
-      name = "rimraf";
-      packageName = "rimraf";
-      version = "2.4.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz";
-        sha1 = "ee710ce5d93a8fdb856fb5ea8ff0e2d75934b2da";
-      };
-    };
-    "glob-6.0.4" = {
-      name = "glob";
-      packageName = "glob";
-      version = "6.0.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz";
-        sha1 = "0f08860f6a155127b2fadd4f9ce24b1aab6e4d22";
-      };
-    };
-    "inflight-1.0.6" = {
-      name = "inflight";
-      packageName = "inflight";
-      version = "1.0.6";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz";
-        sha1 = "49bd6331d7d02d0c09bc910a1075ba8165b56df9";
-      };
-    };
-    "inherits-2.0.3" = {
-      name = "inherits";
-      packageName = "inherits";
-      version = "2.0.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz";
-        sha1 = "633c2c83e3da42a502f52466022480f4208261de";
-      };
-    };
-    "minimatch-3.0.3" = {
-      name = "minimatch";
-      packageName = "minimatch";
-      version = "3.0.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz";
-        sha1 = "2a4e4090b96b2db06a9d7df01055a62a77c9b774";
-      };
-    };
-    "once-1.4.0" = {
-      name = "once";
-      packageName = "once";
-      version = "1.4.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/once/-/once-1.4.0.tgz";
-        sha1 = "583b1aa775961d4b113ac17d9c50baef9dd76bd1";
-      };
-    };
-    "path-is-absolute-1.0.1" = {
-      name = "path-is-absolute";
-      packageName = "path-is-absolute";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz";
-        sha1 = "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f";
-      };
-    };
-    "wrappy-1.0.2" = {
-      name = "wrappy";
-      packageName = "wrappy";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz";
-        sha1 = "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f";
-      };
-    };
-    "brace-expansion-1.1.6" = {
-      name = "brace-expansion";
-      packageName = "brace-expansion";
-      version = "1.1.6";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz";
-        sha1 = "7197d7eaa9b87e648390ea61fc66c84427420df9";
-      };
-    };
-    "balanced-match-0.4.2" = {
-      name = "balanced-match";
-      packageName = "balanced-match";
-      version = "0.4.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz";
-        sha1 = "cb3f3e3c732dc0f01ee70b403f302e61d7709838";
-      };
-    };
-    "concat-map-0.0.1" = {
-      name = "concat-map";
-      packageName = "concat-map";
-      version = "0.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz";
-        sha1 = "d8a96bd77fd68df7793a73036a3ba0d5405d477b";
-      };
-    };
-    "basic-auth-connect-1.0.0" = {
-      name = "basic-auth-connect";
-      packageName = "basic-auth-connect";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz";
-        sha1 = "fdb0b43962ca7b40456a7c2bb48fe173da2d2122";
-      };
-    };
-    "body-parser-1.13.3" = {
-      name = "body-parser";
-      packageName = "body-parser";
-      version = "1.13.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/body-parser/-/body-parser-1.13.3.tgz";
-        sha1 = "c08cf330c3358e151016a05746f13f029c97fa97";
-      };
-    };
-    "bytes-2.1.0" = {
-      name = "bytes";
-      packageName = "bytes";
-      version = "2.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/bytes/-/bytes-2.1.0.tgz";
-        sha1 = "ac93c410e2ffc9cc7cf4b464b38289067f5e47b4";
-      };
-    };
-    "cookie-0.1.3" = {
-      name = "cookie";
-      packageName = "cookie";
-      version = "0.1.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/cookie/-/cookie-0.1.3.tgz";
-        sha1 = "e734a5c1417fce472d5aef82c381cabb64d1a435";
-      };
-    };
-    "cookie-parser-1.3.5" = {
-      name = "cookie-parser";
-      packageName = "cookie-parser";
-      version = "1.3.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.5.tgz";
-        sha1 = "9d755570fb5d17890771227a02314d9be7cf8356";
-      };
-    };
-    "cookie-signature-1.0.6" = {
-      name = "cookie-signature";
-      packageName = "cookie-signature";
-      version = "1.0.6";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz";
-        sha1 = "e303a882b342cc3ee8ca513a79999734dab3ae2c";
-      };
-    };
-    "compression-1.5.2" = {
-      name = "compression";
-      packageName = "compression";
-      version = "1.5.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/compression/-/compression-1.5.2.tgz";
-        sha1 = "b03b8d86e6f8ad29683cba8df91ddc6ffc77b395";
-      };
-    };
-    "connect-timeout-1.6.2" = {
-      name = "connect-timeout";
-      packageName = "connect-timeout";
-      version = "1.6.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/connect-timeout/-/connect-timeout-1.6.2.tgz";
-        sha1 = "de9a5ec61e33a12b6edaab7b5f062e98c599b88e";
-      };
-    };
-    "content-type-1.0.2" = {
-      name = "content-type";
-      packageName = "content-type";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz";
-        sha1 = "b7d113aee7a8dd27bd21133c4dc2529df1721eed";
-      };
-    };
-    "csurf-1.8.3" = {
-      name = "csurf";
-      packageName = "csurf";
-      version = "1.8.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/csurf/-/csurf-1.8.3.tgz";
-        sha1 = "23f2a13bf1d8fce1d0c996588394442cba86a56a";
-      };
-    };
-    "debug-2.2.0" = {
-      name = "debug";
-      packageName = "debug";
-      version = "2.2.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz";
-        sha1 = "f87057e995b1a1f6ae6a4960664137bc56f039da";
-      };
-    };
-    "depd-1.0.1" = {
-      name = "depd";
-      packageName = "depd";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/depd/-/depd-1.0.1.tgz";
-        sha1 = "80aec64c9d6d97e65cc2a9caa93c0aa6abf73aaa";
-      };
-    };
-    "errorhandler-1.4.3" = {
-      name = "errorhandler";
-      packageName = "errorhandler";
-      version = "1.4.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/errorhandler/-/errorhandler-1.4.3.tgz";
-        sha1 = "b7b70ed8f359e9db88092f2d20c0f831420ad83f";
-      };
-    };
-    "express-session-1.11.3" = {
-      name = "express-session";
-      packageName = "express-session";
-      version = "1.11.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/express-session/-/express-session-1.11.3.tgz";
-        sha1 = "5cc98f3f5ff84ed835f91cbf0aabd0c7107400af";
-      };
-    };
-    "finalhandler-0.4.0" = {
-      name = "finalhandler";
-      packageName = "finalhandler";
-      version = "0.4.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/finalhandler/-/finalhandler-0.4.0.tgz";
-        sha1 = "965a52d9e8d05d2b857548541fb89b53a2497d9b";
-      };
-    };
-    "fresh-0.3.0" = {
-      name = "fresh";
-      packageName = "fresh";
-      version = "0.3.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/fresh/-/fresh-0.3.0.tgz";
-        sha1 = "651f838e22424e7566de161d8358caa199f83d4f";
-      };
-    };
-    "http-errors-1.3.1" = {
-      name = "http-errors";
-      packageName = "http-errors";
-      version = "1.3.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz";
-        sha1 = "197e22cdebd4198585e8694ef6786197b91ed942";
-      };
-    };
-    "morgan-1.6.1" = {
-      name = "morgan";
-      packageName = "morgan";
-      version = "1.6.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/morgan/-/morgan-1.6.1.tgz";
-        sha1 = "5fd818398c6819cba28a7cd6664f292fe1c0bbf2";
-      };
-    };
-    "multiparty-3.3.2" = {
-      name = "multiparty";
-      packageName = "multiparty";
-      version = "3.3.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/multiparty/-/multiparty-3.3.2.tgz";
-        sha1 = "35de6804dc19643e5249f3d3e3bdc6c8ce301d3f";
-      };
-    };
-    "on-headers-1.0.1" = {
-      name = "on-headers";
-      packageName = "on-headers";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz";
-        sha1 = "928f5d0f470d49342651ea6794b0857c100693f7";
-      };
-    };
-    "parseurl-1.3.1" = {
-      name = "parseurl";
-      packageName = "parseurl";
-      version = "1.3.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz";
-        sha1 = "c8ab8c9223ba34888aa64a297b28853bec18da56";
-      };
-    };
-    "pause-0.1.0" = {
-      name = "pause";
-      packageName = "pause";
-      version = "0.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/pause/-/pause-0.1.0.tgz";
-        sha1 = "ebc8a4a8619ff0b8a81ac1513c3434ff469fdb74";
-      };
-    };
-    "qs-4.0.0" = {
-      name = "qs";
-      packageName = "qs";
-      version = "4.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/qs/-/qs-4.0.0.tgz";
-        sha1 = "c31d9b74ec27df75e543a86c78728ed8d4623607";
-      };
-    };
-    "response-time-2.3.2" = {
-      name = "response-time";
-      packageName = "response-time";
-      version = "2.3.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/response-time/-/response-time-2.3.2.tgz";
-        sha1 = "ffa71bab952d62f7c1d49b7434355fbc68dffc5a";
-      };
-    };
-    "serve-favicon-2.3.2" = {
-      name = "serve-favicon";
-      packageName = "serve-favicon";
-      version = "2.3.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.3.2.tgz";
-        sha1 = "dd419e268de012ab72b319d337f2105013f9381f";
-      };
-    };
-    "serve-index-1.7.3" = {
-      name = "serve-index";
-      packageName = "serve-index";
-      version = "1.7.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/serve-index/-/serve-index-1.7.3.tgz";
-        sha1 = "7a057fc6ee28dc63f64566e5fa57b111a86aecd2";
-      };
-    };
-    "serve-static-1.10.3" = {
-      name = "serve-static";
-      packageName = "serve-static";
-      version = "1.10.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/serve-static/-/serve-static-1.10.3.tgz";
-        sha1 = "ce5a6ecd3101fed5ec09827dac22a9c29bfb0535";
-      };
-    };
-    "type-is-1.6.14" = {
-      name = "type-is";
-      packageName = "type-is";
-      version = "1.6.14";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/type-is/-/type-is-1.6.14.tgz";
-        sha1 = "e219639c17ded1ca0789092dd54a03826b817cb2";
-      };
-    };
-    "utils-merge-1.0.0" = {
-      name = "utils-merge";
-      packageName = "utils-merge";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz";
-        sha1 = "0294fb922bb9375153541c4f7096231f287c8af8";
-      };
-    };
-    "vhost-3.0.2" = {
-      name = "vhost";
-      packageName = "vhost";
-      version = "3.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/vhost/-/vhost-3.0.2.tgz";
-        sha1 = "2fb1decd4c466aa88b0f9341af33dc1aff2478d5";
-      };
-    };
-    "iconv-lite-0.4.11" = {
-      name = "iconv-lite";
-      packageName = "iconv-lite";
-      version = "0.4.11";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.11.tgz";
-        sha1 = "2ecb42fd294744922209a2e7c404dac8793d8ade";
-      };
-    };
-    "on-finished-2.3.0" = {
-      name = "on-finished";
-      packageName = "on-finished";
-      version = "2.3.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz";
-        sha1 = "20f1336481b083cd75337992a16971aa2d906947";
-      };
-    };
-    "raw-body-2.1.7" = {
-      name = "raw-body";
-      packageName = "raw-body";
-      version = "2.1.7";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz";
-        sha1 = "adfeace2e4fb3098058014d08c072dcc59758774";
-      };
-    };
-    "ee-first-1.1.1" = {
-      name = "ee-first";
-      packageName = "ee-first";
-      version = "1.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz";
-        sha1 = "590c61156b0ae2f4f0255732a158b266bc56b21d";
-      };
-    };
-    "bytes-2.4.0" = {
-      name = "bytes";
-      packageName = "bytes";
-      version = "2.4.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz";
-        sha1 = "7d97196f9d5baf7f6935e25985549edd2a6c2339";
-      };
-    };
-    "iconv-lite-0.4.13" = {
-      name = "iconv-lite";
-      packageName = "iconv-lite";
-      version = "0.4.13";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz";
-        sha1 = "1f88aba4ab0b1508e8312acc39345f36e992e2f2";
-      };
-    };
-    "unpipe-1.0.0" = {
-      name = "unpipe";
-      packageName = "unpipe";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz";
-        sha1 = "b2bf4ee8514aae6165b4817829d21b2ef49904ec";
-      };
-    };
-    "accepts-1.2.13" = {
-      name = "accepts";
-      packageName = "accepts";
-      version = "1.2.13";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/accepts/-/accepts-1.2.13.tgz";
-        sha1 = "e5f1f3928c6d95fd96558c36ec3d9d0de4a6ecea";
-      };
-    };
-    "compressible-2.0.10" = {
-      name = "compressible";
-      packageName = "compressible";
-      version = "2.0.10";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/compressible/-/compressible-2.0.10.tgz";
-        sha1 = "feda1c7f7617912732b29bf8cf26252a20b9eecd";
-      };
-    };
-    "vary-1.0.1" = {
-      name = "vary";
-      packageName = "vary";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/vary/-/vary-1.0.1.tgz";
-        sha1 = "99e4981566a286118dfb2b817357df7993376d10";
-      };
-    };
-    "mime-types-2.1.15" = {
-      name = "mime-types";
-      packageName = "mime-types";
-      version = "2.1.15";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz";
-        sha1 = "a4ebf5064094569237b8cf70046776d09fc92aed";
-      };
-    };
-    "negotiator-0.5.3" = {
-      name = "negotiator";
-      packageName = "negotiator";
-      version = "0.5.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/negotiator/-/negotiator-0.5.3.tgz";
-        sha1 = "269d5c476810ec92edbe7b6c2f28316384f9a7e8";
-      };
-    };
-    "mime-db-1.27.0" = {
-      name = "mime-db";
-      packageName = "mime-db";
-      version = "1.27.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz";
-        sha1 = "820f572296bbd20ec25ed55e5b5de869e5436eb1";
-      };
-    };
-    "ms-0.7.1" = {
-      name = "ms";
-      packageName = "ms";
-      version = "0.7.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz";
-        sha1 = "9cd13c03adbff25b65effde7ce864ee952017098";
-      };
-    };
-    "csrf-3.0.6" = {
-      name = "csrf";
-      packageName = "csrf";
-      version = "3.0.6";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/csrf/-/csrf-3.0.6.tgz";
-        sha1 = "b61120ddceeafc91e76ed5313bb5c0b2667b710a";
-      };
-    };
-    "rndm-1.2.0" = {
-      name = "rndm";
-      packageName = "rndm";
-      version = "1.2.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz";
-        sha1 = "f33fe9cfb52bbfd520aa18323bc65db110a1b76c";
-      };
-    };
-    "tsscmp-1.0.5" = {
-      name = "tsscmp";
-      packageName = "tsscmp";
-      version = "1.0.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.5.tgz";
-        sha1 = "7dc4a33af71581ab4337da91d85ca5427ebd9a97";
-      };
-    };
-    "uid-safe-2.1.4" = {
-      name = "uid-safe";
-      packageName = "uid-safe";
-      version = "2.1.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.4.tgz";
-        sha1 = "3ad6f38368c6d4c8c75ec17623fb79aa1d071d81";
-      };
-    };
-    "random-bytes-1.0.0" = {
-      name = "random-bytes";
-      packageName = "random-bytes";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz";
-        sha1 = "4f68a1dc0ae58bd3fb95848c30324db75d64360b";
-      };
-    };
-    "accepts-1.3.3" = {
-      name = "accepts";
-      packageName = "accepts";
-      version = "1.3.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz";
-        sha1 = "c3ca7434938648c3e0d9c1e328dd68b622c284ca";
-      };
-    };
-    "escape-html-1.0.3" = {
-      name = "escape-html";
-      packageName = "escape-html";
-      version = "1.0.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz";
-        sha1 = "0258eae4d3d0c0974de1c169188ef0051d1d1988";
-      };
-    };
-    "negotiator-0.6.1" = {
-      name = "negotiator";
-      packageName = "negotiator";
-      version = "0.6.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz";
-        sha1 = "2b327184e8992101177b28563fb5e7102acd0ca9";
-      };
-    };
-    "crc-3.3.0" = {
-      name = "crc";
-      packageName = "crc";
-      version = "3.3.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/crc/-/crc-3.3.0.tgz";
-        sha1 = "fa622e1bc388bf257309082d6b65200ce67090ba";
-      };
-    };
-    "uid-safe-2.0.0" = {
-      name = "uid-safe";
-      packageName = "uid-safe";
-      version = "2.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/uid-safe/-/uid-safe-2.0.0.tgz";
-        sha1 = "a7f3c6ca64a1f6a5d04ec0ef3e4c3d5367317137";
-      };
-    };
-    "base64-url-1.2.1" = {
-      name = "base64-url";
-      packageName = "base64-url";
-      version = "1.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/base64-url/-/base64-url-1.2.1.tgz";
-        sha1 = "199fd661702a0e7b7dcae6e0698bb089c52f6d78";
-      };
-    };
-    "escape-html-1.0.2" = {
-      name = "escape-html";
-      packageName = "escape-html";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/escape-html/-/escape-html-1.0.2.tgz";
-        sha1 = "d77d32fa98e38c2f41ae85e9278e0e0e6ba1022c";
-      };
-    };
-    "statuses-1.3.1" = {
-      name = "statuses";
-      packageName = "statuses";
-      version = "1.3.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz";
-        sha1 = "faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e";
-      };
-    };
-    "basic-auth-1.0.4" = {
-      name = "basic-auth";
-      packageName = "basic-auth";
-      version = "1.0.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/basic-auth/-/basic-auth-1.0.4.tgz";
-        sha1 = "030935b01de7c9b94a824b29f3fccb750d3a5290";
-      };
-    };
-    "readable-stream-1.1.14" = {
-      name = "readable-stream";
-      packageName = "readable-stream";
-      version = "1.1.14";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz";
-        sha1 = "7cf4c54ef648e3813084c636dd2079e166c081d9";
-      };
-    };
-    "stream-counter-0.2.0" = {
-      name = "stream-counter";
-      packageName = "stream-counter";
-      version = "0.2.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/stream-counter/-/stream-counter-0.2.0.tgz";
-        sha1 = "ded266556319c8b0e222812b9cf3b26fa7d947de";
-      };
-    };
-    "core-util-is-1.0.2" = {
-      name = "core-util-is";
-      packageName = "core-util-is";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz";
-        sha1 = "b5fd54220aa2bc5ab57aab7140c940754503c1a7";
-      };
-    };
-    "isarray-0.0.1" = {
-      name = "isarray";
-      packageName = "isarray";
-      version = "0.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz";
-        sha1 = "8a18acfca9a8f4177e09abfc6038939b05d1eedf";
-      };
-    };
-    "string_decoder-0.10.31" = {
-      name = "string_decoder";
-      packageName = "string_decoder";
-      version = "0.10.31";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz";
-        sha1 = "62e203bc41766c6c28c9fc84301dab1c5310fa94";
-      };
-    };
-    "depd-1.1.0" = {
-      name = "depd";
-      packageName = "depd";
-      version = "1.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz";
-        sha1 = "e1bd82c6aab6ced965b97b88b17ed3e528ca18c3";
-      };
-    };
-    "etag-1.7.0" = {
-      name = "etag";
-      packageName = "etag";
-      version = "1.7.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/etag/-/etag-1.7.0.tgz";
-        sha1 = "03d30b5f67dd6e632d2945d30d6652731a34d5d8";
-      };
-    };
-    "ms-0.7.2" = {
-      name = "ms";
-      packageName = "ms";
-      version = "0.7.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz";
-        sha1 = "ae25cf2512b3885a1d95d7f037868d8431124765";
-      };
-    };
-    "batch-0.5.3" = {
-      name = "batch";
-      packageName = "batch";
-      version = "0.5.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/batch/-/batch-0.5.3.tgz";
-        sha1 = "3f3414f380321743bfc1042f9a83ff1d5824d464";
-      };
-    };
-    "media-typer-0.3.0" = {
-      name = "media-typer";
-      packageName = "media-typer";
-      version = "0.3.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz";
-        sha1 = "8710d7af0aa626f8fffa1ce00168545263255748";
-      };
-    };
-    "oauth-0.9.7" = {
-      name = "oauth";
-      packageName = "oauth";
-      version = "0.9.7";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/oauth/-/oauth-0.9.7.tgz";
-        sha1 = "c2554d0368c966eb3050bec96584625577ad1ecd";
-      };
-    };
-    "openid-0.4.1" = {
-      name = "openid";
-      packageName = "openid";
-      version = "0.4.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/openid/-/openid-0.4.1.tgz";
-        sha1 = "de0eb5e381d34dc4aa5a77a98678bedafd11f387";
-      };
-    };
-    "async-1.5.2" = {
-      name = "async";
-      packageName = "async";
-      version = "1.5.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/async/-/async-1.5.2.tgz";
-        sha1 = "ec6a61ae56480c0c3cb241c95618e20892f9672a";
-      };
-    };
-    "node-uuid-1.4.8" = {
-      name = "node-uuid";
-      packageName = "node-uuid";
-      version = "1.4.8";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz";
-        sha1 = "b040eb0923968afabf8d32fb1f17f1167fdab907";
-      };
-    };
-    "set-immediate-0.1.1" = {
-      name = "set-immediate";
-      packageName = "set-immediate";
-      version = "0.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/set-immediate/-/set-immediate-0.1.1.tgz";
-        sha1 = "8986e4a773bf8ec165f24d579107673bfac141de";
-      };
-    };
-    "multiparty-4.1.3" = {
-      name = "multiparty";
-      packageName = "multiparty";
-      version = "4.1.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/multiparty/-/multiparty-4.1.3.tgz";
-        sha1 = "3c43c7fcb1896e17460436a9dd0b6ef1668e4f94";
-      };
-    };
-    "fd-slicer-1.0.1" = {
-      name = "fd-slicer";
-      packageName = "fd-slicer";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz";
-        sha1 = "8b5bcbd9ec327c5041bf9ab023fd6750f1177e65";
-      };
-    };
-    "pend-1.2.0" = {
-      name = "pend";
-      packageName = "pend";
-      version = "1.2.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz";
-        sha1 = "7a57eb550a6783f9115331fcf4663d5c8e007a50";
-      };
-    };
-    "get-stdin-4.0.1" = {
-      name = "get-stdin";
-      packageName = "get-stdin";
-      version = "4.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz";
-        sha1 = "b968c6b0a04384324902e8bf1a5df32579a450fe";
-      };
-    };
-    "meow-3.7.0" = {
-      name = "meow";
-      packageName = "meow";
-      version = "3.7.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz";
-        sha1 = "72cb668b425228290abbfa856892587308a801fb";
-      };
-    };
-    "camelcase-keys-2.1.0" = {
-      name = "camelcase-keys";
-      packageName = "camelcase-keys";
-      version = "2.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz";
-        sha1 = "308beeaffdf28119051efa1d932213c91b8f92e7";
-      };
-    };
-    "decamelize-1.2.0" = {
-      name = "decamelize";
-      packageName = "decamelize";
-      version = "1.2.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz";
-        sha1 = "f6534d15148269b20352e7bee26f501f9a191290";
-      };
-    };
-    "loud-rejection-1.6.0" = {
-      name = "loud-rejection";
-      packageName = "loud-rejection";
-      version = "1.6.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz";
-        sha1 = "5b46f80147edee578870f086d04821cf998e551f";
-      };
-    };
-    "map-obj-1.0.1" = {
-      name = "map-obj";
-      packageName = "map-obj";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz";
-        sha1 = "d933ceb9205d82bdcf4886f6742bdc2b4dea146d";
-      };
-    };
-    "minimist-1.2.0" = {
-      name = "minimist";
-      packageName = "minimist";
-      version = "1.2.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz";
-        sha1 = "a35008b20f41383eec1fb914f4cd5df79a264284";
-      };
-    };
-    "normalize-package-data-2.3.6" = {
-      name = "normalize-package-data";
-      packageName = "normalize-package-data";
-      version = "2.3.6";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.6.tgz";
-        sha1 = "498fa420c96401f787402ba21e600def9f981fff";
-      };
-    };
-    "object-assign-4.1.1" = {
-      name = "object-assign";
-      packageName = "object-assign";
-      version = "4.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz";
-        sha1 = "2109adc7965887cfc05cbbd442cac8bfbb360863";
-      };
-    };
-    "read-pkg-up-1.0.1" = {
-      name = "read-pkg-up";
-      packageName = "read-pkg-up";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz";
-        sha1 = "9d63c13276c065918d57f002a57f40a1b643fb02";
-      };
-    };
-    "redent-1.0.0" = {
-      name = "redent";
-      packageName = "redent";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz";
-        sha1 = "cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde";
-      };
-    };
-    "trim-newlines-1.0.0" = {
-      name = "trim-newlines";
-      packageName = "trim-newlines";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz";
-        sha1 = "5887966bb582a4503a41eb524f7d35011815a613";
-      };
-    };
-    "camelcase-2.1.1" = {
-      name = "camelcase";
-      packageName = "camelcase";
-      version = "2.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz";
-        sha1 = "7c1d16d679a1bbe59ca02cacecfb011e201f5a1f";
-      };
-    };
-    "currently-unhandled-0.4.1" = {
-      name = "currently-unhandled";
-      packageName = "currently-unhandled";
-      version = "0.4.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz";
-        sha1 = "988df33feab191ef799a61369dd76c17adf957ea";
-      };
-    };
-    "signal-exit-3.0.2" = {
-      name = "signal-exit";
-      packageName = "signal-exit";
-      version = "3.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz";
-        sha1 = "b5fdc08f1287ea1178628e415e25132b73646c6d";
-      };
-    };
-    "array-find-index-1.0.2" = {
-      name = "array-find-index";
-      packageName = "array-find-index";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz";
-        sha1 = "df010aa1287e164bbda6f9723b0a96a1ec4187a1";
-      };
-    };
-    "hosted-git-info-2.4.1" = {
-      name = "hosted-git-info";
-      packageName = "hosted-git-info";
-      version = "2.4.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.1.tgz";
-        sha1 = "4b0445e41c004a8bd1337773a4ff790ca40318c8";
-      };
-    };
-    "is-builtin-module-1.0.0" = {
-      name = "is-builtin-module";
-      packageName = "is-builtin-module";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz";
-        sha1 = "540572d34f7ac3119f8f76c30cbc1b1e037affbe";
-      };
-    };
-    "semver-5.3.0" = {
-      name = "semver";
-      packageName = "semver";
-      version = "5.3.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz";
-        sha1 = "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f";
-      };
-    };
-    "validate-npm-package-license-3.0.1" = {
-      name = "validate-npm-package-license";
-      packageName = "validate-npm-package-license";
-      version = "3.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz";
-        sha1 = "2804babe712ad3379459acfbe24746ab2c303fbc";
-      };
-    };
-    "builtin-modules-1.1.1" = {
-      name = "builtin-modules";
-      packageName = "builtin-modules";
-      version = "1.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz";
-        sha1 = "270f076c5a72c02f5b65a47df94c5fe3a278892f";
-      };
-    };
-    "spdx-correct-1.0.2" = {
-      name = "spdx-correct";
-      packageName = "spdx-correct";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz";
-        sha1 = "4b3073d933ff51f3912f03ac5519498a4150db40";
-      };
-    };
-    "spdx-expression-parse-1.0.4" = {
-      name = "spdx-expression-parse";
-      packageName = "spdx-expression-parse";
-      version = "1.0.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz";
-        sha1 = "9bdf2f20e1f40ed447fbe273266191fced51626c";
-      };
-    };
-    "spdx-license-ids-1.2.2" = {
-      name = "spdx-license-ids";
-      packageName = "spdx-license-ids";
-      version = "1.2.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz";
-        sha1 = "c9df7a3424594ade6bd11900d596696dc06bac57";
-      };
-    };
-    "find-up-1.1.2" = {
-      name = "find-up";
-      packageName = "find-up";
-      version = "1.1.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz";
-        sha1 = "6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f";
-      };
-    };
-    "read-pkg-1.1.0" = {
-      name = "read-pkg";
-      packageName = "read-pkg";
-      version = "1.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz";
-        sha1 = "f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28";
-      };
-    };
-    "path-exists-2.1.0" = {
-      name = "path-exists";
-      packageName = "path-exists";
-      version = "2.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz";
-        sha1 = "0feb6c64f0fc518d9a754dd5efb62c7022761f4b";
-      };
-    };
-    "pinkie-promise-2.0.1" = {
-      name = "pinkie-promise";
-      packageName = "pinkie-promise";
-      version = "2.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz";
-        sha1 = "2135d6dfa7a358c069ac9b178776288228450ffa";
-      };
-    };
-    "pinkie-2.0.4" = {
-      name = "pinkie";
-      packageName = "pinkie";
-      version = "2.0.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz";
-        sha1 = "72556b80cfa0d48a974e80e77248e80ed4f7f870";
-      };
-    };
-    "load-json-file-1.1.0" = {
-      name = "load-json-file";
-      packageName = "load-json-file";
-      version = "1.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz";
-        sha1 = "956905708d58b4bab4c2261b04f59f31c99374c0";
-      };
-    };
-    "path-type-1.1.0" = {
-      name = "path-type";
-      packageName = "path-type";
-      version = "1.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz";
-        sha1 = "59c44f7ee491da704da415da5a4070ba4f8fe441";
-      };
-    };
-    "graceful-fs-4.1.11" = {
-      name = "graceful-fs";
-      packageName = "graceful-fs";
-      version = "4.1.11";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz";
-        sha1 = "0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658";
-      };
-    };
-    "parse-json-2.2.0" = {
-      name = "parse-json";
-      packageName = "parse-json";
-      version = "2.2.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz";
-        sha1 = "f480f40434ef80741f8469099f8dea18f55a4dc9";
-      };
-    };
-    "pify-2.3.0" = {
-      name = "pify";
-      packageName = "pify";
-      version = "2.3.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz";
-        sha1 = "ed141a6ac043a849ea588498e7dca8b15330e90c";
-      };
-    };
-    "strip-bom-2.0.0" = {
-      name = "strip-bom";
-      packageName = "strip-bom";
-      version = "2.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz";
-        sha1 = "6219a85616520491f35788bdbf1447a99c7e6b0e";
-      };
-    };
-    "error-ex-1.3.1" = {
-      name = "error-ex";
-      packageName = "error-ex";
-      version = "1.3.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz";
-        sha1 = "f855a86ce61adc4e8621c3cda21e7a7612c3a8dc";
-      };
-    };
-    "is-arrayish-0.2.1" = {
-      name = "is-arrayish";
-      packageName = "is-arrayish";
-      version = "0.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz";
-        sha1 = "77c99840527aa8ecb1a8ba697b80645a7a926a9d";
-      };
-    };
-    "is-utf8-0.2.1" = {
-      name = "is-utf8";
-      packageName = "is-utf8";
-      version = "0.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz";
-        sha1 = "4b0da1442104d1b336340e80797e865cf39f7d72";
-      };
-    };
-    "indent-string-2.1.0" = {
-      name = "indent-string";
-      packageName = "indent-string";
-      version = "2.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz";
-        sha1 = "8e2d48348742121b4a8218b7a137e9a52049dc80";
-      };
-    };
-    "strip-indent-1.0.1" = {
-      name = "strip-indent";
-      packageName = "strip-indent";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz";
-        sha1 = "0c7962a6adefa7bbd4ac366460a638552ae1a0a2";
-      };
-    };
-    "repeating-2.0.1" = {
-      name = "repeating";
-      packageName = "repeating";
-      version = "2.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz";
-        sha1 = "5214c53a926d3552707527fbab415dbc08d06dda";
-      };
-    };
-    "is-finite-1.0.2" = {
-      name = "is-finite";
-      packageName = "is-finite";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz";
-        sha1 = "cc6677695602be550ef11e8b4aa6305342b6d0aa";
-      };
-    };
-    "number-is-nan-1.0.1" = {
-      name = "number-is-nan";
-      packageName = "number-is-nan";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz";
-        sha1 = "097b602b53422a522c1afb8790318336941a011d";
-      };
-    };
-    "underscore-1.5.2" = {
-      name = "underscore";
-      packageName = "underscore";
-      version = "1.5.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/underscore/-/underscore-1.5.2.tgz";
-        sha1 = "1335c5e4f5e6d33bbb4b006ba8c86a00f556de08";
-      };
-    };
-    "step-0.0.6" = {
-      name = "step";
-      packageName = "step";
-      version = "0.0.6";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/step/-/step-0.0.6.tgz";
-        sha1 = "143e7849a5d7d3f4a088fe29af94915216eeede2";
-      };
-    };
-    "addressparser-0.3.2" = {
-      name = "addressparser";
-      packageName = "addressparser";
-      version = "0.3.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/addressparser/-/addressparser-0.3.2.tgz";
-        sha1 = "59873f35e8fcf6c7361c10239261d76e15348bb2";
-      };
-    };
-    "mimelib-0.2.14" = {
-      name = "mimelib";
-      packageName = "mimelib";
-      version = "0.2.14";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/mimelib/-/mimelib-0.2.14.tgz";
-        sha1 = "2a1aa724bd190b85bd526e6317ab6106edfd6831";
-      };
-    };
-    "moment-2.11.2" = {
-      name = "moment";
-      packageName = "moment";
-      version = "2.11.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/moment/-/moment-2.11.2.tgz";
-        sha1 = "87968e5f95ac038c2e42ac959c75819cd3f52901";
-      };
-    };
-    "starttls-1.0.1" = {
-      name = "starttls";
-      packageName = "starttls";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/starttls/-/starttls-1.0.1.tgz";
-        sha1 = "e6081c25de6b178f5a75f8f271c1487449183b42";
-      };
-    };
-    "bufferjs-1.1.0" = {
-      name = "bufferjs";
-      packageName = "bufferjs";
-      version = "1.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/bufferjs/-/bufferjs-1.1.0.tgz";
-        sha1 = "095ffa39c5e6b40a2178a1169c9effc584a73201";
-      };
-    };
-    "encoding-0.1.12" = {
-      name = "encoding";
-      packageName = "encoding";
-      version = "0.1.12";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz";
-        sha1 = "538b66f3ee62cd1ab51ec323829d1f9480c74beb";
-      };
-    };
-    "addressparser-0.2.1" = {
-      name = "addressparser";
-      packageName = "addressparser";
-      version = "0.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/addressparser/-/addressparser-0.2.1.tgz";
-        sha1 = "d11a5b2eeda04cfefebdf3196c10ae13db6cd607";
-      };
-    };
-    "iconv-lite-0.4.15" = {
-      name = "iconv-lite";
-      packageName = "iconv-lite";
-      version = "0.4.15";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz";
-        sha1 = "fe265a218ac6a57cfe854927e9d04c19825eddeb";
-      };
-    };
-    "content-disposition-0.5.0" = {
-      name = "content-disposition";
-      packageName = "content-disposition";
-      version = "0.5.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.0.tgz";
-        sha1 = "4284fe6ae0630874639e44e80a418c2934135e9e";
-      };
-    };
-    "commander-2.6.0" = {
-      name = "commander";
-      packageName = "commander";
-      version = "2.6.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz";
-        sha1 = "9df7e52fb2a0cb0fb89058ee80c3104225f37e1d";
-      };
-    };
-    "merge-descriptors-1.0.0" = {
-      name = "merge-descriptors";
-      packageName = "merge-descriptors";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.0.tgz";
-        sha1 = "2169cf7538e1b0cc87fb88e1502d8474bbf79864";
-      };
-    };
-    "methods-1.1.2" = {
-      name = "methods";
-      packageName = "methods";
-      version = "1.1.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz";
-        sha1 = "5529a4d67654134edcc5266656835b0f851afcee";
-      };
-    };
-    "proxy-addr-1.0.10" = {
-      name = "proxy-addr";
-      packageName = "proxy-addr";
-      version = "1.0.10";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.10.tgz";
-        sha1 = "0d40a82f801fc355567d2ecb65efe3f077f121c5";
-      };
-    };
-    "range-parser-1.0.3" = {
-      name = "range-parser";
-      packageName = "range-parser";
-      version = "1.0.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/range-parser/-/range-parser-1.0.3.tgz";
-        sha1 = "6872823535c692e2c2a0103826afd82c2e0ff175";
-      };
-    };
-    "send-0.13.0" = {
-      name = "send";
-      packageName = "send";
-      version = "0.13.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/send/-/send-0.13.0.tgz";
-        sha1 = "518f921aeb0560aec7dcab2990b14cf6f3cce5de";
-      };
-    };
-    "forwarded-0.1.0" = {
-      name = "forwarded";
-      packageName = "forwarded";
-      version = "0.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz";
-        sha1 = "19ef9874c4ae1c297bcf078fde63a09b66a84363";
-      };
-    };
-    "ipaddr.js-1.0.5" = {
-      name = "ipaddr.js";
-      packageName = "ipaddr.js";
-      version = "1.0.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.0.5.tgz";
-        sha1 = "5fa78cf301b825c78abc3042d812723049ea23c7";
-      };
-    };
-    "destroy-1.0.3" = {
-      name = "destroy";
-      packageName = "destroy";
-      version = "1.0.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz";
-        sha1 = "b433b4724e71fd8551d9885174851c5fc377e2c9";
-      };
-    };
-    "mime-1.3.4" = {
-      name = "mime";
-      packageName = "mime";
-      version = "1.3.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz";
-        sha1 = "115f9e3b6b3daf2959983cb38f149a2d40eb5d53";
-      };
-    };
-    "statuses-1.2.1" = {
-      name = "statuses";
-      packageName = "statuses";
-      version = "1.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz";
-        sha1 = "dded45cc18256d51ed40aec142489d5c61026d28";
-      };
-    };
-    "cookie-0.3.1" = {
-      name = "cookie";
-      packageName = "cookie";
-      version = "0.3.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz";
-        sha1 = "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb";
-      };
-    };
-    "crc-3.4.4" = {
-      name = "crc";
-      packageName = "crc";
-      version = "3.4.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/crc/-/crc-3.4.4.tgz";
-        sha1 = "9da1e980e3bd44fc5c93bf5ab3da3378d85e466b";
-      };
-    };
-    "debug-2.6.3" = {
-      name = "debug";
-      packageName = "debug";
-      version = "2.6.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/debug/-/debug-2.6.3.tgz";
-        sha1 = "0f7eb8c30965ec08c72accfa0130c8b79984141d";
-      };
-    };
-    "array-parallel-0.1.3" = {
-      name = "array-parallel";
-      packageName = "array-parallel";
-      version = "0.1.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/array-parallel/-/array-parallel-0.1.3.tgz";
-        sha1 = "8f785308926ed5aa478c47e64d1b334b6c0c947d";
-      };
-    };
-    "array-series-0.1.5" = {
-      name = "array-series";
-      packageName = "array-series";
-      version = "0.1.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/array-series/-/array-series-0.1.5.tgz";
-        sha1 = "df5d37bfc5c2ef0755e2aa4f92feae7d4b5a972f";
-      };
-    };
-    "cross-spawn-4.0.2" = {
-      name = "cross-spawn";
-      packageName = "cross-spawn";
-      version = "4.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz";
-        sha1 = "7b9247621c23adfdd3856004a823cbe397424d41";
-      };
-    };
-    "lru-cache-4.0.2" = {
-      name = "lru-cache";
-      packageName = "lru-cache";
-      version = "4.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz";
-        sha1 = "1d17679c069cda5d040991a09dbc2c0db377e55e";
-      };
-    };
-    "which-1.2.14" = {
-      name = "which";
-      packageName = "which";
-      version = "1.2.14";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/which/-/which-1.2.14.tgz";
-        sha1 = "9a87c4378f03e827cecaf1acdf56c736c01c14e5";
-      };
-    };
-    "pseudomap-1.0.2" = {
-      name = "pseudomap";
-      packageName = "pseudomap";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz";
-        sha1 = "f052a28da70e618917ef0a8ac34c1ae5a68286b3";
-      };
-    };
-    "yallist-2.1.2" = {
-      name = "yallist";
-      packageName = "yallist";
-      version = "2.1.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz";
-        sha1 = "1c11f9218f076089a47dd512f93c6699a6a81d52";
-      };
-    };
-    "isexe-2.0.0" = {
-      name = "isexe";
-      packageName = "isexe";
-      version = "2.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz";
-        sha1 = "e8fbf374dc556ff8947a10dcb0572d633f2cfa10";
-      };
-    };
-    "connect-3.6.0" = {
-      name = "connect";
-      packageName = "connect";
-      version = "3.6.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/connect/-/connect-3.6.0.tgz";
-        sha1 = "f09a4f7dcd17324b663b725c815bdb1c4158a46e";
-      };
-    };
-    "dns-prefetch-control-0.1.0" = {
-      name = "dns-prefetch-control";
-      packageName = "dns-prefetch-control";
-      version = "0.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/dns-prefetch-control/-/dns-prefetch-control-0.1.0.tgz";
-        sha1 = "60ddb457774e178f1f9415f0cabb0e85b0b300b2";
-      };
-    };
-    "dont-sniff-mimetype-1.0.0" = {
-      name = "dont-sniff-mimetype";
-      packageName = "dont-sniff-mimetype";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/dont-sniff-mimetype/-/dont-sniff-mimetype-1.0.0.tgz";
-        sha1 = "5932890dc9f4e2f19e5eb02a20026e5e5efc8f58";
-      };
-    };
-    "frameguard-3.0.0" = {
-      name = "frameguard";
-      packageName = "frameguard";
-      version = "3.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/frameguard/-/frameguard-3.0.0.tgz";
-        sha1 = "7bcad469ee7b96e91d12ceb3959c78235a9272e9";
-      };
-    };
-    "helmet-csp-2.4.0" = {
-      name = "helmet-csp";
-      packageName = "helmet-csp";
-      version = "2.4.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/helmet-csp/-/helmet-csp-2.4.0.tgz";
-        sha1 = "7e53a157167a0645aadd7177d12ae6c605c1842e";
-      };
-    };
-    "hide-powered-by-1.0.0" = {
-      name = "hide-powered-by";
-      packageName = "hide-powered-by";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/hide-powered-by/-/hide-powered-by-1.0.0.tgz";
-        sha1 = "4a85ad65881f62857fc70af7174a1184dccce32b";
-      };
-    };
-    "hpkp-2.0.0" = {
-      name = "hpkp";
-      packageName = "hpkp";
-      version = "2.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/hpkp/-/hpkp-2.0.0.tgz";
-        sha1 = "10e142264e76215a5d30c44ec43de64dee6d1672";
-      };
-    };
-    "hsts-2.0.0" = {
-      name = "hsts";
-      packageName = "hsts";
-      version = "2.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/hsts/-/hsts-2.0.0.tgz";
-        sha1 = "a52234c6070decf214b2b6b70bb144d07e4776c7";
-      };
-    };
-    "ienoopen-1.0.0" = {
-      name = "ienoopen";
-      packageName = "ienoopen";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/ienoopen/-/ienoopen-1.0.0.tgz";
-        sha1 = "346a428f474aac8f50cf3784ea2d0f16f62bda6b";
-      };
-    };
-    "nocache-2.0.0" = {
-      name = "nocache";
-      packageName = "nocache";
-      version = "2.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/nocache/-/nocache-2.0.0.tgz";
-        sha1 = "202b48021a0c4cbde2df80de15a17443c8b43980";
-      };
-    };
-    "referrer-policy-1.1.0" = {
-      name = "referrer-policy";
-      packageName = "referrer-policy";
-      version = "1.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/referrer-policy/-/referrer-policy-1.1.0.tgz";
-        sha1 = "35774eb735bf50fb6c078e83334b472350207d79";
-      };
-    };
-    "x-xss-protection-1.0.0" = {
-      name = "x-xss-protection";
-      packageName = "x-xss-protection";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/x-xss-protection/-/x-xss-protection-1.0.0.tgz";
-        sha1 = "898afb93869b24661cf9c52f9ee8db8ed0764dd9";
-      };
-    };
-    "debug-2.6.1" = {
-      name = "debug";
-      packageName = "debug";
-      version = "2.6.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/debug/-/debug-2.6.1.tgz";
-        sha1 = "79855090ba2c4e3115cc7d8769491d58f0491351";
-      };
-    };
-    "finalhandler-1.0.0" = {
-      name = "finalhandler";
-      packageName = "finalhandler";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.0.tgz";
-        sha1 = "b5691c2c0912092f18ac23e9416bde5cd7dc6755";
-      };
-    };
-    "encodeurl-1.0.1" = {
-      name = "encodeurl";
-      packageName = "encodeurl";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz";
-        sha1 = "79e3d58655346909fe6f0f45a5de68103b294d20";
-      };
-    };
-    "camelize-1.0.0" = {
-      name = "camelize";
-      packageName = "camelize";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz";
-        sha1 = "164a5483e630fa4321e5af07020e531831b2609b";
-      };
-    };
-    "content-security-policy-builder-1.1.0" = {
-      name = "content-security-policy-builder";
-      packageName = "content-security-policy-builder";
-      version = "1.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/content-security-policy-builder/-/content-security-policy-builder-1.1.0.tgz";
-        sha1 = "d91f1b076236c119850c7dee9924bf55e05772b3";
-      };
-    };
-    "dasherize-2.0.0" = {
-      name = "dasherize";
-      packageName = "dasherize";
-      version = "2.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz";
-        sha1 = "6d809c9cd0cf7bb8952d80fc84fa13d47ddb1308";
-      };
-    };
-    "lodash.reduce-4.6.0" = {
-      name = "lodash.reduce";
-      packageName = "lodash.reduce";
-      version = "4.6.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz";
-        sha1 = "f1ab6b839299ad48f784abbf476596f03b914d3b";
-      };
-    };
-    "platform-1.3.3" = {
-      name = "platform";
-      packageName = "platform";
-      version = "1.3.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/platform/-/platform-1.3.3.tgz";
-        sha1 = "646c77011899870b6a0903e75e997e8e51da7461";
-      };
-    };
-    "dashify-0.2.2" = {
-      name = "dashify";
-      packageName = "dashify";
-      version = "0.2.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/dashify/-/dashify-0.2.2.tgz";
-        sha1 = "6a07415a01c91faf4a32e38d9dfba71f61cb20fe";
-      };
-    };
-    "character-parser-1.2.1" = {
-      name = "character-parser";
-      packageName = "character-parser";
-      version = "1.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/character-parser/-/character-parser-1.2.1.tgz";
-        sha1 = "c0dde4ab182713b919b970959a123ecc1a30fcd6";
-      };
-    };
-    "clean-css-3.4.25" = {
-      name = "clean-css";
-      packageName = "clean-css";
-      version = "3.4.25";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/clean-css/-/clean-css-3.4.25.tgz";
-        sha1 = "9e9a52d5c1e6bc5123e1b2783fa65fe958946ede";
-      };
-    };
-    "constantinople-3.0.2" = {
-      name = "constantinople";
-      packageName = "constantinople";
-      version = "3.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/constantinople/-/constantinople-3.0.2.tgz";
-        sha1 = "4b945d9937907bcd98ee575122c3817516544141";
-      };
-    };
-    "jstransformer-0.0.2" = {
-      name = "jstransformer";
-      packageName = "jstransformer";
-      version = "0.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/jstransformer/-/jstransformer-0.0.2.tgz";
-        sha1 = "7aae29a903d196cfa0973d885d3e47947ecd76ab";
-      };
-    };
-    "transformers-2.1.0" = {
-      name = "transformers";
-      packageName = "transformers";
-      version = "2.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/transformers/-/transformers-2.1.0.tgz";
-        sha1 = "5d23cb35561dd85dc67fb8482309b47d53cce9a7";
-      };
-    };
-    "uglify-js-2.8.20" = {
-      name = "uglify-js";
-      packageName = "uglify-js";
-      version = "2.8.20";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.20.tgz";
-        sha1 = "be87100fbc18de3876ed606e9d24b4568311cecf";
-      };
-    };
-    "void-elements-2.0.1" = {
-      name = "void-elements";
-      packageName = "void-elements";
-      version = "2.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz";
-        sha1 = "c066afb582bb1cb4128d60ea92392e94d5e9dbec";
-      };
-    };
-    "with-4.0.3" = {
-      name = "with";
-      packageName = "with";
-      version = "4.0.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/with/-/with-4.0.3.tgz";
-        sha1 = "eefd154e9e79d2c8d3417b647a8f14d9fecce14e";
-      };
-    };
-    "commander-2.8.1" = {
-      name = "commander";
-      packageName = "commander";
-      version = "2.8.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz";
-        sha1 = "06be367febfda0c330aa1e2a072d3dc9762425d4";
-      };
-    };
-    "source-map-0.4.4" = {
-      name = "source-map";
-      packageName = "source-map";
-      version = "0.4.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz";
-        sha1 = "eba4f5da9c0dc999de68032d8b4f76173652036b";
-      };
-    };
-    "graceful-readlink-1.0.1" = {
-      name = "graceful-readlink";
-      packageName = "graceful-readlink";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz";
-        sha1 = "4cafad76bc62f02fa039b2f94e9a3dd3a391a725";
-      };
-    };
-    "amdefine-1.0.1" = {
-      name = "amdefine";
-      packageName = "amdefine";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz";
-        sha1 = "4a5282ac164729e93619bcfd3ad151f817ce91f5";
-      };
-    };
-    "acorn-2.7.0" = {
-      name = "acorn";
-      packageName = "acorn";
-      version = "2.7.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz";
-        sha1 = "ab6e7d9d886aaca8b085bc3312b79a198433f0e7";
-      };
-    };
-    "is-promise-2.1.0" = {
-      name = "is-promise";
-      packageName = "is-promise";
-      version = "2.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz";
-        sha1 = "79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa";
-      };
-    };
-    "promise-6.1.0" = {
-      name = "promise";
-      packageName = "promise";
-      version = "6.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/promise/-/promise-6.1.0.tgz";
-        sha1 = "2ce729f6b94b45c26891ad0602c5c90e04c6eef6";
-      };
-    };
-    "asap-1.0.0" = {
-      name = "asap";
-      packageName = "asap";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/asap/-/asap-1.0.0.tgz";
-        sha1 = "b2a45da5fdfa20b0496fc3768cc27c12fa916a7d";
-      };
-    };
-    "promise-2.0.0" = {
-      name = "promise";
-      packageName = "promise";
-      version = "2.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/promise/-/promise-2.0.0.tgz";
-        sha1 = "46648aa9d605af5d2e70c3024bf59436da02b80e";
-      };
-    };
-    "css-1.0.8" = {
-      name = "css";
-      packageName = "css";
-      version = "1.0.8";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/css/-/css-1.0.8.tgz";
-        sha1 = "9386811ca82bccc9ee7fb5a732b1e2a317c8a3e7";
-      };
-    };
-    "uglify-js-2.2.5" = {
-      name = "uglify-js";
-      packageName = "uglify-js";
-      version = "2.2.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/uglify-js/-/uglify-js-2.2.5.tgz";
-        sha1 = "a6e02a70d839792b9780488b7b8b184c095c99c7";
-      };
-    };
-    "is-promise-1.0.1" = {
-      name = "is-promise";
-      packageName = "is-promise";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/is-promise/-/is-promise-1.0.1.tgz";
-        sha1 = "31573761c057e33c2e91aab9e96da08cefbe76e5";
-      };
-    };
-    "css-parse-1.0.4" = {
-      name = "css-parse";
-      packageName = "css-parse";
-      version = "1.0.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/css-parse/-/css-parse-1.0.4.tgz";
-        sha1 = "38b0503fbf9da9f54e9c1dbda60e145c77117bdd";
-      };
-    };
-    "css-stringify-1.0.5" = {
-      name = "css-stringify";
-      packageName = "css-stringify";
-      version = "1.0.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/css-stringify/-/css-stringify-1.0.5.tgz";
-        sha1 = "b0d042946db2953bb9d292900a6cb5f6d0122031";
-      };
-    };
-    "source-map-0.1.43" = {
-      name = "source-map";
-      packageName = "source-map";
-      version = "0.1.43";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz";
-        sha1 = "c24bc146ca517c1471f5dacbe2571b2b7f9e3346";
-      };
-    };
-    "optimist-0.3.7" = {
-      name = "optimist";
-      packageName = "optimist";
-      version = "0.3.7";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz";
-        sha1 = "c90941ad59e4273328923074d2cf2e7cbc6ec0d9";
-      };
-    };
-    "wordwrap-0.0.3" = {
-      name = "wordwrap";
-      packageName = "wordwrap";
-      version = "0.0.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz";
-        sha1 = "a3d5da6cd5c0bc0008d37234bbaf1bed63059107";
-      };
-    };
-    "source-map-0.5.6" = {
-      name = "source-map";
-      packageName = "source-map";
-      version = "0.5.6";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz";
-        sha1 = "75ce38f52bf0733c5a7f0c118d81334a2bb5f412";
-      };
-    };
-    "yargs-3.10.0" = {
-      name = "yargs";
-      packageName = "yargs";
-      version = "3.10.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz";
-        sha1 = "f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1";
-      };
-    };
-    "uglify-to-browserify-1.0.2" = {
-      name = "uglify-to-browserify";
-      packageName = "uglify-to-browserify";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz";
-        sha1 = "6e0924d6bda6b5afe349e39a6d632850a0f882b7";
-      };
-    };
-    "camelcase-1.2.1" = {
-      name = "camelcase";
-      packageName = "camelcase";
-      version = "1.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz";
-        sha1 = "9bb5304d2e0b56698b2c758b08a3eaa9daa58a39";
-      };
-    };
-    "cliui-2.1.0" = {
-      name = "cliui";
-      packageName = "cliui";
-      version = "2.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz";
-        sha1 = "4b475760ff80264c762c3a1719032e91c7fea0d1";
-      };
-    };
-    "window-size-0.1.0" = {
-      name = "window-size";
-      packageName = "window-size";
-      version = "0.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz";
-        sha1 = "5438cd2ea93b202efa3a19fe8887aee7c94f9c9d";
-      };
-    };
-    "center-align-0.1.3" = {
-      name = "center-align";
-      packageName = "center-align";
-      version = "0.1.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz";
-        sha1 = "aa0d32629b6ee972200411cbd4461c907bc2b7ad";
-      };
-    };
-    "right-align-0.1.3" = {
-      name = "right-align";
-      packageName = "right-align";
-      version = "0.1.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz";
-        sha1 = "61339b722fe6a3515689210d24e14c96148613ef";
-      };
-    };
-    "wordwrap-0.0.2" = {
-      name = "wordwrap";
-      packageName = "wordwrap";
-      version = "0.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz";
-        sha1 = "b79669bb42ecb409f83d583cad52ca17eaa1643f";
-      };
-    };
-    "align-text-0.1.4" = {
-      name = "align-text";
-      packageName = "align-text";
-      version = "0.1.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz";
-        sha1 = "0cd90a561093f35d0a99256c22b7069433fad117";
-      };
-    };
-    "lazy-cache-1.0.4" = {
-      name = "lazy-cache";
-      packageName = "lazy-cache";
-      version = "1.0.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz";
-        sha1 = "a1d78fc3a50474cb80845d3b3b6e1da49a446e8e";
-      };
-    };
-    "kind-of-3.1.0" = {
-      name = "kind-of";
-      packageName = "kind-of";
-      version = "3.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/kind-of/-/kind-of-3.1.0.tgz";
-        sha1 = "475d698a5e49ff5e53d14e3e732429dc8bf4cf47";
-      };
-    };
-    "longest-1.0.1" = {
-      name = "longest";
-      packageName = "longest";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz";
-        sha1 = "30a0b2da38f73770e8294a0d22e6625ed77d0097";
-      };
-    };
-    "repeat-string-1.6.1" = {
-      name = "repeat-string";
-      packageName = "repeat-string";
-      version = "1.6.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz";
-        sha1 = "8dcae470e1c88abc2d600fff4a776286da75e637";
-      };
-    };
-    "is-buffer-1.1.5" = {
-      name = "is-buffer";
-      packageName = "is-buffer";
-      version = "1.1.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz";
-        sha1 = "1f3b26ef613b214b88cbca23cc6c01d87961eecc";
-      };
-    };
-    "acorn-1.2.2" = {
-      name = "acorn";
-      packageName = "acorn";
-      version = "1.2.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz";
-        sha1 = "c8ce27de0acc76d896d2b1fad3df588d9e82f014";
-      };
-    };
-    "acorn-globals-1.0.9" = {
-      name = "acorn-globals";
-      packageName = "acorn-globals";
-      version = "1.0.9";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz";
-        sha1 = "55bb5e98691507b74579d0513413217c380c54cf";
-      };
-    };
-    "abab-1.0.3" = {
-      name = "abab";
-      packageName = "abab";
-      version = "1.0.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/abab/-/abab-1.0.3.tgz";
-        sha1 = "b81de5f7274ec4e756d797cd834f303642724e5d";
-      };
-    };
-    "cssom-0.3.2" = {
-      name = "cssom";
-      packageName = "cssom";
-      version = "0.3.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz";
-        sha1 = "b8036170c79f07a90ff2f16e22284027a243848b";
-      };
-    };
-    "cssstyle-0.2.37" = {
-      name = "cssstyle";
-      packageName = "cssstyle";
-      version = "0.2.37";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz";
-        sha1 = "541097234cb2513c83ceed3acddc27ff27987d54";
-      };
-    };
-    "escodegen-1.8.1" = {
-      name = "escodegen";
-      packageName = "escodegen";
-      version = "1.8.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz";
-        sha1 = "5a5b53af4693110bebb0867aa3430dd3b70a1018";
-      };
-    };
-    "nwmatcher-1.3.9" = {
-      name = "nwmatcher";
-      packageName = "nwmatcher";
-      version = "1.3.9";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.3.9.tgz";
-        sha1 = "8bab486ff7fa3dfd086656bbe8b17116d3692d2a";
-      };
-    };
-    "parse5-1.5.1" = {
-      name = "parse5";
-      packageName = "parse5";
-      version = "1.5.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz";
-        sha1 = "9b7f3b0de32be78dc2401b17573ccaf0f6f59d94";
-      };
-    };
-    "request-2.81.0" = {
-      name = "request";
-      packageName = "request";
-      version = "2.81.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/request/-/request-2.81.0.tgz";
-        sha1 = "c6928946a0e06c5f8d6f8a9333469ffda46298a0";
-      };
-    };
-    "sax-1.2.2" = {
-      name = "sax";
-      packageName = "sax";
-      version = "1.2.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/sax/-/sax-1.2.2.tgz";
-        sha1 = "fd8631a23bc7826bef5d871bdb87378c95647828";
-      };
-    };
-    "symbol-tree-3.2.2" = {
-      name = "symbol-tree";
-      packageName = "symbol-tree";
-      version = "3.2.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz";
-        sha1 = "ae27db38f660a7ae2e1c3b7d1bc290819b8519e6";
-      };
-    };
-    "tough-cookie-2.3.2" = {
-      name = "tough-cookie";
-      packageName = "tough-cookie";
-      version = "2.3.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz";
-        sha1 = "f081f76e4c85720e6c37a5faced737150d84072a";
-      };
-    };
-    "webidl-conversions-2.0.1" = {
-      name = "webidl-conversions";
-      packageName = "webidl-conversions";
-      version = "2.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-2.0.1.tgz";
-        sha1 = "3bf8258f7d318c7443c36f2e169402a1a6703506";
-      };
-    };
-    "whatwg-url-compat-0.6.5" = {
-      name = "whatwg-url-compat";
-      packageName = "whatwg-url-compat";
-      version = "0.6.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/whatwg-url-compat/-/whatwg-url-compat-0.6.5.tgz";
-        sha1 = "00898111af689bb097541cd5a45ca6c8798445bf";
-      };
-    };
-    "xml-name-validator-2.0.1" = {
-      name = "xml-name-validator";
-      packageName = "xml-name-validator";
-      version = "2.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz";
-        sha1 = "4d8b8f1eccd3419aa362061becef515e1e559635";
-      };
-    };
-    "estraverse-1.9.3" = {
-      name = "estraverse";
-      packageName = "estraverse";
-      version = "1.9.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz";
-        sha1 = "af67f2dc922582415950926091a4005d29c9bb44";
-      };
-    };
-    "esutils-2.0.2" = {
-      name = "esutils";
-      packageName = "esutils";
-      version = "2.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz";
-        sha1 = "0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b";
-      };
-    };
-    "esprima-2.7.3" = {
-      name = "esprima";
-      packageName = "esprima";
-      version = "2.7.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz";
-        sha1 = "96e3b70d5779f6ad49cd032673d1c312767ba581";
-      };
-    };
-    "optionator-0.8.2" = {
-      name = "optionator";
-      packageName = "optionator";
-      version = "0.8.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz";
-        sha1 = "364c5e409d3f4d6301d6c0b4c05bba50180aeb64";
-      };
-    };
-    "source-map-0.2.0" = {
-      name = "source-map";
-      packageName = "source-map";
-      version = "0.2.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz";
-        sha1 = "dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d";
-      };
-    };
-    "prelude-ls-1.1.2" = {
-      name = "prelude-ls";
-      packageName = "prelude-ls";
-      version = "1.1.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz";
-        sha1 = "21932a549f5e52ffd9a827f570e04be62a97da54";
-      };
-    };
-    "deep-is-0.1.3" = {
-      name = "deep-is";
-      packageName = "deep-is";
-      version = "0.1.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz";
-        sha1 = "b369d6fb5dbc13eecf524f91b070feedc357cf34";
-      };
-    };
-    "wordwrap-1.0.0" = {
-      name = "wordwrap";
-      packageName = "wordwrap";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz";
-        sha1 = "27584810891456a4171c8d0226441ade90cbcaeb";
-      };
-    };
-    "type-check-0.3.2" = {
-      name = "type-check";
-      packageName = "type-check";
-      version = "0.3.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz";
-        sha1 = "5884cab512cf1d355e3fb784f30804b2b520db72";
-      };
-    };
-    "levn-0.3.0" = {
-      name = "levn";
-      packageName = "levn";
-      version = "0.3.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz";
-        sha1 = "3b09924edf9f083c0490fdd4c0bc4421e04764ee";
-      };
-    };
-    "fast-levenshtein-2.0.6" = {
-      name = "fast-levenshtein";
-      packageName = "fast-levenshtein";
-      version = "2.0.6";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz";
-        sha1 = "3d8a5c66883a16a30ca8643e851f19baa7797917";
-      };
-    };
-    "aws-sign2-0.6.0" = {
-      name = "aws-sign2";
-      packageName = "aws-sign2";
-      version = "0.6.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz";
-        sha1 = "14342dd38dbcc94d0e5b87d763cd63612c0e794f";
-      };
-    };
-    "aws4-1.6.0" = {
-      name = "aws4";
-      packageName = "aws4";
-      version = "1.6.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz";
-        sha1 = "83ef5ca860b2b32e4a0deedee8c771b9db57471e";
-      };
-    };
-    "caseless-0.12.0" = {
-      name = "caseless";
-      packageName = "caseless";
-      version = "0.12.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz";
-        sha1 = "1b681c21ff84033c826543090689420d187151dc";
-      };
-    };
-    "combined-stream-1.0.5" = {
-      name = "combined-stream";
-      packageName = "combined-stream";
-      version = "1.0.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz";
-        sha1 = "938370a57b4a51dea2c77c15d5c5fdf895164009";
-      };
-    };
-    "extend-3.0.0" = {
-      name = "extend";
-      packageName = "extend";
-      version = "3.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz";
-        sha1 = "5a474353b9f3353ddd8176dfd37b91c83a46f1d4";
-      };
-    };
-    "forever-agent-0.6.1" = {
-      name = "forever-agent";
-      packageName = "forever-agent";
-      version = "0.6.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz";
-        sha1 = "fbc71f0c41adeb37f96c577ad1ed42d8fdacca91";
-      };
-    };
-    "form-data-2.1.2" = {
-      name = "form-data";
-      packageName = "form-data";
-      version = "2.1.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz";
-        sha1 = "89c3534008b97eada4cbb157d58f6f5df025eae4";
-      };
-    };
-    "har-validator-4.2.1" = {
-      name = "har-validator";
-      packageName = "har-validator";
-      version = "4.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz";
-        sha1 = "33481d0f1bbff600dd203d75812a6a5fba002e2a";
-      };
-    };
-    "hawk-3.1.3" = {
-      name = "hawk";
-      packageName = "hawk";
-      version = "3.1.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz";
-        sha1 = "078444bd7c1640b0fe540d2c9b73d59678e8e1c4";
-      };
-    };
-    "http-signature-1.1.1" = {
-      name = "http-signature";
-      packageName = "http-signature";
-      version = "1.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz";
-        sha1 = "df72e267066cd0ac67fb76adf8e134a8fbcf91bf";
-      };
-    };
-    "is-typedarray-1.0.0" = {
-      name = "is-typedarray";
-      packageName = "is-typedarray";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz";
-        sha1 = "e479c80858df0c1b11ddda6940f96011fcda4a9a";
-      };
-    };
-    "isstream-0.1.2" = {
-      name = "isstream";
-      packageName = "isstream";
-      version = "0.1.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz";
-        sha1 = "47e63f7af55afa6f92e1500e690eb8b8529c099a";
-      };
-    };
-    "json-stringify-safe-5.0.1" = {
-      name = "json-stringify-safe";
-      packageName = "json-stringify-safe";
-      version = "5.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz";
-        sha1 = "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb";
-      };
-    };
-    "oauth-sign-0.8.2" = {
-      name = "oauth-sign";
-      packageName = "oauth-sign";
-      version = "0.8.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz";
-        sha1 = "46a6ab7f0aead8deae9ec0565780b7d4efeb9d43";
-      };
-    };
-    "performance-now-0.2.0" = {
-      name = "performance-now";
-      packageName = "performance-now";
-      version = "0.2.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz";
-        sha1 = "33ef30c5c77d4ea21c5a53869d91b56d8f2555e5";
-      };
-    };
-    "qs-6.4.0" = {
-      name = "qs";
-      packageName = "qs";
-      version = "6.4.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz";
-        sha1 = "13e26d28ad6b0ffaa91312cd3bf708ed351e7233";
-      };
-    };
-    "safe-buffer-5.0.1" = {
-      name = "safe-buffer";
-      packageName = "safe-buffer";
-      version = "5.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz";
-        sha1 = "d263ca54696cd8a306b5ca6551e92de57918fbe7";
-      };
-    };
-    "stringstream-0.0.5" = {
-      name = "stringstream";
-      packageName = "stringstream";
-      version = "0.0.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz";
-        sha1 = "4e484cd4de5a0bbbee18e46307710a8a81621878";
-      };
-    };
-    "tunnel-agent-0.6.0" = {
-      name = "tunnel-agent";
-      packageName = "tunnel-agent";
-      version = "0.6.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz";
-        sha1 = "27a5dea06b36b04a0a9966774b290868f0fc40fd";
-      };
-    };
-    "delayed-stream-1.0.0" = {
-      name = "delayed-stream";
-      packageName = "delayed-stream";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz";
-        sha1 = "df3ae199acadfb7d440aaae0b29e2272b24ec619";
-      };
-    };
-    "asynckit-0.4.0" = {
-      name = "asynckit";
-      packageName = "asynckit";
-      version = "0.4.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz";
-        sha1 = "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79";
-      };
-    };
-    "ajv-4.11.5" = {
-      name = "ajv";
-      packageName = "ajv";
-      version = "4.11.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/ajv/-/ajv-4.11.5.tgz";
-        sha1 = "b6ee74657b993a01dce44b7944d56f485828d5bd";
-      };
-    };
-    "har-schema-1.0.5" = {
-      name = "har-schema";
-      packageName = "har-schema";
-      version = "1.0.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz";
-        sha1 = "d263135f43307c02c602afc8fe95970c0151369e";
-      };
-    };
-    "co-4.6.0" = {
-      name = "co";
-      packageName = "co";
-      version = "4.6.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/co/-/co-4.6.0.tgz";
-        sha1 = "6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184";
-      };
-    };
-    "json-stable-stringify-1.0.1" = {
-      name = "json-stable-stringify";
-      packageName = "json-stable-stringify";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz";
-        sha1 = "9a759d39c5f2ff503fd5300646ed445f88c4f9af";
-      };
-    };
-    "jsonify-0.0.0" = {
-      name = "jsonify";
-      packageName = "jsonify";
-      version = "0.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz";
-        sha1 = "2c74b6ee41d93ca51b7b5aaee8f503631d252a73";
-      };
-    };
-    "hoek-2.16.3" = {
-      name = "hoek";
-      packageName = "hoek";
-      version = "2.16.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz";
-        sha1 = "20bb7403d3cea398e91dc4710a8ff1b8274a25ed";
-      };
-    };
-    "boom-2.10.1" = {
-      name = "boom";
-      packageName = "boom";
-      version = "2.10.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz";
-        sha1 = "39c8918ceff5799f83f9492a848f625add0c766f";
-      };
-    };
-    "cryptiles-2.0.5" = {
-      name = "cryptiles";
-      packageName = "cryptiles";
-      version = "2.0.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz";
-        sha1 = "3bdfecdc608147c1c67202fa291e7dca59eaa3b8";
-      };
-    };
-    "sntp-1.0.9" = {
-      name = "sntp";
-      packageName = "sntp";
-      version = "1.0.9";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz";
-        sha1 = "6541184cc90aeea6c6e7b35e2659082443c66198";
-      };
-    };
-    "assert-plus-0.2.0" = {
-      name = "assert-plus";
-      packageName = "assert-plus";
-      version = "0.2.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz";
-        sha1 = "d74e1b87e7affc0db8aadb7021f3fe48101ab234";
-      };
-    };
-    "jsprim-1.4.0" = {
-      name = "jsprim";
-      packageName = "jsprim";
-      version = "1.4.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz";
-        sha1 = "a3b87e40298d8c380552d8cc7628a0bb95a22918";
-      };
-    };
-    "sshpk-1.11.0" = {
-      name = "sshpk";
-      packageName = "sshpk";
-      version = "1.11.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/sshpk/-/sshpk-1.11.0.tgz";
-        sha1 = "2d8d5ebb4a6fab28ffba37fa62a90f4a3ea59d77";
-      };
-    };
-    "assert-plus-1.0.0" = {
-      name = "assert-plus";
-      packageName = "assert-plus";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz";
-        sha1 = "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525";
-      };
-    };
-    "extsprintf-1.0.2" = {
-      name = "extsprintf";
-      packageName = "extsprintf";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz";
-        sha1 = "e1080e0658e300b06294990cc70e1502235fd550";
-      };
-    };
-    "json-schema-0.2.3" = {
-      name = "json-schema";
-      packageName = "json-schema";
-      version = "0.2.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz";
-        sha1 = "b480c892e59a2f05954ce727bd3f2a4e882f9e13";
-      };
-    };
-    "verror-1.3.6" = {
-      name = "verror";
-      packageName = "verror";
-      version = "1.3.6";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz";
-        sha1 = "cff5df12946d297d2baaefaa2689e25be01c005c";
-      };
-    };
-    "asn1-0.2.3" = {
-      name = "asn1";
-      packageName = "asn1";
-      version = "0.2.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz";
-        sha1 = "dac8787713c9966849fc8180777ebe9c1ddf3b86";
-      };
-    };
-    "dashdash-1.14.1" = {
-      name = "dashdash";
-      packageName = "dashdash";
-      version = "1.14.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz";
-        sha1 = "853cfa0f7cbe2fed5de20326b8dd581035f6e2f0";
-      };
-    };
-    "getpass-0.1.6" = {
-      name = "getpass";
-      packageName = "getpass";
-      version = "0.1.6";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz";
-        sha1 = "283ffd9fc1256840875311c1b60e8c40187110e6";
-      };
-    };
-    "jsbn-0.1.1" = {
-      name = "jsbn";
-      packageName = "jsbn";
-      version = "0.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz";
-        sha1 = "a5e654c2e5a2deb5f201d96cefbca80c0ef2f513";
-      };
-    };
-    "tweetnacl-0.14.5" = {
-      name = "tweetnacl";
-      packageName = "tweetnacl";
-      version = "0.14.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz";
-        sha1 = "5ae68177f192d4456269d108afa93ff8743f4f64";
-      };
-    };
-    "jodid25519-1.0.2" = {
-      name = "jodid25519";
-      packageName = "jodid25519";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz";
-        sha1 = "06d4912255093419477d425633606e0e90782967";
-      };
-    };
-    "ecc-jsbn-0.1.1" = {
-      name = "ecc-jsbn";
-      packageName = "ecc-jsbn";
-      version = "0.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz";
-        sha1 = "0fc73a9ed5f0d53c38193398523ef7e543777505";
-      };
-    };
-    "bcrypt-pbkdf-1.0.1" = {
-      name = "bcrypt-pbkdf";
-      packageName = "bcrypt-pbkdf";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz";
-        sha1 = "63bc5dcb61331b92bc05fd528953c33462a06f8d";
-      };
-    };
-    "punycode-1.4.1" = {
-      name = "punycode";
-      packageName = "punycode";
-      version = "1.4.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz";
-        sha1 = "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e";
-      };
-    };
-    "tr46-0.0.3" = {
-      name = "tr46";
-      packageName = "tr46";
-      version = "0.0.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz";
-        sha1 = "8184fd347dac9cdc185992f3a6622e14b9d9ab6a";
-      };
-    };
-    "vary-1.1.1" = {
-      name = "vary";
-      packageName = "vary";
-      version = "1.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz";
-        sha1 = "67535ebb694c1d52257457984665323f587e8d37";
-      };
-    };
-    "minimist-0.0.8" = {
-      name = "minimist";
-      packageName = "minimist";
-      version = "0.0.8";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz";
-        sha1 = "857fcabfc3397d2625b8228262e86aa7a011b05d";
-      };
-    };
-    "minimist-0.0.10" = {
-      name = "minimist";
-      packageName = "minimist";
-      version = "0.0.10";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz";
-        sha1 = "de3f98543dbf96082be48ad1a0c7cda836301dcf";
-      };
-    };
-    "glob-7.1.1" = {
-      name = "glob";
-      packageName = "glob";
-      version = "7.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz";
-        sha1 = "805211df04faaf1c63a3600306cdf5ade50b2ec8";
-      };
-    };
-    "fs.realpath-1.0.0" = {
-      name = "fs.realpath";
-      packageName = "fs.realpath";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz";
-        sha1 = "1504ad2523158caa40db4a2787cb01411994ea4f";
-      };
-    };
-    "htmlparser2-3.9.2" = {
-      name = "htmlparser2";
-      packageName = "htmlparser2";
-      version = "3.9.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz";
-        sha1 = "1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338";
-      };
-    };
-    "regexp-quote-0.0.0" = {
-      name = "regexp-quote";
-      packageName = "regexp-quote";
-      version = "0.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/regexp-quote/-/regexp-quote-0.0.0.tgz";
-        sha1 = "1e0f4650c862dcbfed54fd42b148e9bb1721fcf2";
-      };
-    };
-    "xtend-4.0.1" = {
-      name = "xtend";
-      packageName = "xtend";
-      version = "4.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz";
-        sha1 = "a5c6d532be656e23db820efb943a1f04998d63af";
-      };
-    };
-    "domelementtype-1.3.0" = {
-      name = "domelementtype";
-      packageName = "domelementtype";
-      version = "1.3.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz";
-        sha1 = "b17aed82e8ab59e52dd9c19b1756e0fc187204c2";
-      };
-    };
-    "domhandler-2.3.0" = {
-      name = "domhandler";
-      packageName = "domhandler";
-      version = "2.3.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz";
-        sha1 = "2de59a0822d5027fabff6f032c2b25a2a8abe738";
-      };
-    };
-    "domutils-1.5.1" = {
-      name = "domutils";
-      packageName = "domutils";
-      version = "1.5.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz";
-        sha1 = "dcd8488a26f563d61079e48c9f7b7e32373682cf";
-      };
-    };
-    "entities-1.1.1" = {
-      name = "entities";
-      packageName = "entities";
-      version = "1.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz";
-        sha1 = "6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0";
-      };
-    };
-    "readable-stream-2.2.6" = {
-      name = "readable-stream";
-      packageName = "readable-stream";
-      version = "2.2.6";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.6.tgz";
-        sha1 = "8b43aed76e71483938d12a8d46c6cf1a00b1f816";
-      };
-    };
-    "dom-serializer-0.1.0" = {
-      name = "dom-serializer";
-      packageName = "dom-serializer";
-      version = "0.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz";
-        sha1 = "073c697546ce0780ce23be4a28e293e40bc30c82";
-      };
-    };
-    "domelementtype-1.1.3" = {
-      name = "domelementtype";
-      packageName = "domelementtype";
-      version = "1.1.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz";
-        sha1 = "bd28773e2642881aec51544924299c5cd822185b";
-      };
-    };
-    "buffer-shims-1.0.0" = {
-      name = "buffer-shims";
-      packageName = "buffer-shims";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz";
-        sha1 = "9978ce317388c649ad8793028c3477ef044a8b51";
-      };
-    };
-    "isarray-1.0.0" = {
-      name = "isarray";
-      packageName = "isarray";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz";
-        sha1 = "bb935d48582cba168c06834957a54a3e07124f11";
-      };
-    };
-    "process-nextick-args-1.0.7" = {
-      name = "process-nextick-args";
-      packageName = "process-nextick-args";
-      version = "1.0.7";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz";
-        sha1 = "150e20b756590ad3f91093f25a4f2ad8bff30ba3";
-      };
-    };
-    "util-deprecate-1.0.2" = {
-      name = "util-deprecate";
-      packageName = "util-deprecate";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz";
-        sha1 = "450d4dc9fa70de732762fbd2d4a28981419a0ccf";
-      };
-    };
-    "destroy-1.0.4" = {
-      name = "destroy";
-      packageName = "destroy";
-      version = "1.0.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz";
-        sha1 = "978857442c44749e4206613e37946205826abd80";
-      };
-    };
-    "yargs-6.6.0" = {
-      name = "yargs";
-      packageName = "yargs";
-      version = "6.6.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz";
-        sha1 = "782ec21ef403345f830a808ca3d513af56065208";
-      };
-    };
-    "camelcase-3.0.0" = {
-      name = "camelcase";
-      packageName = "camelcase";
-      version = "3.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz";
-        sha1 = "32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a";
-      };
-    };
-    "cliui-3.2.0" = {
-      name = "cliui";
-      packageName = "cliui";
-      version = "3.2.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz";
-        sha1 = "120601537a916d29940f934da3b48d585a39213d";
-      };
-    };
-    "get-caller-file-1.0.2" = {
-      name = "get-caller-file";
-      packageName = "get-caller-file";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz";
-        sha1 = "f702e63127e7e231c160a80c1554acb70d5047e5";
-      };
-    };
-    "os-locale-1.4.0" = {
-      name = "os-locale";
-      packageName = "os-locale";
-      version = "1.4.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz";
-        sha1 = "20f9f17ae29ed345e8bde583b13d2009803c14d9";
-      };
-    };
-    "require-directory-2.1.1" = {
-      name = "require-directory";
-      packageName = "require-directory";
-      version = "2.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz";
-        sha1 = "8c64ad5fd30dab1c976e2344ffe7f792a6a6df42";
-      };
-    };
-    "require-main-filename-1.0.1" = {
-      name = "require-main-filename";
-      packageName = "require-main-filename";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz";
-        sha1 = "97f717b69d48784f5f526a6c5aa8ffdda055a4d1";
-      };
-    };
-    "set-blocking-2.0.0" = {
-      name = "set-blocking";
-      packageName = "set-blocking";
-      version = "2.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz";
-        sha1 = "045f9782d011ae9a6803ddd382b24392b3d890f7";
-      };
-    };
-    "string-width-1.0.2" = {
-      name = "string-width";
-      packageName = "string-width";
-      version = "1.0.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz";
-        sha1 = "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3";
-      };
-    };
-    "which-module-1.0.0" = {
-      name = "which-module";
-      packageName = "which-module";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz";
-        sha1 = "bba63ca861948994ff307736089e3b96026c2a4f";
-      };
-    };
-    "y18n-3.2.1" = {
-      name = "y18n";
-      packageName = "y18n";
-      version = "3.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz";
-        sha1 = "6d15fba884c08679c0d77e88e7759e811e07fa41";
-      };
-    };
-    "yargs-parser-4.2.1" = {
-      name = "yargs-parser";
-      packageName = "yargs-parser";
-      version = "4.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz";
-        sha1 = "29cceac0dc4f03c6c87b4a9f217dd18c9f74871c";
-      };
-    };
-    "strip-ansi-3.0.1" = {
-      name = "strip-ansi";
-      packageName = "strip-ansi";
-      version = "3.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz";
-        sha1 = "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf";
-      };
-    };
-    "wrap-ansi-2.1.0" = {
-      name = "wrap-ansi";
-      packageName = "wrap-ansi";
-      version = "2.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz";
-        sha1 = "d8fc3d284dd05794fe84973caecdd1cf824fdd85";
-      };
-    };
-    "ansi-regex-2.1.1" = {
-      name = "ansi-regex";
-      packageName = "ansi-regex";
-      version = "2.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz";
-        sha1 = "c3b33ab5ee360d86e0e628f0468ae7ef27d654df";
-      };
-    };
-    "lcid-1.0.0" = {
-      name = "lcid";
-      packageName = "lcid";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz";
-        sha1 = "308accafa0bc483a3867b4b6f2b9506251d1b835";
-      };
-    };
-    "invert-kv-1.0.0" = {
-      name = "invert-kv";
-      packageName = "invert-kv";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz";
-        sha1 = "104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6";
-      };
-    };
-    "code-point-at-1.1.0" = {
-      name = "code-point-at";
-      packageName = "code-point-at";
-      version = "1.1.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz";
-        sha1 = "0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77";
-      };
-    };
-    "is-fullwidth-code-point-1.0.0" = {
-      name = "is-fullwidth-code-point";
-      packageName = "is-fullwidth-code-point";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz";
-        sha1 = "ef9e31386f031a7f0d643af82fde50c457ef00cb";
-      };
-    };
-    "faye-websocket-0.10.0" = {
-      name = "faye-websocket";
-      packageName = "faye-websocket";
-      version = "0.10.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz";
-        sha1 = "4e492f8d04dfb6f89003507f6edbf2d501e7c6f4";
-      };
-    };
-    "uuid-2.0.3" = {
-      name = "uuid";
-      packageName = "uuid";
-      version = "2.0.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz";
-        sha1 = "67e2e863797215530dff318e5bf9dcebfd47b21a";
-      };
-    };
-    "websocket-driver-0.6.5" = {
-      name = "websocket-driver";
-      packageName = "websocket-driver";
-      version = "0.6.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz";
-        sha1 = "5cb2556ceb85f4373c6d8238aa691c8454e13a36";
-      };
-    };
-    "websocket-extensions-0.1.1" = {
-      name = "websocket-extensions";
-      packageName = "websocket-extensions";
-      version = "0.1.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz";
-        sha1 = "76899499c184b6ef754377c2dbb0cd6cb55d29e7";
-      };
-    };
-    "assert-1.4.1" = {
-      name = "assert";
-      packageName = "assert";
-      version = "1.4.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz";
-        sha1 = "99912d591836b5a6f5b345c0f07eefc08fc65d91";
-      };
-    };
-    "es6-shim-0.27.1" = {
-      name = "es6-shim";
-      packageName = "es6-shim";
-      version = "0.27.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/es6-shim/-/es6-shim-0.27.1.tgz";
-        sha1 = "bd3f870663eac2ede8e8943e2a6d23c052d53fc6";
-      };
-    };
-    "minimum-tls-version-0.0.1" = {
-      name = "minimum-tls-version";
-      packageName = "minimum-tls-version";
-      version = "0.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/minimum-tls-version/-/minimum-tls-version-0.0.1.tgz";
-        sha1 = "42220187e52700e253218cfa8ad974920b73ea74";
-      };
-    };
-    "util-0.10.3" = {
-      name = "util";
-      packageName = "util";
-      version = "0.10.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/util/-/util-0.10.3.tgz";
-        sha1 = "7afb1afe50805246489e3db7fe0ed379336ac0f9";
-      };
-    };
-    "inherits-2.0.1" = {
-      name = "inherits";
-      packageName = "inherits";
-      version = "2.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz";
-        sha1 = "b17d08d326b4423e568eff719f91b0b1cbdf69f1";
-      };
-    };
-    "underscore-1.6.0" = {
-      name = "underscore";
-      packageName = "underscore";
-      version = "1.6.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz";
-        sha1 = "8b38b10cacdef63337b8b24e4ff86d45aea529a8";
-      };
-    };
-    "xml2js-0.1.14" = {
-      name = "xml2js";
-      packageName = "xml2js";
-      version = "0.1.14";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/xml2js/-/xml2js-0.1.14.tgz";
-        sha1 = "5274e67f5a64c5f92974cd85139e0332adc6b90c";
-      };
-    };
-    "databank-1.0.1" = {
-      name = "databank";
-      packageName = "databank";
-      version = "1.0.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/databank/-/databank-1.0.1.tgz";
-        sha1 = "ef063df1f1aaceb8507ce70f7de6cb32980e874b";
-      };
-    };
-    "mongodb-2.2.25" = {
-      name = "mongodb";
-      packageName = "mongodb";
-      version = "2.2.25";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/mongodb/-/mongodb-2.2.25.tgz";
-        sha1 = "d3b25dad00eda2bdfcbc996210ba082ac686a6b6";
-      };
-    };
-    "setimmediate-1.0.5" = {
-      name = "setimmediate";
-      packageName = "setimmediate";
-      version = "1.0.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz";
-        sha1 = "290cbb232e306942d7d7ea9b83732ab7856f8285";
-      };
-    };
-    "es6-promise-3.2.1" = {
-      name = "es6-promise";
-      packageName = "es6-promise";
-      version = "3.2.1";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz";
-        sha1 = "ec56233868032909207170c39448e24449dd1fc4";
-      };
-    };
-    "mongodb-core-2.1.9" = {
-      name = "mongodb-core";
-      packageName = "mongodb-core";
-      version = "2.1.9";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.9.tgz";
-        sha1 = "85aa71ee4fb716196e06b787557bf139f801daf5";
-      };
-    };
-    "readable-stream-2.1.5" = {
-      name = "readable-stream";
-      packageName = "readable-stream";
-      version = "2.1.5";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz";
-        sha1 = "66fa8b720e1438b364681f2ad1a63c618448c9d0";
-      };
-    };
-    "bson-1.0.4" = {
-      name = "bson";
-      packageName = "bson";
-      version = "1.0.4";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/bson/-/bson-1.0.4.tgz";
-        sha1 = "93c10d39eaa5b58415cbc4052f3e53e562b0b72c";
-      };
-    };
-    "require_optional-1.0.0" = {
-      name = "require_optional";
-      packageName = "require_optional";
-      version = "1.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/require_optional/-/require_optional-1.0.0.tgz";
-        sha1 = "52a86137a849728eb60a55533617f8f914f59abf";
-      };
-    };
-    "resolve-from-2.0.0" = {
-      name = "resolve-from";
-      packageName = "resolve-from";
-      version = "2.0.0";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz";
-        sha1 = "9480ab20e94ffa1d9e80a804c7ea147611966b57";
-      };
-    };
-    "async-0.9.2" = {
-      name = "async";
-      packageName = "async";
-      version = "0.9.2";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/async/-/async-0.9.2.tgz";
-        sha1 = "aea74d5e61c1f899613bf64bda66d4c78f2fd17d";
-      };
-    };
-    "redis-0.10.3" = {
-      name = "redis";
-      packageName = "redis";
-      version = "0.10.3";
-      src = fetchurl {
-        url = "https://registry.npmjs.org/redis/-/redis-0.10.3.tgz";
-        sha1 = "8927fe2110ee39617bcf3fd37b89d8e123911bb6";
-      };
-    };
-  };
-  args = {
-    name = "pump.io";
-    packageName = "pump.io";
-    version = "3.0.0";
-    src = fetchurl { url = "https://registry.npmjs.org/pump.io/-/pump.io-3.0.0.tgz"; sha1 = "ycfm7ak83xi8mgafhp9q0n6n3kzmdz16"; };
-    dependencies = [
-      (sources."bcrypt-0.8.7" // {
-        dependencies = [
-          sources."bindings-1.2.1"
-          sources."nan-2.3.5"
-        ];
-      })
-      (sources."bunyan-1.8.9" // {
-        dependencies = [
-          (sources."dtrace-provider-0.8.1" // {
-            dependencies = [
-              sources."nan-2.5.1"
-            ];
-          })
-          (sources."mv-2.1.1" // {
-            dependencies = [
-              sources."ncp-2.0.0"
-              (sources."rimraf-2.4.5" // {
-                dependencies = [
-                  (sources."glob-6.0.4" // {
-                    dependencies = [
-                      (sources."inflight-1.0.6" // {
-                        dependencies = [
-                          sources."wrappy-1.0.2"
-                        ];
-                      })
-                      sources."inherits-2.0.3"
-                      (sources."minimatch-3.0.3" // {
-                        dependencies = [
-                          (sources."brace-expansion-1.1.6" // {
-                            dependencies = [
-                              sources."balanced-match-0.4.2"
-                              sources."concat-map-0.0.1"
-                            ];
-                          })
-                        ];
-                      })
-                      (sources."once-1.4.0" // {
-                        dependencies = [
-                          sources."wrappy-1.0.2"
-                        ];
-                      })
-                      sources."path-is-absolute-1.0.1"
-                    ];
-                  })
-                ];
-              })
-            ];
-          })
-          sources."safe-json-stringify-1.0.4"
-          sources."moment-2.18.1"
-        ];
-      })
-      sources."colors-1.1.2"
-      (sources."connect-2.30.2" // {
-        dependencies = [
-          sources."basic-auth-connect-1.0.0"
-          (sources."body-parser-1.13.3" // {
-            dependencies = [
-              sources."iconv-lite-0.4.11"
-              (sources."on-finished-2.3.0" // {
-                dependencies = [
-                  sources."ee-first-1.1.1"
-                ];
-              })
-              (sources."raw-body-2.1.7" // {
-                dependencies = [
-                  sources."bytes-2.4.0"
-                  sources."iconv-lite-0.4.13"
-                  sources."unpipe-1.0.0"
-                ];
-              })
-            ];
-          })
-          sources."bytes-2.1.0"
-          sources."cookie-0.1.3"
-          sources."cookie-parser-1.3.5"
-          sources."cookie-signature-1.0.6"
-          (sources."compression-1.5.2" // {
-            dependencies = [
-              (sources."accepts-1.2.13" // {
-                dependencies = [
-                  (sources."mime-types-2.1.15" // {
-                    dependencies = [
-                      sources."mime-db-1.27.0"
-                    ];
-                  })
-                  sources."negotiator-0.5.3"
-                ];
-              })
-              (sources."compressible-2.0.10" // {
-                dependencies = [
-                  sources."mime-db-1.27.0"
-                ];
-              })
-              sources."vary-1.0.1"
-            ];
-          })
-          (sources."connect-timeout-1.6.2" // {
-            dependencies = [
-              sources."ms-0.7.1"
-            ];
-          })
-          sources."content-type-1.0.2"
-          (sources."csurf-1.8.3" // {
-            dependencies = [
-              (sources."csrf-3.0.6" // {
-                dependencies = [
-                  sources."rndm-1.2.0"
-                  sources."tsscmp-1.0.5"
-                  (sources."uid-safe-2.1.4" // {
-                    dependencies = [
-                      sources."random-bytes-1.0.0"
-                    ];
-                  })
-                ];
-              })
-            ];
-          })
-          (sources."debug-2.2.0" // {
-            dependencies = [
-              sources."ms-0.7.1"
-            ];
-          })
-          sources."depd-1.0.1"
-          (sources."errorhandler-1.4.3" // {
-            dependencies = [
-              (sources."accepts-1.3.3" // {
-                dependencies = [
-                  (sources."mime-types-2.1.15" // {
-                    dependencies = [
-                      sources."mime-db-1.27.0"
-                    ];
-                  })
-                  sources."negotiator-0.6.1"
-                ];
-              })
-              sources."escape-html-1.0.3"
-            ];
-          })
-          (sources."express-session-1.11.3" // {
-            dependencies = [
-              sources."crc-3.3.0"
-              (sources."uid-safe-2.0.0" // {
-                dependencies = [
-                  sources."base64-url-1.2.1"
-                ];
-              })
-            ];
-          })
-          (sources."finalhandler-0.4.0" // {
-            dependencies = [
-              sources."escape-html-1.0.2"
-              (sources."on-finished-2.3.0" // {
-                dependencies = [
-                  sources."ee-first-1.1.1"
-                ];
-              })
-              sources."unpipe-1.0.0"
-            ];
-          })
-          sources."fresh-0.3.0"
-          (sources."http-errors-1.3.1" // {
-            dependencies = [
-              sources."inherits-2.0.3"
-              sources."statuses-1.3.1"
-            ];
-          })
-          (sources."morgan-1.6.1" // {
-            dependencies = [
-              sources."basic-auth-1.0.4"
-              (sources."on-finished-2.3.0" // {
-                dependencies = [
-                  sources."ee-first-1.1.1"
-                ];
-              })
-            ];
-          })
-          (sources."multiparty-3.3.2" // {
-            dependencies = [
-              (sources."readable-stream-1.1.14" // {
-                dependencies = [
-                  sources."core-util-is-1.0.2"
-                  sources."isarray-0.0.1"
-                  sources."string_decoder-0.10.31"
-                  sources."inherits-2.0.3"
-                ];
-              })
-              sources."stream-counter-0.2.0"
-            ];
-          })
-          sources."on-headers-1.0.1"
-          sources."parseurl-1.3.1"
-          sources."pause-0.1.0"
-          sources."qs-4.0.0"
-          (sources."response-time-2.3.2" // {
-            dependencies = [
-              sources."depd-1.1.0"
-            ];
-          })
-          (sources."serve-favicon-2.3.2" // {
-            dependencies = [
-              sources."etag-1.7.0"
-              sources."ms-0.7.2"
-            ];
-          })
-          (sources."serve-index-1.7.3" // {
-            dependencies = [
-              (sources."accepts-1.2.13" // {
-                dependencies = [
-                  sources."negotiator-0.5.3"
-                ];
-              })
-              sources."batch-0.5.3"
-              sources."escape-html-1.0.3"
-              (sources."mime-types-2.1.15" // {
-                dependencies = [
-                  sources."mime-db-1.27.0"
-                ];
-              })
-            ];
-          })
-          (sources."serve-static-1.10.3" // {
-            dependencies = [
-              sources."escape-html-1.0.3"
-            ];
-          })
-          (sources."type-is-1.6.14" // {
-            dependencies = [
-              sources."media-typer-0.3.0"
-              (sources."mime-types-2.1.15" // {
-                dependencies = [
-                  sources."mime-db-1.27.0"
-                ];
-              })
-            ];
-          })
-          sources."utils-merge-1.0.0"
-          sources."vhost-3.0.2"
-        ];
-      })
-      (sources."connect-auth-git://github.com/e14n/connect-auth" // {
-        dependencies = [
-          sources."oauth-0.9.7"
-          sources."openid-0.4.1"
-        ];
-      })
-      (sources."connect-databank-1.0.3" // {
-        dependencies = [
-          sources."async-1.5.2"
-          sources."node-uuid-1.4.8"
-          sources."set-immediate-0.1.1"
-        ];
-      })
-      (sources."connect-multiparty-2.0.0" // {
-        dependencies = [
-          (sources."multiparty-4.1.3" // {
-            dependencies = [
-              (sources."fd-slicer-1.0.1" // {
-                dependencies = [
-                  sources."pend-1.2.0"
-                ];
-              })
-            ];
-          })
-          (sources."on-finished-2.3.0" // {
-            dependencies = [
-              sources."ee-first-1.1.1"
-            ];
-          })
-          sources."qs-4.0.0"
-          (sources."type-is-1.6.14" // {
-            dependencies = [
-              sources."media-typer-0.3.0"
-              (sources."mime-types-2.1.15" // {
-                dependencies = [
-                  sources."mime-db-1.27.0"
-                ];
-              })
-            ];
-          })
-        ];
-      })
-      sources."crypto-cacerts-0.1.0"
-      (sources."databank-0.19.8" // {
-        dependencies = [
-          sources."set-immediate-0.1.1"
-        ];
-      })
-      (sources."dateformat-1.0.12" // {
-        dependencies = [
-          sources."get-stdin-4.0.1"
-          (sources."meow-3.7.0" // {
-            dependencies = [
-              (sources."camelcase-keys-2.1.0" // {
-                dependencies = [
-                  sources."camelcase-2.1.1"
-                ];
-              })
-              sources."decamelize-1.2.0"
-              (sources."loud-rejection-1.6.0" // {
-                dependencies = [
-                  (sources."currently-unhandled-0.4.1" // {
-                    dependencies = [
-                      sources."array-find-index-1.0.2"
-                    ];
-                  })
-                  sources."signal-exit-3.0.2"
-                ];
-              })
-              sources."map-obj-1.0.1"
-              sources."minimist-1.2.0"
-              (sources."normalize-package-data-2.3.6" // {
-                dependencies = [
-                  sources."hosted-git-info-2.4.1"
-                  (sources."is-builtin-module-1.0.0" // {
-                    dependencies = [
-                      sources."builtin-modules-1.1.1"
-                    ];
-                  })
-                  sources."semver-5.3.0"
-                  (sources."validate-npm-package-license-3.0.1" // {
-                    dependencies = [
-                      (sources."spdx-correct-1.0.2" // {
-                        dependencies = [
-                          sources."spdx-license-ids-1.2.2"
-                        ];
-                      })
-                      sources."spdx-expression-parse-1.0.4"
-                    ];
-                  })
-                ];
-              })
-              sources."object-assign-4.1.1"
-              (sources."read-pkg-up-1.0.1" // {
-                dependencies = [
-                  (sources."find-up-1.1.2" // {
-                    dependencies = [
-                      sources."path-exists-2.1.0"
-                      (sources."pinkie-promise-2.0.1" // {
-                        dependencies = [
-                          sources."pinkie-2.0.4"
-                        ];
-                      })
-                    ];
-                  })
-                  (sources."read-pkg-1.1.0" // {
-                    dependencies = [
-                      (sources."load-json-file-1.1.0" // {
-                        dependencies = [
-                          sources."graceful-fs-4.1.11"
-                          (sources."parse-json-2.2.0" // {
-                            dependencies = [
-                              (sources."error-ex-1.3.1" // {
-                                dependencies = [
-                                  sources."is-arrayish-0.2.1"
-                                ];
-                              })
-                            ];
-                          })
-                          sources."pify-2.3.0"
-                          (sources."pinkie-promise-2.0.1" // {
-                            dependencies = [
-                              sources."pinkie-2.0.4"
-                            ];
-                          })
-                          (sources."strip-bom-2.0.0" // {
-                            dependencies = [
-                              sources."is-utf8-0.2.1"
-                            ];
-                          })
-                        ];
-                      })
-                      (sources."path-type-1.1.0" // {
-                        dependencies = [
-                          sources."graceful-fs-4.1.11"
-                          sources."pify-2.3.0"
-                          (sources."pinkie-promise-2.0.1" // {
-                            dependencies = [
-                              sources."pinkie-2.0.4"
-                            ];
-                          })
-                        ];
-                      })
-                    ];
-                  })
-                ];
-              })
-              (sources."redent-1.0.0" // {
-                dependencies = [
-                  (sources."indent-string-2.1.0" // {
-                    dependencies = [
-                      (sources."repeating-2.0.1" // {
-                        dependencies = [
-                          (sources."is-finite-1.0.2" // {
-                            dependencies = [
-                              sources."number-is-nan-1.0.1"
-                            ];
-                          })
-                        ];
-                      })
-                    ];
-                  })
-                  sources."strip-indent-1.0.1"
-                ];
-              })
-              sources."trim-newlines-1.0.0"
-            ];
-          })
-        ];
-      })
-      (sources."dialback-client-0.2.0" // {
-        dependencies = [
-          sources."underscore-1.5.2"
-          sources."step-0.0.6"
-        ];
-      })
-      sources."dompurify-0.8.5"
-      (sources."emailjs-1.0.8" // {
-        dependencies = [
-          sources."addressparser-0.3.2"
-          (sources."mimelib-0.2.14" // {
-            dependencies = [
-              (sources."encoding-0.1.12" // {
-                dependencies = [
-                  sources."iconv-lite-0.4.15"
-                ];
-              })
-              sources."addressparser-0.2.1"
-            ];
-          })
-          sources."moment-2.11.2"
-          sources."starttls-1.0.1"
-          sources."bufferjs-1.1.0"
-        ];
-      })
-      (sources."express-3.21.2" // {
-        dependencies = [
-          sources."basic-auth-1.0.4"
-          sources."content-disposition-0.5.0"
-          sources."content-type-1.0.2"
-          sources."commander-2.6.0"
-          sources."cookie-0.1.3"
-          sources."cookie-signature-1.0.6"
-          (sources."debug-2.2.0" // {
-            dependencies = [
-              sources."ms-0.7.1"
-            ];
-          })
-          sources."depd-1.0.1"
-          sources."escape-html-1.0.2"
-          sources."etag-1.7.0"
-          sources."fresh-0.3.0"
-          sources."merge-descriptors-1.0.0"
-          sources."methods-1.1.2"
-          sources."parseurl-1.3.1"
-          (sources."proxy-addr-1.0.10" // {
-            dependencies = [
-              sources."forwarded-0.1.0"
-              sources."ipaddr.js-1.0.5"
-            ];
-          })
-          sources."range-parser-1.0.3"
-          (sources."send-0.13.0" // {
-            dependencies = [
-              sources."destroy-1.0.3"
-              (sources."http-errors-1.3.1" // {
-                dependencies = [
-                  sources."inherits-2.0.3"
-                ];
-              })
-              sources."mime-1.3.4"
-              sources."ms-0.7.1"
-              (sources."on-finished-2.3.0" // {
-                dependencies = [
-                  sources."ee-first-1.1.1"
-                ];
-              })
-              sources."statuses-1.2.1"
-            ];
-          })
-          sources."utils-merge-1.0.0"
-          sources."vary-1.0.1"
-        ];
-      })
-      (sources."express-session-1.15.2" // {
-        dependencies = [
-          sources."cookie-0.3.1"
-          sources."cookie-signature-1.0.6"
-          sources."crc-3.4.4"
-          (sources."debug-2.6.3" // {
-            dependencies = [
-              sources."ms-0.7.2"
-            ];
-          })
-          sources."depd-1.1.0"
-          sources."on-headers-1.0.1"
-          sources."parseurl-1.3.1"
-          (sources."uid-safe-2.1.4" // {
-            dependencies = [
-              sources."random-bytes-1.0.0"
-            ];
-          })
-          sources."utils-merge-1.0.0"
-        ];
-      })
-      (sources."gm-1.23.0" // {
-        dependencies = [
-          sources."array-parallel-0.1.3"
-          sources."array-series-0.1.5"
-          (sources."cross-spawn-4.0.2" // {
-            dependencies = [
-              (sources."lru-cache-4.0.2" // {
-                dependencies = [
-                  sources."pseudomap-1.0.2"
-                  sources."yallist-2.1.2"
-                ];
-              })
-              (sources."which-1.2.14" // {
-                dependencies = [
-                  sources."isexe-2.0.0"
-                ];
-              })
-            ];
-          })
-          (sources."debug-2.2.0" // {
-            dependencies = [
-              sources."ms-0.7.1"
-            ];
-          })
-        ];
-      })
-      (sources."helmet-3.5.0" // {
-        dependencies = [
-          (sources."connect-3.6.0" // {
-            dependencies = [
-              (sources."debug-2.6.1" // {
-                dependencies = [
-                  sources."ms-0.7.2"
-                ];
-              })
-              (sources."finalhandler-1.0.0" // {
-                dependencies = [
-                  sources."encodeurl-1.0.1"
-                  sources."escape-html-1.0.3"
-                  (sources."on-finished-2.3.0" // {
-                    dependencies = [
-                      sources."ee-first-1.1.1"
-                    ];
-                  })
-                  sources."statuses-1.3.1"
-                  sources."unpipe-1.0.0"
-                ];
-              })
-              sources."parseurl-1.3.1"
-              sources."utils-merge-1.0.0"
-            ];
-          })
-          sources."dns-prefetch-control-0.1.0"
-          sources."dont-sniff-mimetype-1.0.0"
-          sources."frameguard-3.0.0"
-          (sources."helmet-csp-2.4.0" // {
-            dependencies = [
-              sources."camelize-1.0.0"
-              (sources."content-security-policy-builder-1.1.0" // {
-                dependencies = [
-                  sources."dashify-0.2.2"
-                ];
-              })
-              sources."dasherize-2.0.0"
-              sources."lodash.reduce-4.6.0"
-              sources."platform-1.3.3"
-            ];
-          })
-          sources."hide-powered-by-1.0.0"
-          sources."hpkp-2.0.0"
-          (sources."hsts-2.0.0" // {
-            dependencies = [
-              sources."core-util-is-1.0.2"
-            ];
-          })
-          sources."ienoopen-1.0.0"
-          sources."nocache-2.0.0"
-          sources."referrer-policy-1.1.0"
-          sources."x-xss-protection-1.0.0"
-        ];
-      })
-      (sources."jade-1.11.0" // {
-        dependencies = [
-          sources."character-parser-1.2.1"
-          (sources."clean-css-3.4.25" // {
-            dependencies = [
-              (sources."commander-2.8.1" // {
-                dependencies = [
-                  sources."graceful-readlink-1.0.1"
-                ];
-              })
-              (sources."source-map-0.4.4" // {
-                dependencies = [
-                  sources."amdefine-1.0.1"
-                ];
-              })
-            ];
-          })
-          sources."commander-2.6.0"
-          (sources."constantinople-3.0.2" // {
-            dependencies = [
-              sources."acorn-2.7.0"
-            ];
-          })
-          (sources."jstransformer-0.0.2" // {
-            dependencies = [
-              sources."is-promise-2.1.0"
-              (sources."promise-6.1.0" // {
-                dependencies = [
-                  sources."asap-1.0.0"
-                ];
-              })
-            ];
-          })
-          (sources."transformers-2.1.0" // {
-            dependencies = [
-              (sources."promise-2.0.0" // {
-                dependencies = [
-                  sources."is-promise-1.0.1"
-                ];
-              })
-              (sources."css-1.0.8" // {
-                dependencies = [
-                  sources."css-parse-1.0.4"
-                  sources."css-stringify-1.0.5"
-                ];
-              })
-              (sources."uglify-js-2.2.5" // {
-                dependencies = [
-                  (sources."source-map-0.1.43" // {
-                    dependencies = [
-                      sources."amdefine-1.0.1"
-                    ];
-                  })
-                  (sources."optimist-0.3.7" // {
-                    dependencies = [
-                      sources."wordwrap-0.0.3"
-                    ];
-                  })
-                ];
-              })
-            ];
-          })
-          (sources."uglify-js-2.8.20" // {
-            dependencies = [
-              sources."source-map-0.5.6"
-              (sources."yargs-3.10.0" // {
-                dependencies = [
-                  sources."camelcase-1.2.1"
-                  (sources."cliui-2.1.0" // {
-                    dependencies = [
-                      (sources."center-align-0.1.3" // {
-                        dependencies = [
-                          (sources."align-text-0.1.4" // {
-                            dependencies = [
-                              (sources."kind-of-3.1.0" // {
-                                dependencies = [
-                                  sources."is-buffer-1.1.5"
-                                ];
-                              })
-                              sources."longest-1.0.1"
-                              sources."repeat-string-1.6.1"
-                            ];
-                          })
-                          sources."lazy-cache-1.0.4"
-                        ];
-                      })
-                      (sources."right-align-0.1.3" // {
-                        dependencies = [
-                          (sources."align-text-0.1.4" // {
-                            dependencies = [
-                              (sources."kind-of-3.1.0" // {
-                                dependencies = [
-                                  sources."is-buffer-1.1.5"
-                                ];
-                              })
-                              sources."longest-1.0.1"
-                              sources."repeat-string-1.6.1"
-                            ];
-                          })
-                        ];
-                      })
-                      sources."wordwrap-0.0.2"
-                    ];
-                  })
-                  sources."decamelize-1.2.0"
-                  sources."window-size-0.1.0"
-                ];
-              })
-              sources."uglify-to-browserify-1.0.2"
-            ];
-          })
-          sources."void-elements-2.0.1"
-          (sources."with-4.0.3" // {
-            dependencies = [
-              sources."acorn-1.2.2"
-              (sources."acorn-globals-1.0.9" // {
-                dependencies = [
-                  sources."acorn-2.7.0"
-                ];
-              })
-            ];
-          })
-        ];
-      })
-      sources."jankyqueue-0.1.1"
-      (sources."jsdom-7.2.2" // {
-        dependencies = [
-          sources."abab-1.0.3"
-          sources."acorn-2.7.0"
-          sources."acorn-globals-1.0.9"
-          sources."cssom-0.3.2"
-          sources."cssstyle-0.2.37"
-          (sources."escodegen-1.8.1" // {
-            dependencies = [
-              sources."estraverse-1.9.3"
-              sources."esutils-2.0.2"
-              sources."esprima-2.7.3"
-              (sources."optionator-0.8.2" // {
-                dependencies = [
-                  sources."prelude-ls-1.1.2"
-                  sources."deep-is-0.1.3"
-                  sources."wordwrap-1.0.0"
-                  sources."type-check-0.3.2"
-                  sources."levn-0.3.0"
-                  sources."fast-levenshtein-2.0.6"
-                ];
-              })
-              (sources."source-map-0.2.0" // {
-                dependencies = [
-                  sources."amdefine-1.0.1"
-                ];
-              })
-            ];
-          })
-          sources."nwmatcher-1.3.9"
-          sources."parse5-1.5.1"
-          (sources."request-2.81.0" // {
-            dependencies = [
-              sources."aws-sign2-0.6.0"
-              sources."aws4-1.6.0"
-              sources."caseless-0.12.0"
-              (sources."combined-stream-1.0.5" // {
-                dependencies = [
-                  sources."delayed-stream-1.0.0"
-                ];
-              })
-              sources."extend-3.0.0"
-              sources."forever-agent-0.6.1"
-              (sources."form-data-2.1.2" // {
-                dependencies = [
-                  sources."asynckit-0.4.0"
-                ];
-              })
-              (sources."har-validator-4.2.1" // {
-                dependencies = [
-                  (sources."ajv-4.11.5" // {
-                    dependencies = [
-                      sources."co-4.6.0"
-                      (sources."json-stable-stringify-1.0.1" // {
-                        dependencies = [
-                          sources."jsonify-0.0.0"
-                        ];
-                      })
-                    ];
-                  })
-                  sources."har-schema-1.0.5"
-                ];
-              })
-              (sources."hawk-3.1.3" // {
-                dependencies = [
-                  sources."hoek-2.16.3"
-                  sources."boom-2.10.1"
-                  sources."cryptiles-2.0.5"
-                  sources."sntp-1.0.9"
-                ];
-              })
-              (sources."http-signature-1.1.1" // {
-                dependencies = [
-                  sources."assert-plus-0.2.0"
-                  (sources."jsprim-1.4.0" // {
-                    dependencies = [
-                      sources."assert-plus-1.0.0"
-                      sources."extsprintf-1.0.2"
-                      sources."json-schema-0.2.3"
-                      sources."verror-1.3.6"
-                    ];
-                  })
-                  (sources."sshpk-1.11.0" // {
-                    dependencies = [
-                      sources."asn1-0.2.3"
-                      sources."assert-plus-1.0.0"
-                      sources."dashdash-1.14.1"
-                      sources."getpass-0.1.6"
-                      sources."jsbn-0.1.1"
-                      sources."tweetnacl-0.14.5"
-                      sources."jodid25519-1.0.2"
-                      sources."ecc-jsbn-0.1.1"
-                      sources."bcrypt-pbkdf-1.0.1"
-                    ];
-                  })
-                ];
-              })
-              sources."is-typedarray-1.0.0"
-              sources."isstream-0.1.2"
-              sources."json-stringify-safe-5.0.1"
-              (sources."mime-types-2.1.15" // {
-                dependencies = [
-                  sources."mime-db-1.27.0"
-                ];
-              })
-              sources."oauth-sign-0.8.2"
-              sources."performance-now-0.2.0"
-              sources."qs-6.4.0"
-              sources."safe-buffer-5.0.1"
-              sources."stringstream-0.0.5"
-              sources."tunnel-agent-0.6.0"
-            ];
-          })
-          sources."sax-1.2.2"
-          sources."symbol-tree-3.2.2"
-          (sources."tough-cookie-2.3.2" // {
-            dependencies = [
-              sources."punycode-1.4.1"
-            ];
-          })
-          sources."webidl-conversions-2.0.1"
-          (sources."whatwg-url-compat-0.6.5" // {
-            dependencies = [
-              sources."tr46-0.0.3"
-            ];
-          })
-          sources."xml-name-validator-2.0.1"
-        ];
-      })
-      (sources."method-override-2.3.8" // {
-        dependencies = [
-          (sources."debug-2.6.3" // {
-            dependencies = [
-              sources."ms-0.7.2"
-            ];
-          })
-          sources."methods-1.1.2"
-          sources."parseurl-1.3.1"
-          sources."vary-1.1.1"
-        ];
-      })
-      (sources."mkdirp-0.5.1" // {
-        dependencies = [
-          sources."minimist-0.0.8"
-        ];
-      })
-      sources."oauth-evanp-0.9.10-evanp.2"
-      sources."octal-1.0.0"
-      (sources."optimist-0.6.1" // {
-        dependencies = [
-          sources."wordwrap-0.0.3"
-          sources."minimist-0.0.10"
-        ];
-      })
-      (sources."rimraf-2.6.1" // {
-        dependencies = [
-          (sources."glob-7.1.1" // {
-            dependencies = [
-              sources."fs.realpath-1.0.0"
-              (sources."inflight-1.0.6" // {
-                dependencies = [
-                  sources."wrappy-1.0.2"
-                ];
-              })
-              sources."inherits-2.0.3"
-              (sources."minimatch-3.0.3" // {
-                dependencies = [
-                  (sources."brace-expansion-1.1.6" // {
-                    dependencies = [
-                      sources."balanced-match-0.4.2"
-                      sources."concat-map-0.0.1"
-                    ];
-                  })
-                ];
-              })
-              (sources."once-1.4.0" // {
-                dependencies = [
-                  sources."wrappy-1.0.2"
-                ];
-              })
-              sources."path-is-absolute-1.0.1"
-            ];
-          })
-        ];
-      })
-      (sources."sanitize-html-1.14.1" // {
-        dependencies = [
-          (sources."htmlparser2-3.9.2" // {
-            dependencies = [
-              sources."domelementtype-1.3.0"
-              sources."domhandler-2.3.0"
-              (sources."domutils-1.5.1" // {
-                dependencies = [
-                  (sources."dom-serializer-0.1.0" // {
-                    dependencies = [
-                      sources."domelementtype-1.1.3"
-                    ];
-                  })
-                ];
-              })
-              sources."entities-1.1.1"
-              sources."inherits-2.0.3"
-              (sources."readable-stream-2.2.6" // {
-                dependencies = [
-                  sources."buffer-shims-1.0.0"
-                  sources."core-util-is-1.0.2"
-                  sources."isarray-1.0.0"
-                  sources."process-nextick-args-1.0.7"
-                  sources."string_decoder-0.10.31"
-                  sources."util-deprecate-1.0.2"
-                ];
-              })
-            ];
-          })
-          sources."regexp-quote-0.0.0"
-          sources."xtend-4.0.1"
-        ];
-      })
-      sources."schlock-0.2.1"
-      (sources."send-0.13.2" // {
-        dependencies = [
-          sources."debug-2.2.0"
-          sources."depd-1.1.0"
-          sources."destroy-1.0.4"
-          sources."escape-html-1.0.3"
-          sources."etag-1.7.0"
-          sources."fresh-0.3.0"
-          (sources."http-errors-1.3.1" // {
-            dependencies = [
-              sources."inherits-2.0.3"
-            ];
-          })
-          sources."mime-1.3.4"
-          sources."ms-0.7.1"
-          (sources."on-finished-2.3.0" // {
-            dependencies = [
-              sources."ee-first-1.1.1"
-            ];
-          })
-          sources."range-parser-1.0.3"
-          sources."statuses-1.2.1"
-        ];
-      })
-      (sources."showdown-1.6.4" // {
-        dependencies = [
-          (sources."yargs-6.6.0" // {
-            dependencies = [
-              sources."camelcase-3.0.0"
-              (sources."cliui-3.2.0" // {
-                dependencies = [
-                  (sources."strip-ansi-3.0.1" // {
-                    dependencies = [
-                      sources."ansi-regex-2.1.1"
-                    ];
-                  })
-                  sources."wrap-ansi-2.1.0"
-                ];
-              })
-              sources."decamelize-1.2.0"
-              sources."get-caller-file-1.0.2"
-              (sources."os-locale-1.4.0" // {
-                dependencies = [
-                  (sources."lcid-1.0.0" // {
-                    dependencies = [
-                      sources."invert-kv-1.0.0"
-                    ];
-                  })
-                ];
-              })
-              (sources."read-pkg-up-1.0.1" // {
-                dependencies = [
-                  (sources."find-up-1.1.2" // {
-                    dependencies = [
-                      sources."path-exists-2.1.0"
-                      (sources."pinkie-promise-2.0.1" // {
-                        dependencies = [
-                          sources."pinkie-2.0.4"
-                        ];
-                      })
-                    ];
-                  })
-                  (sources."read-pkg-1.1.0" // {
-                    dependencies = [
-                      (sources."load-json-file-1.1.0" // {
-                        dependencies = [
-                          sources."graceful-fs-4.1.11"
-                          (sources."parse-json-2.2.0" // {
-                            dependencies = [
-                              (sources."error-ex-1.3.1" // {
-                                dependencies = [
-                                  sources."is-arrayish-0.2.1"
-                                ];
-                              })
-                            ];
-                          })
-                          sources."pify-2.3.0"
-                          (sources."pinkie-promise-2.0.1" // {
-                            dependencies = [
-                              sources."pinkie-2.0.4"
-                            ];
-                          })
-                          (sources."strip-bom-2.0.0" // {
-                            dependencies = [
-                              sources."is-utf8-0.2.1"
-                            ];
-                          })
-                        ];
-                      })
-                      (sources."normalize-package-data-2.3.6" // {
-                        dependencies = [
-                          sources."hosted-git-info-2.4.1"
-                          (sources."is-builtin-module-1.0.0" // {
-                            dependencies = [
-                              sources."builtin-modules-1.1.1"
-                            ];
-                          })
-                          sources."semver-5.3.0"
-                          (sources."validate-npm-package-license-3.0.1" // {
-                            dependencies = [
-                              (sources."spdx-correct-1.0.2" // {
-                                dependencies = [
-                                  sources."spdx-license-ids-1.2.2"
-                                ];
-                              })
-                              sources."spdx-expression-parse-1.0.4"
-                            ];
-                          })
-                        ];
-                      })
-                      (sources."path-type-1.1.0" // {
-                        dependencies = [
-                          sources."graceful-fs-4.1.11"
-                          sources."pify-2.3.0"
-                          (sources."pinkie-promise-2.0.1" // {
-                            dependencies = [
-                              sources."pinkie-2.0.4"
-                            ];
-                          })
-                        ];
-                      })
-                    ];
-                  })
-                ];
-              })
-              sources."require-directory-2.1.1"
-              sources."require-main-filename-1.0.1"
-              sources."set-blocking-2.0.0"
-              (sources."string-width-1.0.2" // {
-                dependencies = [
-                  sources."code-point-at-1.1.0"
-                  (sources."is-fullwidth-code-point-1.0.0" // {
-                    dependencies = [
-                      sources."number-is-nan-1.0.1"
-                    ];
-                  })
-                  (sources."strip-ansi-3.0.1" // {
-                    dependencies = [
-                      sources."ansi-regex-2.1.1"
-                    ];
-                  })
-                ];
-              })
-              sources."which-module-1.0.0"
-              sources."y18n-3.2.1"
-              sources."yargs-parser-4.2.1"
-            ];
-          })
-        ];
-      })
-      (sources."sockjs-0.3.18" // {
-        dependencies = [
-          (sources."faye-websocket-0.10.0" // {
-            dependencies = [
-              (sources."websocket-driver-0.6.5" // {
-                dependencies = [
-                  sources."websocket-extensions-0.1.1"
-                ];
-              })
-            ];
-          })
-          sources."uuid-2.0.3"
-        ];
-      })
-      (sources."ssl-config-0.0.9" // {
-        dependencies = [
-          (sources."assert-1.4.1" // {
-            dependencies = [
-              (sources."util-0.10.3" // {
-                dependencies = [
-                  sources."inherits-2.0.1"
-                ];
-              })
-            ];
-          })
-          sources."es6-shim-0.27.1"
-          sources."minimum-tls-version-0.0.1"
-        ];
-      })
-      sources."step-1.0.0"
-      sources."ua-parser-js-0.7.12"
-      sources."underscore-1.8.3"
-      (sources."underscore-contrib-0.3.0" // {
-        dependencies = [
-          sources."underscore-1.6.0"
-        ];
-      })
-      sources."uuid-3.0.1"
-      sources."validator-4.4.0"
-      (sources."webfinger-0.4.2" // {
-        dependencies = [
-          sources."step-0.0.6"
-          (sources."xml2js-0.1.14" // {
-            dependencies = [
-              sources."sax-1.2.2"
-            ];
-          })
-        ];
-      })
-      (sources."databank-mongodb-1.0.0" // {
-        dependencies = [
-          (sources."databank-1.0.1" // {
-            dependencies = [
-              sources."setimmediate-1.0.5"
-            ];
-          })
-          (sources."debug-2.6.3" // {
-            dependencies = [
-              sources."ms-0.7.2"
-            ];
-          })
-          (sources."mongodb-2.2.25" // {
-            dependencies = [
-              sources."es6-promise-3.2.1"
-              (sources."mongodb-core-2.1.9" // {
-                dependencies = [
-                  sources."bson-1.0.4"
-                  (sources."require_optional-1.0.0" // {
-                    dependencies = [
-                      sources."semver-5.3.0"
-                      sources."resolve-from-2.0.0"
-                    ];
-                  })
-                ];
-              })
-              (sources."readable-stream-2.1.5" // {
-                dependencies = [
-                  sources."buffer-shims-1.0.0"
-                  sources."core-util-is-1.0.2"
-                  sources."inherits-2.0.3"
-                  sources."isarray-1.0.0"
-                  sources."process-nextick-args-1.0.7"
-                  sources."string_decoder-0.10.31"
-                  sources."util-deprecate-1.0.2"
-                ];
-              })
-            ];
-          })
-        ];
-      })
-      (sources."databank-redis-0.19.6" // {
-        dependencies = [
-          sources."async-0.9.2"
-          sources."redis-0.10.3"
-          sources."underscore-1.6.0"
-        ];
-      })
-      (sources."databank-lrucache-0.1.3" // {
-        dependencies = [
-          sources."databank-1.0.1"
-          (sources."lru-cache-4.0.2" // {
-            dependencies = [
-              sources."pseudomap-1.0.2"
-              sources."yallist-2.1.2"
-            ];
-          })
-          sources."setimmediate-1.0.5"
-        ];
-      })
-    ];
-    buildInputs = globalBuildInputs;
-    meta = {
-      homepage = http://pump.io/;
-      license = "Apache-2.0";
-    };
-    production = true;
-  };
-in
-{
-  tarball = nodeEnv.buildNodeSourceDist args;
-  package = nodeEnv.buildNodePackage args;
-  shell = nodeEnv.buildNodeShell args;
-}
\ No newline at end of file
diff --git a/pkgs/servers/web-apps/restya-board/default.nix b/pkgs/servers/web-apps/restya-board/default.nix
new file mode 100644
index 00000000000..946606e3701
--- /dev/null
+++ b/pkgs/servers/web-apps/restya-board/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchurl, unzip }:
+
+let
+
+  hide-card-id = fetchurl {
+    url = "https://github.com/RestyaPlatform/board-apps/releases/download/v2/r_hide_card_id-v0.1.2.zip";
+    sha256 = "1scm696rs8wx0z2y0g6r9vf01b0yay79azw8n785c6zdvrbqw7dp";
+  };
+
+  togetherjs = fetchurl {
+    url = "https://github.com/RestyaPlatform/board-apps/releases/download/v2/r_togetherjs-v0.1.2.zip";
+    sha256 = "1kms7z0ci15plwbs6nxvz15w0ym3in39msbncaj3cn0p72kvx5cm";
+  };
+
+in
+
+stdenv.mkDerivation rec {
+  name = "rstya-board-${version}";
+  version = "0.6";
+
+  src = fetchurl {
+    url = "https://github.com/RestyaPlatform/board/releases/download/v${version}/board-v${version}.zip";
+    sha256 = "1js8c69qmga7bikp66fqhch3n2vw49918z32q88lz3havqzai8gd";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  buildCommand = ''
+    mkdir $out
+    unzip -d $out $src
+
+    cd $out
+    patch -p1 < ${./fix_request-uri.patch}
+
+    chmod +x $out/server/php/shell/*.sh
+
+    mkdir $out/client/apps
+    unzip -d $out/client/apps ${hide-card-id}
+    unzip -d $out/client/apps ${togetherjs}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Web-based kanban board";
+    license = licenses.osl3;
+    homepage = http://restya.com;
+    maintainers = with maintainers; [ tstrobel ];
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/pkgs/servers/web-apps/restya-board/fix_request-uri.patch b/pkgs/servers/web-apps/restya-board/fix_request-uri.patch
new file mode 100644
index 00000000000..9b96756e829
--- /dev/null
+++ b/pkgs/servers/web-apps/restya-board/fix_request-uri.patch
@@ -0,0 +1,12 @@
+diff --git a/server/php/R/r.php b/server/php/R/r.php
+--- a/server/php/R/r.php
++++ b/server/php/R/r.php
+@@ -18,7 +18,7 @@ $r_debug = '';
+ $authUser = $client = $form = array();
+ $_server_protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 'https' : 'http';
+ $_server_domain_url = $_server_protocol . '://' . $_SERVER['HTTP_HOST']; // http://localhost
+-header('x-response-url:' . $_SERVER[REQUEST_URI]);
++header('x-response-url:' . $_SERVER['REQUEST_URI']);
+ header('Access-Control-Allow-Origin: *');
+ header('Access-Control-Allow-Methods: *');
+ require_once '../config.inc.php';
diff --git a/pkgs/servers/web-apps/searx/default.nix b/pkgs/servers/web-apps/searx/default.nix
index 1c5f52d4938..3835f5ae332 100644
--- a/pkgs/servers/web-apps/searx/default.nix
+++ b/pkgs/servers/web-apps/searx/default.nix
@@ -1,38 +1,47 @@
 { lib, pythonPackages, fetchFromGitHub }:
 
-pythonPackages.buildPythonApplication rec {
-  name = "searx-${version}";
-  version = "0.12.0";
-  namePrefix = "";
+with pythonPackages;
 
+buildPythonApplication rec {
+  pname = "searx";
+  version = "0.14.0";
+
+  # Can not use PyPI because certain test files are missing.
   src = fetchFromGitHub {
     owner = "asciimoo";
     repo = "searx";
     rev = "v${version}";
-    sha256 = "196lk8dpv8fsjgmwlqik6j6rabvfid41fir6lzqy03hv7ydcw1k0";
+    sha256 = "046xg6xcs1mxgahz7kwf3fsmwd99q3hhms6pdjlvyczidlfhpmxl";
   };
 
   postPatch = ''
     substituteInPlace requirements.txt \
-      --replace 'certifi==2017.1.23' 'certifi' \
-      --replace 'lxml==3.7.3' 'lxml' \
-      --replace 'pyopenssl==16.2.0' 'pyopenssl' \
+      --replace 'certifi==2017.11.5' 'certifi' \
+      --replace 'flask==0.12.2' 'flask==0.12.*' \
+      --replace 'flask-babel==0.11.2' 'flask-babel==0.11.*' \
+      --replace 'lxml==4.1.1' 'lxml==4.1.*' \
+      --replace 'idna==2.5' 'idna' \
       --replace 'pygments==2.1.3' 'pygments>=2.1,<3.0' \
-      --replace 'flask==0.12' 'flask==0.12.*' \
-      --replace 'requests[socks]==2.13.0' 'requests[socks]==2.*' \
-      --replace 'python-dateutil==2.6.0' 'python-dateutil==2.6.*'
+      --replace 'pyopenssl==17.4.0' 'pyopenssl' \
+      --replace 'python-dateutil==2.6.1' 'python-dateutil==2.6.*'
   '';
 
-  propagatedBuildInputs = with pythonPackages; [
+  propagatedBuildInputs = [
     pyyaml lxml grequests flaskbabel flask requests
     gevent speaklater Babel pytz dateutil pygments
     pyasn1 pyasn1-modules ndg-httpsclient certifi pysocks
   ];
 
+  checkInputs = [ splinter mock plone-testing robotsuite unittest2 ];
+
+  preCheck = ''
+    rm tests/test_robot.py # A variable that is imported is commented out
+  '';
+
   meta = with lib; {
     homepage = https://github.com/asciimoo/searx;
     description = "A privacy-respecting, hackable metasearch engine";
     license = licenses.agpl3Plus;
-    maintainers = with maintainers; [ matejc fpletz profpatsch ];
+    maintainers = with maintainers; [ matejc fpletz ];
   };
 }
diff --git a/pkgs/servers/web-apps/shaarli/default.nix b/pkgs/servers/web-apps/shaarli/default.nix
index a74221cfbd3..8f6722ed86e 100644
--- a/pkgs/servers/web-apps/shaarli/default.nix
+++ b/pkgs/servers/web-apps/shaarli/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "shaarli-${version}";
-  version = "0.9.2";
+  version = "0.9.6";
 
   src = fetchurl {
     url = "https://github.com/shaarli/Shaarli/releases/download/v${version}/shaarli-v${version}-full.tar.gz";
-    sha256 = "07wn5pg7pkya8d4k2khp2jyvkdkmm5431fj1k0m1i5k65yyvfqzr";
+    sha256 = "0vi59988bjxb1cyifh0fynpxa7l6cl0v57hrxima5c9iid10pw54";
   };
 
   outputs = [ "out" "doc" ];
diff --git a/pkgs/servers/web-apps/shaarli/material-theme.nix b/pkgs/servers/web-apps/shaarli/material-theme.nix
index 9831d7dabce..939976b0a26 100644
--- a/pkgs/servers/web-apps/shaarli/material-theme.nix
+++ b/pkgs/servers/web-apps/shaarli/material-theme.nix
@@ -2,21 +2,21 @@
 
 stdenv.mkDerivation rec {
   name = "shaarli-material-${version}";
-  version = "0.9.1";
+  version = "0.9.5";
 
   src = fetchFromGitHub {
     owner = "kalvn";
     repo = "Shaarli-Material";
     rev = "v${version}";
-    sha256 = "0x8d9425n3jrwzsyxclbxfspvi91v1klq8r3m6wcj81kys7vmzgh";
+    sha256 = "1bxw74ksvfv46995iwc7jhvl78hd84lcq3h9iyxvs8gpkhkapv55";
   };
 
   patchPhase = ''
     for f in material/*.html
     do
       substituteInPlace $f \
-        --replace '.min.css"' '.min.css#"' \
-        --replace '.min.js"'  '.min.js#"' \
+        --replace '.min.css?v={$version_hash}"' '.min.css#"' \
+        --replace '.min.js?v={$version_hash}"'  '.min.js#"' \
         --replace '.png"'     '.png#"'
     done
   '';
diff --git a/pkgs/servers/web-apps/wallabag/default.nix b/pkgs/servers/web-apps/wallabag/default.nix
index 215e9fade0a..c0d5876a3a2 100644
--- a/pkgs/servers/web-apps/wallabag/default.nix
+++ b/pkgs/servers/web-apps/wallabag/default.nix
@@ -2,28 +2,24 @@
 
 stdenv.mkDerivation rec {
   name = "wallabag-${version}";
-  version = "2.2.3";
+  version = "2.3.2";
 
   # remember to rm -r var/cache/* after a rebuild or unexpected errors will occur
 
   src = fetchurl {
     url = "https://static.wallabag.org/releases/wallabag-release-${version}.tar.gz";
-    sha256 = "0myqarwny9p53g2gmwmg1mcn17jlx5ah0bri13panhf7ryvmrzhk";
+    sha256 = "17yczdvgl43j6wa7hksxi2b51afvyd56vdya6hbbv68iiba4jyh4";
   };
 
-  outputs = [ "out" "doc" ];
+  outputs = [ "out" ];
 
-  patchPhase = ''
+  patches = [ ./wallabag-data.patch ]; # exposes $WALLABAG_DATA
+
+  prePatch = ''
     rm Makefile # use the "shared hosting" package with bundled dependencies
-    substituteInPlace app/AppKernel.php \
-      --replace "__DIR__" "getenv('WALLABAG_DATA')"
-    substituteInPlace var/bootstrap.php.cache \
-      --replace "\$this->rootDir = \$this->getRootDir()" "\$this->rootDir = getenv('WALLABAG_DATA')"
-  ''; # exposes $WALLABAG_DATA
+  '';
 
   installPhase = ''
-    mkdir -p $doc/share/doc
-    mv docs $doc/share/doc/wallabag
     mkdir $out/
     cp -R * $out/
   '';
@@ -33,11 +29,12 @@ stdenv.mkDerivation rec {
     longDescription = ''
       wallabag is a self hostable application for saving web pages.
 
-      To use, point the environment variable $WALLABAG_DATA to a directory called `app` that contains the folder `config` with wallabag's configuration files. These need to be updated every package upgrade. In `app`'s parent folder, a directory called `var` containing wallabag's data will be created.
+      Point the environment variable $WALLABAG_DATA to a data directory that contains the folder `app/config` which must be a clone of wallabag's configuration files with your customized `parameters.yml`. These need to be updated every package upgrade.
       After a package upgrade, empty the `var/cache` folder.
     '';
     license = licenses.mit;
     homepage = http://wallabag.org;
+    maintainers = with maintainers; [ schneefux ];
     platforms = platforms.all;
   };
 }
diff --git a/pkgs/servers/web-apps/wallabag/wallabag-data.patch b/pkgs/servers/web-apps/wallabag/wallabag-data.patch
new file mode 100644
index 00000000000..086e9395980
--- /dev/null
+++ b/pkgs/servers/web-apps/wallabag/wallabag-data.patch
@@ -0,0 +1,26 @@
+diff --git a/app/AppKernel.php b/app/AppKernel.php
+index 40726f05..7d44e600 100644
+--- a/app/AppKernel.php
++++ b/app/AppKernel.php
+@@ -58,14 +58,19 @@ class AppKernel extends Kernel
+         return $bundles;
+     }
+ 
++    public function getProjectDir()
++    {
++        return getenv('WALLABAG_DATA') ?: dirname(__DIR__);
++    }
++
+     public function getCacheDir()
+     {
+-        return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
++        return $this->getProjectDir() . '/var/cache/' . $this->getEnvironment();
+     }
+ 
+     public function getLogDir()
+     {
+-        return dirname(__DIR__) . '/var/logs';
++        return $this->getProjectDir() . '/var/logs';
+     }
+ 
+     public function registerContainerConfiguration(LoaderInterface $loader)
diff --git a/pkgs/servers/web-apps/wordpress/default.nix b/pkgs/servers/web-apps/wordpress/default.nix
index bb07c42b872..57254713f4b 100644
--- a/pkgs/servers/web-apps/wordpress/default.nix
+++ b/pkgs/servers/web-apps/wordpress/default.nix
@@ -2,8 +2,8 @@
 { fetchFromGitHub, lib } : fetchFromGitHub {
   owner = "WordPress";
   repo = "WordPress";
-  rev = "4.8.3";
-  sha256 = "077bdx22sj29v8q493b49xfzxpc38q45pjhmn4znw2fmkjilih5p";
+  rev = "4.9.1";
+  sha256 = "0d931mv6wbgnc7f15nisnn5al0ffi19zya2iwdzw98s4klpaq955";
   meta = {
     homepage = https://wordpress.org;
     description = "WordPress is open source software you can use to create a beautiful website, blog, or app.";
diff --git a/pkgs/servers/x11/quartz-wm/default.nix b/pkgs/servers/x11/quartz-wm/default.nix
index 45e4df2bb8b..d724a81debb 100644
--- a/pkgs/servers/x11/quartz-wm/default.nix
+++ b/pkgs/servers/x11/quartz-wm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, xorg, pixman, pkgconfig, AppKit, Xplugin }:
+{ stdenv, lib, fetchurl, xorg, pixman, pkgconfig, AppKit, Xplugin, darwin }:
 
 let version = "1.3.1";
 in stdenv.mkDerivation {
@@ -19,13 +19,11 @@ in stdenv.mkDerivation {
     xorg.libXext
     pixman
     pkgconfig
-    AppKit Xplugin
+    AppKit Xplugin darwin.apple_sdk.frameworks.Foundation
   ];
-  NIX_CFLAGS_COMPILE = "-F/System/Library/Frameworks -I/usr/include";
-  NIX_LDFLAGS = stdenv.lib.optional stdenv.isDarwin
-    "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation";
   meta = with lib; {
     license = licenses.apsl20;
     platforms = platforms.darwin;
+    maintainers = with maintainers; [ matthewbauer ];
   };
 }
diff --git a/pkgs/servers/x11/xorg/builder.sh b/pkgs/servers/x11/xorg/builder.sh
index fae8bf5a8ce..5a832cb14d5 100644
--- a/pkgs/servers/x11/xorg/builder.sh
+++ b/pkgs/servers/x11/xorg/builder.sh
@@ -17,21 +17,12 @@ postInstall() {
     echo "propagating requisites $requires"
 
     for r in $requires; do
-        if test -n "$crossConfig"; then
-            for p in "${crossPkgs[@]}"; do
-                if test -e $p/lib/pkgconfig/$r.pc; then
-                    echo "  found requisite $r in $p"
-                    propagatedBuildInputs="$propagatedBuildInputs $p"
-                fi
-            done
-        else
-            for p in "${nativePkgs[@]}"; do
-                if test -e $p/lib/pkgconfig/$r.pc; then
-                    echo "  found requisite $r in $p"
-                    propagatedNativeBuildInputs="$propagatedNativeBuildInputs $p"
-                fi
-            done
-        fi
+        for p in "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}"; do
+            if test -e $p/lib/pkgconfig/$r.pc; then
+                echo "  found requisite $r in $p"
+                propagatedBuildInputs+=" $p"
+            fi
+        done
     done
 }
 
diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix
index 4161df6ae8b..07faa8d3cc7 100644
--- a/pkgs/servers/x11/xorg/default.nix
+++ b/pkgs/servers/x11/xorg/default.nix
@@ -1,6 +1,6 @@
 # THIS IS A GENERATED FILE.  DO NOT EDIT!
 args @ { clangStdenv, fetchurl, fetchgit, fetchpatch, stdenv, pkgconfig, intltool, freetype, fontconfig
-, libxslt, expat, libpng, zlib, perl, mesa_drivers, spice_protocol
+, libxslt, expat, libpng, zlib, perl, mesa_noglu, mesa_drivers, spice-protocol
 , dbus, libuuid, openssl, gperf, m4, libevdev, tradcpp, libinput, mcpp, makeWrapper, autoreconfHook
 , autoconf, automake, libtool, xmlto, asciidoc, flex, bison, python, mtdev, pixman, ... }: with args;
 
@@ -44,16 +44,16 @@ let
   }) // {inherit libX11 xproto libXt ;};
 
   bdftopcf = (mkDerivation "bdftopcf" {
-    name = "bdftopcf-1.0.5";
+    name = "bdftopcf-1.1";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/app/bdftopcf-1.0.5.tar.bz2;
-      sha256 = "09i03sk878cmx2i40lkpsysn7zqcvlczb30j7x3lryb11jz4gx1q";
+      url = mirror://xorg/individual/app/bdftopcf-1.1.tar.bz2;
+      sha256 = "18hiscgljrz10zjcws25bis32nyrg3hzgmiq6scrh7izqmgz0kab";
     };
     nativeBuildInputs = [ pkgconfig ];
-    buildInputs = [ libXfont ];
+    buildInputs = [ ];
     meta.platforms = stdenv.lib.platforms.unix;
-  }) // {inherit libXfont ;};
+  }) // {inherit ;};
 
   bigreqsproto = (mkDerivation "bigreqsproto" {
     name = "bigreqsproto-1.1.2";
@@ -67,6 +67,18 @@ let
     meta.platforms = stdenv.lib.platforms.unix;
   }) // {inherit ;};
 
+  bitmap = (mkDerivation "bitmap" {
+    name = "bitmap-1.0.8";
+    builder = ./builder.sh;
+    src = fetchurl {
+      url = mirror://xorg/individual/app/bitmap-1.0.8.tar.gz;
+      sha256 = "1z06a1sn3iq72rmh73f11xgb7n46bdav1fvpgczxjp6al88bsbqs";
+    };
+    nativeBuildInputs = [ pkgconfig ];
+    buildInputs = [ libX11 libXaw xbitmaps libXmu xproto libXt ];
+    meta.platforms = stdenv.lib.platforms.unix;
+  }) // {inherit libX11 libXaw xbitmaps libXmu xproto libXt ;};
+
   compositeproto = (mkDerivation "compositeproto" {
     name = "compositeproto-0.4.2";
     builder = ./builder.sh;
@@ -788,11 +800,11 @@ let
   }) // {inherit compositeproto libX11 libXfixes xproto ;};
 
   libXcursor = (mkDerivation "libXcursor" {
-    name = "libXcursor-1.1.14";
+    name = "libXcursor-1.1.15";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libXcursor-1.1.14.tar.bz2;
-      sha256 = "1prkdicl5y5yx32h1azh6gjfbijvjp415javv8dsakd13jrarilv";
+      url = mirror://xorg/individual/lib/libXcursor-1.1.15.tar.bz2;
+      sha256 = "0syzlfvh29037p0vnlc8f3jxz8nl55k65blswsakklkwsc6nfki9";
     };
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ fixesproto libX11 libXfixes xproto libXrender ];
@@ -836,11 +848,11 @@ let
   }) // {inherit libX11 xextproto xproto ;};
 
   libXfixes = (mkDerivation "libXfixes" {
-    name = "libXfixes-5.0.2";
+    name = "libXfixes-5.0.3";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libXfixes-5.0.2.tar.bz2;
-      sha256 = "1slsk898386xii0r3l7szwwq3s6y2m4dsj0x93ninjh8xkghxllv";
+      url = mirror://xorg/individual/lib/libXfixes-5.0.3.tar.bz2;
+      sha256 = "1miana3y4hwdqdparsccmygqr3ic3hs5jrqfzp70hvi2zwxd676y";
     };
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ fixesproto libX11 xextproto xproto ];
@@ -848,11 +860,11 @@ let
   }) // {inherit fixesproto libX11 xextproto xproto ;};
 
   libXfont = (mkDerivation "libXfont" {
-    name = "libXfont-1.5.3";
+    name = "libXfont-1.5.4";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libXfont-1.5.3.tar.bz2;
-      sha256 = "1l4k3i3xzqdmaszykh6bb2ah78p6c3z7fak7xzgq2d38s87w31db";
+      url = mirror://xorg/individual/lib/libXfont-1.5.4.tar.bz2;
+      sha256 = "0hiji1bvpl78aj3a3141hkk353aich71wv8l5l2z51scfy878zqs";
     };
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ libfontenc fontsproto freetype xproto xtrans zlib ];
@@ -860,11 +872,11 @@ let
   }) // {inherit libfontenc fontsproto freetype xproto xtrans zlib ;};
 
   libXfont2 = (mkDerivation "libXfont2" {
-    name = "libXfont2-2.0.2";
+    name = "libXfont2-2.0.3";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libXfont2-2.0.2.tar.bz2;
-      sha256 = "04f1lswh1ridkycgaivf1hrr77l5ap8smbfr2rqjrm7phwxqs24l";
+      url = mirror://xorg/individual/lib/libXfont2-2.0.3.tar.bz2;
+      sha256 = "0klwmimmhm3axpj8pwn5l41lbggh47r5aazhw63zxkbwfgyvg2hf";
     };
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ libfontenc fontsproto freetype xproto xtrans zlib ];
@@ -1100,11 +1112,11 @@ let
   }) // {inherit xproto zlib ;};
 
   libpciaccess = (mkDerivation "libpciaccess" {
-    name = "libpciaccess-0.13.5";
+    name = "libpciaccess-0.14";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/lib/libpciaccess-0.13.5.tar.bz2;
-      sha256 = "16dr80rdw5bzdyhahvilfjrflj7scs2yl2mmghsb84f3nglm8b3m";
+      url = mirror://xorg/individual/lib/libpciaccess-0.14.tar.bz2;
+      sha256 = "197jbcpvp4z4x6j705mq2y4fsnnypy6f85y8xalgwhgx5bhl7x9x";
     };
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ zlib ];
@@ -1352,11 +1364,11 @@ let
   }) // {inherit libICE libSM libX11 libXext libXmu xproto libXt ;};
 
   utilmacros = (mkDerivation "utilmacros" {
-    name = "util-macros-1.19.1";
+    name = "util-macros-1.19.2";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/util/util-macros-1.19.1.tar.bz2;
-      sha256 = "19h6wflpmh7xxqr6lk5z8pds6r9r0dn7ijbvaacymx2q0m05km0q";
+      url = mirror://xorg/individual/util/util-macros-1.19.2.tar.bz2;
+      sha256 = "04p7ydqxgq37jklnfj18b70zsifiz4h50wvrk94i2112mmv37r6p";
     };
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ ];
@@ -1748,11 +1760,11 @@ let
   }) // {inherit inputproto xorgserver xproto ;};
 
   xf86inputlibinput = (mkDerivation "xf86inputlibinput" {
-    name = "xf86-input-libinput-0.25.0";
+    name = "xf86-input-libinput-0.26.0";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/driver/xf86-input-libinput-0.25.0.tar.bz2;
-      sha256 = "0vsmijamfzf6vcljrr0am2qcz33zl2l0lj2mzmbwgrm7ixjx2zxv";
+      url = mirror://xorg/individual/driver/xf86-input-libinput-0.26.0.tar.bz2;
+      sha256 = "0yrqs88b7yn9nljwlxzn76jfmvf0sh939kzij5b2jvr2qa7mbjmb";
     };
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ inputproto xorgserver xproto ];
@@ -1827,9 +1839,9 @@ let
       sha256 = "0z56ifw3xiq9dychv8chg1cny0hq4v3c1r9pqcybk5fp7nzw9jpq";
     };
     nativeBuildInputs = [ pkgconfig ];
-    buildInputs = [ fontsproto mesa libdrm udev randrproto renderproto videoproto xextproto xf86driproto xorgserver xproto ];
+    buildInputs = [ fontsproto libGL libdrm udev randrproto renderproto videoproto xextproto xf86driproto xorgserver xproto ];
     meta.platforms = stdenv.lib.platforms.unix;
-  }) // {inherit fontsproto mesa libdrm udev randrproto renderproto videoproto xextproto xf86driproto xorgserver xproto ;};
+  }) // {inherit fontsproto libGL libdrm udev randrproto renderproto videoproto xextproto xf86driproto xorgserver xproto ;};
 
   xf86videoark = (mkDerivation "xf86videoark" {
     name = "xf86-video-ark-0.7.5";
@@ -1856,11 +1868,11 @@ let
   }) // {inherit fontsproto libpciaccess randrproto renderproto videoproto xextproto xorgserver xproto ;};
 
   xf86videoati = (mkDerivation "xf86videoati" {
-    name = "xf86-video-ati-7.9.0";
+    name = "xf86-video-ati-18.0.1";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/driver/xf86-video-ati-7.9.0.tar.bz2;
-      sha256 = "0xcq0lncb5p4sas5866qpkjyp1v8ksalw7m1gmqb3brhccp8gb9w";
+      url = mirror://xorg/individual/driver/xf86-video-ati-18.0.1.tar.bz2;
+      sha256 = "180l2yw8c63cbcs3zk729vx439aig1d7yicpyxj0nmfl4y0kpskj";
     };
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ fontsproto libdrm udev libpciaccess randrproto renderproto videoproto xextproto xf86driproto xorgserver xproto ];
@@ -2252,11 +2264,11 @@ let
   }) // {inherit randrproto videoproto xorgserver xproto ;};
 
   xf86videovesa = (mkDerivation "xf86videovesa" {
-    name = "xf86-video-vesa-2.3.4";
+    name = "xf86-video-vesa-2.4.0";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/driver/xf86-video-vesa-2.3.4.tar.bz2;
-      sha256 = "1haiw8r1z8ihk68d0jqph2wsld13w4qkl86biq46fvyxg7cg9pbv";
+      url = mirror://xorg/individual/driver/xf86-video-vesa-2.4.0.tar.bz2;
+      sha256 = "1373vsxn6qh00na0s9c09kf09gj78rzi98zq93id8v5zsya3qi5z";
     };
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ fontsproto libpciaccess randrproto renderproto xextproto xorgserver xproto ];
@@ -2384,11 +2396,11 @@ let
   }) // {inherit ;};
 
   xinit = (mkDerivation "xinit" {
-    name = "xinit-1.3.4";
+    name = "xinit-1.4.0";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/app/xinit-1.3.4.tar.bz2;
-      sha256 = "1cq2g469mb2cfgr8k57960yrn90bl33vfqri4pdh2zm0jxrqvn3m";
+      url = mirror://xorg/individual/app/xinit-1.4.0.tar.bz2;
+      sha256 = "1vw2wlg74ig52naw0cha3pgzcwwk25l834j42cg8m5zmybp3a213";
     };
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ libX11 xproto ];
@@ -2558,6 +2570,9 @@ let
       url = mirror://xorg/individual/util/xorg-cf-files-1.0.6.tar.bz2;
       sha256 = "0kckng0zs1viz0nr84rdl6dswgip7ndn4pnh5nfwnviwpsfmmksd";
     };
+    postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
+      substituteInPlace $out/lib/X11/config/darwin.cf --replace "/usr/bin/" ""
+    '';
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ ];
     meta.platforms = stdenv.lib.platforms.unix;
@@ -2576,11 +2591,11 @@ let
   }) // {inherit ;};
 
   xorgserver = (mkDerivation "xorgserver" {
-    name = "xorg-server-1.19.5";
+    name = "xorg-server-1.19.6";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/xserver/xorg-server-1.19.5.tar.bz2;
-      sha256 = "0iql4pgsgpyqcrd3256pv227cdadvz01ych61n0d41ixp67gmzqq";
+      url = mirror://xorg/individual/xserver/xorg-server-1.19.6.tar.bz2;
+      sha256 = "15y13ihgkggmly5s07vzvpn35gzx1w0hrkbnlcvcy05h3lpm0cm7";
     };
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [ dri2proto dri3proto renderproto openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
index 1f3557dff66..9f21d3c2024 100755
--- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
+++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w
+#! /usr/bin/env perl
 
 # Typical command to generate the list of tarballs:
 
@@ -11,6 +11,7 @@
 
 
 use strict;
+use warnings;
 
 my $tmpDir = "/tmp/xorg-unpack";
 
@@ -25,7 +26,7 @@ my %pcMap;
 my %extraAttrs;
 
 
-my @missingPCs = ("fontconfig", "libdrm", "libXaw", "zlib", "perl", "python", "mesa", "mkfontscale", "mkfontdir", "bdftopcf", "libxslt", "openssl", "gperf", "m4");
+my @missingPCs = ("fontconfig", "libdrm", "libXaw", "zlib", "perl", "python", "mkfontscale", "mkfontdir", "bdftopcf", "libxslt", "openssl", "gperf", "m4");
 $pcMap{$_} = $_ foreach @missingPCs;
 $pcMap{"freetype2"} = "freetype";
 $pcMap{"libpng12"} = "libpng";
@@ -33,7 +34,7 @@ $pcMap{"libpng"} = "libpng";
 $pcMap{"dbus-1"} = "dbus";
 $pcMap{"uuid"} = "libuuid";
 $pcMap{"libudev"} = "udev";
-$pcMap{"gl"} = "mesa";
+$pcMap{"gl"} = "libGL";
 $pcMap{"\$PIXMAN"} = "pixman";
 $pcMap{"\$RENDERPROTO"} = "renderproto";
 $pcMap{"\$DRI3PROTO"} = "dri3proto";
@@ -230,7 +231,7 @@ print OUT "";
 print OUT <<EOF;
 # THIS IS A GENERATED FILE.  DO NOT EDIT!
 args @ { clangStdenv, fetchurl, fetchgit, fetchpatch, stdenv, pkgconfig, intltool, freetype, fontconfig
-, libxslt, expat, libpng, zlib, perl, mesa_drivers, spice_protocol
+, libxslt, expat, libpng, zlib, perl, mesa_noglu, mesa_drivers, spice-protocol
 , dbus, libuuid, openssl, gperf, m4, libevdev, tradcpp, libinput, mcpp, makeWrapper, autoreconfHook
 , autoconf, automake, libtool, xmlto, asciidoc, flex, bison, python, mtdev, pixman, ... }: with args;
 
diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix
index 87dfeb3cfa7..55eb54622d5 100644
--- a/pkgs/servers/x11/xorg/overrides.nix
+++ b/pkgs/servers/x11/xorg/overrides.nix
@@ -24,6 +24,25 @@ let
   compose = f: g: x: f (g x);
 in
 {
+  bdftopcf = attrs: attrs // {
+    buildInputs = attrs.buildInputs ++ [ xorg.xproto xorg.fontsproto ];
+  };
+
+  bitmap = attrs: attrs // {
+    nativeBuildInputs = attrs.nativeBuildInputs ++ [ makeWrapper ];
+    postInstall = ''
+      paths=(
+        "$out/share/X11/%T/%N"
+        "$out/include/X11/%T/%N"
+        "${xorg.xbitmaps}/include/X11/%T/%N"
+      )
+      wrapProgram "$out/bin/bitmap" \
+        --suffix XFILESEARCHPATH : $(IFS=:; echo "''${paths[*]}")
+      makeWrapper "$out/bin/bitmap" "$out/bin/bitmap-color" \
+        --suffix XFILESEARCHPATH : "$out/share/X11/%T/%N-color"
+    '';
+  };
+
   encodings = attrs: attrs // {
     buildInputs = attrs.buildInputs ++ [ xorg.mkfontscale ];
   };
@@ -41,7 +60,7 @@ in
       ''
         ALIASFILE=${xorg.fontalias}/share/fonts/X11/misc/fonts.alias
         test -f $ALIASFILE
-        ln -s $ALIASFILE $out/lib/X11/fonts/misc/fonts.alias
+        cp $ALIASFILE $out/lib/X11/fonts/misc/fonts.alias
       '';
   };
 
@@ -252,6 +271,11 @@ in
   };
 
   libxshmfence = attrs: attrs // {
+    name = "libxshmfence-1.3";
+    src = args.fetchurl {
+      url = mirror://xorg/individual/lib/libxshmfence-1.3.tar.bz2;
+      sha256 = "1ir0j92mnd1nk37mrv9bz5swnccqldicgszvfsh62jd14q6k115q";
+    };
     outputs = [ "out" "dev" ]; # mainly to avoid propagation
   };
 
@@ -338,6 +362,10 @@ in
       "--with-xorg-conf-dir=$(out)/share/X11/xorg.conf.d"
       "--with-udev-rules-dir=$(out)/lib/udev/rules.d"
     ];
+
+    meta = attrs.meta // {
+      platforms = ["i686-linux" "x86_64-linux"];
+    };
   };
 
   # Obsolete drivers that don't compile anymore.
@@ -361,14 +389,23 @@ in
 
   xf86videovmware = attrs: attrs // {
     buildInputs =  attrs.buildInputs ++ [ args.mesa_drivers ]; # for libxatracker
+    meta = attrs.meta // {
+      platforms = ["i686-linux" "x86_64-linux"];
+    };
   };
 
   xf86videoqxl = attrs: attrs // {
-    buildInputs =  attrs.buildInputs ++ [ args.spice_protocol ];
+    buildInputs =  attrs.buildInputs ++ [ args.spice-protocol ];
+  };
+
+  xf86videosiliconmotion = attrs: attrs // {
+    meta = attrs.meta // {
+      platforms = ["i686-linux" "x86_64-linux"];
+    };
   };
 
   xdriinfo = attrs: attrs // {
-    buildInputs = attrs.buildInputs ++ [args.mesa];
+    buildInputs = attrs.buildInputs ++ [args.libGL];
   };
 
   xvinfo = attrs: attrs // {
@@ -397,8 +434,9 @@ in
   xorgserver = with xorg; attrs_passed:
     # exchange attrs if abiCompat is set
     let
+      version = (builtins.parseDrvName attrs_passed.name).version;
       attrs = with args;
-        if (args.abiCompat == null) then attrs_passed
+        if (args.abiCompat == null || lib.hasPrefix args.abiCompat version) then attrs_passed
         else if (args.abiCompat == "1.17") then {
           name = "xorg-server-1.17.4";
           builder = ./builder.sh;
@@ -418,15 +456,16 @@ in
             };
             nativeBuildInputs = [ pkgconfig ];
             buildInputs = [ dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
+            postPatch = "sed '1i#include <malloc.h>' -i include/os.h";
             meta.platforms = stdenv.lib.platforms.unix;
-        } else throw "unsupported xorg abiCompat: ${args.abiCompat}";
+        } else throw "unsupported xorg abiCompat ${args.abiCompat} for ${attrs_passed.name}";
 
     in attrs //
     (let
       version = (builtins.parseDrvName attrs.name).version;
       commonBuildInputs = attrs.buildInputs ++ [ xtrans ];
       commonPropagatedBuildInputs = [
-        args.zlib args.mesa args.dbus
+        args.zlib args.libGL args.mesa_noglu args.dbus
         xf86bigfontproto glproto xf86driproto
         compositeproto scrnsaverproto resourceproto
         xf86dgaproto
@@ -455,11 +494,14 @@ in
       if (!isDarwin)
       then {
         outputs = [ "out" "dev" ];
-        buildInputs = [ makeWrapper ] ++ commonBuildInputs;
+        buildInputs = [ makeWrapper args.libdrm ] ++ commonBuildInputs;
         propagatedBuildInputs = [ libpciaccess args.epoxy ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.isLinux [
           args.udev
         ];
         patches = commonPatches;
+        prePatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+          export CFLAGS+=" -D__uid_t=uid_t -D__gid_t=gid_t"
+        '';
         configureFlags = [
           "--enable-kdrive"             # not built by default
           "--enable-xephyr"
@@ -473,8 +515,6 @@ in
         ];
         postInstall = ''
           rm -fr $out/share/X11/xkb/compiled # otherwise X will try to write in it
-          wrapProgram $out/bin/Xvfb \
-            --set XORG_DRI_DRIVER_PATH ${args.mesa}/lib/dri
           ( # assert() keeps runtime reference xorgserver-dev in xf86-video-intel and others
             cd "$dev"
             for f in include/xorg/*.h; do
@@ -513,7 +553,7 @@ in
           "--with-sha1=CommonCrypto"
         ];
         preConfigure = ''
-          ensureDir $out/Applications
+          mkdir -p $out/Applications
           export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error"
           substituteInPlace hw/xquartz/pbproxy/Makefile.in --replace -F/System -F${args.apple_sdk.frameworks.ApplicationServices}
         '';
@@ -573,6 +613,10 @@ in
     buildInputs = attrs.buildInputs ++ [xorg.libXfixes xorg.libXScrnSaver xorg.pixman];
     nativeBuildInputs = attrs.nativeBuildInputs ++ [args.autoreconfHook xorg.utilmacros];
     configureFlags = "--with-default-dri=3 --enable-tools";
+
+    meta = attrs.meta // {
+      platforms = ["i686-linux" "x86_64-linux"];
+    };
   };
 
   xf86videoxgi = attrs: attrs // {
diff --git a/pkgs/servers/x11/xorg/tarballs-7.7.list b/pkgs/servers/x11/xorg/tarballs-7.7.list
index 526785ae8fb..dd48748dceb 100644
--- a/pkgs/servers/x11/xorg/tarballs-7.7.list
+++ b/pkgs/servers/x11/xorg/tarballs-7.7.list
@@ -1,6 +1,7 @@
 mirror://xorg/X11R7.7/src/everything/applewmproto-1.4.2.tar.bz2
-mirror://xorg/individual/app/bdftopcf-1.0.5.tar.bz2
+mirror://xorg/individual/app/bdftopcf-1.1.tar.bz2
 mirror://xorg/X11R7.7/src/everything/bigreqsproto-1.1.2.tar.bz2
+mirror://xorg/individual/app/bitmap-1.0.8.tar.gz
 mirror://xorg/X11R7.7/src/everything/compositeproto-0.4.2.tar.bz2
 mirror://xorg/X11R7.7/src/everything/damageproto-1.2.1.tar.bz2
 mirror://xorg/X11R7.7/src/everything/dmxproto-2.3.1.tar.bz2
@@ -56,20 +57,20 @@ mirror://xorg/individual/lib/libxshmfence-1.2.tar.bz2
 mirror://xorg/individual/lib/libfontenc-1.1.3.tar.bz2
 mirror://xorg/individual/lib/libFS-1.0.7.tar.bz2
 mirror://xorg/individual/lib/libICE-1.0.9.tar.bz2
-mirror://xorg/individual/lib/libpciaccess-0.13.5.tar.bz2
+mirror://xorg/individual/lib/libpciaccess-0.14.tar.bz2
 mirror://xorg/individual/lib/libSM-1.2.2.tar.bz2
 mirror://xorg/X11R7.7/src/everything/libWindowsWM-1.0.1.tar.bz2
 mirror://xorg/individual/lib/libX11-1.6.5.tar.bz2
 mirror://xorg/individual/lib/libXau-1.0.8.tar.bz2
 mirror://xorg/individual/lib/libXaw-1.0.13.tar.bz2
 mirror://xorg/individual/lib/libXcomposite-0.4.4.tar.bz2
-mirror://xorg/individual/lib/libXcursor-1.1.14.tar.bz2
+mirror://xorg/individual/lib/libXcursor-1.1.15.tar.bz2
 mirror://xorg/individual/lib/libXdamage-1.1.4.tar.bz2
 mirror://xorg/individual/lib/libXdmcp-1.1.2.tar.bz2
 mirror://xorg/individual/lib/libXext-1.3.3.tar.bz2
 mirror://xorg/individual/lib/libXfixes-5.0.2.tar.bz2
-mirror://xorg/individual/lib/libXfont-1.5.3.tar.bz2
-mirror://xorg/individual/lib/libXfont2-2.0.2.tar.bz2
+mirror://xorg/individual/lib/libXfont-1.5.4.tar.bz2
+mirror://xorg/individual/lib/libXfont2-2.0.3.tar.bz2
 mirror://xorg/individual/lib/libXft-2.3.2.tar.bz2
 mirror://xorg/individual/lib/libXi-1.7.9.tar.bz2
 mirror://xorg/individual/lib/libXinerama-1.1.3.tar.bz2
@@ -122,7 +123,7 @@ mirror://xorg/X11R7.7/src/everything/xf86driproto-2.1.1.tar.bz2
 mirror://xorg/individual/driver/xf86-input-evdev-2.10.5.tar.bz2
 mirror://xorg/individual/driver/xf86-input-joystick-1.6.3.tar.bz2
 mirror://xorg/individual/driver/xf86-input-keyboard-1.9.0.tar.bz2
-mirror://xorg/individual/driver/xf86-input-libinput-0.25.0.tar.bz2
+mirror://xorg/individual/driver/xf86-input-libinput-0.26.0.tar.bz2
 mirror://xorg/individual/driver/xf86-input-mouse-1.9.2.tar.bz2
 mirror://xorg/individual/driver/xf86-input-synaptics-1.9.0.tar.bz2
 mirror://xorg/individual/driver/xf86-input-vmmouse-13.1.0.tar.bz2
@@ -185,7 +186,7 @@ mirror://xorg/individual/app/xlsfonts-1.0.5.tar.bz2
 mirror://xorg/individual/app/xmag-1.0.6.tar.bz2
 mirror://xorg/individual/app/xmodmap-1.0.9.tar.bz2
 mirror://xorg/individual/doc/xorg-docs-1.7.1.tar.bz2
-mirror://xorg/individual/xserver/xorg-server-1.19.5.tar.bz2
+mirror://xorg/individual/xserver/xorg-server-1.19.6.tar.bz2
 mirror://xorg/X11R7.7/src/everything/xorg-sgml-doctools-1.11.tar.bz2
 mirror://xorg/X11R7.7/src/everything/xpr-1.0.4.tar.bz2
 mirror://xorg/individual/app/xprop-1.2.2.tar.bz2
diff --git a/pkgs/servers/x11/xorg/xcb-util-xrm.nix b/pkgs/servers/x11/xorg/xcb-util-xrm.nix
index dfc90feeb33..c38d4e80143 100644
--- a/pkgs/servers/x11/xorg/xcb-util-xrm.nix
+++ b/pkgs/servers/x11/xorg/xcb-util-xrm.nix
@@ -1,16 +1,16 @@
 { stdenv, fetchurl, pkgconfig, m4, libxcb, xcbutil, libX11 }:
 
 stdenv.mkDerivation rec {
-  version = "1.0";
+  version = "1.2";
   name = "xcb-util-xrm-${version}";
 
   src = fetchurl {
     url = "https://github.com/Airblader/xcb-util-xrm/releases/download/v${version}/${name}.tar.bz2";
-    sha256 = "1h5vxwpd37dqfw9yj1l4zd9c5dj30r3g0szgysr6kd7xrqgaq04l";
+    sha256 = "0vbqhag51i0njc8d5fc8c6aa12496cwrc3s6s7sa5kfc17cwhppp";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ m4 libxcb xcbutil ]
+  nativeBuildInputs = [ pkgconfig m4 ];
+  buildInputs = [ libxcb xcbutil ]
     ++ stdenv.lib.optional doCheck libX11;
   doCheck = true;
 
diff --git a/pkgs/servers/xmpp/biboumi/default.nix b/pkgs/servers/xmpp/biboumi/default.nix
index e59aaa9116c..7ef6242d2b2 100644
--- a/pkgs/servers/xmpp/biboumi/default.nix
+++ b/pkgs/servers/xmpp/biboumi/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, fetchgit, cmake, libuuid, expat, sqlite, libidn,
-  libiconv, botan2, systemd, pkgconfig, udns, pandoc, procps } :
+  libiconv, botan2, systemd, pkgconfig, udns, pandoc, coreutils } :
 
 stdenv.mkDerivation rec {
   name = "biboumi-${version}";
-  version = "6.1";
+  version = "7.2";
 
   src = fetchurl {
     url = "https://git.louiz.org/biboumi/snapshot/biboumi-${version}.tar.xz";
-    sha256 = "1la1n502v2wyfm0vl8v4m0hbigkkjchi21446n9mb203fz1cvr77";
+    sha256 = "0gyr2lp2imrjm5hvijcq0s7k9fzkirfl70cprjy9r4yvq6mg1jvd";
   };
 
   louiz_catch = fetchgit {
@@ -20,12 +20,11 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake pkgconfig pandoc ];
   buildInputs = [ libuuid expat sqlite libiconv libidn botan2 systemd
-    udns procps ];
+    udns ];
 
-  inherit procps;
   preConfigure = ''
     substituteInPlace CMakeLists.txt --replace /etc/biboumi $out/etc/biboumi
-    substituteInPlace unit/biboumi.service.cmake --replace /bin/kill $procps/bin/kill
+    substituteInPlace unit/biboumi.service.cmake --replace /bin/kill ${coreutils}/bin/kill
     cp $louiz_catch/single_include/catch.hpp tests/
     # echo "policy_directory=$out/etc/biboumi" >> conf/biboumi.cfg
     # TODO include conf/biboumi.cfg as example somewhere
diff --git a/pkgs/servers/xmpp/ejabberd/default.nix b/pkgs/servers/xmpp/ejabberd/default.nix
index 2799241fa99..f95b5efe3d3 100644
--- a/pkgs/servers/xmpp/ejabberd/default.nix
+++ b/pkgs/servers/xmpp/ejabberd/default.nix
@@ -1,5 +1,6 @@
 { stdenv, writeScriptBin, lib, fetchurl, git, cacert
-, erlang, openssl, expat, libyaml, bash, gnused, gnugrep, coreutils, utillinux, procps
+, erlang, openssl, expat, libyaml, bash, gnused, gnugrep, coreutils, utillinux, procps, gd
+, flock
 , withMysql ? false
 , withPgsql ? false
 , withSqlite ? false, sqlite
@@ -23,17 +24,17 @@ let
   ctlpath = lib.makeBinPath [ bash gnused gnugrep coreutils utillinux procps ];
 
 in stdenv.mkDerivation rec {
-  version = "17.07";
+  version = "18.01";
   name = "ejabberd-${version}";
 
   src = fetchurl {
     url = "http://www.process-one.net/downloads/ejabberd/${version}/${name}.tgz";
-    sha256 = "1p8ppp2czjgnq8xnhyksd82npvvx99fwr0g3rrq1wvnwh2vgb8km";
+    sha256 = "01i2n8mlgw293jdf4172f9q8ca8m35vysjws791p7nynpfdb4cn6";
   };
 
   nativeBuildInputs = [ fakegit ];
 
-  buildInputs = [ erlang openssl expat libyaml ]
+  buildInputs = [ erlang openssl expat libyaml gd ]
     ++ lib.optional withSqlite sqlite
     ++ lib.optional withPam pam
     ++ lib.optional withZlib zlib
@@ -50,7 +51,7 @@ in stdenv.mkDerivation rec {
 
     configureFlags = [ "--enable-all" "--with-sqlite3=${sqlite.dev}" ];
 
-    buildInputs = [ git erlang openssl expat libyaml sqlite pam zlib elixir ];
+    nativeBuildInputs = [ git erlang openssl expat libyaml sqlite pam zlib elixir ];
 
     GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
 
@@ -74,7 +75,7 @@ in stdenv.mkDerivation rec {
 
     outputHashMode = "recursive";
     outputHashAlgo = "sha256";
-    outputHash = "1q9yzccn4zf5i4hibq1r0i34q4986a93ph4792l1ph07aiisc8p7";
+    outputHash = "1v3h0c7kfifb6wsfxyv5j1wc7rlxbb7r0pgd4s340wiyxnllzzhk";
   };
 
   configureFlags =
@@ -101,18 +102,18 @@ in stdenv.mkDerivation rec {
   postInstall = ''
     sed -i \
       -e '2iexport PATH=${ctlpath}:$PATH' \
-      -e 's,\(^ *FLOCK=\).*,\1${utillinux}/bin/flock,' \
+      -e 's,\(^ *FLOCK=\).*,\1${flock}/bin/flock,' \
       -e 's,\(^ *JOT=\).*,\1,' \
       -e 's,\(^ *CONNLOCKDIR=\).*,\1/var/lock/ejabberdctl,' \
       $out/sbin/ejabberdctl
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Open-source XMPP application server written in Erlang";
-    license = lib.licenses.gpl2;
+    license = licenses.gpl2;
     homepage = http://www.ejabberd.im;
-    platforms = lib.platforms.linux;
-    maintainers = [ lib.maintainers.sander lib.maintainers.abbradar ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ sander abbradar ];
     broken = withElixir;
   };
 }
diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix
index 3285456a348..2d0e1a529da 100644
--- a/pkgs/servers/xmpp/prosody/default.nix
+++ b/pkgs/servers/xmpp/prosody/default.nix
@@ -1,16 +1,22 @@
 { stdenv, fetchurl, libidn, openssl, makeWrapper, fetchhg
-, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop, luaevent ? null, luazlib ? null
-, withLibevent ? true, withZlib ? true }:
+, lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop
+, withLibevent ? true, luaevent ? null
+, withDBI ? true, luadbi ? null
+# use withExtraLibs to add additional dependencies of community modules
+, withExtraLibs ? [ ]
+, withOnlyInstalledCommunityModules ? [ ]
+, withCommunityModules ? [ ] }:
 
 assert withLibevent -> luaevent != null;
-assert withZlib -> luazlib != null;
+assert withDBI -> luadbi != null;
 
 with stdenv.lib;
 
 let
   libs        = [ luasocket luasec luaexpat luafilesystem luabitop ]
                 ++ optional withLibevent luaevent
-                ++ optional withZlib luazlib;
+                ++ optional withDBI luadbi
+                ++ withExtraLibs;
   getPath     = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}";
   getLuaPath  = lib : getPath lib "lua";
   getLuaCPath = lib : getPath lib "so";
@@ -19,23 +25,22 @@ let
 in
 
 stdenv.mkDerivation rec {
-  version = "0.9.12";
+  version = "0.10.0";
   name = "prosody-${version}";
 
   src = fetchurl {
     url = "http://prosody.im/downloads/source/${name}.tar.gz";
-    sha256 = "139yxqpinajl32ryrybvilh54ddb1q6s0ajjhlcs4a0rnwia6n8s";
+    sha256 = "1644jy5dk46vahmh6nna36s79k8k668sbi3qamjb4q3c4m3y853l";
   };
 
   communityModules = fetchhg {
-    url = "http://prosody-modules.googlecode.com/hg/";
-    rev = "4b55110b0aa8";
-    sha256 = "0010x2rl9f9ihy2nwqan2jdlz25433srj2zna1xh10490mc28hij";
+    url = "https://hg.prosody.im/prosody-modules";
+    rev = "150a7bd59043";
+    sha256 = "0nfx3lngcy88nd81gb7v4kh3nz1bzsm67bxgpd2lprk54diqcrz1";
   };
 
-  buildInputs = [ lua5 luasocket luasec luaexpat luabitop libidn openssl makeWrapper ]
-                ++ optional withLibevent luaevent
-                ++ optional withZlib luazlib;
+  buildInputs = [ lua5 makeWrapper libidn openssl ]
+    ++ optional withDBI luadbi;
 
   configureFlags = [
     "--ostype=linux"
@@ -44,7 +49,9 @@ stdenv.mkDerivation rec {
   ];
 
   postInstall = ''
-      cp $communityModules/mod_websocket/mod_websocket.lua $out/lib/prosody/modules/
+      ${concatMapStringsSep "\n" (module: ''
+        cp -r $communityModules/mod_${module} $out/lib/prosody/modules/
+      '') (withCommunityModules ++ withOnlyInstalledCommunityModules)}
       wrapProgram $out/bin/prosody \
         --set LUA_PATH '${luaPath};' \
         --set LUA_CPATH '${luaCPath};'
@@ -54,11 +61,13 @@ stdenv.mkDerivation rec {
         --set LUA_CPATH '${luaCPath};'
     '';
 
+  passthru.communityModules = withCommunityModules;
+
   meta = {
     description = "Open-source XMPP application server written in Lua";
     license = licenses.mit;
-    homepage = http://www.prosody.im;
+    homepage = https://prosody.im;
     platforms = platforms.linux;
-    maintainers = [ maintainers.flosse ];
+    maintainers = with maintainers; [ fpletz globin ];
   };
 }
diff --git a/pkgs/servers/zookeeper/default.nix b/pkgs/servers/zookeeper/default.nix
index 4e15f472744..c90684e0fe0 100644
--- a/pkgs/servers/zookeeper/default.nix
+++ b/pkgs/servers/zookeeper/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "zookeeper-${version}";
-  version = "3.4.10";
+  version = "3.4.11";
 
   src = fetchurl {
     url = "mirror://apache/zookeeper/${name}/${name}.tar.gz";
-    sha256 = "09rz4ac31932yxyyc8gqrnq1zxb9ahibrq51wbz13b24w0a58zvz";
+    sha256 = "110fs5manyaq6rxbzwzs9x3aqw8d5l4177y9qaj3xhgpr2hniggn";
   };
 
   buildInputs = [ makeWrapper jre ];