janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit ef044950a02eef63aa7c55afb490ab368775b557
Author: Jan Nieuwenhuizen <[email protected]>
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 dc910d3..732528b 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.0a09ab1-x86_64-linux.tar.xz")
+ ("i686-linux"
"gash-bootstrap-guile-0.1-0.0a09ab1-x86_64-linux.tar.xz"))))
+ (sha256
+ (match (%current-system)
+ ("x86_64-linux"
+ (base32
+
"08c0dv7bgmbml5rabl9md806dlqm2a3sdhs180529xx7a55q4k0k"))
+ ("i686-linux"
+ (base32
+
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")))))))))
+ (synopsis "Bootstrap binaries of Gash")
+ (description synopsis)
+ (home-page #f)
+ (license gpl3+)))
+
(define %srfi-43
(origin
(method url-fetch)