From 7b50c68455b07713392cb92a56dbf74fbcc2d182 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Fri, 22 Feb 2013 20:01:29 +0100
Subject: [PATCH] pull: Build (guix build download) first, because of the
 (gnutls) autoload.

* guix/scripts/pull.scm (unpack): Build (guix build download) first, as
  done in 855a8ad71def2ebc594ed32c57bda0ca4e13d91c.
  Reported by Andreas Enge <andreas@enge.fr>.
---
 guix/scripts/pull.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index f12133fff7d..42ff5255243 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -123,7 +123,12 @@ (define builder
                          (compile-file file
                                        #:output-file go
                                        #:opts %auto-compilation-options))))
-                   (find-files out "\\.scm"))
+
+                   ;; XXX: Because of the autoload hack in (guix build
+                   ;; download), we must build it first to avoid errors since
+                   ;; (gnutls) is unavailable.
+                   (cons (string-append out "/guix/build/download.scm")
+                         (find-files out "\\.scm")))
 
          ;; Remove the "fake" (guix config).
          (delete-file (string-append out "/guix/config.scm"))
-- 
GitLab