aboutsummaryrefslogtreecommitdiff
path: root/guix/download.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-03-11 22:09:31 +0100
committerLudovic Courtès <ludo@gnu.org>2014-03-11 22:09:42 +0100
commitd91a879121485b079796ab5174468bf4c034ae40 (patch)
tree39fbbc410be547e2eadc1a1d385d817ac9a79538 /guix/download.scm
parent6f58d582432fe46c163f61ddf8f653584f4f7be8 (diff)
downloadgnu-guix-d91a879121485b079796ab5174468bf4c034ae40.tar
gnu-guix-d91a879121485b079796ab5174468bf4c034ae40.tar.gz
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.
Diffstat (limited to 'guix/download.scm')
-rw-r--r--guix/download.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/download.scm b/guix/download.scm
index 0889928d3a..2cb0740897 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -255,8 +255,9 @@ omitted. Write progress reports to LOG."
(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