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
This commit is contained in:
Christian Albrecht 2020-12-13 11:58:23 +01:00
parent b568bcf001
commit 5a7530e762
No known key found for this signature in database
GPG key ID: 866AF4B25DF7EB00

View file

@ -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;