From: Elias Kueny <elias.kueny@posteo.net>
To: help-guix@gnu.org
Subject: Running a shell command with home-run-on-change-service-type
Date: Mon, 19 Dec 2022 18:46:19 +0000 [thread overview]
Message-ID: <87pmcfgpc9.fsf@posteo.net> (raw)
Hello,
I'm trying to extend the home-run-on-change-service-type service to run the fish command "fisher update" when the file ~/.config/fish/fish_plugins changed, so that fisher plugins are installed or removed by guix home reconfigure.
My service definitions are:
> (define-module (modules shells)
> #:use-module (guix gexp)
> #:use-module (gnu packages)
> #:use-module (gnu services)
> #:use-module (gnu home services)
> #:use-module (gnu home services shells))
>
> (define-public fish-services
> (list
> (simple-service 'fisher-update-on-change
> home-run-on-change-service-type
> `(("files/.config/fish/fish_plugins"
> #~(system* #$(file-append fish "/bin/fish") "-c" "fisher update"))))
>
> (simple-service 'fish-home-xdg-configuration-service
> home-xdg-configuration-files-service-type
> `(("fish/fish_plugins"
> ,(local-file "../config/fish/fish_plugins"))))))
The file change is detected on reconfigure, and then it throws an error: ice-9/boot-9.scm:1685:16: In procedure raise-exception: error: gexp: unbound variable (full backtrace below).
Could somebody tell me what is wrong with the G-expression? I don't understand which variable is unbound.
Backtrace:
> In guix/ui.scm:
> 2238:10 19 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
> 1752:10 18 (with-exception-handler _ _ #:unwind? _ # _)
> In guix/status.scm:
> 835:3 17 (_)
> 815:4 16 (call-with-status-report _ _)
> In guix/scripts/home.scm:
> 513:4 15 (_)
> In ice-9/boot-9.scm:
> 1752:10 14 (with-exception-handler _ _ #:unwind? _ # _)
> In guix/store.scm:
> 661:37 13 (thunk)
> 1300:8 12 (call-with-build-handler _ _)
> 1300:8 11 (call-with-build-handler #<procedure 7f0af683c210 at g…> …)
> 2170:25 10 (run-with-store #<store-connection 256.99 7f0af90534b0> …)
> In guix/scripts/home.scm:
> 447:16 9 (_ _)
> In unknown file:
> 8 (primitive-load "/gnu/store/x8s6yhdzc79c1yfjwwwi4hq00s4…")
> In ice-9/eval.scm:
> 619:8 7 (_ #(#(#(#(#(#(#(#(#(#(#<…> …) …) …) …) …) …) …) …) …) …))
> 619:8 6 (_ #(#(#(#(#(#(#(#(#(#(#<…> …) …) …) …) …) …) …) …) …) …))
> In srfi/srfi-1.scm:
> 634:9 5 (for-each #<procedure primitive-eval (exp)> _)
> In ice-9/eval.scm:
> 191:27 4 (_ #f)
> 223:20 3 (proc #<directory (guile-user) 7f0b0f512c80>)
> In unknown file:
> 2 (%resolve-variable (7 . gexp) #<directory (guile-user) …>)
> In ice-9/boot-9.scm:
> 1685:16 1 (raise-exception _ #:continuable? _)
> 1685:16 0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> error: gexp: unbound variable
next reply other threads:[~2022-12-19 19:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 18:46 Elias Kueny [this message]
2022-12-20 10:12 ` Running a shell command with home-run-on-change-service-type Jelle Licht
2022-12-20 18:16 ` Elias Kueny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmcfgpc9.fsf@posteo.net \
--to=elias.kueny@posteo.net \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).