mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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.
This commit is contained in:
parent
9c9da07f4c
commit
21c203a53a
8 changed files with 414 additions and 456 deletions
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue