From f7ae3cc5e721bf3de583d22faaa9a49197dac1d9 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Mon, 10 Jul 2023 06:36:48 -0600 Subject: [PATCH] govulncheck: unstable-2023-03-22 -> 0.2.0 This switches to the versioned releases (0.2.0 came out on Jun 30, 2023). It also disables the tests as vendoring causes issues them and there isn't a clear fix. --- pkgs/tools/security/govulncheck/default.nix | 29 +++++---------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/pkgs/tools/security/govulncheck/default.nix b/pkgs/tools/security/govulncheck/default.nix index bb62c0e17565..51855b6f1a2a 100644 --- a/pkgs/tools/security/govulncheck/default.nix +++ b/pkgs/tools/security/govulncheck/default.nix @@ -1,37 +1,22 @@ { lib, buildGoModule, fetchFromGitHub }: -buildGoModule { +buildGoModule rec { pname = "govulncheck"; - version = "unstable-2023-03-22"; + version = "0.2.0"; src = fetchFromGitHub { owner = "golang"; repo = "vuln"; - rev = "f2d9b5a6e023e7cd80347eb7ebca02ae19b28903"; - sha256 = "sha256-zaeCEgFlv3Oxm4dIT/Evevww05JYEecekXO9UtIKLkU="; + rev = "v${version}"; + sha256 = "sha256-0lb1GwOcEpchT3TkdSve335bjYbVsuVzq1SvCDwtX/Q="; }; - vendorSha256 = "sha256-RxdiZ3NN+EWVCiBPI0VIDuRI1/h4rnU4KCNn2WwZL7Q="; + vendorSha256 = "sha256-r9XshbgVA5rppJF46SFYPad344ZHMLWTHTnL6vbIFH8="; subPackages = [ "cmd/govulncheck" ]; - preCheck = '' - # test all paths - unset subPackages - - # remove test that calls checks.bash - # the header check and misspell gets upset at the vendor dir - rm all_test.go - - # remove tests that generally have "inconsistent vendoring" issues - # - tries to builds govulncheck again - rm cmd/govulncheck/main_command_118_test.go - # - does go builds of example go files - rm internal/vulncheck/binary_test.go - # - just have resolution issues - rm internal/vulncheck/{source,vulncheck}_test.go - rm internal/govulncheck/callstacks_test.go - ''; + # Vendoring breaks tests + doCheck = false; ldflags = [ "-s" "-w" ];