nixpkgs-suyu/pkgs/development/tools/gosec/default.nix
2022-06-17 22:22:23 +02:00

38 lines
790 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "gosec";
version = "2.12.0";
src = fetchFromGitHub {
owner = "securego";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Y4QL6vYCTZUCh+HF86QI+ENel/pK16XpLd6CF4RWcK0=";
};
vendorSha256 = "sha256-5rA2C3nyvSUiBQ/Nk5OJ9e9tf8CKHQB+6rLUJXESK/0=";
subPackages = [
"cmd/gosec"
];
ldflags = [
"-s"
"-w"
"-X main.Version=${version}"
"-X main.GitTag=${src.rev}"
"-X main.BuildDate=unknown"
];
meta = with lib; {
homepage = "https://github.com/securego/gosec";
description = "Golang security checker";
license = licenses.asl20;
maintainers = with maintainers; [ kalbasit nilp0inter ];
platforms = platforms.linux ++ platforms.darwin;
};
}