From: Martin Becze <mjbecze@riseup.net>
To: 37525@debbugs.gnu.org
Cc: Martin Becze <mjbecze@riseup.net>
Subject: [bug#37525] [PATCH v2 1/3] added recusive import functionality to the crate importer
Date: Tue, 1 Oct 2019 16:54:56 -0400 [thread overview]
Message-ID: <20191001205458.20926-1-mjbecze@riseup.net> (raw)
In-Reply-To: <20190926182812.10566-1-mjbecze@riseup.net>
* /guix/import/crate.scm (crate-recursive-import crate-name): added recusive import proc
* /guix/import/crate.scm (crate->guix-package): return inputs for use by the recurive importer
---
guix/import/crate.scm | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index fd1974eae8..8dc014d232 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -40,6 +40,7 @@
#:use-module (srfi srfi-26)
#:export (crate->guix-package
guix-package->crate-name
+ crate-recursive-import
%crate-updater))
\f
@@ -218,16 +219,24 @@ latest version of CRATE-NAME."
(cargo-development-inputs
(sort (map crate-dependency-id dev-dep-crates)
string-ci<?)))
- (make-crate-sexp #:name crate-name
- #:version (crate-version-number version*)
- #:cargo-inputs cargo-inputs
- #:cargo-development-inputs cargo-development-inputs
- #:home-page (or (crate-home-page crate)
- (crate-repository crate))
- #:synopsis (crate-description crate)
- #:description (crate-description crate)
- #:license (and=> (crate-version-license version*)
- string->license)))))
+ (values
+ (make-crate-sexp #:name crate-name
+ #:version (crate-version-number version*)
+ #:cargo-inputs cargo-inputs
+ #:cargo-development-inputs cargo-development-inputs
+ #:home-page (or (crate-home-page crate)
+ (crate-repository crate))
+ #:synopsis (crate-description crate)
+ #:description (crate-description crate)
+ #:license (and=> (crate-version-license version*)
+ string->license))
+ (append cargo-inputs cargo-development-inputs)))))
+
+(define (crate-recursive-import crate-name)
+ (recursive-import crate-name #f
+ #:repo->guix-package (lambda (name repo)
+ (crate->guix-package name))
+ #:guix-name crate-name->package-name))
(define (guix-package->crate-name package)
"Return the crate name of PACKAGE."
--
2.23.0
next prev parent reply other threads:[~2019-10-01 20:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-26 18:28 [bug#37525] [PATCH 0/3] Recursive option for crate importer Martin Becze
2019-09-26 18:31 ` [bug#37525] [PATCH 1/3] added recusive import functionality to the " Martin Becze
2019-09-26 18:31 ` [bug#37525] [PATCH 2/3] updated the crate import script to accept recursive option Martin Becze
2019-09-26 18:31 ` [bug#37525] [PATCH 3/3] updated docs for import crate Martin Becze
2019-10-01 20:17 ` [bug#37525] previous patch had mistake in docs Martin Becze
2019-10-01 20:54 ` Martin Becze [this message]
2019-10-01 20:54 ` [bug#37525] [PATCH v2 2/3] updated the crate import script to accept recursive option Martin Becze
2019-10-01 20:54 ` [bug#37525] [PATCH v2 3/3] updated docs for import crate Martin Becze
2019-10-01 21:33 ` bug#37525: [PATCH v2 1/3] added recusive import functionality to the crate importer Ludovic Courtès
2019-10-01 21:52 ` [bug#37525] " Martin Becze
2019-10-02 14:28 ` Ludovic Courtès
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191001205458.20926-1-mjbecze@riseup.net \
--to=mjbecze@riseup.net \
--cc=37525@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).