From 4965929f88bb6d3e85f0487bee28fa48e13b0463 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Wed, 7 Oct 2026 16:27:47 -0700 Subject: [PATCH] tailscale: enable TestLicenseHeaders and TestPackageDocs Both walk the source tree and failed on the vendored dependencies. Link the vendor directory into the go-other test derivation instead of copying it; filepath.Walk does not follow symlinks, so the tests only see tailscale's own sources. Assisted-by: Claude Code (claude-opus-5-5) --- pkgs/by-name/ta/tailscale/package.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/ta/tailscale/package.nix b/pkgs/by-name/ta/tailscale/package.nix index 471a7d4ea03c7..d11d4de862604 100644 --- a/pkgs/by-name/ta/tailscale/package.nix +++ b/pkgs/by-name/ta/tailscale/package.nix @@ -97,8 +97,6 @@ buildGo127Module (finalAttrs: { checkFlags = let skippedTests = [ - # dislikes vendoring - "TestPackageDocs" # . # tries to start tailscaled "TestContainerBoot" # cmd/containerboot @@ -133,9 +131,6 @@ buildGo127Module (finalAttrs: { # Requires `go` to be installed with the `go tool` system which we don't use "TestGoVersion" - - # Fails because we vendor dependencies - "TestLicenseHeaders" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # syscall default route interface en0 differs from netstat @@ -279,7 +274,16 @@ buildGo127Module (finalAttrs: { { inherit (nixosTests) headscale; inherit tailscale-nginx-auth; - go-other = mkGoTests "other" "./..." goTestDirs { }; + go-other = mkGoTests "other" "./..." goTestDirs { + # TestLicenseHeaders and TestPackageDocs walk the source tree and + # would check the vendored dependencies too. `filepath.Walk` does not + # follow symlinks, so link the vendor directory instead of copying it. + preCheck = '' + chmod -R u+w vendor + rm -rf vendor + ln -s "$goModules" vendor + ''; + }; } // lib.mapAttrs' ( dir: overrides: