From: Jakub Czajka Date: Tue, 7 Jul 2026 16:12:20 +0000 (+0200) Subject: [home] Add pi coding agent package. X-Git-Url: https://git.ekhem.eu.org/?a=commitdiff_plain;h=71d989cbdc60feb502801c9b6e007cfeb18861d7;p=guix.git [home] Add pi coding agent package. --- diff --git a/.gitignore b/.gitignore index 045ef6d..9fcd8f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .dir-locals.el +pi-built-*/ +pi-tmp/ diff --git a/CLAUDE.md b/CLAUDE.md index 1457a51..e28ac20 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -30,7 +30,8 @@ PROFILE selects between libre and nonfree setups at build time: Programs in the home configuration have dotfiles, which are installed alongside the program and respect the XDG base directory specification. Each program's dotfiles live in a / directory whose internal structure mirrors $HOME, -e.g. emacs/.config/emacs/init.el → ~/.config/emacs/init.el. +e.g. emacs/.config/emacs/init.el → ~/.config/emacs/init.el or +pi/.config/pi/settings.json → ~/.config/pi/settings.json. Core service types: diff --git a/README b/README index d57e931..de3ce28 100644 --- a/README +++ b/README @@ -61,3 +61,10 @@ TODO 3. Or add a PreToolUse hook that auto-creates/switches to a per-session branch before Edit/Write. + +* 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.12, glibc 2.39). 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. diff --git a/conf/home/pi.scm b/conf/home/pi.scm new file mode 100644 index 0000000..28bb28d --- /dev/null +++ b/conf/home/pi.scm @@ -0,0 +1,41 @@ +;; Copyright (c) 2026 Jakub Czajka +;; License: GPL-3.0 or later. +;; +;; pi.scm — package for the Pi coding agent. +;; Built from npm in a fixed-output derivation. + +(define-module (conf home pi) + #:use-module (guix packages) + #:use-module (guix base32) + #:use-module ((guix licenses) + #:prefix license:) + #:use-module (conf home npm) + #:export (pi)) + +(define pi + (package + (name "pi-coding-agent") + (version "0.80.3") + (source + #f) + (build-system npm-install-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"))) + (home-page "https://github.com/earendil-works/pi") + (synopsis "Terminal-based AI coding agent") + (description "Pi is a minimal, extensible terminal coding agent harness. +It provides an LLM with the tools to read, write, edit, and +execute code in your project. Configuration is stored in +@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. diff --git a/home.scm b/home.scm index a344388..227bb2e 100644 --- a/home.scm +++ b/home.scm @@ -15,6 +15,7 @@ (conf home emacs) (conf home guix) (conf home notify) + (conf home pi) (conf home suckless) (gnu packages gnuzilla) (nongnu packages mozilla)) @@ -23,15 +24,20 @@ (home-environment (packages (case profile ((nonfree) - (list firefox select-emoji st-libxft-bgra)) + (list firefox pi select-emoji st-libxft-bgra)) ((libre) (list icecat-minimal select-emoji st-libxft-bgra)))) (services (case profile ((nonfree) - (append (list autorandr-service channels-service claude-service - notify-service screenshot-service) bash-services - desktop-services emacs-services)) + (append (list autorandr-service + channels-service + claude-service + notify-service + paseo-service + paseo-daemon-service + screenshot-service) bash-services desktop-services + emacs-services)) ((libre) (append (list autorandr-service notify-service screenshot-service) bash-services desktop-services emacs-services)))))) diff --git a/scripts/generate-npm-hash b/scripts/generate-npm-hash index 39060a4..61a0e4a 100755 --- a/scripts/generate-npm-hash +++ b/scripts/generate-npm-hash @@ -25,6 +25,9 @@ name=$1 version=$2 case $name in + pi) + npm_pkg="@earendil-works/pi-coding-agent" + ;; *) echo "Unknown package: $name" >&2 exit 1