mochi/nixos/overlays/talosctl/talosctl-custom.nix
Joseph Hanson 9e0def2655
All checks were successful
Build / nix-build (native-x86_64, legiondary) (pull_request) Successful in 10m27s
Build / nix-build (native-aarch64, varda) (pull_request) Successful in 11m33s
Full talosctl overlay for 1.7.5 and partial go 1.22.4
2024-07-04 03:33:02 -05:00

43 lines
No EOL
1 KiB
Nix

{ lib, buildGo122Module, fetchFromGitHub, installShellFiles }:
buildGo122Module rec {
pname = "talosctl";
version = "1.7.5";
src = fetchFromGitHub {
owner = "siderolabs";
repo = "talos";
rev = "v${version}";
hash = "sha256-lmDLlxiPyVhlSPplYkIaS5Uw19hir6XD8MAk8q+obhY=";
};
passthru = {
updateScript = ./update.sh;
};
vendorHash = "sha256-8UIey+r1tdVRN1RBK5xxcAzaHb0VFdgenUXSFgoWh1g=";
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 ];
};
}