mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-08 07:56:16 -05:00
channels: Add 'checkout->channel-instance'.
* guix/channels.scm (checkout->channel-instance): New procedure.
This commit is contained in:
parent
94c0e61fe7
commit
fe5db4eb03
1 changed files with 12 additions and 0 deletions
|
@ -47,6 +47,7 @@ (define-module (guix channels)
|
|||
channel-instance-checkout
|
||||
|
||||
latest-channel-instances
|
||||
checkout->channel-instance
|
||||
latest-channel-derivation
|
||||
channel-instances->manifest
|
||||
channel-instances->derivation))
|
||||
|
@ -114,6 +115,17 @@ (define (latest-channel-instances store channels)
|
|||
(channel-instance channel commit checkout)))
|
||||
channels))
|
||||
|
||||
(define* (checkout->channel-instance checkout
|
||||
#:key commit
|
||||
(url checkout) (name 'guix))
|
||||
"Return a channel instance for CHECKOUT, which is assumed to be a checkout
|
||||
of COMMIT at URL. Use NAME as the channel name."
|
||||
(let* ((commit (or commit (make-string 40 #\0)))
|
||||
(channel (channel (name name)
|
||||
(commit commit)
|
||||
(url url))))
|
||||
(channel-instance channel commit checkout)))
|
||||
|
||||
(define %self-build-file
|
||||
;; The file containing code to build Guix. This serves the same purpose as
|
||||
;; a makefile, and, similarly, is intended to always keep this name.
|
||||
|
|
Loading…
Reference in a new issue