~ruther/guix-local

03671375b6eda0d47452780d91fd3af7bde791aa — Ludovic Courtès 13 years ago a1232d0
packages: Allow the `arguments' field to be a procedure.

* guix/packages.scm (package-derivation): When ARGS is a procedure, call
  (ARGS SYSTEM).

* distro/base.scm (gawk)[arguments]: Turn into a procedure, to disable
  tests on Cygwin.
2 files changed, 10 insertions(+), 4 deletions(-)

M distro/base.scm
M guix/packages.scm
M distro/base.scm => distro/base.scm +7 -3
@@ 62,9 62,13 @@ handlers, distributed shared memory, and more.")
             (nix-base32-string->bytevector
              "0sss7rhpvizi2a88h6giv0i7w5h07s2fxkw3s6n1hqvcnhrfgbb0"))))
   (build-system gnu-build-system)
   (arguments '()
              ;; TODO: disable tests on Cygwin
              )
   (arguments (case-lambda
                ((system)
                 (if (string=? system "i686-cygwin")
                     '(#:tests? #f)      ; work around test failure on Cygwin
                     '()))
                ((system cross-system)
                 '())))
   (inputs `(("libsigsegv" ,libsigsegv)             ; headers
             ("libsigsegv/lib" ,libsigsegv "lib"))) ; library
   (home-page "http://www.gnu.org/software/gawk/")

M guix/packages.scm => guix/packages.scm +3 -1
@@ 171,7 171,9 @@ etc."
              (package-source-derivation store source)
              inputs
              #:outputs outputs #:system system
              args)))))
              (if (procedure? args)
                  (args system)
                  args))))))

(define* (package-cross-derivation store package)
  ;; TODO