1 { lib, stdenv, buildGo123Module, tailscale }:
4 pname = "tailscale-nginx-auth";
5 inherit (tailscale) version src vendorHash;
9 subPackages = [ "cmd/nginx-auth" ];
14 "-X tailscale.com/version.longStamp=${tailscale.version}"
15 "-X tailscale.com/version.shortStamp=${tailscale.version}"
18 postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
19 mv $out/bin/nginx-auth $out/bin/tailscale.nginx-auth
20 sed -i -e "s#/usr/sbin#$out/bin#" ./cmd/nginx-auth/tailscale.nginx-auth.service
21 install -D -m0444 -t $out/lib/systemd/system ./cmd/nginx-auth/tailscale.nginx-auth.service
22 install -D -m0444 -t $out/lib/systemd/system ./cmd/nginx-auth/tailscale.nginx-auth.socket
26 homepage = "https://tailscale.com";
27 description = "Tool that allows users to use Tailscale Whois authentication with NGINX as a reverse proxy";
28 license = licenses.bsd3;
29 mainProgram = "tailscale.nginx-auth";
30 maintainers = with maintainers; [ phaer ];