Skip to content

Commit

Permalink
ferdi: 5.6.0-beta.5 -> 5.6.0-beta.6, improve XWayland support
Browse files Browse the repository at this point in the history
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] electron/electron#28436

(cherry picked from commit cd4ad7d)
  • Loading branch information
Ma27 authored and github-actions[bot] committed Jun 5, 2021
1 parent 527c0bb commit 1eb5ab9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
25 changes: 20 additions & 5 deletions pkgs/applications/networking/instant-messengers/ferdi/default.nix
Original file line number Diff line number Diff line change
@@ -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 = [ ];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@

# 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;

# Don't remove runtime deps.
dontPatchELF = true;

nativeBuildInputs = [ autoPatchelfHook makeWrapper wrapGAppsHook dpkg ];
buildInputs = (with xorg; [
buildInputs = extraBuildInputs ++ (with xorg; [
libXi
libXcursor
libXdamage
Expand Down

0 comments on commit 1eb5ab9

Please sign in to comment.