Commit b765d82e authored by Fabian Affolter's avatar Fabian Affolter
Browse files

trivy: migrate to versionCheckHook

parent 89eb6cff
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -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";