summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-bug-migration/default.nix
blob: 36ddc93d839c5629cb929f14c81c5142eed44a5b (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
32
33
34
{ lib, buildGoModule, fetchFromGitHub, git }:
buildGoModule rec {
  pname = "git-bug-migration";
  version = "0.3.4";

  src = fetchFromGitHub {
    owner = "MichaelMure";
    repo = "git-bug-migration";
    rev = "v${version}";
    hash = "sha256-IOBgrU3C0ZHD2wx9LRVgKEJzDlUj6z2UXlHGU3tdTdQ=";
  };

  vendorSha256 = "sha256-Hid9OK91LNjLmDHam0ZlrVQopVOsqbZ+BH2rfQi5lS0=";

  nativeCheckInputs = [ git ];

  ldflags = [
    "-X main.GitExactTag=${version}"
    "-X main.GitLastTag=${version}"
  ];

  preCheck = ''
    export HOME=$(mktemp -d)
    git config --global user.name 'Nixpkgs Test User'
    git config --global user.email 'nobody@localhost'
  '';

  meta =  with lib; {
    description = "Tool for upgrading repositories using git-bug to new versions";
    homepage = "https://github.com/MichaelMure/git-bug-migration";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ DeeUnderscore ];
  };
}