From 2f8164310a51f2fa22d3667a0d6ec2ec0fa3ab4e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 4 Mar 2023 13:32:34 +0100 Subject: [PATCH 1/2] grype: 0.58.0 -> 0.59.0 Diff: https://github.com/anchore/grype.git/compare/v0.58.0...v0.59.0 Changelog: https://github.com/anchore/grype/releases/tag/v0.59.0 --- pkgs/tools/security/grype/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/grype/default.nix b/pkgs/tools/security/grype/default.nix index 926a48bfb0cb..2585b7b4746f 100644 --- a/pkgs/tools/security/grype/default.nix +++ b/pkgs/tools/security/grype/default.nix @@ -8,13 +8,13 @@ buildGoModule rec { pname = "grype"; - version = "0.58.0"; + version = "0.59.0"; src = fetchFromGitHub { owner = "anchore"; repo = pname; rev = "v${version}"; - hash = "sha256-7yb6ufRoAB70hnoBv6ZwEtKeTJxxmWEknksCmM55eYE="; + hash = "sha256-TAoF67Fxl0OUiQd48h786+lIsdEuk4C/zdeEO/DRX/k="; # 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,7 +28,7 @@ buildGoModule rec { }; proxyVendor = true; - vendorHash = "sha256-7i9/tufEUGVqNHP61pQuIK2tMdiBcs3vfFz1bzlHFKk="; + vendorHash = "sha256-kRxKa3HUO2yvMai03voVvsprg/Kd01OtJQHJn3ECk58="; nativeBuildInputs = [ installShellFiles From 3eaa74f21e9aec13892484f7073fbea76059bd4b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 4 Mar 2023 14:03:57 +0100 Subject: [PATCH 2/2] grype: clean-up --- pkgs/tools/security/grype/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/grype/default.nix b/pkgs/tools/security/grype/default.nix index 2585b7b4746f..8334b034841d 100644 --- a/pkgs/tools/security/grype/default.nix +++ b/pkgs/tools/security/grype/default.nix @@ -2,7 +2,6 @@ , buildGoModule , fetchFromGitHub , installShellFiles - , openssl }: @@ -13,7 +12,7 @@ buildGoModule rec { src = fetchFromGitHub { owner = "anchore"; repo = pname; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-TAoF67Fxl0OUiQd48h786+lIsdEuk4C/zdeEO/DRX/k="; # 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. @@ -26,6 +25,7 @@ buildGoModule rec { find "$out" -name .git -print0 | xargs -0 rm -rf ''; }; + proxyVendor = true; vendorHash = "sha256-kRxKa3HUO2yvMai03voVvsprg/Kd01OtJQHJn3ECk58="; @@ -34,6 +34,10 @@ buildGoModule rec { installShellFiles ]; + nativeCheckInputs = [ + openssl + ]; + subPackages = [ "." ]; excludedPackages = "test/integration"; @@ -55,7 +59,6 @@ buildGoModule rec { ldflags+=" -X github.com/anchore/grype/internal/version.buildDate=$(cat SOURCE_DATE_EPOCH)" ''; - nativeCheckInputs = [ openssl ]; preCheck = '' # test all dirs (except excluded) unset subPackages