2022-04-23 00:34:22 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2018-03-22 13:16:14 +00:00
|
|
|
|
2022-04-23 00:34:22 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "toxiproxy";
|
2022-04-23 00:34:22 +00:00
|
|
|
version = "2.4.0";
|
|
|
|
|
2018-03-22 13:16:14 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Shopify";
|
|
|
|
repo = "toxiproxy";
|
|
|
|
rev = "v${version}";
|
2022-04-23 00:34:22 +00:00
|
|
|
sha256 = "sha256-vFf1yLpAa+yO1PCE+pLTnvvtROtpVxlEgACDNNUWBEM=";
|
2018-03-22 13:16:14 +00:00
|
|
|
};
|
|
|
|
|
2022-04-23 00:34:22 +00:00
|
|
|
vendorSha256 = "sha256-mrRMyIU6zeyAT/fXbBmtMlZzpyeB45FQmYJ4FDwTRTo=";
|
|
|
|
|
|
|
|
excludedPackages = [ "test/e2e" ];
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" "-X github.com/Shopify/toxiproxy/v2.Version=${version}" ];
|
|
|
|
|
|
|
|
checkFlags = [ "-short" ];
|
2018-03-22 13:16:14 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2020-04-28 01:50:57 +00:00
|
|
|
mv $out/bin/cli $out/bin/toxiproxy-cli
|
2022-04-23 00:34:22 +00:00
|
|
|
mv $out/bin/server $out/bin/toxiproxy-server
|
2018-03-22 13:16:14 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "Proxy for for simulating network conditions";
|
2022-04-23 00:34:22 +00:00
|
|
|
homepage = "https://github.com/Shopify/toxiproxy";
|
2018-03-22 13:16:14 +00:00
|
|
|
maintainers = with lib.maintainers; [ avnik ];
|
2018-08-04 14:37:55 +00:00
|
|
|
license = lib.licenses.mit;
|
2018-03-22 13:16:14 +00:00
|
|
|
};
|
|
|
|
}
|