2020-05-01 02:59:00 +01:00
|
|
|
|
{ rsync, buildGoModule, fetchFromGitHub, lib, runCommand, enableStatic ? false }:
|
2020-01-13 06:48:18 +00:00
|
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
|
pname = "gobetween";
|
|
|
|
|
version = "0.7.0";
|
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "yyyar";
|
|
|
|
|
repo = "gobetween";
|
|
|
|
|
rev = version;
|
|
|
|
|
sha256 = "f01593509ccece063acd47002c4fc52261fbbbcdbf14b088d813b7d8e38fcca8";
|
|
|
|
|
};
|
2020-05-01 02:59:00 +01:00
|
|
|
|
patches = [ ./gomod.patch ];
|
2020-01-13 06:48:18 +00:00
|
|
|
|
|
2020-05-01 02:59:00 +01:00
|
|
|
|
deleteVendor = true;
|
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-05-01 02:59:00 +01:00
|
|
|
|
lxd = fetchFromGitHub {
|
|
|
|
|
owner = "lxc";
|
|
|
|
|
repo = "lxd";
|
|
|
|
|
rev = "41efd98813f3b42f1752ff6c2c7569a054924623";
|
|
|
|
|
sha256 = "02vnvjjkzl7b0i2cn03f1lb3jgj5rd3wdkii4pqi9bvmhzszg0l2";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
overrideModAttrs = (_: {
|
|
|
|
|
postBuild = ''
|
|
|
|
|
rm -r vendor/github.com/lxc/lxd
|
|
|
|
|
cp -r --reflink=auto ${lxd} vendor/github.com/lxc/lxd
|
|
|
|
|
'';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
vendorSha256 = "1pd0zrjwpw6yv2s86a818yy2ma2fkazd3sb2h6zfp9mvyixgxgri";
|
|
|
|
|
|
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";
|
|
|
|
|
homepage = "http://gobetween.io";
|
|
|
|
|
license = licenses.mit;
|
|
|
|
|
maintainers = with maintainers; [ tomberek ];
|
|
|
|
|
};
|
|
|
|
|
}
|