Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildGoModule, fetchFromGitHub }: 2 3buildGoModule rec { 4 pname = "toxiproxy"; 5 version = "2.5.0"; 6 7 src = fetchFromGitHub { 8 owner = "Shopify"; 9 repo = "toxiproxy"; 10 rev = "v${version}"; 11 sha256 = "sha256-SL3YHsNeFw8K8lPrzJXAoTkHxS+1sTREfzjawBxdnf0="; 12 }; 13 14 vendorSha256 = "sha256-CmENxPAdjz0BAyvhLKIaJjSbK/mvRzHGCQOfGIiA3yI="; 15 16 excludedPackages = [ "test/e2e" ]; 17 18 ldflags = [ "-s" "-w" "-X github.com/Shopify/toxiproxy/v2.Version=${version}" ]; 19 20 # Fixes tests on Darwin 21 __darwinAllowLocalNetworking = true; 22 23 checkFlags = [ "-short" ]; 24 25 postInstall = '' 26 mv $out/bin/cli $out/bin/toxiproxy-cli 27 mv $out/bin/server $out/bin/toxiproxy-server 28 ''; 29 30 meta = { 31 description = "Proxy for for simulating network conditions"; 32 homepage = "https://github.com/Shopify/toxiproxy"; 33 maintainers = with lib.maintainers; [ avnik ]; 34 license = lib.licenses.mit; 35 }; 36}