2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2023-04-12 12:48:02 +00:00
|
|
|
, gotestwaf
|
|
|
|
, testers
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gotestwaf";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.4.18";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wallarm";
|
2024-02-07 01:22:34 +00:00
|
|
|
repo = "gotestwaf";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-+AM+x/jKkoXLeWOhrCALhCDuoGCl5jt0BiCit885K7I=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
vendorHash = null;
|
|
|
|
|
|
|
|
# Some tests require networking as of v0.4.0
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
ldflags = [
|
2024-02-07 01:22:34 +00:00
|
|
|
"-w"
|
|
|
|
"-s"
|
2023-07-15 17:15:38 +00:00
|
|
|
"-X=github.com/wallarm/gotestwaf/internal/version.Version=v${version}"
|
2023-04-12 12:48:02 +00:00
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
# Rename binary
|
|
|
|
mv $out/bin/cmd $out/bin/${pname}
|
|
|
|
'';
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
command = "gotestwaf --version";
|
|
|
|
package = gotestwaf;
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool for API and OWASP attack simulation";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "gotestwaf";
|
2021-09-18 10:52:07 +00:00
|
|
|
homepage = "https://github.com/wallarm/gotestwaf";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/wallarm/gotestwaf/releases/tag/v${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|