summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2023-09-03 12:32:49 +0200
committerGitHub <noreply@github.com>2023-09-03 12:32:49 +0200
commitc2f3ec47aad406a6ccce21bfabe72ff83ee3862a (patch)
treeb701fc16e8abda55c39a52f1bc40ce668d9b2098
parent84f49c5795bccf30bd6bcefe944769b8897d581a (diff)
parentd24fd630f2a379b1b7b1dbf9ff812db0fe4458fc (diff)
downloadnixpkgs-c2f3ec47aad406a6ccce21bfabe72ff83ee3862a.tar
nixpkgs-c2f3ec47aad406a6ccce21bfabe72ff83ee3862a.tar.gz
nixpkgs-c2f3ec47aad406a6ccce21bfabe72ff83ee3862a.tar.bz2
nixpkgs-c2f3ec47aad406a6ccce21bfabe72ff83ee3862a.tar.lz
nixpkgs-c2f3ec47aad406a6ccce21bfabe72ff83ee3862a.tar.xz
nixpkgs-c2f3ec47aad406a6ccce21bfabe72ff83ee3862a.tar.zst
nixpkgs-c2f3ec47aad406a6ccce21bfabe72ff83ee3862a.zip
Merge pull request #252934 from fabaff/trivy-bump
trivy: 0.44.1 -> 0.45.0
-rw-r--r--pkgs/tools/admin/trivy/default.nix21
1 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/tools/admin/trivy/default.nix b/pkgs/tools/admin/trivy/default.nix
index 473cdb977bc..147fed6f127 100644
--- a/pkgs/tools/admin/trivy/default.nix
+++ b/pkgs/tools/admin/trivy/default.nix
@@ -1,23 +1,25 @@
 { lib
 , buildGoModule
 , fetchFromGitHub
+, testers
+, trivy
 }:
 
 buildGoModule rec {
   pname = "trivy";
-  version = "0.44.1";
+  version = "0.45.0";
 
   src = fetchFromGitHub {
     owner = "aquasecurity";
     repo = pname;
     rev = "refs/tags/v${version}";
-    hash = "sha256-zSrXfSG9GXReJ+XRx7FTBZovSvNq725zzWMje3maTx4=";
+    hash = "sha256-HsxcB3X8/n4Y8sU7im1nEGqMK9bVlhq5ZiF9gG+3YFs=";
   };
 
-  # hash missmatch on across linux and darwin
+  # Hash mismatch on across Linux and Darwin
   proxyVendor = true;
 
-  vendorHash = "sha256-CEr8UvQtKZo5jahLeLx3RYT592i6SwwNLRA4IRD0mYU=";
+  vendorHash = "sha256-rlMhmgnqvkKttfIzVMi1Ca/dqOdkoCF9yZbEcr8sv5I=";
 
   subPackages = [ "cmd/trivy" ];
 
@@ -32,12 +34,11 @@ buildGoModule rec {
 
   doInstallCheck = true;
 
-  installCheckPhase = ''
-    runHook preInstallCheck
-    $out/bin/trivy --help
-    $out/bin/trivy --version | grep "v${version}"
-    runHook postInstallCheck
-  '';
+  passthru.tests.version = testers.testVersion {
+    package = trivy;
+    command = "trivy --version";
+    version = "v${version}";
+  };
 
   meta = with lib; {
     homepage = "https://github.com/aquasecurity/trivy";