Skip to content

[pkgdef 4/6] feat(pkgs): add the initial set of package definitions - #3034

Open
mikeland73 wants to merge 9 commits into
mikeland73/pkgdef-wiringfrom
mikeland73/pkgdef-packages
Open

mikeland73 wants to merge 9 commits into
mikeland73/pkgdef-wiringfrom
mikeland73/pkgdef-packages

Conversation

@mikeland73

@mikeland73 mikeland73 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Stack (merge in order):

  1. [pkgdef 1/6] docs(specs): add package definition spec and Go example #3000 — spec + Go example
  2. [pkgdef 2/6] feat(pkgdef): add package definition library #3001 — internal/pkgdef library
  3. [pkgdef 3/6] feat(pkgdef): wire package definitions into add, lock, install and env #3002 — wiring into add/lock/install/env (behind DEVBOX_FEATURE_PKG_DEFS)
  4. [pkgdef 4/6] feat(pkgs): add the initial set of package definitions #3034 — initial package set (15 definitions) 👈 this PR
  5. [pkgdef 5/6] feat(pkgdef): support the initial package set #3035 — format features for the initial package set
  6. [pkgdef 6/6] test(pkgs): install and switch versions of every shipped package #3036 — per-package install/switch tests + CI

Summary

Fourth PR of the package definitions stack. Adds 15 package definitions next to Go, and updates the spec with what they need from the format. The goal is to show that the structure holds for installing and switching versions of the most commonly used packages: node (with npm, pnpm, yarn), python, rust and java, plus the tools in the table below.

Package Source Checksum
nodejs (npm included) nodejs.org SHASUMS256.txt
pnpm GitHub tarballs (11+), npm @pnpm/<os>-<arch> (<11) GitHub asset digest, npm sha512
yarn npm @yarnpkg/cli-dist (2+), yarn (1.x) npm sha512
python python-build-standalone, via uv's index index
uv GitHub releases .sha256
rust rustup-init, then the toolchain via post_install .sha256, then rustup
java Eclipse Temurin from Adoptium index
gradle services.gradle.org index
maven Maven Central Apache archive .sha512
deno, bun GitHub releases .sha256sum, SHASUMS256.txt
zig ziglang.org index
terraform releases.hashicorp.com SHA256SUMS
kubectl dl.k8s.io .sha256
helm get.helm.sh .sha256sum

Writing these against the real vendors exposed the gaps the spec now covers (implemented in the next PR):

  • Platforms a version isn't published for (Node.js 14 on Apple silicon, Java 8 on Apple silicon, Temurin 27 on Intel macOS). The lock leaves those systems out instead of failing.
  • install.lookup: python-build-standalone puts a build date in every file name, Temurin renames respins, and zig renamed its tarballs. Their indexes have the URL and checksum.
  • install.version_overrides: pnpm changed its artifacts in 11, yarn 1 and 2+ are different npm packages, and Deno <2.0.1 has no checksums.
  • Version sources: a list of sources (yarn), lazy pagination (Adoptium pages of 50, older GitHub releases), and +build versions (21.0.5+11).
  • Checksums: sha512 and SRI digests (npm, Maven), plus GitHub's own asset digests.
  • binaries: install now marks them executable (npm tarballs drop the bit) and verifies they exist.

Design choices worth a look:

  • Rust uses rustup-init plus a post_install hook rather than the planned manager strategy. Toolchains share RUSTUP_HOME, and RUSTUP_TOOLCHAIN selects the version, so rustup target add still works.
  • Python creates and activates $VENV_DIR (default .venv), so pip never writes into the shared install. When the version changes it recreates only a venv Devbox created (marked by a .devbox-venv file). Any other venv is left alone and not activated, with a warning, and PIP_REQUIRE_VIRTUALENV=1 keeps pip3 from installing into the shared Python.
  • Node sends npm install -g to the project's virtenv, for the same reason.
  • Go now sets GOTOOLCHAIN=local, as the nixpkgs Go does, so the pinned version runs even when go.mod asks for a newer one.

The definitions use format features implemented in the next PR, so they don't parse on this branch alone.

Test plan


Generated by Claude Code

Add package definitions for nodejs (with npm), pnpm, yarn, python, uv,
rust, java (Eclipse Temurin), gradle, maven, deno, bun, zig, terraform,
kubectl and helm, next to the existing go definition.

The go definition now sets GOTOOLCHAIN=local, like the nixpkgs go, so the
version in devbox.json runs even when go.mod asks for a newer toolchain.

The spec documents what these packages need from the format: lists of
version sources, paginated sources, versions with +build metadata,
install.lookup for vendors whose download names come from an index,
install.version_overrides for vendors that changed how they ship,
sha512 and github_release checksums, platforms a version is not published
for, and binaries that install marks executable and verifies. It also
lists the shipped packages and the PR 4-6 plan.

The definitions parse once the next change implements these features.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@claude

claude Bot commented Nov 17, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge as part of the supplied stack, with PR #3035 providing the required format support.

Summary

Adds 15 vendor-backed package definitions, sets GOTOOLCHAIN=local for Go, and expands the package-definition specification.

  • Node.js, pnpm, Yarn, Bun, and Deno install from their vendors.
  • Python installs use a project virtual environment.
  • uv installs as a standalone tool from GitHub releases.
  • Rust installs its toolchain through rustup.
  • Java, Gradle, and Maven install from their vendor sources.
  • Zig, Terraform, kubectl, and Helm install from vendor releases.
  • Go now sticks to the version selected in Devbox.
  • The package-definition guide now explains the needs of the shipped tools.

Reviews (5) · Last reviewed commit: "Merge branch 'mikeland73/pkgdef-wiring' ..." · Reviewed by Greptile

Comment thread pkgs/python/python.pkg.jsonc Resolved
@mikeland73 mikeland73 changed the title feat(pkgs): add the initial set of package definitions [pkgdef 4/6] feat(pkgs): add the initial set of package definitions Nov 23, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai review


Generated by Claude Code

1 similar comment

Copy link
Copy Markdown
Collaborator Author

@greptileai review


Generated by Claude Code

Comment thread pkgs/python/python.pkg.jsonc Resolved
@mikeland73
mikeland73 added this pull request to stack #3003 November 23, 2026 21:41
…t activated

Mark virtual environments Devbox creates with .devbox-venv and require the
marker before running venv --clear on a version switch, so user-created
environments are never erased. When an existing venv is left alone and not
activated, export PIP_REQUIRE_VIRTUALENV=1 so pip3 from the shared install
refuses to modify it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Bqy92none6xcXNmBBX5aD7

Copy link
Copy Markdown
Collaborator Author

@greptileai review


Generated by Claude Code

greptile-apps[bot]
greptile-apps Bot previously approved these changes Nov 23, 2026
@greptile-apps
greptile-apps Bot dismissed their stale review November 23, 2026 21:59

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

Combine the spec audit fixes from lower PRs with this PR's spec additions:
version comparison (prefix ordering plus build metadata), the bin_name
rule on the lookup-aware binary row, the omitted-checksum note next to the
digest formats, and create_files in the template variable table next to
{{.Page}}.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Bqy92mV11RTGiKeSuiHtuV

Copy link
Copy Markdown
Collaborator Author

@greptileai review


Generated by Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants