Remove the npm-built workaround. Exclude the optional X11 clipboard addon. Install pi in vps-home and add a test for it.
.claude/.build-queue.*
.claude/worktrees
.dir-locals.el
-pi-built-*/
-pi-tmp/
+pi-linux-x64.tar.gz
paseo-built-*/
paseo-tmp/
configurations.
* <program>/ - program-specific dotfiles.
-Updating npm-based packages
----------------------------
+Updating the npm-based package
+------------------------------
-Some packages are built from pre-built npm trees because their dependency
-trees are too large for recursive Guix packaging.
+The Paseo package is built from a pre-built npm tree because its dependency
+tree is too large for recursive Guix packaging.
``scripts/generate-npm-hash`` handles the update:
- $ scripts/generate-npm-hash <name> <version>
+ $ scripts/generate-npm-hash <version>
-This npm-installs the named package at the given version and prints the
-``guix hash`` for the resulting ``node_modules/`` tree. Copy that hash
-into the package definition's ``local-file`` reference.
+This npm-installs paseo at the given version and prints the ``guix hash``
+for the resulting ``node_modules/`` tree. Copy that hash into the package
+definition's ``local-file`` reference.
-You only need to run this script when bumping the npm package version
+You only need to run this script when bumping the paseo version
-- ``guix home reconfigure`` uses the hash baked into the definition and
never runs ``npm install`` itself.
2. Update the version field in conf/home/claude.scm.
3. Add claude-code at the end, run guix build -f conf/home/claude.scm and
get the correct hash from the "hash mismatch" error message.
-* Go back to the upstream pi release tarball once Bun's --compile bug is
- fixed. Bun 1.2.20-1.3.11 produces broken binaries; 1.3.14 fails
- entirely on this system (kernel 7.0.14, glibc 2.39). As of pi 0.82.0
- (2026-07-24), the upstream CI still builds with a broken Bun, so the
- problem persists. When a fixed Bun is available, just download the
- tarball, extract the binary, and wrap it -- no build step needed.
- Remove the npm-install-build-system wrapper and the Node.js dependency
- in conf/home/pi.scm.
* When Claude Code supports separating config from runtime state (e.g.
separate CLAUDE_STATE_DIR env var), remove the first-run seeding logic
* Remove claude-proxy once DeepSeek supports the Messages
API natively. Tracked at:
https://github.com/deepseek-ai/awesome-deepseek-agent/issues/284
+
+* Add pi's X11 clipboard addon back when image or file-path paste is
+ needed. It lives under native/ in the pi tarball and is excluded in
+ conf/home/pi.scm. Re-include it and give linux-platform-x11.node a
+ RUNPATH to libxcb; the addon only loads when DISPLAY is set, and text
+ clipboard works without it through xclip.
;;
;; The hash is produced by scripts/generate-npm-hash:
;;
-;; scripts/generate-npm-hash paseo <version>
+;; scripts/generate-npm-hash <version>
(define-module (conf home paseo)
#:use-module (guix packages)
;; License: GPL-3.0 or later.
;;
;; pi.scm — package for the Pi coding agent.
-;; Built from npm in a fixed-output derivation.
+;; Built from the upstream Bun-compiled release tarball.
(define-module (conf home pi)
#:use-module (guix packages)
+ #:use-module (guix gexp)
+ #:use-module (guix download)
#:use-module (guix base32)
+ #:use-module (guix build-system copy)
#:use-module ((guix licenses)
#:prefix license:)
- #:use-module (conf home npm)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages elf)
#:export (pi))
(define pi
(package
(name "pi-coding-agent")
- (version "0.80.3")
+ (version "1.6.0")
(source
- #f)
- (build-system npm-install-build-system)
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/earendil-works/pi/releases/download/v"
+ version "/pi-linux-x64.tar.gz"))
+ (sha256
+ (base32 "1lb5axmfkvlqbjbf9pq0a0jmr49wz9ibiqd14nsdwfwv6zjdnxzg"))))
+ (build-system copy-build-system)
(arguments
(list
- #:name "pi"
- #:npm-package "@earendil-works/pi-coding-agent"
- #:version "0.80.3"
- #:entry
- "@earendil-works/pi-coding-agent/packages/coding-agent/dist/cli.js"
- #:hash (nix-base32-string->bytevector
- "0ai50vd5kfd07ihmyj2kavhbdhh65pjj981cxpm0llg9hwxsg6ph")))
+ #:install-plan
+ #~'(("." "libexec/pi"
+ #:exclude-regexp ("^[.]/docs/images/" "^[.]/native/")))
+ #:strip-binaries? #f
+ ;; The Bun binary lists ld-linux as NEEDED, which runpath validation
+ ;; cannot satisfy; patching its RUNPATH corrupts it.
+ #:validate-runpath? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'patch-pi
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (binary (string-append out "/libexec/pi/pi"))
+ (wrapper (string-append out "/bin/pi"))
+ (patchelf #$(file-append patchelf "/bin/patchelf"))
+ (loader #$(file-append glibc "/lib/ld-linux-x86-64.so.2")))
+ (invoke patchelf "--set-interpreter" loader binary)
+ (mkdir-p (dirname wrapper))
+ (call-with-output-file wrapper
+ (lambda (port)
+ (format port
+ (string-append "#!~a~%"
+ "export PI_CODING_AGENT_DIR="
+ "\"${PI_CODING_AGENT_DIR:-$HOME/.config/pi}\"~%"
+ "exec ~a \"$@\"~%")
+ #$(file-append bash-minimal "/bin/bash") binary)))
+ (chmod wrapper #o755)))))))
+ (inputs (list bash-minimal glibc))
+ (native-inputs (list patchelf))
+ (supported-systems '("x86_64-linux"))
(home-page "https://github.com/earendil-works/pi")
(synopsis "Terminal-based AI coding agent")
(description "Pi is a minimal, extensible terminal coding agent harness.
@file{~/.config/pi/}.")
(license license:expat)))
-;;; Update: run ./scripts/generate-npm-hash pi NEW-VERSION, then
-;;; update the version strings and hash in the package definition
-;;; above.
+;;; Update: bump the version and refresh the hash with
+;;; `guix hash pi-linux-x64.tar.gz'.
#
# generate-npm-hash — produce a pre-built npm tree and print its guix hash.
#
-# Usage: generate-npm-hash <name> <version>
+# Usage: generate-npm-hash <version>
#
-# npm-installs the named package at the given version, creates a
-# <name>-built-<version>/ directory with node_modules/, and prints the
+# npm-installs paseo at the given version, creates a
+# paseo-built-<version>/ directory with node_modules/, and prints the
# guix hash for a local-file reference.
#
# Run this only when bumping the npm package version — guix home
set -o errexit -o nounset
-if [ $# -ne 2 ]; then
- echo "Usage: generate-npm-hash <name> <version>" >&2
+if [ $# -ne 1 ]; then
+ echo "Usage: generate-npm-hash <version>" >&2
exit 1
fi
-name=$1
-version=$2
-
-case $name in
- pi)
- npm_pkg="@earendil-works/pi-coding-agent"
- ;;
- paseo)
- npm_pkg="@getpaseo/cli"
- ;;
- *)
- echo "Unknown package: $name" >&2
- exit 1
- ;;
-esac
+name=paseo
+version=$1
+npm_pkg="@getpaseo/cli"
dir="${name}-built-${version}"
tmp="${name}-tmp"
rm -rf "$dir" "$tmp"
mkdir "$tmp"
-echo "{\"dependencies\": {\"$npm_pkg\": \"$version\"}}" > "$tmp/package.json"
-(cd "$tmp" && npm install --production)
+printf '{"name": "npm-build", "dependencies": {"%s": "%s"}}\n' \
+ "$npm_pkg" "$version" > "$tmp/package.json"
+(cd "$tmp" && npm install --production --ignore-scripts)
mkdir -p "$dir"
cp --recursive "$tmp/node_modules" "$dir/"
rm -rf "$tmp"
#:use-module (gnu packages admin)
#:use-module (gnu packages base)
#:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:use-module (conf home pi)
#:use-module (tests vps-system)
#:use-module (vps-home)
#:export (vps-home-test-cases))
(file-append vps-home-environment "/profile/bin/herd"))
(define %claude
(file-append vps-home-environment "/profile/bin/claude"))
+(define %pi
+ (file-append vps-home-environment "/profile/bin/pi"))
(define %timeout
(file-append coreutils "/bin/timeout"))
,%test-user
,(file-append coreutils "/bin/env"))))
(run-command-output (string-append prefix runtime-dir " " command
- " 2>&1"))))))
+ " 2>&1"))))
+
+ (define (run-contains command needle)
+ (let ((result (run command)))
+ (and (car result)
+ (string-contains (cadr result) needle) #t)))))
(define (req-with-options stream fields)
(string-append "{\"stream\":" stream
(car result)))
(define (home-herd-body service)
- `(let ((status (run (string-append ,%herd " status "
- ,service))))
- (and (car status)
- (string-contains (cadr status) "It is running") #t)))
+ `(run-contains (string-append ,%herd " status "
+ ,service) "It is running"))
(define %health-stream-body
`(let ((stream (fetch "/v1/messages"
(and (car result)
(string-contains (cadr result) "Hello from fake") #t)))
+(define %pi-version-body
+ `(run-contains (string-append "HOME=/tmp/pi-e2e "
+ ,%pi " --version")
+ ,(package-version pi)))
+
(define (assert-home marionette label body)
#~(test-assert #$label
(let ((result (marionette-eval '#$body
(home-herd-body "claude-proxy"))
#$(assert-home marionette "home: paseo-daemon is running"
(home-herd-body "paseo-daemon"))
+ #$(assert-home marionette "home: pi runs" %pi-version-body)
#$(assert-home marionette
"home: claude-proxy: health and incremental SSE"
%health-stream-body)
#:use-module (gnu system shadow)
#:use-module (conf home claude-proxy)
#:use-module (conf home paseo)
+ #:use-module (conf home pi)
#:use-module (conf home claude)
#:use-module (conf home symlink)
#:export (vps-home-environment))
(define vps-home-environment
(home-environment
- (packages (list claude-code git paseo))
+ (packages (list claude-code git paseo pi))
(services
(append (list paseo-daemon-service
claude-proxy-service