2021-12-01 11:47:25 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2018-11-03 04:38:41 +00:00
|
|
|
|
2020-06-14 11:13:55 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "gosec";
|
2024-09-27 04:53:15 +00:00
|
|
|
version = "2.21.4";
|
2018-11-03 04:38:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "securego";
|
2020-06-14 11:13:55 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-09-27 04:53:15 +00:00
|
|
|
hash = "sha256-fu0k+dZyEo2l0PWfN8iryGgUIJsWi7AQD3ku+w1tuGM=";
|
2018-11-03 04:38:41 +00:00
|
|
|
};
|
|
|
|
|
2024-09-27 04:53:15 +00:00
|
|
|
vendorHash = "sha256-LYEAQ/7S31Rv2gmkLReV1lKeAHW5DpKkegKb0Js75q0=";
|
2021-12-01 11:47:25 +00:00
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"cmd/gosec"
|
|
|
|
];
|
2018-11-03 04:38:41 +00:00
|
|
|
|
2021-12-01 11:47:25 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.Version=${version}"
|
|
|
|
"-X main.GitTag=${src.rev}"
|
|
|
|
"-X main.BuildDate=unknown"
|
|
|
|
];
|
2020-08-02 09:20:00 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/securego/gosec";
|
2020-06-14 11:13:55 +00:00
|
|
|
description = "Golang security checker";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "gosec";
|
2020-06-14 11:13:55 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ kalbasit nilp0inter ];
|
2018-11-03 04:38:41 +00:00
|
|
|
};
|
|
|
|
}
|