guix-devel
[Top][All Lists]
Advanced

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

[PATCH 01/12] guix: download: properly detect https when mirror:// is us


From: Cyril Roelandt
Subject: [PATCH 01/12] guix: download: properly detect https when mirror:// is used.
Date: Mon, 12 Oct 2015 23:40:57 +0200

* guix/download.scm (url-fetch): fix need-gnutls? which always returned #f when
  a URL with "mirror://" scheme was used.
---
 guix/download.scm | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/guix/download.scm b/guix/download.scm
index 204cfc0..8ec47ce 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -235,13 +235,12 @@ in the store."
        (basename url))))
 
   (define need-gnutls?
-    ;; True if any of the URLs need TLS support.
-    (let ((https? (cut string-prefix? "https://"; <>)))
-      (match url
-        ((? string?)
-         (https? url))
-        ((url ...)
-         (any https? url)))))
+    (let ((https? (lambda (uri)
+                    (eq? 'https (uri-scheme uri)))))
+      (any https? (append-map (cut build:maybe-expand-mirrors <> %mirrors)
+                  (match url
+                    ((_ ...) (map string->uri url))
+                    (_       (list (string->uri url))))))))
 
   (define builder
     #~(begin
-- 
2.1.4




reply via email to

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