about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--maintainers/maintainer-list.nix5
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/programs/sway.nix6
-rw-r--r--nixos/modules/services/misc/gitea.nix15
-rw-r--r--nixos/modules/services/misc/jellyfin.nix60
-rw-r--r--nixos/modules/services/networking/ejabberd.nix28
-rw-r--r--nixos/modules/services/security/sks.nix24
-rw-r--r--nixos/modules/services/web-apps/documize.nix171
-rw-r--r--nixos/modules/system/activation/switch-to-configuration.pl18
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/ejabberd.nix262
-rw-r--r--nixos/tests/jellyfin.nix16
-rw-r--r--nixos/tests/prosody.nix68
-rw-r--r--nixos/tests/xmpp-sendmessage.nix46
-rw-r--r--pkgs/applications/misc/dbeaver/default.nix4
-rw-r--r--pkgs/applications/misc/font-manager/correct-post-install.patch13
-rw-r--r--pkgs/applications/misc/font-manager/default.nix8
-rw-r--r--pkgs/applications/misc/zola/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/matrique/default.nix55
-rw-r--r--pkgs/applications/networking/instant-messengers/quaternion/default.nix60
-rw-r--r--pkgs/applications/office/kexi/default.nix11
-rw-r--r--pkgs/applications/office/skrooge/default.nix4
-rw-r--r--pkgs/applications/science/math/R/default.nix2
-rw-r--r--pkgs/applications/virtualization/docker/default.nix16
-rw-r--r--pkgs/applications/window-managers/awesome/default.nix8
-rw-r--r--pkgs/applications/window-managers/sway/default.nix1
-rw-r--r--pkgs/applications/window-managers/sway/load-configuration-from-etc.patch42
-rw-r--r--pkgs/build-support/appimage/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/core/mutter/3.28.nix29
-rw-r--r--pkgs/desktops/gnustep/libobjc2/default.nix11
-rw-r--r--pkgs/desktops/mate/marco/default.nix4
-rw-r--r--pkgs/desktops/mate/mate-session-manager/default.nix4
-rw-r--r--pkgs/desktops/mate/mate-system-monitor/default.nix4
-rw-r--r--pkgs/development/compilers/adoptopenjdk-bin/sources.json4
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix14
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix14
-rw-r--r--pkgs/development/compilers/sbcl/bootstrap.nix4
-rw-r--r--pkgs/development/compilers/sbcl/default.nix4
-rw-r--r--pkgs/development/idris-modules/glfw.nix6
-rw-r--r--pkgs/development/idris-modules/idris-wrapper.nix8
-rw-r--r--pkgs/development/interpreters/lua-5/default.nix5
-rw-r--r--pkgs/development/interpreters/lua-5/interpreter.nix5
-rw-r--r--pkgs/development/interpreters/python/cpython/docs/2.7-html.nix6
-rw-r--r--pkgs/development/interpreters/python/cpython/docs/2.7-pdf-a4.nix6
-rw-r--r--pkgs/development/interpreters/python/cpython/docs/2.7-pdf-letter.nix6
-rw-r--r--pkgs/development/interpreters/python/cpython/docs/2.7-text.nix6
-rw-r--r--pkgs/development/interpreters/python/cpython/docs/3.7-html.nix18
-rw-r--r--pkgs/development/interpreters/python/cpython/docs/3.7-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/cpython/docs/3.7-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/cpython/docs/3.7-text.nix18
-rw-r--r--pkgs/development/interpreters/python/cpython/docs/default.nix12
-rwxr-xr-xpkgs/development/interpreters/python/cpython/docs/generate.sh2
-rw-r--r--pkgs/development/libraries/accountsservice/default.nix4
-rw-r--r--pkgs/development/libraries/accountsservice/no-create-dirs.patch12
-rw-r--r--pkgs/development/libraries/kproperty/default.nix4
-rw-r--r--pkgs/development/libraries/kreport/default.nix4
-rw-r--r--pkgs/development/libraries/libqmatrixclient/default.nix42
-rw-r--r--pkgs/development/libraries/qca-qt5/default.nix7
-rw-r--r--pkgs/development/libraries/qca-qt5/move-project.patch20
-rw-r--r--pkgs/development/tools/coursier/default.nix6
-rw-r--r--pkgs/development/tools/electron/5.x.nix77
-rw-r--r--pkgs/servers/dico/default.nix15
-rw-r--r--pkgs/servers/dns/bind/default.nix12
-rw-r--r--pkgs/servers/documize-community/default.nix6
-rw-r--r--pkgs/servers/jellyfin/default.nix6
-rw-r--r--pkgs/tools/X11/xlayoutdisplay/default.nix10
-rw-r--r--pkgs/tools/admin/acme.sh/default.nix11
-rw-r--r--pkgs/tools/backup/dedup/default.nix29
-rw-r--r--pkgs/tools/misc/yad/default.nix42
-rw-r--r--pkgs/tools/networking/openvpn/default.nix36
-rw-r--r--pkgs/tools/security/kwalletcli/default.nix50
-rw-r--r--pkgs/tools/text/qgrep/default.nix27
-rw-r--r--pkgs/top-level/all-packages.nix22
73 files changed, 1156 insertions, 465 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index fe0045da810f..438349c6453e 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -197,6 +197,11 @@
     github = "aij";
     name = "Ivan Jager";
   };
