[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/07: gnu: bootstrap: Move 'use-modules' forms to the beginning of buil
From: |
Ludovic Courtès |
Subject: |
01/07: gnu: bootstrap: Move 'use-modules' forms to the beginning of build expressions. |
Date: |
Fri, 20 Nov 2015 22:38:59 +0000 |
civodul pushed a commit to branch wip-build-systems-gexp
in repository guix.
commit f887a9a4bd0de493f7b5b59671c4284a0c4ef609
Author: Ludovic Courtès <address@hidden>
Date: Thu Mar 26 23:01:12 2015 +0100
gnu: bootstrap: Move 'use-modules' forms to the beginning of build
expressions.
* gnu/packages/bootstrap.scm (package-from-tarball)[arguments]: Move
'use-modules' form to the beginning.
(%bootstrap-glibc, %bootstrap-gcc): Likewise.
---
gnu/packages/bootstrap.scm | 119 +++++++++++++++++++++++---------------------
1 files changed, 62 insertions(+), 57 deletions(-)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index f5bf069..92c9086 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -103,22 +103,23 @@ successful, or false to signal an error."
`(#:guile ,%bootstrap-guile
#:modules ((guix build utils))
#:builder
- (let ((out (assoc-ref %outputs "out"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz"))
- (tarball (assoc-ref %build-inputs "tarball")))
+ (begin
(use-modules (guix build utils))
- (mkdir out)
- (copy-file tarball "binaries.tar.xz")
- (system* xz "-d" "binaries.tar.xz")
- (let ((builddir (getcwd)))
- (with-directory-excursion out
- (and (zero? (system* tar "xvf"
- (string-append builddir "/binaries.tar")))
- ,@(if snippet (list snippet) '())
- (zero? (system* (string-append "bin/" ,program-to-test)
- "--version"))))))))
+ (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")
+ (system* xz "-d" "binaries.tar.xz")
+ (let ((builddir (getcwd)))
+ (with-directory-excursion out
+ (and (zero? (system* tar "xvf"
+ (string-append builddir "/binaries.tar")))
+ ,@(if snippet (list snippet) '())
+ (zero? (system* (string-append "bin/" ,program-to-test)
+ "--version")))))))))
(inputs
`(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
("xz" ,(search-bootstrap-binary "xz" (%current-system)))
@@ -362,26 +363,28 @@ $out/bin/guile --version~%"
`(#:guile ,%bootstrap-guile
#:modules ((guix build utils))
#:builder
- (let ((out (assoc-ref %outputs "out"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz"))
- (tarball (assoc-ref %build-inputs "tarball")))
+ (begin
(use-modules (guix build utils))
- (mkdir out)
- (copy-file tarball "binaries.tar.xz")
- (system* xz "-d" "binaries.tar.xz")
- (let ((builddir (getcwd)))
- (with-directory-excursion out
- (system* tar "xvf"
- (string-append builddir
- "/binaries.tar"))
- (chmod "lib" #o755)
-
- ;; Patch libc.so so it refers to the right path.
- (substitute* "lib/libc.so"
- (("/[^ ]+/lib/(libc|ld)" _ prefix)
- (string-append out "/lib/" prefix))))))))
+ (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")
+ (system* xz "-d" "binaries.tar.xz")
+ (let ((builddir (getcwd)))
+ (with-directory-excursion out
+ (system* tar "xvf"
+ (string-append builddir
+ "/binaries.tar"))
+ (chmod "lib" #o755)
+
+ ;; Patch libc.so so it refers to the right path.
+ (substitute* "lib/libc.so"
+ (("/[^ ]+/lib/(libc|ld)" _ prefix)
+ (string-append out "/lib/" prefix)))))))))
(inputs
`(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
("xz" ,(search-bootstrap-binary "xz" (%current-system)))
@@ -426,38 +429,40 @@ $out/bin/guile --version~%"
`(#:guile ,%bootstrap-guile
#:modules ((guix build utils))
#:builder
- (let ((out (assoc-ref %outputs "out"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz"))
- (bash (assoc-ref %build-inputs "bash"))
- (libc (assoc-ref %build-inputs "libc"))
- (tarball (assoc-ref %build-inputs "tarball")))
+ (begin
(use-modules (guix build utils)
(ice-9 popen))
- (mkdir out)
- (copy-file tarball "binaries.tar.xz")
- (system* xz "-d" "binaries.tar.xz")
- (let ((builddir (getcwd))
- (bindir (string-append out "/bin")))
- (with-directory-excursion out
- (system* tar "xvf"
- (string-append builddir "/binaries.tar")))
-
- (with-directory-excursion bindir
- (chmod "." #o755)
- (rename-file "gcc" ".gcc-wrapped")
- (call-with-output-file "gcc"
- (lambda (p)
- (format p "#!~a
+ (let ((out (assoc-ref %outputs "out"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (xz (assoc-ref %build-inputs "xz"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (libc (assoc-ref %build-inputs "libc"))
+ (tarball (assoc-ref %build-inputs "tarball")))
+
+ (mkdir out)
+ (copy-file tarball "binaries.tar.xz")
+ (system* xz "-d" "binaries.tar.xz")
+ (let ((builddir (getcwd))
+ (bindir (string-append out "/bin")))
+ (with-directory-excursion out
+ (system* tar "xvf"
+ (string-append builddir "/binaries.tar")))
+
+ (with-directory-excursion bindir
+ (chmod "." #o755)
+ (rename-file "gcc" ".gcc-wrapped")
+ (call-with-output-file "gcc"
+ (lambda (p)
+ (format p "#!~a
exec ~a/bin/.gcc-wrapped -B~a/lib \
-Wl,-rpath -Wl,~a/lib \
-Wl,-dynamic-linker -Wl,~a/~a \"address@hidden"~%"
- bash
- out libc libc libc
- ,(glibc-dynamic-linker))))
+ bash
+ out libc libc libc
+ ,(glibc-dynamic-linker))))
- (chmod "gcc" #o555))))))
+ (chmod "gcc" #o555)))))))
(inputs
`(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
("xz" ,(search-bootstrap-binary "xz" (%current-system)))
- branch wip-build-systems-gexp created (now 4c2ade2), Ludovic Courtès, 2015/11/20
- 01/07: gnu: bootstrap: Move 'use-modules' forms to the beginning of build expressions.,
Ludovic Courtès <=
- 03/07: gexp: Micro-optimize sexp serialization., Ludovic Courtès, 2015/11/20
- 04/07: monads: Micro-optimize 'foldm'., Ludovic Courtès, 2015/11/20
- 05/07: tests: Add 'test-assertm' to (guix tests)., Ludovic Courtès, 2015/11/20
- 06/07: packages: Turn 'bag->derivation' into a monadic procedure., Ludovic Courtès, 2015/11/20
- 07/07: store: Add a functional object cache and use it in 'lower-object'., Ludovic Courtès, 2015/11/20
- 02/07: build-system: Rewrite using gexps., Ludovic Courtès, 2015/11/20