mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
channels: Add 'latest-channel-derivation' convenience procedure.
* guix/channels.scm (latest-channel-derivations): Remove. (latest-channel-instances*, latest-channel-derivation): New procedures.
This commit is contained in:
parent
4fd2622df8
commit
030f1367f0
1 changed files with 12 additions and 9 deletions
|
@ -48,7 +48,7 @@ (define-module (guix channels)
|
|||
|
||||
latest-channel-instances
|
||||
channel-instance-derivations
|
||||
latest-channel-derivations
|
||||
latest-channel-derivation
|
||||
channel-instances->manifest))
|
||||
|
||||
;;; Commentary:
|
||||
|
@ -216,14 +216,6 @@ (define core-instance
|
|||
(list core))))
|
||||
instances)))
|
||||
|
||||
(define latest-channel-derivations
|
||||
(let ((latest-channel-instances (store-lift latest-channel-instances)))
|
||||
(lambda (channels)
|
||||
"Return, as a monadic value, the list of derivations for the latest
|
||||
instances of CHANNELS."
|
||||
(mlet %store-monad ((instances (latest-channel-instances channels)))
|
||||
(channel-instance-derivations instances)))))
|
||||
|
||||
(define (whole-package-for-legacy name modules)
|
||||
"Return a full-blown Guix package for MODULES, a derivation that builds Guix
|
||||
modules in the old ~/.config/guix/latest style."
|
||||
|
@ -290,3 +282,14 @@ (define instance->entry
|
|||
(entries (mapm %store-monad instance->entry
|
||||
(zip instances derivations))))
|
||||
(return (manifest entries))))
|
||||
|
||||
(define latest-channel-instances*
|
||||
(store-lift latest-channel-instances))
|
||||
|
||||
(define* (latest-channel-derivation #:optional (channels %default-channels))
|
||||
"Return as a monadic value the derivation that builds the profile for the
|
||||
latest instances of CHANNELS."
|
||||
(mlet* %store-monad ((instances ((store-lift latest-channel-instances)
|
||||
channels))
|
||||
(manifest (channel-instances->manifest instances)))
|
||||
(profile-derivation manifest)))
|
||||
|
|
Loading…
Reference in a new issue