From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EDCzFvXL1WAbiwAAgWs5BA (envelope-from ) for ; Fri, 25 Jun 2021 14:28:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6DRxEvXL1WCiGwAA1q6Kng (envelope-from ) for ; Fri, 25 Jun 2021 12:28:37 +0000 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 BE9D11E291 for ; Fri, 25 Jun 2021 14:28:36 +0200 (CEST) Received: from localhost ([::1]:44106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwkwl-0000h2-OA for larch@yhetil.org; Fri, 25 Jun 2021 08:28:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwkwR-0000a8-9z for guix-patches@gnu.org; Fri, 25 Jun 2021 08:28:16 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwkwR-0004Dn-2G for guix-patches@gnu.org; Fri, 25 Jun 2021 08:28:15 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lwkwR-0000SV-0T for guix-patches@gnu.org; Fri, 25 Jun 2021 08:28:15 -0400 Subject: bug#48943: [PATCH] import: hackage: Support "common" field and imports Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Fri, 25 Jun 2021 12:28:14 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 48943 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Philip Munksgaard Cc: 48943-done@debbugs.gnu.org Mail-Followup-To: 48943@debbugs.gnu.org, ludo@gnu.org, philip@munksgaard.me Received: via spool by 48943-done@debbugs.gnu.org id=D48943.16246240761702 (code D ref 48943); Fri, 25 Jun 2021 12:28:14 +0000 Received: (at 48943-done) by debbugs.gnu.org; 25 Jun 2021 12:27:56 +0000 Received: from localhost ([127.0.0.1]:45063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwkvx-0000RC-AN for submit@debbugs.gnu.org; Fri, 25 Jun 2021 08:27:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwkvv-0000Qy-8V for 48943-done@debbugs.gnu.org; Fri, 25 Jun 2021 08:27:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44586) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwkvp-0003u5-RE; Fri, 25 Jun 2021 08:27:37 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42468 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwkvp-0000y8-Is; Fri, 25 Jun 2021 08:27:37 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210610083953.664318-1-philip@munksgaard.me> <20210618124813.844948-1-philip@munksgaard.me> Date: Fri, 25 Jun 2021 14:27:35 +0200 In-Reply-To: <20210618124813.844948-1-philip@munksgaard.me> (Philip Munksgaard's message of "Fri, 18 Jun 2021 14:48:13 +0200") Message-ID: <87y2ay2kp4.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624624116; 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:resent-to: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; bh=rBnOyfga52E78nffiRThJ2pjOg10myL0jixiUd5c0bE=; b=PwrCdmRk1mGJfX9akuuHhWv+AZWJVhKDpzAIRRHvXe3+REe1nzEfyHjpotVW+mOHo1saU7 4f/rm6lrFIsjYPZRK1DVqQEkXoaYFzTZlQxzwtbnoTyBC4dDVQLgbHUH13vVB+8mCm40Z9 LWoG+sqyfaziu37TKdtjGPy7ru9f+J1Cu2oXUaqqr+Me+Yco/BL+HoRhe2FVxIzoQg9kOK dzL+p6EE6ar+n4ks5FO1fhSNTJQAOKxyAqZSNjfhm6+uh116SFHBvRx89LqqGMfAvlg1Za lpwhbBYP9Y5rPkArMH5RxialUcEzQHGjuVBJCxTkLGQffB1+U/fT62vqvbMf0g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624624116; a=rsa-sha256; cv=none; b=V2nXzH4W6RS/tooLZ7GJkB6bW5L3Vx2glZokE1vh3D9N9aKJ7ywt1DOZ4PTe3AFD5TKADq pCjDz6LS3uSxNUAEBvGlPJWN8SpYYf5Pq1UzUldmFNSr9RJ3dwRYxIuu8PSxilHoS3R0JW UvV0Up4S8diNN0zNclpoDwc8zLGTxSlOlVD69sH+naDEfZSPGhaUsx9bFt5fN+qfMizPqN 9f8IGYUp7+jDh5Ual37ZnjMYLJHGFTYGuz5rLEBDvlxYPeGy3JcAtsc6xFgZIcl2jCucQw cxTlpFLY85KoZ9+aq0d4gRitYMQUgqztrDtodAQtbPgrv1f8/ut8CQ/9c/IVvQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.43 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: BE9D11E291 X-Spam-Score: -1.43 X-Migadu-Scanner: scn1.migadu.com X-TUID: njkTt2TsEtEI --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Philip Munksgaard skribis: > Fixes . > > * guix/import/cabal.scm (make-cabal-parser): Modify. > (is-common): New variable. > (lex-common): New procedure. > (is-id): Modify. > (eval-cabal): Modify. > * tests/hackage.scm ("hackage->guix-package test cabal import") New test. Applied with the change below (=E2=80=98cut=E2=80=99 is for procedures but = =E2=80=98match=E2=80=99 is a macro). Thanks! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/import/cabal.scm b/guix/import/cabal.scm index 22b5d164d0..e9a0179b3d 100644 --- a/guix/import/cabal.scm +++ b/guix/import/cabal.scm @@ -809,10 +809,10 @@ the ordering operation and the version." (if (eq? value 'false) #f #t))) (define common-stanzas - (filter-map (cut match <> - (('section 'common common-name common) - (cons common-name common)) - (_ #f)) + (filter-map (match-lambda + (('section 'common common-name common) + (cons common-name common)) + (_ #f)) cabal-sexp)) (define (eval sexp) --=-=-=--