[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about scripts in guix-home

From: Fredrik Salomonsson
Subject: Re: Question about scripts in guix-home
Date: Sun, 17 Oct 2021 18:45:19 +0000

Oleg Pykhalov <> writes:

> Well, if you don't want to put the content of
> files/waybar/ file inside a Scheme string, then you need
> to read the file to a string, e.g.:
> --8<---------------cut here---------------start------------->8---
> (simple-service 'shellcheck-wrapper
>                    home-files-service-type
>                    (list `("local/bin/shellcheck"
>                            ,(computed-file
>                              "shellcheck-wrapper"
>                              #~(begin
>                                  (use-modules (ice-9 rdelim))
>                                  (with-output-to-file #$output
>                                    (lambda ()
>                                      (display #$(with-input-from-file 
> "/tmp/foo" read-string))))
>                                  (chmod #$output #o555))))))
> --8<---------------cut here---------------end--------------->8---

I'm a bit confused, "Scheme string" and string aren't they the same

> Note that it's just an example which you should change according to your
> needs.  ;-)  Also, it creates not an executable but a symlink to an
> executable in a store, which I missed in a previous answer.

Thank you for the example! This looks like what I was looking for.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]