2022-07-14 12:49:19 +00:00
|
|
|
{ lib, fetchzip, buildGoModule, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "traefik";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "2.9.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
# Archive with static assets for webui
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/traefik/traefik/releases/download/v${version}/traefik-v${version}.src.tar.gz";
|
2022-10-30 15:09:59 +00:00
|
|
|
sha256 = "sha256-tz4B9QgnExv8Je9o4T88WTFmOczQRrybBsdqKZ65f/g=";
|
2022-07-14 12:49:19 +00:00
|
|
|
stripRoot = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
vendorSha256 = "sha256-olYsWMTaRwRnDPwy4ewKnks5d8p+vmPTQKaXZSlG8co=";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
subPackages = [ "cmd/traefik" ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
go generate
|
|
|
|
|
|
|
|
CODENAME=$(awk -F "=" '/CODENAME=/ { print $2}' script/binary)
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
buildFlagsArray+=("-ldflags= -s -w \
|
|
|
|
-X github.com/traefik/traefik/v${lib.versions.major version}/pkg/version.Version=${version} \
|
|
|
|
-X github.com/traefik/traefik/v${lib.versions.major version}/pkg/version.Codename=$CODENAME")
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
passthru.tests = { inherit (nixosTests) traefik; };
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://traefik.io";
|
|
|
|
description = "A modern reverse proxy";
|
2021-09-18 10:52:07 +00:00
|
|
|
changelog = "https://github.com/traefik/traefik/raw/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vdemeester ];
|
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|