nixpkgs/pkgs/tools/security/gotestwaf/default.nix

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

46 lines
925 B
Nix
Raw Normal View History

2021-09-03 19:18:14 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, gotestwaf
, testers
2021-09-03 19:18:14 +00:00
}:
buildGoModule rec {
pname = "gotestwaf";
version = "0.4.0";
2021-09-03 19:18:14 +00:00
src = fetchFromGitHub {
owner = "wallarm";
repo = pname;
rev = "v${version}";
hash = "sha256-waYX7DMyLW0eSzpFRyiCJQdYLFGaAKSlvGYrdcRfCl4=";
2021-09-03 19:18:14 +00:00
};
vendorHash = null;
# Some tests require networking as of v0.4.0
doCheck = false;
2021-09-03 19:18:14 +00:00
ldflags = [
"-X github.com/wallarm/gotestwaf/internal/version.Version=v${version}"
];
2021-09-03 19:18:14 +00:00
postFixup = ''
# Rename binary
mv $out/bin/cmd $out/bin/${pname}
'';
passthru.tests.version = testers.testVersion {
command = "gotestwaf --version";
package = gotestwaf;
version = "v${version}";
};
2021-09-03 19:18:14 +00:00
meta = with lib; {
description = "Tool for API and OWASP attack simulation";
homepage = "https://github.com/wallarm/gotestwaf";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}