From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GCEUDXSf/WV+zQAA62LTzQ:P1 (envelope-from ) for ; Fri, 22 Mar 2024 16:10:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id GCEUDXSf/WV+zQAA62LTzQ (envelope-from ) for ; Fri, 22 Mar 2024 16:10:44 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Nj1zI0c5; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711120244; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9n5QpEVAXuRd9sg0NtaU91WP4abLcc3vIllInVDB54M=; b=imkViDN0LhBPlW9FWEthi7BZ6qIauTLCP0LXjh2qOgC1royXh4cTYE46uECZHCDf6fdXFs Zp1Z0IBMXLYzXBATI0qcpzKy2SinlsNOFh6PSNgXFX5C9uKVo9/76WKKMpKxhFu8R05LYR d5SZnF46q+zHN7FYs4LTgrIMcQ4TqMvS7m5UG7aOrN6v7kZWtQlRy6LP8VK5N4uaapzOls agbRjDX/sB731mMoNMoBn7+Pg4jc9wlEG9ZUODOTL0OqtnOhfkasRXbim7HJG9xScJ2awX YHBy0yLBj5shWrxskMV9w87DxGS5PW3dh9wtkpp0bBICk/AUav8y+Q/ycD0kiA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Nj1zI0c5; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711120244; a=rsa-sha256; cv=none; b=VZWczDCOFN6m8vMUrzIGR5xAhoTsijOgZKv+Evpvw9kRy0tSSPzKsAukHRUAw2MRbHTNOD zN8A3u7+P+PwMJyYKau8yOsJhpsnVZK/SNe6KQN3rPgdTZ0yevH8fKXVYfH9NnMVzVEWDR R1aUOOk+3nx6cZD8Ykelzp7E4vRgP73ge2uGj8HN8sa+oAUntzotX1vfE4R8oCeyT95jGQ eNS1qPFOHhlhzNZ7YgGyi/TCESabbzZpziyH2WnJARRvq719a6jgwv3FKF4DtGvuoikkBl RdBV3JHaRdkfWi1gpRC3SXbxi0oo7RjRHyfjZ73pna2IvoGDpygvXOTXPxBPKA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 13F7D44FFC for ; Fri, 22 Mar 2024 16:10:44 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rngXP-0007ix-JD; Fri, 22 Mar 2024 11:10:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rngXJ-0007hX-NL for guix-patches@gnu.org; Fri, 22 Mar 2024 11:10:25 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rngXF-0001Hf-Lw for guix-patches@gnu.org; Fri, 22 Mar 2024 11:10:25 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rngXu-00027s-7z for guix-patches@gnu.org; Fri, 22 Mar 2024 11:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69940] [PATCH 1/2] build-system/channel: Add support for additional channels. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 22 Mar 2024 15:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69940 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69940@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 69940-submit@debbugs.gnu.org id=B69940.17111202178031 (code B ref 69940); Fri, 22 Mar 2024 15:11:02 +0000 Received: (at 69940) by debbugs.gnu.org; 22 Mar 2024 15:10:17 +0000 Received: from localhost ([127.0.0.1]:59173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rngX9-00025Q-Jn for submit@debbugs.gnu.org; Fri, 22 Mar 2024 11:10:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rngK6-0001Pe-8h for 69940@debbugs.gnu.org; Fri, 22 Mar 2024 10:56:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rnfdZ-0004Mj-99; Fri, 22 Mar 2024 10:12:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=9n5QpEVAXuRd9sg0NtaU91WP4abLcc3vIllInVDB54M=; b=Nj1zI0c5vA0gv5pqeWNp 1mQBNi4LTltCDZ24VS8n7qOzJDyHQrrUTAbN7XNxUdMim1NQ8OS4I+FLbQwIqzvADVQ+dGh6+x5yH YdLXqVxYu+Z//gXWdjxeBMHoln9YWjo2c/aMOwUcsY6veRjQ/UxAgyveeASnVpNMJFFmGBnuQUb2r 48JkngJ1MCI47mEURWsCJVz0SpykqhXeC9FSAFlJp81xgVlbVwBDjYR3C2gXFenIc3hk6GYWdO6pQ 1TeOACNskbdfdXFs3mOndKmEzUdTXbTuxwVaJX5nFNfbHfeDFDuGUjHe3j/20Ea4vsvPNWuJr7YjB BNVRcjtq516YJg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 22 Mar 2024 15:12:29 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 13F7D44FFC X-Spam-Score: -6.23 X-Migadu-Spam-Score: -6.23 X-Migadu-Scanner: mx11.migadu.com X-TUID: r2e6zLUHhPER Until now, ‘channel-build-system’ would assume a single channel, the ‘guix’ channel. This change lets users specify additional channels using the #:channels parameter. * guix/build-system/channel.scm (build-channels): Add #:channels and honor it. (channel-build-system): In ‘lower’, add #:channels and honor it. * doc/guix.texi (Build Systems): Document it. Change-Id: I36c1d19cbeee02a4d1144de089b78df0390774a0 --- doc/guix.texi | 5 ++++- guix/build-system/channel.scm | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index eda4084e7f..07dc6e24a8 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10451,7 +10451,10 @@ Build Systems name, in which case an additional @code{#:commit} argument must be supplied to specify the commit being built (a hexadecimal string). -The resulting package is a Guix instance of the given channel, similar +Optionally, a @code{#:channels} argument specifying additional channels +can be provided. + +The resulting package is a Guix instance of the given channel(s), similar to how @command{guix time-machine} would build it. @end defvar diff --git a/guix/build-system/channel.scm b/guix/build-system/channel.scm index 6ad377f930..0607dcf4d7 100644 --- a/guix/build-system/channel.scm +++ b/guix/build-system/channel.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2019-2022 Ludovic Courtès +;;; Copyright © 2019-2022, 2024 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,6 +37,7 @@ (define latest-channel-instances* (define* (build-channels name inputs #:key source system commit + (channels '()) (authenticate? #t) #:allow-other-keys) (mlet* %store-monad ((instances @@ -44,7 +45,7 @@ (define* (build-channels name inputs (return (list source))) ((channel? source) (latest-channel-instances* - (list source) + (cons source channels) #:authenticate? authenticate?)) ((string? source) ;; If SOURCE is a store file name, as is the @@ -64,12 +65,14 @@ (define* (build-channels name inputs (define channel-build-system ;; Build system used to "convert" a channel instance to a package. (let ((lower (lambda* (name #:key system source commit (authenticate? #t) + (channels '()) #:allow-other-keys) (bag (name name) (system system) (build build-channels) (arguments `(#:source ,source + #:channels ,channels #:authenticate? ,authenticate? #:commit ,commit)))))) (build-system (name 'channel) -- 2.41.0