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-06-07 06:01:04 +02:00
|
|
|
rev = "7e75bf271c669b61eb6e6e2ea312a36e64b80a4a";
|
|
|
|
sha256 = "ffb7ee8141b925889e9bbc945d2f38f12d1489148b9c9b7eaeadd7524d254a78";
|
2014-05-21 22:17:52 +02:00
|
|
|
};
|
|
|
|
arcanist = fetchgit {
|
|
|
|
url = "git://github.com/facebook/arcanist.git";
|
2014-05-30 11:38:36 +02:00
|
|
|
rev = "50caec620a8ed45c54323cb71fee72fd0d935115";
|
|
|
|
sha256 = "dd18ed22375ad1ba058703952be0d339d9c93704e9d75dd7e4e6625236dfe9b0";
|
2014-05-21 22:17:52 +02:00
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "arcanist-${version}";
|
2014-06-07 06:01:04 +02:00
|
|
|
version = "20140606";
|
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`
|
|
|
|
chmod +w -R ${libphutil}
|
|
|
|
cd ${libphutil}/support/xhpast
|
|
|
|
ls
|
|
|
|
make clean all install
|
|
|
|
cd $ORIG
|
|
|
|
'';
|
2014-05-21 22:17:52 +02:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/libexec
|
|
|
|
cp -R ${libphutil} $out/libexec/libphutil
|
|
|
|
cp -R ${arcanist} $out/libexec/arcanist
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|