From: Herman Rimm via Guix-patches via <guix-patches@gnu.org>
To: 70923@debbugs.gnu.org
Subject: [bug#70923] [PATCH v3 09/11] import: cpan: Use 'maybe-upstream-inputs' procedure.
Date: Tue, 24 Sep 2024 22:13:15 +0200 [thread overview]
Message-ID: <bce53aae8d24b2df015c481a4fb6ab76d70f68b4.1727207512.git.herman@rimm.ee> (raw)
In-Reply-To: <cover.1727207512.git.herman@rimm.ee>
* 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 <me@tobias.gr>
;;; Copyright © 2020, 2021, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
;;;
;;; 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 (cpan-module->sexp release)
(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 (cpan-module->sexp release)
(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
next prev parent reply other threads:[~2024-09-24 20:22 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 19:59 [bug#70923] [PATCH 00/13] Add (guix import utils) procedures Herman Rimm via Guix-patches via
2024-05-13 20:07 ` [bug#70923] [PATCH 01/13] build-system: cargo: Accept unlabeled #:cargo-inputs Herman Rimm via Guix-patches via
2024-05-13 20:07 ` [bug#70923] [PATCH 02/13] import: utils: Emit new-style package inputs Herman Rimm via Guix-patches via
2024-05-13 20:08 ` [bug#70923] [PATCH 03/13] tests: go: Adjust to " Herman Rimm via Guix-patches via
2024-05-13 20:08 ` [bug#70923] [PATCH 04/13] tests: elm: " Herman Rimm via Guix-patches via
2024-05-13 20:08 ` [bug#70923] [PATCH 05/13] import: crate: Emit " Herman Rimm via Guix-patches via
2024-05-13 20:08 ` [bug#70923] [PATCH 06/13] import: utils: Add 'maybe-upstream-inputs' procedure Herman Rimm via Guix-patches via
2024-05-13 20:08 ` [bug#70923] [PATCH 07/13] import: pypi: Use 'maybe-list-field' procedure Herman Rimm via Guix-patches via
2024-05-13 20:08 ` [bug#70923] [PATCH 08/13] import: elpa: Use maybe-propagated-inputs procedure Herman Rimm via Guix-patches via
2024-05-13 20:08 ` [bug#70923] [PATCH 09/13] import: hackage: Use 'maybe-list-field' procedure Herman Rimm via Guix-patches via
2024-05-13 20:08 ` [bug#70923] [PATCH 10/13] import: cran: " Herman Rimm via Guix-patches via
2024-05-13 20:08 ` [bug#70923] [PATCH 11/13] import: cpan: Use 'maybe-upstream-inputs' procedure Herman Rimm via Guix-patches via
2024-05-13 20:08 ` [bug#70923] [PATCH 12/13] import: egg: Use maybe-*inputs procedures Herman Rimm via Guix-patches via
2024-05-13 20:08 ` [bug#70923] [PATCH 13/13] import: hexpm: Use (guix import utils) 'maybe-inputs' procedure Herman Rimm via Guix-patches via
2024-09-04 20:32 ` [bug#70923] [PATCH v2 01/12] build-system: cargo: Accept unlabeled #:cargo-inputs Herman Rimm via Guix-patches via
2024-09-04 20:32 ` [bug#70923] [PATCH v2 02/12] import: utils: Emit new-style inputs from maybe-*inputs procedures Herman Rimm via Guix-patches via
2024-09-04 20:32 ` [bug#70923] [PATCH v2 03/12] tests: elm: Adjust to new-style package inputs Herman Rimm via Guix-patches via
2024-09-04 20:32 ` [bug#70923] [PATCH v2 04/12] import: crate: Use (guix import utils) procedures Herman Rimm via Guix-patches via
2024-09-04 20:32 ` [bug#70923] [PATCH v2 05/12] import: utils: Add maybe-upstream-inputs Herman Rimm via Guix-patches via
2024-09-04 20:33 ` [bug#70923] [PATCH v2 06/12] import: pypi: Use maybe-upstream-inputs Herman Rimm via Guix-patches via
2024-09-04 20:33 ` [bug#70923] [PATCH v2 07/12] import: elpa: Use maybe-propagated-inputse Herman Rimm via Guix-patches via
2024-09-04 20:33 ` [bug#70923] [PATCH v2 08/12] import: hackage: Use maybe-list-field Herman Rimm via Guix-patches via
2024-09-04 20:33 ` [bug#70923] [PATCH v2 09/12] import: cran: Refactor format-inputs and use maybe-list-field Herman Rimm via Guix-patches via
2024-09-04 20:33 ` [bug#70923] [PATCH v2 10/12] import: cpan: Use maybe-upstream-inputs Herman Rimm via Guix-patches via
2024-09-04 20:33 ` [bug#70923] [PATCH v2 11/12] import: egg: Use maybe-*inputs procedures Herman Rimm via Guix-patches via
2024-09-04 20:33 ` [bug#70923] [PATCH v2 12/12] import: hexpm: Use maybe-inputs Herman Rimm via Guix-patches via
2024-09-24 20:13 ` [bug#70923] [PATCH v3 00/11] Add (guix import utils) procedures Herman Rimm via Guix-patches via
2024-09-24 20:13 ` [bug#70923] [PATCH v3 01/11] build-system: cargo: Accept unlabeled #:cargo-inputs Herman Rimm via Guix-patches via
2024-09-24 20:13 ` [bug#70923] [PATCH v3 02/11] import: utils: Emit new-style package inputs Herman Rimm via Guix-patches via
2024-09-24 20:13 ` [bug#70923] [PATCH v3 03/11] import: crate: " Herman Rimm via Guix-patches via
2024-09-24 20:13 ` [bug#70923] [PATCH v3 04/11] import: utils: Add 'maybe-upstream-inputs' procedure Herman Rimm via Guix-patches via
2024-09-24 20:13 ` [bug#70923] [PATCH v3 05/11] import: pypi: Use 'maybe-list-field' procedure Herman Rimm via Guix-patches via
2024-09-24 20:13 ` [bug#70923] [PATCH v3 06/11] import: elpa: Use maybe-propagated-inputs procedure Herman Rimm via Guix-patches via
2024-09-24 20:13 ` [bug#70923] [PATCH v3 07/11] import: hackage: Use 'maybe-list-field' procedure Herman Rimm via Guix-patches via
2024-09-24 20:13 ` [bug#70923] [PATCH v3 08/11] import: cran: " Herman Rimm via Guix-patches via
2024-09-24 20:13 ` Herman Rimm via Guix-patches via [this message]
2024-09-24 20:13 ` [bug#70923] [PATCH v3 10/11] import: egg: Use maybe-*inputs procedures Herman Rimm via Guix-patches via
2024-09-24 20:13 ` [bug#70923] [PATCH v3 11/11] import: hexpm: Use (guix import utils) 'maybe-inputs' procedure Herman Rimm via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bce53aae8d24b2df015c481a4fb6ab76d70f68b4.1727207512.git.herman@rimm.ee \
--to=guix-patches@gnu.org \
--cc=70923@debbugs.gnu.org \
--cc=herman@rimm.ee \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.