2018-03-22 14:16:14 +01:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "toxiproxy";
|
2020-05-20 07:08:49 +02:00
|
|
|
version = "2.1.4";
|
2018-03-22 14:16:14 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Shopify";
|
|
|
|
repo = "toxiproxy";
|
|
|
|
rev = "v${version}";
|
2020-05-20 07:08:49 +02:00
|
|
|
sha256 = "07yhsvscdv1qjfc2fyyh9qsrrdwrrw04wadk5gaq4qddcway7vig";
|
2018-03-22 14:16:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
goPackagePath = "github.com/Shopify/toxiproxy";
|
|
|
|
subPackages = ["cmd" "cli"];
|
|
|
|
buildFlagsArray = "-ldflags=-X github.com/Shopify/toxiproxy.Version=v${version}";
|
|
|
|
|
|
|
|
postInstall = ''
|
2020-04-28 03:50:57 +02:00
|
|
|
mv $out/bin/cli $out/bin/toxiproxy-cli
|
|
|
|
mv $out/bin/cmd $out/bin/toxiproxy-cmd
|
2018-03-22 14:16:14 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Proxy for for simulating network conditions.";
|
|
|
|
maintainers = with lib.maintainers; [ avnik ];
|
2018-08-04 16:37:55 +02:00
|
|
|
license = lib.licenses.mit;
|
2018-03-22 14:16:14 +01:00
|
|
|
};
|
|
|
|
}
|