about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
diff options
context:
space:
mode:
authorWout Mertens <Wout.Mertens@gmail.com>2021-11-27 01:54:14 +0100
committerWout Mertens <Wout.Mertens@gmail.com>2022-01-27 09:46:36 +0100
commitb2eb5f62a7fd94ab58acafec9f64e54f97c508a6 (patch)
tree5e0da9b66e9b8751795208922e6a56c8cf353691 /pkgs/applications/networking/instant-messengers/element/element-desktop.nix
parente722007bf05802573b41701c49da6c8814878171 (diff)
wayland: enable ozone via $NIXOS_OZONE_WL
Chrome, Chromium, VSCode, Slack, Signal, Discord, element-desktop,
schildichat.

For the latter two, the feature flag useWayland was removed and a
wrapper script was provided.
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/element/element-desktop.nix')
-rw-r--r--pkgs/applications/networking/instant-messengers/element/element-desktop.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
index 1a0c25c606b04..5ba7a1f7b2051 100644
--- a/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
+++ b/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
@@ -12,8 +12,6 @@
 , Security
 , AppKit
 , CoreServices
-
-, useWayland ? false
 }:
 
 let
@@ -82,7 +80,8 @@ mkYarnPackage rec {
     # LD_PRELOAD workaround for sqlcipher not found: https://github.com/matrix-org/seshat/issues/102
     makeWrapper '${electron_exec}' "$out/bin/${executableName}" \
       --set LD_PRELOAD ${sqlcipher}/lib/libsqlcipher.so \
-      --add-flags "$out/share/element/electron${lib.optionalString useWayland " --enable-features=UseOzonePlatform --ozone-platform=wayland"}"
+      --add-flags "$out/share/element/electron" \
+      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
   '';
 
   # Do not attempt generating a tarball for element-web again.