From d573f60dddf4000fd21ce46537c3ad65ed506dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Wed, 24 Jan 2024 21:05:09 +0100 Subject: [PATCH] fix: make element and signal work with wayland --- overlays/default.nix | 2 +- overlays/element-desktop.nix | 3 +++ overlays/signal-desktop.nix | 19 ------------------- 3 files changed, 4 insertions(+), 20 deletions(-) create mode 100644 overlays/element-desktop.nix delete mode 100644 overlays/signal-desktop.nix diff --git a/overlays/default.nix b/overlays/default.nix index 7f61250..314baa1 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -39,7 +39,7 @@ (import ./blesh.nix) (import ./rnix-lsp.nix) (import ./neovim-plugins.nix) - (import ./signal-desktop.nix) + (import ./element-desktop.nix) ]; }); }; diff --git a/overlays/element-desktop.nix b/overlays/element-desktop.nix new file mode 100644 index 0000000..c6c39c7 --- /dev/null +++ b/overlays/element-desktop.nix @@ -0,0 +1,3 @@ +final: prev: { + element-desktop = prev.element-desktop.override { electron = prev.electron_28; }; +} diff --git a/overlays/signal-desktop.nix b/overlays/signal-desktop.nix deleted file mode 100644 index c8b9356..0000000 --- a/overlays/signal-desktop.nix +++ /dev/null @@ -1,19 +0,0 @@ -final: prev: { - signal-desktop = prev.signal-desktop.overrideAttrs (oldAttrs: rec { - inherit (oldAttrs) pname; - dir = "Signal"; - - preFixup = '' - gappsWrapperArgs+=( - --prefix LD_LIBRARY_PATH : "${prev.lib.makeLibraryPath [prev.stdenv.cc.cc]}" - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" - --suffix PATH : ${prev.lib.makeBinPath [prev.xdg-utils]} - ) - # Fix the desktop link - substituteInPlace $out/share/applications/${pname}.desktop \ - --replace "/opt/${dir}/${pname}" $out/bin/${pname} - autoPatchelf --no-recurse -- "$out/lib/${dir}/" - patchelf --add-needed ${prev.libpulseaudio}/lib/libpulse.so "$out/lib/${dir}/resources/app.asar.unpacked/node_modules/@signalapp/ringrtc/build/linux/libringrtc-x64.node" - ''; - }); -}