From a02037ec69b5b8a689cd12336339643cddfb2c7e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 18 Feb 2024 10:55:52 +0100 Subject: [PATCH] grype: 0.74.5 -> 0.74.6 Diff: https://github.com/anchore/grype/compare/refs/tags/v0.74.5...v0.74.6 Changelog: https://github.com/anchore/grype/releases/tag/v0.74.6 --- pkgs/tools/security/grype/default.nix | 34 ++++++++++++++++----------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/pkgs/tools/security/grype/default.nix b/pkgs/tools/security/grype/default.nix index eceffd9bdecd..dcae1af2bed1 100644 --- a/pkgs/tools/security/grype/default.nix +++ b/pkgs/tools/security/grype/default.nix @@ -1,19 +1,20 @@ { lib , buildGoModule , fetchFromGitHub +, git , installShellFiles , openssl }: buildGoModule rec { pname = "grype"; - version = "0.74.5"; + version = "0.74.6"; src = fetchFromGitHub { owner = "anchore"; - repo = pname; + repo = "grype"; rev = "refs/tags/v${version}"; - hash = "sha256-h68LfKQG5xgFIFkyuK9Z6tw8+xoimnF2d2QgTjwU74U="; + hash = "sha256-2KLVIwiSrs+e0srXkfBdk/RxCIvSq/Lixe83th2KvRA="; # populate values that require us to use git. By doing this in postFetch we # can delete .git afterwards and maintain better reproducibility of the src. leaveDotGit = true; @@ -28,17 +29,20 @@ buildGoModule rec { proxyVendor = true; - vendorHash = "sha256-lnOF3Xvjc20aFPOf9of3n+aBHvPrLTTlH7aPPlYA/RA="; + vendorHash = "sha256-wgcbP/VbHOMuc0PxWaOsiYTrr77ztLDVaDMhAD50vuQ="; nativeBuildInputs = [ installShellFiles ]; nativeCheckInputs = [ + git openssl ]; - subPackages = [ "cmd/grype" ]; + subPackages = [ + "cmd/grype" + ]; excludedPackages = "test/integration"; @@ -70,23 +74,25 @@ buildGoModule rec { # remove tests that depend on docker substituteInPlace test/cli/cmd_test.go \ - --replace "TestCmd" "SkipCmd" + --replace-fail "TestCmd" "SkipCmd" substituteInPlace grype/pkg/provider_test.go \ - --replace "TestSyftLocationExcludes" "SkipSyftLocationExcludes" + --replace-fail "TestSyftLocationExcludes" "SkipSyftLocationExcludes" substituteInPlace test/cli/cmd_test.go \ - --replace "Test_descriptorNameAndVersionSet" "Skip_descriptorNameAndVersionSet" + --replace-fail "Test_descriptorNameAndVersionSet" "Skip_descriptorNameAndVersionSet" # remove tests that depend on git substituteInPlace test/cli/db_validations_test.go \ - --replace "TestDBValidations" "SkipDBValidations" + --replace-fail "TestDBValidations" "SkipDBValidations" substituteInPlace test/cli/registry_auth_test.go \ - --replace "TestRegistryAuth" "SkipRegistryAuth" + --replace-fail "TestRegistryAuth" "SkipRegistryAuth" substituteInPlace test/cli/sbom_input_test.go \ - --replace "TestSBOMInput_FromStdin" "SkipSBOMInput_FromStdin" \ - --replace "TestSBOMInput_AsArgument" "SkipSBOMInput_AsArgument" + --replace-fail "TestSBOMInput_FromStdin" "SkipSBOMInput_FromStdin" \ + --replace-fail "TestSBOMInput_AsArgument" "SkipSBOMInput_AsArgument" substituteInPlace test/cli/subprocess_test.go \ - --replace "TestSubprocessStdin" "SkipSubprocessStdin" + --replace-fail "TestSubprocessStdin" "SkipSubprocessStdin" substituteInPlace grype/internal/packagemetadata/names_test.go \ - --replace "TestAllNames" "SkipAllNames" + --replace-fail "TestAllNames" "SkipAllNames" + substituteInPlace test/cli/version_cmd_test.go \ + --replace-fail "TestVersionCmdPrintsToStdout" "SkipVersionCmdPrintsToStdout" # segfault rm grype/db/v5/namespace/cpe/namespace_test.go