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 yCLdKJtzQmb+TgAAe85BDQ:P1 (envelope-from ) for ; Mon, 13 May 2024 22:10:03 +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 yCLdKJtzQmb+TgAAe85BDQ (envelope-from ) for ; Mon, 13 May 2024 22:10:03 +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=dTUWCo2w; 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=1715631003; 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=fb1CJEEtcRxSwB70WqNuwiVWepplRUzyPYeWO8oYJFg=; b=ZYVjgHbLhKLV8VH/lAEEme46UWfQmus44kaA+Ihm4/DgTlqaXaPd2JjZ1o9httkK1L3g+i x8Ur/zevRV2ebEdXTTUpRYlVBDeKJGqPvOnVSR8NLDsG/xfXtksG1Km4Q1ZfXyxuSqb5sJ oZntBYlnX+EE2qsM4W0zJupICisAIGootHJ732IVa8rVdNPQTiNQoAnYkZr89dxwlWQl6H EZdxcfS4/5de1UGotVxQDk/lZ+YZ/GaR44fsSQ4eebMdx0DRPzddQ1kJ3Gn7ldgTF1VXhm bUvAsxjnOfbYE58cj7pfPs7XRXqcck353V8jFmHUvxNs2e+1VIhi1sH+PISoaQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=dTUWCo2w; 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=1715631003; a=rsa-sha256; cv=none; b=m8pi2ewHpOnxeT0hRkksB+as7ozOpy17HuLFMyr+AHkLMqz1x32AvSgSxV0kjkRCA31h/U /E9x09QZrBpAKAlISVAI3GOeeUNaWx2Iqhur3vhkx4dvYKPN/b06hbZamZ+ebK9ePwI5id gtfd/4wSU/+XISFQcQe8BYc74yfZdoN/eXCsZkdJVa7qwxcpjYQ1sxAMD1d1T442x+eeFF Teztm+zsPyGFUbwr/R/9etq4gUlfn1fxCPUM/8emJiLauwn2F1m7QyZWCN0nLxXSmwOCrt sCmi4i0/kRDh3NlVXgCbCFVRR48B31ORBwGSQOhdUX46jVly8kDvvQaCOea76Q== 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 90E2E6DE44 for ; Mon, 13 May 2024 22:10:03 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6bz1-0004Jv-8J; Mon, 13 May 2024 16:09:15 -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 1s6byr-0004DZ-TW 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 1s6byp-0007ng-Mo for guix-patches@gnu.org; Mon, 13 May 2024 16:09:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s6byq-0000II-9V for guix-patches@gnu.org; Mon, 13 May 2024 16:09:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70923] [PATCH 06/13] import: utils: Add 'maybe-upstream-inputs' procedure. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 May 2024 20:09:04 +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.17156309281034 (code B ref 70923); Mon, 13 May 2024 20:09:04 +0000 Received: (at 70923) by debbugs.gnu.org; 13 May 2024 20:08:48 +0000 Received: from localhost ([127.0.0.1]:34600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6bya-0000Gb-DG for submit@debbugs.gnu.org; Mon, 13 May 2024 16:08:48 -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 1s6byR-0000El-OK for 70923@debbugs.gnu.org; Mon, 13 May 2024 16:08:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1715630908; 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=fb1CJEEtcRxSwB70WqNuwiVWepplRUzyPYeWO8oYJFg=; b=dTUWCo2wMXbwP/QyPxjiovDGN91n/Dggnix1bSPmBHu6LevfLgCqk9SamCvJ9vwHb4GuM0 KJWQLjEzY9l+1AV2Ob0S6NbQqft840PRyszoTqMoRRl3mczH2iZUA+0CfIadkTFxZOD+6S ZDCbgixLT65DOvNCiw5fN7dqgBJQ6UIcQHjHobV/ZKADIsr8VGjFRqHaJmpvBpdqLz9okR QmJqpTxbpMbvAG4/7725F/pUXxUQfqptSV0MMMUWChG+YQpuRgnQ7opbjBmxcmxRtliGae PaRIapMHuM2SFsp2D1t8LjfvMDoTZDW4ksr39N6EYU9rz+KvpJFs6cmoniqi5w== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 334a0344 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70923@debbugs.gnu.org>; Mon, 13 May 2024 20:08:28 +0000 (UTC) Date: Mon, 13 May 2024 22:08:03 +0200 Message-ID: <162a6f222e11f72a5eaa8246c4f03c494f0440ca.1715627497.git.herman@rimm.ee> 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: 90E2E6DE44 X-Migadu-Scanner: mx13.migadu.com X-TUID: T7dAIIq2RcsG * guix/import/utils.scm (maybe-upstream-inputs): Add procedure. Change-Id: Ib8a80216d512c0373e55e4f27e1ef2a7c1fb854a --- guix/import/utils.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index 1bbab916c4..98080dd0a0 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -45,6 +45,7 @@ (define-module (guix import utils) #:use-module (guix download) #:use-module (guix sets) #:use-module ((guix ui) #:select (fill-paragraph)) + #:use-module (guix upstream) #:use-module (gnu packages) #:autoload (ice-9 control) (let/ec) #:use-module (ice-9 match) @@ -71,6 +72,7 @@ (define-module (guix import utils) maybe-inputs maybe-native-inputs maybe-propagated-inputs + maybe-upstream-inputs package->definition spdx-string->license @@ -453,6 +455,13 @@ (define* (maybe-propagated-inputs package-names #:optional (output #f)) "MAYBE-PACKAGES-FIELD for propagated inputs." (maybe-packages-field 'propagated-inputs package-names output)) +(define* (maybe-upstream-inputs type upstream-inputs) + "Given a list of UPSTREAM-NAMES, tries to generate the TYPE field of a +package definition." + (maybe-list-field type + (map (compose string->symbol upstream-input-downstream-name) + upstream-inputs))) + (define* (package->definition guix-package #:optional append-version?/string) "If APPEND-VERSION?/STRING is #t, append the package's major+minor version. If it is the symbol 'full, append the package's complete version. If -- 2.41.0