fix(gastown): add ldflags for BuiltProperly check
All checks were successful
CI / check (push) Successful in 3m57s
All checks were successful
CI / check (push) Successful in 3m57s
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user