2022-12-28 21:21:41 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, less, more, installShellFiles, testers, jira-cli-go, nix-update-script }:
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "jira-cli-go";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "1.3.0";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ankitpokhrel";
|
|
|
|
repo = "jira-cli";
|
|
|
|
rev = "v${version}";
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-T7EAlHHjoACJOra47zp5tXrkYWQ8o9Qame6QmiTrIXY=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
vendorSha256 = "sha256-b/z2oSWY33XSxpHi+Tit2ThnNrdk5QNI4oZWPMBKmd0=";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s" "-w"
|
|
|
|
"-X github.com/ankitpokhrel/jira-cli/internal/version.GitCommit=${src.rev}"
|
|
|
|
"-X github.com/ankitpokhrel/jira-cli/internal/version.SourceDateEpoch=0"
|
|
|
|
"-X github.com/ankitpokhrel/jira-cli/internal/version.Version=${version}"
|
|
|
|
];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ less more ]; # Tests expect a pager in $PATH
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
passthru = {
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = jira-cli-go;
|
|
|
|
command = "jira version";
|
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
updateScript = nix-update-script { };
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd jira \
|
|
|
|
--bash <($out/bin/jira completion bash) \
|
|
|
|
--zsh <($out/bin/jira completion zsh)
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
$out/bin/jira man --generate --output man
|
|
|
|
installManPage man/*
|
2022-06-16 17:23:12 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Feature-rich interactive Jira command line";
|
|
|
|
homepage = "https://github.com/ankitpokhrel/jira-cli";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/ankitpokhrel/jira-cli/releases/tag/v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.mit;
|
2022-09-09 14:08:57 +00:00
|
|
|
maintainers = with maintainers; [ bryanasdev000 anthonyroussel ];
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
}
|