2014-06-07 14:11:50 +02:00
|
|
|
{ stdenv, fetchgit, php, flex, makeWrapper }:
|
2014-05-21 22:17:52 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
libphutil = fetchgit {
|
|
|
|
url = "git://github.com/facebook/libphutil.git";
|
2014-09-24 22:28:10 +02:00
|
|
|
rev = "6c29d5c8d169084927df75b18761312195080550";
|
|
|
|
sha256 = "5891e5d7688a2f026e02a2684a2002c0715f0492fd8475bdcb8fab2066eff37a";
|
2014-05-21 22:17:52 +02:00
|
|
|
};
|
|
|
|
arcanist = fetchgit {
|
|
|
|
url = "git://github.com/facebook/arcanist.git";
|
2014-09-24 22:28:10 +02:00
|
|
|
rev = "a70a00a960ff4a7e30e20b4db1c68c081f16eaa0";
|
|
|
|
sha256 = "37d9b80fbfc694df86a4bf75a540f81aa2e65f463d301d1f8a5930ecae8ba9fc";
|
2014-05-21 22:17:52 +02:00
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "arcanist-${version}";
|
2014-09-24 22:28:10 +02:00
|
|
|
version = "20140924";
|
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
|
|
|
|
|
|
|
unpackPhase = "true";
|
2014-06-07 14:11:50 +02:00
|
|
|
buildPhase = ''
|
|
|
|
ORIG=`pwd`
|
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
|
2014-06-09 08:25:20 +02:00
|
|
|
cd libphutil/support/xhpast
|
2014-06-07 14:11:50 +02:00
|
|
|
make clean all install
|
|
|
|
cd $ORIG
|
|
|
|
'';
|
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 ];
|
|
|
|
};
|
|
|
|
}
|