Files
nixpkgs/pkgs/by-name/te/tektoncd-cli/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

81 lines
1.8 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "tektoncd-cli";
version = "0.42.0";
src = fetchFromGitHub {
owner = "tektoncd";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-WB3XsXT8bXo2GpHC6hGKilRwloy31y18JD09cQklsV0=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
"-X github.com/tektoncd/cli/pkg/cmd/version.clientVersion=${version}"
];
nativeBuildInputs = [ installShellFiles ];
subPackages = [ "cmd/tkn" ];
preCheck = ''
# some tests try to write to the home dir
export HOME="$TMPDIR"
# run all tests
unset subPackages
# the tests expect the clientVersion ldflag not to be set
unset ldflags
# remove tests with networking
rm pkg/cmd/version/version_test.go
'';
postInstall = ''
installManPage docs/man/man1/*
installShellCompletion --cmd tkn \
--bash <($out/bin/tkn completion bash) \
--fish <($out/bin/tkn completion fish) \
--zsh <($out/bin/tkn completion zsh)
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/tkn --help
$out/bin/tkn version | grep "Client version: ${version}"
runHook postInstallCheck
'';
meta = {
homepage = "https://tekton.dev";
changelog = "https://github.com/tektoncd/cli/releases/tag/v${version}";
description = "Provides a CLI for interacting with Tekton - tkn";
longDescription = ''
The Tekton Pipelines cli project provides a CLI for interacting with
Tekton! For your convenience, it is recommended that you install the
Tekton CLI, tkn, together with the core component of Tekton, Tekton
Pipelines.
'';
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
jk
mstrangfeld
vdemeester
];
mainProgram = "tkn";
};
}