From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 10 00:53:41 2021 Received: (at 49169) by debbugs.gnu.org; 10 Jul 2021 04:53:41 +0000 Received: from localhost ([127.0.0.1]:60104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m24zk-0005Nd-TR for submit@debbugs.gnu.org; Sat, 10 Jul 2021 00:53:41 -0400 Received: from out2.migadu.com ([188.165.223.204]:38915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m24zf-0005NQ-BG for 49169@debbugs.gnu.org; Sat, 10 Jul 2021 00:53:39 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1625892813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Z8Bwd+UAcldGdgpMmtftx6Mfn80I/cKDObp3CE4N9cM=; b=ZtXIv1KermSmtqswAw1+EmpSqP0lArd1wglo5H8+EfBayeYDbIL1wpeBngEsgVAT//EkJJ cpy09cnhRMb1bKtVxTxzL+LFRnYiSYJbYdhS1T7QYO6VcmmjOTTWA7oPKA4AOvOUV49zec JNsizHEb1gMcxz7fxvMrWN50CSb3Vew= From: Sarah Morgensen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#49169: [PATCH 00/11] Removing input labels from package definitions References: <20210622090221.15182-1-ludo@gnu.org> <20210630204832.25753-1-ludo@gnu.org> Date: Fri, 09 Jul 2021 21:53:30 -0700 In-Reply-To: <20210630204832.25753-1-ludo@gnu.org> ("Ludovic =?utf-8?Q?Cou?= =?utf-8?Q?rt=C3=A8s=22's?= message of "Wed, 30 Jun 2021 22:48:16 +0200") Message-ID: <868s2ekbw5.fsf_-_@mgsn.dev> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49169 Cc: 49169@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello :) This is a wonderful direction! I am always happy to see boilerplate evaporate. Ludovic Court=C3=A8s writes: > =E2=80=A2 I changed a few importers to emit simplified package inputs. > We=E2=80=99ll have to take care of the other importers eventually. I found one more easy change to make in the importers. I just gave it a quick smoke test with the Go importer, nothing exhaustive; and I'm not sure which other importers use it. I've attached the patch below. > doc/guix.texi | 208 ++++++++++++++-- In the manual, you added: > Each element of these lists is either a package, origin, or other > ``file-like object'' [...] How should a file input like this be handled? ("some.patch" (search-patch "some.patch")) If I had to guess, I'd try some gexp like... #$(local-file (search-patch "some.patch")) But I really have no idea! > guix/scripts/style.scm | 527 +++++++++++++++++++++++++++++++++++++++++ > tests/style.scm | 366 ++++++++++++++++++++++++++++ > 23 files changed, 1643 insertions(+), 298 deletions(-) The style script makes up fully half of the patch! Wow. -- Sarah --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=emit-new-package-inputs-elsewhere.patch Content-Description: emit-new-package-inputs-other-importers.patch diff --git a/guix/import/utils.scm b/guix/import/utils.scm index d817318a91..5075e5c491 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -237,12 +237,10 @@ into a proper sentence and by using two spaces between sentences." optional OUTPUT, tries to generate a quoted list of inputs, as suitable to use in an 'inputs' field of a package definition." (define (make-input input version) - (cons* input (list 'unquote (string->symbol - (if version - (string-append input "-" version) - input))) - (or (and output (list output)) - '()))) + (let ((name (if version (string-append input "-" version) input))) + (if output + (list (string->symbol name) output) + (string->symbol name)))) (map (match-lambda ((input version) (make-input input version)) @@ -263,7 +261,7 @@ snippet generated is for regular inputs." (() '()) ((package-inputs ...) - `((,field-name (,'quasiquote ,package-inputs))))))) + `((,field-name (list ,@package-inputs))))))) (define* (maybe-native-inputs package-names #:optional (output #f)) "Same as MAYBE-INPUTS, but for native inputs." --=-=-=--