From 2f612756f0e9346a42f06d76f2e8395bbaae082b Mon Sep 17 00:00:00 2001 From: talyz Date: Sat, 9 May 2020 18:33:57 +0200 Subject: [PATCH] arcanist: Fix on darwin With recent work done on the PHP packaging, the PHP executable is by default a wrapper script. Darwin doesn't like scripts in the shebang of another script, so we have to wrap arcanist, feeding the script as an argument to PHP instead. See #86881 and #23018. --- pkgs/development/tools/misc/arcanist/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/misc/arcanist/default.nix b/pkgs/development/tools/misc/arcanist/default.nix index 5eeae0ece5c..a6265ba89d0 100644 --- a/pkgs/development/tools/misc/arcanist/default.nix +++ b/pkgs/development/tools/misc/arcanist/default.nix @@ -42,10 +42,12 @@ stdenv.mkDerivation { mkdir -p $out/bin $out/libexec cp -R libphutil $out/libexec/libphutil cp -R arcanist $out/libexec/arcanist - - ln -s $out/libexec/arcanist/bin/arc $out/bin - wrapProgram $out/bin/arc \ - --prefix PATH : "${php}/bin" + ${if stdenv.isDarwin then '' + echo "#! $shell -e" > $out/bin/arc + echo "exec ${php}/bin/php $out/libexec/arcanist/scripts/arcanist.php "'"$@"' >> $out/bin/arc + chmod +x $out/bin/arc'' + else '' + ln -s $out/libexec/arcanist/scripts/arcanist.php $out/bin/arc''} ''; meta = {