From 08655b16f29e559bf6a4b10a6577e61febbf641f Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 8 Aug 2018 21:14:59 -0400 Subject: [PATCH] firefox: fix darwin wrapper - add execdir passthru usually this is /bin on macOS it is different. --- .../networking/browsers/firefox-bin/default.nix | 1 + pkgs/applications/networking/browsers/firefox/common.nix | 2 +- pkgs/applications/networking/browsers/firefox/wrapper.nix | 6 +++++- .../networking/browsers/tor-browser-bundle/default.nix | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox-bin/default.nix b/pkgs/applications/networking/browsers/firefox-bin/default.nix index 570180d4c4df..1fbcb3d97143 100644 --- a/pkgs/applications/networking/browsers/firefox-bin/default.nix +++ b/pkgs/applications/networking/browsers/firefox-bin/default.nix @@ -174,6 +174,7 @@ stdenv.mkDerivation { gappsWrapperArgs+=(--argv0 "$out/bin/.firefox-wrapped") ''; + passthru.execdir = "/bin"; passthru.ffmpegSupport = true; passthru.gssSupport = true; # update with: diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 15486fc82e97..e2a3d4430df7 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -263,7 +263,7 @@ stdenv.mkDerivation (rec { installPhase = if stdenv.isDarwin then '' mkdir -p $out/Applications - cp -RL Firefox.app $out/Applications + cp -LR dist/Firefox.app $out/Applications '' else null; postInstall = lib.optionalString stdenv.isLinux '' diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 313d1b1d8c82..a60d533c5a58 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -101,7 +101,11 @@ let nativeBuildInputs = [ makeWrapper lndir ]; buildInputs = lib.optional (browser ? gtk3) browser.gtk3; - buildCommand = '' + buildCommand = lib.optionalString stdenv.isDarwin '' + mkdir -p $out/Applications + cp -R --no-preserve=mode,ownership ${browser}/Applications/${browserName}.app $out/Applications + rm -f $out${browser.execdir}/${browserName} + '' + '' if [ ! -x "${browser}${browser.execdir}/${browserName}" ] then echo "cannot find executable file \`${browser}${browser.execdir}/${browserName}'" diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix index 031c520275fe..50b992253cea 100644 --- a/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix +++ b/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix @@ -337,6 +337,7 @@ stdenv.mkDerivation rec { $out/bin/tor-browser -version >/dev/null ''; + passthru.execdir = "/bin"; meta = with stdenv.lib; { description = "An unofficial version of the tor browser bundle, built from source"; homepage = https://torproject.org/;