about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--README.md8
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/services/misc/jellyfin.nix60
-rw-r--r--nixos/modules/services/monitoring/grafana.nix2
-rw-r--r--nixos/modules/services/security/sks.nix24
-rw-r--r--nixos/tests/jellyfin.nix16
-rw-r--r--pkgs/applications/misc/zola/default.nix6
-rw-r--r--pkgs/applications/networking/flent/default.nix2
-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/build-support/appimage/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/core/mutter/3.28.nix29
-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/libraries/libqmatrixclient/default.nix42
-rw-r--r--pkgs/development/ocaml-modules/eliom/default.nix8
-rw-r--r--pkgs/development/ocaml-modules/ojquery/default.nix28
-rw-r--r--pkgs/development/ocaml-modules/tyxml/default.nix28
-rw-r--r--pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix12
-rw-r--r--pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix4
-rw-r--r--pkgs/os-specific/linux/service-wrapper/default.nix3
-rwxr-xr-xpkgs/os-specific/linux/service-wrapper/service-wrapper.sh29
-rw-r--r--pkgs/servers/jellyfin/default.nix2
-rw-r--r--pkgs/tools/filesystems/mergerfs/default.nix4
-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/security/mfoc/default.nix27
-rw-r--r--pkgs/tools/security/mfoc/mf_mini.patch96
-rw-r--r--pkgs/top-level/all-packages.nix12
-rw-r--r--pkgs/top-level/ocaml-packages.nix4
33 files changed, 341 insertions, 373 deletions
diff --git a/README.md b/README.md
index 29c023e4dcdf..8cdbb73595bf 100644
--- a/README.md
+++ b/README.md
@@ -12,12 +12,12 @@ build daemon as so-called channels. To get channel information via git, add
 ```
 
 For stability and maximum binary package support, it is recommended to maintain
-custom changes on top of one of the channels, e.g. `nixos-18.09` for the latest
+custom changes on top of one of the channels, e.g. `nixos-19.03` for the latest
 release and `nixos-unstable` for the latest successful build of master:
 
 ```
 % git remote update channels
