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";
|
2016-05-16 19:54:16 +01:00
|
|
|
rev = "b25e0477b280ca3e8345bb97cd55e95bcb5023ec";
|
|
|
|
sha256 = "04l1am6k3xcjya3dscjb3vacg0fklbzqiv84qqi98rq3b3mgyhz8";
|
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";
|
2016-05-16 19:54:16 +01:00
|
|
|
rev = "2234c8cacc21ce61c9c10e8e5918b6a63cc38fc8";
|
|
|
|
sha256 = "1c0wsgg10v94iy8dwa8pw4qcxafn7nvb9s57x2ps4a08lxakimn0";
|
2014-05-21 21:17:52 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "arcanist-${version}";
|
2016-05-16 19:54:16 +01:00
|
|
|
version = "20160516";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|