2021-01-05 17:05:55 +00:00
|
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub, lib
|
|
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
|
pname = "gobetween";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
version = "0.8.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "yyyar";
|
|
|
|
|
repo = "gobetween";
|
|
|
|
|
rev = version;
|
2020-08-20 17:08:02 +00:00
|
|
|
|
sha256 = "0bxf89l53sqan9qq23rwawjkcanv9p61sw56zjqhyx78f0bh0zbc";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
|
patches = [
|
|
|
|
|
./gomod.patch
|
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
buildPhase = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
|
make -e build${lib.optionalString enableStatic "-static"}
|
2020-04-24 23:36:52 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
|
vendorSha256 = null; #vendorSha256 = "";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
cp bin/gobetween $out/bin
|
|
|
|
|
cp -r share $out/share
|
|
|
|
|
cp -r config $out/share
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
|
description = "Modern & minimalistic load balancer for the Сloud era";
|
2022-01-07 04:07:37 +00:00
|
|
|
|
homepage = "https://gobetween.io";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
license = licenses.mit;
|
|
|
|
|
maintainers = with maintainers; [ tomberek ];
|
2022-11-21 17:40:18 +00:00
|
|
|
|
broken = true; # vendor isn't reproducible with go > 1.17: nix-build -A $name.go-modules --check
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|