From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 oJKBFHcf82bfgwEAe85BDQ:P1 (envelope-from ) for ; Tue, 24 Sep 2024 20:22:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id oJKBFHcf82bfgwEAe85BDQ (envelope-from ) for ; Tue, 24 Sep 2024 22:22:15 +0200 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=hpBA6hzA; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=opkMWHBm; 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=1727209335; 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=cXVvihuadAmw8WIMX+d7M6FLkPYk6Lnv7RlqOmM3U8WqZGX5t9ji180kHG4xSZ2tb+cp1G Ebb/W7xd/bU55P+TSwKgS8sapVZMZgQuFBm8EHiiIi6T9oJtw1uLM3VW84JpQDORXRGXRb 10RvKbz259E1Ne5dwXenSUMPcr6HAIrQtvL7eB/SLzeAWgtVMNbLbNU4LjzmahuiRC1v2K 8o8rNnb0itGmlobwDdNX6m/3q1kE5X9/zSJpQX9M8jrCyq1dE2bwRkRw3qvh4sLkzybbE/ UlOlsHOApTOJzz0xej4D2uocgqoKz0iY7FyPiG2JHaND6s+HSQeMTHiMK6AFAw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727209335; a=rsa-sha256; cv=none; b=KowIBdMn3gBwiF+65rtrjGdXYIPUcI2jXetsVyKn6ZyQAuK4lmctMM2UHmUkLVSDykuFH2 zkCDpnJzmQv+hMF6daXP2afx/7mTY7awaVijkdQojjdE1OLs8iTbPQicM181ajdVhfJ9ov cvM8LhHAMKe1q3odH4Z3oehoRhGz//V0MRrIHUPgrVRgAdIgGflYz2TIbTEF+fwaqBvBky GhFtKamy9UwG4BO9CbtFaMc6qhBBoSPeCiZOKwGoj+onTey/0s6ETC9WplaCGobZRvVtrG MqPljQrthZ6N/5zn25VyhrmZfZM/FMXQgs0OTcl+6EFltDdA/nO2bKZT39Yqnw== 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=hpBA6hzA; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=opkMWHBm; 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 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 1243B7A77F for ; Tue, 24 Sep 2024 22:22:15 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stC2v-0000eA-O4; Tue, 24 Sep 2024 16:22:05 -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 1stC2c-0000Mg-4Z for guix-patches@gnu.org; Tue, 24 Sep 2024 16:21:46 -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 1stC2Z-0003PW-Lw for guix-patches@gnu.org; Tue, 24 Sep 2024 16:21:44 -0400 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=hpBA6hzA116yIRLGlqckkSZHqyI0LpYVLCUZ+EYxAtu44wE2GSlibAMo/MXlPScuY4EsLKSVd6OK4OAWRrmu4UEbxEvrD3Jcm/9PW5ivJAYtle0Xr/wh3eH+ZXa2UnosgdkuykBuSJGA2XAPFhBqCKQTtXbjolYIeoSwkKpbSDmzPyjsoUzh00NUqzw48FvYKbKAyqdUGGbek82qP+zM3AJKo5qP0hgwqpIsgl+SndwxpC+DHdfyPktcensHF86ANzWropi68NDg9pU/yGM9m6e7zLWIYlKqo6Fv3ikzPcUGOoMuWvpWFiV4Z/SRkcjiN5qYvmgXpwXC11N40quZPA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1stC2y-00055e-D9 for guix-patches@gnu.org; Tue, 24 Sep 2024 16:22:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70923] [PATCH v3 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: Tue, 24 Sep 2024 20:22:08 +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.172720930219436 (code B ref 70923); Tue, 24 Sep 2024 20:22:08 +0000 Received: (at 70923) by debbugs.gnu.org; 24 Sep 2024 20:21:42 +0000 Received: from localhost ([127.0.0.1]:38520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stC2Y-00053K-9L for submit@debbugs.gnu.org; Tue, 24 Sep 2024 16:21:42 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:37373 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stC2I-00050F-I6 for 70923@debbugs.gnu.org; Tue, 24 Sep 2024 16:21:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1727208850; 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=opkMWHBmcXiTo9R2vdxzOgyWc+24uDbye1PNxPlv6U3yCDsRe6wDpxpeIwjRc1ws2vEFPx mLwzBUTw0/115AH43/FlJpqFa2wjONFAI3V58ZZOVy51m+SQan6GrIudx7ZUL2chqgspho 2/Ktc4H0faeLUcX3nUl8qU8VGDqDjW+XGt9hNiknE4oP99TjWjVH3PMMrZUtfxtLq9Fdyr 4Gmhog1lUPAjv0boijRgt5bqFSl1kf/mP6db2QWwLqjJQJ2iYbLCynAMBQZF17Qq4psM3r kxLocx6B4CXy34b2SmXJJXOhxSGQOXOKqHDTpElBCsqxqCe50x6hnbwujVc+ZQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id c24bfa08 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70923@debbugs.gnu.org>; Tue, 24 Sep 2024 20:14:10 +0000 (UTC) Date: Tue, 24 Sep 2024 22:13:17 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: 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-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -7.02 X-Migadu-Queue-Id: 1243B7A77F X-Spam-Score: -7.02 X-TUID: x3+VO3dMjdGe * 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