[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/14: build-system/channel: Add support for additional channels.
From: |
guix-commits |
Subject: |
03/14: build-system/channel: Add support for additional channels. |
Date: |
Fri, 5 Apr 2024 12:27:21 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit d6a3818761736449a27eb44938537798f6f4e85b
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Mar 21 23:38:04 2024 +0100
build-system/channel: Add support for additional channels.
Until now, ‘channel-build-system’ would assume a single channel, the
‘guix’ channel. This change lets users specify additional channels
using the #:channels parameter.
* guix/build-system/channel.scm (build-channels): Add #:channels and
honor it.
(channel-build-system): In ‘lower’, add #:channels and honor it.
* doc/guix.texi (Build Systems): Document it.
Change-Id: I36c1d19cbeee02a4d1144de089b78df0390774a0
---
doc/guix.texi | 5 ++++-
guix/build-system/channel.scm | 7 +++++--
2 files changed, 9 insertions(+), 3 deletions(-)
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 <ludo@gnu.org>
+;;; Copyright © 2019-2022, 2024 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +37,7 @@
(define* (build-channels name inputs
#:key source system commit
+ (channels '())
(authenticate? #t)
#:allow-other-keys)
(mlet* %store-monad ((instances
@@ -44,7 +45,7 @@
(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 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)
- branch master updated (74517806f8 -> 6844a31733), guix-commits, 2024/04/05
- 03/14: build-system/channel: Add support for additional channels.,
guix-commits <=
- 04/14: gnu: guix: Define ‘guix-for-channels’ and document its use., guix-commits, 2024/04/05
- 06/14: gnu: Add tree-sitter-latex., guix-commits, 2024/04/05
- 07/14: gnu: Add tree-sitter-nix., guix-commits, 2024/04/05
- 09/14: gnu: atop: Update source hash., guix-commits, 2024/04/05
- 12/14: gnu: wm: Update swayfx to 0.3.2., guix-commits, 2024/04/05
- 01/14: guix-install.sh: Add ‘--uninstall’ flag., guix-commits, 2024/04/05
- 02/14: gnu: kokkos: Update to 4.2.01., guix-commits, 2024/04/05
- 11/14: gnu: a2ps: Update to 4.15.6, guix-commits, 2024/04/05
- 14/14: gnu: openssh: Update to 9.7p1., guix-commits, 2024/04/05
- 08/14: gnu: llama-cpp: Produce a portable binary unless tuned., guix-commits, 2024/04/05