mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-24 09:31:29 +00:00
pi-coding-agent: 0.80.10 -> 0.81.1 (#544278)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
nix-update-script,
|
||||
versionCheckHook,
|
||||
writableTmpDirAsHomeHook,
|
||||
@@ -12,16 +13,34 @@
|
||||
}:
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "pi-coding-agent";
|
||||
version = "0.80.10";
|
||||
version = "0.81.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "earendil-works";
|
||||
repo = "pi";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-Vs/ndHYzFyfN4CjPV2zMYblLXe9IuM13UrPJI1VsZEQ=";
|
||||
hash = "sha256-xo3uoR7HceOCL3wqoMcacOe8WXP1o7ReAXne5t6Hgao=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-XGvDNH+eilsgc0Z7ITqbitB/9RVc+WuDfCcr1pibNqk=";
|
||||
npmDepsHash = "sha256-lzKQZbnITzgV9koucsMno6f61ubBLYUcwQEXtak1r1s=";
|
||||
|
||||
# The provider model catalog (packages/ai/src/providers/data/) is generated by
|
||||
# a network fetch (models.dev plus provider APIs) and is gitignored upstream,
|
||||
# so it is absent from the source tarball. Restore it from the matching
|
||||
# published @earendil-works/pi-ai npm package, which ships the hydrated catalog
|
||||
# under dist/providers/data/. Bump this hash alongside version.
|
||||
modelData = fetchurl {
|
||||
url = "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-${finalAttrs.version}.tgz";
|
||||
hash = "sha256-x53MD5DU370ZdNoz36P+OWZjGVpoM5sfVcEU2/ckDy8=";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
mkdir -p packages/ai/src/providers/data
|
||||
tar --extract --gzip --file=${finalAttrs.modelData} \
|
||||
--directory=packages/ai/src/providers/data \
|
||||
--strip-components=4 \
|
||||
package/dist/providers/data
|
||||
'';
|
||||
|
||||
npmWorkspace = "packages/coding-agent";
|
||||
|
||||
@@ -34,8 +53,8 @@ buildNpmPackage (finalAttrs: {
|
||||
|
||||
# Build workspace dependencies in order, then the coding-agent.
|
||||
# We invoke tsgo directly for workspace deps to skip pi-ai's
|
||||
# generate-models script which requires network access
|
||||
# (models.generated.ts is committed to the repo).
|
||||
# generate-models script, which requires network access; the model
|
||||
# catalog it would produce is supplied via modelData above.
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
@@ -96,13 +115,18 @@ buildNpmPackage (finalAttrs: {
|
||||
versionCheckProgram = "${placeholder "out"}/bin/pi";
|
||||
versionCheckProgramArg = "--version";
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--custom-dep"
|
||||
"modelData"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Coding agent CLI with read, bash, edit, write tools and session management";
|
||||
homepage = "https://pi.dev/";
|
||||
downloadPage = "https://www.npmjs.com/package/@earendil-works/pi-coding-agent";
|
||||
changelog = "https://github.com/earendil-works/pi/blob/main/packages/coding-agent/CHANGELOG.md";
|
||||
changelog = "https://github.com/earendil-works/pi/blob/v${finalAttrs.version}/packages/coding-agent/CHANGELOG.md";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [
|
||||
munksgaard
|
||||
|
||||
Reference in New Issue
Block a user