element-desktop: add wayland variant (#132776)

This commit is contained in:
Yuka 2021-08-05 14:14:27 +02:00 committed by GitHub
parent 704dcb646c
commit bcad474c4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -5,6 +5,8 @@
, Security
, AppKit
, CoreServices
, useWayland ? false
}:
# Notes for maintainers:
# * versions of `element-web` and `element-desktop` should be kept in sync.
@ -68,7 +70,7 @@ in mkYarnPackage rec {
# executable wrapper
makeWrapper '${electron_exec}' "$out/bin/${executableName}" \
--add-flags "$out/share/element/electron"
--add-flags "$out/share/element/electron${lib.optionalString useWayland " --enable-features=UseOzonePlatform --ozone-platform=wayland"}"
'';
# Do not attempt generating a tarball for element-web again.

View file

@ -2638,6 +2638,9 @@ in
element-desktop = callPackage ../applications/networking/instant-messengers/element/element-desktop.nix {
inherit (darwin.apple_sdk.frameworks) Security AppKit CoreServices;
};
element-desktop-wayland = element-desktop.override {
useWayland = true;
};
element-web = callPackage ../applications/networking/instant-messengers/element/element-web.nix {
conf = config.element-web.conf or {};