nixpkgs/pkgs/applications/version-management/git-quick-stats/default.nix
2024-01-10 09:34:01 +00:00

53 lines
1.0 KiB
Nix

{ lib, stdenv
, fetchFromGitHub
, makeWrapper
, coreutils
, gawk
, git
, gnugrep
, ncurses
, util-linux
}:
stdenv.mkDerivation rec {
pname = "git-quick-stats";
version = "2.5.4";
src = fetchFromGitHub {
repo = "git-quick-stats";
owner = "arzzen";
rev = version;
sha256 = "sha256-dbi48rq3ijPa45xtTi6kAly/IwkX4aK1P9hmcPNQEqM=";
};
nativeBuildInputs = [ makeWrapper ];
installFlags = [
"PREFIX=${builtins.placeholder "out"}"
];
postInstall =
let
path = lib.makeBinPath [
coreutils
gawk
git
gnugrep
ncurses
util-linux
];
in
''
wrapProgram $out/bin/git-quick-stats --suffix PATH : ${path}
'';
meta = with 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;
mainProgram = "git-quick-stats";
};
}