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