build(nix): a devshell, so the justfile's cargo is really there - #250
Open
bdelanghe wants to merge 1 commit into
Open
build(nix): a devshell, so the justfile's cargo is really there#250bdelanghe wants to merge 1 commit into
bdelanghe wants to merge 1 commit into
Conversation
There is no rustup on the machines this repo is worked on, so `cargo` was simply absent: every just recipe and every gate in quality_gates.sh failed at `command not found`, and the 1.94.0 pin in rust-toolchain.toml was inert because rustup is what reads it. Ported from empathic/lobby, whose flake solved the same problem. devShell only — empathic-nix already builds path-cli by pinning a rev of this repo, and a second recipe would be a second thing to keep in step. Beyond the Rust toolchain the shell carries what the non-Rust gates need: shellcheck (its gate errors rather than skipping), node and pnpm for the site build and `npx prettier`, jq and curl for the plugin scripts, and fzf so the pickers take their external-backend path while developing. openssl is split across nativeBuildInputs and buildInputs because openssl-sys arrives under git2 and needs pkg-config to find the dev output. Verified in the shell: cargo build --workspace, and the format, shellcheck, plugin and site gates all pass. clippy does not — nixpkgs ships 1.97, which flags unnecessary_sort_by in toolpath-pi that 1.94 does not. That divergence is documented in the flake rather than papered over.
|
🔍 Preview deployed: https://a715cda3.toolpath.pages.dev |
bdelanghe
marked this pull request as ready for review
September 1, 2026 18:23
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is no rustup on the machines this repo gets worked on, so
cargois simply absent: everyjustrecipe and every gate inscripts/quality_gates.shdies atcommand not found, and the1.94.0pin inrust-toolchain.tomlis inert because rustup is what reads it.Ported from
empathic/lobby, whose flake solves the same problem.What's in the shell
Beyond the Rust toolchain, it carries what the non-Rust gates need —
_all_gates=(format shellcheck clippy test doc examples plugin site)reaches well past cargo:shellchecknodejs,pnpmpnpm install --frozen-lockfile && pnpm run build; the format gate shells out tonpx prettierjq,curlplugins/claude-code/scriptsfzfopensslis split acrossnativeBuildInputs(pkg-config) andbuildInputsbecauseopenssl-sysarrives undergit2and needs pkg-config to find the dev output.ensure-path.shalready falls back fromsha256sumtoshasum, so no coreutils.devShell only.
bdelanghe/empathic-nixalready buildspath-cliby pinning a rev of this repo; a second recipe here would be a second thing to keep in step.Verified in the shell
Two known reds, both pre-existing and out of scope
1.
clippyfails. nixpkgs ships Rust 1.97; the pin is 1.94.0. 1.97 enforcesunnecessary_sort_byoncrates/toolpath-pi/src/reader.rs:359, which 1.94 does not. The flake documents this divergence rather than papering over it — the pinned toolchain is the real gate, and green-in-the-shell is evidence, not proof. A one-linesort_by_keyfix would close it; deliberately not bundled here.2.
testfails — 20 of 62 inpath-cli --test integration— if you haveCLAUDE_CONFIG_DIRset. Not a nix issue and not new: the tests sandboxHOMEbut never clearCLAUDE_CONFIG_DIR, so since b31f2c5 taught the reader to honour it, the CLI escapes the sandbox and reads the developer's real Claude config.Proof it is orthogonal to this PR:
The fix belongs in
ScopedHome(clearCLAUDE_CONFIG_DIRalongsideHOME/XDG_DATA_HOME), as its own PR. Anyone who is not a Claude Code user never sees this.format,shellcheck,plugin,site,doc,examplesgates pass inside the shell;cargo build --workspacesucceeds;cargo testpasses 62/62 withCLAUDE_CONFIG_DIRclearedcargoabsent because no rustup is installed and no devShell existed; the two remaining reds traced to a toolchain version gap and an env var escaping the test sandbox, neither introduced heresort_by_keylint fix and theScopedHomefix are both deliberately left for their own branchesNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.