mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
download: 'download-to-store' accepts plain file names.
* guix/download.scm (download-to-store): When URI is #f, assume that URL is a file name, and handle it.
This commit is contained in:
parent
6f58d58243
commit
d91a879121
1 changed files with 3 additions and 2 deletions
|
@ -255,8 +255,9 @@ (define* (download-to-store store url #:optional (name (basename url))
|
|||
(define uri
|
||||
(string->uri url))
|
||||
|
||||
(if (memq (uri-scheme uri) '(file #f))
|
||||
(add-to-store store name #f "sha256" (uri-path uri))
|
||||
(if (or (not uri) (memq (uri-scheme uri) '(file #f)))
|
||||
(add-to-store store name #f "sha256"
|
||||
(if uri (uri-path uri) url))
|
||||
(call-with-temporary-output-file
|
||||
(lambda (temp port)
|
||||
(let ((result
|
||||
|
|
Loading…
Reference in a new issue