all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: znavko@disroot.org
To: rendaw <7e9wc56emjakcm@s.rendaw.me>, help-guix@gnu.org
Subject: Re: G-Expressions manual. change user shell in guix config.scm
Date: Sat, 04 May 2019 11:48:07 +0000	[thread overview]
Message-ID: <e081e14349e74a9a4973f2d2f62c7d9c@disroot.org> (raw)
In-Reply-To: <e98033bb-3c46-fdd2-8f41-08da0ecd5cad@s.rendaw.me>

This two equivalents work:

(shell (file-append dash "/bin/dash")) -- this is advanced guix variant with new file-append function, this variant does not need (use-modules (guix gexp))

(shell #~(string-append #$dash "/bin/dash"))  -- this is guile function string-append and gexp, ungexp functions, this variant does not need (use-modules (guix gexp)) too.



May 4, 2019 11:36 AM, "rendaw" <7e9wc56emjakcm@s.rendaw.me> wrote:

> On 5/4/19 8:29 PM, znavko@disroot.org wrote:
> 
>> I just want to change user shell. So i know how to do it. And you have cleared a bit for me what is
>> formed object and what is file, and what is file-append function.
>> 
>> May 4, 2019 11:24 AM, "rendaw" <7e9wc56emjakcm@s.rendaw.me> wrote:
>> 
>>> On 5/4/19 8:19 PM, znavko@disroot.org wrote:
>> 
>> (shell #~#$dash) -- compiles too, but again:
>> 
>> bob $ su - mom
>> Password:
>> /gnu/store/bqmib4vf9mr8dkqx4dqpcqrnb93giwci-dash-0.5.10.2:
>> /gnu/store/bqmib4vf9mr8dkqx4dqpcqrnb93giwci-dash-0.5.10.2: Is a directory
>> bob $
>>> Could you perhaps provide some details on what you are expecting to
>>> happen here? This error is expected - shell needs a path to an
>>> executable, not a directory. Both `#~#$dash` and `dash` become paths to
>>> directories.
> 
> (file-append obj "some string") is a convenient alternative to
> #~(string-append #$obj "some string").
> 
> In the latter "obj" becomes (for example)
> "/gnu/store/bqmib4vf9mr8dkqx4dqpcqrnb93giwci-dash-0.5.10.2", and
> "(string-append ...)" combines
> "/gnu/store/bqmib4vf9mr8dkqx4dqpcqrnb93giwci-dash-0.5.10.2" and
> "/bin/dash" to produce
> "/gnu/store/bqmib4vf9mr8dkqx4dqpcqrnb93giwci-dash-0.5.10.2/bin/dash"

  parent reply	other threads:[~2019-05-04 11:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-03 15:36 G-Expressions manual. change user shell in guix config.scm znavko
2019-05-04  3:11 ` rendaw
2019-05-04  3:13   ` rendaw
2019-05-04  6:11 ` rendaw
2019-05-04 10:53 ` znavko
2019-05-04 11:06   ` rendaw
2019-05-04 11:19   ` znavko
2019-05-04 11:24     ` rendaw
2019-05-04 11:29     ` znavko
2019-05-04 11:36       ` rendaw
2019-05-04 11:48       ` znavko [this message]
2019-05-04 11:50         ` rendaw

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e081e14349e74a9a4973f2d2f62c7d9c@disroot.org \
    --to=znavko@disroot.org \
    --cc=7e9wc56emjakcm@s.rendaw.me \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.