1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-14 16:46:09 +00:00
nixpkgs/pkgs/development/tools/misc/arcanist/default.nix

50 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchgit, php, flex, makeWrapper }:
let
libphutil = fetchgit {
url = "git://github.com/phacility/libphutil.git";
rev = "b25e0477b280ca3e8345bb97cd55e95bcb5023ec";
sha256 = "04l1am6k3xcjya3dscjb3vacg0fklbzqiv84qqi98rq3b3mgyhz8";
};
arcanist = fetchgit {
url = "git://github.com/phacility/arcanist.git";
rev = "2234c8cacc21ce61c9c10e8e5918b6a63cc38fc8";
sha256 = "1c0wsgg10v94iy8dwa8pw4qcxafn7nvb9s57x2ps4a08lxakimn0";
};
in
stdenv.mkDerivation rec {
name = "arcanist-${version}";
version = "20160516";
src = [ arcanist libphutil ];
buildInputs = [ php makeWrapper flex ];
unpackPhase = "true";
buildPhase = ''
ORIG=`pwd`
cp -R ${libphutil} libphutil
cp -R ${arcanist} arcanist
chmod +w -R libphutil arcanist
cd libphutil/support/xhpast
make clean all install
cd $ORIG
'';
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
wrapProgram $out/bin/arc \
--prefix PATH : "${php}/bin"
'';
meta = {
description = "Command line interface to Phabricator";
homepage = "http://phabricator.org";
license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
};
}