guix-commits
[Top][All Lists]
Advanced

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

58/211: gnu: mes-boot: Update to 0.15.


From: Jan Nieuwenhuizen
Subject: 58/211: gnu: mes-boot: Update to 0.15.
Date: Sat, 8 Sep 2018 11:09:26 -0400 (EDT)

janneke pushed a commit to branch wip-bootstrap
in repository guix.

commit f5448ed530d186cb6a669ddadcca919d3ca2887d
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Mon May 28 19:12:13 2018 +0200

    gnu: mes-boot: Update to 0.15.
    
    * gnu/packages/mes.scm (%fake-bootstrap?): New variable.
      (mes-boot): If %fake-bootstrap, cheat using Guile to build in ~1min.
      Update to 0.15.
---
 gnu/packages/mes.scm | 81 ++++++++++++++++++++++++++++++----------------------
 1 file changed, 47 insertions(+), 34 deletions(-)

diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index f4a496b..2988b7f 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -39,6 +39,8 @@
   #:use-module (guix licenses)
   #:use-module (guix packages))
 
+(define %fake-bootstrap? #f)  ; cheat using Guile instead of Mes for speed-up?
+
 (define %mescc-tools-seed
   (let ((commit"32881b9ff21fb41dc846914753b6cdadd75927c4"))
     (origin
@@ -223,9 +225,9 @@ hex2 linker.")
        (license gpl3+)))))
 
 (define-public mes-boot
-  (let ((version "0.14")
+  (let ((version "0.15")
         (revision "0")
-        (commit "4e50490aa2513ced5b568f434b23ba36218ba7b3"))
+        (commit "04a4a8dd9fbf4c049cfc284012d718e2d4fdbbbe"))
     (package-with-bootstrap-guile
      (package
        (name "mes-boot")
@@ -238,21 +240,21 @@ hex2 linker.")
                                      "/mes-" commit ".tar.gz"))
                  (sha256
                   (base32
-                   "0ydsmkqb0sm1rhh83r0kyqv7664iw1ginvd52gp11mx7317qaldk"))))
+                   "1c7h1nlv8glnkaxlavf2z0c93d9whxf82ifvfap3jdr7jjjmy2np"))))
        (build-system trivial-build-system)
        (supported-systems '("i686-linux" "x86_64-linux"))
        (native-inputs
         `(("static-bash" ,@(assoc-ref %bootstrap-inputs "bash"))
           ("bash" ,(search-bootstrap-binary "bash" (%current-system)))
-          ;; For testing with Guile
-          ;; ("guile" ,%bootstrap-guile)
-          ;; guile-2.0.9 does not have srfi-43; cherry-pick
-          ("srfi-43" ,%srfi-43)
           ("tar" ,(search-bootstrap-binary "tar" (%current-system)))
           ("xz"  ,(search-bootstrap-binary "xz" (%current-system)))
           ("mescc-tools" ,mescc-tools-boot)
           ("nyacc-source" ,(package-source nyacc-boot))
-          ("mes-seed" ,%mes-seed)))
+          ("mes-seed" ,%mes-seed)
+          ,@(if %fake-bootstrap? ; cheat: fast non-bootstrap testing with Guile
+                `(("guile" ,%bootstrap-guile)
+                  ("srfi-43" ,%srfi-43)) ; guile-2.0.9 lacks srfi-43; 
cherry-pick
+                '())))
        (arguments
         `(#:modules ((guix build utils))
           #:builder
@@ -269,6 +271,8 @@ hex2 linker.")
                    (mes-seed (assoc-ref %build-inputs "mes-seed"))
                    (out (assoc-ref %outputs "out"))
                    (dir (getcwd)))
+
+              ;; unpack
               (setenv "PATH" (string-append
                               bash "/bin:"
                               (if guile (string-append guile "/bin:") "")
@@ -282,43 +286,52 @@ hex2 linker.")
               (system* "tar" "--strip=1" "-C" "nyacc-source" "-xvf" 
nyacc-source)
               (mkdir-p "mes-seed")
               (system* "tar" "--strip=1" "-C" "mes-seed" "-xvf" mes-seed)
-              (mkdir-p "srfi")
-              (system* "cp" srfi-43 "srfi/srfi-43.scm")
+              (when srfi-43
+                (mkdir-p "srfi")
+                (system* "cp" srfi-43 "srfi/srfi-43.scm"))
               (chdir "source")
 
               ;; configure
               (setenv "PREFIX" out)
-              (when guile
-                (setenv "GUILE_AUTO_COMPILE" "1")
-                (setenv "GUILE_LOAD_COMPILED_PATH"
-                        (string-append guile "/lib/guile/2.0/ccache"))
-                (setenv "GUILE_LOAD_PATH"
-                        (string-append "../nyacc-source/module"
-                                       ":" dir
-                                       ":" guile "/share/guile/2.0/")))
-
-              ;; guile-2.0 fails
-              (delete-file "tests/srfi-43.test-guile")
-
-              ;; give auto-compile a home -- massive speed-up
-              (mkdir-p "/tmp/home")
-              (setenv "HOME" "/tmp/home")
-
-              (when (not guile)
-                (symlink (string-append "../nyacc-source/module") "nyacc")
-                (setenv "GUILE_LOAD_PATH" "nyacc")
-                (setenv "MES" "src/mes")
-                (setenv "GUILE" "true"))
+
+              ;; (setenv "BUILD_DEBUG" "1")
+              (if ,%fake-bootstrap?
+                  (begin     ; Cheat using Guile+Nyacc+MesCC; ~30 times faster
+                    (setenv "MES" "guile")
+                    (setenv "GUILE_AUTO_COMPILE" "1")
+                    (setenv "GUILE_LOAD_COMPILED_PATH"
+                            (string-append guile "/lib/guile/2.0/ccache"))
+                    (setenv "GUILE_LOAD_PATH"
+                            (string-append (string-append dir 
"/nyacc-source/module")
+                                           ":" dir
+                                           ":" guile "/share/guile/2.0/"))
+                    ;; these fail with guile-2.0
+                    (when srfi-43
+                      (delete-file "tests/srfi-9.test-guile")
+                      (delete-file "tests/srfi-43.test-guile"))
+
+                    ;; give auto-compile a home -- massive speed-up
+                    (mkdir-p "/tmp/home")
+                    (setenv "HOME" "/tmp/home"))
+
+                  (begin                ; True bootstrap build Mes+Nyacc+MesCC
+                    (symlink (string-append "../nyacc-source/module") "nyacc")
+                    (setenv "GUILE_LOAD_PATH" "nyacc")
+                    (setenv "MES" "src/mes")))
+
+              (setenv "GUILE_TOOLS" "true") ; no tools in bootstrap-guile
               (setenv "MESCC" "scripts/mescc")
               (setenv "MES_MODULEDIR" "module")
+
               (and
                ;; build
                (zero? (system* "sh" "build.sh"))
 
                ;; check
-               (zero? (system* "sh" "-x" "build-aux/test.sh"))
-               (zero? (system* "sh" "-x" "build-aux/test.sh" 
"scaffold/tests/63-struct-cell"))
-               (zero? (system* "sh" "check.sh"))
+               (unless ,%fake-bootstrap? ; check takes ~15min, skip when faking
+                 (zero? (system* "sh" "build-aux/test.sh"))
+                 (zero? (system* "sh" "build-aux/test.sh" 
"scaffold/tests/63-struct-cell"))
+                 (zero? (system* "sh" "check.sh")))
 
                ;; install
                (setenv "SHELL" (string-append bash "/bin/bash"))



reply via email to

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