guix-devel
[Top][All Lists]
Advanced

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

Re: Add /usr/bin/env by default in guixsd?


From: Huang\, Ying
Subject: Re: Add /usr/bin/env by default in guixsd?
Date: Thu, 09 Feb 2017 08:31:26 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Hello,
>
> address@hidden skribis:
>
>> address@hidden (Ludovic Courtès) writes:
>
> [...]
>
>>> First we need a simple ‘special-files’ service or something (for /bin/sh
>>> and /usr/bin/env).
>>>
>>> Then the whole battle will be about what the default should be.  I used
>>> to be affiliated with the “no way!” party on this topic, but I
>>> considering changing my mind.  :-)  Especially that it does not matter
>>> that much, after all.
>>
>> That sounds great for me!  Thanks!
>
> Commit 387e175492f960d7d86f34f3b2e43938fa72dbf3 adds
> ‘special-files-service-type’.
>
> The default is unchanged (only /bin/sh is created) but the documentation
> provides a one-liner for /usr/bin/env (see below).
>
> Thanks,
> Ludo’.
>
>  -- Scheme Variable: special-files-service-type
>      This is the service that sets up “special files” such as ‘/bin/sh’;
>      an instance of it is part of ‘%base-services’.
>
>      The value associated with ‘special-files-service-type’ services
>      must be a list of tuples where the first element is the “special
>      file” and the second element is its target.  By default it is:
>
>           `(("/bin/sh" ,(file-append BASH "/bin/sh")))
>
>      If you want to add, say, ‘/usr/bin/env’ to your system, you can
>      change it to:
>
>           `(("/bin/sh" ,(file-append BASH "/bin/sh"))
>             ("/usr/bin/env" ,(file-append COREUTILS "/bin/env")))
>
>      Since this is part of ‘%base-services’, you can use
>      ‘modify-services’ to customize the set of special files (*note
>      ‘modify-services’: Service Reference.).  But the simple way to add
>      a special file is via the ‘extra-special-file’ procedure (see
>      below.)
>
>  -- Scheme Procedure: extra-special-file FILE TARGET
>      Use TARGET as the “special file” FILE.
>
>      For example, adding the following lines to the ‘services’ field of
>      your operating system declaration leads to a ‘/usr/bin/env’
>      symlink:
>
>           (extra-special-file "/usr/bin/env"
>                               (file-append coreutils "/bin/env"))

Great!  Thanks a lot!

Best Regards,
Huang, Ying



reply via email to

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