about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2021-06-04 21:37:35 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2021-06-04 22:56:10 +0200
commitcd4ad7d2fee90fc3afb9f3f3957a7289f02f89dc (patch)
treeab9bef6a291c45c87c0159545737296a8837738b /pkgs
parent6f1857f2f2d12dcc7e46bff55540af1dcae578c6 (diff)
ferdi: 5.6.0-beta.5 -> 5.6.0-beta.6, improve XWayland support
ChangeLog: https://github.com/getferdi/ferdi/blob/1886c8abed32e33f0f547c069c674b79279cf931/CHANGELOG.md#560-beta6-2021-05-31

Even though this isn't explicitly noted in the Changelog, this seems to
have fixed the Element integration for me.

Additionally, I added a (hacky) `xdg-open` wrapper which removes the
`GDK_BACKEND` variable to fix the XWayland integration[1]. The problem
is that if a Firefox is running with Wayland (`ferdi` is running under
X11) and `GDK_BACKEND=x11` is passed to the `xdg-open` (and thus
`firefox`) process, Firefox refuses to start since another instance of
it is running under Wayland (but attempts to start in X11 mode because of
`GDK_BACKEND=x11`).

[1] https://github.com/electron/electron/issues/28436
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/instant-messengers/ferdi/default.nix25
-rw-r--r--pkgs/applications/networking/instant-messengers/franz/generic.nix5
2 files changed, 23 insertions, 7 deletions
diff --git a/pkgs/applications/networking/instant-messengers/ferdi/default.nix b/pkgs/applications/networking/instant-messengers/ferdi/default.nix
index c57b58eea0d88..5d3b251089cf3 100644
--- a/pkgs/applications/networking/instant-messengers/ferdi/default.nix
+++ b/pkgs/applications/networking/instant-messengers/ferdi/default.nix
@@ -1,18 +1,33 @@
-{ lib, mkFranzDerivation, fetchurl }:
+{ lib, mkFranzDerivation, fetchurl, xorg, xdg-utils, buildEnv, writeShellScriptBin }:
 
-mkFranzDerivation rec {
+let
+  mkFranzDerivation' = mkFranzDerivation.override {
+    xdg-utils = buildEnv {
+      name = "xdg-utils-for-ferdi";
+      paths = [
+        xdg-utils
+        (lib.hiPrio (writeShellScriptBin "xdg-open" ''
+          unset GDK_BACKEND
+          exec ${xdg-utils}/bin/xdg-open "$@"
+        ''))
+      ];
+    };
+  };
+in
+mkFranzDerivation' rec {
   pname = "ferdi";
   name = "Ferdi";
-  version = "5.6.0-beta.5";
+  version = "5.6.0-beta.6";
   src = fetchurl {
     url = "https://github.com/getferdi/ferdi/releases/download/v${version}/ferdi_${version}_amd64.deb";
-    sha256 = "sha256-fDUzYir53OQ3O4o9eG70sGD+FJ0/4SDNsTfh97WFRnQ=";
+    sha256 = "sha256-Q1HSAEVcaxFyOq7oWqa6AJJpsBKRxbsKb9ydyK/gH/A=";
   };
+  extraBuildInputs = [ xorg.libxshmfence ];
   meta = with lib; {
     description = "Combine your favorite messaging services into one application";
     homepage = "https://getferdi.com/";
     license = licenses.asl20;
-    maintainers = [ maintainers.davidtwco ];
+    maintainers = with maintainers; [ davidtwco ma27 ];
     platforms = [ "x86_64-linux" ];
     hydraPlatforms = [ ];
   };
diff --git a/pkgs/applications/networking/instant-messengers/franz/generic.nix b/pkgs/applications/networking/instant-messengers/franz/generic.nix
index 08afad8b56fa2..6fac3657c7cbd 100644
--- a/pkgs/applications/networking/instant-messengers/franz/generic.nix
+++ b/pkgs/applications/networking/instant-messengers/franz/generic.nix
@@ -28,7 +28,8 @@
 
 # Helper function for building a derivation for Franz and forks.
 
-{ pname, name, version, src, meta }:
+{ pname, name, version, src, meta, extraBuildInputs ? [] }:
+
 stdenv.mkDerivation rec {
   inherit pname version src meta;
 
@@ -36,7 +37,7 @@ stdenv.mkDerivation rec {
   dontPatchELF = true;
 
   nativeBuildInputs = [ autoPatchelfHook makeWrapper wrapGAppsHook dpkg ];
-  buildInputs = (with xorg; [
+  buildInputs = extraBuildInputs ++ (with xorg; [
     libXi
     libXcursor
     libXdamage