import/cran: Allow overriding tarball download.
* guix/import/cran.scm (description->package): Accept new keyword argument DOWNLOAD-SOURCE. (cran->guix-package): Ditto.master
parent
08028c443e
commit
1176fccb83
|
@ -508,7 +508,8 @@ reference the pkg-config tool."
|
||||||
(define (needs-knitr? meta)
|
(define (needs-knitr? meta)
|
||||||
(member "knitr" (listify meta "VignetteBuilder")))
|
(member "knitr" (listify meta "VignetteBuilder")))
|
||||||
|
|
||||||
(define* (description->package repository meta #:key (license-prefix identity))
|
(define* (description->package repository meta #:key (license-prefix identity)
|
||||||
|
(download-source download))
|
||||||
"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."
|
||||||
(let* ((base-url (case repository
|
(let* ((base-url (case repository
|
||||||
|
@ -550,7 +551,7 @@ from the alist META, which was derived from the R package's DESCRIPTION file."
|
||||||
(_ #f)))))
|
(_ #f)))))
|
||||||
(git? (if (assoc-ref meta 'git) #true #false))
|
(git? (if (assoc-ref meta 'git) #true #false))
|
||||||
(hg? (if (assoc-ref meta 'hg) #true #false))
|
(hg? (if (assoc-ref meta 'hg) #true #false))
|
||||||
(source (download source-url #:method (cond
|
(source (download-source source-url #:method (cond
|
||||||
(git? 'git)
|
(git? 'git)
|
||||||
(hg? 'hg)
|
(hg? 'hg)
|
||||||
(else #f))))
|
(else #f))))
|
||||||
|
@ -646,13 +647,15 @@ from the alist META, which was derived from the R package's DESCRIPTION file."
|
||||||
(memoize
|
(memoize
|
||||||
(lambda* (package-name #:key (repo 'cran) version (license-prefix identity)
|
(lambda* (package-name #:key (repo 'cran) version (license-prefix identity)
|
||||||
(fetch-description fetch-description)
|
(fetch-description fetch-description)
|
||||||
|
(download-source download)
|
||||||
#:allow-other-keys)
|
#:allow-other-keys)
|
||||||
"Fetch the metadata for PACKAGE-NAME from REPO and return the `package'
|
"Fetch the metadata for PACKAGE-NAME from REPO and return the `package'
|
||||||
s-expression corresponding to that package, or #f on failure."
|
s-expression corresponding to that package, or #f on failure."
|
||||||
(let ((description (fetch-description repo package-name version)))
|
(let ((description (fetch-description repo package-name version)))
|
||||||
(if description
|
(if description
|
||||||
(description->package repo description
|
(description->package repo description
|
||||||
#:license-prefix license-prefix)
|
#:license-prefix license-prefix
|
||||||
|
#:download-source download-source)
|
||||||
(case repo
|
(case repo
|
||||||
((git)
|
((git)
|
||||||
;; Retry import from Bioconductor
|
;; Retry import from Bioconductor
|
||||||
|
|
Reference in New Issue