unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: guix-devel@gnu.org
Subject: Re: The `channels' field of `operating-system' record
Date: Fri, 19 Apr 2024 22:10:34 +0200	[thread overview]
Message-ID: <874jbxdsg5.fsf@gnu.org> (raw)
In-Reply-To: <Zh2kbjumlPD3oVqp@ws> (Tomas Volf's message of "Tue, 16 Apr 2024 00:04:30 +0200")

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’.


  reply	other threads:[~2024-04-19 20:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-07 16:05 The `channels' field of `operating-system' record Tomas Volf
2024-04-10 15:17 ` Ludovic Courtès
2024-04-15 22:04   ` Tomas Volf
2024-04-19 20:10     ` Ludovic Courtès [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-09  4:06 Nathan Dehnel
2024-04-09  4:16 ` Marek Paśnikowski
2024-04-09 12:28   ` Tomas Volf
2024-04-09 12:29 ` Tomas Volf
2024-04-09 12:33 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=874jbxdsg5.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).