k3s: use versionCheckHook

This commit is contained in:
Pol Dellaiera
2025-09-09 11:04:38 +02:00
parent 0d19347b66
commit f2c5012e42
@@ -73,6 +73,7 @@ lib:
util-linuxMinimal,
yq-go,
zstd,
versionCheckHook,
}:
# k3s is a kinda weird derivation. One of the main points of k3s is the
@@ -451,11 +452,8 @@ buildGoModule (finalAttrs: {
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/k3s --version | grep -F "v${k3sVersion}" >/dev/null
runHook postInstallCheck
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
passthru = {
inherit airgap-images;