From 4dafc47b3ccfc43c19161716de4f4cb42ff838c8 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 1 Sep 2026 03:12:49 +0000 Subject: [PATCH] tailcat: 0.3.0 -> 0.6.0 --- pkgs/by-name/ta/tailcat/package.nix | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/ta/tailcat/package.nix b/pkgs/by-name/ta/tailcat/package.nix index 9de62bc53042..1a405e5f0303 100644 --- a/pkgs/by-name/ta/tailcat/package.nix +++ b/pkgs/by-name/ta/tailcat/package.nix @@ -1,14 +1,14 @@ { lib, - buildGoModule, + buildGo127Module, fetchFromGitHub, nix-update-script, versionCheckHook, }: -buildGoModule (finalAttrs: { +buildGo127Module (finalAttrs: { pname = "tailcat"; - version = "0.3.0"; + version = "0.6.0"; __structuredAttrs = true; @@ -16,13 +16,21 @@ buildGoModule (finalAttrs: { owner = "tailscale"; repo = "tailcat"; tag = "v${finalAttrs.version}"; - hash = "sha256-EwjhZzovODhW4seO3FToPLiAV+YwVbrX/u93RfbWMZ4="; + hash = "sha256-TwrEezNpn9ylDl7+Vo4XS/SaVOgU6h6PO1UWSrXnBWk="; }; - vendorHash = "sha256-3uVUHATnd2s+Axdq06/xAQ2IbzJZfP1yQ/nEopgckq0="; + vendorHash = "sha256-hpFVgsUKswE7g69EieoeKGPR1nVkcRmBhDKbnB2CDBg="; subPackages = [ "cmd/tailcat" ]; + # Build with the same tags as the official release binaries. The + # comma-separated list lives in build-tags.txt in the source tree + # (see build-tags.md there); it omits unused tailscale.com library + # features to shrink the binary. + preBuild = '' + IFS=, read -ra tags < build-tags.txt + ''; + ldflags = [ "-s" "-X main.version=v${finalAttrs.version}" @@ -30,6 +38,13 @@ buildGoModule (finalAttrs: { env.CGO_ENABLED = "0"; + # The release tags apply only to the binary. Vendored test helpers + # do not compile with the omit tags, and upstream CI runs go test + # without them. + preCheck = '' + unset tags + ''; + __darwinAllowLocalNetworking = true; doInstallCheck = true;