From 02cba3f46e06164b3d80000a6625143e73b52947 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Thu, 17 Oct 2024 21:42:16 -0500 Subject: [PATCH] update talos to unstable branch for latest go to compile --- nixos/overlays/default.nix | 2 +- nixos/overlays/talosctl/default.nix | 54 +++++++++++++++------ nixos/overlays/talosctl/talosctl-custom.nix | 43 ---------------- nixos/overlays/talosctl/talosctl-full.nix | 40 --------------- 4 files changed, 40 insertions(+), 99 deletions(-) delete mode 100644 nixos/overlays/talosctl/talosctl-custom.nix delete mode 100644 nixos/overlays/talosctl/talosctl-full.nix diff --git a/nixos/overlays/default.nix b/nixos/overlays/default.nix index facee9e..9e8c5e6 100644 --- a/nixos/overlays/default.nix +++ b/nixos/overlays/default.nix @@ -25,7 +25,7 @@ in config.allowUnfree = true; } // { # Add talosctl to the unstable set - talosctl = final.unstable.callPackage ./talosctl/talosctl-full.nix { + talosctl = final.unstable.callPackage ./talosctl { inherit (final.unstable) lib buildGoModule fetchFromGitHub installShellFiles; }; }; diff --git a/nixos/overlays/talosctl/default.nix b/nixos/overlays/talosctl/default.nix index 2f72a0a..801a4cf 100644 --- a/nixos/overlays/talosctl/default.nix +++ b/nixos/overlays/talosctl/default.nix @@ -1,16 +1,40 @@ -{ ... }: -let - finalVersion = "1.8.1"; -in -final: prev: { - talosctl = prev.talosctl.overrideAttrs (oldAttrs: { - version = finalVersion; - src = prev.fetchFromGitHub { - owner = "siderolabs"; - repo = "talos"; - rev = "v${finalVersion}"; - hash = "sha256-6WHeiVH/vZHiM4bqq3T5lC0ARldJyZtIErPeDgrZgxc="; - }; - vendorHash = "sha256-aTtvVpL979BUvSBwBqRqCWSWIBBmmty9vBD97Q5P4+E="; - }); +{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: + +buildGoModule rec { + pname = "talosctl"; + version = "1.8.1"; + + src = fetchFromGitHub { + owner = "siderolabs"; + repo = "talos"; + rev = "v${version}"; + hash = "sha256-6WHeiVH/vZHiM4bqq3T5lC0ARldJyZtIErPeDgrZgxc="; + }; + + vendorHash = "sha256-aTtvVpL979BUvSBwBqRqCWSWIBBmmty9vBD97Q5P4+E="; + + 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 ]; + }; } diff --git a/nixos/overlays/talosctl/talosctl-custom.nix b/nixos/overlays/talosctl/talosctl-custom.nix deleted file mode 100644 index 47f93c8..0000000 --- a/nixos/overlays/talosctl/talosctl-custom.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ 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 ]; - }; -} \ No newline at end of file diff --git a/nixos/overlays/talosctl/talosctl-full.nix b/nixos/overlays/talosctl/talosctl-full.nix deleted file mode 100644 index 801a4cf..0000000 --- a/nixos/overlays/talosctl/talosctl-full.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: - -buildGoModule rec { - pname = "talosctl"; - version = "1.8.1"; - - src = fetchFromGitHub { - owner = "siderolabs"; - repo = "talos"; - rev = "v${version}"; - hash = "sha256-6WHeiVH/vZHiM4bqq3T5lC0ARldJyZtIErPeDgrZgxc="; - }; - - vendorHash = "sha256-aTtvVpL979BUvSBwBqRqCWSWIBBmmty9vBD97Q5P4+E="; - - 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 ]; - }; -}