arcanist: 20200127 -> 20200711 (#93678)
Note that this arcanist bump introduces some breaking changes to the tool interface.
This commit is contained in:
parent
4fe5107376
commit
3a64e5f72e
1 changed files with 37 additions and 36 deletions
|
@ -1,53 +1,54 @@
|
||||||
{ stdenv, fetchFromGitHub, php, flex, makeWrapper }:
|
{ stdenv, fetchFromGitHub, php, flex }:
|
||||||
|
|
||||||
|
# Make a custom wrapper. If `wrapProgram` is used, arcanist thinks .arc-wrapped is being
|
||||||
|
# invoked and complains about it being an unknown toolset. We could use `makeWrapper`, but
|
||||||
|
# then we’d need to still craft a script that does the `php libexec/arcanist/bin/...` dance
|
||||||
|
# anyway... So just do everything at once.
|
||||||
|
let makeArcWrapper = toolset: ''
|
||||||
|
cat << WRAPPER > $out/bin/${toolset}
|
||||||
|
#!$shell -e
|
||||||
|
export PATH='${php}/bin/'\''${PATH:+':'}\$PATH
|
||||||
|
exec ${php}/bin/php $out/libexec/arcanist/bin/${toolset} "\$@"
|
||||||
|
WRAPPER
|
||||||
|
chmod +x $out/bin/${toolset}
|
||||||
|
'';
|
||||||
|
|
||||||
let
|
|
||||||
libphutil = fetchFromGitHub {
|
|
||||||
owner = "phacility";
|
|
||||||
repo = "libphutil";
|
|
||||||
rev = "cc2a3dbf590389400da55563cb6993f321ec6d73";
|
|
||||||
sha256 = "1k7sr3racwz845i7r5kdwvgqrz8gldz07pxj3yw77s58rqbix3ad";
|
|
||||||
};
|
|
||||||
arcanist = fetchFromGitHub {
|
|
||||||
owner = "phacility";
|
|
||||||
repo = "arcanist";
|
|
||||||
rev = "21a1828ea06cf031e93082db8664d73efc88290a";
|
|
||||||
sha256 = "05rq9l9z7446ks270viay57r5ibx702b5bnlf4ck529zc4abympx";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "arcanist";
|
pname = "arcanist";
|
||||||
version = "20200127";
|
version = "20200711";
|
||||||
|
|
||||||
src = [ arcanist libphutil ];
|
src = fetchFromGitHub {
|
||||||
buildInputs = [ php makeWrapper flex ];
|
owner = "phacility";
|
||||||
|
repo = "arcanist";
|
||||||
unpackPhase = ''
|
rev = "2565cc7b4d1dbce6bc7a5b3c4e72ae94be4712fe";
|
||||||
cp -aR ${libphutil} libphutil
|
sha256 = "0jiv4aj4m5750dqw9r8hizjkwiyxk4cg4grkr63sllsa2dpiibxw";
|
||||||
cp -aR ${arcanist} arcanist
|
};
|
||||||
chmod +w -R libphutil arcanist
|
buildInputs = [ php flex ];
|
||||||
'';
|
|
||||||
|
|
||||||
postPatch = stdenv.lib.optionalString stdenv.isAarch64 ''
|
postPatch = stdenv.lib.optionalString stdenv.isAarch64 ''
|
||||||
substituteInPlace libphutil/support/xhpast/Makefile \
|
substituteInPlace support/xhpast/Makefile \
|
||||||
--replace "-minline-all-stringops" ""
|
--replace "-minline-all-stringops" ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
(
|
make xhpast -C support/xhpast
|
||||||
cd libphutil/support/xhpast
|
|
||||||
make clean all install
|
|
||||||
)
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/libexec
|
mkdir -p $out/bin $out/libexec
|
||||||
cp -R libphutil $out/libexec/libphutil
|
make install -C support/xhpast
|
||||||
cp -R arcanist $out/libexec/arcanist
|
cp -R $src $out/libexec/arcanist
|
||||||
${if stdenv.isDarwin then ''
|
|
||||||
echo "#! $shell -e" > $out/bin/arc
|
${makeArcWrapper "arc"}
|
||||||
echo "exec ${php}/bin/php $out/libexec/arcanist/scripts/arcanist.php "'"$@"' >> $out/bin/arc
|
${makeArcWrapper "phage"}
|
||||||
chmod +x $out/bin/arc''
|
'';
|
||||||
else ''
|
|
||||||
ln -s $out/libexec/arcanist/scripts/arcanist.php $out/bin/arc''}
|
doInstallCheck = true;
|
||||||
|
installCheckPhase = ''
|
||||||
|
$out/bin/arc help diff -- > /dev/null
|
||||||
|
$out/bin/phage help alias -- > /dev/null
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
Loading…
Reference in a new issue