From 21c203a53a617962586ef645b22f80814b05fd65 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 23 Jan 2013 23:21:59 +0100 Subject: packages: Mark the `arguments' field of as thunked. * guix/packages.scm (): 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. --- gnu/packages/m4.scm | 52 +++++++++++++++++++++++----------------------------- 1 file changed, 23 insertions(+), 29 deletions(-) (limited to 'gnu/packages/m4.scm') diff --git a/gnu/packages/m4.scm b/gnu/packages/m4.scm index fdf55f802d..2a8bc5c72c 100644 --- a/gnu/packages/m4.scm +++ b/gnu/packages/m4.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012 Ludovic Courtès +;;; Copyright © 2012, 2013 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,34 +36,28 @@ (base32 "035r7ma272j2cwni2961jp22k6bn3n9xwn3b3qbcn2yrvlghql22")))) (build-system gnu-build-system) - (arguments (case-lambda - ((system) - ;; XXX: Disable tests on those platforms with know issues. - `(#:tests? ,(not (member system - '("x86_64-darwin" - "i686-cygwin" - "i686-sunos"))) - #:patches (list (assoc-ref %build-inputs "patch/s_isdir") - (assoc-ref %build-inputs - "patch/readlink-EINVAL") - (assoc-ref %build-inputs "patch/gets")) - #:phases (alist-cons-before - 'check 'pre-check - (lambda* (#:key inputs #:allow-other-keys) - ;; Fix references to /bin/sh. - (let ((bash (assoc-ref inputs "bash"))) - (for-each patch-shebang - (find-files "tests" "\\.sh$")) - (substitute* (find-files "tests" - "posix_spawn") - (("/bin/sh") - (format #f "~a/bin/bash" bash))))) - %standard-phases))) - ((system cross-system) - `(#:patches (list (assoc-ref %build-inputs "patch/s_isdir") - (assoc-ref %build-inputs - "patch/readlink-EINVAL") - (assoc-ref %build-inputs "patch/gets")))))) + (arguments + ;; XXX: Disable tests on those platforms with know issues. + `(#:tests? ,(not (member (%current-system) + '("x86_64-darwin" + "i686-cygwin" + "i686-sunos"))) + #:patches (list (assoc-ref %build-inputs "patch/s_isdir") + (assoc-ref %build-inputs + "patch/readlink-EINVAL") + (assoc-ref %build-inputs "patch/gets")) + #:phases (alist-cons-before + 'check 'pre-check + (lambda* (#:key inputs #:allow-other-keys) + ;; Fix references to /bin/sh. + (let ((bash (assoc-ref inputs "bash"))) + (for-each patch-shebang + (find-files "tests" "\\.sh$")) + (substitute* (find-files "tests" + "posix_spawn") + (("/bin/sh") + (format #f "~a/bin/bash" bash))))) + %standard-phases))) (inputs `(("patch/s_isdir" ,(search-patch "m4-s_isdir.patch")) ("patch/readlink-EINVAL" ,(search-patch "m4-readlink-EINVAL.patch")) -- cgit v1.2.3