guix-commits
[Top][All Lists]
Advanced

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

15/63: bootstrap: mes-boot: Scheme-only bootstrap.


From: guix-commits
Subject: 15/63: bootstrap: mes-boot: Scheme-only bootstrap.
Date: Sun, 24 Nov 2019 05:53:14 -0500 (EST)

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

commit f70604f5bf039b2ca33c21840b84d233c432992d
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Thu Jan 3 21:50:10 2019 +0100

    bootstrap: mes-boot: Scheme-only bootstrap.
    
    * gnu/packages/commencement.scm (mes-boot): Update to 0.21.  Scheme-only
    bootstrap.
---
 gnu/packages/commencement.scm | 71 +++++++++++++++++++++----------------------
 1 file changed, 35 insertions(+), 36 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index b59a211..19ac8c2 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -153,64 +153,63 @@
   (package
     (inherit mes)
     (name "mes-boot")
-    (version "0.19")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/mes/"
-                                  "mes-" version ".tar.gz"))
-              (sha256
-               (base32
-                "15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0"))))
+    (source (bootstrap-origin (package-source mes)))
     (inputs '())
     (propagated-inputs '())
     (native-inputs
-     `(("mescc-tools" ,%bootstrap-mescc-tools)
+     `(("bash" , %bootstrap-gash)
+       ("bootstrap-mes" ,%bootstrap-mes)
+       ("guile" ,%bootstrap-guile)
+       ("mescc-tools" ,%bootstrap-mescc-tools)
        ("nyacc-source" ,(bootstrap-origin
-                         (package-source nyacc-0.86)))
-
-       ("coreutils" , %bootstrap-coreutils&co)
-       ("bootstrap-mes" ,%bootstrap-mes)))
+                         (package-source nyacc-boot)))))
     (arguments
      `(#:implicit-inputs? #f
+       #:tests? #f
        #:guile ,%bootstrap-guile
        #:strip-binaries? #f    ; binutil's strip b0rkes MesCC/M1/hex2 binaries
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'unpack-seeds
            (lambda _
-             (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source"))
-                   (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes")))
+             (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source")))
                (with-directory-excursion ".."
-                 (mkdir-p "nyacc-source")
-                 (invoke "tar" "--strip=1" "-C" "nyacc-source" "-xvf" 
nyacc-source)
-                 (symlink (string-append bootstrap-mes "/share/mes/lib") 
"mes-seed"))
-               #t)))
+                 (invoke "tar" "-xvf" nyacc-source)))))
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref %outputs "out")))
+             (let ((out (assoc-ref %outputs "out"))
+                   (gash (assoc-ref %build-inputs "bash"))
+                   (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes"))
+                   (dir (with-directory-excursion ".." (getcwd))))
+               (setenv "AR" (string-append "gash " bootstrap-mes "/bin/mesar"))
+               (setenv "BASH" (string-append gash "/bin/gash"))
+               (setenv "CC" (string-append bootstrap-mes "/bin/mes"
+                                           " -e main"
+                                           " " bootstrap-mes "/bin/mescc.scm"
+                                           " -- "))
                (setenv "GUILE" "mes")
-               (setenv "GUILE_EFFECTIVE_VERSION" "2.2")
-               (setenv "GUILE_LOAD_PATH" "nyacc")
-               (symlink (string-append "../nyacc-source/module") "nyacc")
-               (invoke "bash" "configure.sh"
-                       (string-append "--prefix=" out)))))
-         (replace 'build
-           (lambda _
-             (let ((mes (assoc-ref %build-inputs "bootstrap-mes")))
-               (setenv "MES_PREFIX" (string-append mes "/share/mes"))
+               (setenv "GUILE_EFFECTIVE_VERSION" "2.0")
+               (setenv "GUILE_LOAD_PATH"
+                       (string-append bootstrap-mes "/share/mes/module"
+                                      ":" dir "/nyacc-0.99.0/module"))
+               (setenv "MES_PREFIX" (string-append bootstrap-mes "/share/mes"))
                (setenv "MES_ARENA" "100000000")
                (setenv "MES_MAX_ARENA" "100000000")
                (setenv "MES_STACK" "10000000")
-               (invoke "sh" "bootstrap.sh"))))
-         (replace 'check
+               (invoke "gash" "configure.sh"
+                       (string-append "--prefix=" out)
+                       (string-append "--host=i686-linux-gnu")))))
+         (replace 'build
            (lambda _
-             (setenv "DIFF" "sh scripts/diff.scm")
-             ;; fail fast tests
-             ;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t")
-             ;; (invoke "sh" "-x" "build-aux/test.sh" 
"scaffold/tests/63-struct-cell")
-             (invoke "sh" "check.sh")))
+             (invoke "sh" "bootstrap.sh")))
+         (delete 'check)
          (replace 'install
            (lambda _
+             (substitute* "install.sh"  ; show some progress
+               ((" -xf") " -xvf")
+               (("^( *)((cp|mkdir|tar) [^']*[^\\])\n" all space cmd)
+                (string-append space "echo '" cmd "'\n"
+                               space cmd "\n")))
              (invoke "sh" "install.sh"))))))
     (native-search-paths
      ;; Use the language-specific variables rather than 'CPATH' because they



reply via email to

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