[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
18/70: bootstrap: Add %bootstrap-mes-rewired.
From: |
guix-commits |
Subject: |
18/70: bootstrap: Add %bootstrap-mes-rewired. |
Date: |
Wed, 11 Dec 2019 13:03:20 -0500 (EST) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 6281e1de32f400672d0e7bd89847bc372a47918d
Author: Jan Nieuwenhuizen <address@hidden>
Date: Sun Dec 8 20:37:55 2019 +0100
bootstrap: Add %bootstrap-mes-rewired.
* gnu/packages/commencement.scm (%bootstrap-mes-rewired): New variable.
---
gnu/packages/commencement.scm | 77 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index f87c875..4dc3b60 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -396,6 +396,83 @@
("guile" ,%bootstrap-guile)
("guile+guild" ,%bootstrap-guile+guild)))
+(define %bootstrap-mes-rewired
+ (package
+ (inherit mes)
+ (name "bootstrap-mes-rewired")
+ (version "0.19")
+ (source #f)
+ (native-inputs `(("mes" ,(@ (gnu packages bootstrap) %bootstrap-mes))
+ ("gash" ,gash-boot)))
+ (inputs '())
+ (propagated-inputs '())
+ (outputs '("out"))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:modules ((guix build utils)
+ (srfi srfi-26))
+ #:builder (begin
+ (use-modules (guix build utils)
+ (srfi srfi-26))
+ (let* ((mes (assoc-ref %build-inputs "mes"))
+ (gash (assoc-ref %build-inputs "gash"))
+ (mes-bin (string-append mes "/bin"))
+ (guile (string-append mes-bin "/mes"))
+ (mes-module (string-append mes "/share/mes/module"))
+ (out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin"))
+ (mescc (string-append bin "/mescc"))
+ (module (string-append out "/share/mes/module"))
+)
+ (define (rewire file)
+ (substitute* file
+ ((mes) out)
+ (("/gnu/store[^ ]+mes-minimal-[^/)}\"]*") out)
+ (("/gnu/store[^ ]+guile-[^/]*/bin/guile") guile)
+ (("/gnu/store[^ ]+bash-[^/)}\"]*") gash)))
+
+ (mkdir-p bin)
+ (for-each (lambda (file) (install-file file bin))
+ (find-files mes-bin))
+ (mkdir-p module)
+ (copy-recursively (string-append mes-module "/mes")
+ (string-append module "/mes"))
+ (copy-recursively (string-append mes-module "/srfi")
+ (string-append module "/srfi"))
+ (for-each rewire
+ ;; Cannot easily rewire "mes" because it
+ ;; contains NUL characters; would require
+ ;; remove-store-references alike trick
+ (filter (negate (cut string-suffix? "/mes" <>))
+ (find-files bin)))
+ (rewire (string-append module "/mes/boot-0.scm"))
+
+ (delete-file mescc)
+ (with-output-to-file mescc
+ (lambda _
+ (display (string-append
+ "\
+#! " gash "/bin/sh
+LANG=C
+LC_ALL=C
+export LANG LC_ALL
+
+#MES_PREFIX=${MES_REWIRED_PREFIX-$PWD}
+MES_PREFIX=${MES_REWIRED_PREFIX-" mes "/share/mes}
+MES=" bin "/mes
+export MES MES_PREFIX
+
+MES_ARENA=${MES_REWIRED_ARENA-10000000}
+MES_MAX_ARENA=${MES_REWIRED_ARENA-10000000}
+MES_STACK=${MES_REWIRED_STACK-1000000}
+export MES_ARENA MES_MAX_ARENA MES_STACK
+
+$MES -e '(mescc)' module/mescc.scm -- \"$@\"
+"))))
+ (chmod mescc #o555)
+ #t))))))
+
(define mes-boot
(package
(inherit mes)
- 02/70: gnu: Add gash-core-utils., (continued)
- 02/70: gnu: Add gash-core-utils., guix-commits, 2019/12/11
- 03/70: bootstrap: Add janneke's guix package url., guix-commits, 2019/12/11
- 09/70: bootstrap: bootstrap-mes: Update to mes-0.21., guix-commits, 2019/12/11
- 10/70: Revert "bootstrap: bootstrap-mes: Update to mes-0.21.", guix-commits, 2019/12/11
- 11/70: Revert "bootstrap: bootstrap-mescc-tools: Update to mescc-tools-0.6.1.", guix-commits, 2019/12/11
- 15/70: bootstrap: Add %bootstrap-guile+guild., guix-commits, 2019/12/11
- 12/70: Revert "gnu: Remove mescc-tools-0.5.2.", guix-commits, 2019/12/11
- 06/70: bootstrap: mes-minimal: Update to mes-0.21., guix-commits, 2019/12/11
- 13/70: Revert "bootstrap: mescc-tools-static: Update to 0.6.1.", guix-commits, 2019/12/11
- 14/70: Revert "bootstrap: mes-minimal: Update to mes-0.21.", guix-commits, 2019/12/11
- 18/70: bootstrap: Add %bootstrap-mes-rewired.,
guix-commits <=
- 17/70: bootstrap: Add gash-core-utils-boot., guix-commits, 2019/12/11
- 23/70: bootstrap: make-mesboot0: Use Gash instead of coreutils&co., guix-commits, 2019/12/11
- 21/70: bootstrap: tcc-boot0: Use Gash instead of coretutils&co., guix-commits, 2019/12/11
- 28/70: bootstrap: Add patch-mesboot., guix-commits, 2019/12/11
- 16/70: bootstrap: Add gash-boot., guix-commits, 2019/12/11
- 22/70: bootstrap: Add gzip-mesboot., guix-commits, 2019/12/11
- 20/70: bootstrap: mes-boot: Install intermediate ASCII cache., guix-commits, 2019/12/11
- 24/70: bootstrap: Add bzip2-mesboot., guix-commits, 2019/12/11
- 27/70: bootstrap: diffuils-mesboot: Use Gash instead of coretutils&co., guix-commits, 2019/12/11
- 26/70: bootstrap: tcc-boot: Use Gash instead of coretutils&co., guix-commits, 2019/12/11