1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 gitMinimal,
6}:
7buildGoModule rec {
8 pname = "git-bug-migration";
9 version = "0.3.4";
10
11 src = fetchFromGitHub {
12 owner = "MichaelMure";
13 repo = "git-bug-migration";
14 rev = "v${version}";
15 hash = "sha256-IOBgrU3C0ZHD2wx9LRVgKEJzDlUj6z2UXlHGU3tdTdQ=";
16 };
17
18 vendorHash = "sha256-Hid9OK91LNjLmDHam0ZlrVQopVOsqbZ+BH2rfQi5lS0=";
19
20 nativeCheckInputs = [ gitMinimal ];
21
22 ldflags = [
23 "-X main.GitExactTag=${version}"
24 "-X main.GitLastTag=${version}"
25 ];
26
27 preCheck = ''
28 export HOME=$(mktemp -d)
29 git config --global user.name 'Nixpkgs Test User'
30 git config --global user.email 'nobody@localhost'
31 '';
32
33 meta = with lib; {
34 description = "Tool for upgrading repositories using git-bug to new versions";
35 homepage = "https://github.com/MichaelMure/git-bug-migration";
36 license = licenses.gpl3Plus;
37 maintainers = with maintainers; [
38 DeeUnderscore
39 sudoforge
40 ];
41 mainProgram = "git-bug-migration";
42 };
43}