From 230e21f8b275e8c0345b55250e79413e1d881afb Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Wed, 12 Jul 2023 02:42:05 +0000 Subject: [PATCH] osv-detector: 0.6.0 -> 0.11.1 --- pkgs/tools/security/osv-detector/default.nix | 22 +++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/osv-detector/default.nix b/pkgs/tools/security/osv-detector/default.nix index 63d4e07a7b5..58db4504d23 100644 --- a/pkgs/tools/security/osv-detector/default.nix +++ b/pkgs/tools/security/osv-detector/default.nix @@ -7,16 +7,16 @@ buildGoModule rec { pname = "osv-detector"; - version = "0.6.0"; + version = "0.11.1"; src = fetchFromGitHub { owner = "G-Rath"; repo = pname; rev = "v${version}"; - hash = "sha256-Y/9q4ZJ4vxDitqrM4hGe49iqLYk4ebhTs4jrD7P8fdw="; + hash = "sha256-vIkLrKyDeMfRe/0EPhlKlHAO6XB0/OFY5mTUHeZbcg8="; }; - vendorSha256 = "sha256-KAxpDQIRrLZIOvfW8wf0CV4Fj6l3W6nNZNCH3ZE6yJc="; + vendorHash = "sha256-Rrosye8foVntoFDvDmyNuXgnEgjzcOXenOKBMZVCRio="; ldflags = [ "-w" @@ -24,6 +24,22 @@ buildGoModule rec { "-X main.version=${version}" ]; + checkFlags = + let + skippedTests = [ + # Disable tests requiring network access + "TestRun_ParseAs_CsvFile" + "TestRun_ParseAs_CsvRow" + "TestRun_DBs" + "TestRun_Lockfile" + "TestRun_ParseAsGlobal" + "TestRun_Ignores" + "TestRun_ParseAsSpecific" + "TestRun_Configs" + ]; + in + [ "-skip" "${builtins.concatStringsSep "|" skippedTests}" ]; + passthru.tests.version = testers.testVersion { package = osv-detector; command = "osv-detector -version";