2020-04-05 23:21:35 -07:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub, go-bindata, nixosTests }:
|
2017-09-11 09:54:27 -07:00
|
|
|
|
2019-12-29 07:01:19 -08:00
|
|
|
buildGoModule rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "traefik";
|
2020-05-04 03:17:29 -07:00
|
|
|
version = "2.2.1";
|
2017-09-18 05:37:36 -07:00
|
|
|
|
2017-11-24 19:55:11 -08:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containous";
|
|
|
|
repo = "traefik";
|
|
|
|
rev = "v${version}";
|
2020-05-04 03:17:29 -07:00
|
|
|
sha256 = "0byi2h1lma95l77sdj8jkidmwb12ryjqwxa0zz6vwjg07p5ps3k4";
|
2017-09-11 09:54:27 -07:00
|
|
|
};
|
|
|
|
|
2020-04-30 18:59:00 -07:00
|
|
|
vendorSha256 = "0rbwp0cxqfv4v5sii6kavdj73a0q0l4fnvxincvyy698qzx716kf";
|
2019-12-29 07:01:19 -08:00
|
|
|
subPackages = [ "cmd/traefik" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ go-bindata ];
|
|
|
|
|
2020-04-05 23:21:35 -07:00
|
|
|
passthru.tests = { inherit (nixosTests) traefik; };
|
|
|
|
|
2019-12-29 07:01:19 -08:00
|
|
|
preBuild = ''
|
|
|
|
go generate
|
|
|
|
|
|
|
|
CODENAME=$(awk -F "=" '/CODENAME=/ { print $2}' script/binary)
|
|
|
|
|
|
|
|
makeFlagsArray+=("-ldflags=\
|
|
|
|
-X github.com/containous/traefik/version.Version=${version} \
|
|
|
|
-X github.com/containous/traefik/version.Codename=$CODENAME")
|
2017-09-11 09:54:27 -07:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://traefik.io";
|
2017-09-19 00:12:36 -07:00
|
|
|
description = "A modern reverse proxy";
|
2017-09-11 09:54:27 -07:00
|
|
|
license = licenses.mit;
|
2019-12-29 07:01:19 -08:00
|
|
|
maintainers = with maintainers; [ vdemeester ];
|
2017-09-11 09:54:27 -07:00
|
|
|
};
|
2020-04-30 18:59:00 -07:00
|
|
|
}
|