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

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

37 lines
907 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-09-12 04:46:34 +00:00
version = "2.5.0";
2022-04-23 00:34:22 +00:00
2018-03-22 13:16:14 +00:00
src = fetchFromGitHub {
owner = "Shopify";
repo = "toxiproxy";
rev = "v${version}";
2022-09-12 04:46:34 +00:00
sha256 = "sha256-SL3YHsNeFw8K8lPrzJXAoTkHxS+1sTREfzjawBxdnf0=";
2018-03-22 13:16:14 +00:00
};
vendorHash = "sha256-CmENxPAdjz0BAyvhLKIaJjSbK/mvRzHGCQOfGIiA3yI=";
2022-04-23 00:34:22 +00:00
excludedPackages = [ "test/e2e" ];
ldflags = [ "-s" "-w" "-X github.com/Shopify/toxiproxy/v2.Version=${version}" ];
2022-10-05 22:17:32 +00:00
# Fixes tests on Darwin
__darwinAllowLocalNetworking = true;
2022-04-23 00:34:22 +00:00
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
};
}