From f9c39f3cb719840134b5e4987b42e906d6b5ac04 Mon Sep 17 00:00:00 2001 From: "Alexander V. Nikolaev" Date: Thu, 22 Mar 2018 15:16:14 +0200 Subject: [PATCH] toxiproxy: Init at 2.1.3 --- pkgs/development/tools/toxiproxy/default.nix | 26 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/tools/toxiproxy/default.nix diff --git a/pkgs/development/tools/toxiproxy/default.nix b/pkgs/development/tools/toxiproxy/default.nix new file mode 100644 index 000000000000..10a27e2e3b88 --- /dev/null +++ b/pkgs/development/tools/toxiproxy/default.nix @@ -0,0 +1,26 @@ +{ lib, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "toxiproxy-${version}"; + 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 = '' + mv $bin/bin/cli $bin/bin/toxiproxy-cli + mv $bin/bin/cmd $bin/bin/toxiproxy-cmd + ''; + + meta = { + description = "Proxy for for simulating network conditions."; + maintainers = with lib.maintainers; [ avnik ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b7f11de15d98..4a61ec612806 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17912,6 +17912,8 @@ with pkgs; toxic = callPackage ../applications/networking/instant-messengers/toxic { }; + toxiproxy = callPackage ../development/tools/toxiproxy { }; + tqsl = callPackage ../applications/misc/tqsl { }; transcode = callPackage ../applications/audio/transcode { };