teams: add an argument for enabling rect-overlay

The rect-overlay doesn’t work on non-composited window managers
such as i3 but it’s not a problem for others. Make the choice
available via an argument to the derivation.

The setting defaults to `false` so that it works for a broader
set of users.

See also: #99279.
This commit is contained in:
Olli Helenius 2021-06-08 22:57:13 +03:00
parent 12e7af1cfb
commit c878a8a47f
No known key found for this signature in database
GPG Key ID: 65B7BEC581BD1DD1

View File

@ -12,7 +12,8 @@
, coreutils
, gawk
, xdg-utils
, systemd }:
, systemd
, enableRectOverlay ? false }:
stdenv.mkDerivation rec {
pname = "teams";
@ -57,9 +58,11 @@ stdenv.mkDerivation rec {
ln -s $out/opt/teams/teams $out/bin/
${lib.optionalString (!enableRectOverlay) ''
# Work-around screen sharing bug
# https://docs.microsoft.com/en-us/answers/questions/42095/sharing-screen-not-working-anymore-bug.html
rm $out/opt/teams/resources/app.asar.unpacked/node_modules/slimcore/bin/rect-overlay
''}
runHook postInstall
'';