1- { lib , stdenv , buildGoModule , fetchFromGitHub , less , more , installShellFiles , testers , jira-cli-go , nix-update-script } :
1+ {
2+ lib ,
3+ stdenv ,
4+ buildGoModule ,
5+ fetchFromGitHub ,
6+ installShellFiles ,
7+ jira-cli-go ,
8+ less ,
9+ more ,
10+ nix-update-script ,
11+ testers ,
12+ } :
213
314buildGoModule rec {
415 pname = "jira-cli-go" ;
@@ -7,22 +18,36 @@ buildGoModule rec {
718 src = fetchFromGitHub {
819 owner = "ankitpokhrel" ;
920 repo = "jira-cli" ;
10- rev = "v${ version } " ;
21+ rev = "refs/tags/ v${ version } " ;
1122 hash = "sha256-edytj9hB8lDwy3qGSyLudu5G4DSRGKhD0vDoWz5eUgs=" ;
1223 } ;
1324
1425 vendorHash = "sha256-DAdzbANqr0fa4uO8k/yJFoirgbZiKOQhOH8u8d+ncao=" ;
1526
27+ nativeBuildInputs = [ installShellFiles ] ;
28+
1629 ldflags = [
17- "-s" "-w"
30+ "-s"
31+ "-w"
1832 "-X github.com/ankitpokhrel/jira-cli/internal/version.GitCommit=${ src . rev } "
1933 "-X github.com/ankitpokhrel/jira-cli/internal/version.SourceDateEpoch=0"
2034 "-X github.com/ankitpokhrel/jira-cli/internal/version.Version=${ version } "
2135 ] ;
2236
23- __darwinAllowLocalNetworking = true ;
37+ postInstall = lib . optionalString ( stdenv . buildPlatform . canExecute stdenv . hostPlatform ) ''
38+ installShellCompletion --cmd jira \
39+ --bash <($out/bin/jira completion bash) \
40+ --fish <($out/bin/jira completion fish) \
41+ --zsh <($out/bin/jira completion zsh)
42+
43+ $out/bin/jira man --generate --output man
44+ installManPage man/*
45+ '' ;
2446
25- nativeCheckInputs = [ less more ] ; # Tests expect a pager in $PATH
47+ nativeCheckInputs = [
48+ less
49+ more
50+ ] ; # Tests expect a pager in $PATH
2651
2752 passthru = {
2853 tests . version = testers . testVersion {
@@ -33,23 +58,17 @@ buildGoModule rec {
3358 updateScript = nix-update-script { } ;
3459 } ;
3560
36- nativeBuildInputs = [ installShellFiles ] ;
37- postInstall = lib . optionalString ( stdenv . buildPlatform . canExecute stdenv . hostPlatform ) ''
38- installShellCompletion --cmd jira \
39- --bash <($out/bin/jira completion bash) \
40- --fish <($out/bin/jira completion fish) \
41- --zsh <($out/bin/jira completion zsh)
42-
43- $out/bin/jira man --generate --output man
44- installManPage man/*
45- '' ;
61+ __darwinAllowLocalNetworking = true ;
4662
4763 meta = with lib ; {
4864 description = "Feature-rich interactive Jira command line" ;
4965 homepage = "https://github.com/ankitpokhrel/jira-cli" ;
5066 changelog = "https://github.com/ankitpokhrel/jira-cli/releases/tag/v${ version } " ;
5167 license = licenses . mit ;
52- maintainers = with maintainers ; [ bryanasdev000 anthonyroussel ] ;
68+ maintainers = with maintainers ; [
69+ bryanasdev000
70+ anthonyroussel
71+ ] ;
5372 mainProgram = "jira" ;
5473 } ;
5574}
0 commit comments