From: Eric Bavier <bavier@member.fsf.org>
To: guix-devel@gnu.org
Subject: [PATCH 4/4] import: cpan: Sort inputs, use mirror url, adjust licenses.
Date: Thu, 12 Feb 2015 09:58:15 -0600 [thread overview]
Message-ID: <1423756695-13378-5-git-send-email-bavier@member.fsf.org> (raw)
In-Reply-To: <1423756695-13378-1-git-send-email-bavier@member.fsf.org>
* guix/import/cpan.scm (string->license): Add artistic2.0. Use
'(package-license perl) for "perl_5" as in our convention.
(cpan-module->sexp)[convert-inputs]: Sort returned list of inputs.
[source-url]: Substitute cpan mirror url.
---
guix/import/cpan.scm | 35 +++++++++++++++++++++--------------
1 file changed, 21 insertions(+), 14 deletions(-)
diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index c1b0006..3dc6eda 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -49,7 +49,7 @@
;; apache_1_1
("apache_2_0" 'asl2.0)
;; artistic_1_0
- ;; artistic_2_0
+ ("artistic_2_0" 'artistic2.0)
("bsd" 'bsd-3)
("freebsd" 'bsd-2)
;; gfdl_1_2
@@ -63,7 +63,7 @@
;; mozilla_1_0
("mozilla_1_1" 'mpl1.1)
("openssl" 'openssl)
- ("perl_5" 'gpl1+) ;and Artistic 1
+ ("perl_5" '(package-license perl)) ;GPL1+ and Artistic 1
("qpl_1_0" 'qpl)
;; ssleay
;; sun
@@ -141,17 +141,22 @@ META."
(#f
'())
((inputs ...)
- (delete-duplicates
- ;; Listed dependencies may include core modules. Filter those out.
- (filter-map (match-lambda
- (("perl" . _) ;implicit dependency
- #f)
- ((module . _)
- (and (not (core-module? module))
- (let ((name (guix-name (module->dist-name module))))
- (list name
- (list 'unquote (string->symbol name)))))))
- inputs)))))
+ (sort
+ (delete-duplicates
+ ;; Listed dependencies may include core modules. Filter those out.
+ (filter-map (match-lambda
+ (("perl" . _) ;implicit dependency
+ #f)
+ ((module . _)
+ (and (not (core-module? module))
+ (let ((name (guix-name (module->dist-name module))))
+ (list name
+ (list 'unquote (string->symbol name)))))))
+ inputs))
+ (lambda args
+ (match args
+ (((a _ ...) (b _ ...))
+ (string<? a b))))))))
(define (maybe-inputs guix-name inputs)
(match inputs
@@ -162,7 +167,9 @@ META."
(list 'quasiquote inputs))))))
(define source-url
- (assoc-ref meta "download_url"))
+ (regexp-substitute/global #f "http://cpan.metacpan.org"
+ (assoc-ref meta "download_url")
+ 'pre "mirror://cpan" 'post))
(let ((tarball (with-store store
(download-to-store store source-url))))
--
1.7.9.5
next prev parent reply other threads:[~2015-02-12 15:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-12 15:58 [PATCH 0/4] Perl build system and importer Eric Bavier
2015-02-12 15:58 ` [PATCH 1/4] build-system/perl: Use Build.PL for builds if present Eric Bavier
2015-02-13 23:07 ` Ludovic Courtès
2015-02-12 15:58 ` [PATCH 2/4] guix: licenses: Add Artistic 2.0 license Eric Bavier
2015-02-13 23:07 ` Ludovic Courtès
2015-02-12 15:58 ` [PATCH 3/4] import: cpan: Use corelist to filter dependencies Eric Bavier
2015-02-13 23:15 ` Ludovic Courtès
2015-02-14 2:46 ` Eric Bavier
2015-02-23 20:49 ` Ludovic Courtès
2015-02-12 15:58 ` Eric Bavier [this message]
2015-02-13 23:17 ` [PATCH 4/4] import: cpan: Sort inputs, use mirror url, adjust licenses 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=1423756695-13378-5-git-send-email-bavier@member.fsf.org \
--to=bavier@member.fsf.org \
--cc=guix-devel@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).