kubescape: migrate to versionCheckHook

This commit is contained in:
Fabian Affolter
2024-12-03 00:25:56 +01:00
parent 08061fddcc
commit 25df979ed0
+8 -8
View File
@@ -4,8 +4,7 @@
fetchFromGitHub,
git,
installShellFiles,
kubescape,
testers,
versionCheckHook,
}:
buildGoModule rec {
@@ -25,7 +24,10 @@ buildGoModule rec {
subPackages = [ "." ];
nativeBuildInputs = [ installShellFiles ];
nativeBuildInputs = [
installShellFiles
versionCheckHook
];
nativeCheckInputs = [ git ];
@@ -62,11 +64,9 @@ buildGoModule rec {
--zsh <($out/bin/kubescape completion zsh)
'';
passthru.tests.version = testers.testVersion {
package = kubescape;
command = "kubescape version";
version = "v${version}";
};
doInstallCheck = true;
versionCheckProgramArg = [ "version" ];
meta = with lib; {
description = "Tool for testing if Kubernetes is deployed securely";