]> git.ekhem.eu.org Git - guix.git/commitdiff
[home] Add pi coding agent package.
authorJakub Czajka <jakub@ekhem.eu.org>
Tue, 7 Jul 2026 16:12:20 +0000 (18:12 +0200)
committerJakub Czajka <jakub@ekhem.eu.org>
Thu, 9 Jul 2026 12:34:15 +0000 (14:34 +0200)
.gitignore
CLAUDE.md
README
conf/home/pi.scm [new file with mode: 0644]
home.scm
scripts/generate-npm-hash

index 045ef6d1188ec8e686e3d94713268313a52b80fa..9fcd8f56e091200b4728470fff355b26eddb441e 100644 (file)
@@ -1 +1,3 @@
 .dir-locals.el
+pi-built-*/
+pi-tmp/
index 1457a513507e3eb4ae6c1544e2b2945d189495e2..e28ac20cd344daea0d10428423cdc771fbb61c7d 100644 (file)
--- 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 <program>/ 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 d57e93185c7f64731a07e8932d8c847323cd9db8..de3ce28db318ee073178798eee061714932cfd70 100644 (file)
--- 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 (file)
index 0000000..28bb28d
--- /dev/null
@@ -0,0 +1,41 @@
+;; Copyright (c) 2026 Jakub Czajka <jakub@ekhem.eu.org>
+;; 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.
index a344388ef130b88e8fa8ec5cb17b178d9cea5f52..227bb2e2f40111429b45b992a16d664fc3bf64c8 100644 (file)
--- 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))
   (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))))))
index 39060a4839cc2cd60919518e5368005782e43479..61a0e4a4f4eae348f0f557ca397850fad712a704 100755 (executable)
@@ -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