trivy: format with nixfmt

This commit is contained in:
Fabian Affolter 2024-04-22 23:02:37 +02:00
parent 5549846d18
commit dd159fd21a

View File

@ -1,11 +1,12 @@
{ lib {
, stdenv lib,
, buildPackages stdenv,
, buildGoModule buildPackages,
, fetchFromGitHub buildGoModule,
, installShellFiles fetchFromGitHub,
, testers installShellFiles,
, trivy testers,
trivy,
}: }:
buildGoModule rec { buildGoModule rec {
@ -14,7 +15,7 @@ buildGoModule rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "aquasecurity"; owner = "aquasecurity";
repo = pname; repo = "trivy";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-0FV67+m09PCkPZfnkepkvBA4mFYIkJSMT5v0tDwalW8="; hash = "sha256-0FV67+m09PCkPZfnkepkvBA4mFYIkJSMT5v0tDwalW8=";
}; };
@ -39,7 +40,11 @@ buildGoModule rec {
postInstall = postInstall =
let let
trivy = if stdenv.buildPlatform.canExecute stdenv.hostPlatform then placeholder "out" else buildPackages.trivy; trivy =
if stdenv.buildPlatform.canExecute stdenv.hostPlatform then
placeholder "out"
else
buildPackages.trivy;
in in
'' ''
installShellCompletion --cmd trivy \ installShellCompletion --cmd trivy \
@ -69,6 +74,9 @@ buildGoModule rec {
''; '';
mainProgram = "trivy"; mainProgram = "trivy";
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ fab jk ]; maintainers = with maintainers; [
fab
jk
];
}; };
} }