diff --git a/doc/guix.texi b/doc/guix.texi index 6f95270fa0..e2d578751b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10466,7 +10466,10 @@ field (@pxref{Channels}); alternatively, its source can be a directory name, in which case an additional @code{#:commit} argument must be supplied to specify the commit being built (a hexadecimal string). -The resulting package is a Guix instance of the given channel, similar +Optionally, a @code{#:channels} argument specifying additional channels +can be provided. + +The resulting package is a Guix instance of the given channel(s), similar to how @command{guix time-machine} would build it. @end defvar diff --git a/guix/build-system/channel.scm b/guix/build-system/channel.scm index 6ad377f930..0607dcf4d7 100644 --- a/guix/build-system/channel.scm +++ b/guix/build-system/channel.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2019-2022 Ludovic Courtès +;;; Copyright © 2019-2022, 2024 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,6 +37,7 @@ (define latest-channel-instances* (define* (build-channels name inputs #:key source system commit + (channels '()) (authenticate? #t) #:allow-other-keys) (mlet* %store-monad ((instances @@ -44,7 +45,7 @@ (define* (build-channels name inputs (return (list source))) ((channel? source) (latest-channel-instances* - (list source) + (cons source channels) #:authenticate? authenticate?)) ((string? source) ;; If SOURCE is a store file name, as is the @@ -64,12 +65,14 @@ (define* (build-channels name inputs (define channel-build-system ;; Build system used to "convert" a channel instance to a package. (let ((lower (lambda* (name #:key system source commit (authenticate? #t) + (channels '()) #:allow-other-keys) (bag (name name) (system system) (build build-channels) (arguments `(#:source ,source + #:channels ,channels #:authenticate? ,authenticate? #:commit ,commit)))))) (build-system (name 'channel)