1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 go-mockery_2,
6 installShellFiles,
7}:
8
9buildGoModule rec {
10 pname = "git-team";
11 version = "1.8.1";
12
13 src = fetchFromGitHub {
14 owner = "hekmekk";
15 repo = "git-team";
16 rev = "v${version}";
17 hash = "sha256-+j5d1tImVHaTx63uzLdh2YNCFa1ErAVv4OMwxOutBQ4=";
18 };
19
20 vendorHash = "sha256-NTOUL1oE2IhgLyYYHwRCMW5yCxIRxUwqkfuhSSBXf6A=";
21
22 nativeBuildInputs = [
23 go-mockery_2
24 installShellFiles
25 ];
26
27 preBuild = ''
28 mockery --dir=src/ --all --keeptree
29 '';
30
31 postInstall = ''
32 go run main.go --generate-man-page > git-team.1
33 installManPage git-team.1
34
35 installShellCompletion --cmd git-team \
36 --bash <($out/bin/git-team completion bash) \
37 --zsh <($out/bin/git-team completion zsh)
38 '';
39
40 meta = with lib; {
41 description = "Command line interface for managing and enhancing git commit messages with co-authors";
42 homepage = "https://github.com/hekmekk/git-team";
43 license = licenses.mit;
44 maintainers = with maintainers; [ lockejan ];
45 mainProgram = "git-team";
46 };
47}