[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/7] import cran: Remove more invalid characters from package nam
From: |
Ricardo Wurmus |
Subject: |
[PATCH 1/7] import cran: Remove more invalid characters from package names. |
Date: |
Mon, 23 May 2016 17:40:02 +0200 |
* guix/import/cran.scm (guix-name): Replace period and underscore with
dash; always prepend package names with "r-".
---
guix/import/cran.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index c1a9e8e..8b368af 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -151,9 +151,9 @@ empty list when the FIELD cannot be found."
"Return the `package' s-expression for an R package published on REPOSITORY
from the alist META, which was derived from the R package's DESCRIPTION file."
(define (guix-name name)
- (if (string-prefix? "r-" name)
- (string-downcase name)
- (string-append "r-" (string-downcase name))))
+ (string-append "r-" (string-downcase
+ (regexp-substitute/global #f "(_|\\.)" name
+ 'pre "-" 'post))))
(let* ((base-url (case repository
((cran) %cran-url)
--
2.7.3
- [PATCH] Add recursive CRAN importer, Ricardo Wurmus, 2016/05/23
- [PATCH 1/7] import cran: Remove more invalid characters from package names.,
Ricardo Wurmus <=
- [PATCH 2/7] import cran: Move guix-name to top-level., Ricardo Wurmus, 2016/05/23
- [PATCH 3/7] import cran: description->package: Also return package dependencies., Ricardo Wurmus, 2016/05/23
- [PATCH 4/7] import cran: Ignore default R packages., Ricardo Wurmus, 2016/05/23
- [PATCH 5/7] import cran: Add recursive importer., Ricardo Wurmus, 2016/05/23
- [PATCH 6/7] import cran: Add "recursive" option., Ricardo Wurmus, 2016/05/23