janneke pushed a commit to branch wip-bootstrap in repository guix. commit 26e9bac178273f50607bddabc4cc27c7750a5ae5 Author: Jan Nieuwenhuizen <jann...@gnu.org> 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 | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 8cd25b5..48415c5 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -614,6 +614,43 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ("bootstrap-guile" ,(@ (gnu packages bootstrap) %bootstrap-guile)) ("gash" ,guile-gash))))) +(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