From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YB82Dg2/iWMsLwEAbAwnHQ (envelope-from ) for ; Fri, 02 Dec 2022 10:02:05 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id sDcUDg2/iWOVewAA9RJhRA (envelope-from ) for ; Fri, 02 Dec 2022 10:02:05 +0100 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 097D22F1F1 for ; Fri, 2 Dec 2022 10:02:04 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p11vF-0005h5-1M; Fri, 02 Dec 2022 04:01:30 -0500 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 1p11v2-0005fN-71 for guix-devel@gnu.org; Fri, 02 Dec 2022 04:01:16 -0500 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 1p11v1-00049A-P8; Fri, 02 Dec 2022 04:01:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=GJC6L/NZKth1DPfijP560wmHNmwRLo1da1Bqu609hG4=; b=bVLRK/BQPvrTvclR04Jc tw+H8xyvK4yN/YbQ64Zq6nPmO9np4YP3z5IBcGnJ0WwErAMgNsfQCEI6UqW9lqXxGEBTQyqWMYm6L vBfI4GomXWYC4qp1BY1Hg+RSgFVSLfwT1tIp7Tw9JLLaUAoDaNgH3qXTf/HKZNa6ltmErDxby6FOQ ThLLdXlq/CAQ9IdhiWQIKnDPB3LmzvwH3fIPbSkk+ZgVeHODewbIbhNXcVcI0uzMXtt1u89RumpgF hSNfStgdS6F/YLc8llk4GgKHLRsJYRrBHbvw62flbp9qNRSUe7azVCDI45PaErr3FS2+3pUSJGfo8 CeV94baDIRRppA==; Received: from [193.50.110.137] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p11v1-0006Ol-8g; Fri, 02 Dec 2022 04:01:15 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Cc: Guix Devel Subject: Re: how to customize mirror list used in custom channels? References: <86lenzctmv.fsf@gmail.com> <87zgce9di8.fsf@gnu.org> <86ilj01tv2.fsf@gmail.com> <87zgcbe4lf.fsf@gnu.org> <87wn7fs0kt.fsf@gmail.com> <87o7sq6tki.fsf@gnu.org> <86bkop7fe2.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Duodi 12 Frimaire an 231 de la =?utf-8?Q?R=C3=A9volu?= =?utf-8?Q?tion=2C?= jour du Raifort X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 02 Dec 2022 10:01:13 +0100 In-Reply-To: <86bkop7fe2.fsf@gmail.com> (zimoun's message of "Tue, 29 Nov 2022 20:02:45 +0100") Message-ID: <877czaw55y.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-TUID: ArdKpJ5uNhXT Hi, zimoun skribis: > Does something like that would make sense? Yes, that=E2=80=99s the idea. > diff --git a/guix/download.scm b/guix/download.scm > index 2e9ecb43fc..2497ea0f75 100644 > --- a/guix/download.scm > +++ b/guix/download.scm > @@ -499,6 +499,7 @@ (define %download-fallback-test > (define* (url-fetch* url hash-algo hash > #:optional name > #:key (system (%current-system)) > + (mirrors %mirrors) > (guile (default-guile)) > executable?) > "Return a fixed-output derivation that fetches data from URL (a string= , or a > @@ -519,7 +520,8 @@ (define file-name > (_ > (basename url)))) >=20=20 > - (let ((uri (and (string? url) (string->uri url)))) > + (let ((uri (and (string? url) (string->uri url))) > + (mirror-file (plain-file "mirrors" (object->string mirrors)))) There are subtleties though: we don=E2=80=99t want to create a new at each call as this would lead to poor performance (lack of memoization). > This change would a world rebuild, right? No, not at all. Thanks, Ludo=E2=80=99.