summaryrefslogtreecommitdiff
path: root/gnu/packages/make-bootstrap.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-01-23 23:21:59 +0100
committerLudovic Courtès <ludo@gnu.org>2013-01-23 23:33:09 +0100
commit21c203a53a617962586ef645b22f80814b05fd65 (patch)
tree7536f5bcbec7e749164155e74ee8784afe02a202 /gnu/packages/make-bootstrap.scm
parent9c9da07f4c28192a05b3a88c7d5d1817ea392d79 (diff)
downloadpatches-21c203a53a617962586ef645b22f80814b05fd65.tar
patches-21c203a53a617962586ef645b22f80814b05fd65.tar.gz
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/make-bootstrap.scm')
-rw-r--r--gnu/packages/make-bootstrap.scm127
1 files changed, 61 insertions, 66 deletions
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index a252848a47..091b5c0417 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -52,17 +52,15 @@
;; without nscd, and with static NSS modules.
(package (inherit glibc-final)
(arguments
- (lambda (system)
- (substitute-keyword-arguments ((package-arguments glibc-final) system)
- ((#:patches patches)
- `(cons (assoc-ref %build-inputs "patch/system")
- ,patches))
- ((#:configure-flags flags)
- ;; Arrange so that getaddrinfo & co. do not contact the nscd,
- ;; and can use statically-linked NSS modules.
- `(cons* "--disable-nscd" "--disable-build-nscd"
- "--enable-static-nss"
- ,flags)))))
+ (substitute-keyword-arguments (package-arguments glibc-final)
+ ((#:patches patches)
+ `(cons (assoc-ref %build-inputs "patch/system") ,patches))
+ ((#:configure-flags flags)
+ ;; Arrange so that getaddrinfo & co. do not contact the nscd,
+ ;; and can use statically-linked NSS modules.
+ `(cons* "--disable-nscd" "--disable-build-nscd"
+ "--enable-static-nss"
+ ,flags))))
(inputs
`(("patch/system" ,(search-patch "glibc-bootstrap-system.patch"))
,@(package-inputs glibc-final)))))
@@ -119,19 +117,17 @@
%standard-phases)))))
(gawk (package (inherit gawk)
(arguments
- (lambda (system)
- `(#:patches (list (assoc-ref %build-inputs "patch/sh"))
- ,@(substitute-keyword-arguments
- ((package-arguments gawk) system)
- ((#:phases phases)
- `(alist-cons-before
- 'configure 'no-export-dynamic
- (lambda _
- ;; Since we use `-static', remove
- ;; `-export-dynamic'.
- (substitute* "configure"
- (("-export-dynamic") "")))
- ,phases))))))
+ `(#:patches (list (assoc-ref %build-inputs "patch/sh"))
+ ,@(substitute-keyword-arguments (package-arguments gawk)
+ ((#:phases phases)
+ `(alist-cons-before
+ 'configure 'no-export-dynamic
+ (lambda _
+ ;; Since we use `-static', remove
+ ;; `-export-dynamic'.
+ (substitute* "configure"
+ (("-export-dynamic") "")))
+ ,phases)))))
(inputs `(("patch/sh" ,(search-patch "gawk-shell.patch"))))))
(finalize (lambda (p)
(static-package (package-with-explicit-inputs
@@ -332,29 +328,28 @@
(package (inherit gcc-final)
(name "gcc-static")
(arguments
- (lambda (system)
- `(#:modules ((guix build utils)
- (guix build gnu-build-system)
- (srfi srfi-1)
- (srfi srfi-26)
- (ice-9 regex))
- ,@(substitute-keyword-arguments ((package-arguments gcc-final) system)
- ((#:guile _) #f)
- ((#:implicit-inputs? _) #t)
- ((#:configure-flags flags)
- `(append (list
- "--disable-shared"
- "--disable-plugin"
- "--enable-languages=c"
- "--disable-libmudflap"
- "--disable-libgomp"
- "--disable-libssp"
- "--disable-libquadmath"
- "--disable-decimal-float")
- (remove (cut string-match "--(.*plugin|enable-languages)" <>)
- ,flags)))
- ((#:make-flags flags)
- `(cons "BOOT_LDFLAGS=-static" ,flags))))))
+ `(#:modules ((guix build utils)
+ (guix build gnu-build-system)
+ (srfi srfi-1)
+ (srfi srfi-26)
+ (ice-9 regex))
+ ,@(substitute-keyword-arguments (package-arguments gcc-final)
+ ((#:guile _) #f)
+ ((#:implicit-inputs? _) #t)
+ ((#:configure-flags flags)
+ `(append (list
+ "--disable-shared"
+ "--disable-plugin"
+ "--enable-languages=c"
+ "--disable-libmudflap"
+ "--disable-libgomp"
+ "--disable-libssp"
+ "--disable-libquadmath"
+ "--disable-decimal-float")
+ (remove (cut string-match "--(.*plugin|enable-languages)" <>)
+ ,flags)))
+ ((#:make-flags flags)
+ `(cons "BOOT_LDFLAGS=-static" ,flags)))))
(inputs `(("gmp-source" ,(package-source gmp))
("mpfr-source" ,(package-source mpfr))
("mpc-source" ,(package-source mpc))
@@ -482,25 +477,25 @@
("xz" ,xz)
("input" ,pkg)))
(arguments
- (lambda (system)
- (let ((name (package-name pkg))
- (version (package-version pkg)))
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let ((out (assoc-ref %outputs "out"))
- (input (assoc-ref %build-inputs "input"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz")))
- (mkdir out)
- (set-path-environment-variable "PATH" '("bin") (list tar xz))
- (with-directory-excursion input
- (zero? (system* "tar" "cJvf"
- (string-append out "/"
- ,name "-" ,version
- "-" ,system ".tar.xz")
- ".")))))))))))
+ (let ((name (package-name pkg))
+ (version (package-version pkg)))
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((out (assoc-ref %outputs "out"))
+ (input (assoc-ref %build-inputs "input"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (xz (assoc-ref %build-inputs "xz")))
+ (mkdir out)
+ (set-path-environment-variable "PATH" '("bin") (list tar xz))
+ (with-directory-excursion input
+ (zero? (system* "tar" "cJvf"
+ (string-append out "/"
+ ,name "-" ,version
+ "-" ,(%current-system)
+ ".tar.xz")
+ "."))))))))))
(define %bootstrap-binaries-tarball
;; A tarball with the statically-linked bootstrap binaries.