git-pkgs: init at 0.11.0 (#478226)

This commit is contained in:
Sandro 2026-03-01 03:03:14 +00:00 committed by GitHub
commit 7d0cf8135d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 58 additions and 0 deletions

View file

@ -3655,6 +3655,12 @@
github = "bmwalters";
githubId = 4380777;
};
bnjmnt4n = {
name = "Benjamin Tan";
github = "bnjmnt4n";
githubId = 813865;
email = "benjamin@dev.ofcr.se";
};
bnlrnz = {
github = "bnlrnz";
githubId = 11310385;

View file

@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
buildGoModule,
installShellFiles,
}:
buildGoModule rec {
pname = "git-pkgs";
version = "0.11.0";
src = fetchFromGitHub {
owner = "git-pkgs";
repo = "git-pkgs";
tag = "v${version}";
hash = "sha256-XjW3qwybTmzW2CNgu1Edgs5ZZ9xl3+uS4sT8VWD3jyQ=";
};
vendorHash = "sha256-/LJwq17f7SAjSV2ZcLrdaKZYf9RVJ9wtYqEsW0ubT1Q=";
subPackages = [ "." ];
ldflags = [
"-X github.com/git-pkgs/git-pkgs/cmd.version=${version}"
];
# Tries to access the internet.
doCheck = false;
nativeBuildInputs = [ installShellFiles ];
postBuild = ''
go run scripts/generate-man.go
installManPage man/*.1
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd git-pkgs \
--bash <($out/bin/git-pkgs completion bash) \
--fish <($out/bin/git-pkgs completion fish) \
--zsh <($out/bin/git-pkgs completion zsh)
'';
meta = {
homepage = "https://github.com/git-pkgs/git-pkgs";
description = "Git subcommand for analyzing package/dependency usage in git repositories over time";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ bnjmnt4n ];
platforms = lib.platforms.unix;
mainProgram = "git-pkgs";
};
}