firefox: also copy any embedded *.app bundles on Darwin

Without this, plugin-container fails to start.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
Ihar Hrachyshka
2025-02-20 20:51:02 -05:00
parent 705cea1e52
commit 2c5b25312a
@@ -323,14 +323,22 @@ let
cd "$out"
'' + lib.optionalString isDarwin ''
cd "${appPath}"
# These files have to be copied and not symlinked, otherwise tabs crash.
# Maybe related to how omni.ja file is mmapped into memory. See:
# https://github.com/mozilla/gecko-dev/blob/b1662b447f306e6554647914090d4b73ac8e1664/modules/libjar/nsZipArchive.cpp#L204
cd "${appPath}"
for file in $(find . -type l -name "omni.ja"); do
rm "$file"
cp "${browser}/${appPath}/$file" "$file"
done
# Copy any embedded .app directories; plugin-container fails to start otherwise.
for dir in $(find . -type d -name '*.app'); do
rm -r "$dir"
cp -r "${browser}/${appPath}/$dir" "$dir"
done
cd ..
'' + ''