guix-commits
[Top][All Lists]
Advanced

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

10/15: bootstrap: Add %bootstrap-gash. WIP


From: guix-commits
Subject: 10/15: bootstrap: Add %bootstrap-gash. WIP
Date: Wed, 5 Dec 2018 16:57:53 -0500 (EST)

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

commit 6a2a1c7592e40b244879388c98cdfdd15201885f
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sun Oct 28 01:24:28 2018 +0200

    bootstrap: Add %bootstrap-gash.  WIP
    
    Built with
    
        5d2729d5be414669b11ab7242a4618059fe71b9e
        bootstrap: Add %guile-gash-stripped, %guile-gash-bootstrap-tarball.
    
    * gnu/packages/bootstrap.scm (%bootstrap-gash): New variable.
---
 gnu/packages/bootstrap.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 06d7e12..7d6272f 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -43,6 +43,7 @@
             bootstrap-guile-origin
 
             %bootstrap-guile
+            %bootstrap-gash
             %bootstrap-coreutils&co
             %bootstrap-linux-libre-headers
             %bootstrap-binutils
@@ -730,6 +731,68 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
     (home-page #f)
     (license gpl3+)))
 
+(define %bootstrap-gash
+  ;; The initial Gash.  Uses .go files from a tarball typically built by
+  ;; %GUILE-GASH-BOOTSTRAP-TARBALL.
+  (package
+    (name "bootstrap-gash")
+    (version "0")
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments
+     `(#:guile ,%bootstrap-guile
+       #:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils)
+                      (ice-9 popen))
+         (let ((out     (assoc-ref %outputs "out"))
+               (tar     (assoc-ref %build-inputs "tar"))
+               (xz      (assoc-ref %build-inputs "xz"))
+               (tarball (assoc-ref %build-inputs "tarball")))
+
+           (mkdir out)
+           (copy-file tarball "binaries.tar.xz")
+           (invoke xz "-d" "binaries.tar.xz")
+           (let ((build   (getcwd))
+                 (bin     (string-append out "/bin"))
+                 (libexec (string-append out "/libexec/gash")))
+
+           (define (rewire-script script)
+             (substitute* script
+               (("/gnu/store/[^ ]*gash-bootstrap[^/]*") out)))
+
+             (with-directory-excursion out
+               (invoke tar "xvf"
+                       (string-append build "/binaries.tar")))
+             (chmod bin #o755)
+             (chmod libexec #o755)
+             (for-each rewire-script (append (find-files bin)
+                                             (find-files libexec))))))))
+    (inputs
+     `(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
+       ("xz"  ,(search-bootstrap-binary "xz" (%current-system)))
+       ("tarball" ,(bootstrap-origin
+                    (origin
+                      (method url-fetch)
+                      (uri (string-append
+                            "http://lilypond.org/janneke/mes/";
+                            (match (%current-system)
+                              ("x86_64-linux" 
"gash-bootstrap-guile-0.1-0.5b7f85a-x86_64-linux.tar.xz")
+                              ("i686-linux" 
"gash-bootstrap-guile-0.1-0.5b7f85a-x86_64-linux.tar.xz"))))
+                      (sha256
+                       (match (%current-system)
+                         ("x86_64-linux"
+                          (base32
+                           
"16qsbmm5v9ifhdxv28wi9j7072mhmv74ixcdp9574j0p2z02xksx"))
+                         ("i686-linux"
+                          (base32
+                           
"16qsbmm5v9ifhdxv28wi9j7072mhmv74ixcdp9574j0p2z02xksx")))))))))
+    (synopsis "Bootstrap binaries of Gash")
+    (description synopsis)
+    (home-page #f)
+    (license gpl3+)))
+
 (define %srfi-43
   (origin
     (method url-fetch)



reply via email to

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