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-".
This commit is contained in:
parent
576eda6d02
commit
2e5f32ce1b
|
@ -152,9 +152,11 @@ empty list when the FIELD cannot be found."
|
||||||
"Return the `package' s-expression for an R package published on REPOSITORY
|
"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."
|
from the alist META, which was derived from the R package's DESCRIPTION file."
|
||||||
(define (guix-name name)
|
(define (guix-name name)
|
||||||
(if (string-prefix? "r-" name)
|
(string-append "r-" (string-map (match-lambda
|
||||||
(string-downcase name)
|
(#\_ #\-)
|
||||||
(string-append "r-" (string-downcase name))))
|
(#\. #\-)
|
||||||
|
(chr (char-downcase chr)))
|
||||||
|
name)))
|
||||||
|
|
||||||
(let* ((base-url (case repository
|
(let* ((base-url (case repository
|
||||||
((cran) %cran-url)
|
((cran) %cran-url)
|
||||||
|
|
Loading…
Reference in New Issue