;; 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))) (define channel-files (scandir "./channels.d" (lambda (file) (string-suffix? ".scm" file)))) (append (map (lambda (file) (load (string-append "./channels.d/" file))) channel-files) %default-channels)