nixpkgs/pkgs/development/tools/gosec/default.nix
2022-10-19 19:13:13 +02:00

39 lines
790 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "gosec";
version = "2.14.0";
src = fetchFromGitHub {
owner = "securego";
repo = pname;
rev = "v${version}";
sha256 = "sha256-OPMXU24INpdeQrNlRIPJBag6TtHFFIdxlBTfMgRZc2U=";
};
vendorSha256 = "sha256-F/wtDYPF4qUujU+fJx2v9uwlkxQ1LMPECKxHR4EB1zk=";
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;
};
}