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