2014-06-07 12:11:50 +00:00
|
|
|
{ stdenv, fetchgit, php, flex, makeWrapper }:
|
2014-05-21 20:17:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
libphutil = fetchgit {
|
|
|
|
url = "git://github.com/facebook/libphutil.git";
|
2014-07-17 06:26:44 +00:00
|
|
|
rev = "d8c026530d7f442eb0f93233b536cfb06aec911d";
|
|
|
|
sha256 = "6cbeb5b7640371f95ef017f3382f33a985a5c417f69e837fbb3b59c0332b5ecf";
|
2014-05-21 20:17:52 +00:00
|
|
|
};
|
|
|
|
arcanist = fetchgit {
|
|
|
|
url = "git://github.com/facebook/arcanist.git";
|
2014-07-17 06:26:44 +00:00
|
|
|
rev = "a9535446579af33dfa50f60dcc79c9edf633eebd";
|
|
|
|
sha256 = "8468f3beecdce2f62dc010ddade8ffbf0a8802f23ee88b91e09c09f173e692f6";
|
2014-05-21 20:17:52 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "arcanist-${version}";
|
2014-07-17 06:26:44 +00:00
|
|
|
version = "20140717";
|
2014-05-21 20:17:52 +00:00
|
|
|
|
|
|
|
src = [ arcanist libphutil ];
|
2014-06-07 12:11:50 +00:00
|
|
|
buildInputs = [ php makeWrapper flex ];
|
2014-05-21 20:17:52 +00:00
|
|
|
|
|
|
|
unpackPhase = "true";
|
2014-06-07 12:11:50 +00:00
|
|
|
buildPhase = ''
|
|
|
|
ORIG=`pwd`
|
2014-06-09 06:25:20 +00:00
|
|
|
cp -R ${libphutil} libphutil
|
|
|
|
cp -R ${arcanist} arcanist
|
2014-06-09 06:29:53 +00:00
|
|
|
chmod +w -R libphutil arcanist
|
2014-06-09 06:25:20 +00:00
|
|
|
cd libphutil/support/xhpast
|
2014-06-07 12:11:50 +00:00
|
|
|
make clean all install
|
|
|
|
cd $ORIG
|
|
|
|
'';
|
2014-05-21 20:17:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/libexec
|
2014-06-09 06:25:20 +00:00
|
|
|
cp -R libphutil $out/libexec/libphutil
|
|
|
|
cp -R arcanist $out/libexec/arcanist
|
2014-05-21 20:17:52 +00:00
|
|
|
|
|
|
|
ln -s $out/libexec/arcanist/bin/arc $out/bin
|
2014-05-30 20:19:12 +00:00
|
|
|
wrapProgram $out/bin/arc \
|
|
|
|
--prefix PATH : "${php}/bin"
|
2014-05-21 20:17:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Command line interface to Phabricator";
|
|
|
|
homepage = "http://phabricator.org";
|
2014-05-21 20:21:50 +00:00
|
|
|
license = stdenv.lib.licenses.asl20;
|
2014-05-21 20:17:52 +00:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|