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