electron: add libpulseaudio to RPATH

This commit is contained in:
Maximilian Marx 2024-04-16 14:59:49 +02:00
parent 6a0cf40cf4
commit 280c094f62
No known key found for this signature in database
GPG Key ID: D981CA0FF602751D
3 changed files with 3 additions and 11 deletions

View File

@ -9,9 +9,6 @@
, fetchYarnDeps , fetchYarnDeps
, prefetch-yarn-deps , prefetch-yarn-deps
, electron , electron
, libnotify
, libpulseaudio
, pipewire
, alsa-utils , alsa-utils
, which , which
, testers , testers
@ -72,11 +69,10 @@ stdenv.mkDerivation (finalAttrs: {
done done
popd popd
# Linux needs 'aplay' for notification sounds, 'libpulse' for meeting sound, 'libpipewire' for screen sharing and 'libnotify' for notifications # Linux needs 'aplay' for notification sounds
makeWrapper '${electron}/bin/electron' "$out/bin/teams-for-linux" \ makeWrapper '${electron}/bin/electron' "$out/bin/teams-for-linux" \
${lib.optionalString stdenv.isLinux '' ${lib.optionalString stdenv.isLinux ''
--prefix PATH : ${lib.makeBinPath [ alsa-utils which ]} \ --prefix PATH : ${lib.makeBinPath [ alsa-utils which ]} \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpulseaudio pipewire libnotify ]} \
''} \ ''} \
--add-flags "$out/share/teams-for-linux/app.asar" \ --add-flags "$out/share/teams-for-linux/app.asar" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"

View File

@ -42,11 +42,6 @@ buildNpmPackage rec {
# override installPhase so we can copy the only folders that matter # override installPhase so we can copy the only folders that matter
installPhase = installPhase =
let let
libPath = lib.makeLibraryPath [
libpulseaudio
pipewire
libnotify
];
binPath = lib.makeBinPath [ xdg-utils ]; binPath = lib.makeBinPath [ xdg-utils ];
in in
'' ''
@ -62,7 +57,6 @@ buildNpmPackage rec {
# Add xdg-utils to path via suffix, per PR #181171 # Add xdg-utils to path via suffix, per PR #181171
makeWrapper '${lib.getExe electron_29}' $out/bin/webcord \ makeWrapper '${lib.getExe electron_29}' $out/bin/webcord \
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/webcord \
--suffix PATH : "${binPath}" \ --suffix PATH : "${binPath}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
--add-flags $out/lib/node_modules/webcord/ --add-flags $out/lib/node_modules/webcord/

View File

@ -15,6 +15,7 @@
, pkgsBuildHost , pkgsBuildHost
, pipewire , pipewire
, libsecret , libsecret
, libpulseaudio
, info , info
}: }:
@ -198,6 +199,7 @@ in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
pipewire pipewire
stdenv.cc.cc.lib stdenv.cc.cc.lib
libsecret libsecret
libpulseaudio
]; ];
in in
base.postFixup + '' base.postFixup + ''