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 AD+FMZJzQmZ1BwEAe85BDQ:P1 (envelope-from ) for ; Mon, 13 May 2024 22:09:55 +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 AD+FMZJzQmZ1BwEAe85BDQ (envelope-from ) for ; Mon, 13 May 2024 22:09:54 +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=lQHIe26C; 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=1715630994; 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=Y20UxH4guLHcJDBhGNKEctif8qP5qD6WUna8b2wwO/o=; b=O27VRHLtCPNfIc7x/JQqsSFq4zDzXD8i/mPE6Ctd1Dlv72Vt2tMWM+wi1/CIaqvcf2Hrwr dM7MTxMYHrzS9uzUXX8HiLuCcEX9y7slV2B8B0ysv/Eck/JUTj1xkI+/QO97f/Bm8JFXLc 1aOOXiv8tJrsol8g7/GZ6Fog+W6qEf/6Oibnw5t9SaTPfqQpOp8SOfHRoLM6WY8/dfrxV6 ENQfde3KBp0+RpwT0kDQTWQJ06ojuK1n6kJ8hJBlzX4GRb/LARgsvgEq39jahOhZbnvnpK RG6A/3CU4n9PFhQAWjT36dGk3p7ijZjlXw4kHcovv5rd9xojBVkJShoQw6Oncg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=lQHIe26C; 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=1715630994; a=rsa-sha256; cv=none; b=AjhhAcEA4/LerPuF1whETA8H9IH3512S85JJuQBoCZVCrtlFcLoZf4KGa4ifDwcaYlU03K 9s83xZX4qwHCH8oOvkpnrUBKueJhTP1GLkSyOAlVVBj4/H99O2Rb+I+kAdeTRP/nDqQ+qY D2fq1zaNSemQV3gaIb6EgZYIMht7tas++MQ+h2jyWN5gU1s9WyGk9CcQEhhOXQMD6yxXi4 lU/Ts+g1w4vMJp1v/AhoDTF1jl/fqvViLtG64H8typaABM4LnCK9QhAMP/KKWM1vhSQ3Xt VaggruvZYIynrCn4DDIttBDQd1/WxZt/YVI7JF+MW4w+HTanXiYMHE/fQeJ+vQ== 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 A82C86E101 for ; Mon, 13 May 2024 22:09:54 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6byy-0004JC-SU; Mon, 13 May 2024 16:09:12 -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 1s6bys-0004Db-Fg 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 1s6bys-0007oI-77 for guix-patches@gnu.org; Mon, 13 May 2024 16:09:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s6bys-0000Iv-Qk for guix-patches@gnu.org; Mon, 13 May 2024 16:09:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70923] [PATCH 12/13] import: egg: Use maybe-*inputs procedures. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 May 2024 20:09:06 +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.17156309311076 (code B ref 70923); Mon, 13 May 2024 20:09:06 +0000 Received: (at 70923) by debbugs.gnu.org; 13 May 2024 20:08:51 +0000 Received: from localhost ([127.0.0.1]:34612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6byd-0000HG-6s for submit@debbugs.gnu.org; Mon, 13 May 2024 16:08:51 -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-2x for 70923@debbugs.gnu.org; Mon, 13 May 2024 16:08:43 -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=Y20UxH4guLHcJDBhGNKEctif8qP5qD6WUna8b2wwO/o=; b=lQHIe26C2KaPsK/7EGpShc+Sq8PqpfjVVBl35qkDPY4OJ27gIt0jujy52DYBXc+RpiO40d RqThnVV3wyZG+nWZeUadvKHRAXtSm277FgNRAOtEGh+bJTd5Cd+MrOWcO+95j0OJ+iCh53 50FP3eMaw5HP28IgcDvEybnxxgJ+DKfLHj2V0qfZoo7XeRkE5ae+uPJnt6L6ttmh3wsT+m FE/v3qhWsUgPwQmx90vHCM35uJCFiqBWkcsPkPM6SLSEJFlX2MCe7HzR/SFbhkd5FmQQuw 9Kl8HeydK4FW44JY527Va+5fpwu1ba9z7JVBgsCiX7sPi98q0usSO6UCLMrezw== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 66963c72 (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:09 +0200 Message-ID: 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: A82C86E101 X-Migadu-Scanner: mx13.migadu.com X-TUID: ZtGtBcd05pwg * guix/import/egg.scm (maybe-inputs): Delete procedure. (egg-parse-dependency): Simplify procedure to return strings. (egg->guix-package): Use maybe-*inputs procedures. Change-Id: Ib0a3f5b6f02912c847defd02ba7675d80005279b --- guix/import/egg.scm | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/guix/import/egg.scm b/guix/import/egg.scm index e3bc158475..60e1eef156 100644 --- a/guix/import/egg.scm +++ b/guix/import/egg.scm @@ -229,23 +229,14 @@ (define* (egg->guix-package name version #:key (file #f) (source #f) (else char))) (maybe-symbol->string name))) - (define* (egg-parse-dependency name #:key (system? #f)) - (define extract-name - (match-lambda - ((name version) name) - (name name))) - - (define (prettify-name name) + (define* (egg-parse-dependency dependency #:key (system? #f)) + (let ((name (match dependency + ((name version) name) + (name name)))) (if system? (prettify-system-dependency name) - (maybe-symbol->string name))) - - (let ((name (prettify-name (extract-name name)))) - ;; Dependencies are sometimes specified as symbols and sometimes - ;; as strings - (string->symbol (string-append - (if system? "" package-name-prefix) - name)))) + (string-append package-name-prefix + (maybe-symbol->string name))))) (define egg-propagated-inputs (let ((dependencies (assoc-ref egg-content 'dependencies))) @@ -277,15 +268,6 @@ (define* (egg->guix-package name version #:key (file #f) (source #f) test+build-dependencies)) (() '())))) - ;; Copied from (guix import hackage). - (define (maybe-inputs input-type inputs) - (match inputs - (() - '()) - ((inputs ...) - (list (list input-type - `(list ,@inputs)))))) - (values `(package (name ,(egg-name->guix-name name)) @@ -303,16 +285,16 @@ (define* (egg->guix-package name version #:key (file #f) (source #f) "failed to download tar archive")))))) (build-system chicken-build-system) (arguments ,(list 'quasiquote (list #:egg-name name))) - ,@(maybe-inputs 'native-inputs egg-native-inputs) - ,@(maybe-inputs 'inputs egg-inputs) - ,@(maybe-inputs 'propagated-inputs egg-propagated-inputs) + ,@(maybe-native-inputs egg-native-inputs) + ,@(maybe-inputs egg-inputs) + ,@(maybe-propagated-inputs egg-propagated-inputs) (home-page ,egg-home-page) (synopsis ,egg-synopsis) (description #f) (license ,egg-licenses)) (filter (lambda (name) (not (member name '("srfi-4")))) - (map (compose guix-name->egg-name symbol->string) + (map guix-name->egg-name (append egg-propagated-inputs egg-native-inputs))))))) -- 2.41.0