From 69720f6041fe8b5be77ca70e69f7422b348f7cc0 Mon Sep 17 00:00:00 2001 From: chillcicada <2210227279@qq.com> Date: Wed, 11 Mar 2026 11:52:15 +0800 Subject: [PATCH] k2tf: add install check and update script --- pkgs/by-name/k2/k2tf/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/k2/k2tf/package.nix b/pkgs/by-name/k2/k2tf/package.nix index 5978085a74e2..8020b672613b 100644 --- a/pkgs/by-name/k2/k2tf/package.nix +++ b/pkgs/by-name/k2/k2tf/package.nix @@ -2,6 +2,8 @@ lib, buildGoModule, fetchFromGitHub, + versionCheckHook, + nix-update-script, }: buildGoModule (finalAttrs: { @@ -27,6 +29,11 @@ buildGoModule (finalAttrs: { "-X main.commit=v${finalAttrs.version}" ]; + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + + passthru.updateScript = nix-update-script { extraArgs = [ "--use-github-releases" ]; }; + meta = { description = "Kubernetes YAML to Terraform HCL converter"; mainProgram = "k2tf";