From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRK1O-0003Vx-Gd for guix-patches@gnu.org; Mon, 26 Nov 2018 11:46:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRK1M-0007On-K6 for guix-patches@gnu.org; Mon, 26 Nov 2018 11:46:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:45797) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRK1M-0007OP-Ev for guix-patches@gnu.org; Mon, 26 Nov 2018 11:46:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gRK1K-0002Zv-Kc for guix-patches@gnu.org; Mon, 26 Nov 2018 11:46:04 -0500 Subject: [bug#33515] [PATCH 4/5] channels: Add 'checkout->channel-instance'. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 26 Nov 2018 17:45:23 +0100 Message-Id: <20181126164524.17680-4-ludo@gnu.org> In-Reply-To: <20181126164524.17680-1-ludo@gnu.org> References: <20181126164524.17680-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: 33515@debbugs.gnu.org * guix/channels.scm (checkout->channel-instance): New procedure. --- guix/channels.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/guix/channels.scm b/guix/channels.scm index 82389eb583..e57da68149 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -47,6 +47,7 @@ channel-instance-checkout latest-channel-instances + checkout->channel-instance latest-channel-derivation channel-instances->manifest channel-instances->derivation)) @@ -114,6 +115,17 @@ 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. -- 2.19.1