1{ lib, buildGoModule, fetchFromGitHub }:
2
3buildGoModule rec {
4 pname = "git-bug";
5 version = "0.7.2"; # the `rev` below pins the version of the source to get
6 rev = "cc4a93c8ce931b1390c61035b888ad17110b7bd6";
7
8 src = fetchFromGitHub {
9 inherit rev;
10 owner = "MichaelMure";
11 repo = "git-bug";
12 sha256 = "0r6wh0y1fj3d3fbbrzq5n9k6z94xvwqww3xfbslkgyrin5bmziiq";
13 };
14
15 vendorSha256 = "15hhsrwwjc4krfc2d0r15lys3vr9rb9xk62pan4jr9ycbv0dny90";
16
17 doCheck = false;
18
19 ldflags = [
20 "-X github.com/MichaelMure/git-bug/commands.GitCommit=${rev}"
21 "-X github.com/MichaelMure/git-bug/commands.GitLastTag=${version}"
22 "-X github.com/MichaelMure/git-bug/commands.GitExactTag=${version}"
23 ];
24
25 postInstall = ''
26 install -D -m 0644 misc/bash_completion/git-bug "$out/share/bash-completion/completions/git-bug"
27 install -D -m 0644 misc/zsh_completion/git-bug "$out/share/zsh/site-functions/git-bug"
28 install -D -m 0644 -t "$out/share/man/man1" doc/man/*
29 '';
30
31 meta = with lib; {
32 description = "Distributed bug tracker embedded in Git";
33 homepage = "https://github.com/MichaelMure/git-bug";
34 license = licenses.gpl3Only;
35 maintainers = with maintainers; [ royneary ];
36 };
37}