feat(runtime): add pi-coding-agent package with CLI tools
- Added pi-coding-agent package definition with buildNpmPackage - Includes npm dependencies and native/build inputs for GUI libraries - Skips generate-models step during build (models already in repo) - Creates 'pi' executable pointing to coding-agent dist/cli.js - Includes update.sh script for version/hash maintenance Fixes build issues where generate-models would fail during build phase
This commit is contained in:
15
packages/pi-coding-agent/update.sh
Normal file
15
packages/pi-coding-agent/update.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env nix
|
||||
#!nix shell --ignore-environment .#cacert .#nodejs .#git .#nix-update .#nix .#gnused .#findutils .#bash --command bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
version=$(npm view @mariozechner/pi-coding-agent version)
|
||||
|
||||
# Update version and hashes
|
||||
nix-update pi-coding-agent --version="$version" --generate-lockfile
|
||||
|
||||
# nix-update can't update package-lock.json along with npmDepsHash
|
||||
# TODO: Remove this workaround if nix-update can update package-lock.json along with npmDepsHash.
|
||||
(nix-build --expr '((import ./.) { system = builtins.currentSystem; }).pi-coding-agent.npmDeps.overrideAttrs { outputHash = ""; outputHashAlgo = "sha256"; }' 2>&1 || true) \
|
||||
| sed -nE '$s/ *got: *(sha256-[A-Za-z0-9+/=-]+).*/\1/p' \
|
||||
| xargs -I{} sed -i 's|npmDepsHash = "sha256-[^"]*";|npmDepsHash = "{}";|' pkgs/by-name/pi/pi-coding-agent/package.nix
|
||||
Reference in New Issue
Block a user