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;