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