From 705cea1e5238eab3875b63cf916253c83a7e8bf8 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Sun, 16 Feb 2025 22:07:41 -0500 Subject: [PATCH] thunderbird: fix build failure due to different path to omni.ja Signed-off-by: Ihar Hrachyshka --- .../networking/browsers/firefox/wrapper.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 2d704cdddaa0..5aebff66b1f4 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -320,18 +320,20 @@ let ln -sfT "$target" "$out/$l" done + cd "$out" + '' + lib.optionalString isDarwin '' # 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 - for path in "" "browser"; do - omniPath="${appPath}/Contents/Resources/$path/" - rm "$out/$omniPath/omni.ja" - cp "${browser}/$omniPath/omni.ja" "$out/$omniPath/" + cd "${appPath}" + for file in $(find . -type l -name "omni.ja"); do + rm "$file" + cp "${browser}/${appPath}/$file" "$file" done + cd .. '' + '' - cd "$out" # create the wrapper