talm: init at 0.22.1 (#488273)

This commit is contained in:
Gaétan Lepage
2026-02-21 10:30:56 +00:00
committed by GitHub
2 changed files with 66 additions and 0 deletions
+5
View File
@@ -13962,6 +13962,11 @@
githubId = 148352;
name = "Jim Fowler";
};
kitsunoff = {
github = "kitsunoff";
githubId = 58953114;
name = "Maxim Belyy";
};
Kitt3120 = {
email = "nixpkgs@schweren.dev";
github = "Kitt3120";
+61
View File
@@ -0,0 +1,61 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
nix-update-script,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "talm";
version = "0.22.1";
src = fetchFromGitHub {
owner = "cozystack";
repo = "talm";
tag = "v${finalAttrs.version}";
hash = "sha256-I3rSpFCNMoA5tAp3WVLM6Ae7Vo8m+9px9fg7Fgw0/oA=";
};
vendorHash = "sha256-jDp1WVETDbCtSq+v0BrIiTqoR2cnmI7JXdy5ydnt5wA=";
nativeBuildInputs = [ installShellFiles ];
# go.mod requires 1.25.6 but nixpkgs has 1.25.5
preBuild = ''
substituteInPlace go.mod --replace-fail "go 1.25.6" "go 1.25.5"
'';
ldflags = [
"-s"
"-X main.Version=v${finalAttrs.version}"
];
# Skip DNS test that fails in sandbox
checkFlags = [ "-skip=^TestRenderWithDNS$" ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd talm \
--bash <($out/bin/talm completion bash) \
--fish <($out/bin/talm completion fish) \
--zsh <($out/bin/talm completion zsh)
'';
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Manage Talos Linux the GitOps way";
homepage = "https://github.com/cozystack/talm";
changelog = "https://github.com/cozystack/talm/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ kitsunoff ];
mainProgram = "talm";
};
})