From 7a6a30f5153a405a24642a29052daff9545bbfa1 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Tue, 28 Jul 2026 21:39:03 -0600 Subject: [PATCH] Fix channel --- channels.d/metznet.scm | 3 +++ channels.d/nonguix.scm | 3 +++ channels.d/nonguixgames.scm | 3 +++ channels.scm | 10 +++++++++- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/channels.d/metznet.scm b/channels.d/metznet.scm index c18be1d..9bcd3b0 100644 --- a/channels.d/metznet.scm +++ b/channels.d/metznet.scm @@ -1,3 +1,6 @@ +;; See channels.scm for why this needs an explicit import. +(use-modules (guix channels)) + (channel (name 'metznet-channel) (url "https://git.metznet.ca/MetzNet/metznet-channel")) diff --git a/channels.d/nonguix.scm b/channels.d/nonguix.scm index 5ee3277..95520f5 100644 --- a/channels.d/nonguix.scm +++ b/channels.d/nonguix.scm @@ -1,3 +1,6 @@ +;; See channels.scm for why this needs an explicit import. +(use-modules (guix channels)) + (channel (name 'nonguix) (url "https://gitlab.com/nonguix/nonguix") diff --git a/channels.d/nonguixgames.scm b/channels.d/nonguixgames.scm index 94c50e3..ce1c6ba 100644 --- a/channels.d/nonguixgames.scm +++ b/channels.d/nonguixgames.scm @@ -1,3 +1,6 @@ +;; See channels.scm for why this needs an explicit import. +(use-modules (guix channels)) + (channel (name 'guix-gaming-games) (url "https://gitlab.com/guix-gaming-channels/games.git") diff --git a/channels.scm b/channels.scm index f971588..47e82ff 100644 --- a/channels.scm +++ b/channels.scm @@ -1,6 +1,14 @@ ;; channels.scm -- reads the channels.d dir to get a list of channel objects -(use-modules (gnu) ((ice-9 ftw) #:select (scandir))) +;; guix pull -C pre-imports (guix channels) into the file's environment +;; (see load-channels/make-user-module in guix/scripts/pull.scm), which is +;; why this worked without an explicit import. But `guix pull` also +;; compiles every .scm file under this channel's own checkout as an +;; ordinary package module (see standard-module-derivation), and that +;; environment does NOT pre-import it -- so `channel` (a macro from (guix +;; channels), used in channels.d/*.scm) and %default-channels come up +;; unbound there unless imported explicitly. +(use-modules (gnu) (guix channels) ((ice-9 ftw) #:select (scandir))) (define channel-files (scandir "./channels.d"