From 5a7530e762912a6b32e7f77b69ea341dd000bcc2 Mon Sep 17 00:00:00 2001 From: Christian Albrecht Date: Sun, 13 Dec 2020 11:58:23 +0100 Subject: [PATCH] firefox-wayland: fix screen sharing using pipewire After the fedora patches for screen sharing using pipewire got updated for Firefox 83 (pipewire was inlined there), the nixpkgs buildInput pipewire got stripped from the resulting firefox binary and so firefox was unable to actually get the shared stream from the running pipewire service. Adding pipewire to the firefox binary with `patchelf --add-needed` makes it atually get the stream from the service. Fixes: #106812 --- pkgs/applications/networking/browsers/firefox/common.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 1fbfdc2a7da..20547be543c 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -352,6 +352,10 @@ buildStdenv.mkDerivation ({ }/lib:$(patchelf --print-rpath "$out"/lib/${binaryName}*/libxul.so)" \ "$out"/lib/${binaryName}*/libxul.so patchelf --add-needed ${xorg.libXScrnSaver.out}/lib/libXss.so $out/lib/${binaryName}/${binaryName} + ${lib.optionalString (pipewireSupport && lib.versionAtLeast ffversion "83") '' + patchelf --add-needed "${lib.getLib pipewire}/lib/libpipewire-0.3.so" \ + "$out"/lib/${binaryName}/${binaryName} + ''} ''; doInstallCheck = true;