talosctl: 1.0.6 -> 1.1.0

https://github.com/siderolabs/talos/releases/tag/v1.1.0

> b315ed9532
> Generate separate file for each variable and assign them during go build using go:embed instead of using ldflags -X.
main
zowoq 2 years ago
parent 057fb30998
commit 990bd301c1
  1. 42
      pkgs/applications/networking/cluster/talosctl/default.nix
  2. 4
      pkgs/top-level/all-packages.nix

@ -1,42 +1,21 @@
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
let
# look for GO_LDFLAGS getting set in the Makefile
version = "1.0.6";
sha256 = "sha256-4cUaQWqVndp06eFgqInOMMGITbTdZO5BOqXW2XEpuWU=";
vendorSha256 = "sha256-7q35d+jbIDe7fAy6nL5FWdSovBb/f64HYLHGL+zE6bI=";
pkgsVersion = "v1.0.0-25-gcf9709e";
extrasVersion = "v1.0.0-4-g05b0920";
in
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "talosctl";
inherit version vendorSha256;
# nixpkgs-update: no auto update
version = "1.1.0";
src = fetchFromGitHub {
owner = "siderolabs";
repo = "talos";
rev = "v${version}";
inherit sha256;
sha256 = "sha256-52WzQ5LWgIX/XBJPNvWV0tAPnw1AiINDL/7D3UYvvn4=";
};
ldflags =
let
versionPkg = "github.com/talos-systems/talos/pkg/version"; # VERSION_PKG
imagesPkgs = "github.com/talos-systems/talos/pkg/images"; # IMAGES_PKGS
mgmtHelpersPkg = "github.com/talos-systems/talos/cmd/talosctl/pkg/mgmt/helpers"; #MGMT_HELPERS_PKG
in
[
"-X ${versionPkg}.Name=Client"
"-X ${versionPkg}.SHA=${src.rev}" # should be the hash, but as we build from tags, this needs to do
"-X ${versionPkg}.Tag=${src.rev}"
"-X ${versionPkg}.PkgsVersion=${pkgsVersion}" # PKGS
"-X ${versionPkg}.ExtrasVersion=${extrasVersion}" # EXTRAS
"-X ${imagesPkgs}.Username=siderolabs" # USERNAME
"-X ${imagesPkgs}.Registry=ghcr.io" # REGISTRY
"-X ${mgmtHelpersPkg}.ArtifactsPath=_out" # ARTIFACTS
"-s"
"-w"
];
vendorSha256 = "sha256-iluI4UGw5cZ70wmC9jDiGttvxZ7xFyqcL9IZX4ubJqs=";
ldflags = [ "-s" "-w" ];
GOWORK = "off";
subPackages = [ "cmd/talosctl" ];
@ -56,5 +35,8 @@ buildGoModule rec {
homepage = "https://www.talos.dev/";
license = licenses.mpl20;
maintainers = with maintainers; [ flokli ];
# requires >= 10.14 SDK https://github.com/NixOS/nixpkgs/issues/101229
# Undefined symbols for architecture x86_64: "_SecTrustEvaluateWithError"
broken = stdenv.isDarwin && stdenv.isx86_64;
};
}

@ -30046,7 +30046,9 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Security;
};
talosctl = callPackage ../applications/networking/cluster/talosctl { };
talosctl = callPackage ../applications/networking/cluster/talosctl {
buildGoModule = buildGo118Module;
};
talentedhack = callPackage ../applications/audio/talentedhack { };

Loading…
Cancel
Save