guix-commits
[Top][All Lists]
Advanced

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

02/14: bootstrap: Add %gash-bootstrap-guile, %gash-bootstrap-guile-tarba


From: guix-commits
Subject: 02/14: bootstrap: Add %gash-bootstrap-guile, %gash-bootstrap-guile-tarball.
Date: Wed, 20 Nov 2019 15:16:24 -0500 (EST)

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

commit 52fc9075874ad5af011ad289283624ea82f57db2
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sun Oct 28 01:14:00 2018 +0200

    bootstrap: Add %gash-bootstrap-guile, %gash-bootstrap-guile-tarball.
    
    * gnu/packages/make-bootstrap.scm (%gash-bootstrap-guile): New variable.
    (%gash-bootstrap-guile-tarball): New variable.
---
 gnu/packages/make-bootstrap.scm | 42 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 86e331b..8cd25b5 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -48,6 +48,7 @@
             %glibc-bootstrap-tarball
             %gcc-bootstrap-tarball
             %guile-bootstrap-tarball
+            %gash-bootstrap-guile-tarball
             %mescc-tools-bootstrap-tarball
             %mes-bootstrap-tarball
             %bootstrap-tarballs
@@ -576,6 +577,43 @@ for `sh' in $PATH, and without nscd, and with static NSS 
modules."
                   (find-files (string-append share  "/mes/lib")
                               "\\.(h|c)")))))))))))
 
+(define %gash-bootstrap-guile
+  ;; Gash with %bootstrap-guile she-bangs.
+  (package
+    (inherit guile-gash)
+    (name "gash-bootstrap-guile")
+    (build-system trivial-build-system)
+    (source #f)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (srfi srfi-1)
+                      (guix build utils))
+
+         (setvbuf (current-output-port) _IOLBF)
+         (let* ((out     (assoc-ref %outputs "out"))
+                (bin     (string-append out "/bin"))
+                (libexec (string-append out "/libexec/gash"))
+                (gash    (assoc-ref %build-inputs "gash"))
+                (guile   (assoc-ref %build-inputs "guile"))
+                (bootstrap-guile (assoc-ref %build-inputs "bootstrap-guile")))
+
+           (define (rewire-script script)
+             (substitute* script
+               ((gash) out)
+               ((guile) bootstrap-guile)
+               (("bin/guile") "bin/.guile-real")))
+
+           (copy-recursively gash out)
+           (for-each rewire-script (append (find-files bin)
+                                           (find-files libexec)))
+
+           #t))))
+    (inputs `(("guile" ,guile-2.2)
+              ("bootstrap-guile" ,(@ (gnu packages bootstrap) 
%bootstrap-guile))
+              ("gash" ,guile-gash)))))
+
 (define %guile-static
   ;; A statically-linked Guile that is relocatable--i.e., it can search
   ;; .scm and .go files relative to its installation directory, rather
@@ -743,6 +781,10 @@ for `sh' in $PATH, and without nscd, and with static NSS 
modules."
   ;; A tarball with the statically-linked, relocatable Guile.
   (tarball-package %guile-static-stripped))
 
+(define %gash-bootstrap-guile-tarball
+  ;; A tarball with Gash, built with %bootstrap-guile.
+  (tarball-package %gash-bootstrap-guile))
+
 (define %mescc-tools-bootstrap-tarball
   ;; A tarball with MesCC binary seed.
   (tarball-package %mescc-tools-static))



reply via email to

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