summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-08-01 23:30:52 +0200
committerLudovic Courtès <ludo@gnu.org>2016-08-01 23:30:52 +0200
commit455859a50f88f625d13fc2f304111f02369b366b (patch)
tree285d8aa9253f033fa8d64e6b5f9f8d856aae04d2 /guix
parent742effef5629667b274087adc70b06abab86b252 (diff)
downloadguix-patches-455859a50f88f625d13fc2f304111f02369b366b.tar
guix-patches-455859a50f88f625d13fc2f304111f02369b366b.tar.gz
Merge branch 'core-updates'
Diffstat (limited to 'guix')
-rw-r--r--guix/build/download.scm3
-rw-r--r--guix/build/gnu-build-system.scm2
-rw-r--r--guix/download.scm7
3 files changed, 10 insertions, 2 deletions
diff --git a/guix/build/download.scm b/guix/build/download.scm
index 307258be92..4259f52b7a 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -737,7 +737,8 @@ or #f."
(append-map (lambda (make-url)
(filter-map (match-lambda
((hash-algo . hash)
- (string->uri (make-url file hash-algo hash))))
+ (let ((file (strip-store-file-name file)))
+ (string->uri (make-url file hash-algo hash)))))
hashes))
content-addressed-mirrors))
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 2abaa6efdc..34edff7f40 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -303,7 +303,7 @@ makefiles."
(define (list-of-files dir)
(map (cut string-append dir "/" <>)
(or (scandir dir (lambda (f)
- (let ((s (stat (string-append dir "/" f))))
+ (let ((s (lstat (string-append dir "/" f))))
(eq? 'regular (stat:type s)))))
'())))
diff --git a/guix/download.scm b/guix/download.scm
index 73c0e897b4..b2dcdc88f9 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -236,8 +236,15 @@
;; List of content-addressed mirrors. Each mirror is represented as a
;; procedure that takes a file name, an algorithm (symbol) and a hash
;; (bytevector), and returns a URL or #f.
+ ;; Note: Avoid 'https' to mitigate <http://bugs.gnu.org/22774>.
;; TODO: Add more.
'(list (lambda (file algo hash)
+ ;; Files served by 'guix publish' are accessible under a single
+ ;; hash algorithm.
+ (string-append "http://mirror.hydra.gnu.org/file/"
+ file "/" (symbol->string algo) "/"
+ (bytevector->nix-base32-string hash)))
+ (lambda (file algo hash)
;; 'tarballs.nixos.org' supports several algorithms.
(string-append "http://tarballs.nixos.org/"
(symbol->string algo) "/"