2020-04-24 23:36:52 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "toxiproxy";
|
2020-05-29 06:06:01 +00:00
|
|
|
version = "2.1.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Shopify";
|
|
|
|
repo = "toxiproxy";
|
|
|
|
rev = "v${version}";
|
2020-05-29 06:06:01 +00:00
|
|
|
sha256 = "07yhsvscdv1qjfc2fyyh9qsrrdwrrw04wadk5gaq4qddcway7vig";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
goPackagePath = "github.com/Shopify/toxiproxy";
|
|
|
|
subPackages = ["cmd" "cli"];
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [ "-X github.com/Shopify/toxiproxy.Version=v${version}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
mv $out/bin/cli $out/bin/toxiproxy-cli
|
|
|
|
mv $out/bin/cmd $out/bin/toxiproxy-cmd
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "Proxy for for simulating network conditions";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with lib.maintainers; [ avnik ];
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
};
|
|
|
|
}
|