[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
17/70: bootstrap: Add gash-core-utils-boot.
From: |
guix-commits |
Subject: |
17/70: bootstrap: Add gash-core-utils-boot. |
Date: |
Sun, 15 Dec 2019 08:36:41 -0500 (EST) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit d8212bba9dd7d39e3ec0e05e1be72c75542a1a42
Author: Jan Nieuwenhuizen <address@hidden>
Date: Fri Dec 6 07:22:06 2019 +0100
bootstrap: Add gash-core-utils-boot.
* gnu/packages/commencement.scm (gash-core-utils-boot): New variable.
(%boot-gash-inputs): New variable.
---
gnu/packages/commencement.scm | 165 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 165 insertions(+)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 75f89b7..f87c875 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -231,6 +231,171 @@
(install-file "scripts/bash" bin)
#t))))))))
+(define-public gash-core-utils-boot
+ (package
+ (inherit gash-core-utils)
+ (name "gash-core-utils-boot")
+ (version "0.0.213-3f6eb")
+ (source (bootstrap-origin
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://lilypond.org/janneke/"
+ "/gash-core-utils-" version ".tar.gz"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; The Guile build system compiles *.scm; avoid
+ ;; compiling included lalr.
+ (delete-file "guix.scm")
+ (delete-file-recursively "tests")
+ (substitute* "system/base/lalr.scm"
+ (("system/base/lalr.upstream.scm") "lalr.upstream.scm"))
+ #t))
+ (sha256
+ (base32
+ "0601c9hqbjrjjsllr2m3zmkglkd53d97in7a5c22ikd8islddp76")))))
+ (build-system guile-build-system)
+ (native-inputs `(("bash" ,(bootstrap-executable "bash" (%current-system)))
+ ("tar" ,(bootstrap-executable "tar" (%current-system)))
+ ("xz" ,(bootstrap-executable "xz" (%current-system)))
+ ("guile-source" ,(bootstrap-origin
+ (package-source guile-2.0)))
+ ;; We need the 2.0.9 lalr for %bootstrap-guile
+ ("lalr.upstream"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append
"http://git.savannah.gnu.org/cgit/guile.git/plain/module/system/base/lalr.upstream.scm?h=v2.0.9"))
+ (sha256
+ (base32
+
"0h7gyjj8nr2qrgzwma146s7l22scp8bbcqzdy9wqf12bgyhbw7d5"))))))
+ (inputs `(("guile" ,%bootstrap-guile+guild)
+ ("gash" ,gash-boot)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile+guild
+ #:not-compiled-file-regexp "upstream\\.scm$"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-guile-source
+ (lambda _
+ (let ((guile-source (assoc-ref %build-inputs "guile-source"))
+ (bin (string-append (getcwd) "/zee-bin")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+ (invoke "tar" "--strip-components=2"
+
+ "-xvf" guile-source
+ (string-append "guile-"
+ ,(package-version guile-2.0)
+ "/meta/guild.in"))
+ (copy-file "guild.in" "guild")
+ (chmod "guild" #o555))
+ #t)))
+ (add-before 'unpack 'set-path
+ (lambda _
+ (let ((bash (assoc-ref %build-inputs "bash"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (xz (assoc-ref %build-inputs "xz"))
+ (bin (string-append (getcwd) "/zee-bin")))
+ (mkdir-p bin)
+ (setenv "PATH" (string-append bin ":" (getenv "PATH")))
+ (copy-file bash (string-append bin "/bash"))
+ (copy-file bash (string-append bin "/sh"))
+ (copy-file tar (string-append bin "/tar"))
+ (copy-file xz (string-append bin "/xz"))
+ #t)))
+ (add-before 'build 'set-env
+ (lambda _
+ (let ((gash (assoc-ref %build-inputs "gash")))
+ (setenv "LANG" "C")
+ (setenv "LC_ALL" "C")
+ (setenv "GUILE_LOAD_PATH"
+ (string-append (getcwd)
+ ":" (getcwd) "/system/base"
+ ":" gash "/share/guile/2.0"))
+ (setenv "GUILE_LOAD_COMPILED_PATH"
+ (string-append ".:" gash "/lib/guile/2.0/site-ccache/"))
+ (format (current-error-port)
+ "GUILE_LOAD_PATH=~s\n" (getenv "GUILE_LOAD_PATH"))
+ #t)))
+ (add-before 'build 'replace-lalr.upstream
+ (lambda _
+ (let ((lalr.upstream (assoc-ref %build-inputs "lalr.upstream")))
+ (copy-file lalr.upstream "system/base/lalr.upstream.scm")
+ #t)))
+ (add-after 'build 'build-scripts
+ (lambda _
+ (let* ((guile (assoc-ref %build-inputs "guile"))
+ (guile (string-append guile "/bin/guile"))
+ (gash (string-append guile "gash"))
+ (out (assoc-ref %outputs "out"))
+ (effective "2.0")
+ (guilemoduledir (string-append gash "/share/guile/site/"
effective "/"))
+ (guileobjectdir (string-append gash "/lib/guile/"
effective "/site-ccache/"))
+ (gashmoduledir (string-append out "/share/guile/site/"
effective "/"))
+ (gashobjectdir (string-append out "/lib/guile/" effective
"/site-ccache/"))
+ (bin (string-append out "/bin")))
+ (define (wrap name)
+ (copy-file "command.in" name)
+ (chmod name #o555)
+ (substitute* name
+ (("@GUILE@") guile)
+ (("@guilemoduledir@") guilemoduledir)
+ (("@guileobjectdir") guileobjectdir)
+ (("@gashmoduledir@") gashmoduledir)
+ (("@gashobjectdir") gashobjectdir)
+ (("@command@") name))
+ (install-file name bin))
+ (mkdir-p bin)
+ (with-directory-excursion "bin"
+ (for-each wrap '("awk"
+ "basename"
+ "cat"
+ "chmod"
+ "cmp"
+ "compress"
+ "cp"
+ "cut"
+ "diff"
+ "dirname"
+ "expr"
+ "false"
+ "find"
+ "grep"
+ "gzip"
+ "head"
+ "ln"
+ "ls"
+ "mkdir"
+ "mv"
+ "pwd"
+ "reboot"
+ "rm"
+ "rmdir"
+ "sed"
+ "sleep"
+ "sort"
+ "tar"
+ "test"
+ "touch"
+ "tr"
+ "true"
+ "uname"
+ "uniq"
+ "wc"
+ "which")))
+ (with-directory-excursion bin
+ (copy-file "grep" "fgrep")
+ (copy-file "grep" "egrep")
+ (copy-file "test" "["))
+ #t))))))))
+
+(define (%boot-gash-inputs)
+ `(("bash" , gash-boot) ; gnu-build-system wants "bash"
+ ("coreutils" , gash-core-utils-boot)
+ ("guile" ,%bootstrap-guile)
+ ("guile+guild" ,%bootstrap-guile+guild)))
+
(define mes-boot
(package
(inherit mes)
- 06/70: bootstrap: mes-minimal: Update to mes-0.21., (continued)
- 06/70: bootstrap: mes-minimal: Update to mes-0.21., guix-commits, 2019/12/15
- 08/70: bootstrap: bootstrap-mescc-tools: Update to mescc-tools-0.6.1., guix-commits, 2019/12/15
- 09/70: bootstrap: bootstrap-mes: Update to mes-0.21., guix-commits, 2019/12/15
- 13/70: Revert "bootstrap: mescc-tools-static: Update to 0.6.1.", guix-commits, 2019/12/15
- 10/70: Revert "bootstrap: bootstrap-mes: Update to mes-0.21.", guix-commits, 2019/12/15
- 07/70: gnu: Remove mescc-tools-0.5.2., guix-commits, 2019/12/15
- 11/70: Revert "bootstrap: bootstrap-mescc-tools: Update to mescc-tools-0.6.1.", guix-commits, 2019/12/15
- 14/70: Revert "bootstrap: mes-minimal: Update to mes-0.21.", guix-commits, 2019/12/15
- 12/70: Revert "gnu: Remove mescc-tools-0.5.2.", guix-commits, 2019/12/15
- 18/70: bootstrap: Add %bootstrap-mes-rewired., guix-commits, 2019/12/15
- 17/70: bootstrap: Add gash-core-utils-boot.,
guix-commits <=
- 15/70: bootstrap: Add %bootstrap-guile+guild., guix-commits, 2019/12/15
- 23/70: bootstrap: Add bzip2-mesboot., guix-commits, 2019/12/15
- 22/70: bootstrap: make-mesboot0: Use Gash instead of coreutils&co., guix-commits, 2019/12/15
- 20/70: bootstrap: tcc-boot0: Use Gash instead of coretutils&co., guix-commits, 2019/12/15
- 26/70: bootstrap: diffuils-mesboot: Use Gash instead of coretutils&co., guix-commits, 2019/12/15
- 27/70: bootstrap: Add patch-mesboot., guix-commits, 2019/12/15
- 21/70: bootstrap: Add gzip-mesboot., guix-commits, 2019/12/15
- 24/70: bootstrap: Add bash-mesboot0., guix-commits, 2019/12/15
- 28/70: bootstrap: Add sed-mesboot0., guix-commits, 2019/12/15
- 32/70: bootstrap: mesboot-headers: Use Gash instead of coretutils&co., guix-commits, 2019/12/15