at 18.03-beta 39 lines 1.1 kB view raw
1{ stdenv, fetchzip, perl, python, gnuplot, coreutils, gnugrep }: 2 3stdenv.mkDerivation rec { 4 name = "gitstats-${version}"; 5 version = "2016-01-08"; 6 7 # upstream does not make releases 8 src = fetchzip { 9 url = "https://github.com/hoxu/gitstats/archive/55c5c285558c410bb35ebf421245d320ab9ee9fa.zip"; 10 sha256 = "1bfcwhksylrpm88vyp33qjby4js31zcxy7w368dzjv4il3fh2i59"; 11 name = name + "-src"; 12 }; 13 14 buildInputs = [ perl python ]; 15 16 postPatch = '' 17 sed -e "s|gnuplot_cmd = .*|gnuplot_cmd = '${gnuplot}/bin/gnuplot'|" \ 18 -e "s|\<wc\>|${coreutils}/bin/wc|g" \ 19 -e "s|\<grep\>|${gnugrep}/bin/grep|g" \ 20 -i gitstats 21 ''; 22 23 buildPhase = '' 24 make man VERSION="${version}" 25 ''; 26 27 installPhase = '' 28 make install PREFIX="$out" VERSION="${version}" 29 install -Dm644 doc/gitstats.1 "$out"/share/man/man1/gitstats.1 30 ''; 31 32 meta = with stdenv.lib; { 33 homepage = http://gitstats.sourceforge.net/; 34 description = "Git history statistics generator"; 35 license = licenses.gpl2Plus; 36 platforms = platforms.all; 37 maintainers = [ maintainers.bjornfor ]; 38 }; 39}