[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70923] [PATCH v2 05/12] import: utils: Add maybe-upstream-inputs.
From: |
Herman Rimm |
Subject: |
[bug#70923] [PATCH v2 05/12] import: utils: Add maybe-upstream-inputs. |
Date: |
Wed, 4 Sep 2024 22:32:59 +0200 |
* 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 75bef1e9c7..152ae07a92 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
@@ -460,6 +462,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
- [bug#70923] [PATCH v2 01/12] build-system: cargo: Accept unlabeled #:cargo-inputs., Herman Rimm, 2024/09/04
- [bug#70923] [PATCH v2 02/12] import: utils: Emit new-style inputs from maybe-*inputs procedures., Herman Rimm, 2024/09/04
- [bug#70923] [PATCH v2 04/12] import: crate: Use (guix import utils) procedures., Herman Rimm, 2024/09/04
- [bug#70923] [PATCH v2 06/12] import: pypi: Use maybe-upstream-inputs., Herman Rimm, 2024/09/04
- [bug#70923] [PATCH v2 11/12] import: egg: Use maybe-*inputs procedures., Herman Rimm, 2024/09/04
- [bug#70923] [PATCH v2 03/12] tests: elm: Adjust to new-style package inputs., Herman Rimm, 2024/09/04
- [bug#70923] [PATCH v2 08/12] import: hackage: Use maybe-list-field., Herman Rimm, 2024/09/04
- [bug#70923] [PATCH v2 05/12] import: utils: Add maybe-upstream-inputs.,
Herman Rimm <=
- [bug#70923] [PATCH v2 09/12] import: cran: Refactor format-inputs and use maybe-list-field., Herman Rimm, 2024/09/04
- [bug#70923] [PATCH v2 12/12] import: hexpm: Use maybe-inputs., Herman Rimm, 2024/09/04
- [bug#70923] [PATCH v2 07/12] import: elpa: Use maybe-propagated-inputse., Herman Rimm, 2024/09/04
- [bug#70923] [PATCH v2 10/12] import: cpan: Use maybe-upstream-inputs., Herman Rimm, 2024/09/04