Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
75 lines
1.8 KiB
Nix
75 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
jira-cli-go,
|
|
less,
|
|
more,
|
|
nix-update-script,
|
|
testers,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "jira-cli-go";
|
|
version = "1.7.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ankitpokhrel";
|
|
repo = "jira-cli";
|
|
tag = "v${version}";
|
|
hash = "sha256-NJXLB2N8Kc8Ow6kb2EtPSG+iZ7O4yrhAMi3NFrUuocA=";
|
|
};
|
|
|
|
vendorHash = "sha256-cl+Sfi9WSPy8qOtB13rRiKtQdDC+HC0+FMKpsWbtU2w=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
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}"
|
|
];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd jira \
|
|
--bash <($out/bin/jira completion bash) \
|
|
--fish <($out/bin/jira completion fish) \
|
|
--zsh <($out/bin/jira completion zsh)
|
|
|
|
$out/bin/jira man --generate --output man
|
|
installManPage man/*
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
less
|
|
more
|
|
]; # Tests expect a pager in $PATH
|
|
|
|
passthru = {
|
|
tests.version = testers.testVersion {
|
|
package = jira-cli-go;
|
|
command = "jira version";
|
|
inherit version;
|
|
};
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = {
|
|
description = "Feature-rich interactive Jira command line";
|
|
homepage = "https://github.com/ankitpokhrel/jira-cli";
|
|
changelog = "https://github.com/ankitpokhrel/jira-cli/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
bryanasdev000
|
|
anthonyroussel
|
|
];
|
|
mainProgram = "jira";
|
|
};
|
|
}
|