guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/04: download: Prepare to support the 'guix publish' /file URLs.


From: Ludovic Courtès
Subject: 04/04: download: Prepare to support the 'guix publish' /file URLs.
Date: Wed, 20 Jul 2016 15:11:22 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit ab84b927efa44cd3e81568db4c775f6ab7e3c344
Author: Ludovic Courtès <address@hidden>
Date:   Wed Jul 20 17:00:50 2016 +0200

    download: Prepare to support the 'guix publish' /file URLs.
    
    * guix/download.scm (%content-addressed-mirrors): Add 'file' parameter
    to the lambda.
    * guix/build/download.scm (url-fetch)[content-addressed-uris]: Adjust
    accordingly.
---
 guix/build/download.scm |    2 +-
 guix/download.scm       |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/guix/build/download.scm b/guix/build/download.scm
index 103e784..307258b 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -737,7 +737,7 @@ or #f."
     (append-map (lambda (make-url)
                   (filter-map (match-lambda
                                 ((hash-algo . hash)
-                                 (string->uri (make-url hash-algo hash))))
+                                 (string->uri (make-url file hash-algo hash))))
                               hashes))
                 content-addressed-mirrors))
 
diff --git a/guix/download.scm b/guix/download.scm
index bcb043b..8f38a4f 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -232,10 +232,10 @@
 
 (define %content-addressed-mirrors
   ;; List of content-addressed mirrors.  Each mirror is represented as a
-  ;; procedure that takes an algorithm (symbol) and a hash (bytevector), and
-  ;; returns a URL or #f.
+  ;; procedure that takes a file name, an algorithm (symbol) and a hash
+  ;; (bytevector), and returns a URL or #f.
   ;; TODO: Add more.
-  '(list (lambda (algo hash)
+  '(list (lambda (file algo hash)
            ;; 'tarballs.nixos.org' supports several algorithms.
            (string-append "http://tarballs.nixos.org/";
                           (symbol->string algo) "/"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]