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.

39 lines
940 B
Nix
Raw Normal View History

2021-07-14 20:06:20 +00:00
{ lib
2022-03-22 07:39:35 +00:00
, buildGoModule
2021-07-14 20:06:20 +00: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-03-23 20:18:07 +00:00
version = "1.13.2";
2019-11-24 09:20:00 +00:00
src = fetchFromGitHub {
2021-07-14 20:06:20 +00:00
owner = "aquasecurity";
2019-11-24 09:20:00 +00:00
repo = pname;
rev = "v${version}";
2022-03-23 20:18:07 +00:00
sha256 = "sha256-ixiuAm1MCLS7daUwiFUPoO86YOoz9qEkQT5i/YlIdf0=";
2019-11-24 09:20:00 +00:00
};
2021-07-06 07:28:10 +00:00
ldflags = [
2022-03-22 07:39:35 +00:00
"-s" "-w"
"-X github.com/aquasecurity/tfsec/version.Version=${version}"
## not sure if this is needed (https://github.com/aquasecurity/tfsec/blob/master/.goreleaser.yml#L6)
# "-extldflags '-fno-PIC -static'"
];
2022-03-23 20:18:07 +00:00
vendorSha256 = "sha256-WlZJvBIdJCMA+GJ0svEzwqrdPz2wnlJx/csVarjyExw=";
2022-03-22 07:39:35 +00:00
subPackages = [
"cmd/tfsec"
"cmd/tfsec-docs"
"cmd/tfsec-checkgen"
2021-07-06 07:28:10 +00:00
];
2020-07-08 23:55:18 +00:00
2019-11-24 09:20:00 +00:00
meta = with lib; {
2021-07-14 20:06:20 +00: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
};
}