+  ajs124 = {
+    email = "nix@ajs124.de";
+    github = "ajs124";
+    name = "Andreas Schrägle";
+  };
   ajgrf = {
     email = "a@ajgrf.com";
     github = "ajgrf";
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index fca4a20eee63..56c44a43c6e3 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -414,6 +414,7 @@
   ./services/misc/ihaskell.nix
   ./services/misc/irkerd.nix
   ./services/misc/jackett.nix
+  ./services/misc/jellyfin.nix
   ./services/misc/logkeys.nix
   ./services/misc/leaps.nix
   ./services/misc/lidarr.nix
diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix
index 457faaa3c102..b4f03151cdc1 100644
--- a/nixos/modules/programs/sway.nix
+++ b/nixos/modules/programs/sway.nix
@@ -78,9 +78,9 @@ in {
     environment = {
       systemPackages = [ swayJoined ] ++ cfg.extraPackages;
       etc = {
-        "sway/config".source = "${swayPackage}/etc/sway/config";
-        #"sway/security.d".source = "${swayPackage}/etc/sway/security.d/";
-        #"sway/config.d".source = "${swayPackage}/etc/sway/config.d/";
+        "sway/config".source = mkOptionDefault "${swayPackage}/etc/sway/config";
+        #"sway/security.d".source = mkOptionDefault "${swayPackage}/etc/sway/security.d/";
+        #"sway/config.d".source = mkOptionDefault "${swayPackage}/etc/sway/config.d/";
       };
     };
     security.pam.services.swaylock = {};
diff --git a/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix
index be4d38719785..6fd4183bd6b4 100644
--- a/nixos/modules/services/misc/gitea.nix
+++ b/nixos/modules/services/misc/gitea.nix
@@ -8,6 +8,7 @@ let
   pg = config.services.postgresql;
   useMysql = cfg.database.type == "mysql";
   usePostgresql = cfg.database.type == "postgres";
+  useSqlite = cfg.database.type == "sqlite3";
   configFile = pkgs.writeText "app.ini" ''
     APP_NAME = ${cfg.appName}
     RUN_USER = ${cfg.user}
@@ -15,11 +16,15 @@ let
 
     [database]
     DB_TYPE = ${cfg.database.type}
-    HOST = ${if cfg.database.socket != null then cfg.database.socket else cfg.database.host + ":" + toString cfg.database.port}
-    NAME = ${cfg.database.name}
-    USER = ${cfg.database.user}
-    PASSWD = #dbpass#
-    PATH = ${cfg.database.path}
+    ${optionalString (usePostgresql || useMysql) ''
+      HOST = ${if cfg.database.socket != null then cfg.database.socket else cfg.database.host + ":" + toString cfg.database.port}
+      NAME = ${cfg.database.name}
+      USER = ${cfg.database.user}
+      PASSWD = #dbpass#
+    ''}
+    ${optionalString useSqlite ''
+      PATH = ${cfg.database.path}
+    ''}
     ${optionalString usePostgresql ''
       SSL_MODE = disable
     ''}
diff --git a/nixos/modules/services/misc/jellyfin.nix b/nixos/modules/services/misc/jellyfin.nix
new file mode 100644
index 000000000000..7f38dd0ff233
--- /dev/null
+++ b/nixos/modules/services/misc/jellyfin.nix
@@ -0,0 +1,60 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+let
+  cfg = config.services.jellyfin;
+in
+{
+  options = {
+    services.jellyfin = {
+      enable = mkEnableOption "Jellyfin Media Server";
+
+      user = mkOption {
+        type = types.str;
+        default = "jellyfin";
+        description = "User account under which Jellyfin runs.";
+      };
+
+      group = mkOption {
+        type = types.str;
+        default = "jellyfin";
+        description = "Group under which jellyfin runs.";
+      };
+    };
+  };
+
+  config = mkIf cfg.enable {
+    systemd.services.jellyfin = {
+      description = "Jellyfin Media Server";
+      after = [ "network.target" ];
+      wantedBy = [ "multi-user.target" ];
+
+      serviceConfig = rec {
+        User = cfg.user;
+        Group = cfg.group;
+        StateDirectory = "jellyfin";
+        CacheDirectory = "jellyfin";
+        ExecStart = "${pkgs.jellyfin}/bin/jellyfin --datadir '/var/lib/${StateDirectory}' --cachedir '/var/cache/${CacheDirectory}'";
+        Restart = "on-failure";
+      };
+    };
+
+    users.users = mkIf (cfg.user == "jellyfin") {
+      jellyfin.group = cfg.group;
+    };
+
+    users.groups = mkIf (cfg.group == "jellyfin") {
+      jellyfin = {};
+    };
+
+    assertions = [
+      {
+        assertion = !config.services.emby.enable;
+        message = "Emby and Jellyfin are incompatible, you cannot enable both";
+      }
+    ];
+  };
+
+  meta.maintainers = with lib.maintainers; [ minijackson ];
+}
diff --git a/nixos/modules/services/networking/ejabberd.nix b/nixos/modules/services/networking/ejabberd.nix
index ef5e2cee6f20..6a38f85c48a2 100644
--- a/nixos/modules/services/networking/ejabberd.nix
+++ b/nixos/modules/services/networking/ejabberd.nix
@@ -11,7 +11,7 @@ let
     ${cfg.ctlConfig}
   '';
 
-  ectl = ''${cfg.package}/bin/ejabberdctl ${if cfg.configFile == null then "" else "--config ${cfg.configFile}"} --ctl-config "${ctlcfg}" --spool "${cfg.spoolDir}" --logs "${cfg.logsDir}"'';
+  ectl = ''${cfg.package}/bin/ejabberdctl ${optionalString (cfg.configFile != null) "--config ${cfg.configFile}"} --ctl-config "${ctlcfg}" --spool "${cfg.spoolDir}" --logs "${cfg.logsDir}"'';
 
   dumps = lib.escapeShellArgs cfg.loadDumps;
 
@@ -111,28 +111,17 @@ in {
       description = "ejabberd server";
       wantedBy = [ "multi-user.target" ];
       after = [ "network.target" ];
-      path = [ pkgs.findutils pkgs.coreutils pkgs.runit ] ++ lib.optional cfg.imagemagick pkgs.imagemagick;
+      path = [ pkgs.findutils pkgs.coreutils ] ++ lib.optional cfg.imagemagick pkgs.imagemagick;
 
       serviceConfig = {
-        ExecStart = ''${ectl} foreground'';
-        # FIXME: runit is used for `chpst` -- can we get rid of this?
-        ExecStop = ''${pkgs.runit}/bin/chpst -u "${cfg.user}:${cfg.group}" ${ectl} stop'';
-        ExecReload = ''${pkgs.runit}/bin/chpst -u "${cfg.user}:${cfg.group}" ${ectl} reload_config'';
         User = cfg.user;
         Group = cfg.group;
-        PermissionsStartOnly = true;
+        ExecStart = "${ectl} foreground";
+        ExecStop = "${ectl} stop";
+        ExecReload = "${ectl} reload_config";
       };
 
       preStart = ''
-        mkdir -p -m750 "${cfg.logsDir}"
-        chown "${cfg.user}:${cfg.group}" "${cfg.logsDir}"
-
-        mkdir -p -m750 "/var/lock/ejabberdctl"
-        chown "${cfg.user}:${cfg.group}" "/var/lock/ejabberdctl"
-
-        mkdir -p -m750 "${cfg.spoolDir}"
-        chown -R "${cfg.user}:${cfg.group}" "${cfg.spoolDir}"
-
         if [ -z "$(ls -A '${cfg.spoolDir}')" ]; then
           touch "${cfg.spoolDir}/.firstRun"
         fi
@@ -149,13 +138,18 @@ in {
           for src in ${dumps}; do
             find "$src" -type f | while read dump; do
               echo "Loading configuration dump at $dump"
-              chpst -u "${cfg.user}:${cfg.group}" ${ectl} load "$dump"
+              ${ectl} load "$dump"
             done
           done
         fi
       '';
     };
 
+    systemd.tmpfiles.rules = [
+      "d '${cfg.logsDir}' 0750 ${cfg.user} ${cfg.group} -"
+      "d '${cfg.spoolDir}' 0700 ${cfg.user} ${cfg.group} -"
+    ];
+
     security.pam.services.ejabberd = {};
 
   };
diff --git a/nixos/modules/services/security/sks.nix b/nixos/modules/services/security/sks.nix
index 8136a5c763a9..1b7a2ad13980 100644
--- a/nixos/modules/services/security/sks.nix
+++ b/nixos/modules/services/security/sks.nix
@@ -116,20 +116,22 @@ in {
           ${lib.optionalString (cfg.webroot != null)
             "ln -sfT \"${cfg.webroot}\" web"}
           mkdir -p dump
-          # Check that both database configs are symlinks before overwriting them
-          if [ -e KDB/DB_CONFIG ] && [ ! -L KBD/DB_CONFIG ]; then
-            echo "KDB/DB_CONFIG exists but is not a symlink." >&2
-            exit 1
-          fi
-          if [ -e PTree/DB_CONFIG ] && [ ! -L PTree/DB_CONFIG ]; then
-            echo "PTree/DB_CONFIG exists but is not a symlink." >&2
-            exit 1
-          fi
-          ln -sf ${dbConfig} KDB/DB_CONFIG
-          ln -sf ${dbConfig} PTree/DB_CONFIG
           ${sksPkg}/bin/sks build dump/*.gpg -n 10 -cache 100 || true #*/
           ${sksPkg}/bin/sks cleandb || true
           ${sksPkg}/bin/sks pbuild -cache 20 -ptree_cache 70 || true
+          # Check that both database configs are symlinks before overwriting them
+          # TODO: The initial build will be without DB_CONFIG, but this will
+          # hopefully not cause any significant problems. It might be better to
+          # create both directories manually but we have to check that this does
+          # not affect the initial build of the DB.
+          for CONFIG_FILE in KDB/DB_CONFIG PTree/DB_CONFIG; do
+            if [ -e $CONFIG_FILE ] && [ ! -L $CONFIG_FILE ]; then
+              echo "$CONFIG_FILE exists but is not a symlink." >&2
+              echo "Please remove $PWD/$CONFIG_FILE manually to continue." >&2
+              exit 1
+            fi
+            ln -sf ${dbConfig} $CONFIG_FILE
+          done
         '';
         serviceConfig = {
           WorkingDirectory = "~";
diff --git a/nixos/modules/services/web-apps/documize.nix b/nixos/modules/services/web-apps/documize.nix
index 206617b0e5ac..37359869cb64 100644
--- a/nixos/modules/services/web-apps/documize.nix
+++ b/nixos/modules/services/web-apps/documize.nix
@@ -3,65 +3,136 @@
 with lib;
 
 let
-
   cfg = config.services.documize;
 
-in
+  mkParams = optional: concatMapStrings (name: let
+    predicate = optional -> cfg.${name} != null;
+    template = " -${name} '${toString cfg.${name}}'";
+  in optionalString predicate template);
 
-  {
-    options.services.documize = {
-      enable = mkEnableOption "Documize Wiki";
+in {
+  options.services.documize = {
+    enable = mkEnableOption "Documize Wiki";
 
-      offline = mkEnableOption "Documize offline mode";
+    package = mkOption {
+      type = types.package;
+      default = pkgs.documize-community;
+      description = ''
+        Which package to use for documize.
+      '';
+    };
 
-      package = mkOption {
-        default = pkgs.documize-community;
-        type = types.package;
-        description = ''
-          Which package to use for documize.
-        '';
-      };
+    salt = mkOption {
+      type = types.nullOr types.str;
+      default = null;
+      example = "3edIYV6c8B28b19fh";
+      description = ''
+        The salt string used to encode JWT tokens, if not set a random value will be generated.
+      '';
+    };
 
-      db = mkOption {
-        type = types.str;
-        example = "host=localhost port=5432 sslmode=disable user=admin password=secret dbname=documize";
-        description = ''
-          The DB connection string to use for the database.
-        '';
-      };
+    cert = mkOption {
+      type = types.nullOr types.str;
+      default = null;
+      description = ''
+        The <filename>cert.pem</filename> file used for https.
+      '';
+    };
 
-      dbtype = mkOption {
-        type = types.enum [ "postgresql" "percona" "mariadb" "mysql" ];
-        description = ''
-          Which database to use for storage.
-        '';
-      };
+    key = mkOption {
+      type = types.nullOr types.str;
+      default = null;
+      description = ''
+        The <filename>key.pem</filename> file used for https.
+      '';
+    };
 
-      port = mkOption {
-        type = types.port;
-        example = 3000;
-        description = ''
-          Which TCP port to serve.
-        '';
-      };
+    port = mkOption {
+      type = types.port;
+      default = 5001;
+      description = ''
+        The http/https port number.
+      '';
+    };
+
+    forcesslport = mkOption {
+      type = types.nullOr types.port;
+      default = null;
+      description = ''
+        Redirect given http port number to TLS.
+      '';
+    };
+
+    offline = mkOption {
+      type = types.bool;
+      default = false;
+      description = ''
+        Set <literal>true</literal> for offline mode.
+      '';
+      apply = v: if true == v then 1 else 0;
+    };
+
+    dbtype = mkOption {
+      type = types.enum [ "mysql" "percona" "mariadb" "postgresql" "sqlserver" ];
+      default = "postgresql";
+      description = ''
+        Specify the database provider:
+        <simplelist type='inline'>
+          <member><literal>mysql</literal></member>
+          <member><literal>percona</literal></member>
+          <member><literal>mariadb</literal></member>
+          <member><literal>postgresql</literal></member>
+          <member><literal>sqlserver</literal></member>
+        </simplelist>
+      '';
     };
 
-    config = mkIf cfg.enable {
-      systemd.services.documize-server = {
-        wantedBy = [ "multi-user.target" ];
-
-        script = ''
-          ${cfg.package}/bin/documize \
-            -db "${cfg.db}" \
-            -dbtype ${cfg.dbtype} \
-            -port ${toString cfg.port} \
-            -offline ${if cfg.offline then "1" else "0"}
-        '';
-
-        serviceConfig = {
-          Restart = "always";
-          DynamicUser = "yes";
-        };
+    db = mkOption {
+      type = types.str;
+      description = ''
+        Database specific connection string for example:
+        <itemizedlist>
+        <listitem><para>MySQL/Percona/MariaDB:
+          <literal>user:password@tcp(host:3306)/documize</literal>
+        </para></listitem>
+        <listitem><para>MySQLv8+:
+          <literal>user:password@tcp(host:3306)/documize?allowNativePasswords=true</literal>
+        </para></listitem>
+        <listitem><para>PostgreSQL:
+          <literal>host=localhost port=5432 dbname=documize user=admin password=secret sslmode=disable</literal>
+        </para></listitem>
+        <listitem><para>MSSQL:
+          <literal>sqlserver://username:password@localhost:1433?database=Documize</literal> or
+          <literal>sqlserver://sa@localhost/SQLExpress?database=Documize</literal>
+        </para></listitem>
+        </itemizedlist>
+      '';
+    };
+
+    location = mkOption {
+      type = types.nullOr types.str;
+      default = null;
+      description = ''
+        reserved
+      '';
+    };
+  };
+
+  config = mkIf cfg.enable {
+    systemd.services.documize-server = {
+      description = "Documize Wiki";
+      documentation = [ https://documize.com/ ];
+      wantedBy = [ "multi-user.target" ];
+
+      serviceConfig = {
+        ExecStart = concatStringsSep " " [
+          "${cfg.package}/bin/documize"
+          (mkParams false [ "db" "dbtype" "port" ])
+          (mkParams true [ "offline" "location" "forcesslport" "key" "cert" "salt" ])
+        ];
+        Restart = "always";
+        DynamicUser = "yes";
       };
     };
-  }
+  };
+}
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl
index 397b308b7311..8ff00fa11dc7 100644
--- a/nixos/modules/system/activation/switch-to-configuration.pl
+++ b/nixos/modules/system/activation/switch-to-configuration.pl
@@ -166,24 +166,6 @@ while (my ($unit, $state) = each %{$activePrev}) {
 
     if (-e $prevUnitFile && ($state->{state} eq "active" || $state->{state} eq "activating")) {
         if (! -e $newUnitFile || abs_path($newUnitFile) eq "/dev/null") {
-            # Ignore (i.e. never stop) these units:
-            if ($unit eq "system.slice") {
-                # TODO: This can be removed a few months after 18.09 is out
-                # (i.e. after everyone switched away from 18.03).
-                # Problem: Restarting (stopping) system.slice would not only
-                # stop X11 but also most system units/services. We obviously
-                # don't want this happening to users when they switch from 18.03
-                # to 18.09 or nixos-unstable.
-                # Reason: The following change in systemd:
-                # https://github.com/systemd/systemd/commit/d8e5a9338278d6602a0c552f01f298771a384798
-                # The commit adds system.slice to the perpetual units, which
-                # means removing the unit file and adding it to the source code.
-                # This is done so that system.slice can't be stopped anymore but
-                # in our case it ironically would cause this script to stop
-                # system.slice because the unit was removed (and an older
-                # systemd version is still running).
-                next;
-            }
             my $unitInfo = parseUnit($prevUnitFile);
             $unitsToStop{$unit} = 1 if boolIsTrue($unitInfo->{'X-StopOnRemoval'} // "yes");
         }
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 81dc7beb6021..5639b2668c30 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -72,6 +72,7 @@ in
   #ec2-config = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-config or {};
   ec2-nixops = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-nixops or {};
   ecryptfs = handleTest ./ecryptfs.nix {};
+  ejabberd = handleTest ./ejabberd.nix {};
   elk = handleTestOn ["x86_64-linux"] ./elk.nix {};
   env = handleTest ./env.nix {};
   etcd = handleTestOn ["x86_64-linux"] ./etcd.nix {};
diff --git a/nixos/tests/ejabberd.nix b/nixos/tests/ejabberd.nix
new file mode 100644
index 000000000000..0691dfe780d2
--- /dev/null
+++ b/nixos/tests/ejabberd.nix
@@ -0,0 +1,262 @@
+import ./make-test.nix ({ pkgs, ... }: {
+  name = "ejabberd";
+  meta = with pkgs.stdenv.lib.maintainers; {
+    maintainers = [ ajs124 ];
+  };
+  nodes = {
+    client = { nodes, pkgs, ... }: {
+      environment.systemPackages = [
+        (pkgs.callPackage ./xmpp-sendmessage.nix { connectTo = nodes.server.config.networking.primaryIPAddress; })
+      ];
+    };
+    server = { config, pkgs, ... }: {
+      networking.extraHosts = ''
+        ${config.networking.primaryIPAddress} example.com
+      '';
+
+      services.ejabberd = {
+        enable = true;
+        configFile = "/etc/ejabberd.yml";
+      };
+
+      environment.etc."ejabberd.yml" = {
+        user = "ejabberd";
+        mode = "0600";
+        text = ''
+          loglevel: 3
+
+          hosts:
+            - "example.com"
+
+          listen:
+            -
+              port: 5222
+              module: ejabberd_c2s
+              zlib: false
+              max_stanza_size: 65536
+              shaper: c2s_shaper
+              access: c2s
+            -
+              port: 5269
+              ip: "::"
+              module: ejabberd_s2s_in
+            -
+              port: 5347
+              ip: "127.0.0.1"
+              module: ejabberd_service
+              access: local
+              shaper_rule: fast
+              ip: "127.0.0.1"
+
+          ## Disabling digest-md5 SASL authentication. digest-md5 requires plain-text
+          ## password storage (see auth_password_format option).
+          disable_sasl_mechanisms: "digest-md5"
+
+          ## Outgoing S2S options
+          ## Preferred address families (which to try first) and connect timeout
+          ## in seconds.
+          outgoing_s2s_families:
+             - ipv4
+             - ipv6
+
+          ## auth_method: Method used to authenticate the users.
+          ## The default method is the internal.
+          ## If you want to use a different method,
+          ## comment this line and enable the correct ones.
+          auth_method: internal
+
+          ## Store the plain passwords or hashed for SCRAM:
+          ## auth_password_format: plain
+          auth_password_format: scram
+
+          ###'  TRAFFIC SHAPERS
+          shaper:
+            # in B/s
+            normal: 1000000
+            fast: 50000000
+
+          ## This option specifies the maximum number of elements in the queue
+          ## of the FSM. Refer to the documentation for details.
+          max_fsm_queue: 1000
+
+          ###'   ACCESS CONTROL LISTS
+          acl:
+            ## The 'admin' ACL grants administrative privileges to XMPP accounts.
+            ## You can put here as many accounts as you want.
+            admin:
+               user:
+                 - "root": "example.com"
+
+            ## Local users: don't modify this.
+            local:
+              user_regexp: ""
+
+            ## Loopback network
+            loopback:
+              ip:
+                - "127.0.0.0/8"
+                - "::1/128"
+                - "::FFFF:127.0.0.1/128"
+
+          ###'  SHAPER RULES
+          shaper_rules:
+            ## Maximum number of simultaneous sessions allowed for a single user:
+            max_user_sessions: 10
+            ## Maximum number of offline messages that users can have:
+            max_user_offline_messages:
+              - 5000: admin
+              - 1024
+            ## For C2S connections, all users except admins use the "normal" shaper
+            c2s_shaper:
+              - none: admin
+              - normal
+            ## All S2S connections use the "fast" shaper
+            s2s_shaper: fast
+
+          ###'  ACCESS RULES
+          access_rules:
+            ## This rule allows access only for local users:
+            local:
+              - allow: local
+            ## Only non-blocked users can use c2s connections:
+            c2s:
+              - deny: blocked
+              - allow
+            ## Only admins can send announcement messages:
+            announce:
+              - allow: admin
+            ## Only admins can use the configuration interface:
+            configure:
+              - allow: admin
+            ## Only accounts of the local ejabberd server can create rooms:
+            muc_create:
+              - allow: local
+            ## Only accounts on the local ejabberd server can create Pubsub nodes:
+            pubsub_createnode:
+              - allow: local
+            ## In-band registration allows registration of any possible username.
+            ## To disable in-band registration, replace 'allow' with 'deny'.
+            register:
+              - allow
+            ## Only allow to register from localhost
+            trusted_network:
+              - allow: loopback
+
+          ## ===============
+          ## API PERMISSIONS
+          ## ===============
+          ##
+          ## This section allows you to define who and using what method
+          ## can execute commands offered by ejabberd.
+          ##
+          ## By default "console commands" section allow executing all commands
+          ## issued using ejabberdctl command, and "admin access" section allows
+          ## users in admin acl that connect from 127.0.0.1 to  execute all
+          ## commands except start and stop with any available access method
+          ## (ejabberdctl, http-api, xmlrpc depending what is enabled on server).
+          ##
+          ## If you remove "console commands" there will be one added by
+          ## default allowing executing all commands, but if you just change
+          ## permissions in it, version from config file will be used instead
+          ## of default one.
+          ##
+          api_permissions:
+            "console commands":
+              from:
+                - ejabberd_ctl
+              who: all
+              what: "*"
+
+          language: "en"
+
+          ###'  MODULES
+          ## Modules enabled in all ejabberd virtual hosts.
+          modules:
+            mod_adhoc: {}
+            mod_announce: # recommends mod_adhoc
+              access: announce
+            mod_blocking: {} # requires mod_privacy
+            mod_caps: {}
+            mod_carboncopy: {}
+            mod_client_state: {}
+            mod_configure: {} # requires mod_adhoc
+            ## mod_delegation: {} # for xep0356
+            mod_echo: {}
+            #mod_irc:
+            #  host: "irc.@HOST@"
+            #  default_encoding: "utf-8"
+            ## mod_bosh: {}
+            ## mod_http_fileserver:
+            ##   docroot: "/var/www"
+            ##   accesslog: "/var/log/ejabberd/access.log"
+            #mod_http_upload:
+            #  thumbnail: false # otherwise needs the identify command from ImageMagick installed
+            #  put_url: "https://@HOST@:5444"
+            ##   # docroot: "@HOME@/upload"
+            #mod_http_upload_quota:
+            #  max_days: 14
+            mod_last: {}
+            ## XEP-0313: Message Archive Management
+            ## You might want to setup a SQL backend for MAM because the mnesia database is
+            ## limited to 2GB which might be exceeded on large servers
+            mod_mam: {}
+            mod_muc:
+              host: "muc.@HOST@"
+              access:
+                - allow
+              access_admin:
+                - allow: admin
+              access_create: muc_create
+              access_persistent: muc_create
+            mod_muc_admin: {}
+            mod_muc_log: {}
+            mod_offline:
+              access_max_user_messages: max_user_offline_messages
+            mod_ping: {}
+            ## mod_pres_counter:
+            ##   count: 5
+            ##   interval: 60
+            mod_privacy: {}
+            mod_private: {}
+            mod_roster:
+                versioning: true
+            mod_shared_roster: {}
+            mod_stats: {}
+            mod_time: {}
+            mod_vcard:
+              search: false
+            mod_vcard_xupdate: {}
+            ## Convert all avatars posted by Android clients from WebP to JPEG
+            mod_avatar: {}
+            #  convert:
+            #    webp: jpeg
+            mod_version: {}
+            mod_stream_mgmt: {}
+            ##   The module for S2S dialback (XEP-0220). Please note that you cannot
+            ##   rely solely on dialback if you want to federate with other servers,
+            ##   because a lot of servers have dialback disabled and instead rely on
+            ##   PKIX authentication. Make sure you have proper certificates installed
+            ##   and check your accessibility at https://check.messaging.one/
+            mod_s2s_dialback: {}
+            mod_pubsub:
+              plugins:
+                - "pep"
+            mod_push: {}
+        '';
+      };
+
+      networking.firewall.enable = false;
+    };
+  };
+
+  testScript = { nodes, ... }: ''
+    $server->waitForUnit('ejabberd.service');
+    $server->succeed('su ejabberd -s $(which ejabberdctl) status|grep started') =~ /ejabberd is running/;
+    $server->succeed('su ejabberd -s $(which ejabberdctl) register azurediamond example.com hunter2');
+    $server->succeed('su ejabberd -s $(which ejabberdctl) register cthon98 example.com nothunter2');
+    $server->fail('su ejabberd -s $(which ejabberdctl) register asdf wrong.domain');
+    $client->succeed('send-message');
+    $server->succeed('su ejabberd -s $(which ejabberdctl) unregister cthon98 example.com');
+    $server->succeed('su ejabberd -s $(which ejabberdctl) unregister azurediamond example.com');
+  '';
+})
diff --git a/nixos/tests/jellyfin.nix b/nixos/tests/jellyfin.nix
new file mode 100644
index 000000000000..b60c6eb94f46
--- /dev/null
+++ b/nixos/tests/jellyfin.nix
@@ -0,0 +1,16 @@
+import ./make-test.nix ({ lib, ...}:
+
+{
+  name = "jellyfin";
+  meta.maintainers = with lib.maintainers; [ minijackson ];
+
+  machine =
+    { ... }:
+    { services.jellyfin.enable = true; };
+
+  testScript = ''
+    $machine->waitForUnit('jellyfin.service');
+    $machine->waitForOpenPort('8096');
+    $machine->succeed("curl --fail http://localhost:8096/");
+  '';
+})
diff --git a/nixos/tests/prosody.nix b/nixos/tests/prosody.nix
index 61ae5bb38ed9..a39bae7898dc 100644
--- a/nixos/tests/prosody.nix
+++ b/nixos/tests/prosody.nix
@@ -9,70 +9,30 @@ import ./make-test.nix {
       extraConfig = ''
         storage = "sql"
       '';
+      virtualHosts.test = {
+        domain = "example.com";
+        enabled = true;
+      };
     };
-    environment.systemPackages = let
-      sendMessage = pkgs.writeScriptBin "send-message" ''
-        #!/usr/bin/env python3
-        # Based on the sleekxmpp send_client example, look there for more details:
-        # https://github.com/fritzy/SleekXMPP/blob/develop/examples/send_client.py
-        import sleekxmpp
-
-        class SendMsgBot(sleekxmpp.ClientXMPP):
-            """
-            A basic SleekXMPP bot that will log in, send a message,
-            and then log out.
-            """
-            def __init__(self, jid, password, recipient, message):
-                sleekxmpp.ClientXMPP.__init__(self, jid, password)
-
-                self.recipient = recipient
-                self.msg = message
-
-                self.add_event_handler("session_start", self.start, threaded=True)
-
-            def start(self, event):
-                self.send_presence()
-                self.get_roster()
-
-                self.send_message(mto=self.recipient,
-                                  mbody=self.msg,
-                                  mtype='chat')
-
-                self.disconnect(wait=True)
-
-
-        if __name__ == '__main__':
-            xmpp = SendMsgBot("test1@localhost", "test1", "test2@localhost", "Hello World!")
-            xmpp.register_plugin('xep_0030') # Service Discovery
-            xmpp.register_plugin('xep_0199') # XMPP Ping
-
-            # TODO: verify certificate
-            # If you want to verify the SSL certificates offered by a server:
-            # xmpp.ca_certs = "path/to/ca/cert"
-
-            if xmpp.connect(('localhost', 5222)):
-                xmpp.process(block=True)
-            else:
-                print("Unable to connect.")
-                sys.exit(1)
-      '';
-    in [ (pkgs.python3.withPackages (ps: [ ps.sleekxmpp ])) sendMessage ];
+    environment.systemPackages = [
+      (pkgs.callPackage ./xmpp-sendmessage.nix {})
+    ];
   };
 
   testScript = ''
     $machine->waitForUnit('prosody.service');
     $machine->succeed('prosodyctl status') =~ /Prosody is running/;
 
-    # set password to 'test' (it's asked twice)
-    $machine->succeed('yes test1 | prosodyctl adduser test1@localhost');
+    # set password to 'nothunter2' (it's asked twice)
+    $machine->succeed('yes nothunter2 | prosodyctl adduser cthon98@example.com');
     # set password to 'y'
-    $machine->succeed('yes | prosodyctl adduser test2@localhost');
-    # correct password to 'test2'
-    $machine->succeed('yes test2 | prosodyctl passwd test2@localhost');
+    $machine->succeed('yes | prosodyctl adduser azurediamond@example.com');
+    # correct password to 'hunter2'
+    $machine->succeed('yes hunter2 | prosodyctl passwd azurediamond@example.com');
 
     $machine->succeed("send-message");
 
-    $machine->succeed('prosodyctl deluser test1@localhost');
-    $machine->succeed('prosodyctl deluser test2@localhost');
+    $machine->succeed('prosodyctl deluser cthon98@example.com');
+    $machine->succeed('prosodyctl deluser azurediamond@example.com');
   '';
 }
diff --git a/nixos/tests/xmpp-sendmessage.nix b/nixos/tests/xmpp-sendmessage.nix
new file mode 100644
index 000000000000..2a075a018134
--- /dev/null
+++ b/nixos/tests/xmpp-sendmessage.nix
@@ -0,0 +1,46 @@
+{ writeScriptBin, python3, connectTo ? "localhost" }:
+writeScriptBin "send-message" ''
+  #!${(python3.withPackages (ps: [ ps.sleekxmpp ])).interpreter}
+  # Based on the sleekxmpp send_client example, look there for more details:
+  # https://github.com/fritzy/SleekXMPP/blob/develop/examples/send_client.py
+  import sleekxmpp
+
+  class SendMsgBot(sleekxmpp.ClientXMPP):
+      """
+      A basic SleekXMPP bot that will log in, send a message,
+      and then log out.
+      """
+      def __init__(self, jid, password, recipient, message):
+          sleekxmpp.ClientXMPP.__init__(self, jid, password)
+
+          self.recipient = recipient
+          self.msg = message
+
+          self.add_event_handler("session_start", self.start, threaded=True)
+
+      def start(self, event):
+          self.send_presence()
+          self.get_roster()
+
+          self.send_message(mto=self.recipient,
+                            mbody=self.msg,
+                            mtype='chat')
+
+          self.disconnect(wait=True)
+
+
+  if __name__ == '__main__':
+      xmpp = SendMsgBot("cthon98@example.com", "nothunter2", "azurediamond@example.com", "hey, if you type in your pw, it will show as stars")
+      xmpp.register_plugin('xep_0030') # Service Discovery
+      xmpp.register_plugin('xep_0199') # XMPP Ping
+
+      # TODO: verify certificate
+      # If you want to verify the SSL certificates offered by a server:
+      # xmpp.ca_certs = "path/to/ca/cert"
+
+      if xmpp.connect(('${connectTo}', 5222)):
+          xmpp.process(block=True)
+      else:
+          print("Unable to connect.")
+          sys.exit(1)
+''
diff --git a/pkgs/applications/misc/dbeaver/default.nix b/pkgs/applications/misc/dbeaver/default.nix
index 626b62ed7d0c..2552cf18f078 100644
--- a/pkgs/applications/misc/dbeaver/default.nix
+++ b/pkgs/applications/misc/dbeaver/default.nix
@@ -7,7 +7,7 @@
 
 stdenv.mkDerivation rec {
   name = "dbeaver-ce-${version}";
-  version = "6.0.2";
+  version = "6.0.3";
 
   desktopItem = makeDesktopItem {
     name = "dbeaver";
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
-    sha256 = "12zqz9zi4jryvlk1rjxfl4jdj4a6n00018yyk95glfdrxda2xyib";
+    sha256 = "0pcf8p9nmbj6kf32zrjjrfyxb07x37h56zm3s5gdf1jk2hvrarvl";
   };
 
   installPhase = ''
diff --git a/pkgs/applications/misc/font-manager/correct-post-install.patch b/pkgs/applications/misc/font-manager/correct-post-install.patch
deleted file mode 100644
index 47e9800d2657..000000000000
--- a/pkgs/applications/misc/font-manager/correct-post-install.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/meson_post_install.py b/meson_post_install.py
-index 8d00e70..c28d19e 100644
---- a/meson_post_install.py
-+++ b/meson_post_install.py
-@@ -7,7 +7,7 @@ prefix = environ['MESON_INSTALL_PREFIX']
- data_dir = path.join(prefix, 'share')
- schema_dir = path.join(data_dir, 'glib-2.0', 'schemas')
- 
--if not environ['DESTDIR']:
-+if not environ.get('DESTDIR'):
-     print('Compiling gsettings schemas...')
-     call(['glib-compile-schemas', schema_dir])
-     print('Updating desktop database...')
diff --git a/pkgs/applications/misc/font-manager/default.nix b/pkgs/applications/misc/font-manager/default.nix
index f8a02d2f78c6..f00d6cfc60da 100644
--- a/pkgs/applications/misc/font-manager/default.nix
+++ b/pkgs/applications/misc/font-manager/default.nix
@@ -10,8 +10,8 @@ stdenv.mkDerivation rec {
   src = fetchFromGitHub {
     owner = "FontManager";
     repo = "master";
-    rev = "cc057f3e93f5b1033b04decee03cdb44177e48b3";
-    sha256 = "1xg80bi2465p5r8zfmb34iga9yqs3is1k4f13hw0ligvhb58gas0";
+    rev = version;
+    sha256 = "16hma8rrkam6ngn5vbdaryn31vdixvii6920g9z928gylz9xkd3g";
   };
 
   nativeBuildInputs = [
@@ -38,10 +38,6 @@ stdenv.mkDerivation rec {
     gnome3.adwaita-icon-theme
   ];
 
-  patches = [
-   ./correct-post-install.patch
-  ];
-
   mesonFlags = [
     "-Ddisable_pycompile=true"
   ];
diff --git a/pkgs/applications/misc/zola/default.nix b/pkgs/applications/misc/zola/default.nix
index 6fc7de1d4d57..f945da612748 100644
--- a/pkgs/applications/misc/zola/default.nix
+++ b/pkgs/applications/misc/zola/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "zola";
-  version = "0.6.0";
+  version = "0.7.0";
 
   src = fetchFromGitHub {
     owner = "getzola";
     repo = pname;
     rev = "v${version}";
-    sha256 = "11y5gb6lx040ax4b16fr3whkj4vmv8hlkvb50h58gs77payglf6l";
+    sha256 = "02lr1n3gf0agj8x451ndyvv16lq7rccazp4nz9zy0pzwxwrlwhra";
   };
 
-  cargoSha256 = "19hqkj27dbsy4pi0i8mjjlhi4351yifvc6zln6scc2nd60p251h6";
+  cargoSha256 = "003dhh41fh337k3djibpj6hyd16xprbgws3lbp7x37p4lx7qlnfy";
 
   nativeBuildInputs = [ cmake pkgconfig ];
   buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices cf-private ];
diff --git a/pkgs/applications/networking/instant-messengers/matrique/default.nix b/pkgs/applications/networking/instant-messengers/matrique/default.nix
deleted file mode 100644
index 91ba8e7175ce..000000000000
--- a/pkgs/applications/networking/instant-messengers/matrique/default.nix
+++ /dev/null
@@ -1,55 +0,0 @@
-{ stdenv, fetchFromGitLab, fetchFromGitHub, qmake
-, qtquickcontrols2, qtmultimedia, qtgraphicaleffects
-, libqmatrixclient
-}:
-
-let
-
-  libqmatrixclient_git = libqmatrixclient.overrideDerivation (oldAttrs: {
-    name = "libqmatrixclient-git-for-matrique";
-    src = fetchFromGitHub {
-      owner = "QMatrixClient";
-      repo = "libqmatrixclient";
-      rev = "d9ff200f";
-      sha256 = "0qxkffg1499wnn8rbndq6z51sz6hiij2pkp40cvs530sl0zg0c69";
-    };
-  });
-
-  SortFilterProxyModel = fetchFromGitLab {
-    owner = "b0";
-    repo = "SortFilterProxyModel";
-    rev = "3c2c125c";
-    sha256 = "1494dvq7kiq0ymf5f9hr47pw80zv3m3dncnaw1pnzs7mhkf2s5fr";
-  };
-
-in stdenv.mkDerivation rec {
-  name = "matrique-${version}";
-  version = "250";
-
-  src = fetchFromGitLab {
-    owner = "b0";
-    repo = "matrique";
-    rev = version;
-    sha256 = "0l7ag2q3l8ixczwc43igvkkl81g5s5j032gzizmgpzb1bjpdgry7";
-  };
-
-  postPatch = ''
-    rm -r include/*
-    ln -sf ${libqmatrixclient_git.src} include/libqmatrixclient
-    ln -sf ${SortFilterProxyModel} include/SortFilterProxyModel
-  '';
-
-  nativeBuildInputs = [ qmake ];
-  buildInputs = [
-    qtquickcontrols2 qtmultimedia qtgraphicaleffects
-    libqmatrixclient_git
-  ];
-
-  meta = with stdenv.lib; {
-    inherit (src.meta) homepage;
-    description = "A glossy client for Matrix";
-    maintainers = with maintainers; [ fpletz ];
-    license = licenses.gpl3;
-    platforms = platforms.linux;
-  };
-}
diff --git a/pkgs/applications/networking/instant-messengers/quaternion/default.nix b/pkgs/applications/networking/instant-messengers/quaternion/default.nix
index 55b24f71fb64..5acf71dbcb63 100644
--- a/pkgs/applications/networking/instant-messengers/quaternion/default.nix
+++ b/pkgs/applications/networking/instant-messengers/quaternion/default.nix
@@ -1,36 +1,42 @@
 { stdenv, lib, fetchFromGitHub, qtbase, qtquickcontrols, cmake
-, qttools, libqmatrixclient }:
+, qttools, qtmultimedia
+, libqmatrixclient_0_4, libqmatrixclient_0_5 }:
 
-stdenv.mkDerivation rec {
-  name = "quaternion-${version}";
-  version = "0.0.9.3";
+let
+  generic = version: sha256: prefix: library: stdenv.mkDerivation rec {
+    name = "quaternion-${version}";
 
-  src = fetchFromGitHub {
-    owner  = "QMatrixClient";
-    repo   = "Quaternion";
-    rev    = "v${version}";
-    sha256 = "1hr9zqf301rg583n9jv256vzj7y57d8qgayk7c723bfknf1s6hh3";
-  };
+    src = fetchFromGitHub {
+      owner = "QMatrixClient";
+      repo  = "Quaternion";
+      rev   = "${prefix}${version}";
+      inherit sha256;
+    };
 
-  buildInputs = [ qtbase qtquickcontrols qttools libqmatrixclient ];
+    buildInputs = [ qtbase qtmultimedia qtquickcontrols qttools library ];
 
-  nativeBuildInputs = [ cmake ];
+    nativeBuildInputs = [ cmake ];
 
-  postInstall = if stdenv.isDarwin then ''
-    mkdir -p $out/Applications
-    mv $out/bin/quaternion.app $out/Applications
-    rmdir $out/bin || :
-  '' else ''
-    substituteInPlace $out/share/applications/quaternion.desktop \
-      --replace 'Exec=quaternion' "Exec=$out/bin/quaternion"
-  '';
+    postInstall = if stdenv.isDarwin then ''
+      mkdir -p $out/Applications
+      mv $out/bin/quaternion.app $out/Applications
+      rmdir $out/bin || :
+    '' else ''
+      substituteInPlace $out/share/applications/quaternion.desktop \
+        --replace 'Exec=quaternion' "Exec=$out/bin/quaternion"
+    '';
 
-  meta = with lib; {
-    description = "Cross-platform desktop IM client for the Matrix protocol";
-    homepage    = https://matrix.org/docs/projects/client/quaternion.html;
-    license     = licenses.gpl3;
-    maintainers = with maintainers; [ peterhoeg ];
-    inherit (qtbase.meta) platforms;
-    inherit version;
+    meta = with lib; {
+      description = "Cross-platform desktop IM client for the Matrix protocol";
+      homepage    = https://matrix.org/docs/projects/client/quaternion.html;
+      license     = licenses.gpl3;
+      maintainers = with maintainers; [ peterhoeg ];
+      inherit (qtbase.meta) platforms;
+      inherit version;
+    };
   };
+
+in rec {
+  quaternion     = generic "0.0.9.3"     "1hr9zqf301rg583n9jv256vzj7y57d8qgayk7c723bfknf1s6hh3" "v" libqmatrixclient_0_4;
+  quaternion-git = generic "0.0.9.4-rc3" "1fc3ya9fr3zw1cx7565s2rswzry98avslrryvdi0qa9yn0m3sw7p" ""  libqmatrixclient_0_5;
 }
diff --git a/pkgs/applications/office/kexi/default.nix b/pkgs/applications/office/kexi/default.nix
index 66fde2497e3f..784126ba3d87 100644
--- a/pkgs/applications/office/kexi/default.nix
+++ b/pkgs/applications/office/kexi/default.nix
@@ -9,12 +9,12 @@
 
 mkDerivation rec {
   pname = "kexi";
-  version = "3.1.0";
+  version = "3.2.0";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://kde/stable/${pname}/src/${name}.tar.xz";
-    sha256 = "1ysj44qq75wglw4d080l3gfw47695gapf29scxhb1g3py55csmbd";
+    sha256 = "1zy1q7q9rfdaws3rwf3my22ywkn6g747s3ixfcg9r80mm2g3z0bs";
   };
 
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
@@ -29,13 +29,6 @@ mkDerivation rec {
 
   propagatedUserEnvPkgs = [ kproperty ];
 
-  patches = [
-    (fetchpatch {
-      url = "https://phabricator.kde.org/file/data/6iwzltiifyqwjnzbvyo6/PHID-FILE-li4a7j35wkdkm2qdtnp4/D11503.diff";
-      sha256 = "0yj717m4x1zb4xjy1ayhz78xkxpawxgsvjgvf5iw81jnlr8absq9";
-    })
-  ];
-
   meta = with lib; {
     description = "A open source visual database applications creator, a long-awaited competitor for programs like MS Access or Filemaker";
     longDescription = ''
diff --git a/pkgs/applications/office/skrooge/default.nix b/pkgs/applications/office/skrooge/default.nix
index 9b417a8a5b63..eee6c7de4e5f 100644
--- a/pkgs/applications/office/skrooge/default.nix
+++ b/pkgs/applications/office/skrooge/default.nix
@@ -7,11 +7,11 @@
 
 mkDerivation rec {
   name = "skrooge-${version}";
-  version = "2.18.0";
+  version = "2.19.1";
 
   src = fetchurl {
     url = "http://download.kde.org/stable/skrooge/${name}.tar.xz";
-    sha256 = "00zk152clnmq8rjjnrxmd7lfflf2pnzljaw73bjjsb6r6vkxywa6";
+    sha256 = "04pajy540vwff1y84ndrnscvlggiwfkr6w65g4hpa75cg7m169ya";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix
index 7c32641e9c30..4111677ce455 100644
--- a/pkgs/applications/science/math/R/default.nix
+++ b/pkgs/applications/science/math/R/default.nix
@@ -108,6 +108,6 @@ stdenv.mkDerivation rec {
     platforms = platforms.all;
     hydraPlatforms = platforms.linux;
 
-    maintainers = [ maintainers.peti ];
+    maintainers = with maintainers; [ peti timokau ];
   };
 }
diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix
index b634625206a6..719626fe40a8 100644
--- a/pkgs/applications/virtualization/docker/default.nix
+++ b/pkgs/applications/virtualization/docker/default.nix
@@ -200,14 +200,14 @@ rec {
   # Get revisions from
   # https://github.com/docker/docker-ce/tree/v${version}/components/engine/hack/dockerfile/install/*
 
-  docker_18_09 = dockerGen rec {
-    version = "18.09.2";
-    rev = "62479626f213818ba5b4565105a05277308587d5"; # git commit
-    sha256 = "05kvpy1c4g661xfds6dfzb8r5q76ndblxjykfj06had18pv0xxd4";
-    runcRev = "09c8266bf2fcf9519a651b04ae54c967b9ab86ec";
-    runcSha256 = "08h45vs1f25byapqzy6x42r86m232z166v6z81gc2a3id8v0nzia";
-    containerdRev = "9754871865f7fe2f4e74d43e2fc7ccd237edcbce";
-    containerdSha256 = "065snv0s3v3z0ghadlii4w78qnhchcbx2kfdrvm8fk8gb4pkx1ya";
+  docker_18_09 = makeOverridable dockerGen {
+    version = "18.09.5";
+    rev = "e8ff056dbcfadaeca12a5f508b0cec281126c01d";
+    sha256 = "16nd9vg2286m6v47fjq2zicmfvi8vwiwn24yylxia8b9mk417kdb";
+    runcRev = "2b18fe1d885ee5083ef9f0838fee39b62d653e30";
+    runcSha256 = "0g0d9mh5fcvsjgddiyw98ph5zpz5ivlwy89m45jxwbzkxb21gy7w";
+    containerdRev = "bb71b10fd8f58240ca47fbb579b9d1028eea7c84";
+    containerdSha256 = "0npbzixf3c0jvzm159vygvkydrr8h36c9sq50yv0mdinrys2bvg0";
     tiniRev = "fec3683b971d9c3ef73f284f176672c44b448662";
     tiniSha256 = "1h20i3wwlbd8x4jr2gz68hgklh0lb0jj7y5xk1wvr8y58fip1rdn";
   };
diff --git a/pkgs/applications/window-managers/awesome/default.nix b/pkgs/applications/window-managers/awesome/default.nix
index 364771de80fd..fa86257a1a95 100644
--- a/pkgs/applications/window-managers/awesome/default.nix
+++ b/pkgs/applications/window-managers/awesome/default.nix
@@ -42,17 +42,17 @@ with luaPackages; stdenv.mkDerivation rec {
   cmakeFlags = "-DOVERRIDE_VERSION=${version}";
 
   GI_TYPELIB_PATH = "${pango.out}/lib/girepository-1.0";
+  # LUA_CPATH and LUA_PATH are used only for *building*, see the --search flags
+  # below for how awesome finds the libraries it needs at runtime.
   LUA_CPATH = "${lgi}/lib/lua/${lua.luaversion}/?.so";
-  LUA_PATH  = "?.lua;${lgi}/share/lua/${lua.luaversion}/?.lua;${lgi}/share/lua/${lua.luaversion}/lgi/?.lua";
+  LUA_PATH  = "${lgi}/share/lua/${lua.luaversion}/?.lua;;";
 
   postInstall = ''
     wrapProgram $out/bin/awesome \
       --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
       --add-flags '--search ${lgi}/lib/lua/${lua.luaversion}' \
       --add-flags '--search ${lgi}/share/lua/${lua.luaversion}' \
-      --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
-      --prefix LUA_PATH ';'  "${lgi}/share/lua/${lua.luaversion}/?.lua;${lgi}/share/lua/${lua.luaversion}/lgi/?.lua" \
-      --prefix LUA_CPATH ';' "${lgi}/lib/lua/${lua.luaversion}/?.so"
+      --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH"
 
     wrapProgram $out/bin/awesome-client \
       --prefix PATH : "${which}/bin"
diff --git a/pkgs/applications/window-managers/sway/default.nix b/pkgs/applications/window-managers/sway/default.nix
index ad06b1ee832c..3299811c4978 100644
--- a/pkgs/applications/window-managers/sway/default.nix
+++ b/pkgs/applications/window-managers/sway/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
       sha256 = "0r583nmqvq43ib93yv6flw8pj833v32lbs0q0xld56s3rnzvvdcp";
     })
     ./sway-config-no-nix-store-references.patch
+    ./load-configuration-from-etc.patch
   ];
 
   nativeBuildInputs = [ pkgconfig meson ninja scdoc ];
diff --git a/pkgs/applications/window-managers/sway/load-configuration-from-etc.patch b/pkgs/applications/window-managers/sway/load-configuration-from-etc.patch
new file mode 100644
index 000000000000..26a3d40d66cb
--- /dev/null
+++ b/pkgs/applications/window-managers/sway/load-configuration-from-etc.patch
@@ -0,0 +1,42 @@
+From 26f9c65ef037892977a824f0d7d7111066856b53 Mon Sep 17 00:00:00 2001
+From: Michael Weiss <dev.primeos@gmail.com>
+Date: Sat, 27 Apr 2019 14:26:16 +0200
+Subject: [PATCH] Load configs from /etc but fallback to /nix/store
+
+This change will load all configuration files from /etc, to make it easy
+to override them, but fallback to /nix/store/.../etc/sway/config to make
+Sway work out-of-the-box with the default configuration on non NixOS
+systems.
+---
+ meson.build   | 3 ++-
+ sway/config.c | 1 +
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 02b5d606..c03a9c0f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -129,7 +129,8 @@ if scdoc.found()
+ 	endforeach
+ endif
+ 
+-add_project_arguments('-DSYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c')
++add_project_arguments('-DSYSCONFDIR="/@0@"'.format(sysconfdir), language : 'c')
++add_project_arguments('-DNIX_SYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c')
+ 
+ version = '"@0@"'.format(meson.project_version())
+ if git.found()
+diff --git a/sway/config.c b/sway/config.c
+index 4cd21bbc..dd855753 100644
+--- a/sway/config.c
++++ b/sway/config.c
+@@ -317,6 +317,7 @@ static char *get_config_path(void) {
+ 		"$XDG_CONFIG_HOME/i3/config",
+ 		SYSCONFDIR "/sway/config",
+ 		SYSCONFDIR "/i3/config",
++		NIX_SYSCONFDIR "/sway/config",
+ 	};
+ 
+ 	char *config_home = getenv("XDG_CONFIG_HOME");
+-- 
+2.19.2
diff --git a/pkgs/build-support/appimage/default.nix b/pkgs/build-support/appimage/default.nix
index f0c0faa8cdab..c17274295c96 100644
--- a/pkgs/build-support/appimage/default.nix
+++ b/pkgs/build-support/appimage/default.nix
@@ -49,10 +49,12 @@ rec {
   } // (removeAttrs args (builtins.attrNames (builtins.functionArgs wrapAppImage))));
 
   wrapType1 = args@{ name, src, extraPkgs ? pkgs: [], ... }: wrapAppImage (args // {
+    inherit name extraPkgs;
     src = extractType1 { inherit name src; };
   });
 
   wrapType2 = args@{ name, src, extraPkgs ? pkgs: [], ... }: wrapAppImage (args // {
+    inherit name extraPkgs;
     src = extractType2 { inherit name src; };
   });
 
diff --git a/pkgs/desktops/gnome-3/core/mutter/3.28.nix b/pkgs/desktops/gnome-3/core/mutter/3.28.nix
index 30d082e07e29..9be383220e6e 100644
--- a/pkgs/desktops/gnome-3/core/mutter/3.28.nix
+++ b/pkgs/desktops/gnome-3/core/mutter/3.28.nix
@@ -1,5 +1,5 @@
 { fetchFromGitLab, stdenv, substituteAll, pkgconfig, gnome3, intltool, gobject-introspection, upower, cairo
-, glib, gtk3, pango, cogl, clutter, libstartup_notification, zenity, libcanberra-gtk3
+, glib, gtk3, pango, cogl, clutter, libstartup_notification, zenity, libcanberra-gtk3, fetchpatch
 , gsettings-desktop-schemas, gnome-desktop, wrapGAppsHook
 , libtool, makeWrapper, xkeyboard_config, libxkbfile, libxkbcommon, libXtst, libinput
 , geocode-glib, libgudev, libwacom, xwayland, autoreconfHook }:
@@ -21,6 +21,33 @@ stdenv.mkDerivation rec {
       src = ./fix-paths-328.patch;
       inherit zenity;
     })
+
+    # https://bugzilla.redhat.com/show_bug.cgi?id=1700337
+    # https://gitlab.gnome.org/GNOME/mutter/merge_requests/133
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/mutter328/raw/fff28bebda02111b4c534952465ff967ba7efced/f/0070-clutter-Add-API-to-retrieve-the-physical-size-of-abs.patch";
+      sha256 = "11xg0clrqwvssy2r6hv4iya8g87z2v5f47fimd2b4hha6ki3g1is";
+    })
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/mutter328/raw/fff28bebda02111b4c534952465ff967ba7efced/f/0071-backends-Add-MetaInputMapper.patch";
+      sha256 = "1kcp42hg8sy1q21w5586gdgmi95nf36829kkfswbah61h6bkb518";
+    })
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/mutter328/raw/fff28bebda02111b4c534952465ff967ba7efced/f/0072-backends-Delegate-on-MetaInputMapper-for-unmapped-di.patch";
+      sha256 = "0zf4yxhq5s3dnzmn15mx4yb978g27ij4vmq055my9p7xgh6h9ga8";
+    })
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/mutter328/raw/fff28bebda02111b4c534952465ff967ba7efced/f/0073-backends-Add-MetaInputMapper-method-to-lookup-device.patch";
+      sha256 = "0dnb2hqx5in6x9ar6wnr1hy3bg2wdcl3wbdx4jn66c7bi7s1k5zd";
+    })
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/mutter328/raw/fff28bebda02111b4c534952465ff967ba7efced/f/0074-backends-Turn-builtin-touchscreen-on-off-together-wi.patch";
+      sha256 = "17fvs7j5ws4sz6fkch93gjlik0nm4z426w4n348gyw5llh0r76pg";
+    })
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/mutter328/raw/fff28bebda02111b4c534952465ff967ba7efced/f/0075-backends-Update-to-new-output-setting-for-tablets-to.patch";
+      sha256 = "141p3an83s042f67fw2fqmr79i5g634ndrbpd8cs47fd4wwiwpj5";
+    })
   ];
 
   configureFlags = [
diff --git a/pkgs/desktops/gnustep/libobjc2/default.nix b/pkgs/desktops/gnustep/libobjc2/default.nix
index 3aba235b3a79..b238623eb09a 100644
--- a/pkgs/desktops/gnustep/libobjc2/default.nix
+++ b/pkgs/desktops/gnustep/libobjc2/default.nix
@@ -1,20 +1,17 @@
 { stdenv, lib, fetchFromGitHub, cmake }:
 
-let
-  version = "1.8.1";
-in
-
 stdenv.mkDerivation rec {
-  name = "libobjc2-${version}";
+  pname = "libobjc2";
+  version = "1.9";
 
   src = fetchFromGitHub {
     owner = "gnustep";
     repo = "libobjc2";
     rev = "v${version}";
-    sha256 = "12v9pjg97h56mb114cqd22q1pdwhmxrgdw5hal74ddlrhiq1nzvi";
+    sha256 = "00pscl3ly3rv6alf9vk70kxnnxq2rfgpc1ylcv6cgjs9jxdnrqmn";
   };
 
-  buildInputs = [ cmake ];
+  nativeBuildInputs = [ cmake ];
 
   cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ];
 
diff --git a/pkgs/desktops/mate/marco/default.nix b/pkgs/desktops/mate/marco/default.nix
index c9dfb37d7676..3719225fe8f7 100644
--- a/pkgs/desktops/mate/marco/default.nix
+++ b/pkgs/desktops/mate/marco/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "marco-${version}";
-  version = "1.22.0";
+  version = "1.22.1";
 
   src = fetchurl {
     url = "http://pub.mate-desktop.org/releases/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
-    sha256 = "1i1pi1z9mrb6564mxcwb93jqpdppfv58c2viwmicsixis62hv5wx";
+    sha256 = "1j7pvq8ndyl2x8jmh95sj69cnf0q9qsjn7lkr3jz6hk103mga82f";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/desktops/mate/mate-session-manager/default.nix b/pkgs/desktops/mate/mate-session-manager/default.nix
index 6fc18b887261..3448e8327f5b 100644
--- a/pkgs/desktops/mate/mate-session-manager/default.nix
+++ b/pkgs/desktops/mate/mate-session-manager/default.nix
@@ -5,11 +5,11 @@
 
 stdenv.mkDerivation rec {
   name = "mate-session-manager-${version}";
-  version = "1.22.0";
+  version = "1.22.1";
 
   src = fetchurl {
     url = "http://pub.mate-desktop.org/releases/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
-    sha256 = "1kpfmgay01gm74paaxccs3lim4jfb4hsm7i85jfdypr51985pwyj";
+    sha256 = "1ix8picxgc28m5zd0ww3zvzw6rz38wvzsrbqw28hghrfg926h6ig";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/desktops/mate/mate-system-monitor/default.nix b/pkgs/desktops/mate/mate-system-monitor/default.nix
index 9c496bfae60f..f7cdf036cebf 100644
--- a/pkgs/desktops/mate/mate-system-monitor/default.nix
+++ b/pkgs/desktops/mate/mate-system-monitor/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "mate-system-monitor-${version}";
-  version = "1.22.0";
+  version = "1.22.1";
 
   src = fetchurl {
     url = "http://pub.mate-desktop.org/releases/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
-    sha256 = "0rs0n5ivmvi355fp3ymcp1jj2sz9viw31475aw7zh7s1l7dn969x";
+    sha256 = "0yh1sh5snd7ivchh6l9rbn1s7ia4j5ihhzhqkyjnhr8ln59dvcbm";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/compilers/adoptopenjdk-bin/sources.json b/pkgs/development/compilers/adoptopenjdk-bin/sources.json
index 32ace2a817a0..03febb6aa355 100644
--- a/pkgs/development/compilers/adoptopenjdk-bin/sources.json
+++ b/pkgs/development/compilers/adoptopenjdk-bin/sources.json
@@ -5,7 +5,7 @@
         "hotspot": {
           "aarch64": {
             "build": "7",
-            "sha256": "ac367f3261fb53508c07f7eeb767b11ab53681b7613b81b6b7030c4db00b1aa8",
+            "sha256": "894a846600ddb0df474350037a2fb43e3343dc3606809a20c65e750580d8f2b9",
             "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.3_7.tar.gz",
             "version": "11.0.3"
           },
@@ -33,7 +33,7 @@
         "hotspot": {
           "aarch64": {
             "build": "7",
-            "sha256": "4af5b7d6678d03f2207029a7c610d81b1f016462c1dfcd8153a227b1df973a42",
+            "sha256": "de31fab70640c6d5099de5fc8fa8b4d6b484a7352fa48a9fafbdc088ca708564",
             "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.3_7.tar.gz",
             "version": "11.0.3"
           },
diff --git a/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
index 81f4ef3c7dba..d9ee5010f7cf 100644
--- a/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
@@ -2,13 +2,13 @@
 # jce download url: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
 import ./jdk-linux-base.nix {
   productVersion = "8";
-  patchVersion = "201";
-  buildVersion = "09";
-  sha256.i686-linux = "1f9n93zmkggchaxkchp4bqasvxznn96zjci34f52h7v392jkzqac";
-  sha256.x86_64-linux = "0w730v2q0iaxf2lprabwmy7129byrs0hhdbwas575p1xmk00qw6b";
-  sha256.armv7l-linux = "0y6bvq93lsf21v6ca536dpfhkk5ljsj7c6di0qzkban37bivj0si";
-  sha256.aarch64-linux = "1bybysgg9llqzllsmdszmmb73v5az2l1shxn6lxwv3wwiazpf47q";
-  releaseToken = "42970487e3af4f5aa5bca3f542482c60";
+  patchVersion = "211";
+  buildVersion = "12";
+  sha256.i686-linux = "0mdrljs0rw9s4pvaa3sn791nqgdrp8749z3qn80y7hhad74kvsnp";
+  sha256.x86_64-linux = "13b6qk4sn8jdhxa22na9d2aazm4yjh6yxrlxr189gxy3619y9dy0";
+  sha256.armv7l-linux = "1ij1x925k7lyp5f98gy8r0xfr41qhczf2rb74plwwmrccc1k00p5";
+  sha256.aarch64-linux = "041r615qj9qy34a9gxm8968qlmf060ba2as5w97v86mbik4rca05";
+  releaseToken = "478a62b7d4e34b78b671c754eaaf38ab";
   jceName = "jce_policy-8.zip";
   sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";
 }
diff --git a/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
index 0263bdde8d28..9fab02ab5361 100644
--- a/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
@@ -2,13 +2,13 @@
 # jce download url: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
 import ./jdk-linux-base.nix {
   productVersion = "8";
-  patchVersion = "202";
-  buildVersion = "09";
-  sha256.i686-linux = "19np392dwdqdq39lmm10607w2h042lrm5953fnsfh1bb9jli1pgj";
-  sha256.x86_64-linux = "1q4l8pymjvsvxfwaw0rdcnhryh1la2bvg5f4d4my41ka390k4p4s";
-  sha256.armv7l-linux = "06aljl7dqmmhmp7xswgvkcgh9mam71wnqydg9yb3hkcc443cm581";
-  sha256.aarch64-linux = "12v9ndv7a2c9zqq6ai2vsgwad0lzmf4c6jxy4p9miapmhjzx5vii";
-  releaseToken = "42970487e3af4f5aa5bca3f542482c60";
+  patchVersion = "212";
+  buildVersion = "10";
+  sha256.i686-linux = "03dj9q0bi3ib731f4zl9hylkrgw417h6qlg2wi7nw71b0fqhijn1";
+  sha256.x86_64-linux = "1yzddxzfh6h14bpzis1abp52x4jjljg8a3zyqz483q6qm05caq1i";
+  sha256.armv7l-linux = "0x333alkqdx8mmiirair7g5iiwif5v9ka4j3qr0f42ilvmk8csnx";
+  sha256.aarch64-linux = "0vcbdvcsl8rm47i07s93jmrrs5laibf937d8vacjqqgh9bbhsr2c";
+  releaseToken = "59066701cf1a433da9770636fbc4c9aa";
   jceName = "jce_policy-8.zip";
   sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";
 }
diff --git a/pkgs/development/compilers/sbcl/bootstrap.nix b/pkgs/development/compilers/sbcl/bootstrap.nix
index ee662d39e451..056ad7454600 100644
--- a/pkgs/development/compilers/sbcl/bootstrap.nix
+++ b/pkgs/development/compilers/sbcl/bootstrap.nix
@@ -3,9 +3,9 @@
 let
   options = rec {
     x86_64-darwin = rec {
-      version = "1.1.8";
+      version = "1.2.11";
       system = "x86-64-darwin";
-      sha256 = "006pr88053wclvbjfjdypnbiw8wymbzdzi7a6kbkpdfn4zf5943j";
+      sha256 = "0lh4gpvi8hl6g6b9321g5pwh8sk3218i7h4lx7p3vd9z0cf3lz85";
     };
     x86_64-linux = rec {
       version = "1.3.16";
diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index bca506169889..469d7847409f 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -10,11 +10,11 @@
 
 stdenv.mkDerivation rec {
   name    = "sbcl-${version}";
-  version = "1.5.0";
+  version = "1.5.1";
 
   src = fetchurl {
     url    = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
-    sha256 = "1a4c84b6qqi4w4l1zzhnhnywk73j3wb0gjgghzcw0h5syqbqzy8z";
+    sha256 = "08z62qba0kmm15k93s2rq7ipi769895g8iwigcp20qjh6amwnwph";
   };
 
   buildInputs = [texinfo];
diff --git a/pkgs/development/idris-modules/glfw.nix b/pkgs/development/idris-modules/glfw.nix
index 535f549a5ebe..882058bb1856 100644
--- a/pkgs/development/idris-modules/glfw.nix
+++ b/pkgs/development/idris-modules/glfw.nix
@@ -10,8 +10,14 @@ build-idris-package  {
 
   idrisDeps = [ effects ];
 
+  nativeBuildInputs = [ pkgs.pkgconfig ];
   extraBuildInputs = [ pkgs.glfw ];
 
+  postPatch = ''
+    substituteInPlace src/MakefileGlfw \
+      --replace glfw3 "glfw3 gl"
+  '';
+
   src = fetchFromGitHub {
     owner = "eckart";
     repo = "glfw-idris";
diff --git a/pkgs/development/idris-modules/idris-wrapper.nix b/pkgs/development/idris-modules/idris-wrapper.nix
index f395bcd95d7c..4e1d2f9c82eb 100644
--- a/pkgs/development/idris-modules/idris-wrapper.nix
+++ b/pkgs/development/idris-modules/idris-wrapper.nix
@@ -1,4 +1,4 @@
-{ lib, symlinkJoin, makeWrapper, idris-no-deps, gcc, gmp }:
+{ stdenv, lib, symlinkJoin, makeWrapper, idris-no-deps, gmp }:
 
 symlinkJoin {
   inherit (idris-no-deps) name src meta;
@@ -6,7 +6,9 @@ symlinkJoin {
   buildInputs = [ makeWrapper ];
   postBuild = ''
     wrapProgram $out/bin/idris \
-      --run 'export IDRIS_CC=''${IDRIS_CC:-${lib.getBin gcc}/bin/gcc}' \
-      --suffix LIBRARY_PATH : ${lib.makeLibraryPath [ gmp ]}
+      --run 'export IDRIS_CC=''${IDRIS_CC:-${stdenv.cc}/bin/cc}' \
+      --set NIX_CC_WRAPPER_${stdenv.cc.infixSalt}_TARGET_HOST 1 \
+      --prefix NIX_CFLAGS_COMPILE " " "-I${lib.getDev gmp}/include" \
+      --prefix NIX_CFLAGS_LINK " " "-L${lib.getLib gmp}/lib"
   '';
 }
diff --git a/pkgs/development/interpreters/lua-5/default.nix b/pkgs/development/interpreters/lua-5/default.nix
index efa5d1c2d5a0..fb709227180f 100644
--- a/pkgs/development/interpreters/lua-5/default.nix
+++ b/pkgs/development/interpreters/lua-5/default.nix
@@ -15,11 +15,10 @@ let
 
 in rec {
 
-  lua5_3 = (callPackage ./interpreter.nix {
+  lua5_3 = callPackage ./interpreter.nix {
     sourceVersion = { major = "5"; minor = "3"; patch = "5"; };
     hash = "0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac";
     patches = lib.optionals stdenv.isDarwin [ ./5.2.darwin.patch ] ;
-  }).overrideAttrs( oa: {
     postConfigure = lib.optionalString (!stdenv.isDarwin) ''
       cat ${./lua-5.3-dso.make} >> src/Makefile
       sed -e 's/ALL_T *= */& $(LUA_SO)/' -i src/Makefile
@@ -28,7 +27,7 @@ in rec {
     postBuild = stdenv.lib.optionalString (!stdenv.isDarwin) ''
       ( cd src; make $makeFlags "''${makeFlagsArray[@]}" liblua.so )
     '';
-  });
+  };
 
   lua5_3_compat = lua5_3.override({
     compat = true;
diff --git a/pkgs/development/interpreters/lua-5/interpreter.nix b/pkgs/development/interpreters/lua-5/interpreter.nix
index 29e1e4cf21c8..26db917c9002 100644
--- a/pkgs/development/interpreters/lua-5/interpreter.nix
+++ b/pkgs/development/interpreters/lua-5/interpreter.nix
@@ -5,6 +5,8 @@
 , sourceVersion
 , hash
 , patches ? []
+, postConfigure ? null
+, postBuild ? null
 }:
 let
 luaPackages = callPackage ../../lua-modules {lua=self; overrides=packageOverrides;};
@@ -52,6 +54,9 @@ self = stdenv.mkDerivation rec {
 
     runHook postConfigure
   '';
+  inherit postConfigure;
+
+  inherit postBuild;
 
   postInstall = ''
     mkdir -p "$out/share/doc/lua" "$out/lib/pkgconfig"
diff --git a/pkgs/development/interpreters/python/cpython/docs/2.7-html.nix b/pkgs/development/interpreters/python/cpython/docs/2.7-html.nix
index 7727b984d969..73d1e0ea9fd7 100644
--- a/pkgs/development/interpreters/python/cpython/docs/2.7-html.nix
+++ b/pkgs/development/interpreters/python/cpython/docs/2.7-html.nix
@@ -3,10 +3,10 @@
 { stdenv, fetchurl, lib }:
 
 stdenv.mkDerivation rec {
-  name = "python27-docs-html-2.7.3";
+  name = "python27-docs-html-2.7.16";
   src = fetchurl {
-    url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-html.tar.bz2;
-    sha256 = "1hg92n0mzl9w6j33b2h0bf2vy6fsxnpxfdc3qw760vcm0y00155j";
+    url = http://docs.python.org/ftp/python/doc/2.7.16/python-2.7.16-docs-html.tar.bz2;
+    sha256 = "1razs1grzhai65ihaiyph8kz6ncjkgp1gsn3c8v7kanf13lqim02";
   };
   installPhase = ''
     mkdir -p $out/share/doc/python27
diff --git a/pkgs/development/interpreters/python/cpython/docs/2.7-pdf-a4.nix b/pkgs/development/interpreters/python/cpython/docs/2.7-pdf-a4.nix
index 0c9673b7d7a9..54c0954ae5d0 100644
--- a/pkgs/development/interpreters/python/cpython/docs/2.7-pdf-a4.nix
+++ b/pkgs/development/interpreters/python/cpython/docs/2.7-pdf-a4.nix
@@ -3,10 +3,10 @@
 { stdenv, fetchurl, lib }:
 
 stdenv.mkDerivation rec {
-  name = "python27-docs-pdf-a4-2.7.3";
+  name = "python27-docs-pdf-a4-2.7.16";
   src = fetchurl {
-    url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-pdf-a4.tar.bz2;
-    sha256 = "13da88panq5b6qfhf8k4dgqgxkg4ydcac5cx69a3f35s1w90xdjr";
+    url = http://docs.python.org/ftp/python/doc/2.7.16/python-2.7.16-docs-pdf-a4.tar.bz2;
+    sha256 = "14ml1ynrlbhg43737bdsb8k5y39wsffqj4iwhylhb8n8l5dplfdq";
   };
   installPhase = ''
     mkdir -p $out/share/doc/python27
diff --git a/pkgs/development/interpreters/python/cpython/docs/2.7-pdf-letter.nix b/pkgs/development/interpreters/python/cpython/docs/2.7-pdf-letter.nix
index 9b0018e7cd78..059908029c0b 100644
--- a/pkgs/development/interpreters/python/cpython/docs/2.7-pdf-letter.nix
+++ b/pkgs/development/interpreters/python/cpython/docs/2.7-pdf-letter.nix
@@ -3,10 +3,10 @@
 { stdenv, fetchurl, lib }:
 
 stdenv.mkDerivation rec {
-  name = "python27-docs-pdf-letter-2.7.3";
+  name = "python27-docs-pdf-letter-2.7.16";
   src = fetchurl {
-    url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-pdf-letter.tar.bz2;
-    sha256 = "0x41phsdrpivhzkchswsliyx3a10n7gzc9irkrw6rz22j81bfydg";
+    url = http://docs.python.org/ftp/python/doc/2.7.16/python-2.7.16-docs-pdf-letter.tar.bz2;
+    sha256 = "019i8n48m71mn31v8d85kkwyqfgcgqnqh506y4a7fcgf656bajs0";
   };
   installPhase = ''
     mkdir -p $out/share/doc/python27
diff --git a/pkgs/development/interpreters/python/cpython/docs/2.7-text.nix b/pkgs/development/interpreters/python/cpython/docs/2.7-text.nix
index b7bcfb51d29a..53c5aa3b629b 100644
--- a/pkgs/development/interpreters/python/cpython/docs/2.7-text.nix
+++ b/pkgs/development/interpreters/python/cpython/docs/2.7-text.nix
@@ -3,10 +3,10 @@
 { stdenv, fetchurl, lib }:
 
 stdenv.mkDerivation rec {
-  name = "python27-docs-text-2.7.3";
+  name = "python27-docs-text-2.7.16";
   src = fetchurl {
-    url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-text.tar.bz2;
-    sha256 = "1rxlb3jhh3892y65i45nk1y2lx981fr22a5hmfkp9gvjvdykjnzp";
+    url = http://docs.python.org/ftp/python/doc/2.7.16/python-2.7.16-docs-text.tar.bz2;
+    sha256 = "1da7swlykvc013684nywycinfz3v8dqkcmv0zj8p7l5lyi5mq03r";
   };
   installPhase = ''
     mkdir -p $out/share/doc/python27
diff --git a/pkgs/development/interpreters/python/cpython/docs/3.7-html.nix b/pkgs/development/interpreters/python/cpython/docs/3.7-html.nix
new file mode 100644
index 000000000000..5a6dcc63225e
--- /dev/null
+++ b/pkgs/development/interpreters/python/cpython/docs/3.7-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python37-docs-html-3.7.2";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.7.2/python-3.7.2-docs-html.tar.bz2;
+    sha256 = "19wbrawpdam09fmyipfy92sxwn1rl93v8jkfqsfx028qhvzf0422";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python37
+    cp -R ./ $out/share/doc/python37/html
+  '';
+  meta = {
+    maintainers = [ ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/cpython/docs/3.7-pdf-a4.nix b/pkgs/development/interpreters/python/cpython/docs/3.7-pdf-a4.nix
new file mode 100644
index 000000000000..a122d7519f5d
--- /dev/null
+++ b/pkgs/development/interpreters/python/cpython/docs/3.7-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python37-docs-pdf-a4-3.7.2";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.7.2/python-3.7.2-docs-pdf-a4.tar.bz2;
+    sha256 = "0vdx762m30hjaabn6w88awcj2qpbz0b6z59zn9wmamd35k59lfba";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python37
+    cp -R ./ $out/share/doc/python37/pdf-a4
+  '';
+  meta = {
+    maintainers = [ ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/cpython/docs/3.7-pdf-letter.nix b/pkgs/development/interpreters/python/cpython/docs/3.7-pdf-letter.nix
new file mode 100644
index 000000000000..4473f2e351c4
--- /dev/null
+++ b/pkgs/development/interpreters/python/cpython/docs/3.7-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python37-docs-pdf-letter-3.7.2";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.7.2/python-3.7.2-docs-pdf-letter.tar.bz2;
+    sha256 = "17g57vlyvqx0k916q84q2pcx7y8myw0fda9fvg9kh0ph930c837x";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python37
+    cp -R ./ $out/share/doc/python37/pdf-letter
+  '';
+  meta = {
+    maintainers = [ ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/cpython/docs/3.7-text.nix b/pkgs/development/interpreters/python/cpython/docs/3.7-text.nix
new file mode 100644
index 000000000000..d9d21bfe3a57
--- /dev/null
+++ b/pkgs/development/interpreters/python/cpython/docs/3.7-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python37-docs-text-3.7.2";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.7.2/python-3.7.2-docs-text.tar.bz2;
+    sha256 = "0h50rlr8jclwfxa106b42q2vn2ynp219c4zsy5qz65n5m3b7y1g2";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python37
+    cp -R ./ $out/share/doc/python37/text
+  '';
+  meta = {
+    maintainers = [ ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/cpython/docs/default.nix b/pkgs/development/interpreters/python/cpython/docs/default.nix
index 60e0a0bf1e6e..a538f731473b 100644
--- a/pkgs/development/interpreters/python/cpython/docs/default.nix
+++ b/pkgs/development/interpreters/python/cpython/docs/default.nix
@@ -7,23 +7,35 @@ pythonDocs = {
     python27 = import ./2.7-html.nix {
       inherit stdenv fetchurl lib;
     };
+    python37 = import ./3.7-html.nix {
+      inherit stdenv fetchurl lib;
+    };
   };
   pdf_a4 = {
     recurseForDerivations = true;
     python27 = import ./2.7-pdf-a4.nix {
       inherit stdenv fetchurl lib;
     };
+    python37 = import ./3.7-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
   };
   pdf_letter = {
     recurseForDerivations = true;
     python27 = import ./2.7-pdf-letter.nix {
       inherit stdenv fetchurl lib;
     };
+    python37 = import ./3.7-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
   };
   text = {
     recurseForDerivations = true;
     python27 = import ./2.7-text.nix {
       inherit stdenv fetchurl lib;
     };
+    python37 = import ./3.7-text.nix {
+      inherit stdenv fetchurl lib;
+    };
   };
 }; in pythonDocs
diff --git a/pkgs/development/interpreters/python/cpython/docs/generate.sh b/pkgs/development/interpreters/python/cpython/docs/generate.sh
index bebefc10ccd0..a4b2e0893fcd 100755
--- a/pkgs/development/interpreters/python/cpython/docs/generate.sh
+++ b/pkgs/development/interpreters/python/cpython/docs/generate.sh
@@ -2,7 +2,7 @@
 
 TYPES="html pdf-a4 pdf-letter text"
 URL=http://docs.python.org/ftp/python/doc/VERSION/python-VERSION-docs-TYPE.tar.bz2
-VERSIONS=$(curl http://www.python.org/download/releases/ 2>/dev/null | grep "releases/[123456789]"| cut -d/ -f4 |grep -v "^[12].[012345]" |grep -v "^1.6.1")
+VERSIONS=$(for major in 2 3; do curl https://docs.python.org/$major/archives/ 2>/dev/null | perl -l -n -e'/<a href="python-([23].[0-9].[0-9]+)-docs-html.tar.bz2/ && print $1' | tail -n 1; done)
 echo "Generating expressions for:
 ${VERSIONS}
 "
diff --git a/pkgs/development/libraries/accountsservice/default.nix b/pkgs/development/libraries/accountsservice/default.nix
index b42240a26c4e..c20167138b72 100644
--- a/pkgs/development/libraries/accountsservice/default.nix
+++ b/pkgs/development/libraries/accountsservice/default.nix
@@ -4,11 +4,11 @@
 
 stdenv.mkDerivation rec {
   name = "accountsservice-${version}";
-  version = "0.6.54";
+  version = "0.6.55";
 
   src = fetchurl {
     url = "https://www.freedesktop.org/software/accountsservice/accountsservice-${version}.tar.xz";
-    sha256 = "1b115n0a4yfa06kgxc69qfc1rc0w4frgs3id3029czkrhhn0ds96";
+    sha256 = "16wwd633jak9ajyr1f1h047rmd09fhf3kzjz6g5xjsz0lwcj8azz";
   };
 
   nativeBuildInputs = [ pkgconfig makeWrapper meson ninja python3 ];
diff --git a/pkgs/development/libraries/accountsservice/no-create-dirs.patch b/pkgs/development/libraries/accountsservice/no-create-dirs.patch
index ef1a59b0249f..0333f925d267 100644
--- a/pkgs/development/libraries/accountsservice/no-create-dirs.patch
+++ b/pkgs/development/libraries/accountsservice/no-create-dirs.patch
@@ -1,15 +1,15 @@
 diff --git a/meson_post_install.py b/meson_post_install.py
-index ba95055..17f7926 100644
+index 5cc2dc4..dd27ad5 100644
 --- a/meson_post_install.py
 +++ b/meson_post_install.py
 @@ -9,8 +9,8 @@ localstatedir = os.path.normpath(destdir + os.sep + sys.argv[1])
  # FIXME: meson will not track the creation of these directories
  #        https://github.com/mesonbuild/meson/blob/master/mesonbuild/scripts/uninstall.py#L39
  dst_dirs = [
--  os.path.join(localstatedir, 'lib', 'AccountsService', 'icons'),
--  os.path.join(localstatedir, 'lib', 'AccountsService', 'users'),
-+  #os.path.join(localstatedir, 'lib', 'AccountsService', 'icons'),
-+  #os.path.join(localstatedir, 'lib', 'AccountsService', 'users'),
+-  (os.path.join(localstatedir, 'lib', 'AccountsService', 'icons'), 0o775),
+-  (os.path.join(localstatedir, 'lib', 'AccountsService', 'users'), 0o700),
++#  (os.path.join(localstatedir, 'lib', 'AccountsService', 'icons'), 0o775),
++#  (os.path.join(localstatedir, 'lib', 'AccountsService', 'users'), 0o700),
  ]
  
- for dst_dir in dst_dirs:
+ for (dst_dir, dst_dir_mode) in dst_dirs:
diff --git a/pkgs/development/libraries/kproperty/default.nix b/pkgs/development/libraries/kproperty/default.nix
index 455fb5a711c0..c49402b74e86 100644
--- a/pkgs/development/libraries/kproperty/default.nix
+++ b/pkgs/development/libraries/kproperty/default.nix
@@ -7,12 +7,12 @@
 
 mkDerivation rec {
   pname = "kproperty";
-  version = "3.1.0";
+  version = "3.2.0";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://kde/stable/${pname}/src/${name}.tar.xz";
-    sha256 = "18qlwp7ajpx16bd0lfzqfx8y9cbrs8k4nax3cr30wj5sd3l8xpky";
+    sha256 = "1yldfsdamk4dag8dyryjn5n9j2pzi42s79kkafymfnbifhnhrbv7";
   };
 
   nativeBuildInputs = [ extra-cmake-modules ];
diff --git a/pkgs/development/libraries/kreport/default.nix b/pkgs/development/libraries/kreport/default.nix
index 256989992c5a..fc9c77e8fd61 100644
--- a/pkgs/development/libraries/kreport/default.nix
+++ b/pkgs/development/libraries/kreport/default.nix
@@ -6,12 +6,12 @@
 
 mkDerivation rec {
   pname = "kreport";
-  version = "3.1.0";
+  version = "3.2.0";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://kde/stable/${pname}/src/${name}.tar.xz";
-    sha256 = "0v7krpfx0isij9wzwam28fqn039i4wcznbplvnvl6hsykdi8ar1v";
+    sha256 = "1mycsvkz5rphi9df2i4ch4ykvprd4m76acsdzs3zis2ljrqnsw92";
   };
 
   nativeBuildInputs = [ extra-cmake-modules ];
diff --git a/pkgs/development/libraries/libqmatrixclient/default.nix b/pkgs/development/libraries/libqmatrixclient/default.nix
index 160ce9fcabf6..a81e4ff07803 100644
--- a/pkgs/development/libraries/libqmatrixclient/default.nix
+++ b/pkgs/development/libraries/libqmatrixclient/default.nix
@@ -1,26 +1,32 @@
 { stdenv, fetchFromGitHub, cmake
-, qtbase }:
+, qtbase, qtmultimedia }:
 
-stdenv.mkDerivation rec {
-  name = "libqmatrixclient-${version}";
-  version = "0.4.2.1";
+let
+  generic = version: sha256: prefix: stdenv.mkDerivation rec {
+    name = "libqmatrixclient-${version}";
 
-  src = fetchFromGitHub {
-    owner  = "QMatrixClient";
-    repo   = "libqmatrixclient";
-    rev    = "v${version}";
-    sha256 = "056hvp2m74wx72yd8vai18siddj9l8bhrvrkc4ia4cwjsqw02kid";
-  };
+    src = fetchFromGitHub {
+      owner = "QMatrixClient";
+      repo  = "libqmatrixclient";
+      rev   = "${prefix}${version}";
+      inherit sha256;
+    };
 
-  buildInputs = [ qtbase ];
+    buildInputs = [ qtbase qtmultimedia ];
 
-  nativeBuildInputs = [ cmake ];
+    nativeBuildInputs = [ cmake ];
 
-  meta = with stdenv.lib; {
-    description= "A Qt5 library to write cross-platfrom clients for Matrix";
-    homepage = https://matrix.org/docs/projects/sdk/libqmatrixclient.html;
-    license = licenses.lgpl21;
-    platforms = with platforms; linux ++ darwin;
-    maintainers = with maintainers; [ peterhoeg ];
+    meta = with stdenv.lib; {
+      description= "A Qt5 library to write cross-platfrom clients for Matrix";
+      homepage = https://matrix.org/docs/projects/sdk/libqmatrixclient.html;
+      license = licenses.lgpl21;
+      platforms = with platforms; linux ++ darwin;
+      maintainers = with maintainers; [ peterhoeg ];
+    };
   };
+
+in rec {
+  libqmatrixclient_0_4 = generic "0.4.2.1" "056hvp2m74wx72yd8vai18siddj9l8bhrvrkc4ia4cwjsqw02kid" "v";
+  libqmatrixclient_0_5 = generic "0.5.1.2" "0vvpm1vlqfvhgfvavifrj4998g8v33hp5xjf0n8zfsmg4lxlnfg1" "";
+  libqmatrixclient = libqmatrixclient_0_4;
 }
diff --git a/pkgs/development/libraries/qca-qt5/default.nix b/pkgs/development/libraries/qca-qt5/default.nix
index 6e190a656f63..79b105a2d1c8 100644
--- a/pkgs/development/libraries/qca-qt5/default.nix
+++ b/pkgs/development/libraries/qca-qt5/default.nix
@@ -1,11 +1,12 @@
 { stdenv, fetchurl, cmake, openssl, pkgconfig, qtbase }:
 
 stdenv.mkDerivation rec {
-  name = "qca-qt5-2.1.3";
+  pname = "qca-qt5";
+  version = "2.2.1";
 
   src = fetchurl {
-    url = "http://download.kde.org/stable/qca/2.1.3/src/qca-2.1.3.tar.xz";
-    sha256 = "0lz3n652z208daxypdcxiybl0a9fnn6ida0q7fh5f42269mdhgq0";
+    url = "http://download.kde.org/stable/qca/${version}/qca-${version}.tar.xz";
+    sha256 = "00kv1vsrc8fp556hm8s6yw3240vx3l4067q6vfxrb3gdwgcd45np";
   };
 
   buildInputs = [ openssl qtbase ];
diff --git a/pkgs/development/libraries/qca-qt5/move-project.patch b/pkgs/development/libraries/qca-qt5/move-project.patch
index 2a109a3aa3c7..dcecb83d7db9 100644
--- a/pkgs/development/libraries/qca-qt5/move-project.patch
+++ b/pkgs/development/libraries/qca-qt5/move-project.patch
@@ -1,19 +1,17 @@
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 453fd8a..5f6ee11 100644
+index 2f2b5d0..971dee3 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -6,13 +6,13 @@ if(NOT CMAKE_INSTALL_PREFIX)
+@@ -6,10 +6,11 @@ if(NOT CMAKE_INSTALL_PREFIX)
    unset(CMAKE_INSTALL_PREFIX CACHE)
  endif(NOT CMAKE_INSTALL_PREFIX)
-
+ 
 -project(qca)
-
- if(NOT APPLE)
-   cmake_minimum_required(VERSION 2.8.12)
- else()
-   cmake_minimum_required(VERSION 3.0)
- endif()
+ 
+ cmake_minimum_required(VERSION 3.4)
+ 
 +project(qca)
-
++
  set(QCA_LIB_MAJOR_VERSION "2")
- set(QCA_LIB_MINOR_VERSION "1")
+ set(QCA_LIB_MINOR_VERSION "2")
+ set(QCA_LIB_PATCH_VERSION "1")
diff --git a/pkgs/development/tools/coursier/default.nix b/pkgs/development/tools/coursier/default.nix
index bd9dbbb71742..07763e3fa68c 100644
--- a/pkgs/development/tools/coursier/default.nix
+++ b/pkgs/development/tools/coursier/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "coursier-${version}";
-  version = "1.1.0-M10";
+  version = "1.1.0-M14-1";
 
   src = fetchurl {
-    url = "https://github.com/coursier/coursier/raw/v${version}/coursier";
-    sha256 = "14iq0717vdm0mj0196idc724vmxp1y0f3gfn41sbqahfhvcx05y8";
+    url = "https://github.com/coursier/coursier/releases/download/v${version}/coursier";
+    sha256 = "0km9bxhch2bh7v6yi5jzyvq95fwdmccwqmbiznzhz4iqij8y066w";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/development/tools/electron/5.x.nix b/pkgs/development/tools/electron/5.x.nix
new file mode 100644
index 000000000000..ba97587c5af7
--- /dev/null
+++ b/pkgs/development/tools/electron/5.x.nix
@@ -0,0 +1,77 @@
+{ stdenv, libXScrnSaver, makeWrapper, fetchurl, unzip, atomEnv, libuuid, at-spi2-atk, at-spi2-core }:
+
+let
+  version = "5.0.0";
+  name = "electron-${version}";
+
+  throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
+
+  meta = with stdenv.lib; {
+    description = "Cross platform desktop application shell";
+    homepage = https://github.com/electron/electron;
+    license = licenses.mit;
+    maintainers = with maintainers; [ travisbhartwell manveru ];
+    platforms = [ "x86_64-darwin" "x86_64-linux" "i686-linux" "armv7l-linux" "aarch64-linux" ];
+  };
+
+  linux = {
+    inherit name version meta;
+    src = {
+      i686-linux = fetchurl {
+        url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-ia32.zip";
+        sha256 = "01320qv0x18rmjn6ibbs49pd04d58rz5dac509lxxay8nfb14gdp";
+      };
+      x86_64-linux = fetchurl {
+        url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip";
+        sha256 = "0mkc8r5xggkzdypyq4hxigmjl6d1jn0139l8nwj1vr224ggnskhn";
+      };
+      armv7l-linux = fetchurl {
+        url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-armv7l.zip";
+        sha256 = "1w767yxm3b6sj52z0wnzr4vfn0m8n2jdjhj3ksmq6qrv401vvib3";
+      };
+      aarch64-linux = fetchurl {
+        url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip";
+        sha256 = "1nvpfkrizkmr6xxb2ls19p9mhgpms65ws09bx3l8sqq6275916jk";
+      };
+    }.${stdenv.hostPlatform.system} or throwSystem;
+
+    buildInputs = [ unzip makeWrapper ];
+
+    buildCommand = ''
+      mkdir -p $out/lib/electron $out/bin
+      unzip -d $out/lib/electron $src
+      ln -s $out/lib/electron/electron $out/bin
+
+      fixupPhase
+
+      patchelf \
+        --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+        --set-rpath "${atomEnv.libPath}:${stdenv.lib.makeLibraryPath [ libuuid at-spi2-atk at-spi2-core ]}:$out/lib/electron" \
+        $out/lib/electron/electron
+
+      wrapProgram $out/lib/electron/electron \
+        --prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1
+    '';
+  };
+
+  darwin = {
+    inherit name version meta;
+
+    src = fetchurl {
+      url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-x64.zip";
+      sha256 = "07s2cq4ffpx86pjxrh1hcvk3r85saxqi3kkbbfkg9r1bbq8zbapm";
+    };
+
+    buildInputs = [ unzip ];
+
+    buildCommand = ''
+      mkdir -p $out/Applications
+      unzip $src
+      mv Electron.app $out/Applications
+      mkdir -p $out/bin
+      ln -s $out/Applications/Electron.app/Contents/MacOs/Electron $out/bin/electron
+    '';
+  };
+in
+
+  stdenv.mkDerivation (if stdenv.isDarwin then darwin else linux)
diff --git a/pkgs/servers/dico/default.nix b/pkgs/servers/dico/default.nix
index d64f59158815..d2a6dc9df157 100644
--- a/pkgs/servers/dico/default.nix
+++ b/pkgs/servers/dico/default.nix
@@ -2,25 +2,20 @@
 , guile, python, pcre, libffi, groff }:
 
 stdenv.mkDerivation rec {
-  name = "dico-2.7";
+  pname = "dico";
+  version = "2.9";
 
   src = fetchurl {
-    url = "mirror://gnu/dico/${name}.tar.xz";
-    sha256 = "0dg4aacnmlf3ljssd7dwh8z5644xzq8k1501mbsx8nz8p8a9mbsq";
+    url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
+    sha256 = "0i9xqhy3h5nlizcmav4mv5ay8ivdgn4l4k0k7fxix3fsc87nijyr";
   };
 
   hardeningDisable = [ "format" ];
 
-  # XXX: Add support for GNU SASL.
   buildInputs =
     [ libtool gettext zlib readline gsasl guile python pcre libffi groff ];
 
-  # dicod fails to load modules, so the tests fail
-  doCheck = false;
-
-  preBuild = ''
-    sed -i -e '/gets is a security/d' gnu/stdio.in.h
-  '';
+  doCheck = true;
 
   meta = with stdenv.lib; {
     description = "Flexible dictionary server and client implementing RFC 2229";
diff --git a/pkgs/servers/dns/bind/default.nix b/pkgs/servers/dns/bind/default.nix
index 683eacee61a3..068834140048 100644
--- a/pkgs/servers/dns/bind/default.nix
+++ b/pkgs/servers/dns/bind/default.nix
@@ -1,4 +1,4 @@
-{ config, stdenv, lib, fetchurl
+{ config, stdenv, lib, fetchurl, fetchpatch
 , perl
 , libcap, libtool, libxml2, openssl
 , enablePython ? config.bind.enablePython or false, python3 ? null
@@ -21,6 +21,16 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ];
 
   patches = [ ./dont-keep-configure-flags.patch ./remove-mkdir-var.patch ] ++
+    [
+      # Workaround for missing atomic operations on aarch64. Upstream added the
+      # below patch after the release. Can probably be dropped with the next
+      # version.
+      (fetchpatch {
+        name = "client-atomics-as-refcount.patch";
+        url = https://gitlab.isc.org/isc-projects/bind9/commit/d72f436b7d7c697b262968c48c2d7643069ab17f.diff;
+        sha256 = "0sidlab9wcv21751fbq3h9m4wy6hk7frag9ar2jndw8rn3axr2qy";
+      })
+    ] ++
     stdenv.lib.optional stdenv.isDarwin ./darwin-openssl-linking-fix.patch;
 
   nativeBuildInputs = [ perl ];
diff --git a/pkgs/servers/documize-community/default.nix b/pkgs/servers/documize-community/default.nix
index 4f1a420c9109..2df905463117 100644
--- a/pkgs/servers/documize-community/default.nix
+++ b/pkgs/servers/documize-community/default.nix
@@ -2,13 +2,13 @@
 
 buildGoPackage rec {
   pname = "documize-community";
-  version = "2.2.1";
+  version = "2.4.1";
 
   src = fetchFromGitHub {
     owner = "documize";
     repo = "community";
     rev = "v${version}";
-    sha256 = "09s5js0zb3mh3g5qz8f3l2cqjn01kjb35kinfv932nf2rfyrmyqz";
+    sha256 = "1spj8awyv37gmrm49py3wz7590r7rz63qizgifdzjbvacadavm0c";
   };
 
   goPackagePath = "github.com/documize/community";
@@ -37,7 +37,7 @@ buildGoPackage rec {
   meta = with lib; {
     description = "Open source Confluence alternative for internal & external docs built with Golang + EmberJS";
     license = licenses.agpl3;
-    maintainers = with maintainers; [ ma27 ];
+    maintainers = with maintainers; [ ma27 elseym ];
     homepage = https://www.documize.com/;
   };
 }
diff --git a/pkgs/servers/jellyfin/default.nix b/pkgs/servers/jellyfin/default.nix
index d429da78a32f..f92314b2123a 100644
--- a/pkgs/servers/jellyfin/default.nix
+++ b/pkgs/servers/jellyfin/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   pname = "jellyfin";
-  version = "10.3.0";
+  version = "10.3.1";
 
   # Impossible to build anything offline with dotnet
   src = fetchurl {
     url = "https://github.com/jellyfin/jellyfin/releases/download/v${version}/jellyfin_${version}_portable.tar.gz";
-    sha256 = "1q9rvyza5zi1kqg9301zrd0fnxzdwknyagpjc9r1cpqfx3yasnkc";
+    sha256 = "1j6jyrbc0ha348y63wk5jv9wjcjydma9cr3jxva1y85pjrmm7z90";
   };
 
   buildInputs = [
@@ -37,6 +37,6 @@ stdenv.mkDerivation rec {
     description = "The Free Software Media System";
     homepage = https://jellyfin.github.io/;
     license = licenses.gpl2;
-    maintainers = with maintainers; [ nyanloutre ];
+    maintainers = with maintainers; [ nyanloutre minijackson ];
   };
 }
diff --git a/pkgs/tools/X11/xlayoutdisplay/default.nix b/pkgs/tools/X11/xlayoutdisplay/default.nix
index 5983cd3e663a..30903e448563 100644
--- a/pkgs/tools/X11/xlayoutdisplay/default.nix
+++ b/pkgs/tools/X11/xlayoutdisplay/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchFromGitHub, xorg, boost, cmake, gtest }:
 
 stdenv.mkDerivation rec {
-  name = "xlayoutdisplay-${version}";
-  version = "1.0.2";
+  pname = "xlayoutdisplay";
+  version = "1.1.0";
 
   src = fetchFromGitHub {
     owner = "alex-courtis";
-    repo = "xlayoutdisplay";
+    repo = pname;
     rev = "v${version}";
-    sha256 = "1cqn98lpx9rkfhavbqalaaljw351hvqsrszgqnwvcyq05vq26dwx";
+    sha256 = "0wm6a48ym0wn2w0872mfq40ghajfrg1bccj1g342w899qh5x3bc4";
   };
 
   nativeBuildInputs = [ cmake ];
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
       --replace 'fprintf(lidStateFile, contents);' \
                 'fputs(contents, lidStateFile);'
 
+    substituteInPlace CMakeLists.txt --replace "set(Boost_USE_STATIC_LIBS ON)" ""
   '';
 
   meta = with stdenv.lib; {
@@ -30,5 +31,6 @@ stdenv.mkDerivation rec {
     homepage = https://github.com/alex-courtis/xlayoutdisplay;
     maintainers = with maintainers; [ dtzWill ];
     license = licenses.asl20;
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/tools/admin/acme.sh/default.nix b/pkgs/tools/admin/acme.sh/default.nix
index fc4f5e8843e4..371a86f77246 100644
--- a/pkgs/tools/admin/acme.sh/default.nix
+++ b/pkgs/tools/admin/acme.sh/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, makeWrapper, curl, openssl, socat, iproute }:
+{ stdenv, lib, fetchFromGitHub, makeWrapper, curl, openssl, socat, iproute, unixtools }:
 stdenv.mkDerivation rec {
   name = "acme.sh-${version}";
   version = "2.8.0";
@@ -16,7 +16,14 @@ stdenv.mkDerivation rec {
     mkdir -p $out $out/bin $out/libexec
     cp -R $src/* $_
     makeWrapper $out/libexec/acme.sh $out/bin/acme.sh \
-      --prefix PATH : "${lib.makeBinPath [ socat openssl curl iproute ]}"
+      --prefix PATH : "${
+        lib.makeBinPath [
+          socat
+          openssl
+          curl
+          (if stdenv.isLinux then iproute else unixtools.netstat)
+        ]
+      }"
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/backup/dedup/default.nix b/pkgs/tools/backup/dedup/default.nix
new file mode 100644
index 000000000000..fdeacf91dd04
--- /dev/null
+++ b/pkgs/tools/backup/dedup/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, lz4, snappy, openmp }:
+
+stdenv.mkDerivation rec {
+  pname = "dedup";
+  version = "1.0";
+
+  src = fetchurl {
+    url = "https://dl.2f30.org/releases/${pname}-${version}.tar.gz";
+    sha256 = "0wd4cnzhqk8l7byp1y16slma6r3i1qglwicwmxirhwdy1m7j5ijy";
+  };
+
+  makeFlags = [
+    "CC:=$(CC)"
+    "PREFIX=${placeholder "out"}"
+    "MANPREFIX=${placeholder "out"}/share/man"
+    # These are likely wrong on some platforms, please report!
+    "OPENMPCFLAGS=-fopenmp"
+    "OPENMPLDLIBS=-lgomp"
+  ];
+
+  buildInputs = [ lz4 snappy openmp ];
+
+  meta = with stdenv.lib; {
+    description = "data deduplication program";
+    homepage = https://git.2f30.org/dedup/file/README.html;
+    license = with licenses; [ bsd0 isc ];
+    maintainers = with maintainers; [ dtzWill ];
+  };
+}
diff --git a/pkgs/tools/misc/yad/default.nix b/pkgs/tools/misc/yad/default.nix
index 9992c9db99e1..946a07d17b46 100644
--- a/pkgs/tools/misc/yad/default.nix
+++ b/pkgs/tools/misc/yad/default.nix
@@ -1,31 +1,40 @@
-{ stdenv, fetchurl, pkgconfig, intltool, gtk2, hicolor-icon-theme
-, wrapGAppsHook }:
+{ stdenv, fetchFromGitHub, pkgconfig, intltool, autoreconfHook, wrapGAppsHook
+, gtk3, hicolor-icon-theme, netpbm }:
 
 stdenv.mkDerivation rec {
-  name = "yad-0.40.0";
-
-  src = fetchurl {
-    url = "mirror://sourceforge/yad-dialog/files/${name}.tar.xz";
-    sha256 = "1x0fsv8nfkm8lchdawnf3zw79jaqbnvhv87sk5r8g86knv8vgl62";
+  pname = "yad";
+  version = "0.42.0";
+
+  src = fetchFromGitHub {
+    owner = "v1cont";
+    repo = "yad";
+    rev = "v${version}";
+    sha256 = "0ym8pgbzx7ydk5rmi2kwwdyzi6pdpcps86i0c20cqcjmqh8kdl36";
   };
 
   configureFlags = [
     "--enable-icon-browser"
+    "--with-gtk=gtk3"
+    "--with-rgb=${placeholder "out"}/share/yad/rgb.txt"
   ];
 
-  # for gcc5: c11 inline semantics breaks the build
-  NIX_CFLAGS_COMPILE = "-fgnu89-inline";
-
-  buildInputs = [ gtk2 hicolor-icon-theme ];
+  buildInputs = [ gtk3 hicolor-icon-theme ];
 
-  nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
+  nativeBuildInputs = [ autoreconfHook pkgconfig intltool wrapGAppsHook ];
 
   postPatch = ''
     sed -i src/file.c -e '21i#include <glib/gprintf.h>'
     sed -i src/form.c -e '21i#include <stdlib.h>'
+
+    # there is no point to bring in the whole netpbm package just for this file
+    install -Dm644 ${netpbm}/share/netpbm/misc/rgb.txt $out/share/yad/rgb.txt
   '';
 
-  meta = {
+  postAutoreconf = ''
+    intltoolize
+  '';
+
+  meta = with stdenv.lib; {
     homepage = https://sourceforge.net/projects/yad-dialog/;
     description = "GUI dialog tool for shell scripts";
     longDescription = ''
@@ -34,9 +43,8 @@ stdenv.mkDerivation rec {
       dialogs, pop-up menu in notification icon and more.
     '';
 
-    platforms = with stdenv.lib.platforms; linux;
-    maintainers = with stdenv.lib.maintainers; [ smironov ];
-    license = stdenv.lib.licenses.gpl3;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ smironov ];
+    platforms = with platforms; linux;
   };
 }
-
diff --git a/pkgs/tools/networking/openvpn/default.nix b/pkgs/tools/networking/openvpn/default.nix
index 44bbb3779d04..3bcb1460a700 100644
--- a/pkgs/tools/networking/openvpn/default.nix
+++ b/pkgs/tools/networking/openvpn/default.nix
@@ -1,5 +1,6 @@
-{ stdenv, fetchurl, iproute, lzo, openssl, pam, pkgconfig
-, useSystemd ? stdenv.isLinux, systemd ? null
+{ stdenv, fetchurl, pkgconfig
+, iproute, lzo, openssl, pam
+, useSystemd ? stdenv.isLinux, systemd ? null, utillinux ? null
 , pkcs11Support ? false, pkcs11helper ? null,
 }:
 
@@ -8,7 +9,15 @@ assert pkcs11Support -> (pkcs11helper != null);
 
 with stdenv.lib;
 
-stdenv.mkDerivation rec {
+let
+  # There is some fairly brittle string substitutions going on to replace paths,
+  # so please verify this script in case you are upgrading it
+  update-resolved = fetchurl {
+    url = "https://raw.githubusercontent.com/jonathanio/update-systemd-resolved/v1.2.7/update-systemd-resolved";
+    sha256 = "12zfzh42apwbj7ks5kfxf3far7kaghlby4yapbhn00q8pbdlw7pq";
+  };
+
+in stdenv.mkDerivation rec {
   name = "openvpn-${version}";
   version = "2.4.7";
 
@@ -18,6 +27,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkgconfig ];
+
   buildInputs = [ lzo openssl ]
                   ++ optionals stdenv.isLinux [ pam iproute ]
                   ++ optional useSystemd systemd
@@ -35,17 +45,27 @@ stdenv.mkDerivation rec {
     cp -r sample/sample-config-files/ $out/share/doc/openvpn/examples
     cp -r sample/sample-keys/ $out/share/doc/openvpn/examples
     cp -r sample/sample-scripts/ $out/share/doc/openvpn/examples
+
+    ${optionalString useSystemd ''
+      install -Dm755 ${update-resolved} $out/libexec/update-systemd-resolved
+
+      substituteInPlace $out/libexec/update-systemd-resolved \
+        --replace '/usr/bin/env bash' '${stdenv.shell} -e' \
+        --replace 'busctl call'       '${getBin systemd}/bin/busctl call' \
+        --replace '(ip '              '(${getBin iproute}/bin/ip ' \
+        --replace 'logger '           '${getBin utillinux}/bin/logger '
+    ''}
   '';
 
   enableParallelBuilding = true;
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "A robust and highly flexible tunneling application";
-    homepage = https://openvpn.net/;
     downloadPage = "https://openvpn.net/index.php/open-source/downloads.html";
-    license = stdenv.lib.licenses.gpl2;
-    maintainers = [ stdenv.lib.maintainers.viric ];
-    platforms = stdenv.lib.platforms.unix;
+    homepage = https://openvpn.net/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ viric ];
+    platforms = platforms.unix;
     updateWalker = true;
   };
 }
diff --git a/pkgs/tools/security/kwalletcli/default.nix b/pkgs/tools/security/kwalletcli/default.nix
index 52e8ab8cf570..fedf3421fb1c 100644
--- a/pkgs/tools/security/kwalletcli/default.nix
+++ b/pkgs/tools/security/kwalletcli/default.nix
@@ -1,48 +1,48 @@
-{
-  mkDerivation, fetchurl, lib,
-  pkgconfig,
-  kcoreaddons, ki18n, kwallet,
-  mksh
-}:
-
-let
+{ mkDerivation, fetchFromGitHub, lib, makeWrapper, pkgconfig
+, kcoreaddons, ki18n, kwallet, mksh, pinentry_qt5 }:
+
+mkDerivation rec {
   pname = "kwalletcli";
   version = "3.02";
-in
-mkDerivation rec {
-  name = "${pname}-${version}";
 
-  src = fetchurl {
-    url = "https://www.mirbsd.org/MirOS/dist/hosted/kwalletcli/${name}.tar.gz";
-    sha256 = "05njayi07996ljfl8a6frlk2s60grk5w27f0f445nmvd5n0bzgpn";
+  src = fetchFromGitHub {
+    owner = "MirBSD";
+    repo = pname;
+    rev = "${pname}-${lib.replaceStrings [ "." ] [ "_" ] version}";
+    sha256 = "1gq45afb5nmmjfqxglv7wvcxcjd9822pc7nysq0350jmmmqwb474";
   };
 
   postPatch = ''
     substituteInPlace GNUmakefile \
-      --replace '-I/usr/include/KF5/KCoreAddons' '-I${kcoreaddons.dev}/include/KF5/KCoreAddons' \
-      --replace '-I/usr/include/KF5/KI18n'       '-I${ki18n.dev}/include/KF5/KI18n' \
-      --replace '-I/usr/include/KF5/KWallet'     '-I${kwallet.dev}/include/KF5/KWallet' \
-      --replace /usr/bin                         $out/bin \
-      --replace /usr/share/man                   $out/share/man
+      --replace -I/usr/include/KF5/KCoreAddons -I${kcoreaddons.dev}/include/KF5/KCoreAddons \
+      --replace -I/usr/include/KF5/KI18n       -I${ki18n.dev}/include/KF5/KI18n \
+      --replace -I/usr/include/KF5/KWallet     -I${kwallet.dev}/include/KF5/KWallet \
+      --replace /usr/bin                       $out/bin \
+      --replace /usr/share/man                 $out/share/man
+
+    substituteInPlace pinentry-kwallet \
+      --replace '/usr/bin/env mksh' ${mksh}/bin/mksh
   '';
 
   makeFlags = [ "KDE_VER=5" ];
 
-  # we need this when building against qt 5.8+
-  NIX_CFLAGS_COMPILE = [ "-std=c++11" ];
-
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ makeWrapper pkgconfig ];
   # if using just kwallet, cmake will be added as a buildInput and fail the build
   propagatedBuildInputs = [ kcoreaddons ki18n (lib.getLib kwallet) ];
-  propagatedUserEnvPkgs = [ mksh ];
 
   preInstall = ''
     mkdir -p $out/bin $out/share/man/man1
   '';
 
+  postInstall = ''
+    wrapProgram $out/bin/pinentry-kwallet \
+      --prefix PATH : $out/bin:${lib.makeBinPath [ pinentry_qt5 ]} \
+      --set-default PINENTRY pinentry-qt
+  '';
+
   meta = with lib; {
     description = "Command-Line Interface to the KDE Wallet";
-    homepage = http://www.mirbsd.org/kwalletcli.htm;
+    homepage = https://www.mirbsd.org/kwalletcli.htm;
     license = licenses.miros;
     maintainers = with maintainers; [ peterhoeg ];
   };
diff --git a/pkgs/tools/text/qgrep/default.nix b/pkgs/tools/text/qgrep/default.nix
new file mode 100644
index 000000000000..5f0e7461361d
--- /dev/null
+++ b/pkgs/tools/text/qgrep/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  version = "1.1";
+  pname = "qgrep";
+
+  src = fetchFromGitHub {
+    owner = "zeux";
+    repo = "qgrep";
+    rev = "v${version}";
+    sha256 = "046ccw34vz2k5jn6gyxign5gs2qi7i50jy9b74wqv7sjf5zayrh0";
+    fetchSubmodules = true;
+  };
+
+  installPhase = '' 
+    install -Dm755 qgrep $out/bin/qgrep
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Fast regular expression grep for source code with incremental index updates";
+    homepage = https://github.com/zeux/qgrep;
+    license = licenses.mit;
+    maintainers = [ maintainers.yrashk ];
+    platforms = platforms.all;
+  };
+
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index e22380fa9a4f..67aefc86dce9 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1025,9 +1025,14 @@ in
     charles4
   ;
 
-  libqmatrixclient = libsForQt5.callPackage ../development/libraries/libqmatrixclient { };
+  inherit (libsForQt5.callPackage ../development/libraries/libqmatrixclient { })
+    libqmatrixclient_0_4
+    libqmatrixclient_0_5
+    libqmatrixclient;
 
-  quaternion = libsForQt5.callPackage ../applications/networking/instant-messengers/quaternion { };
+  inherit (libsForQt5.callPackage ../applications/networking/instant-messengers/quaternion { })
+    quaternion
+    quaternion-git;
 
   tensor = libsForQt5.callPackage ../applications/networking/instant-messengers/tensor { };
 
@@ -1331,6 +1336,10 @@ in
 
   ddate = callPackage ../tools/misc/ddate { };
 
+  dedup = callPackage ../tools/backup/dedup {
+    inherit (llvmPackages) openmp;
+  };
+
   dehydrated = callPackage ../tools/admin/dehydrated { };
 
   deis = callPackage ../development/tools/deis {};
@@ -5294,6 +5303,7 @@ in
   qdigidoc = libsForQt5.callPackage ../tools/security/qdigidoc { } ;
   esteidfirefoxplugin = callPackage ../applications/networking/browsers/mozilla-plugins/esteidfirefoxplugin { };
 
+  qgrep = callPackage ../tools/text/qgrep {};
 
   qhull = callPackage ../development/libraries/qhull { };
 
@@ -8593,9 +8603,12 @@ in
 
   awf = callPackage ../development/tools/misc/awf { };
 
-  electron = callPackage ../development/tools/electron { };
+  electron_5 = callPackage ../development/tools/electron/5.x.nix { };
+
+  electron_4 = callPackage ../development/tools/electron { };
 
   electron_3 = callPackage ../development/tools/electron/3.x.nix { };
+  electron = electron_4;
 
   autobuild = callPackage ../development/tools/misc/autobuild { };
 
@@ -18801,7 +18814,8 @@ in
 
   mm-common = callPackage ../development/libraries/mm-common { };
 
-  matrique = libsForQt5.callPackage ../applications/networking/instant-messengers/matrique { };
+  # Renamed
+  matrique = spectral;
 
   mpc-qt = libsForQt5.callPackage ../applications/video/mpc-qt { };