Skip to content

Commit 5852a21

Browse files
authored
Merge pull request NixOS#112755 from 06kellyjac/tektoncd-cli
tektoncd-cli: cleanup
2 parents ecf0637 + 3270eec commit 5852a21

File tree

1 file changed

+18
-11
lines changed
  • pkgs/applications/networking/cluster/tektoncd-cli

1 file changed

+18
-11
lines changed

pkgs/applications/networking/cluster/tektoncd-cli/default.nix

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,26 @@ buildGoModule rec {
1313

1414
vendorSha256 = null;
1515

16-
doCheck = false;
16+
buildFlagsArray = [
17+
"-ldflags="
18+
"-s"
19+
"-w"
20+
"-X github.com/tektoncd/cli/pkg/cmd/version.clientVersion=${version}"
21+
];
1722

1823
nativeBuildInputs = [ installShellFiles ];
1924

20-
buildPhase = ''
21-
make bin/tkn
22-
'';
25+
# third_party/VENDOR-LICENSE breaks build/check as go files are still included
26+
# docs is a tool for generating docs
27+
excludedPackages = "\\(third_party\\|cmd/docs\\)";
2328

24-
installPhase = ''
25-
install bin/tkn -Dt $out/bin
29+
preCheck = ''
30+
# Change the golden files to match our desired version
31+
sed -i "s/dev/${version}/" pkg/cmd/version/testdata/TestGetVersions-*.golden
32+
'';
2633

27-
mkdir -p "$out/share/man/man1"
28-
cp docs/man/man1/* "$out/share/man/man1"
34+
postInstall = ''
35+
installManPage docs/man/man1/*
2936
3037
installShellCompletion --cmd tkn \
3138
--bash <($out/bin/tkn completion bash) \
@@ -34,14 +41,14 @@ buildGoModule rec {
3441
'';
3542

3643
meta = with lib; {
37-
description = "The Tekton Pipelines cli project provides a CLI for interacting with Tekton";
3844
homepage = "https://tekton.dev";
45+
changelog = "https://github.com/tektoncd/cli/releases/tag/v${version}";
46+
description = "Provides a CLI for interacting with Tekton";
3947
longDescription = ''
4048
The Tekton Pipelines cli project provides a CLI for interacting with Tekton!
4149
For your convenience, it is recommended that you install the Tekton CLI, tkn, together with the core component of Tekton, Tekton Pipelines.
4250
'';
4351
license = licenses.asl20;
44-
maintainers = with maintainers; [ jk mstrangfeld ];
45-
platforms = platforms.linux ++ platforms.darwin;
52+
maintainers = with maintainers; [ jk mstrangfeld vdemeester ];
4653
};
4754
}

0 commit comments

Comments
 (0)