mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 18:26:45 +01:00
270d3892b3
see issue #43716
28 lines
736 B
Nix
28 lines
736 B
Nix
{ 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 ];
|
|
license = lib.licenses.mit;
|
|
};
|
|
}
|