From d872293f19b1179a02afc0692831f18094f76708 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Mon, 26 Jan 2026 08:20:20 -0800 Subject: [PATCH] fix(gastown): add ldflags for BuiltProperly check The gastown build now requires BuiltProperly=1 to be set via ldflags, otherwise gt errors with "This binary was built with 'go build' directly". Co-Authored-By: Claude Opus 4.5 --- home/roles/development/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/home/roles/development/default.nix b/home/roles/development/default.nix index 68657cf..4705e60 100644 --- a/home/roles/development/default.nix +++ b/home/roles/development/default.nix @@ -13,13 +13,24 @@ let # Gastown - multi-agent workspace manager (no upstream flake.nix yet) # Source is tracked via flake input for renovate updates + gastownRev = builtins.substring 0 8 (globalInputs.gastown.rev or "unknown"); gastownPackage = pkgs.buildGoModule { pname = "gastown"; - version = "unstable-${builtins.substring 0 8 globalInputs.gastown.rev or "unknown"}"; + version = "unstable-${gastownRev}"; src = globalInputs.gastown; vendorHash = "sha256-ripY9vrYgVW8bngAyMLh0LkU/Xx1UUaLgmAA7/EmWQU="; subPackages = [ "cmd/gt" ]; doCheck = false; + + # Must match ldflags from gastown Makefile - BuiltProperly=1 is required + # or gt will error with "This binary was built with 'go build' directly" + ldflags = [ + "-X github.com/steveyegge/gastown/internal/cmd.Version=${gastownRev}" + "-X github.com/steveyegge/gastown/internal/cmd.Commit=${gastownRev}" + "-X github.com/steveyegge/gastown/internal/cmd.BuildTime=nix-build" + "-X github.com/steveyegge/gastown/internal/cmd.BuiltProperly=1" + ]; + meta = with lib; { description = "Gas Town - multi-agent workspace manager by Steve Yegge"; homepage = "https://github.com/steveyegge/gastown";