From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id yMDONIBzQmZFmQAAe85BDQ:P1 (envelope-from ) for ; Mon, 13 May 2024 22:09:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id yMDONIBzQmZFmQAAe85BDQ (envelope-from ) for ; Mon, 13 May 2024 22:09:36 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=Gb+s+rxk; 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=1715630976; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: 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=HyR5PK2cfYqYmon0Hl6NRwSvAbm69M7OeUL35K8vuL4=; b=aqKwot6M1pNW7jJwe1t9WOXClaTkTiz5KB2+/JNYbxoB+wx2FuW4L9ZFWpHFLlL8O+Hfbf 0YjjFgayau+3+virI2KkUgDZHxmw2FmVvh1eT0xqfZi22IW5k+3RiXg3Cxl4hpNrq5q79I p/RXLZX6ZWpRVObJ4sOpTh7xfYCcwZJMxKS1AACrFbsIsDuTNuf8l2gyUqg2tqyks7b1Fz 319YA/TIY52b2hZLRdQxtkUYfcmwf/ia15Mm6fhUHXfmXTppkjYZdaOw5PiFRrhZgQyyCg c0zsnuJA5cSr25KU4scuOacBs83sDu7TBV6Amqb/qE6zTh13hEHHsQMpSWSMyQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=Gb+s+rxk; 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=1715630976; a=rsa-sha256; cv=none; b=rMiJhp1nmjyp62eWSYS4LLTDBg8ue2BvG7fMix5uqk4ehn7VsZJha+wdKT25698KwgFFiH AcFacm1Zt97zhhx0zHQGEAOfduONyhMpbALVhPbee/rx8aY1y8pD6mI1AmeLzXT3d29d9m q2yzDM4/Tl5bDgWPOS/jJle/WnwL0NiIELD1x3EW1j1wWGyKkNGlkOQUqVwxgIKw+wlKQt RG2SLR7vEYPIlvbalVy+am6jtVqQDARcM1/SGSxJThX7dj2yFB/2Dn51L5DDiN446xGfC7 Whrih7eDmoySsyIhVLjIusSMEdo1FX2uYcnh3L1k53GKx4bJqqCqG+45eSbyxQ== 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 903476DA7E for ; Mon, 13 May 2024 22:09:36 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6byu-0004F1-6R; Mon, 13 May 2024 16:09:08 -0400 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 1s6byt-0004Dh-By for guix-patches@gnu.org; Mon, 13 May 2024 16:09:07 -0400 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 1s6byt-0007on-41 for guix-patches@gnu.org; Mon, 13 May 2024 16:09:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s6byt-0000JI-OB for guix-patches@gnu.org; Mon, 13 May 2024 16:09:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70923] [PATCH 13/13] import: hexpm: Use (guix import utils) 'maybe-inputs' procedure. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 May 2024 20:09:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70923 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70923@debbugs.gnu.org Received: via spool by 70923-submit@debbugs.gnu.org id=B70923.17156309321089 (code B ref 70923); Mon, 13 May 2024 20:09:07 +0000 Received: (at 70923) by debbugs.gnu.org; 13 May 2024 20:08:52 +0000 Received: from localhost ([127.0.0.1]:34616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6byd-0000HS-Uy for submit@debbugs.gnu.org; Mon, 13 May 2024 16:08:52 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:40155 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6byV-0000El-VA for 70923@debbugs.gnu.org; Mon, 13 May 2024 16:08:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1715630911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HyR5PK2cfYqYmon0Hl6NRwSvAbm69M7OeUL35K8vuL4=; b=Gb+s+rxk+58AxRBr3wMbzkXAmJmqdfSZWftUyWiL5n89bW4NxLjnqdcUZ3762CaaAW8SSO xftsxgsvt/NOcCmUoS/ay0AJcKMT/EebqZoWsptIWX6vOJ8A2W2eg64zc/ukZlt2Sn5aCU jie2AJiiFe682dxlQ47ZPKHQCxwyLcKl+aQ9hirOELdjwsBUcRq8XITfN0VEbMvQ1Xe0sa mZ7Km2HJcqB5dIjYAYe+bpKLFL/RxPLE96y8vQBSdt0HLTppAKmyJ8as1YWKYFPMpBytza JRDvFzkiUWfWWoMCMDlVfDAWSr1lgAE1PG+zxZVxPkXip8gZP/1/FNVDnZGjJQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id c705f68a (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70923@debbugs.gnu.org>; Mon, 13 May 2024 20:08:31 +0000 (UTC) Date: Mon, 13 May 2024 22:08:10 +0200 Message-ID: <65ea14e719d9219414bc635feee982b8e4857a5a.1715627497.git.herman@rimm.ee> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches From: Herman Rimm via Guix-patches via 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: -6.37 X-Spam-Score: -6.37 X-Migadu-Queue-Id: 903476DA7E X-Migadu-Scanner: mx13.migadu.com X-TUID: GtXCDTMWcKA1 * guix/import/hexpm.scm (maybe-inputs): Delete procedure. (dependencies->package-names): Return strings instead of symbols. (make-hexpm-sexp): Use 'maybe-inputs' from (guix import utils). Change-Id: Ie7a8a630a3a9d4859453d49fdee42aa560e27f17 --- guix/import/hexpm.scm | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/guix/import/hexpm.scm b/guix/import/hexpm.scm index 71a54ba973..af7a96efb0 100644 --- a/guix/import/hexpm.scm +++ b/guix/import/hexpm.scm @@ -153,26 +153,14 @@ (define (lookup-hexpm-release version*) ;;; Converting hex.pm packages to Guix packages. ;;; -(define (maybe-inputs package-inputs input-type) - "Given a list of PACKAGE-INPUTS, tries to generate the 'inputs' field of a -package definition. INPUT-TYPE, a symbol, is used to populate the name of -the input field." - (match package-inputs - (() - '()) - ((package-inputs ...) - `((,input-type (list ,@package-inputs)))))) - (define (dependencies->package-names names) - "Given a list of hexpm package NAMES, returns a list of guix package names -as symbols." + "Given a list of hexpm package NAMES, returns a list of guix package +names." ;; TODO: Base name on language of dependency. ;; The language used for implementing the dependency is not know without ;; recursing the dependencies. So for now assume more packages are based on ;; Erlang and prefix all dependencies with "erlang-" (the default). - (map string->symbol - (map hexpm-name->package-name - (sort names string-cipackage-name (sort names string-cipackage-names dependencies) 'inputs) + ,@(maybe-inputs (dependencies->package-names dependencies)) (synopsis ,synopsis) (description ,(beautify-description description)) (home-page ,(match home-page -- 2.41.0