mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
40 lines
998 B
Nix
40 lines
998 B
Nix
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "talosctl";
|
|
version = "1.3.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "siderolabs";
|
|
repo = "talos";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-K5eslPo4Ou/JJoZGASJsZ331Nyc14Dva+cead3ngw0U=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-N+sFJtC+9VCt3GJoAbRsNl7vCXiFFlewsIkwTdleUhk=";
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
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 = "A CLI for out-of-band management of Kubernetes nodes created by Talos";
|
|
homepage = "https://www.talos.dev/";
|
|
license = licenses.mpl20;
|
|
maintainers = with maintainers; [ flokli ];
|
|
};
|
|
}
|