From patchwork Mon Jul 12 05:48:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sarah Morgensen X-Patchwork-Id: 31356 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2716D27BC84; Mon, 12 Jul 2021 06:49:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8F3F627BC83 for ; Mon, 12 Jul 2021 06:49:11 +0100 (BST) Received: from localhost ([::1]:45284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2ooY-0004p8-EE for patchwork@mira.cbaines.net; Mon, 12 Jul 2021 01:49:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2ooQ-0004oQ-6Z for guix-patches@gnu.org; Mon, 12 Jul 2021 01:49:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53027) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2ooP-0006X7-Tv for guix-patches@gnu.org; Mon, 12 Jul 2021 01:49:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m2ooP-00041Q-PK for guix-patches@gnu.org; Mon, 12 Jul 2021 01:49:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49531] [PATCH core-updates 1/4] import: utils: Emit new-style package inputs. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Jul 2021 05:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49531 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49531@debbugs.gnu.org Received: via spool by 49531-submit@debbugs.gnu.org id=B49531.162606889715373 (code B ref 49531); Mon, 12 Jul 2021 05:49:01 +0000 Received: (at 49531) by debbugs.gnu.org; 12 Jul 2021 05:48:17 +0000 Received: from localhost ([127.0.0.1]:36332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2ong-0003zt-Pi for submit@debbugs.gnu.org; Mon, 12 Jul 2021 01:48:17 -0400 Received: from out2.migadu.com ([188.165.223.204]:32839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2ond-0003zc-Nr for 49531@debbugs.gnu.org; Mon, 12 Jul 2021 01:48:15 -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=1626068892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+ocm/OGlRdLgmIt4JNQjS6hR3p3TO8OoeidVLeOXKAQ=; b=RvKiGRlRpum/avx/HobFPLaTiiqE2/c+hhyL00tdxMRKz9Q3fsluylISL6FwvGcc00xIti AhIxuvGT0/QpCCGoC2ittf4rqAnq4CrRQxq7dZr/Megt3+Nad1PXqpKAnmNZ9ERG8Odilx FnUphjL7rO2LPy72S47OUiEhtPzl/0Y= Date: Sun, 11 Jul 2021 22:48:06 -0700 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Sarah Morgensen X-ACL-Warn: , Sarah Morgensen via Guix-patches X-Patchwork-Original-From: Sarah Morgensen via Guix-patches via From: Sarah Morgensen X-getmail-retrieved-from-mailbox: Patches * guix/import/utils.scm (package-names->package-inputs)[make-input]: Return new-style package inputs. (maybe-inputs): Wrap PACKAGE-INPUTS in 'list' instead of 'quasiquote'. --- guix/import/utils.scm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index d817318a91..8fa017e18f 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com> ;;; Copyright © 2020 Martin Becze ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -237,12 +238,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 +262,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."