teams-for-linux: fix notification sounds

This commit is contained in:
Lily Foster 2023-03-08 10:28:55 -05:00
parent 249425ecb7
commit fadb7ecfc2
No known key found for this signature in database
GPG Key ID: 49340081E484C893

View File

@ -11,6 +11,7 @@
, electron
, libpulseaudio
, pipewire
, alsa-utils
}:
stdenv.mkDerivation rec {
@ -67,8 +68,12 @@ stdenv.mkDerivation rec {
done
popd
# Linux needs 'aplay' for notification sounds, 'libpulse' for meeting sound, and 'libpipewire' for screen sharing
makeWrapper '${electron}/bin/electron' "$out/bin/teams-for-linux" \
${lib.optionalString stdenv.isLinux "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpulseaudio pipewire ]}"} \
${lib.optionalString stdenv.isLinux ''
--prefix PATH : ${lib.makeBinPath [ alsa-utils ]} \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpulseaudio pipewire ]} \
''} \
--add-flags "$out/share/teams-for-linux/app.asar" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"