summary refs log blame commit diff
path: root/pkgs/development/tools/git-quick-stats/default.nix
blob: 2b775de4e43d9a542bc8f535ee97c3111de2bf6c (plain) (tree)
1
2
3
4
5
6
7
8
9







                 
            

  
                         
                            
                    
 


                             
                  
                                                                   
    














                                          
                  





                                                                  







                                                                                              
{ stdenv
, fetchFromGitHub
, makeWrapper
, coreutils
, gawk
, git
, gnugrep
, ncurses
, util-linux
}:

stdenv.mkDerivation rec {
  pname = "git-quick-stats";
  version = "2.1.5";

  src = fetchFromGitHub {
    repo = "git-quick-stats";
    owner = "arzzen";
    rev = version;
    sha256 = "sha256-d5B+SSUXtOD4x+dChQsUCkiHuHcW3lOrL4QhQekY7cA=";
  };

  nativeBuildInputs = [ makeWrapper ];

  installFlags = [
    "PREFIX=${builtins.placeholder "out"}"
  ];

  postInstall =
    let
      path = stdenv.lib.makeBinPath [
        coreutils
        gawk
        git
        gnugrep
        ncurses
        util-linux
      ];
    in
    ''
      wrapProgram $out/bin/git-quick-stats --suffix PATH : ${path}
    '';

  meta = with stdenv.lib; {
    homepage = "https://github.com/arzzen/git-quick-stats";
    description = "A simple and efficient way to access various statistics in git repository";
    platforms = platforms.all;
    maintainers = [ maintainers.kmein ];
    license = licenses.mit;
  };
}