🤖 feat: build goplaces from fork with directions
What: - switch goplaces to buildGoModule from joshp123 fork - update goplaces skill with directions/compare guidance - remove goplaces from update-tools automation Why: - ship new directions command without release assets - keep skill aligned with CLI behavior Tests: - go test ./... - nix build .#goplaces --accept-flake-config
This commit is contained in:
parent
cff785cee3
commit
c67cb53c00
@ -227,16 +227,6 @@ func main() {
|
||||
},
|
||||
NixFile: filepath.Join(repoRoot, "nix", "pkgs", "gogcli.nix"),
|
||||
},
|
||||
{
|
||||
Name: "goplaces",
|
||||
Repo: "steipete/goplaces",
|
||||
Assets: []AssetSpec{
|
||||
{System: "aarch64-darwin", Regex: regexp.MustCompile(`goplaces_[0-9.]+_darwin_arm64\.tar\.gz`)},
|
||||
{System: "x86_64-linux", Regex: regexp.MustCompile(`goplaces_[0-9.]+_linux_amd64\.tar\.gz`)},
|
||||
{System: "aarch64-linux", Regex: regexp.MustCompile(`goplaces_[0-9.]+_linux_arm64\.tar\.gz`)},
|
||||
},
|
||||
NixFile: filepath.Join(repoRoot, "nix", "pkgs", "goplaces.nix"),
|
||||
},
|
||||
{
|
||||
Name: "camsnap",
|
||||
Repo: "steipete/camsnap",
|
||||
|
||||
@ -1,47 +1,31 @@
|
||||
{ lib, stdenv, fetchurl }:
|
||||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
sources = {
|
||||
"aarch64-darwin" = {
|
||||
url = "https://github.com/steipete/goplaces/releases/download/v0.2.1/goplaces_0.2.1_darwin_arm64.tar.gz";
|
||||
hash = "sha256-haImHN6IS2eAMPd6YusOFreSuRc4e0uxpwrYTJkxle8=";
|
||||
};
|
||||
"x86_64-linux" = {
|
||||
url = "https://github.com/steipete/goplaces/releases/download/v0.2.1/goplaces_0.2.1_linux_amd64.tar.gz";
|
||||
hash = "sha256-oDsFtk+M/NOC3CLCgVpVws15VfY7NQdUMUZgdzTqwW0=";
|
||||
};
|
||||
"aarch64-linux" = {
|
||||
url = "https://github.com/steipete/goplaces/releases/download/v0.2.1/goplaces_0.2.1_linux_arm64.tar.gz";
|
||||
hash = "sha256-3PzBz0/DjOmD86yjQRW9Ak/J50/+NDLpjoByEuatmEU=";
|
||||
};
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
buildGoModule rec {
|
||||
pname = "goplaces";
|
||||
version = "0.2.1";
|
||||
version = "0.2.2-dev";
|
||||
|
||||
src = fetchurl sources.${stdenv.hostPlatform.system};
|
||||
src = fetchFromGitHub {
|
||||
owner = "joshp123";
|
||||
repo = "goplaces";
|
||||
rev = "c7be7782989c4f2d24aba8c1122d0b6207247d31";
|
||||
hash = "sha256-noyIyj7dtVscUUSUlcUhKt45QUH/bZL/fINwqR6fZS0=";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
subPackages = [ "cmd/goplaces" ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar -xzf "$src"
|
||||
'';
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/steipete/goplaces/internal/cli.Version=${version}"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out/bin"
|
||||
cp $(find . -type f -name goplaces | head -1) "$out/bin/goplaces"
|
||||
chmod 0755 "$out/bin/goplaces"
|
||||
runHook postInstall
|
||||
'';
|
||||
vendorHash = "sha256-OFTjLtKwYSy4tM+D12mqI28M73YJdG4DyqPkXS7ZKUg=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Modern Go client + CLI for the Google Places API";
|
||||
homepage = "https://github.com/steipete/goplaces";
|
||||
homepage = "https://github.com/joshp123/goplaces";
|
||||
license = licenses.mit;
|
||||
platforms = builtins.attrNames sources;
|
||||
platforms = platforms.darwin ++ platforms.linux;
|
||||
mainProgram = "goplaces";
|
||||
};
|
||||
}
|
||||
|
||||
@ -31,12 +31,14 @@ Closest place to me
|
||||
- Pick the top result as the closest match unless distance is explicitly returned in output.
|
||||
|
||||
Directions (A → B)
|
||||
- goplaces does NOT provide directions or ETA between two points.
|
||||
- `goplaces route` finds places along a route (Routes API) — not a directions/ETA tool.
|
||||
- For directions, generate a Google Maps link (no guessing):
|
||||
- Coordinates: `https://www.google.com/maps/dir/?api=1&origin=<lat>,<lng>&destination=<lat>,<lng>`
|
||||
- Place IDs: `https://www.google.com/maps/dir/?api=1&origin_place_id=<id>&destination_place_id=<id>`
|
||||
- If the user asks for time/distance, provide the link and ask them to open it.
|
||||
- Use the Directions API via the CLI (default mode: walking).
|
||||
- Place IDs (preferred for agent workflows):
|
||||
- `goplaces directions --from-place-id <fromId> --to-place-id <toId>`
|
||||
- Add turn-by-turn steps:
|
||||
- `goplaces directions --from-place-id <fromId> --to-place-id <toId> --steps`
|
||||
- Compare driving ETA alongside walking:
|
||||
- `goplaces directions --from-place-id <fromId> --to-place-id <toId> --compare drive`
|
||||
- `goplaces route` is only for searching places along a route (Routes API), not directions/ETA.
|
||||
|
||||
Notes
|
||||
- `--no-color` or `NO_COLOR` disables ANSI color.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user