From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2End-0007Bb-0k for guix-patches@gnu.org; Tue, 18 Sep 2018 08:08:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2EnZ-00067U-Iy for guix-patches@gnu.org; Tue, 18 Sep 2018 08:08:12 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:39486) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2EnT-00061X-NN for guix-patches@gnu.org; Tue, 18 Sep 2018 08:08:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g2EnT-0007tI-Fi for guix-patches@gnu.org; Tue, 18 Sep 2018 08:08:03 -0400 Subject: [bug#32759] [PATCH 7/8] channels: Add 'channel-instances->derivation'. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Tue, 18 Sep 2018 14:06:39 +0200 Message-Id: <20180918120640.27863-7-ludo@gnu.org> In-Reply-To: <20180918120640.27863-1-ludo@gnu.org> References: <20180918120640.27863-1-ludo@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 32759@debbugs.gnu.org * guix/channels.scm (channel-instances->derivation): New procedure. (latest-channel-derivation): Use it. (channel-instance-derivations): Make private. --- guix/channels.scm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/guix/channels.scm b/guix/channels.scm index 2e7bffae9..82389eb58 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -47,9 +47,9 @@ channel-instance-checkout latest-channel-instances - channel-instance-derivations latest-channel-derivation - channel-instances->manifest)) + channel-instances->manifest + channel-instances->derivation)) ;;; Commentary: ;;; @@ -294,13 +294,17 @@ channel instances." (zip instances derivations)))) (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* (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))) + (mlet %store-monad ((instances (latest-channel-instances* channels))) + (channel-instances->derivation instances))) -- 2.18.0