1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 18:42:15 +00:00

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.
This commit is contained in:
talyz 2020-05-09 18:33:57 +02:00
parent d4c2f1ab5d
commit 2f612756f0
No known key found for this signature in database
GPG key ID: 2DED2151F4671A2B

View file

@ -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 = {