traefik: 1.7.14 -> 2.2.0

This commit is contained in:
Ioannis Koutras 2019-12-29 16:01:19 +01:00
parent 923dc61c9b
commit 07f1844c58

View File

@ -1,39 +1,35 @@
{ stdenv, buildGoPackage, fetchFromGitHub, bash, go-bindata}: { stdenv, buildGoModule, fetchFromGitHub, go-bindata }:
buildGoPackage rec { buildGoModule rec {
pname = "traefik"; pname = "traefik";
version = "1.7.14"; version = "2.2.0";
goPackagePath = "github.com/containous/traefik";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "containous"; owner = "containous";
repo = "traefik"; repo = "traefik";
rev = "v${version}"; rev = "v${version}";
sha256 = "1j3p09j8rpdkp8v4d4mz224ddakkvhzchvccm9qryrqc2fq4022v"; sha256 = "1dcazssabqxr9wv3dds3z7ks3y628qa07vgnn3hpdwxzm2b2ma92";
}; };
nativeBuildInputs = [ go-bindata bash ]; modSha256 = "0w3ssxvsmq8i6hbfmn4ig2x13i2nlqy5q1khcblf9pq5vhk202qx";
subPackages = [ "cmd/traefik" ];
buildPhase = '' nativeBuildInputs = [ go-bindata ];
runHook preBuild
(
cd go/src/github.com/containous/traefik
bash ./script/make.sh generate
CODENAME=$(awk -F "=" '/CODENAME=/ { print $2}' script/binary) preBuild = ''
go build -ldflags "\ go generate
-X github.com/containous/traefik/version.Version=${version} \
-X github.com/containous/traefik/version.Codename=$CODENAME \ CODENAME=$(awk -F "=" '/CODENAME=/ { print $2}' script/binary)
" -a -o $bin/bin/traefik ./cmd/traefik
) makeFlagsArray+=("-ldflags=\
runHook postBuild -X github.com/containous/traefik/version.Version=${version} \
-X github.com/containous/traefik/version.Codename=$CODENAME")
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "https://traefik.io"; homepage = "https://traefik.io";
description = "A modern reverse proxy"; description = "A modern reverse proxy";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ hamhut1066 vdemeester ]; maintainers = with maintainers; [ vdemeester ];
}; };
} }