Skip to content

Commit

Permalink
firefox: fix file collisions between different flavors
Browse files Browse the repository at this point in the history
Each derivation flavor should use its own app bundle name.

Closes: NixOS#378433

TODO: confirm thunderbird is fixed too. (May need adjustment to bundle
names using applicationName argument.)

Signed-off-by: Ihar Hrachyshka <[email protected]>
  • Loading branch information
booxter committed Feb 1, 2025
1 parent d8a92f0 commit 95aa425
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkgs/applications/networking/browsers/firefox/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,9 @@ buildStdenv.mkDerivation {

postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
cp -r dist/${binaryName}/*.app $out/Applications
cp -r dist/${binaryName}/*.app "$out/Applications/${applicationName}.app"
appBundlePath=(dist/${binaryName}/*.app)
appBundle=''${appBundlePath[0]#dist/${binaryName}}
resourceDir=$out/Applications/$appBundle/Contents/Resources
resourceDir="$out/Applications/${applicationName}.app/Contents/Resources"
'' + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
# Remove SDK cruft. FIXME: move to a separate output?
Expand All @@ -621,7 +619,7 @@ buildStdenv.mkDerivation {
# Some basic testing
doInstallCheck = true;
installCheckPhase = lib.optionalString buildStdenv.hostPlatform.isDarwin ''
bindir=$out/Applications/$appBundle/Contents/MacOS
bindir=$out/Applications/${applicationName}.app/Contents/MacOS
'' + lib.optionalString (!buildStdenv.hostPlatform.isDarwin) ''
bindir=$out/bin
'' + ''
Expand Down

0 comments on commit 95aa425

Please sign in to comment.