Skip to content

Commit 6b6cffe

Browse files
jira-cli-go: migrate to pkgs/by-name, format with nixfmt-rfc-style
1 parent 91beb4b commit 6b6cffe

File tree

2 files changed

+35
-18
lines changed

2 files changed

+35
-18
lines changed
Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
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

314
buildGoModule 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
}

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8918,8 +8918,6 @@ with pkgs;
89188918
jdk_headless = jdk8_headless; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
89198919
};
89208920

8921-
jira-cli-go = callPackage ../development/tools/jira-cli-go { };
8922-
89238921
jirafeau = callPackage ../servers/web-apps/jirafeau { };
89248922

89258923
jitterentropy = callPackage ../development/libraries/jitterentropy { };

0 commit comments

Comments
 (0)