mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
6eddc6d905
Semi-automatic update. These checks were performed: - built on NixOS - ran `/nix/store/byzavm86fdpdnigaj0j4r9bd755pqylq-traefik-1.5.2-bin/bin/traefik -h` got 0 exit code - ran `/nix/store/byzavm86fdpdnigaj0j4r9bd755pqylq-traefik-1.5.2-bin/bin/traefik --help` got 0 exit code - ran `/nix/store/byzavm86fdpdnigaj0j4r9bd755pqylq-traefik-1.5.2-bin/bin/traefik version` and found version 1.5.2 - found 1.5.2 with grep in /nix/store/byzavm86fdpdnigaj0j4r9bd755pqylq-traefik-1.5.2-bin - found 1.5.2 in filename of file in /nix/store/byzavm86fdpdnigaj0j4r9bd755pqylq-traefik-1.5.2-bin cc "@hamhut1066 @ehmry @lethalman"
40 lines
1.0 KiB
Nix
40 lines
1.0 KiB
Nix
{ stdenv, buildGoPackage, fetchFromGitHub, bash, go-bindata}:
|
|
|
|
buildGoPackage rec {
|
|
name = "traefik-${version}";
|
|
version = "1.5.2";
|
|
|
|
goPackagePath = "github.com/containous/traefik";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "containous";
|
|
repo = "traefik";
|
|
rev = "v${version}";
|
|
sha256 = "0cv05nm7jj1g2630l5zmzpmsrjx712ba3l7klh8nqs02mzykzsha";
|
|
};
|
|
|
|
buildInputs = [ go-bindata bash ];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
(
|
|
cd go/src/github.com/containous/traefik
|
|
bash ./script/make.sh generate
|
|
|
|
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
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = https://traefik.io;
|
|
description = "A modern reverse proxy";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ hamhut1066 ];
|
|
};
|
|
}
|