From a2e886428b4a52bd908a3eccd5c4a6f48993dccf Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Thu, 3 Apr 2025 23:18:10 -0400 Subject: [PATCH] firefox: copy *.dylibs on darwin Without these, some functionality seems broken (e.g. Crypto API). Resolves #394029 Signed-off-by: Ihar Hrachyshka --- pkgs/applications/networking/browsers/firefox/wrapper.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index c753b04fb700..f6244310858a 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -405,10 +405,12 @@ let + lib.optionalString isDarwin '' cd "${appPath}" - # These files have to be copied and not symlinked, otherwise tabs crash. + # The omni.ja 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 - for file in $(find . -type l -name "omni.ja"); do + # + # The *.dylib files are copied, otherwise some basic functionality, e.g. Crypto API, is broken. + for file in $(find . -name "omni.ja" -o -name "*.dylib"); do rm "$file" cp "${browser}/${appPath}/$file" "$file" done