import: cran: Accept single URL in addition to single URL.

* guix/import/cran.scm (package->upstream-name): Match single URL in
  addition to list of URLs.
This commit is contained in:
Ricardo Wurmus 2016-03-22 15:12:30 +01:00
parent 58cc369f32
commit b98293ebed

@ -227,7 +227,7 @@ s-expression corresponding to that package, or #f on failure."
(match (package-source package)
((? origin? origin)
(match (origin-uri origin)
((url rest ...)
((or (? string? url) (url _ ...))
(let ((end (string-rindex url #\_))
(start (string-rindex url #\/)))
;; The URL ends on