From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id AIgSFYVMV2dQXQAA62LTzQ:P1 (envelope-from ) for ; Mon, 09 Dec 2024 20:01:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id AIgSFYVMV2dQXQAA62LTzQ (envelope-from ) for ; Mon, 09 Dec 2024 21:01:09 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=BINe9Mte; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=KyQx2SOX; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733774469; a=rsa-sha256; cv=none; b=hHKN+pyZE5Ptu2S7RYLeXz/zafdQjz/RC072ZN1Qq4IvooKl54fgW1nroxmCiFhipHD9F0 rQGH2yDshr5LWyf7Mf8x/mSuZ0jReW6gY++8lamQBD1cnlncUcHQ80QaPF3ghkF85QSY7Q xfr1Wd5D0x5GuV06i2/CB6CS+Nry2BoprcipMKHG/Sz0adVXz4xoE19cZEYvQmElZ6t3jS 1tQzsRYnAUpfIPLThPQboBTG/XeapXpyFkQeWB+9ISlP4orNLt8NxFsV8ZJUnX55OVgywS sXRAd3neVcK5HOgR3uw7I+y0p7RS76wMjGxVqYNvE1esYFu8iSXvQQ9MKcV+tg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=BINe9Mte; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=KyQx2SOX; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733774469; 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-type:content-type: 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=G02zETCO6gOJfw16zyqQcrRjpzZ0CeiIi9EudVkPeAw=; b=S8C/BjgV7UzGgdvvE+Dnc0hn81QvYV6EP68x/Hv0mLuH2Z97rdcnIsOWXL+F7PktRpBvCm MrOeQSVG1VbUQR2nrQItAzF+pboAbTiIl6UYqa2B08c8Jqx9L8BE47wmx1pNCrF8NFrDP1 YLpGg2sSLII+LH8SpuIH3jvzKEi9AwC+tJgk/9EBW9yoLLhfsfPNsaupF+iIL+Vmv6WiFQ QTKqFQwT6R0C82h6LKPQ1BDp9PnDqS7tgBg/SfRj5ZqxkvarBVIup0Ud5syWz2GEyojCcF YgBO9ZpgunhsOylanm+23KWvxsdg/6kPv7adDfhoosDiPblI26AQCCOKRhYT4g== 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 F2A574DE9 for ; Mon, 09 Dec 2024 21:01:08 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKjvS-0005GB-Qr; Mon, 09 Dec 2024 15:00:14 -0500 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 1tKjvQ-0005DW-Tr for guix-patches@gnu.org; Mon, 09 Dec 2024 15:00:12 -0500 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 1tKjvQ-0007ZE-FR for guix-patches@gnu.org; Mon, 09 Dec 2024 15:00:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=G02zETCO6gOJfw16zyqQcrRjpzZ0CeiIi9EudVkPeAw=; b=BINe9Mte0GMCwSzApQAf3PXBSRGcpfXT6dRI40ztjOCFjrO7pu9Vf33qX45Gdbg9BaPdaCDgj0+2hViAjo92qLrGgrGA0biBY0LXNaMKotSyomKJZiSS9YviNYtShDLO9oLYP/MuRlYcdnIXkXE1hpppOFZH/iTlKWGVYCI2bUVSXhvH4qh6gghBILRDZoQ1HGN+lTmg5eNsFLz7mahzGAbfAoI0HtSrefVTWRy8yfeFvG5Ol1onnvU3b2ojpFHG8X0TqAwVnp60XsN4XTwIgnvtPmXsAGjdCJEBuSThW04ri4eWtpTXKxnDrE2Ca29W3lqckI4gEkZI3maPoIaDaw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tKjvP-0002Id-Kh for guix-patches@gnu.org; Mon, 09 Dec 2024 15:00:11 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#70923] [PATCH v4 11/11] 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, 09 Dec 2024 20:00:11 +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.17337743768339 (code B ref 70923); Mon, 09 Dec 2024 20:00:11 +0000 Received: (at 70923) by debbugs.gnu.org; 9 Dec 2024 19:59:36 +0000 Received: from localhost ([127.0.0.1]:55753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKjup-0002AK-Vw for submit@debbugs.gnu.org; Mon, 09 Dec 2024 14:59:36 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:60445 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKjuk-00027f-Rm for 70923@debbugs.gnu.org; Mon, 09 Dec 2024 14:59:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1733774357; 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=G02zETCO6gOJfw16zyqQcrRjpzZ0CeiIi9EudVkPeAw=; b=KyQx2SOXwguMe2ibmYGNoCjKCfhKfNm+TC7189AuM78oR+9u6AzSl6/2ehTcmwISpVvh5y FTpSHzRhv7Dl7Z7uUnvzJXLskWNcOGp0zjP+zBNlE/01EsHpzfegwAZLzOyYvBrUdPT0Nt lEaNVVA42FZL0YpC486DcPEdmzKP9pFbY0VZTCUWfzIffZYq+CQnVmi8iiCls/Vef+h2oW Qf5jNUPwUgyUIOWifrO3kiDuXTN91BTnMDckf0YQhjvZTnwk6Na/e27HcXAKE2lnv+A+DS hM6Z2kJCiF2r7yCZbLpPLRl5MkM4xD5Z2Tq2dULfmgz5NoZTHRXTT4rLrb+Amw== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 9b7d8033 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70923@debbugs.gnu.org>; Mon, 9 Dec 2024 19:59:17 +0000 (UTC) Date: Mon, 9 Dec 2024 20:58:15 +0100 Message-ID: <5cee288aa6676f609297e7599a9f121886d8d6a7.1733774143.git.herman@rimm.ee> X-Mailer: git-send-email 2.45.2 In-Reply-To: <4b8cde409e17e4b9ab7ef591eff605b88235fb0a.1733774143.git.herman@rimm.ee> References: <4b8cde409e17e4b9ab7ef591eff605b88235fb0a.1733774143.git.herman@rimm.ee> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: -2.66 X-Spam-Score: -2.66 X-Migadu-Queue-Id: F2A574DE9 X-Migadu-Scanner: mx12.migadu.com X-TUID: TTRcDajbniRn * 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 | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/guix/import/hexpm.scm b/guix/import/hexpm.scm index 71a54ba973..a7d74e24c3 100644 --- a/guix/import/hexpm.scm +++ b/guix/import/hexpm.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2019 Martin Becze ;;; Copyright © 2019 Maxim Cournoyer ;;; Copyright © 2020-2022 Hartmut Goebel +;;; Copyright © 2024 Herman Rimm ;;; ;;; This file is part of GNU Guix. ;;; @@ -153,26 +154,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." - ;; 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.45.2