guix-commits
[Top][All Lists]
Advanced

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

02/02: gnu: mes-boot: Use bootstrap Guile and simplify.


From: Jan Nieuwenhuizen
Subject: 02/02: gnu: mes-boot: Use bootstrap Guile and simplify.
Date: Sun, 26 Nov 2017 16:15:17 -0500 (EST)

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

commit cda22ca6daad88562bdc2dd61c48e896a35b2e4a
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sun Nov 26 19:34:46 2017 +0100

    gnu: mes-boot: Use bootstrap Guile and simplify.
    
    * gnu/packages/mes.scm (mes-boot): Simplify; use %bootstrap-guile and
    package-with-bootstrap-guile.
---
 gnu/packages/mes.scm | 165 +++++++++++++++++++++++++++------------------------
 1 file changed, 88 insertions(+), 77 deletions(-)

diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 30776e4..270c23d 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -200,93 +200,104 @@ hex2 linker.")
        (license gpl3+)))))
 
 (define-public mes-boot
- (let ((version "0.11")
+  (let ((version "0.11")
         (revision "0")
-        (commit "a3d445e9049f6b6603d8c69c0e33bd071cf15b1c"))
-  (package
-    (name "mes-boot")
-    (version (string-append version "-" revision "." (string-take commit 7)))
-    (synopsis "Scheme interpreter and C compiler for full source 
bootstrapping")
-    (source (origin
+        (commit "234ab121478ef4c59c1cedbf9e361a64b4e954d2"))
+    (package-with-bootstrap-guile
+     (package
+       (name "mes-boot")
+       (version (string-append version "-" revision "." (string-take commit 
7)))
+       (synopsis "Scheme interpreter and C compiler for full source 
bootstrapping")
+       (source (origin
+                 (method url-fetch)
+                 (uri (string-append "https://gitlab.com/janneke/mes";
+                                     "/repository/archive.tar.gz?ref="
+                                     commit))
+                 (file-name (string-append name "-" version ".tar.xz"))
+                 (sha256
+                  (base32
+                   "0jxrnv2fgi4n3hvq48li8l21439hmhm83ifdxhfsjggyf2kka3d0"))))
+       (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)))
+          ("guile" ,%bootstrap-guile)
+          ;; guile-2.0.9 does not have srfi-43; cherry-pick
+          ("srfi-43" ,(origin
+                        (method url-fetch)
+                        (uri 
"http://git.savannah.gnu.org/cgit/guile.git/plain/module/srfi/srfi-43.scm?h=stable-2.0";)
+                        (file-name "srfi-43.scm")
+                        (sha256
+                         (base32
+                          
"0rnkppwdkxbzkgp9s9ccmby9f7p3ijxjlmvj0pzqxwmrmpy7jwmb"))))
+          ("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"
+           ,(origin
               (method url-fetch)
-              (uri (string-append "https://gitlab.com/janneke/mes";
+              (uri (string-append "https://gitlab.com/janneke/mes-seed";
                                   "/repository/archive.tar.gz?ref="
-                                  commit))
-              (file-name (string-append name "-" version ".tar.xz"))
+                                  "fe64ff3a855d20bc90a5f28237e9832d33731b91"))
+              (file-name (string-append "mes-seed-0.11" ".tar.xz"))
               (sha256
                (base32
-                "0ss7qrzavl3m33naq3v1qawzd8nniwa84cm7kqkkv5n5l6rawxjw"))))
-    (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)))
-       ("tar" ,(search-bootstrap-binary "tar" (%current-system)))
-       ("xz"  ,(search-bootstrap-binary "xz" (%current-system)))
-       ("mescc-tools" ,mescc-tools-boot)
-       ("nyacc-source" ,(package-source nyacc))
-       ("mes-seed"
-        ,(origin
-           (method url-fetch)
-           (uri (string-append "https://gitlab.com/janneke/mes-seed";
-                               "/repository/archive.tar.gz?ref="
-                               "fe64ff3a855d20bc90a5f28237e9832d33731b91"))
-           (file-name (string-append "mes-seed-0.11" ".tar.xz"))
-           (sha256
-            (base32
-             "0ggc7r5mla44ilaxxj4x1z0k757i9h5ymd54l7wvjw7883z3ag5j"))))))
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let* ((bash (assoc-ref %build-inputs "static-bash"))
-                (mescc-tools (assoc-ref %build-inputs "mescc-tools"))
-                (tar (assoc-ref %build-inputs "tar"))
-                (xz (assoc-ref %build-inputs "xz"))
-                (source (assoc-ref %build-inputs "source"))
-                (nyacc-source (assoc-ref %build-inputs "nyacc-source"))
-                (mes-seed (assoc-ref %build-inputs "mes-seed"))
-                (out (assoc-ref %outputs "out"))
-                (out/bin (string-append out "/bin"))
-                (dir (getcwd)))
-           (setenv "PATH" (string-append bash "/bin:"
-                                         mescc-tools "/bin:"
-                                         tar "/bin:"
-                                         xz "/bin"))
-           (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
-           (mkdir-p "source")
-           (system* "tar" "--strip=1" "-C" "source" "-xvf" source)
-           (mkdir-p "nyacc-source")
-           (system* "tar" "--strip=1" "-C" "nyacc-source" "-xvf" nyacc-source)
-           (mkdir-p "mes-seed")
-           (system* "tar" "--strip=1" "-C" "mes-seed" "-xvf" mes-seed)
-           (chdir "source")
-           (zero? (system (string-append
-"set -ex;"
-
-"export PREFIX=" out ";"
-
-;; build
-"sh build.sh;"
-
-;; check
-"export GUILE=true;"
-"export GUILE_LOAD_PATH=" dir
-  ":" dir "/nyacc-source/module"
-  ":" dir "/guile;"
-"sh check.sh;"
-
-;; install
-"unset GUILE;"
-"sh install.sh;")))))))                                 ; []
-    (description
+                "0ggc7r5mla44ilaxxj4x1z0k757i9h5ymd54l7wvjw7883z3ag5j"))))))
+       (arguments
+        `(#:modules ((guix build utils))
+          #:builder
+          (begin
+            (use-modules (guix build utils))
+            (let* ((bash (assoc-ref %build-inputs "static-bash"))
+                   (guile (assoc-ref %build-inputs "guile"))
+                   (srfi-43 (assoc-ref %build-inputs "srfi-43"))
+                   (mescc-tools (assoc-ref %build-inputs "mescc-tools"))
+                   (tar (assoc-ref %build-inputs "tar"))
+                   (xz (assoc-ref %build-inputs "xz"))
+                   (source (assoc-ref %build-inputs "source"))
+                   (nyacc-source (assoc-ref %build-inputs "nyacc-source"))
+                   (mes-seed (assoc-ref %build-inputs "mes-seed"))
+                   (out (assoc-ref %outputs "out"))
+                   (dir (getcwd)))
+              (setenv "PATH" (string-append bash "/bin:"
+                                            guile "/bin:"
+                                            mescc-tools "/bin:"
+                                            tar "/bin:"
+                                            xz "/bin"))
+              (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
+              (mkdir-p "source")
+              (system* "tar" "--strip=1" "-C" "source" "-xvf" source)
+              (mkdir-p "nyacc-source")
+              (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")
+              (chdir "source")
+              (setenv "PREFIX" out)
+              (setenv "GUILE_AUTO_COMPILE" "1")
+              (setenv "GUILE_LOAD_COMPILED_PATH"
+                      (string-append guile "/lib/guile/2.0/ccache"))
+              (setenv "GUILE_LOAD_PATH"
+                      (string-append dir
+                                     ":" guile "/share/guile/2.0/"
+                                     ":" dir "/nyacc-source/module"))
+              ;; give auto-compile a home -- massive speed-up
+              (mkdir-p "/tmp/home")
+              (setenv "HOME" "/tmp/home")
+              (and
+               (zero? (system* "sh" "build.sh"))
+               (zero? (system* "sh" "check.sh"))
+               (zero? (system* "sh" "install.sh")))))))
+       (description
      "Mes [Maxwell Equations of Software] aims to create full source
 bootstrapping for GuixSD.  It consists of a mutual self-hosting [close to
 Guile-] Scheme interpreter prototype in C and a Nyacc-based C compiler in
 [Guile] Scheme.") ; []
       (home-page "https://gitlab.com/janneke/mes";)
-      (license gpl3+))))
+      (license gpl3+)))))
 
 (define-public nyacc-boot
   (let ((version "0.82.4")



reply via email to

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