diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-01-23 23:21:59 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-01-23 23:33:09 +0100 |
commit | 21c203a53a617962586ef645b22f80814b05fd65 (patch) | |
tree | 7536f5bcbec7e749164155e74ee8784afe02a202 /gnu/packages/bootstrap.scm | |
parent | 9c9da07f4c28192a05b3a88c7d5d1817ea392d79 (diff) |
packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
(package-derivation): Adjust accordingly. Parameterize
%CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
`package-arguments' to always return a list, and return a list.
(package-with-extra-configure-variable): Likewise.
(static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
from a lambda to a list, and use (%current-system) as needed.
(nix-system->gnu-triplet, boot-triplet): Have the first argument
default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
default to (%current-system).
(%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
expect `package-arguments' to return a list.
(%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
Diffstat (limited to 'gnu/packages/bootstrap.scm')
-rw-r--r-- | gnu/packages/bootstrap.scm | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index 39cdea2f62..ea2cf618f2 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -133,7 +133,7 @@ check whether everything is alright." (propagated-inputs (map rewritten-input (package-propagated-inputs p))))))) -(define (glibc-dynamic-linker system) +(define* (glibc-dynamic-linker #:optional (system (%current-system))) "Return the name of Glibc's dynamic linker for SYSTEM." (cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2") ((string=? system "i686-linux") "/lib/ld-linux.so.2") @@ -301,42 +301,41 @@ $out/bin/guile --version~%" (source #f) (build-system trivial-build-system) (arguments - (lambda (system) - `(#: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"))) - (use-modules (guix build utils) - (ice-9 popen)) + `(#: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"))) + (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"))) + (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 + (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 \"$@\"~%" - bash - out libc libc libc - ,(glibc-dynamic-linker system)))) + bash + out libc libc libc + ,(glibc-dynamic-linker)))) - (chmod "gcc" #o555))))))) + (chmod "gcc" #o555)))))) (inputs `(("tar" ,(lambda (system) (search-bootstrap-binary "tar" system))) |