guix-commits
[Top][All Lists]
Advanced

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

14/63: bootstrap: Add %bootstrap-gash-rewired..


From: guix-commits
Subject: 14/63: bootstrap: Add %bootstrap-gash-rewired..
Date: Sun, 24 Nov 2019 05:53:11 -0500 (EST)

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

commit be9fbc7aecf6bd2fc9b4cb08a6a019f0cd2237a2
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sat Sep 21 18:57:27 2019 +0200

    bootstrap: Add %bootstrap-gash-rewired..
    
    * gnu/packages/commencement.scm (%bootstrap-gash-rewired): New variable.
---
 gnu/packages/commencement.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index c5ea10e..b59a211 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -46,6 +46,7 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages hurd)
+  #:use-module (gnu packages shells)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages xml)
@@ -84,6 +85,46 @@
 ;;;
 ;;; Code:
 
+(define %bootstrap-gash-rewired
+  (package
+    (inherit gash)
+    (name "bootstrap-gash-rewired")
+    (source #f)
+    (native-inputs `(("gash" ,(@ (gnu packages bootstrap) %bootstrap-gash))
+                     ("guile" ,%bootstrap-guile)))
+    (inputs '())
+    (propagated-inputs '())
+    (outputs '("out"))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:guile ,%bootstrap-guile
+       #:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils))
+                   (let* ((gash (assoc-ref %build-inputs "gash"))
+                          (guile (assoc-ref %build-inputs "guile"))
+                          (gash-bin (string-append gash "/bin"))
+                          (gash-lib (string-append gash "/lib"))
+                          (out (assoc-ref %outputs "out"))
+                          (bin (string-append out "/bin"))
+                          (lib (string-append out "/lib")))
+
+                     (define (rewire-script script)
+                       (substitute* script
+                         ((gash) out)
+                         (("/gnu/store[^ ]+guile-[^/]*") guile)
+                         (("/gnu/store[^ ]+gash-[^/]*") gash)))
+
+                     (format (current-error-port) "bootstrap guile: ~s\n" 
guile)
+                     (mkdir-p bin)
+                     (for-each (lambda (file) (install-file file bin))
+                               (find-files gash-bin))
+                     (copy-recursively gash-lib lib)
+                     (for-each rewire-script (find-files bin))
+                     #t))))))
+
+(define %bootstrap-gash %bootstrap-gash-rewired)
+
 (define nyacc-boot
   ;; The regular Nyacc has a snippet fix in source, which leads to tar.xz.
   ;; During bootstrap we can only unzip .gz.



reply via email to

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