From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id kKhKGHFMV2cS8wAAqHPOHw:P1 (envelope-from ) for ; Mon, 09 Dec 2024 20:00:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id kKhKGHFMV2cS8wAAqHPOHw (envelope-from ) for ; Mon, 09 Dec 2024 21:00:49 +0100 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=Gg0CBukP; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=IYkZNK00; 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=1733774449; 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=MygAlkEdwJyZ9EbltGmd2aEWfafC4P0ynchUAA1T3Mk=; b=S2N6IqiHDZe2oWipDUyGU3/Q6juLnVzrhdLAzMM6iopH8OK8eSNLAJnXe3ZqoCMjN65wuF qjXcHyPL7zcwZvxJkJ1ymzYs455cEfAmsjD6UCZU7ZswbIIgrbDomtJNzOkxFbu3d4Q2TP vkPTQe55WH2W2KV27sWCPS0EllH3MyE66KRtke7SoTsvaIBqUM0Xp4o23dHvPXENdCx08T 1tM1RYgL9VOwYyblHfj4Hl/Cn2PTbexP1wU5fAbqbI4y/TKq+GF+9vCJAf4f52KvTihvhU gms1eGysr+pHOjzCpicFasDWnN9yZtv69TUKuIOILyMlQazgPD+2LGBY/0rgWQ== 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=Gg0CBukP; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=IYkZNK00; 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=1733774449; a=rsa-sha256; cv=none; b=M/Y8qSaSm6CJUHmstvNehX/4UUxhdcYZfhiGSXzCKVXdZ6CSsm5FcmU+hLzeh7mRSovGaq iLyNtv51G6xrzS34lLWOCP2SSThNfzkjYMfLMn7plzYc5deO/V8UC5roscDM+NlvoSJkP/ +alnZjxlizyl2BOWGoMUXqWNyNw9R2LiNZFbThiQfsjHQglvInXzLGXHxMu4oQxdXbCcF6 bwTQREeKHSjkQmq5GutoUQ4Y3B7MLDG7nfBeKYUUNNryP27PgeblQ3fUej0n+twMlW3emi BBbeOHKHjMfjZpU/lur36YstKFCmtiYFtDwanVp6pYjBSSYPdeNir5jKusDfzw== 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 1C03D7966D for ; Mon, 09 Dec 2024 21:00:49 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKjvN-0005BE-5O; Mon, 09 Dec 2024 15:00:09 -0500 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 1tKjvJ-0005A1-Nv for guix-patches@gnu.org; Mon, 09 Dec 2024 15:00:05 -0500 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 1tKjvJ-0007Y3-ED for guix-patches@gnu.org; Mon, 09 Dec 2024 15:00:05 -0500 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=MygAlkEdwJyZ9EbltGmd2aEWfafC4P0ynchUAA1T3Mk=; b=Gg0CBukPKhxDxKdaDGsS0yPRKsrcxNJRzhBI/gcInje/FB/f/78uQjiM8peWN9lyOJH3IXxyq751i9aNpuI0hxPjAHuugRh29GB+Lfg6KoJs36lVc3pxgY3eAOyNB1H40F0cmOZ4zeRiGfIPo98e/xFpzXGKZm9p0qbtL3wPKWb9BfZcfyzI1VwTRK8qyGK6uc/NS9R0/1QWtcsv6PCYHUULsZs4Up4pgsKmMiyDi3sIO3HMA7e9mLlnZQ4fzzB1tFltz7NKZF8QR85AZuXndj0t15q5WQWQQhWu3sjjhpXXIJCx3E1HO1x/VOTKpYfehhXL7Yu7eOPPyswqi1TWlA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tKjvJ-0002DC-3Y for guix-patches@gnu.org; Mon, 09 Dec 2024 15:00:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#70923] [PATCH v4 04/11] import: utils: Add 'maybe-upstream-inputs' procedure. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Dec 2024 20:00: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.17337743718261 (code B ref 70923); Mon, 09 Dec 2024 20:00:04 +0000 Received: (at 70923) by debbugs.gnu.org; 9 Dec 2024 19:59:31 +0000 Received: from localhost ([127.0.0.1]:55739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKjul-000299-9t for submit@debbugs.gnu.org; Mon, 09 Dec 2024 14:59:31 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:59135 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKjud-00027N-Gd for 70923@debbugs.gnu.org; Mon, 09 Dec 2024 14:59:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1733774352; 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=MygAlkEdwJyZ9EbltGmd2aEWfafC4P0ynchUAA1T3Mk=; b=IYkZNK00uwtv8FypxTC6PrIctp6qz3hOnxG6zLgUsGrFDqPeny3pF5VOrgtqFWzl76QUIF U0bgNh9RQ+yCybini18/apBHJ9kuzzfKCzYZKQzkyjZG7SuNmRPxhI9lTLq6md5/Ax81AB rpBw0m7I2SwXDDoGeRk3MLyJa7XkB9NxCOrykyuM81wD5PNOWX893BSwMszWdpu4f5UtCY ooV6/YNyxt+hoQ26Uao5wjSVQ/+d9c89G69AmMb5gCeZciaKmS80TkxC56v57BmrtBWCxP qAhBdOdDK7CBPJlPZVXibGe1/B8zqb1HSZ9ER2yowhLvGwiBBDfmUvOXnOIxSg== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id e1e57fbe (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70923@debbugs.gnu.org>; Mon, 9 Dec 2024 19:59:12 +0000 (UTC) Date: Mon, 9 Dec 2024 20:58:08 +0100 Message-ID: <7fd481409247d1124171d1f8a5a549f6e4d92f46.1733774143.git.herman@rimm.ee> X-Mailer: git-send-email 2.45.2 In-Reply-To: <4b8cde409e17e4b9ab7ef591eff605b88235fb0a.1733774143.git.herman@rimm.ee> References: <4b8cde409e17e4b9ab7ef591eff605b88235fb0a.1733774143.git.herman@rimm.ee> 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -2.16 X-Spam-Score: -2.16 X-Migadu-Queue-Id: 1C03D7966D X-TUID: TfNyG4d1Oakp * 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 4eab790645..9544fbf00f 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 @@ -467,6 +469,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.45.2