Compare commits
No commits in common. "963576f8dad1d087c77a4bf3c00fa74aa060115d" and "7a6a30f5153a405a24642a29052daff9545bbfa1" have entirely different histories.
963576f8da
...
7a6a30f515
@ -1,15 +1,2 @@
|
||||
;; metznet/machines/otto.scm uses (nongnu packages mozilla), so guix pull
|
||||
;; needs to know nonguix is a build-time dependency -- otherwise it tries
|
||||
;; to compile/load this channel's own modules in isolation and fails with
|
||||
;; "no code for module (nongnu packages mozilla))".
|
||||
(channel
|
||||
(version 0)
|
||||
(dependencies
|
||||
(channel
|
||||
(name nonguix)
|
||||
(url "https://gitlab.com/nonguix/nonguix")
|
||||
(introduction
|
||||
(channel-introduction
|
||||
(version 0)
|
||||
(commit "897c1a470da759236cc11798f4e0a5f7d4d59fbc")
|
||||
(signer "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))))
|
||||
(version 0))
|
||||
|
||||
@ -1,27 +1,18 @@
|
||||
;; channels.scm -- reads the channels.d dir to get a list of channel objects
|
||||
;;
|
||||
;; `guix pull` also compiles every .scm file under this channel's own
|
||||
;; checkout as an ordinary package module (see standard-module-derivation)
|
||||
;; and then loads each by its path-derived module name (e.g. this file as
|
||||
;; (channels)) to build the package cache -- so, like metznet/machines/*.scm,
|
||||
;; this needs a real define-module matching its path, not just a bare
|
||||
;; script relying on guix pull -C's implicit (guix channels) import.
|
||||
(define-module (channels)
|
||||
#:use-module (gnu)
|
||||
#:use-module (guix channels)
|
||||
#:use-module ((ice-9 ftw) #:select (scandir)))
|
||||
|
||||
;; ./channels.d only resolves when the process's CWD happens to be this
|
||||
;; file's own directory, which isn't true once guix pull loads this as a
|
||||
;; plain module (e.g. from the store) to build its package cache -- anchor
|
||||
;; to this file's own location instead.
|
||||
(define here (dirname (current-filename)))
|
||||
|
||||
(define channels-directory (string-append here "/channels.d"))
|
||||
;; 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-directory
|
||||
(scandir "./channels.d"
|
||||
(lambda (file)
|
||||
(string-suffix? ".scm" file))))
|
||||
|
||||
(append (map (lambda (file) (load (string-append channels-directory "/" file))) channel-files) %default-channels)
|
||||
(append (map (lambda (file) (load (string-append "./channels.d/" file))) channel-files) %default-channels)
|
||||
|
||||
Loading…
Reference in New Issue