about summary refs log tree commit diff
path: root/pkgs/applications/version-management/gitstats
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2016-02-28 13:31:35 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2016-02-28 15:00:52 +0100
commit070dccae7bbb61166fabd7b1cea15c46894ac3aa (patch)
treef4466971594b77bf40c288b208fb0d10d0940df9 /pkgs/applications/version-management/gitstats
parentfde23a01b4778bd5e044e8e80458ed4dd8c29dca (diff)
gitstats: init at 2016-01-08
Upstream does not make releases, using latest commit from master branch.
Diffstat (limited to 'pkgs/applications/version-management/gitstats')
-rw-r--r--pkgs/applications/version-management/gitstats/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/gitstats/default.nix b/pkgs/applications/version-management/gitstats/default.nix
new file mode 100644
index 0000000000000..64b6e2107f6a1
--- /dev/null
+++ b/pkgs/applications/version-management/gitstats/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchzip, perl, python, gnuplot, coreutils, gnugrep }:
+
+stdenv.mkDerivation rec {
+  name = "gitstats-${version}";
+  version = "2016-01-08";
+
+  # upstream does not make releases
+  src = fetchzip {
+    url = "https://github.com/hoxu/gitstats/archive/55c5c285558c410bb35ebf421245d320ab9ee9fa.zip";
+    sha256 = "1bfcwhksylrpm88vyp33qjby4js31zcxy7w368dzjv4il3fh2i59";
+    name = name + "-src";
+  };
+
+  buildInputs = [ perl python ];
+
+  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
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://gitstats.sourceforge.net/;
+    description = "Git history statistics generator";
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}