mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
Merge pull request #176079 from aaronjheng/traefik
traefik: 2.6.3 -> 2.7.1
This commit is contained in:
commit
9d6c025ad9
@ -11,14 +11,20 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
environment.systemPackages = [ pkgs.curl ];
|
||||
};
|
||||
traefik = { config, pkgs, ... }: {
|
||||
virtualisation.oci-containers.containers.nginx = {
|
||||
extraOptions = [
|
||||
"-l" "traefik.enable=true"
|
||||
"-l" "traefik.http.routers.nginx.entrypoints=web"
|
||||
"-l" "traefik.http.routers.nginx.rule=Host(`nginx.traefik.test`)"
|
||||
];
|
||||
image = "nginx-container";
|
||||
imageFile = pkgs.dockerTools.examples.nginx;
|
||||
virtualisation.oci-containers = {
|
||||
backend = "docker";
|
||||
containers.nginx = {
|
||||
extraOptions = [
|
||||
"-l"
|
||||
"traefik.enable=true"
|
||||
"-l"
|
||||
"traefik.http.routers.nginx.entrypoints=web"
|
||||
"-l"
|
||||
"traefik.http.routers.nginx.rule=Host(`nginx.traefik.test`)"
|
||||
];
|
||||
image = "nginx-container";
|
||||
imageFile = pkgs.dockerTools.examples.nginx;
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
@ -1,33 +1,34 @@
|
||||
{ lib, fetchzip, buildGoModule, go-bindata, nixosTests }:
|
||||
{ lib, fetchFromGitHub, buildGoModule, nixosTests }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "traefik";
|
||||
version = "2.6.3";
|
||||
version = "2.7.1";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/traefik/traefik/releases/download/v${version}/traefik-v${version}.src.tar.gz";
|
||||
sha256 = "sha256-OaKgX3qwiJM/EPprV1r3CbUnxOaWl7BTMcS5v+tmHoo=";
|
||||
stripRoot = false;
|
||||
src = fetchFromGitHub {
|
||||
owner = "traefik";
|
||||
repo = "traefik";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-uTE0Z7lgxKNq1wQSMUSp9dMfxV+aIm7cwYSkZBUdnug=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-tqrfCpZ/fRYZBZ/SBAvvJebLBeD2M/AVJEPiseehJHY=";
|
||||
vendorSha256 = "sha256-WlLntYrXs1kOu26yNeZI1xpb6FsHPiA/bNzaxCZTG4Y=";
|
||||
|
||||
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/traefik/traefik/v2/pkg/version.Version=${version} \
|
||||
-X github.com/traefik/traefik/v2/pkg/version.Codename=$CODENAME")
|
||||
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")
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
passthru.tests = { inherit (nixosTests) traefik; };
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://traefik.io";
|
||||
description = "A modern reverse proxy";
|
||||
|
Loading…
Reference in New Issue
Block a user