diff --git a/flake.lock b/flake.lock index 1109bbe..43473d2 100644 --- a/flake.lock +++ b/flake.lock @@ -81,11 +81,11 @@ "gastown": { "flake": false, "locked": { - "lastModified": 1769402003, - "narHash": "sha256-9jW0s/bqDIcWAf7ReYXhhPU5EQS0MNHVNlyYVnopORE=", + "lastModified": 1769538736, + "narHash": "sha256-A33gyS/ERUCFcaFG9PJdIHfIOafguqkRe+DuIZteH5s=", "owner": "steveyegge", "repo": "gastown", - "rev": "baec5b6147eed8c63a0b4cef3529b4ebb520e910", + "rev": "177094a2335786d1d450fd9e14b935877291c004", "type": "github" }, "original": { diff --git a/home/roles/development/default.nix b/home/roles/development/default.nix index 76e8131..2490727 100644 --- a/home/roles/development/default.nix +++ b/home/roles/development/default.nix @@ -18,7 +18,7 @@ let pname = "gastown"; version = "unstable-${gastownRev}"; src = globalInputs.gastown; - vendorHash = "sha256-ripY9vrYgVW8bngAyMLh0LkU/Xx1UUaLgmAA7/EmWQU="; + vendorHash = "sha256-+qaxEZgC2u51O458p3ZqZ333E/R0iRb+uKhKn8GcJJo="; subPackages = [ "cmd/gt" ]; doCheck = false; @@ -31,6 +31,65 @@ let "-X github.com/steveyegge/gastown/internal/cmd.BuiltProperly=1" ]; + # Bug fixes not yet merged upstream + postPatch = '' + # Fix validateRecipient bug: normalize addresses before comparison + # See: https://github.com/steveyegge/gastown/issues/TBD + substituteInPlace internal/mail/router.go \ + --replace-fail \ + 'if agentBeadToAddress(agent) == identity {' \ + 'if AddressToIdentity(agentBeadToAddress(agent)) == AddressToIdentity(identity) {' + + # Fix agentBeadToAddress to use title field for hq- prefixed beads + substituteInPlace internal/mail/router.go \ + --replace-fail \ + 'return parseAgentAddressFromDescription(bead.Description)' \ + 'if bead.Title != "" && strings.Contains(bead.Title, "/") { return bead.Title }; return parseAgentAddressFromDescription(bead.Description)' + + # Fix crew/polecat home paths: remove incorrect /rig suffix + substituteInPlace internal/cmd/role.go \ + --replace-fail \ + 'return filepath.Join(townRoot, rig, "polecats", polecat, "rig")' \ + 'return filepath.Join(townRoot, rig, "polecats", polecat)' \ + --replace-fail \ + 'return filepath.Join(townRoot, rig, "crew", polecat, "rig")' \ + 'return filepath.Join(townRoot, rig, "crew", polecat)' + + # Fix town root detection: don't map to Mayor (causes spurious mismatch warnings) + substituteInPlace internal/cmd/prime.go \ + --replace-fail \ + 'if relPath == "." || relPath == "" { + ctx.Role = RoleMayor + return ctx + } + if len(parts) >= 1 && parts[0] == "mayor" {' \ + 'if relPath == "." || relPath == "" { + return ctx // RoleUnknown - town root is shared space + } + + // Check for mayor role: mayor/ or mayor/rig/ + if len(parts) >= 1 && parts[0] == "mayor" {' + + # Fix copyDir to handle symlinks (broken symlinks cause "no such file" errors) + # See: https://github.com/steveyegge/gastown/issues/TBD + substituteInPlace internal/git/git.go \ + --replace-fail \ + 'if entry.IsDir() {' \ + '// Handle symlinks (recreate them, do not follow) + if entry.Type()&os.ModeSymlink != 0 { + linkTarget, err := os.Readlink(srcPath) + if err != nil { + return err + } + if err := os.Symlink(linkTarget, destPath); err != nil { + return err + } + continue + } + + if entry.IsDir() {' + ''; + meta = with lib; { description = "Gas Town - multi-agent workspace manager by Steve Yegge"; homepage = "https://github.com/steveyegge/gastown";