tailscale-nginx-auth: init at 1.48.2

https://github.com/tailscale/tailscale/tree/main/cmd/nginx-auth

is a utility in the tailscale repo allowing users to delegate nginx request authorization to a tailscale daemon running on the same host.
This commit is contained in:
phaer 2023-09-14 09:47:12 +02:00 committed by Jörg Thalheim
parent ea5566eb3b
commit 1a6db25b7a
2 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,43 @@
{ lib, stdenv, buildGoModule, fetchFromGitHub }:
let
version = "1.48.2";
in
buildGoModule {
pname = "tailscale-nginx-auth";
inherit version;
src = fetchFromGitHub {
owner = "tailscale";
repo = "tailscale";
rev = "v${version}";
hash = "sha256-5Usi7W4y6JniyxBIfQid1XjDIZRS5oIw+KUMMiFRBwk=";
};
vendorHash = "sha256-Fr4VZcKrXnT1PZuEG110KBefjcZzRsQRBSvByELKAy4=";
CGO_ENABLED = 0;
subPackages = [ "cmd/nginx-auth" ];
ldflags = [
"-w"
"-s"
"-X tailscale.com/version.longStamp=${version}"
"-X tailscale.com/version.shortStamp=${version}"
];
postInstall = lib.optionalString stdenv.isLinux ''
mv $out/bin/nginx-auth $out/bin/tailscale.nginx-auth
sed -i -e "s#/usr/sbin#$out/bin#" ./cmd/nginx-auth/tailscale.nginx-auth.service
install -D -m0444 -t $out/lib/systemd/system ./cmd/nginx-auth/tailscale.nginx-auth.service
install -D -m0444 -t $out/lib/systemd/system ./cmd/nginx-auth/tailscale.nginx-auth.socket
'';
meta = with lib; {
homepage = "https://tailscale.com";
description = "Tool that allows users to use Tailscale Whois authentication with NGINX as a reverse proxy.";
license = licenses.bsd3;
mainProgram = "tailscale.nginx-auth";
maintainers = with maintainers; [ danderson phaer ];
};
}

View file

@ -27406,6 +27406,10 @@ with pkgs;
tailscale = callPackage ../servers/tailscale { };
tailscale-nginx-auth = callPackage ../by-name/ta/tailscale-nginx-auth/package.nix {
buildGoModule = buildGo121Module;
};
tailscale-systray = callPackage ../applications/misc/tailscale-systray { };
tailspin = callPackage ../tools/misc/tailspin { };