depot/third_party/nixpkgs/pkgs/servers/traefik/default.nix
Default email 58f8944c92 Project import generated by Copybara.
GitOrigin-RevId: 5aba0fe9766a7201a336249fd6cb76e0d7ba2faf
2020-09-24 23:45:31 -05:00

40 lines
1,019 B
Nix

{ stdenv, buildGoModule, fetchFromGitHub, go-bindata, nixosTests }:
buildGoModule rec {
pname = "traefik";
version = "2.2.11";
src = fetchFromGitHub {
owner = "containous";
repo = "traefik";
rev = "v${version}";
sha256 = "0l93qb0kjbm5gjba0bxfyb5a0n1p54n5crhcsyzgrki4x586lan0";
};
vendorSha256 = "06x2mcyp6c1jdf5wz51prhcn071d0580322lcv3x2bxk2grx08i2";
doCheck = false;
subPackages = [ "cmd/traefik" ];
nativeBuildInputs = [ go-bindata ];
passthru.tests = { inherit (nixosTests) traefik; };
preBuild = ''
go generate
CODENAME=$(awk -F "=" '/CODENAME=/ { print $2}' script/binary)
buildFlagsArray+=("-ldflags=\
-X github.com/containous/traefik/v2/pkg/version.Version=${version} \
-X github.com/containous/traefik/v2/pkg/version.Codename=$CODENAME")
'';
meta = with stdenv.lib; {
homepage = "https://traefik.io";
description = "A modern reverse proxy";
license = licenses.mit;
maintainers = with maintainers; [ vdemeester ];
};
}