2016-08-26 00:22:57 +01:00
|
|
|
{ stdenv, fetchFromGitHub, php, flex, makeWrapper }:
|
2014-05-21 21:17:52 +01:00
|
|
|
|
|
|
|
let
|
2016-08-26 00:22:57 +01:00
|
|
|
libphutil = fetchFromGitHub {
|
|
|
|
owner = "phacility";
|
|
|
|
repo = "libphutil";
|
2018-09-16 18:00:21 +01:00
|
|
|
rev = "3215e4e291ed4468faeed4542d47a571b5bc559a";
|
|
|
|
sha256 = "0bbinaxny0j4iniz2grf0s9cysbl3x24yc32f3jra9mwsgh2v2zj";
|
2014-05-21 21:17:52 +01:00
|
|
|
};
|
2016-08-26 00:22:57 +01:00
|
|
|
arcanist = fetchFromGitHub {
|
|
|
|
owner = "phacility";
|
|
|
|
repo = "arcanist";
|
2018-09-16 18:00:21 +01:00
|
|
|
rev = "2650e8627a20e1bfe334a4a2b787f44ef5d6ebc5";
|
|
|
|
sha256 = "0x0xxiar202ypbgxh19swzjil546bbp8li4k5yrpvab55y8ymkd4";
|
2014-05-21 21:17:52 +01:00
|
|
|
};
|
|
|
|
in
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "arcanist";
|
2018-09-16 18:00:21 +01:00
|
|
|
version = "20180916";
|
2014-05-21 21:17:52 +01:00
|
|
|
|
|
|
|
src = [ arcanist libphutil ];
|
2014-06-07 13:11:50 +01:00
|
|
|
buildInputs = [ php makeWrapper flex ];
|
2014-05-21 21:17:52 +01:00
|
|
|
|
2018-01-06 15:49:26 +00:00
|
|
|
unpackPhase = ''
|
2018-09-18 00:38:05 +01:00
|
|
|
cp -aR ${libphutil} libphutil
|
|
|
|
cp -aR ${arcanist} arcanist
|
2014-06-09 07:29:53 +01:00
|
|
|
chmod +w -R libphutil arcanist
|
2018-01-06 15:49:26 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = stdenv.lib.optionalString stdenv.isAarch64 ''
|
|
|
|
substituteInPlace libphutil/support/xhpast/Makefile \
|
|
|
|
--replace "-minline-all-stringops" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
2016-08-26 00:22:57 +01:00
|
|
|
(
|
|
|
|
cd libphutil/support/xhpast
|
|
|
|
make clean all install
|
|
|
|
)
|
2014-06-07 13:11:50 +01:00
|
|
|
'';
|
2014-05-21 21:17:52 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/libexec
|
2014-06-09 07:25:20 +01:00
|
|
|
cp -R libphutil $out/libexec/libphutil
|
|
|
|
cp -R arcanist $out/libexec/arcanist
|
2014-05-21 21:17:52 +01:00
|
|
|
|
|
|
|
ln -s $out/libexec/arcanist/bin/arc $out/bin
|
2014-05-30 21:19:12 +01:00
|
|
|
wrapProgram $out/bin/arc \
|
|
|
|
--prefix PATH : "${php}/bin"
|
2014-05-21 21:17:52 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Command line interface to Phabricator";
|
|
|
|
homepage = "http://phabricator.org";
|
2014-05-21 21:21:50 +01:00
|
|
|
license = stdenv.lib.licenses.asl20;
|
2014-05-21 21:17:52 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|