nixpkgs/pkgs/development/tools/analysis/tfsec/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
943 B
Nix
Raw Normal View History

2021-07-14 21:06:20 +01:00
{ lib
2022-03-22 07:39:35 +00:00
, buildGoModule
2021-07-14 21:06:20 +01:00
, fetchFromGitHub
}:
2019-11-24 09:20:00 +00:00
2022-03-22 07:39:35 +00:00
buildGoModule rec {
2019-11-24 09:20:00 +00:00
pname = "tfsec";
2022-10-26 05:58:06 +01:00
version = "1.28.1";
2019-11-24 09:20:00 +00:00
src = fetchFromGitHub {
2021-07-14 21:06:20 +01:00
owner = "aquasecurity";
2019-11-24 09:20:00 +00:00
repo = pname;
rev = "v${version}";
2022-10-26 05:58:06 +01:00
hash = "sha256-44DN3lV9BLBFr6kkD3IcamQg+t+xUqqao83f0nBKZvI=";
2019-11-24 09:20:00 +00:00
};
2021-07-06 08:28:10 +01:00
ldflags = [
2022-06-16 22:15:10 +01:00
"-s"
"-w"
"-X github.com/aquasecurity/tfsec/version.Version=v${version}"
2022-03-22 07:39:35 +00:00
## not sure if this is needed (https://github.com/aquasecurity/tfsec/blob/master/.goreleaser.yml#L6)
# "-extldflags '-fno-PIC -static'"
];
2022-10-26 05:58:06 +01:00
vendorSha256 = "sha256-NQUDeNAWSWcIoSZjdbaFQTB3nMFGbLZLUDNFHMk6Enw=";
2022-03-22 07:39:35 +00:00
subPackages = [
"cmd/tfsec"
"cmd/tfsec-docs"
"cmd/tfsec-checkgen"
2021-07-06 08:28:10 +01:00
];
2020-07-09 00:55:18 +01:00
2019-11-24 09:20:00 +00:00
meta = with lib; {
2021-07-14 21:06:20 +01:00
description = "Static analysis powered security scanner for terraform code";
homepage = "https://github.com/aquasecurity/tfsec";
2019-11-24 09:20:00 +00:00
license = licenses.mit;
2022-03-22 07:39:35 +00:00
maintainers = with maintainers; [ fab marsam peterromfeldhk ];
2019-11-24 09:20:00 +00:00
};
}