help-guix
[Top][All Lists]
Advanced

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

Re: G-Expressions manual. change user shell in guix config.scm


From: znavko
Subject: Re: G-Expressions manual. change user shell in guix config.scm
Date: Sat, 04 May 2019 11:48:07 +0000

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" <address@hidden> wrote:

> On 5/4/19 8:29 PM, address@hidden 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" <address@hidden> wrote:
>> 
>>> On 5/4/19 8:19 PM, address@hidden 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"



reply via email to

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