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 ms13.migadu.com with LMTPS id sEs/KaPE2GaAagAAe85BDQ:P1 (envelope-from ) for ; Wed, 04 Sep 2024 20:35:47 +0000 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 sEs/KaPE2GaAagAAe85BDQ (envelope-from ) for ; Wed, 04 Sep 2024 22:35:47 +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=EGmTltg4; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b="UBYLqm/E"; 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=1725482147; 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=Jd5WR4+yNK0SJoDuM6HP4wtVaCkzB8p8rFcIE4xxNlQ=; b=NErFqu13JUqQrFHfZyH3iE3MI+hM1NHu1vHNlssoKvzDaMO51rQpsk0oEnsPGGn59ryq3R XL+JINV2bd5TTZ6EkOfRuUI6VJm28zLAQc4JGOUgePt1CZxUzNiYaB4KKRFoVR2qPZ0zVc r/AG/UDFzY4H4UGX0l7pKWNB9Xtr13PI+bNZL1ytHxcRXTu9oeqgk0ATP2RhvRns4VrDB2 71MQWwbWkMkYsp4cjM7oY3Xl3fMF52ISiccS3xTPWLJ+yz9fdOxSOAecVPntDFtDVWDWoA uhj3ZsdtfEKXNOwO7jr5229+VPWfbFr15Km142egqAFi3zsr9SQlA2hZDewvhg== 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=EGmTltg4; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b="UBYLqm/E"; 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=1725482147; a=rsa-sha256; cv=none; b=I53lgzhJcF2K40MAnyrAikebEv84Cf4hnoma8ahzzCT2HKF7l/avb556LbZoA8gwoYQDBj V+l1hGpJPhX4+uaM5HftUV8mGA4qkpSvgDpw8lq5WVopdpjReu9F0Jxx98PLEfMM6ndowd +UWeWxZTq6quB3+HCVOM1ZQz/uNLQoAtbOul7pNA/d23C3okNpFADwxYdfITiMtq2BgxO7 p2lXAqof8xxhQG1ZdDQuwpqCyNW0PiNs42RlLzTpXF8cfMggPl7xOKYnKx+/tmIAmf0g+D Mc+6Oy5EVhZ38VcvJPrcovuR1Z82VFfxCv334A+zyPS+JkgAUfUiFh3Klj9IBA== 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 676613E36B for ; Wed, 4 Sep 2024 22:35:47 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slwiq-0003GH-7y; Wed, 04 Sep 2024 16:35:24 -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 1slwiW-00038d-JM for guix-patches@gnu.org; Wed, 04 Sep 2024 16:35:06 -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 1slwiV-0002GL-5U for guix-patches@gnu.org; Wed, 04 Sep 2024 16:35:04 -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=Jd5WR4+yNK0SJoDuM6HP4wtVaCkzB8p8rFcIE4xxNlQ=; b=EGmTltg4vl9S9HdnwjduDAjvch7/4yyy1TLAU9UPDphjWRhFq3Kb53ILPM+zHs8yk2cMVteXsPR6rznWO5oxmOO3Opw25czynTmoH+IUvqBGm0HDyhxZ5is1Tx2AOQTlY9k819BWAt2sYh72tA7Eg2oRDeZtWnv84wKMl36rAHzmUZo8rsRfR11BxKZaH5N9Q5z6uAgXbPHVa3B0HzTHpg29iZp+tL3aL88ntc1TinSroa1r+qcceQy7ETVD16VdqWC0ifsE3VZ9NdQ8G8W4B7rImegarFhXS6TpiKinVo3Z72GQRJffcTSNE6KnkXbVv44cPwcHz6kuOmfYqdwKxQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1slwjX-0005Ms-60 for guix-patches@gnu.org; Wed, 04 Sep 2024 16:36:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70923] [PATCH v2 12/12] import: hexpm: Use maybe-inputs. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Sep 2024 20:36: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.172548211620467 (code B ref 70923); Wed, 04 Sep 2024 20:36:07 +0000 Received: (at 70923) by debbugs.gnu.org; 4 Sep 2024 20:35:16 +0000 Received: from localhost ([127.0.0.1]:35479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slwii-0005Jw-CV for submit@debbugs.gnu.org; Wed, 04 Sep 2024 16:35:16 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:39573 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slwid-0005Gz-Lh for 70923@debbugs.gnu.org; Wed, 04 Sep 2024 16:35:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1725482032; 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=Jd5WR4+yNK0SJoDuM6HP4wtVaCkzB8p8rFcIE4xxNlQ=; b=UBYLqm/ETxNBjPFAH2WjYywhtXa5wBA0fjLVx8yO/XolHeuTtUikPAyw5U2d4nZVkypdME e0P7bMKbaBQk3NbSrsVRUy/H0DrJefDo3NI9zWalYir2XH0kRNoyaTQc/8iR1D26Ws1XNB VTjFUIY4w5GXdzHYXhvrO7d45oHNQ4MgQn2LpNYhn2Fh3o2ckqWWZf2o/LZTxy+UnKpMT2 PKdtLvbk1NlTKntqhZXC2x1/xOC2svc8MH4rRhygNe99cj/4GkbsCz2oYBZdGo2xu55K96 yZ5AByRT0o8mNXH+y238HQ4Sz5oK5JK9ahrk+0mYwLGXslQBQbKyIj/HLq9+TQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id e3e3baff (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70923@debbugs.gnu.org>; Wed, 4 Sep 2024 20:33:52 +0000 (UTC) Date: Wed, 4 Sep 2024 22:33:06 +0200 Message-ID: <20240904203309.23715-12-herman@rimm.ee> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240904203309.23715-1-herman@rimm.ee> References: <20240904203309.23715-1-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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 676613E36B X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -6.98 X-Spam-Score: -6.98 X-TUID: M9opPuP4OIyJ * guix/import/hexpm.scm (maybe-inputs): Delete procedure. (dependencies->package-names): Adjust description and return strings. (make-hexpm-sexp): Use maybe-inputs procedure. 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..aa857facbc 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