guix-commits
[Top][All Lists]
Advanced

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

03/176: gnu: Add mes-boot.


From: Jan Nieuwenhuizen
Subject: 03/176: gnu: Add mes-boot.
Date: Fri, 31 Aug 2018 11:20:00 -0400 (EDT)

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

commit 4d7e81c37b9f4c18eda11d3cc28427fd73aef36c
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sun Nov 19 22:55:41 2017 +0100

    gnu: Add mes-boot.
    
    * gnu/packages/mes.scm (mes-boot): New variable.
---
 gnu/packages/mes.scm | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)

diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 1bc5cd3..5015a94 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -211,6 +211,96 @@ hex2 linker.")
     (home-page "https://github.com/oriansj/mescc-tools";)
     (license gpl3+))))
 
+(define-public mes-boot
+ (let ((version "0.11")
+        (revision "0")
+        (commit "9d91e9adf50e0e5febef92f5458af0047d46404d"))
+  (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
+                "0rfz2mysg9a77fw5gkj01mm8d4vjib5ypv7zs9j2q9kmwznlp362"))))
+    (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="
+                               "7ed68e26db72884dc287852e021858c28ce1c557"))
+           (file-name (string-append "mes-seed-0.11" ".tar.xz"))
+           (sha256
+            (base32
+             "1pknfxdynn8gv1xnwfwqbpgqmi0j80yvj2n20y2lq3rhmmyhz81b"))))))
+    (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
+     "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+))))
+
+;;;
 
 (define-public nyacc
   (package



reply via email to

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