diff options
author | Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> | 2016-05-17 15:06:44 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2016-12-17 15:56:47 +0100 |
commit | 2e5f32ce1b2d552527b8eb9a85a100a92d6d252a (patch) | |
tree | c36ad2cfec3af34d14a7193f1b5aa09de2547800 /guix | |
parent | 576eda6d02c65cbbbd611691abb5f5ee9511afc6 (diff) | |
download | gnu-guix-2e5f32ce1b2d552527b8eb9a85a100a92d6d252a.tar gnu-guix-2e5f32ce1b2d552527b8eb9a85a100a92d6d252a.tar.gz |
import cran: Remove more invalid characters from package names.
* guix/import/cran.scm (guix-name): Replace period and underscore with
dash; always prepend package names with "r-".
Diffstat (limited to 'guix')
-rw-r--r-- | guix/import/cran.scm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/import/cran.scm b/guix/import/cran.scm index d2add6f633..ee34eade94 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -152,9 +152,11 @@ 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-map (match-lambda + (#\_ #\-) + (#\. #\-) + (chr (char-downcase chr))) + name))) (let* ((base-url (case repository ((cran) %cran-url) |