Archived
1
0
Fork 0

import/cran: download: Accept optional REF argument.

* guix/import/cran.scm (download): Accept REF argument for git downloads.
This commit is contained in:
Ricardo Wurmus 2022-08-12 18:59:11 +02:00
parent f8f3cffedc
commit 8c620a6036
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -200,11 +200,11 @@ bioconductor package NAME, or #F if the package is unknown."
;; Little helper to download URLs only once. ;; Little helper to download URLs only once.
(define download (define download
(memoize (memoize
(lambda* (url #:key method) (lambda* (url #:key method (ref '()))
(with-store store (with-store store
(cond (cond
((eq? method 'git) ((eq? method 'git)
(latest-repository-commit store url)) (latest-repository-commit store url #:ref ref))
((eq? method 'hg) ((eq? method 'hg)
(call-with-temporary-directory (call-with-temporary-directory
(lambda (dir) (lambda (dir)