From 114471ec1b74c5caac82d68e6c7c9d641e92a3b3 Mon Sep 17 00:00:00 2001 From: Jakub Czajka Date: Mon, 13 Jul 2026 14:14:01 +0000 Subject: [PATCH] [paseo] Use custom wrapper with CLAUDE_CONFIG_DIR pointing to claude-code store path. --- conf/home/npm.scm | 42 +++++++++++++++++++---------------- conf/home/paseo.scm | 54 ++++++++++++++++++++++++++++++++------------- 2 files changed, 62 insertions(+), 34 deletions(-) diff --git a/conf/home/npm.scm b/conf/home/npm.scm index f6e3027..82de1fb 100644 --- a/conf/home/npm.scm +++ b/conf/home/npm.scm @@ -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)))))))))) diff --git a/conf/home/paseo.scm b/conf/home/paseo.scm index 91811ef..7f2fbbb 100644 --- a/conf/home/paseo.scm +++ b/conf/home/paseo.scm @@ -11,7 +11,10 @@ #: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)) @@ -29,8 +32,31 @@ #: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)))) -- 2.47.3