firefox: fix darwin wrapper

- add execdir passthru
  usually this is /bin on macOS it is different.
This commit is contained in:
Matthew Bauer 2018-08-08 21:14:59 -04:00
parent c391bd3dd3
commit 08655b16f2
4 changed files with 8 additions and 2 deletions

View file

@ -174,6 +174,7 @@ stdenv.mkDerivation {
gappsWrapperArgs+=(--argv0 "$out/bin/.firefox-wrapped") gappsWrapperArgs+=(--argv0 "$out/bin/.firefox-wrapped")
''; '';
passthru.execdir = "/bin";
passthru.ffmpegSupport = true; passthru.ffmpegSupport = true;
passthru.gssSupport = true; passthru.gssSupport = true;
# update with: # update with:

View file

@ -263,7 +263,7 @@ stdenv.mkDerivation (rec {
installPhase = if stdenv.isDarwin then '' installPhase = if stdenv.isDarwin then ''
mkdir -p $out/Applications mkdir -p $out/Applications
cp -RL Firefox.app $out/Applications cp -LR dist/Firefox.app $out/Applications
'' else null; '' else null;
postInstall = lib.optionalString stdenv.isLinux '' postInstall = lib.optionalString stdenv.isLinux ''

View file

@ -101,7 +101,11 @@ let
nativeBuildInputs = [ makeWrapper lndir ]; nativeBuildInputs = [ makeWrapper lndir ];
buildInputs = lib.optional (browser ? gtk3) browser.gtk3; 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}" ] if [ ! -x "${browser}${browser.execdir}/${browserName}" ]
then then
echo "cannot find executable file \`${browser}${browser.execdir}/${browserName}'" echo "cannot find executable file \`${browser}${browser.execdir}/${browserName}'"

View file

@ -337,6 +337,7 @@ stdenv.mkDerivation rec {
$out/bin/tor-browser -version >/dev/null $out/bin/tor-browser -version >/dev/null
''; '';
passthru.execdir = "/bin";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "An unofficial version of the tor browser bundle, built from source"; description = "An unofficial version of the tor browser bundle, built from source";
homepage = https://torproject.org/; homepage = https://torproject.org/;