From f2c5012e420fc835c35715a0cd8fd6b38102f310 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Mon, 8 Sep 2025 19:11:04 +0200 Subject: [PATCH] k3s: use `versionCheckHook` --- pkgs/applications/networking/cluster/k3s/builder.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/cluster/k3s/builder.nix b/pkgs/applications/networking/cluster/k3s/builder.nix index 2b2e6490ab23..f98edbefaaba 100644 --- a/pkgs/applications/networking/cluster/k3s/builder.nix +++ b/pkgs/applications/networking/cluster/k3s/builder.nix @@ -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;