[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The `channels' field of `operating-system' record
From: |
Ludovic Courtès |
Subject: |
Re: The `channels' field of `operating-system' record |
Date: |
Fri, 19 Apr 2024 22:10:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi,
Tomas Volf <~@wolfsden.cz> skribis:
> On 2024-04-10 17:17:27 +0200, Ludovic Courtès wrote:
[...]
>> Yes, why is that? At first sight, that’s because ‘extra-special-file’
>> does things at activation time; there’s no check happening at
>> configuration time.
>>
>> It was really meant for /bin/sh, /usr/bin/env, and similar. The reason
>> its effect is silently dismissed in this case is, I think, because its
>> activation runs before the /etc activation. So it’s really bad luck.
>>
>> I’m not sure what to do here, apart from maybe recommending against
>> broad use of this service.
>
> I will re-phrase the above into a documentation patch.
Great.
>> That would be: (guix-configuration … (channels (load "channels.scm"))).
>
> That does not seems to work, I am getting this error:
>
> /tmp $ guix system build os.scm
> ;;; compiling /tmp/channels.scm
> ;;; /tmp/channels.scm:1:7: warning: possibly unbound variable `channel'
[...]
> But after some experimentation (and looking into pull.scm), it seems what I
> need
> is this:
>
> (use-modules (guix ui))
> (use-modules (guix channels))
>
> and
>
> (channels (load* "channels.scm"
> (make-user-module '((guix channels)))))
Or simpler: use (guix channels) in your OS config so you can use
(load "channels.scm").
(‘load’ evaluates code in the current module.)
> Maybe it would be best to extract (load-channels) from pull.scm into
> guix/channels.scm, exporting it? (Since for example the above is missing
> error
> checking code from (load-channels)).
Yes, good idea, we can do that.
Thanks for your feedback!
Ludo’.