2022-08-21 13:32:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2022-12-02 08:20:57 +00:00
|
|
|
, go-mockery
|
2022-08-21 13:32:41 +00:00
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "git-team";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.8.1";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hekmekk";
|
|
|
|
repo = "git-team";
|
|
|
|
rev = "v${version}";
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-+j5d1tImVHaTx63uzLdh2YNCFa1ErAVv4OMwxOutBQ4=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
vendorHash = "sha256-NTOUL1oE2IhgLyYYHwRCMW5yCxIRxUwqkfuhSSBXf6A=";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
go-mockery
|
|
|
|
installShellFiles
|
|
|
|
];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
preBuild = ''
|
|
|
|
mockery --dir=src/ --all --keeptree
|
|
|
|
'';
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2022-12-02 08:20:57 +00:00
|
|
|
go run main.go --generate-man-page > git-team.1
|
|
|
|
installManPage git-team.1
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
installShellCompletion --cmd git-team \
|
|
|
|
--bash <($out/bin/git-team completion bash) \
|
|
|
|
--zsh <($out/bin/git-team completion zsh)
|
2022-03-30 09:31:56 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Command line interface for managing and enhancing git commit messages with co-authors";
|
|
|
|
homepage = "https://github.com/hekmekk/git-team";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lockejan ];
|
|
|
|
};
|
|
|
|
}
|