about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/version-management/git-and-tools/git-team/default.nix
blob: 3fac0dc9791b0f4c1bc6e339d5913b745aa9edbb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
  pname = "git-team";
  version = "1.7.0";

  src = fetchFromGitHub {
    owner = "hekmekk";
    repo = "git-team";
    rev = "v${version}";
    sha256 = "0nl5j64b61jw4bkf29y51svjbndmqqrqx96yaip4vjzj2dx9ywm4";
  };

  vendorSha256 = "sha256-xJMWPDuqoNtCCUnKuUvwlYztyrej1uZttC0NsDvYnXI=";

  nativeBuildInputs = [ installShellFiles ];

  postInstall = ''
    go run main.go --generate-man-page > ${pname}.1
    installManPage ${pname}.1

    # Currently only bash completions are provided
    installShellCompletion --cmd git-team --bash <($out/bin/git-team completion bash)
  '';

  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 ];
  };
}