nixpkgs/pkgs/development/tools/toxiproxy/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
843 B
Nix
Raw Normal View History

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 {
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 = ''
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 = {
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 ];
license = lib.licenses.mit;
2018-03-22 13:16:14 +00:00
};
}