tailscale: test tailscale-nginx-auth

This commit is contained in:
Sandro Jäckel 2024-07-04 15:10:45 +02:00
parent 56e5ab1eaa
commit f8cbb648de
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 10 additions and 1 deletions

View File

@ -2,12 +2,19 @@
buildGoModule {
pname = "tailscale-nginx-auth";
inherit (tailscale) version src vendorHash ldflags;
inherit (tailscale) version src vendorHash;
CGO_ENABLED = 0;
subPackages = [ "cmd/nginx-auth" ];
ldflags = [
"-w"
"-s"
"-X tailscale.com/version.longStamp=${tailscale.version}"
"-X tailscale.com/version.shortStamp=${tailscale.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

View File

@ -11,6 +11,7 @@
, procps
, nixosTests
, installShellFiles
, tailscale-nginx-auth
}:
let
@ -76,6 +77,7 @@ buildGoModule {
passthru.tests = {
inherit (nixosTests) headscale;
inherit tailscale-nginx-auth;
};
meta = with lib; {