Repository navigation
[pkgdef 1/6] docs(specs): add package definition spec and Go example - #3000
mikeland73 wants to merge 13 commits into
Conversation
Add the specification for package definitions, a declarative format for installing a tool from the upstream vendor's binary distribution instead of nixpkgs, referenced from devbox.json as pkg:<ref>@<version>. The document doubles as the living implementation plan and status board. Add pkgs/go/go.pkg.json, the first definition, which installs Go from the official builds on go.dev using its JSON index for versions and checksums. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Accept both <name>.pkg.json and <name>.pkg.jsonc. Both are parsed as hujson; .jsonc is preferred when the file has comments so editors highlight it correctly. Rename the Go example to go.pkg.jsonc since it is commented. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
[Low impact] This spec-and-example PR appears safe to merge in the stated stack order.
|
Adds a roadmap section covering nix as opt-in, devbox add with shipped definitions and a nix/native preference, search returning native packages, and a content-keyed cache layout with garbage collection. Records the cross-stack audit findings and applies its corrections to the spec. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bqy92oAnwydcLrbSE7nkVH
Mark the audit findings as fixed with the PR that fixed them, and update the install location, cache key (URL only, not the digest), download layout, PATH order and system detection to match the code. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bqy92oAnwydcLrbSE7nkVH
|
@greptileai review This PR now also adds the "Roadmap: Nix-optional Devbox" and "Audit findings across the stack" sections. Your comment about the shared install path is addressed by content-keyed, immutable install dirs in #3001, with the wiring in #3002. Generated by Claude Code |
|
@greptileai review Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bqy92oVmTnKym4AYzq67zj
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
@greptileai review Generated by Claude Code |
- Pre-releases are versions with a letter or a hyphen, matching MatchVersion. - List the allowed platforms and that an omitted checksum means none. - Roadmap gaps already fixed later in the stack (ref @ splitting, pkg: in info/search, nix.System for definitions, pre-PR 2 cache layout) are now marked as fixed instead of described as current. - Drop a stale parenthetical in audit finding 3 and complete finding 10. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bqy92oVmTnKym4AYzq67zj
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bqy92mV11RTGiKeSuiHtuV
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bqy92mV11RTGiKeSuiHtuV
…ock sync as implemented Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bqy92oVmTnKym4AYzq67zj
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bqy92mV11RTGiKeSuiHtuV
|
@greptileai review Generated by Claude Code |
Stack (merge in order):
internal/pkgdeflibraryDEVBOX_FEATURE_PKG_DEFS)Summary
First PR of the package definitions stack, which lets a Devbox project install a tool from the upstream vendor's binary distribution instead of nixpkgs, driven by a declarative package definition file.
specs/package-definitions.md: the format specification (<name>.pkg.jsonor<name>.pkg.jsonc, both parsed as hujson, referenced aspkg:<ref>@<version>), lockfile shape, install strategies, checksums, template variables, activation, security notes. It doubles as the living implementation plan and status table.pkgs/go/go.pkg.jsonc: the first definition. Installs Go from the official go.dev builds, using its JSON index for versions and per-file checksums.Roadmap: Nix-optional Devbox (new section). It covers:
devbox add gousing shipped definitions, with a remembered nix/native preference.Each part records what in the code still blocks it and the work it implies.
Audit findings across the stack (new section): 12 ranked findings from a correctness and security audit of all six PRs, each marked with the PR that fixed it.
Spec consistency fixes: requesting a full version (
1.22.3) is documented as prefix matching, not an exact pin, matchingMatchVersion. Pre-releases are versions containing a letter or a hyphen. Roadmap gaps that later PRs in the stack already fixed are marked as fixed.Test plan
go version go1.22.12 darwin/arm64from go.dev).https://claude.ai/code/session_01Bqy92oAnwydcLrbSE7nkVH
Generated by Claude Code