janneke pushed a commit to branch wip-bootstrap in repository guix. commit b9be4c1f592b09c6c93eceaf117e2c26f0646706 Author: Jan Nieuwenhuizen <jann...@gnu.org> Date: Sun Oct 28 01:24:28 2018 +0200
bootstrap: Add %bootstrap-gash. WIP Built with XXX5d2729d5be414669b11ab7242a4618059fe71b9e XXXbootstrap: Add %guile-gash-stripped, %guile-gash-bootstrap-tarball. * gnu/packages/bootstrap.scm (%bootstrap-gash): New variable. --- gnu/packages/bootstrap.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index 0e67aa2..d35bd62 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 @@ -716,6 +717,62 @@ 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/" + "gash-bootstrap-guile-0.1-0.273ecc2-x86_64-linux.tar.xz")) + (sha256 + (base32 + "1iwpha7yamk4df581zh8rzqrd9ry26ya9qbb1jc5q7bwxhwf2kms"))))))) + (supported-systems '("i686-linux" "x86_64-linux")) + (synopsis "Bootstrap binaries of Gash") + (description synopsis) + (home-page #f) + (license gpl3+))) + (define (%bootstrap-inputs) ;; The initial, pre-built inputs. From now on, we can start building our ;; own packages.