2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub, go-bindata, nixosTests }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "traefik";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "2.2.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containous";
|
|
|
|
repo = "traefik";
|
|
|
|
rev = "v${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "0l93qb0kjbm5gjba0bxfyb5a0n1p54n5crhcsyzgrki4x586lan0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
vendorSha256 = "06x2mcyp6c1jdf5wz51prhcn071d0580322lcv3x2bxk2grx08i2";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
subPackages = [ "cmd/traefik" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ go-bindata ];
|
|
|
|
|
|
|
|
passthru.tests = { inherit (nixosTests) traefik; };
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
go generate
|
|
|
|
|
|
|
|
CODENAME=$(awk -F "=" '/CODENAME=/ { print $2}' script/binary)
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
buildFlagsArray+=("-ldflags=\
|
|
|
|
-X github.com/containous/traefik/v2/pkg/version.Version=${version} \
|
|
|
|
-X github.com/containous/traefik/v2/pkg/version.Codename=$CODENAME")
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://traefik.io";
|
|
|
|
description = "A modern reverse proxy";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vdemeester ];
|
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|