2021-11-02 13:24:09 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, perl, python2, gnuplot, coreutils, gnugrep }:
|
2016-02-28 12:31:35 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gitstats";
|
2016-02-28 12:31:35 +00:00
|
|
|
version = "2016-01-08";
|
|
|
|
|
|
|
|
# upstream does not make releases
|
2021-11-02 13:24:09 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hoxu";
|
|
|
|
repo = "gitstats";
|
|
|
|
rev = "55c5c285558c410bb35ebf421245d320ab9ee9fa";
|
|
|
|
sha256 = "sha256-qUQB3aCRbPkbMoMf39kPQ0vil8RjXL8RqjdTryfkzK0=";
|
2016-02-28 12:31:35 +00:00
|
|
|
};
|
|
|
|
|
2021-03-25 14:32:01 +00:00
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
|
|
|
|
buildInputs = [ python2 ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
2016-02-28 12:31:35 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -e "s|gnuplot_cmd = .*|gnuplot_cmd = '${gnuplot}/bin/gnuplot'|" \
|
|
|
|
-e "s|\<wc\>|${coreutils}/bin/wc|g" \
|
|
|
|
-e "s|\<grep\>|${gnugrep}/bin/grep|g" \
|
|
|
|
-i gitstats
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make man VERSION="${version}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
make install PREFIX="$out" VERSION="${version}"
|
|
|
|
install -Dm644 doc/gitstats.1 "$out"/share/man/man1/gitstats.1
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://gitstats.sourceforge.net/";
|
2016-02-28 12:31:35 +00:00
|
|
|
description = "Git history statistics generator";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|