trivy: migrate to versionCheckHook

This commit is contained in:
Fabian Affolter
2026-02-08 21:32:16 +01:00
parent 89eb6cff8e
commit b765d82e7e
+4 -8
View File
@@ -5,9 +5,9 @@
buildGoModule,
fetchFromGitHub,
installShellFiles,
testers,
trivy,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "trivy";
version = "0.69.0";
@@ -36,6 +36,8 @@ buildGoModule (finalAttrs: {
nativeBuildInputs = [ installShellFiles ];
nativeInstallCheckInputs = [ versionCheckHook ];
# Tests require network access
doCheck = false;
@@ -48,12 +50,6 @@ buildGoModule (finalAttrs: {
doInstallCheck = true;
passthru.tests.version = testers.testVersion {
package = trivy;
command = "trivy --version";
version = "Version: ${finalAttrs.version}";
};
meta = {
description = "Simple and comprehensive vulnerability scanner for containers, suitable for CI";
homepage = "https://github.com/aquasecurity/trivy";