-% git rebase channels/nixos-18.09
+% git rebase channels/nixos-19.03
 ```
 
 For pull requests, please rebase onto nixpkgs `master`.
@@ -31,9 +31,9 @@ For pull requests, please rebase onto nixpkgs `master`.
 * [Manual (NixOS)](https://nixos.org/nixos/manual/)
 * [Community maintained wiki](https://nixos.wiki/)
 * [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
-* [Continuous package builds for 18.09 release](https://hydra.nixos.org/jobset/nixos/release-18.09)
+* [Continuous package builds for 19.03 release](https://hydra.nixos.org/jobset/nixos/release-19.03)
 * [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
-* [Tests for 18.09 release](https://hydra.nixos.org/job/nixos/release-18.09/tested#tabs-constituents)
+* [Tests for 19.03 release](https://hydra.nixos.org/job/nixos/release-19.03/tested#tabs-constituents)
 
 Communication:
 
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/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/monitoring/grafana.nix b/nixos/modules/services/monitoring/grafana.nix
index 85879cfe0b33..5d3f2e6ac28f 100644
--- a/nixos/modules/services/monitoring/grafana.nix
+++ b/nixos/modules/services/monitoring/grafana.nix
@@ -177,7 +177,7 @@ let
       folder = mkOption {
         type = types.str;
         default = "";
-        description = "Add dashboards to the speciied folder";
+        description = "Add dashboards to the specified folder";
       };
       type = mkOption {
         type = types.str;
diff --git a/nixos/modules/services/security/sks.nix b/nixos/modules/services/security/sks.nix
index 2d717ac94746..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 KDB/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/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/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/flent/default.nix b/pkgs/applications/networking/flent/default.nix
index 2f97b39da60f..bc0a519a0eee 100644
--- a/pkgs/applications/networking/flent/default.nix
+++ b/pkgs/applications/networking/flent/default.nix
@@ -14,6 +14,8 @@ buildPythonApplication rec {
 
   buildInputs = [ sphinx ];
 
+  checkInputs = [ procps ];
+
   propagatedBuildInputs = [
     matplotlib
     procps
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/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/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/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/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix
index ec63e58fbb65..d35a57f6b4bc 100644
--- a/pkgs/development/ocaml-modules/eliom/default.nix
+++ b/pkgs/development/ocaml-modules/eliom/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, which, ocsigen_server, ocsigen_deriving, ocaml, lwt_camlp4,
+{ stdenv, fetchzip, which, ocsigen_server, ocsigen_deriving, ocaml, lwt_camlp4,
   lwt_react, cryptokit,
   ipaddr, ocamlnet, ocaml_pcre,
   opaline, ppx_tools, ppx_deriving, findlib
@@ -11,12 +11,12 @@
 stdenv.mkDerivation rec
 {
   pname = "eliom";
-  version = "6.4.0";
+  version = "6.7.0";
   name = "${pname}-${version}";
 
-  src = fetchurl {
+  src = fetchzip {
     url = "https://github.com/ocsigen/eliom/archive/${version}.tar.gz";
-    sha256 = "1ad7ympvj0cb51d9kbp4naxkld3gv8cfp4a037a5dr55761zdhdh";
+    sha256 = "0mrlpvjaihpsf2xr6p1gs0sz4cwzkknf5b1s32bhmqq5qzsh4j8k";
   };
 
   patches = [ ./camlp4.patch ];
diff --git a/pkgs/development/ocaml-modules/ojquery/default.nix b/pkgs/development/ocaml-modules/ojquery/default.nix
deleted file mode 100644
index 6b0eefe195f1..000000000000
--- a/pkgs/development/ocaml-modules/ojquery/default.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ stdenv, fetchgit, ocaml, findlib, ocamlbuild, js_of_ocaml, js_of_ocaml-camlp4, camlp4, ocaml_lwt, react }:
-
-if stdenv.lib.versionAtLeast ocaml.version "4.06"
-then throw "ojquery is not available for OCaml ${ocaml.version}"
-else
-
-stdenv.mkDerivation rec {
-  version = "0.1";
-  name = "ocaml-ojquery-${version}";
-  src = fetchgit {
-    url = https://github.com/ocsigen/ojquery.git;
-    rev = "refs/tags/${version}";
-    sha256 = "1n01bsk4car40p94fk1ssvww0inqapwwhdylmrb7vv40drsdldp1";
-  };
-
-  buildInputs = [ ocaml findlib ocamlbuild js_of_ocaml-camlp4 camlp4 ];
-  propagatedBuildInputs = [ js_of_ocaml ocaml_lwt react ];
-
-  createFindlibDestdir = true;
-
-  meta = {
-    description = "jQuery Binding for Eliom";
-    homepage = http://ocsigen.org/ojquery/;
-    license = stdenv.lib.licenses.lgpl3;
-    platforms = ocaml.meta.platforms or [];
-    maintainers = with stdenv.lib.maintainers; [ vbgl ];
-  };
-}
diff --git a/pkgs/development/ocaml-modules/tyxml/default.nix b/pkgs/development/ocaml-modules/tyxml/default.nix
index 0a8947f3324a..94bcdb45f328 100644
--- a/pkgs/development/ocaml-modules/tyxml/default.nix
+++ b/pkgs/development/ocaml-modules/tyxml/default.nix
@@ -1,34 +1,20 @@
-{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, uutf, markup, ppx_tools_versioned, re
-, withP4 ? true
-, camlp4 ? null
-}:
+{ lib, buildDunePackage, fetchurl, re, uutf }:
 
-assert stdenv.lib.versionAtLeast ocaml.version "4.02";
-
-stdenv.mkDerivation rec {
+buildDunePackage rec {
   pname = "tyxml";
-  version = "4.2.0";
-  name = "ocaml${ocaml.version}-${pname}-${version}";
+  version = "4.3.0";
 
-  src = fetchzip {
-    url = "https://github.com/ocsigen/tyxml/archive/${version}.tar.gz";
-    sha256 = "1zrkrmxyj5a2cdh4b9zr9anwfk320wv3x0ynxnyxl5za2ix8sld8";
+  src = fetchurl {
+    url = "https://github.com/ocsigen/tyxml/releases/download/${version}/tyxml-${version}.tbz";
+    sha256 = "1hxzppfvsdls2y8qiwvz31hmffzh2hgglf01am1vzf2f31mxf6vf";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild ppx_tools_versioned markup ]
-  ++ stdenv.lib.optional withP4 camlp4;
-
   propagatedBuildInputs = [ uutf re ];
 
-  createFindlibDestdir = true;
-
-  configureFlags = stdenv.lib.optional withP4 "--enable-syntax";
-
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = http://ocsigen.org/tyxml/;
     description = "A library that makes it almost impossible for your OCaml programs to generate wrong XML output, using static typing";
     license = licenses.lgpl21;
-    platforms = ocaml.meta.platforms or [];
     maintainers = with maintainers; [
       gal_bolle vbgl
       ];
diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix b/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix
index 139ffef186b5..ff59fa7cf8a3 100644
--- a/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix
+++ b/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix
@@ -1,11 +1,19 @@
-{ stdenv, ocaml, findlib, dune, js_of_ocaml-compiler
+{ stdenv, fetchFromGitHub, ocaml, findlib, dune, js_of_ocaml-compiler
 , camlp4, ocsigen_deriving
 }:
 
 stdenv.mkDerivation rec {
+	version = "3.2.1";
 	name = "js_of_ocaml-camlp4-${version}"; 
 
-	inherit (js_of_ocaml-compiler) version src installPhase meta;
+	src = fetchFromGitHub {
+		owner = "ocsigen";
+		repo = "js_of_ocaml";
+		rev = version;
+		sha256 = "1v2hfq0ra9j07yz6pj6m03hrvgys4vmx0gclchv94yywpb2wc7ik";
+	};
+
+	inherit (js_of_ocaml-compiler) installPhase meta;
 
 	buildInputs = [ ocaml findlib dune camlp4 ocsigen_deriving ];
 
diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix b/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix
index 94be7132b796..c5a345f505b7 100644
--- a/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix
+++ b/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix
@@ -8,13 +8,13 @@ else
 
 stdenv.mkDerivation rec {
 	name = "js_of_ocaml-compiler-${version}";
-	version = "3.2.1";
+	version = "3.3.0";
 
 	src = fetchFromGitHub {
 		owner = "ocsigen";
 		repo = "js_of_ocaml";
 		rev = version;
-		sha256 = "1v2hfq0ra9j07yz6pj6m03hrvgys4vmx0gclchv94yywpb2wc7ik";
+		sha256 = "0bg8x2s3f24c8ia2g293ikd5yg0yjw3hkdgdql59c8k2amqin8f8";
 	};
 
 	buildInputs = [ ocaml findlib dune cmdliner cppo ];
diff --git a/pkgs/os-specific/linux/service-wrapper/default.nix b/pkgs/os-specific/linux/service-wrapper/default.nix
index 8adb2e5413c4..f2ed3c4a7834 100644
--- a/pkgs/os-specific/linux/service-wrapper/default.nix
+++ b/pkgs/os-specific/linux/service-wrapper/default.nix
@@ -2,7 +2,7 @@
 
 let
   name = "service-wrapper-${version}";
-  version = "16.04.0"; # Ajar to Ubuntu Release
+  version = "19.04"; # Akin to Ubuntu Release
 in
 runCommand "${name}" {
   script = substituteAll {
@@ -17,6 +17,7 @@ runCommand "${name}" {
     license     = licenses.gpl2Plus;
     platforms   = platforms.linux;
     maintainers = with maintainers; [ DerTim1 ];
+    # Shellscript has been modified but upstream source is: https://git.launchpad.net/ubuntu/+source/init-system-helpers
   };
 }
 ''
diff --git a/pkgs/os-specific/linux/service-wrapper/service-wrapper.sh b/pkgs/os-specific/linux/service-wrapper/service-wrapper.sh
index 460bf678e6ac..a7c3bc9758b1 100755
--- a/pkgs/os-specific/linux/service-wrapper/service-wrapper.sh
+++ b/pkgs/os-specific/linux/service-wrapper/service-wrapper.sh
@@ -41,7 +41,7 @@ is_ignored_file() {
 	return 1
 }
 
-VERSION=$(@coreutils@/bin/basename $0)" ver. 0.91-ubuntu1"
+VERSION=$(@coreutils@/bin/basename $0)" ver. 19-04"
 USAGE="Usage: "$(@coreutils@/bin/basename $0)" < option > | --status-all | \
 [ service_name [ command | --full-restart ] ]"
 SERVICE=
@@ -133,29 +133,6 @@ while [ $# -gt 0 ]; do
    esac
 done
 
-# Operate against system upstart, not session
-unset UPSTART_SESSION
-if [ -r "/etc/init/${SERVICE}.conf" ] && which initctl >/dev/null \
-   && initctl version 2>/dev/null | grep -q upstart \
-   && initctl status ${SERVICE} 2>/dev/null 1>/dev/null
-then
-   # Upstart configuration exists for this job and we're running on upstart
-   case "${ACTION}" in
-      start|stop|status|reload)
-         # Action is a valid upstart action
-         exec ${ACTION} ${SERVICE} ${OPTIONS}
-      ;;
-      restart|force-reload)
-        # Map restart to the usual sysvinit behavior.
-        # Map force-reload to restart as per Debian policy 9.3.2,
-        # since there is no way to know if "reload" is supported
-         stop ${SERVICE} ${OPTIONS} || :
-         exec start ${SERVICE} ${OPTIONS}
-      ;;
-   esac
-fi
-
-
 run_via_sysvinit() {
    # Otherwise, use the traditional sysvinit
    if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
@@ -198,7 +175,7 @@ then
    fi
 
    case "${ACTION}" in
-      restart|status)
+      restart|status|try-restart)
          exec systemctl $sctl_args ${ACTION} ${UNIT}
       ;;
       start|stop)
@@ -214,7 +191,7 @@ then
          exec systemctl $sctl_args ${ACTION} ${UNIT}
       ;;
       reload)
-         _canreload="$(SYSTEMCTL -p CanReload show ${UNIT} 2>/dev/null)"
+         _canreload="$(systemctl -p CanReload show ${UNIT} 2>/dev/null)"
          if [ "$_canreload" = "CanReload=no" ]; then
             # The reload action falls back to the sysv init script just in case
             # the systemd service file does not (yet) support reload for a
diff --git a/pkgs/servers/jellyfin/default.nix b/pkgs/servers/jellyfin/default.nix
index 5073519d9f31..f92314b2123a 100644
--- a/pkgs/servers/jellyfin/default.nix
+++ b/pkgs/servers/jellyfin/default.nix
@@ -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/filesystems/mergerfs/default.nix b/pkgs/tools/filesystems/mergerfs/default.nix
index d84855ebb305..3a8d1d646be8 100644
--- a/pkgs/tools/filesystems/mergerfs/default.nix
+++ b/pkgs/tools/filesystems/mergerfs/default.nix
@@ -25,6 +25,10 @@ stdenv.mkDerivation rec {
 
   makeFlags = [ "PREFIX=$(out)" "XATTR_AVAILABLE=1" ];
 
+  postFixup = ''
+    ln -s $out/bin/mergerfs $out/bin/mount.fuse.mergerfs
+  '';
+
   meta = {
     description = "A FUSE based union filesystem";
     homepage = https://github.com/trapexit/mergerfs;
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/security/mfoc/default.nix b/pkgs/tools/security/mfoc/default.nix
index 278818e88b54..1ae18e343537 100644
--- a/pkgs/tools/security/mfoc/default.nix
+++ b/pkgs/tools/security/mfoc/default.nix
@@ -1,17 +1,28 @@
-{ stdenv, fetchurl, pkgconfig, libnfc }:
+{ stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkgconfig, libnfc }:
 
 stdenv.mkDerivation rec {
-  name = "mfoc-${version}";
-  version = "0.10.6";
+  pname = "mfoc";
+  version = "0.10.7";
 
-  src = fetchurl {
-    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mfoc/${name}.tar.gz";
-    sha1 = "3adce3029dce9124ff3bc7d0fad86fa0c374a9e3";
+  src = fetchFromGitHub {
+    owner = "nfc-tools";
+    repo = pname;
+    rev = "${pname}-${version}";
+    sha256 = "0hbg1fn4000qdg1cfc7y8l0vh1mxlxcz7gapkcq54xp2l6kk1z65";
   };
 
-  patches = [./mf_mini.patch];
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/nfc-tools/mfoc/commit/f13efb0a6deb1d97ba945d555a6a5d6be89b593f.patch";
+      sha256 = "109gqzp8rdsjvj0nra686vy0dpd2bl6q5v9m4v98cpxkbz496450";
+    })
+    (fetchpatch {
+      url = "https://github.com/nfc-tools/mfoc/commit/00eae36f891bc4580103e3b54f0bb5228af2cdef.patch";
+      sha256 = "1w56aj96g776f37j53jmf3hk21x4mqik3l2bmghrdp8drixc8bzk";
+    })
+  ];
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
   buildInputs = [ libnfc ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/security/mfoc/mf_mini.patch b/pkgs/tools/security/mfoc/mf_mini.patch
deleted file mode 100644
index 02bd656d6025..000000000000
--- a/pkgs/tools/security/mfoc/mf_mini.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-diff --git a/src/mfoc.c b/src/mfoc.c
-index 0cb917d..195de68 100644
---- a/src/mfoc.c
-+++ b/src/mfoc.c
-@@ -93,8 +93,8 @@ int main(int argc, char *const argv[])
-     {0x58, 0x7e, 0xe5, 0xf9, 0x35, 0x0f},
-     {0xa0, 0x47, 0x8c, 0xc3, 0x90, 0x91},
-     {0x53, 0x3c, 0xb6, 0xc7, 0x23, 0xf6},
--    {0x8f, 0xd0, 0xa4, 0xf2, 0x56, 0xe9}
--
-+    {0x8f, 0xd0, 0xa4, 0xf2, 0x56, 0xe9},
-+    {0xb4, 0xc1, 0x32, 0x43, 0x9e, 0xef}
-   };
- 
-   mftag		t;
-@@ -219,12 +219,31 @@ int main(int argc, char *const argv[])
-     goto error;
-   }
- 
--  // Save tag's block size (b4K)
--  t.b4K = (t.nt.nti.nai.abtAtqa[1] == 0x02);
-   t.authuid = (uint32_t) bytes_to_num(t.nt.nti.nai.abtUid + t.nt.nti.nai.szUidLen - 4, 4);
- 
--  t.num_blocks = (t.b4K) ? 0xff : 0x3f;
--  t.num_sectors = t.b4K ? NR_TRAILERS_4k : NR_TRAILERS_1k;
-+  // Get Mifare Classic type from SAK
-+  // see http://www.nxp.com/documents/application_note/AN10833.pdf Section 3.2
-+  switch (t.nt.nti.nai.btSak)
-+  {
-+    case 0x08:
-+      printf("Found Mifare Classic 1k tag\n");
-+      t.num_sectors = NR_TRAILERS_1k;
-+      t.num_blocks = NR_BLOCKS_1k;
-+      break;
-+    case 0x09:
-+      printf("Found Mifare Classic Mini tag\n");
-+      t.num_sectors = NR_TRAILERS_MINI;
-+      t.num_blocks = NR_BLOCKS_MINI;
-+      break;
-+    case 0x18:
-+      printf("Found Mifare Classic 4k tag\n");
-+      t.num_sectors = NR_TRAILERS_4k;
-+      t.num_blocks = NR_BLOCKS_4k;
-+      break;
-+    defaul:
-+      ERR("Cannot determine card type from SAK");
-+      goto error;
-+  }
- 
-   t.sectors = (void *) calloc(t.num_sectors, sizeof(sector));
-   if (t.sectors == NULL) {
-@@ -564,7 +583,7 @@ void usage(FILE *stream, int errno)
-   fprintf(stream, "  k     try the specified key in addition to the default keys\n");
- //	fprintf(stream, "  D     number of distance probes, default is 20\n");
- //	fprintf(stream, "  S     number of sets with keystreams, default is 5\n");
--  fprintf(stream, "  P     number of probes per sector, instead of default of 20\n");
-+  fprintf(stream, "  P     number of probes per sector, instead of default of 150\n");
-   fprintf(stream, "  T     nonce tolerance half-range, instead of default of 20\n        (i.e., 40 for the total range, in both directions)\n");
- //	fprintf(stream, "  s     specify the list of sectors to crack, for example -s 0,1,3,5\n");
-   fprintf(stream, "  O     file in which the card contents will be written (REQUIRED)\n");
-diff --git a/src/mfoc.h b/src/mfoc.h
-index b411670..532e834 100644
---- a/src/mfoc.h
-+++ b/src/mfoc.h
-@@ -2,11 +2,21 @@
- #define TRY_KEYS                50
- 
- // Number of trailers == number of sectors
--// 16x64b = 16
-+// Mifare Classic 1k 16x64b = 16
- #define NR_TRAILERS_1k  (16)
--// 32x64b + 8*256b = 40
-+// Mifare Classic Mini
-+#define NR_TRAILERS_MINI (5)
-+// Mifare Classic 4k 32x64b + 8*256b = 40
- #define NR_TRAILERS_4k  (40)
- 
-+// Number of blocks
-+// Mifare Classic 1k
-+#define NR_BLOCKS_1k 0x3f
-+// Mifare Classic Mini
-+#define NR_BLOCKS_MINI 0x13
-+// Mifare Classic 4k
-+#define NR_BLOCKS_4k 0xff
-+
- #define MAX_FRAME_LEN 264
- 
- // Used for counting nonce distances, explore [nd-value, nd+value]
-@@ -46,7 +56,6 @@ typedef struct {
-   uint8_t        num_sectors;
-   uint8_t        num_blocks;
-   uint32_t       authuid;
--  bool           b4K;
- } mftag;
- 
- typedef struct {
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index fe75119d9b8c..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 { };
 
@@ -18809,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 { };
 
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index c0089186275f..44ee8a0c9492 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -560,10 +560,6 @@ let
 
     odoc = callPackage ../development/ocaml-modules/odoc { };
 
-    ojquery = callPackage ../development/ocaml-modules/ojquery {
-      ocaml_lwt = lwt3;
-    };
-
     omd = callPackage ../development/ocaml-modules/omd { };
 
     opam-file-format = callPackage ../development/ocaml-modules/opam-file-format { };