2020-07-26 06:08:52 +03:00
|
|
|
|
{ buildGoModule, fetchFromGitHub, lib, enableStatic ? false }:
|
2020-01-13 09:48:18 +03:00
|
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
|
pname = "gobetween";
|
2020-07-26 06:08:52 +03:00
|
|
|
|
version = "0.8.0";
|
2020-01-13 09:48:18 +03:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "yyyar";
|
|
|
|
|
repo = "gobetween";
|
|
|
|
|
rev = version;
|
2020-07-26 06:08:52 +03:00
|
|
|
|
sha256 = "0bxf89l53sqan9qq23rwawjkcanv9p61sw56zjqhyx78f0bh0zbc";
|
2020-01-13 09:48:18 +03:00
|
|
|
|
};
|
|
|
|
|
|
2020-05-01 04:59:00 +03:00
|
|
|
|
deleteVendor = true;
|
2020-01-13 09:48:18 +03:00
|
|
|
|
|
|
|
|
|
buildPhase = ''
|
2020-05-01 04:59:00 +03:00
|
|
|
|
make -e build${lib.optionalString enableStatic "-static"}
|
2020-01-13 09:48:18 +03:00
|
|
|
|
'';
|
|
|
|
|
|
2020-05-01 04:59:00 +03:00
|
|
|
|
lxd = fetchFromGitHub {
|
|
|
|
|
owner = "lxc";
|
|
|
|
|
repo = "lxd";
|
2020-07-26 06:08:52 +03:00
|
|
|
|
rev = "814c96fcec7478c9cac9582fead011b2dee0af5b";
|
|
|
|
|
sha256 = "03k2mwkfzgqmgzgxw46mymgkidbjlfv70pzw8hlyi18ag8jj4g5j";
|
2020-05-01 04:59:00 +03:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
overrideModAttrs = (_: {
|
|
|
|
|
postBuild = ''
|
|
|
|
|
rm -r vendor/github.com/lxc/lxd
|
|
|
|
|
cp -r --reflink=auto ${lxd} vendor/github.com/lxc/lxd
|
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
|
2020-07-26 06:08:52 +03:00
|
|
|
|
vendorSha256 = "1nnz75mv27iwl5z7wa986gs8mhyn10452vini5x90yfx523bg589";
|
2020-05-01 04:59:00 +03:00
|
|
|
|
|
2020-01-13 09:48:18 +03:00
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
cp bin/gobetween $out/bin
|
|
|
|
|
cp -r share $out/share
|
|
|
|
|
cp -r config $out/share
|
|
|
|
|
'';
|
|
|
|
|
|
2020-03-27 10:33:21 +03:00
|
|
|
|
meta = with lib; {
|
2020-01-13 09:48:18 +03:00
|
|
|
|
description = "Modern & minimalistic load balancer for the Сloud era";
|
|
|
|
|
homepage = "http://gobetween.io";
|
|
|
|
|
license = licenses.mit;
|
|
|
|
|
maintainers = with maintainers; [ tomberek ];
|
|
|
|
|
};
|
|
|
|
|
}
|