Skip to content

Commit

Permalink
firefox: also copy any embedded *.app bundles on Darwin
Browse files Browse the repository at this point in the history
Without this, plugin-container fails to start.

Signed-off-by: Ihar Hrachyshka <[email protected]>
  • Loading branch information
booxter committed Feb 19, 2025
1 parent f67ff7e commit a383af4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkgs/applications/networking/browsers/firefox/wrapper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..
'' + ''
Expand Down

0 comments on commit a383af4

Please sign in to comment.