diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2023-09-18 13:06:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-18 13:06:18 +0200 |
commit | 2de6950437b49cff820135c76ee39061359cdf69 (patch) | |
tree | 0b0d64f6f79ace172dd70caed5a639a4bcc071ee | |
parent | ec6524c5d3cf3c42a17437b085486b796f60446c (diff) | |
parent | 30a7be48b3b24dcb9519c1016e0e421cd7aed182 (diff) |
Merge pull request #255189 from kashw2/grype
grype: 0.66.0 -> 0.68.0
-rw-r--r-- | pkgs/tools/security/grype/default.nix | 18 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
2 files changed, 12 insertions, 10 deletions
diff --git a/pkgs/tools/security/grype/default.nix b/pkgs/tools/security/grype/default.nix index 1654a903add2e..3c89a5c0d4689 100644 --- a/pkgs/tools/security/grype/default.nix +++ b/pkgs/tools/security/grype/default.nix @@ -7,13 +7,13 @@ buildGoModule rec { pname = "grype"; - version = "0.66.0"; + version = "0.68.0"; src = fetchFromGitHub { owner = "anchore"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-oZSXUwWucSyd2JYx0TkYfxgP6NZjjA2bhTrlOJSNh8c="; + hash = "sha256-im7dEKkWs63AUxLa659ceKremmubK7eM2rSskEEKiww="; # 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-Ur68es1eXsIldXqZjBbtMoK2fjvTIZ+ae2cWaiNzfBg="; + vendorHash = "sha256-r/1UlU0DU5gSX1aW7Jdk7BR6+rt/4/88eYp5ycLI9Wk="; nativeBuildInputs = [ installShellFiles @@ -45,18 +45,18 @@ buildGoModule rec { ldflags = [ "-s" "-w" - "-X=github.com/anchore/grype/internal/version.version=${version}" - "-X=github.com/anchore/grype/internal/version.gitDescription=v${version}" - "-X=github.com/anchore/grype/internal/version.gitTreeState=clean" + "-X=main.version=${version}" + "-X=main.gitDescription=v${version}" + "-X=main.gitTreeState=clean" ]; preBuild = '' # grype version also displays the version of the syft library used # we need to grab it from the go.sum and add an ldflag for it SYFT_VERSION="$(grep "github.com/anchore/syft" go.sum -m 1 | awk '{print $2}')" - ldflags+=" -X github.com/anchore/grype/internal/version.syftVersion=$SYFT_VERSION" - ldflags+=" -X github.com/anchore/grype/internal/version.gitCommit=$(cat COMMIT)" - ldflags+=" -X github.com/anchore/grype/internal/version.buildDate=$(cat SOURCE_DATE_EPOCH)" + ldflags+=" -X main.syftVersion=$SYFT_VERSION" + ldflags+=" -X main.gitCommit=$(cat COMMIT)" + ldflags+=" -X main.buildDate=$(cat SOURCE_DATE_EPOCH)" ''; preCheck = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0d9a4542348bf..ec03180ae0952 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8930,7 +8930,9 @@ with pkgs; gssdp-tools = callPackage ../development/libraries/gssdp/tools.nix { }; - grype = callPackage ../tools/security/grype { }; + grype = callPackage ../tools/security/grype { + buildGoModule = buildGo121Module; + }; gt5 = callPackage ../tools/system/gt5 { }; |