2020-04-06 06:21:35 +00:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub, go-bindata, nixosTests }:
|
2017-09-11 16:54:27 +00:00
|
|
|
|
2019-12-29 15:01:19 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "traefik";
|
2020-07-31 12:15:26 +00:00
|
|
|
version = "2.2.8";
|
2017-09-18 12:37:36 +00:00
|
|
|
|
2017-11-25 03:55:11 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containous";
|
|
|
|
repo = "traefik";
|
|
|
|
rev = "v${version}";
|
2020-07-31 12:15:26 +00:00
|
|
|
sha256 = "1p2qv8vrjxn5wg41ywxbpaghb8585xmkwr8ih5df4dbdjw2m3k1f";
|
2017-09-11 16:54:27 +00:00
|
|
|
};
|
|
|
|
|
2020-07-12 14:25:54 +00:00
|
|
|
vendorSha256 = "0kz7y64k07vlybzfjg6709fdy7krqlv1gkk01nvhs84sk8bnrcvn";
|
2020-08-04 00:26:27 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2019-12-29 15:01:19 +00:00
|
|
|
subPackages = [ "cmd/traefik" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ go-bindata ];
|
|
|
|
|
2020-04-06 06:21:35 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) traefik; };
|
|
|
|
|
2019-12-29 15:01:19 +00: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 16:54:27 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://traefik.io";
|
2017-09-19 07:12:36 +00:00
|
|
|
description = "A modern reverse proxy";
|
2017-09-11 16:54:27 +00:00
|
|
|
license = licenses.mit;
|
2019-12-29 15:01:19 +00:00
|
|
|
maintainers = with maintainers; [ vdemeester ];
|
2017-09-11 16:54:27 +00:00
|
|
|
};
|
2020-07-31 03:58:04 +00:00
|
|
|
}
|