2014-06-07 13:11:50 +01:00
|
|
|
{ stdenv, fetchgit, php, flex, makeWrapper }:
|
2014-05-21 21:17:52 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
libphutil = fetchgit {
|
2015-01-18 07:49:34 +00:00
|
|
|
url = "git://github.com/phacility/libphutil.git";
|
2015-08-16 22:44:57 +01:00
|
|
|
rev = "e509fc30ae782af97f3535b1febbf50d0f919d5a";
|
|
|
|
sha256 = "087dc5aadf1f78ebc7cf2b9107422f211b98ac96493fab8cf6bd9924ba77d986";
|
2014-05-21 21:17:52 +01:00
|
|
|
};
|
|
|
|
arcanist = fetchgit {
|
2015-01-18 07:49:34 +00:00
|
|
|
url = "git://github.com/phacility/arcanist.git";
|
2015-08-16 22:44:57 +01:00
|
|
|
rev = "fe8ed2a6f8b09b8c56e476ed1f9624d35732b776";
|
|
|
|
sha256 = "602fe03671c424d55af63e6288e906b350183bb42d558498ded005ae7e83fc85";
|
2014-05-21 21:17:52 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "arcanist-${version}";
|
2015-08-16 22:44:57 +01:00
|
|
|
version = "20150817";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|