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)
|
# Gastown - multi-agent workspace manager (no upstream flake.nix yet)
|
||||||
# Source is tracked via flake input for renovate updates
|
# Source is tracked via flake input for renovate updates
|
||||||
|
gastownRev = builtins.substring 0 8 (globalInputs.gastown.rev or "unknown");
|
||||||
gastownPackage = pkgs.buildGoModule {
|
gastownPackage = pkgs.buildGoModule {
|
||||||
pname = "gastown";
|
pname = "gastown";
|
||||||
version = "unstable-${builtins.substring 0 8 globalInputs.gastown.rev or "unknown"}";
|
version = "unstable-${gastownRev}";
|
||||||
src = globalInputs.gastown;
|
src = globalInputs.gastown;
|
||||||
vendorHash = "sha256-ripY9vrYgVW8bngAyMLh0LkU/Xx1UUaLgmAA7/EmWQU=";
|
vendorHash = "sha256-ripY9vrYgVW8bngAyMLh0LkU/Xx1UUaLgmAA7/EmWQU=";
|
||||||
subPackages = [ "cmd/gt" ];
|
subPackages = [ "cmd/gt" ];
|
||||||
doCheck = false;
|
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; {
|
meta = with lib; {
|
||||||
description = "Gas Town - multi-agent workspace manager by Steve Yegge";
|
description = "Gas Town - multi-agent workspace manager by Steve Yegge";
|
||||||
homepage = "https://github.com/steveyegge/gastown";
|
homepage = "https://github.com/steveyegge/gastown";
|
||||||
|
|||||||
Reference in New Issue
Block a user