arcanist: copy directly from $PWD to pick up any applied patches (#95879)

This commit is contained in:
Phillip Cloud 2020-11-09 14:43:52 -05:00 committed by GitHub
parent 05192975fb
commit 2472122bf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,9 @@
{ stdenv, fetchFromGitHub, php, flex }:
{ bison
, fetchFromGitHub
, flex
, php
, stdenv
}:
# 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
@ -14,7 +19,6 @@ let makeArcWrapper = toolset: ''
'';
in
stdenv.mkDerivation {
pname = "arcanist";
version = "20200711";
@ -25,7 +29,7 @@ stdenv.mkDerivation {
rev = "2565cc7b4d1dbce6bc7a5b3c4e72ae94be4712fe";
sha256 = "0jiv4aj4m5750dqw9r8hizjkwiyxk4cg4grkr63sllsa2dpiibxw";
};
buildInputs = [ php flex ];
buildInputs = [ bison flex php ];
postPatch = stdenv.lib.optionalString stdenv.isAarch64 ''
substituteInPlace support/xhpast/Makefile \
@ -33,13 +37,15 @@ stdenv.mkDerivation {
'';
buildPhase = ''
make cleanall -C support/xhpast
make xhpast -C support/xhpast
'';
installPhase = ''
mkdir -p $out/bin $out/libexec
make install -C support/xhpast
cp -R $src $out/libexec/arcanist
make cleanall -C support/xhpast
cp -R . $out/libexec/arcanist
${makeArcWrapper "arc"}
${makeArcWrapper "phage"}