[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70923] [PATCH 13/13] import: hexpm: Use (guix import utils) 'maybe-
From: |
Herman Rimm |
Subject: |
[bug#70923] [PATCH 13/13] import: hexpm: Use (guix import utils) 'maybe-inputs' procedure. |
Date: |
Mon, 13 May 2024 22:08:10 +0200 |
* guix/import/hexpm.scm (maybe-inputs): Delete procedure.
(dependencies->package-names): Return strings instead of symbols.
(make-hexpm-sexp): Use 'maybe-inputs' from (guix import utils).
Change-Id: Ie7a8a630a3a9d4859453d49fdee42aa560e27f17
---
guix/import/hexpm.scm | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/guix/import/hexpm.scm b/guix/import/hexpm.scm
index 71a54ba973..af7a96efb0 100644
--- a/guix/import/hexpm.scm
+++ b/guix/import/hexpm.scm
@@ -153,26 +153,14 @@ (define (lookup-hexpm-release version*)
;;; Converting hex.pm packages to Guix packages.
;;;
-(define (maybe-inputs package-inputs input-type)
- "Given a list of PACKAGE-INPUTS, tries to generate the 'inputs' field of a
-package definition. INPUT-TYPE, a symbol, is used to populate the name of
-the input field."
- (match package-inputs
- (()
- '())
- ((package-inputs ...)
- `((,input-type (list ,@package-inputs))))))
-
(define (dependencies->package-names names)
- "Given a list of hexpm package NAMES, returns a list of guix package names
-as symbols."
+ "Given a list of hexpm package NAMES, returns a list of guix package
+names."
;; TODO: Base name on language of dependency.
;; The language used for implementing the dependency is not know without
;; recursing the dependencies. So for now assume more packages are based on
;; Erlang and prefix all dependencies with "erlang-" (the default).
- (map string->symbol
- (map hexpm-name->package-name
- (sort names string-ci<?))))
+ (map hexpm-name->package-name (sort names string-ci<?)))
(define* (make-hexpm-sexp #:key name version tarball-url
home-page synopsis description license
@@ -194,7 +182,7 @@ (define* (make-hexpm-sexp #:key name version tarball-url
(uri (hexpm-uri ,name version))
(sha256 (base32 ,(guix-hash-url temp)))))
(build-system ,build-system)
- ,@(maybe-inputs (dependencies->package-names dependencies) 'inputs)
+ ,@(maybe-inputs (dependencies->package-names dependencies))
(synopsis ,synopsis)
(description ,(beautify-description description))
(home-page ,(match home-page
--
2.41.0
- [bug#70923] [PATCH 00/13] Add (guix import utils) procedures., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 01/13] build-system: cargo: Accept unlabeled #:cargo-inputs., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 02/13] import: utils: Emit new-style package inputs., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 04/13] tests: elm: Adjust to new-style package inputs., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 08/13] import: elpa: Use maybe-propagated-inputs procedure., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 11/13] import: cpan: Use 'maybe-upstream-inputs' procedure., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 05/13] import: crate: Emit new-style package inputs., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 13/13] import: hexpm: Use (guix import utils) 'maybe-inputs' procedure.,
Herman Rimm <=
- [bug#70923] [PATCH 03/13] tests: go: Adjust to new-style package inputs., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 10/13] import: cran: Use 'maybe-list-field' procedure., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 09/13] import: hackage: Use 'maybe-list-field' procedure., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 06/13] import: utils: Add 'maybe-upstream-inputs' procedure., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 12/13] import: egg: Use maybe-*inputs procedures., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 07/13] import: pypi: Use 'maybe-list-field' procedure., Herman Rimm, 2024/05/13