2022-06-22 04:50:17 +00:00
|
|
|
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
2022-02-04 12:16:47 +00:00
|
|
|
buildGoModule rec {
|
2021-10-17 18:44:54 +00:00
|
|
|
pname = "talosctl";
|
2022-06-22 04:50:17 +00:00
|
|
|
version = "1.1.0";
|
2021-10-17 18:44:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-04-09 03:29:31 +00:00
|
|
|
owner = "siderolabs";
|
2021-10-17 18:44:54 +00:00
|
|
|
repo = "talos";
|
|
|
|
rev = "v${version}";
|
2022-06-22 04:50:17 +00:00
|
|
|
sha256 = "sha256-52WzQ5LWgIX/XBJPNvWV0tAPnw1AiINDL/7D3UYvvn4=";
|
2021-10-17 18:44:54 +00:00
|
|
|
};
|
|
|
|
|
2022-06-22 04:50:17 +00:00
|
|
|
vendorSha256 = "sha256-iluI4UGw5cZ70wmC9jDiGttvxZ7xFyqcL9IZX4ubJqs=";
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
|
|
|
GOWORK = "off";
|
2021-10-17 18:44:54 +00:00
|
|
|
|
|
|
|
subPackages = [ "cmd/talosctl" ];
|
|
|
|
|
2022-02-10 21:02:08 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd talosctl \
|
|
|
|
--bash <($out/bin/talosctl completion bash) \
|
|
|
|
--fish <($out/bin/talosctl completion fish) \
|
|
|
|
--zsh <($out/bin/talosctl completion zsh)
|
|
|
|
'';
|
|
|
|
|
2021-10-17 18:44:54 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A CLI for out-of-band management of Kubernetes nodes created by Talos";
|
2022-04-09 03:29:31 +00:00
|
|
|
homepage = "https://www.talos.dev/";
|
2021-10-17 18:44:54 +00:00
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ flokli ];
|
2022-06-22 04:50:17 +00:00
|
|
|
# requires >= 10.14 SDK https://github.com/NixOS/nixpkgs/issues/101229
|
|
|
|
# Undefined symbols for architecture x86_64: "_SecTrustEvaluateWithError"
|
|
|
|
broken = stdenv.isDarwin && stdenv.isx86_64;
|
2021-10-17 18:44:54 +00:00
|
|
|
};
|
|
|
|
}
|