2020-12-20 06:11:26 +00:00
|
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub, lib
|
|
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
|
|
|
|
}:
|
2020-01-13 06:48:18 +00:00
|
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
|
pname = "gobetween";
|
2020-07-26 04:08:52 +01:00
|
|
|
|
version = "0.8.0";
|
2020-01-13 06:48:18 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "yyyar";
|
|
|
|
|
repo = "gobetween";
|
|
|
|
|
rev = version;
|
2020-07-26 04:08:52 +01:00
|
|
|
|
sha256 = "0bxf89l53sqan9qq23rwawjkcanv9p61sw56zjqhyx78f0bh0zbc";
|
2020-01-13 06:48:18 +00:00
|
|
|
|
};
|
|
|
|
|
|
2020-07-27 11:46:35 +01:00
|
|
|
|
patches = [
|
|
|
|
|
./gomod.patch
|
|
|
|
|
];
|
|
|
|
|
|
2020-01-13 06:48:18 +00:00
|
|
|
|
buildPhase = ''
|
2020-05-01 02:59:00 +01:00
|
|
|
|
make -e build${lib.optionalString enableStatic "-static"}
|
2020-01-13 06:48:18 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2020-07-27 11:46:35 +01:00
|
|
|
|
vendorSha256 = "1nkni9ikpc0wngh5v0qmlpn5s9v85lb2ih22f3h3lih7nc29yv87";
|
2020-05-01 02:59:00 +01:00
|
|
|
|
|
2020-01-13 06:48:18 +00:00
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
cp bin/gobetween $out/bin
|
|
|
|
|
cp -r share $out/share
|
|
|
|
|
cp -r config $out/share
|
|
|
|
|
'';
|
|
|
|
|
|
2020-03-27 07:33:21 +00:00
|
|
|
|
meta = with lib; {
|
2020-01-13 06:48:18 +00:00
|
|
|
|
description = "Modern & minimalistic load balancer for the Сloud era";
|
2022-01-06 17:01:33 +00:00
|
|
|
|
homepage = "https://gobetween.io";
|
2020-01-13 06:48:18 +00:00
|
|
|
|
license = licenses.mit;
|
|
|
|
|
maintainers = with maintainers; [ tomberek ];
|
|
|
|
|
};
|
|
|
|
|
}
|