From patchwork Sun Feb 28 16:18:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinglu Chen X-Patchwork-Id: 27334 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 9BDBC27BC4D; Sun, 28 Feb 2021 17:40:43 +0000 (GMT) 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_H3,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 4F6D027BC4C for ; Sun, 28 Feb 2021 17:40:43 +0000 (GMT) Received: from localhost ([::1]:54164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGQ3e-0005Br-9n for patchwork@mira.cbaines.net; Sun, 28 Feb 2021 12:40:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGQ0H-0003tq-8o for guix-patches@gnu.org; Sun, 28 Feb 2021 12:37:14 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35590) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGQ06-0005tw-0C for guix-patches@gnu.org; Sun, 28 Feb 2021 12:37:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lGQ06-0007bW-Hw for guix-patches@gnu.org; Sun, 28 Feb 2021 12:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46833] [PATCH v2] import: hackage: Accept optional version parameter. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Feb 2021 17:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46833 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46833@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161453378729170 (code B ref -1); Sun, 28 Feb 2021 17:37:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Feb 2021 17:36:27 +0000 Received: from localhost ([127.0.0.1]:47134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGPzW-0007aQ-OA for submit@debbugs.gnu.org; Sun, 28 Feb 2021 12:36:26 -0500 Received: from lists.gnu.org ([209.51.188.17]:51488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGPzV-0007aI-3s for submit@debbugs.gnu.org; Sun, 28 Feb 2021 12:36:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGPzT-0003He-GV for guix-patches@gnu.org; Sun, 28 Feb 2021 12:36:24 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:45846 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGPyy-0003zO-JB for guix-patches@gnu.org; Sun, 28 Feb 2021 12:36:15 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1614529114; bh=asndNaohJ5uli2ueE71M5CWs5mN0oikNYWc65yVPeas=; h=From:To:Subject:In-Reply-To:References:Date; b=aVL5/QBBqRvTuUb4DQ7Lb7sqlGLDsqiTNkxi9dU5L4KoOBh3SJ9wH9XGRoUwGuqhq NJ13YZUKO3tvafC5ckBb/iQyCzfOxL/pln9IOEzEfORfo6UB2aN1LYKTDdoOK2ews2 lZ06By/VWgok+DbLZK4eBLNF6C6hyA/DGXwAfD9g= In-Reply-To: <223714e238a28dad4dbbd66a2fa506582a44992a.1614528863.git.public@yoctocell.xyz> References: <223714e238a28dad4dbbd66a2fa506582a44992a.1614528863.git.public@yoctocell.xyz> Message-Id: <46c8c5cd27542ec7304eb5209edd8db4e00e16de.1614529058.git.public@yoctocell.xyz> Date: Sun, 28 Feb 2021 17:18:34 +0100 MIME-Version: 1.0 Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499, PDS_OTHER_BAD_TLD=1.325, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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" X-getmail-retrieved-from-mailbox: Patches * guix/import/hackage.scm (hackage-recursive-import): Add the VERSION key. Make REPO a key. --- Ugh, made a typo in the commit summary. guix/import/hackage.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index 6ca4f65cb0..9f992ffe8e 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -344,8 +344,8 @@ respectively." (memoize hackage->guix-package)) (define* (hackage-recursive-import package-name . args) - (recursive-import package-name #f - #:repo->guix-package (lambda (name repo) + (recursive-import package-name + #:repo->guix-package (lambda* (name #:key repo version) (apply hackage->guix-package/m (cons name args))) #:guix-name hackage-name->package-name))