2024-10-17 21:42:16 -05:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "talosctl";
|
2024-11-06 08:01:44 -06:00
|
|
|
version = "1.8.2";
|
2024-10-17 21:42:16 -05:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "siderolabs";
|
|
|
|
repo = "talos";
|
|
|
|
rev = "v${version}";
|
2024-11-06 08:01:44 -06:00
|
|
|
hash = "sha256-sD/Nn1ZLM6JIZdWQsBioKyhrAvhz749LL4xWleQ80xY=";
|
2024-10-17 21:42:16 -05:00
|
|
|
};
|
|
|
|
|
2024-11-06 08:01:44 -06:00
|
|
|
vendorHash = "sha256-pWG8DbZ9N57p2Q9w/IzETcvwaSfzaUvJgcz7Th/Oi9c=";
|
2024-10-17 21:42:16 -05:00
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
|
|
|
env.GOWORK = "off";
|
|
|
|
|
|
|
|
subPackages = [ "cmd/talosctl" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd talosctl \
|
|
|
|
--bash <($out/bin/talosctl completion bash) \
|
|
|
|
--fish <($out/bin/talosctl completion fish) \
|
|
|
|
--zsh <($out/bin/talosctl completion zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false; # no tests
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CLI for out-of-band management of Kubernetes nodes created by Talos";
|
|
|
|
mainProgram = "talosctl";
|
|
|
|
homepage = "https://www.talos.dev/";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ flokli ];
|
|
|
|
};
|
2024-10-11 12:12:09 -05:00
|
|
|
}
|