~ruther/guix-local

d91a879121485b079796ab5174468bf4c034ae40 — Ludovic Courtès 12 years ago 6f58d58
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.
1 files changed, 3 insertions(+), 2 deletions(-)

M guix/download.scm
M guix/download.scm => guix/download.scm +3 -2
@@ 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