]> git.ekhem.eu.org Git - guix.git/commitdiff
[paseo] Use custom wrapper with CLAUDE_CONFIG_DIR pointing to claude-code store path.
authorJakub Czajka <jakub@ekhem.eu.org>
Mon, 13 Jul 2026 14:14:01 +0000 (14:14 +0000)
committerJakub Czajka <jakub@ekhem.eu.org>
Fri, 17 Jul 2026 13:47:16 +0000 (13:47 +0000)
conf/home/npm.scm
conf/home/paseo.scm

index f6e3027696c574dc4cf307b5db9dda534c9320ff..82de1fb677c6a479abf236579c2b2b340dfa1bae 100644 (file)
@@ -24,7 +24,7 @@
   #:use-module (guix utils)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages node)
-  #:export (npm-install-build-system))
+  #:export (npm-install-build-system npm-install-directory))
 
 (define (npm-install-directory name npm-package version hash)
   "Return a computed-file containing node_modules/ for NPM-PACKAGE
@@ -82,6 +82,7 @@ shell script")
                                       entry
                                       hash
                                       (wrapper-name name)
+                                      (wrapper-builder #f)
                                       source
                                       target
                                       system
@@ -102,21 +103,24 @@ shell script")
                             #:native-inputs native-inputs
                             #:outputs outputs
                             #:modules '((guix build utils))
-                            #:builder #~(begin
-                                          (use-modules (guix build utils))
-                                          (let ((script (string-append #$output
-                                                         "/bin/"
-                                                         #$wrapper-name)))
-                                            (mkdir-p (dirname script))
-                                            (with-output-to-file script
-                                              (lambda ()
-                                                (format #t
-                                                 "#!~a~%exec ~a ~a \"$@\"~%"
-                                                 #$(file-append bash-minimal
-                                                                "/bin/bash")
-                                                 #$(file-append node-lts
-                                                                "/bin/node")
-                                                 (string-append #$built
-                                                  "/node_modules/"
-                                                  #$entry))))
-                                            (chmod script #o755)))))))))
+                            #:builder (if wrapper-builder
+                                          (wrapper-builder built)
+                                          #~(begin
+                                              (use-modules (guix build utils))
+                                              (let ((script (string-append #$output
+                                                             "/bin/"
+                                                             #$wrapper-name)))
+                                                (mkdir-p (dirname script))
+                                                (with-output-to-file script
+                                                  (lambda ()
+                                                    (format #t
+                                                     "#!~a~%exec ~a ~a \"$@\"~%"
+                                                     #$(file-append
+                                                        bash-minimal
+                                                        "/bin/bash")
+                                                     #$(file-append node-lts
+                                                        "/bin/node")
+                                                     (string-append #$built
+                                                      "/node_modules/"
+                                                      #$entry))))
+                                                (chmod script #o755))))))))))
index 91811efb29af387b0c476434b8752ef5840339bd..7f2fbbb411966cf4c6c3fd78192928c034f38192 100644 (file)
   #:use-module (guix packages)
   #:use-module (guix gexp)
   #:use-module (guix base32)
+  #:use-module (conf home claude)
   #:use-module (conf home npm)
+  #:use-module (gnu packages bash)
+  #:use-module (gnu packages node)
   #:use-module (gnu home services)
   #:use-module (gnu home services shepherd)
   #:export (paseo paseo-daemon-service))
       #:version "0.1.103"
       #:entry "@getpaseo/cli/bin/paseo"
       #:hash (nix-base32-string->bytevector
-              "0bf3ybl22y5p325plzvj053k9l9jbpky48nz0vp2zk71yx13wky6")
-      #:wrapper-name "paseo"))
+              "1k02cgfrk121df97vzzllfx77qgqds9036jvlb5si6v5zs1g8g3p")
+      #:wrapper-builder (lambda (built)
+                          #~(begin
+                              (use-modules (guix build utils))
+                              (let* ((bin (string-append #$output "/bin"))
+                                     (entry-path (string-append #$built
+                                                  "/node_modules/"
+                                                  "@getpaseo/cli/bin/paseo"))
+                                     (node #$(file-append node-lts "/bin/node"))
+                                     (bash #$(file-append bash-minimal
+                                                          "/bin/bash"))
+                                     (claude-etc #$(file-append claude-code
+                                                                "/etc"))
+                                     (wrapper (string-append bin "/paseo")))
+                                (mkdir-p bin)
+                                (with-output-to-file wrapper
+                                  (lambda ()
+                                    (format #t "#!~a~%" bash)
+                                    (format #t
+                                            "export CLAUDE_CONFIG_DIR=\"~a\"~%"
+                                            claude-etc)
+                                    (format #t "exec ~a \"~a\" \"$@\"~%" node
+                                            entry-path)))
+                                (chmod wrapper #o755))))))
+    (inputs (list node-lts bash-minimal claude-code))
     (home-page "https://paseo.sh")
     (synopsis "CLI for orchestrating AI coding agents")
     (description
@@ -40,18 +66,16 @@ coding agents from desktop and mobile.")
     (license #f)))
 
 (define paseo-daemon-start
-  #~(let* ((home (getenv "HOME"))
-           (prog #$(file-append paseo "/bin/paseo"))
-           (log (string-append home "/.local/var/log/paseo-daemon.log")))
-      (make-forkexec-constructor (list prog "daemon" "start" "--foreground")
-                                 #:log-file log)))
-
-(define paseo-daemon-shepherd-service
-  (shepherd-service (provision '(paseo-daemon))
-                    (start paseo-daemon-start)
-                    (stop #~(make-kill-destructor))
-                    (documentation "Shepherd service for the Paseo daemon.")))
+  #~(make-forkexec-constructor (list #$(file-append paseo "/bin/paseo")
+                                     "daemon" "start" "--foreground")
+                               #:log-file (string-append (getenv "HOME")
+                                           "/.local/var/log/paseo-daemon.log")))
 
 (define paseo-daemon-service
-  (simple-service 'paseo-daemon-service home-shepherd-service-type
-                  (list paseo-daemon-shepherd-service)))
+  (let ((svc (shepherd-service (provision '(paseo-daemon))
+                               (start paseo-daemon-start)
+                               (stop #~(make-kill-destructor))
+                               (documentation
+                                "Shepherd service for the Paseo daemon."))))
+    (simple-service 'paseo-daemon-service home-shepherd-service-type
+                    (list svc))))