[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19/210: gnu: mes-boot: Use bootstrap Guile and simplify.
From: |
Jan Nieuwenhuizen |
Subject: |
19/210: gnu: mes-boot: Use bootstrap Guile and simplify. |
Date: |
Sat, 8 Sep 2018 10:35:59 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 267fef4829538ff01046cb8389fdf12b54ae87cb
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 78aee2d..e0e0aee 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -205,93 +205,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")
- 30/210: gnu: Update tcc-boot: mescc has no long long., (continued)
- 30/210: gnu: Update tcc-boot: mescc has no long long., Jan Nieuwenhuizen, 2018/09/08
- 26/210: gnu: Update mescc-tools-boot, mes-boot, tcc-boot., Jan Nieuwenhuizen, 2018/09/08
- 28/210: gnu: Update mes-boot, tcc-boot: __udivdi3, __umoddi3., Jan Nieuwenhuizen, 2018/09/08
- 25/210: gnu: Update mescc-tools-boot: Binaries with function debug info., Jan Nieuwenhuizen, 2018/09/08
- 11/210: tcc-boot: bump tinycc-seed: GNU Gcc support: Add ferror., Jan Nieuwenhuizen, 2018/09/08
- 12/210: bump mes-boot: mlibc: GNU Gcc support: setjmp, longjmp., Jan Nieuwenhuizen, 2018/09/08
- 07/210: Revert "use %bootstrap-guile -- still guile-2.2 in bag-with-origins :-(", Jan Nieuwenhuizen, 2018/09/08
- 02/210: gnu: Add mescc-tools-boot., Jan Nieuwenhuizen, 2018/09/08
- 29/210: gnu: Update tcc-boot: mescc has no unsigned arithmetic., Jan Nieuwenhuizen, 2018/09/08
- 23/210: gnu: mescc-tools-boot: Update to bootstrap from M1 binaries., Jan Nieuwenhuizen, 2018/09/08
- 19/210: gnu: mes-boot: Use bootstrap Guile and simplify.,
Jan Nieuwenhuizen <=
- 18/210: gnu: mescc-tools-boot: Use bootstrap Guile and simplify., Jan Nieuwenhuizen, 2018/09/08
- 16/210: bump: mes-boot: fixup for 80-setjmp test, Jan Nieuwenhuizen, 2018/09/08
- 20/210: gnu: mes-boot: Update mes-boot, mes-seed: Mescc-tools support., Jan Nieuwenhuizen, 2018/09/08
- 15/210: gnu: tcc-boot: Use bootstrap Guile and simplify., Jan Nieuwenhuizen, 2018/09/08
- 08/210: gnu: Add gcc-boot. WIP, Jan Nieuwenhuizen, 2018/09/08
- 09/210: bump tcc-boot: add sysinclude path for [m4] configure., Jan Nieuwenhuizen, 2018/09/08
- 05/210: gnu: Add tcc-boot., Jan Nieuwenhuizen, 2018/09/08
- 06/210: use %bootstrap-guile -- still guile-2.2 in bag-with-origins :-(, Jan Nieuwenhuizen, 2018/09/08
- 04/210: gnu: Add nyacc-boot., Jan Nieuwenhuizen, 2018/09/08
- 01/210: gnu: Add stage0-boot., Jan Nieuwenhuizen, 2018/09/08