2018-03-22 13:16:14 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "toxiproxy";
|
2018-03-22 13:16:14 +00:00
|
|
|
version = "2.1.3";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Shopify";
|
|
|
|
repo = "toxiproxy";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1a7yry846iwi9cs9xam2vjbw73fjy45agjrwk214k0n1ziaawz2f";
|
|
|
|
};
|
|
|
|
|
|
|
|
goPackagePath = "github.com/Shopify/toxiproxy";
|
|
|
|
subPackages = ["cmd" "cli"];
|
|
|
|
buildFlagsArray = "-ldflags=-X github.com/Shopify/toxiproxy.Version=v${version}";
|
|
|
|
|
|
|
|
postInstall = ''
|
2020-04-28 01:50:57 +00:00
|
|
|
mv $out/bin/cli $out/bin/toxiproxy-cli
|
|
|
|
mv $out/bin/cmd $out/bin/toxiproxy-cmd
|
2018-03-22 13:16:14 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Proxy for for simulating network conditions.";
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|