channels: Add 'channel-instances->derivation'.
* guix/channels.scm (channel-instances->derivation): New procedure. (latest-channel-derivation): Use it. (channel-instance-derivations): Make private.master
parent
811b21fb15
commit
c37f38bde6
|
@ -47,9 +47,9 @@
|
||||||
channel-instance-checkout
|
channel-instance-checkout
|
||||||
|
|
||||||
latest-channel-instances
|
latest-channel-instances
|
||||||
channel-instance-derivations
|
|
||||||
latest-channel-derivation
|
latest-channel-derivation
|
||||||
channel-instances->manifest))
|
channel-instances->manifest
|
||||||
|
channel-instances->derivation))
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;;
|
;;;
|
||||||
|
@ -294,13 +294,17 @@ channel instances."
|
||||||
(zip instances derivations))))
|
(zip instances derivations))))
|
||||||
(return (manifest entries))))
|
(return (manifest entries))))
|
||||||
|
|
||||||
|
(define (channel-instances->derivation instances)
|
||||||
|
"Return the derivation of the profile containing INSTANCES, a list of
|
||||||
|
channel instances."
|
||||||
|
(mlet %store-monad ((manifest (channel-instances->manifest instances)))
|
||||||
|
(profile-derivation manifest)))
|
||||||
|
|
||||||
(define latest-channel-instances*
|
(define latest-channel-instances*
|
||||||
(store-lift latest-channel-instances))
|
(store-lift latest-channel-instances))
|
||||||
|
|
||||||
(define* (latest-channel-derivation #:optional (channels %default-channels))
|
(define* (latest-channel-derivation #:optional (channels %default-channels))
|
||||||
"Return as a monadic value the derivation that builds the profile for the
|
"Return as a monadic value the derivation that builds the profile for the
|
||||||
latest instances of CHANNELS."
|
latest instances of CHANNELS."
|
||||||
(mlet* %store-monad ((instances ((store-lift latest-channel-instances)
|
(mlet %store-monad ((instances (latest-channel-instances* channels)))
|
||||||
channels))
|
(channel-instances->derivation instances)))
|
||||||
(manifest (channel-instances->manifest instances)))
|
|
||||||
(profile-derivation manifest)))
|
|
||||||
|
|
Loading…
Reference in New Issue