gnu: parallel: Update to 20160522.
[jackhill/guix/guix.git] / build-aux / download.scm
index 97a74b1..1e91e4b 100644 (file)
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
              (web client)
              (rnrs io ports)
              (srfi srfi-11)
-             (guix utils))
+             (guix utils)
+             (guix hash))
 
 (define %url-base
-  "http://www.fdn.fr/~lcourtes/software/guix/packages")
+  "http://alpha.gnu.org/gnu/guix/bootstrap"
+
+  ;; Alternately:
+  ;;"http://www.fdn.fr/~lcourtes/software/guix/packages"
+  )
+
+;; XXX: Work around <http://bugs.gnu.org/13095>, present in Guile
+;; up to 2.0.7.
+(module-define! (resolve-module '(web client))
+                'shutdown (const #f))
 
 (define (file-name->uri file)
   "Return the URI for FILE."
   (match (string-tokenize file (char-set-complement (char-set #\/)))
     ((_ ... system basename)
      (string->uri (string-append %url-base "/" system
-                                 "/20130105/" basename)))))
+                                 (match system
+                                   ("armhf-linux"
+                                    "/20150101/")
+                                   (_
+                                    "/20131110/"))
+                                 basename)))))
 
 (match (command-line)
   ((_ file expected-hash)
    (let ((uri (file-name->uri file)))
-     (format #t "downloading file `~a' from `~a'...~%"
+     (format #t "downloading file `~a'~%from `~a'...~%"
              file (uri->string uri))
      (let*-values (((resp data) (http-get uri #:decode-body? #f))
                    ((hash)      (bytevector->base16-string (sha256 data)))