pull: Compile guix/ files before gnu/ files.
authorLudovic Courtès <ludo@gnu.org>
Sat, 14 Dec 2013 15:48:38 +0000 (16:48 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sat, 14 Dec 2013 15:48:38 +0000 (16:48 +0100)
* guix/scripts/pull.scm (unpack)[builder]: Build files under guix/
  before files under gnu/.

guix/scripts/pull.scm

index e568979..11f5cc1 100644 (file)
@@ -150,7 +150,16 @@ files."
                                        %auto-compilation-options)))
 
                      (filter (cut string-suffix? ".scm" <>)
-                             (find-files out "\\.scm")))
+
+                             ;; Build guix/*.scm before gnu/*.scm to speed
+                             ;; things up.
+                             (sort (find-files out "\\.scm")
+                                   (let ((guix (string-append out "/guix"))
+                                         (gnu  (string-append out "/gnu")))
+                                     (lambda (a b)
+                                       (or (and (string-prefix? guix a)
+                                                (string-prefix? gnu b))
+                                           (string<? a b)))))))
 
          ;; Remove the "fake" (guix config).
          (delete-file (string-append out "/guix/config.scm"))