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 +AarI7HE2GZOoQAAe85BDQ:P1 (envelope-from ) for ; Wed, 04 Sep 2024 20:36:01 +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 +AarI7HE2GZOoQAAe85BDQ (envelope-from ) for ; Wed, 04 Sep 2024 22:36:01 +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=OV0fY0FY; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=qYJOtUdn; 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=1725482161; 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=7jhRtdAZBpb6qUAb5To9EPJseUKAuNIn6Gin9X6tnFg=; b=FrIP767v/jHWPv1VB7mzVjb82Oq+mjuEdpkB/IuEodmX40gm4MC2HFquz+6aLi2kZrQzT0 36g5rBpp6oVi+cg5FFhzb2DMLlwUpxsH8gioDm38FlVqfQH8dl4PVSJtnXbjbgoOyX+gtT f7b+ZUSXyGDScYziC67HkQfKIz/fLby3R5MPZgLbfBbFajGX4DhnRAjaiOC4+8WnP5n2Wb ZqKzxsANmzoJN3iUDGdjqqPGgbuh0NF6tKi08/zhO7Pqrf5DpKwOx9Hz0rOfNMaQhkT6qa 5d89umUNoFZvj5FEwQ6Oz+g/ar1NXyoHr65aI6zwWaChQL6ZBUr03565hNGmaA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725482161; a=rsa-sha256; cv=none; b=cf85V4439L6l7OmQT+as7bStDaV4gm3gcnTBXH8cm0sOBb5h9TsD+reOnUK0CMWZ0SQwFC x2GEp7FyRhT4Fe9eCjbeKIMjobo/ufuXjVWYEsBqxGQaz+QVZ05if1QV7KGNUdwHfXmlCT MmrYRkQs26Pq4GsL8YhH+JxBNwGvWZ0mowCzPJoqDEsF4vAB/RsgHRqpysFpqImRHByG/h s70cFJc39RuuWU7ca9GN9TLsjUiX2IHH9d8eJaPiZ4egvs4WT1HVdmk5wATawHKFF8yJYJ u2LMEHINve59OXn6Bthy9faEkXBu6nFKDh39F5oRknyn4JcmalvTPzNBfqUM9Q== 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=OV0fY0FY; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=qYJOtUdn; 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" 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 5CE39735D7 for ; Wed, 4 Sep 2024 22:36:00 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slwiq-0003GK-9O; 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-00038a-J0 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 1slwiU-0002Ff-3I for guix-patches@gnu.org; Wed, 04 Sep 2024 16:35:02 -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=7jhRtdAZBpb6qUAb5To9EPJseUKAuNIn6Gin9X6tnFg=; b=OV0fY0FY+bK1Pf97mf+Nvo5hRDpTNveXWHFzijcx+RmuIvFjez4JO1e4mpRRE7W8YEriWmoIx3OsHq1ImlaEPtXU844g1QU8ur9KJWJxpRlImDHLLLgMfOdVq0TzZqO2SIZfVFb2keIoPrZhBxtpXDetuiNcEYdiUamibX+LRqqscopmw6vuiWV1GH13kCN1/DMbCTjkyi5lgBdOx1oKFK1OMvrUJy7PO/J0OTJ3dSyQntQMwn/NE5UMZeuniMVaYog0MODCvUB6X8TJxW9GWpgdi186PEsz6kQTB2rYNP/fR1nZFeyX5SFGPo1r/Bq0OptGvRjip790Oufyw3zc7A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1slwjW-0005Md-3R for guix-patches@gnu.org; Wed, 04 Sep 2024 16:36:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70923] [PATCH v2 10/12] import: cpan: Use maybe-upstream-inputs. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 04 Sep 2024 20:36: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.172548211620452 (code B ref 70923); Wed, 04 Sep 2024 20:36:06 +0000 Received: (at 70923) by debbugs.gnu.org; 4 Sep 2024 20:35:16 +0000 Received: from localhost ([127.0.0.1]:35475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slwih-0005Ji-ED for submit@debbugs.gnu.org; Wed, 04 Sep 2024 16:35:15 -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 1slwic-0005Gz-J2 for 70923@debbugs.gnu.org; Wed, 04 Sep 2024 16:35:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1725482031; 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=7jhRtdAZBpb6qUAb5To9EPJseUKAuNIn6Gin9X6tnFg=; b=qYJOtUdnYDMt+8spgYgO4hu96BpuAnWVlQWleGZcdYLcliY+5N55Xu+C6QCfCWd+3vRXjh 887BaLyX0lzg3nQxXJM0tZHa+bco8ZK7Wld3OCRDUmE6W+IEqEmeIxJqQhXawIlrzeg2uh BOM0PmF0kJ9D+g9b7AAPkoPq87sPGBJLvrLgjhjbD3CUJXPoaoetkTdVAfwtMfS8oGZL9i f96a4NAeTIjuea0r6ST8Wv9hpiCcKNQYlSYsCg8hYqlWY6qd16tzLTRpqi9MZT5//6YvNH HVNjAoASff2x0T8oRNgRJjXEhMtPrA7YvfMjgJj+emVN1152IuMgn0gnwEEbJQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 4b7181a1 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70923@debbugs.gnu.org>; Wed, 4 Sep 2024 20:33:51 +0000 (UTC) Date: Wed, 4 Sep 2024 22:33:04 +0200 Message-ID: <20240904203309.23715-10-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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 5CE39735D7 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.98 X-Spam-Score: -6.98 X-TUID: kOBVchXA4+nN * guix/import/cpan.scm (maybe-inputs): Delete procedure. (cpan-module->sexp): Use maybe-upstream-inputs procedure. Change-Id: I4fa99da62d81f02c2998ad96f5ea81e27df071cd --- guix/import/cpan.scm | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm index b87736eef6..611ea63eba 100644 --- a/guix/import/cpan.scm +++ b/guix/import/cpan.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2020, 2021, 2023 Ludovic Courtès ;;; Copyright © 2022 Hartmut Goebel +;;; Copyright © 2024 Herman Rimm ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,7 +38,8 @@ (define-module (guix import cpan) #:use-module (guix utils) #:use-module (guix base32) #:use-module ((guix download) #:select (download-to-store url-fetch)) - #:use-module ((guix import utils) #:select (factorize-uri)) + #:use-module ((guix import utils) #:select (factorize-uri + maybe-upstream-inputs)) #:use-module (guix import json) #:use-module (guix packages) #:use-module (guix upstream) @@ -275,15 +277,6 @@ (define name (define version (cpan-release-version release)) (define source-url (cpan-source-url release)) - (define (maybe-inputs input-type inputs) - (match inputs - (() - '()) - ((inputs ...) - `((,input-type (list ,@(map (compose string->symbol - upstream-input-downstream-name) - inputs))))))) - (let ((tarball (with-store store (download-to-store store source-url))) (inputs (cpan-module-inputs release))) @@ -297,12 +290,10 @@ (define (maybe-inputs input-type inputs) (base32 ,(bytevector->nix-base32-string (file-sha256 tarball)))))) (build-system perl-build-system) - ,@(maybe-inputs 'native-inputs - (filter (upstream-input-type-predicate 'native) - inputs)) - ,@(maybe-inputs 'propagated-inputs - (filter (upstream-input-type-predicate 'propagated) - inputs)) + ,@(maybe-upstream-inputs 'native-inputs + (filter (upstream-input-type-predicate 'native) inputs)) + ,@(maybe-upstream-inputs 'propagated-inputs + (filter (upstream-input-type-predicate 'propagated) inputs)) (home-page ,(cpan-home name)) (synopsis ,(cpan-release-abstract release)) (description fill-in-yourself!) -- 2.45.2