Running nixpkgs-update (https://nix-community.org/update-bot/) with UPDATE_INFO: pi-coding-agent 0.85.1 -> 0.86.0 https://github.com/earendil-works/pi/releases attrpath: pi-coding-agent Checking auto update branch... [version] [version] generic version rewriter does not support multiple hashes [rustCrateVersion] [rustCrateVersion] No cargoHash found [golangModuleVersion] [golangModuleVersion] Not a buildGoModule package with vendorHash [npmDepsVersion] [npmDepsVersion] skipping because derivation has updateScript [updateScript] [updateScript] Success [updateScript] this derivation will be built: /nix/store/yvrm0in4xgwkj86hqw8jyisnkkx731dm-packages.json.drv building '/nix/store/yvrm0in4xgwkj86hqw8jyisnkkx731dm-packages.json.drv'... structuredAttrs is enabled Going to be running update for following packages: - pi-coding-agent-0.85.1 Press Enter key to continue... Running update for: Enqueuing group of 1 packages - pi-coding-agent-0.85.1: UPDATING ... - pi-coding-agent-0.85.1: DONE. Packages updated! Diff after rewrites: diff --git a/pkgs/by-name/pi/pi-coding-agent/package.nix b/pkgs/by-name/pi/pi-coding-agent/package.nix index 06b3d988322e..47e219707120 100644 --- a/pkgs/by-name/pi/pi-coding-agent/package.nix +++ b/pkgs/by-name/pi/pi-coding-agent/package.nix @@ -13,16 +13,16 @@ }: buildNpmPackage (finalAttrs: { pname = "pi-coding-agent"; - version = "0.85.1"; + version = "0.86.0"; src = fetchFromGitHub { owner = "earendil-works"; repo = "pi"; tag = "v${finalAttrs.version}"; - hash = "sha256-gU8BSiqqOYt2RRuQONHHGvZeSM5KFQVrwif9bmuUXUc="; + hash = "sha256-HmLJPuhCoeK+aidnRoc5huCMPVAMpTbXcrETPuNCSxE="; }; - npmDepsHash = "sha256-jzlsZIQzfl1FCZZ5//dHFWwMfBZQ4nRD6KB4HHifPqE="; + npmDepsHash = "sha256-CYVYDdDzfl1VD3EA3FDKf4iDR1Y6wwmrqwGiXJVm40w="; # The provider model catalog (packages/ai/src/providers/data/) is generated by # a network fetch (models.dev plus provider APIs) and is gitignored upstream, @@ -31,7 +31,7 @@ buildNpmPackage (finalAttrs: { # 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-r30RmGF5RFzm/oizfVfeIvgjwP/TplyuMcVVt/XpklM="; + hash = "sha256-1SRIyCenLI/c+fDJbJlmcEqFJaagrhgfS9iGxYTXJ+M="; }; preConfigure = '' No auto update branch exists Old version 0.85.1" not present in master derivation file with contents: { lib, buildNpmPackage, fetchFromGitHub, fetchurl, nix-update-script, versionCheckHook, writableTmpDirAsHomeHook, ripgrep, fd, makeBinaryWrapper, stdenvNoCC, }: buildNpmPackage (finalAttrs: { pname = "pi-coding-agent"; version = "0.86.0"; src = fetchFromGitHub { owner = "earendil-works"; repo = "pi"; tag = "v${finalAttrs.version}"; hash = "sha256-HmLJPuhCoeK+aidnRoc5huCMPVAMpTbXcrETPuNCSxE="; }; npmDepsHash = "sha256-CYVYDdDzfl1VD3EA3FDKf4iDR1Y6wwmrqwGiXJVm40w="; # 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-1SRIyCenLI/c+fDJbJlmcEqFJaagrhgfS9iGxYTXJ+M="; }; 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"; # Skip native module rebuild for unneeded workspaces (e.g. canvas from web-ui) npmRebuildFlags = [ "--ignore-scripts" ]; nativeBuildInputs = [ makeBinaryWrapper ]; # 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; the model # catalog it would produce is supplied via modelData above. buildPhase = '' runHook preBuild npx tsgo -p packages/chord/tsconfig.build.json npx tsgo -p packages/tui/tsconfig.build.json npx tsgo -p packages/telemetry/tsconfig.build.json npx tsgo -p packages/ai/tsconfig.build.json npx tsgo -p packages/agent/tsconfig.build.json npx tsgo -p packages/protocol/tsconfig.build.json npx tsgo -p packages/client/tsconfig.build.json npx tsgo -p packages/server/tsconfig.build.json npm run build --workspace=packages/coding-agent runHook postBuild ''; dontNpmPrune = true; preInstall = '' npm prune --omit=dev --no-save ''; # npm workspace symlinks in the output point into packages/ which # doesn't exist there. Replace runtime deps with built content and # delete the rest. postInstall = '' local nm="$out/lib/node_modules/pi-monorepo/node_modules" # Replace workspace deps needed at runtime with real copies for ws in @earendil-works/chord:packages/chord \ @earendil-works/pi-ai:packages/ai \ @earendil-works/pi-agent-core:packages/agent \ @earendil-works/pi-client:packages/client \ @earendil-works/pi-protocol:packages/protocol \ @earendil-works/pi-telemetry:packages/telemetry \ @earendil-works/pi-tui:packages/tui; do IFS=: read -r pkg src <<< "$ws" rm "$nm/$pkg" cp -r "$src" "$nm/$pkg" done # Delete remaining workspace symlinks find "$nm" -type l -lname '*/packages/*' -delete # Clean up now-dangling .bin symlinks find "$nm/.bin" -xtype l -delete '' + lib.optionalString stdenvNoCC.hostPlatform.isDarwin '' # Remove foreign Linux binaries that make audit-tmpdir try to inspect ELF # RPATHs with patchelf rm -rf \ "$nm/@anthropic-ai/sandbox-runtime/dist/vendor/seccomp" \ "$nm/@anthropic-ai/sandbox-runtime/vendor/seccomp" ''; postFixup = '' wrapProgram $out/bin/pi --prefix PATH : ${ lib.makeBinPath [ ripgrep fd ] } \ --set-default PI_SKIP_VERSION_CHECK 1 \ --set-default PI_TELEMETRY 0 ''; doInstallCheck = true; nativeInstallCheckInputs = [ writableTmpDirAsHomeHook versionCheckHook ]; versionCheckKeepEnvironment = [ "HOME" ]; versionCheckProgram = "${placeholder "out"}/bin/pi"; versionCheckProgramArg = "--version"; 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/v${finalAttrs.version}/packages/coding-agent/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ munksgaard bryanhonof ]; mainProgram = "pi"; }; })