biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / tools / jira-cli-go / default.nix
blobd031cd9394d78e02f1679c54883ae1400b498bbc
1 { lib, buildGoModule, fetchFromGitHub, less, more, installShellFiles, testers, jira-cli-go, nix-update-script }:
3 buildGoModule rec {
4   pname = "jira-cli-go";
5   version = "1.5.1";
7   src = fetchFromGitHub {
8     owner = "ankitpokhrel";
9     repo = "jira-cli";
10     rev = "v${version}";
11     hash = "sha256-edytj9hB8lDwy3qGSyLudu5G4DSRGKhD0vDoWz5eUgs=";
12   };
14   vendorHash = "sha256-DAdzbANqr0fa4uO8k/yJFoirgbZiKOQhOH8u8d+ncao=";
16   ldflags = [
17     "-s" "-w"
18     "-X github.com/ankitpokhrel/jira-cli/internal/version.GitCommit=${src.rev}"
19     "-X github.com/ankitpokhrel/jira-cli/internal/version.SourceDateEpoch=0"
20     "-X github.com/ankitpokhrel/jira-cli/internal/version.Version=${version}"
21   ];
23   __darwinAllowLocalNetworking = true;
25   nativeCheckInputs = [ less more ]; # Tests expect a pager in $PATH
27   passthru = {
28     tests.version = testers.testVersion {
29       package = jira-cli-go;
30       command = "jira version";
31       inherit version;
32     };
33     updateScript = nix-update-script { };
34   };
36   nativeBuildInputs = [ installShellFiles ];
37   postInstall = ''
38     installShellCompletion --cmd jira \
39       --bash <($out/bin/jira completion bash) \
40       --zsh <($out/bin/jira completion zsh)
42     $out/bin/jira man --generate --output man
43     installManPage man/*
44   '';
46   meta = with lib; {
47     description = "Feature-rich interactive Jira command line";
48     homepage = "https://github.com/ankitpokhrel/jira-cli";
49     changelog = "https://github.com/ankitpokhrel/jira-cli/releases/tag/v${version}";
50     license = licenses.mit;
51     maintainers = with maintainers; [ bryanasdev000 anthonyroussel ];
52     mainProgram = "jira";
53   };