2014-06-07 13:11:50 +01:00
|
|
|
{ stdenv, fetchgit, php, flex, makeWrapper }:
|
2014-05-21 21:17:52 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
libphutil = fetchgit {
|
|
|
|
url = "git://github.com/facebook/libphutil.git";
|
2014-08-13 03:51:32 +01:00
|
|
|
rev = "49f08a756a54f12405d3704c0f978b71c7b13811";
|
|
|
|
sha256 = "b32267fe19c6e9532887388815b8553519e2844bc5b839b5ad35efeab6b07fb8";
|
2014-05-21 21:17:52 +01:00
|
|
|
};
|
|
|
|
arcanist = fetchgit {
|
|
|
|
url = "git://github.com/facebook/arcanist.git";
|
2014-08-13 03:51:32 +01:00
|
|
|
rev = "4c0edd296e3301fffdda33c447f6fcafe7d1de01";
|
|
|
|
sha256 = "a9f162fb6b47bcf628130e0e8988ab650278b3a6606fa425e4707241ed22dd3e";
|
2014-05-21 21:17:52 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "arcanist-${version}";
|
2014-08-13 03:51:32 +01:00
|
|
|
version = "20140812";
|
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
|
|
|
|
|
|
|
unpackPhase = "true";
|
2014-06-07 13:11:50 +01:00
|
|
|
buildPhase = ''
|
|
|
|
ORIG=`pwd`
|
2014-06-09 07:25:20 +01:00
|
|
|
cp -R ${libphutil} libphutil
|
|
|
|
cp -R ${arcanist} arcanist
|
2014-06-09 07:29:53 +01:00
|
|
|
chmod +w -R libphutil arcanist
|
2014-06-09 07:25:20 +01:00
|
|
|
cd libphutil/support/xhpast
|
2014-06-07 13:11:50 +01:00
|
|
|
make clean all install
|
|
|
|
cd $ORIG
|
|
|
|
'';
|
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 ];
|
|
|
|
};
|
|
|
|
}
|