mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(coding-agent): append Node to PATH in the Nix wrapper
Shells started by the bash tool now keep the user's node/npm. Pi still runs on the pinned Node, which stays available as an npm fallback. closes #10519
This commit is contained in:
parent
a3f265b1c6
commit
eddebaeebf
2 changed files with 6 additions and 1 deletions
|
|
@ -118,12 +118,16 @@ stdenv.mkDerivation {
|
|||
mkdir -p "$out/lib/pi" "$out/bin"
|
||||
cp -R . "$out/lib/pi"
|
||||
|
||||
# The wrapper runs Pi with an absolute Node path. Node is only on PATH so Pi can
|
||||
# find npm for package installs; append it so that shells started by the
|
||||
# bash tool keep the user's node/npm (e.g. from mise or nvm). fd, ripgrep,
|
||||
# and the clipboard tools are Pi's own dependencies and take precedence.
|
||||
makeWrapper ${nodejs}/bin/node "$out/bin/pi" \
|
||||
--add-flags "$out/lib/pi/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js" \
|
||||
--suffix PATH : ${lib.makeBinPath [ nodejs ]} \
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath (
|
||||
[
|
||||
nodejs
|
||||
fd
|
||||
ripgrep
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue