From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id AIOfD7j4w2VnHQAAqHPOHw:P1 (envelope-from ) for ; Wed, 07 Feb 2024 22:40:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id AIOfD7j4w2VnHQAAqHPOHw (envelope-from ) for ; Wed, 07 Feb 2024 22:40:08 +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=a+97lPfu; 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=1707342008; 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=WyZ/Kq6A1fKx2JLduXZU0yT6kcC4gdaaGrNpmItNkt0=; b=gl8OG7tnp4lgw+UEr5c9As0S6A2GG9/pKRAA+9El8/Aj7AMWqxbdfkqlL1+JlxtxPR5U5j Be3WjMex2FZ7ddQWKmc8V3js/PL68sZcLV1Cjo8XbUPMh1mclSxRvcsv+4LlUgC+VmatsT 50ejINKeEAFgO1t/g6+r9l7fMS8HauxAy1ueFVxkZq9dwiKkINq+oLl/BBAhZLEcCbE8lJ Hcr43xPIHsr/L+pu+G4mGS3K7A91vmnMBh7Mf8jr8nrCcHkCJo4tQbJEP8gLWZY0x3CTjd siGIxM59OwVjzy9vAWaphmJWkmE0PDHbNQNK0xnKD4M95r7qhmpTg6bP1BLnHQ== 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=a+97lPfu; 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=1707342008; a=rsa-sha256; cv=none; b=IBIVD6LW1D8PoHzTDXzlcbMhzm+ROQmAVzrHAccBz5KagncXMRya4+705DaeOn2MZu8fd+ Wk6h8zQd7c68HBHZq1L8AF8NytU6KdCDIRiu6wRY6Sbi8zKhz7hiVjGMmsTbKemR88jQ8O 5wpxrOGc15RVGLcbodALCwJjEceswW/LN4Enc/6zEi643YSwh6QOiTMseF3fGzMF+SzNu2 cB85sU8wKZlLAIGWxx60DJMJE36hB1cTuA1ZuJWDKNqv3G2JBIczv8v5Q3x/d56ojurARH 09NDH74BHU/Yn5whj5Rx6T7L7ldmXmKIsz2Rf0j1szNBxeuFX+td4HDlCRMt4w== 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 C080315F54 for ; Wed, 7 Feb 2024 22:40:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXpe2-0004QW-PH; Wed, 07 Feb 2024 16:39:50 -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 1rXpe0-0004QN-Gx for guix-patches@gnu.org; Wed, 07 Feb 2024 16:39:48 -0500 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 1rXpdz-0004tG-Sz for guix-patches@gnu.org; Wed, 07 Feb 2024 16:39:48 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rXpeD-0002Ql-RR for guix-patches@gnu.org; Wed, 07 Feb 2024 16:40:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68935] [PATCH 2/3] guix: import: Wrap package expressions with define-public. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Feb 2024 21:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68935 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Herman Rimm Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , 68935@debbugs.gnu.org, Christopher Baines Received: via spool by 68935-submit@debbugs.gnu.org id=B68935.17073419629290 (code B ref 68935); Wed, 07 Feb 2024 21:40:01 +0000 Received: (at 68935) by debbugs.gnu.org; 7 Feb 2024 21:39:22 +0000 Received: from localhost ([127.0.0.1]:58070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXpdZ-0002Pm-Ng for submit@debbugs.gnu.org; Wed, 07 Feb 2024 16:39:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXpdX-0002PY-G4 for 68935@debbugs.gnu.org; Wed, 07 Feb 2024 16:39:20 -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 1rXpdC-0004iZ-CK; Wed, 07 Feb 2024 16:38:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=WyZ/Kq6A1fKx2JLduXZU0yT6kcC4gdaaGrNpmItNkt0=; b=a+97lPfu8FRgywkV2kq1 w2hPzlbnVjXZc12f5+lvE9DnhR/ZxmdckrCjTj+qTFmZsd/UbcJ38xvafztnarBvzI0zOGDcBHWow V6lQCj3gBRCl7kCprWxX6R0NlC6PPFzkXrFy1j0AxOuOGx8zKodtqwAC7Uxavr5UxLZdt0ERfpr3N mTqgrpcO92vaGXBBqfPrfS2g1rG3N1geg5Lwk0Lw4bVfRcsAsMRGlZQ16vuxaAWSseutM3FGqTG4K ywtLyTFU9y5cJSrIBsriaJIfLVpEXxCGZdMc9ilw7yMt/fHzoVYZXPdFbRh0cR4jXi7EQ4Sdaq7sH +2aDXsPLPonmig==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Herman Rimm's message of "Mon, 5 Feb 2024 16:07:13 +0100") References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Nonidi 19 =?UTF-8?Q?Pluvi=C3=B4se?= an 232 de la =?UTF-8?Q?R=C3=A9volution,?= jour de la Pulmonaire 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: Wed, 07 Feb 2024 22:38:52 +0100 Message-ID: <87bk8s3qfn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-Spam-Score: -5.87 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -5.87 X-Migadu-Queue-Id: C080315F54 X-TUID: EWoB/84XlGP5 Herman Rimm skribis: > * guix/scripts/import.scm (guix-import): Wrap package expressions. > > Change-Id: Ic4d986a4706a692b2fecd6fded8ac72ab6311687 Probably a good idea! > (match (apply (resolve-importer importer) args) > - ((and expr (or ('package _ ...) > - ('let _ ...) > + ((and expr ('package _ ...)) > + (print (package->definition expr))) > + ((and expr (or ('let _ ...) > ('define-public _ ...))) > (print expr)) The (let =E2=80=A6) case should be treated like the (package =E2=80=A6) cas= e. It corresponds to things like: (let ((commit "abcde")) (package =E2=80=A6)) > + (match expr > + ((and expr ('package _ ...)) > + (print (package->definition expr))) > + ((and expr (or ('let _ ...) > + ('define-public _ ...))) > + (print expr))) Same here. Also, please indent =E2=80=98match=E2=80=99 the same way as elsewhere in th= e code: (match lst ((x y z) =E2=80=A6)) Ludo=E2=80=99.