This repository has been archived by the owner on Feb 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Move talosctl from brew to nix
- Loading branch information
Showing
6 changed files
with
64 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ in { | |
minio-client | ||
opentofu | ||
pulumi-bin | ||
talosctl | ||
terraform | ||
]; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ | |
brews = [ | ||
"postgresql@16" | ||
"talhelper" | ||
"talosctl" | ||
]; | ||
casks = [ | ||
"1password" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Makefile to quickly iterate on building the overlays | ||
build: | ||
nix-build -E 'with import <nixpkgs> {}; callPackage ./default.nix {}' | ||
|
||
clean: | ||
rm result* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{pkgs ? import <nixpkgs> {}}: rec { | ||
tesla-auth = pkgs.callPackage ./tesla-auth.nix {}; | ||
talosctl = pkgs.callPackage ./talosctl.nix {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
lib, | ||
buildGo122Module, | ||
fetchFromGitHub, | ||
installShellFiles, | ||
}: | ||
buildGo122Module rec { | ||
pname = "talosctl"; | ||
# renovate: datasource=docker depName=ghcr.io/siderolabs/installer | ||
version = "1.6.6"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "siderolabs"; | ||
repo = "talos"; | ||
rev = "v${version}"; | ||
# hash = lib.fakeHash; | ||
hash = "sha256-94oQe0wmrDU9MDWA1IdHDXu6ECtzQFHPh6dZhOvidUg=="; | ||
}; | ||
|
||
# vendorHash = lib.fakeHash; | ||
vendorHash = "sha256-raBqjLoH7DwA8ZaO1tIR1JRWb27lHusHAwqJ5UQhxt4="; | ||
|
||
ldflags = ["-s" "-w"]; | ||
|
||
# This is needed to deal with workspace issues during the build | ||
overrideModAttrs = _: { | ||
preConfigure = '' | ||
export GOWORK=off | ||
''; | ||
}; | ||
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]; | ||
}; | ||
} |