nixpkgs-suyu/pkgs/applications/networking/instant-messengers/ferdi/default.nix
Maximilian Bosch cd4ad7d2fe
ferdi: 5.6.0-beta.5 -> 5.6.0-beta.6, improve XWayland support
ChangeLog: 1886c8abed/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
2021-06-04 22:56:10 +02:00

34 lines
1 KiB
Nix

{ lib, mkFranzDerivation, fetchurl, xorg, xdg-utils, buildEnv, writeShellScriptBin }:
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.6";
src = fetchurl {
url = "https://github.com/getferdi/ferdi/releases/download/v${version}/ferdi_${version}_amd64.deb";
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 = with maintainers; [ davidtwco ma27 ];
platforms = [ "x86_64-linux" ];
hydraPlatforms = [ ];
};
}