biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / tools / toxiproxy / default.nix
blob22dd5d2f6eeba874f8f199a58566f72edb7b6869
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , testers
5 , toxiproxy
6 }:
8 buildGoModule rec {
9   pname = "toxiproxy";
10   version = "2.9.0";
12   src = fetchFromGitHub {
13     owner = "Shopify";
14     repo = "toxiproxy";
15     rev = "v${version}";
16     sha256 = "sha256-zwKeJ8LMMSSHvE0x0/9j3wBdAJG43RiGcszKz0B3dG8=";
17   };
19   vendorHash = "sha256-eSQvLsSWWypA5vXR/GiEf5j7TzzsL8ZFRPOeICsIrlY=";
21   excludedPackages = [ "test/e2e" ];
23   ldflags = [ "-s" "-w" "-X github.com/Shopify/toxiproxy/v2.Version=${version}" ];
25   # Fixes tests on Darwin
26   __darwinAllowLocalNetworking = true;
28   checkFlags = [
29     "-short"
30     "-skip=TestVersionEndpointReturnsVersion|TestFullstreamLatencyBiasDown"
31   ];
33   postInstall = ''
34     mv $out/bin/cli $out/bin/toxiproxy-cli
35     mv $out/bin/server $out/bin/toxiproxy-server
36   '';
38   passthru.tests = {
39     cliVersion = testers.testVersion {
40       inherit version;
41       package = toxiproxy;
42       command = "${toxiproxy}/bin/toxiproxy-cli -version";
43     };
44     serverVersion = testers.testVersion {
45       inherit version;
46       package = toxiproxy;
47       command = "${toxiproxy}/bin/toxiproxy-server -version";
48     };
49   };
51   meta = {
52     changelog = "https://github.com/Shopify/toxiproxy/releases/tag/v${version}";
53     description = "Proxy for for simulating network conditions";
54     homepage = "https://github.com/Shopify/toxiproxy";
55     maintainers = with lib.maintainers; [ avnik ];
56     license = lib.licenses.mit;
57   };