k2tf: 0.7.0 -> 0.8.0; add install check and update script (#498716)

This commit is contained in:
Florian Klink 2026-03-13 14:52:27 +00:00 committed by GitHub
commit 24f7948c8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,30 +2,25 @@
lib,
buildGoModule,
fetchFromGitHub,
fetchpatch,
versionCheckHook,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "k2tf";
version = "0.7.0";
version = "0.8.0";
src = fetchFromGitHub {
owner = "sl1pm4t";
repo = "k2tf";
rev = "v${finalAttrs.version}";
sha256 = "sha256-zkkRzCTZCvbwBj4oIhTo5d3PvqLMJPzT3zV9jU3PEJs=";
tag = "v${finalAttrs.version}";
hash = "sha256-LoYlX2kAfzI0GMUbBtvuOinDzvoHABKEaGhipe16FeA=";
};
patches = [
# update dependencies
# https://github.com/sl1pm4t/k2tf/pull/111
(fetchpatch {
url = "https://github.com/sl1pm4t/k2tf/commit/7e7b778eeb80400cb0dadb1cdea4e617b5738147.patch";
hash = "sha256-ZGQUuH7u3aNLml6rvOzOxVwSTlbhZLknXbHKeY4lp00=";
})
];
proxyVendor = true;
vendorHash = "sha256-h8ph8K/4luTUCkx5X1iakTubF651HblGDN4G1EtSKeE=";
vendorHash = "sha256-yGuoE1bgwVHk3ym382OC93me9HPlVoNgGo/3JROVC2E=";
subPackages = [ "." ];
ldflags = [
"-s"
@ -34,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";