aboutsummaryrefslogtreecommitdiff
path: root/tools/git-blame-stats/default.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-10-16 19:03:35 -0700
committerFranck Cuny <franck@fcuny.net>2022-10-16 19:06:45 -0700
commit9d3fff359b6c2cea4ac69299f3c1621af8bde64c (patch)
tree95c5db67b6b94e0967404cb30d51f24f79331d72 /tools/git-blame-stats/default.nix
parentops(github): archive the repository govanity (diff)
downloadinfra-9d3fff359b6c2cea4ac69299f3c1621af8bde64c.tar.gz
ref(tools/git-blame-stats): rewrite the tool in python
The tool can calculate some stats about authors in a git repository. It computes the number of lines that are authored by authors at a given revision (HEAD by default), and the number of commits.
Diffstat (limited to 'tools/git-blame-stats/default.nix')
-rw-r--r--tools/git-blame-stats/default.nix24
1 files changed, 17 insertions, 7 deletions
diff --git a/tools/git-blame-stats/default.nix b/tools/git-blame-stats/default.nix
index 5071f10..767329b 100644
--- a/tools/git-blame-stats/default.nix
+++ b/tools/git-blame-stats/default.nix
@@ -1,15 +1,25 @@
-{ pkgs, buildGoModule, ... }:
+{ self, lib, python3, stdenvNoCC, pkgs }:
+
+stdenvNoCC.mkDerivation rec {
+ pname = "git-blame-stats";
+ src = ./git-blame-stats.py;
+ version = "0.1.1";
+
+ nativeBuildInputs = with pkgs; [ python3 ];
+
+ dontUnpack = true;
+ dontBuild = true;
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp $src $out/bin/${pname}
+ '';
-buildGoModule rec {
- name = "git-blame-stats";
- src = ./.;
- vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
- nativeBuildInputs = with pkgs; [ go ];
meta = with pkgs.lib; {
description = "CLI to reports git blame statistics per author.";
license = licenses.mit;
- platforms = platforms.linux;
+ platforms = platforms.unix;
maintainers = [ ];
};
}