gnu: Remove unnecessary closures around `arguments' value.

* gnu/packages/algebra.scm (pari-gp): Remove closure around the value of
  `arguments'.
* gnu/packages/bdb.scm (bdb): Likewise.
* gnu/packages/mit-krb5.scm (mit-krb5): Likewise.
* gnu/packages/openssl.scm (openssl): Likewise.
* gnu/packages/perl.scm (perl): Likewise.
master
Ludovic Courtès 2013-01-23 22:47:39 +01:00
parent bbb7a00e9a
commit 12abb19dfb
5 changed files with 103 additions and 108 deletions

View File

@ -120,26 +120,25 @@ extensive test suite.")
("perl" ,perl) ("perl" ,perl)
("readline" ,readline))) ("readline" ,readline)))
(arguments (arguments
(lambda (system) '(#:make-flags '("gp")
`(#:make-flags '("gp") ;; FIXME: building the documentation requires tex; once this is available,
;; FIXME: building the documentation requires tex; once this is available, ;; replace "gp" by "all"
;; replace "gp" by "all" #:test-target "dobench"
#:test-target "dobench" #:phases
#:phases (alist-replace
(alist-replace 'configure
'configure (lambda* (#:key inputs outputs #:allow-other-keys)
(lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))
(let ((out (assoc-ref outputs "out")) (readline (assoc-ref inputs "readline"))
(readline (assoc-ref inputs "readline")) (gmp (assoc-ref inputs "gmp")))
(gmp (assoc-ref inputs "gmp"))) (zero?
(zero? (system* "./Configure"
(system* "./Configure" (string-append "--prefix=" out)
(string-append "--prefix=" out) (string-append "--with-readline=" readline)
(string-append "--with-readline=" readline) (string-append "--with-gmp=" gmp)))))
(string-append "--with-gmp=" gmp))))) ;; FIXME: readline and gmp will be detected automatically in the next
;; FIXME: readline and gmp will be detected automatically in the next ;; stable release
;; stable release %standard-phases)))
%standard-phases))))
(synopsis "PARI/GP, a computer algebra system for number theory") (synopsis "PARI/GP, a computer algebra system for number theory")
(description (description
"PARI/GP is a widely used computer algebra system designed for fast "PARI/GP is a widely used computer algebra system designed for fast

View File

@ -35,19 +35,18 @@
"1f2g2612lf8djbwbwhxsvmffmf9d7693kh2l20195pqp0f9jmnfx")))) "1f2g2612lf8djbwbwhxsvmffmf9d7693kh2l20195pqp0f9jmnfx"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
(lambda (system) '(#:tests? #f ; no check target available
`(#:tests? #f ; no check target available #:phases
#:phases (alist-replace
(alist-replace 'configure
'configure (lambda* (#:key outputs #:allow-other-keys)
(lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")))
(let ((out (assoc-ref outputs "out"))) (zero?
(zero? (system* "./dist/configure"
(system* "./dist/configure" (string-append "--prefix=" out)
(string-append "--prefix=" out) (string-append "CONFIG_SHELL=" (which "bash"))
(string-append "CONFIG_SHELL=" (which "bash")) (string-append "SHELL=" (which "bash"))))))
(string-append "SHELL=" (which "bash")))))) %standard-phases)))
%standard-phases))))
(synopsis "db, the Berkeley database") (synopsis "db, the Berkeley database")
(description (description
"Berkeley DB is an embeddable database allowing developers the choice of "Berkeley DB is an embeddable database allowing developers the choice of

View File

@ -42,36 +42,35 @@
("perl" ,perl) ("perl" ,perl)
)) ))
(arguments (arguments
(lambda (system) '(#:phases
`(#:phases (alist-replace
(alist-replace 'unpack
'unpack (lambda* (#:key source #:allow-other-keys)
(lambda* (#:key source #:allow-other-keys) (let ((inner
(let ((inner (substring source
(substring source (string-index-right source #\k)
(string-index-right source #\k) (string-index-right source #\-))))
(string-index-right source #\-))))
(and (zero? (system* "tar" "xvf" source)) (and (zero? (system* "tar" "xvf" source))
(zero? (system* "tar" "xvf" (string-append inner ".tar.gz"))) (zero? (system* "tar" "xvf" (string-append inner ".tar.gz")))
(chdir inner) (chdir inner)
(chdir "src")))) (chdir "src"))))
(alist-replace (alist-replace
'check 'check
(lambda* (#:key inputs #:allow-other-keys #:rest args) (lambda* (#:key inputs #:allow-other-keys #:rest args)
(let ((perl (assoc-ref inputs "perl")) (let ((perl (assoc-ref inputs "perl"))
(check (assoc-ref %standard-phases 'check))) (check (assoc-ref %standard-phases 'check)))
(substitute* "plugins/kdb/db2/libdb2/test/run.test" (substitute* "plugins/kdb/db2/libdb2/test/run.test"
(("/bin/cat") (string-append perl "/bin/perl"))) (("/bin/cat") (string-append perl "/bin/perl")))
(substitute* "plugins/kdb/db2/libdb2/test/run.test" (substitute* "plugins/kdb/db2/libdb2/test/run.test"
(("D/bin/sh") (string-append "D" (which "bash")))) (("D/bin/sh") (string-append "D" (which "bash"))))
(substitute* "plugins/kdb/db2/libdb2/test/run.test" (substitute* "plugins/kdb/db2/libdb2/test/run.test"
(("bindir=/bin/.") (string-append "bindir=" perl "/bin"))) (("bindir=/bin/.") (string-append "bindir=" perl "/bin")))
;; use existing files and directories in test ;; use existing files and directories in test
(substitute* "tests/resolve/Makefile" (substitute* "tests/resolve/Makefile"
(("-p telnet") "-p 23")) (("-p telnet") "-p 23"))
;; avoid service names since /etc/services is unavailable ;; avoid service names since /etc/services is unavailable
(apply check args))) (apply check args)))
%standard-phases))))) %standard-phases))))
(synopsis "MIT Kerberos 5") (synopsis "MIT Kerberos 5")
(description (description
"Massachusetts Institute of Technology implementation of Kerberos. "Massachusetts Institute of Technology implementation of Kerberos.

View File

@ -37,30 +37,29 @@
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs `(("perl" ,perl))) (inputs `(("perl" ,perl)))
(arguments (arguments
(lambda (system) '(#:parallel-build? #f
`(#:parallel-build? #f #:parallel-tests? #f
#:parallel-tests? #f #:test-target "test"
#:test-target "test" #:phases
#:phases (alist-replace
(alist-replace 'configure
'configure (lambda* (#:key outputs #:allow-other-keys)
(lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")))
(let ((out (assoc-ref outputs "out"))) (zero?
(zero? (system* "./config"
(system* "./config" "shared" ; build shared libraries
"shared" ; build shared libraries "--libdir=lib"
"--libdir=lib" (string-append "--prefix=" out)))))
(string-append "--prefix=" out))))) (alist-cons-before
(alist-cons-before 'patch-source-shebangs 'patch-tests
'patch-source-shebangs 'patch-tests (lambda* (#:key inputs #:allow-other-keys)
(lambda* (#:key inputs #:allow-other-keys) (let ((bash (assoc-ref inputs "bash")))
(let ((bash (assoc-ref inputs "bash"))) (substitute* (find-files "test" ".*")
(substitute* (find-files "test" ".*") (("/bin/sh")
(("/bin/sh") (string-append bash "/bin/bash"))
(string-append bash "/bin/bash")) (("/bin/rm")
(("/bin/rm") "rm"))))
"rm")))) %standard-phases))))
%standard-phases)))))
(synopsis "OpenSSL, an SSL/TLS implementation") (synopsis "OpenSSL, an SSL/TLS implementation")
(description (description
"OpenSSL is an implementation of SSL/TLS") "OpenSSL is an implementation of SSL/TLS")

View File

@ -38,32 +38,31 @@
"15qxzba3a50c9nik5ydgyfp62x7h9vxxn12yd1jgl93hb1wj96km")))) "15qxzba3a50c9nik5ydgyfp62x7h9vxxn12yd1jgl93hb1wj96km"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
(lambda (system) '(#:tests? #f
`(#:tests? #f #:patches (list (assoc-ref %build-inputs "patch/no-sys-dirs"))
#:patches (list (assoc-ref %build-inputs "patch/no-sys-dirs")) #:phases
#:phases (alist-replace
(alist-replace 'configure
'configure (lambda* (#:key inputs outputs #:allow-other-keys)
(lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))
(let ((out (assoc-ref outputs "out")) (libc (assoc-ref inputs "libc")))
(libc (assoc-ref inputs "libc"))) ;; Use the right path for `pwd'.
;; Use the right path for `pwd'. (substitute* "dist/Cwd/Cwd.pm"
(substitute* "dist/Cwd/Cwd.pm" (("/bin/pwd")
(("/bin/pwd") (which "pwd")))
(which "pwd")))
(zero? (zero?
(system* "./Configure" (system* "./Configure"
(string-append "-Dprefix=" out) (string-append "-Dprefix=" out)
(string-append "-Dman1dir=" out "/share/man/man1") (string-append "-Dman1dir=" out "/share/man/man1")
(string-append "-Dman3dir=" out "/share/man/man3") (string-append "-Dman3dir=" out "/share/man/man3")
"-de" "-Dcc=gcc" "-de" "-Dcc=gcc"
"-Uinstallusrbinperl" "-Uinstallusrbinperl"
"-Dinstallstyle=lib/perl5" "-Dinstallstyle=lib/perl5"
"-Duseshrplib" "-Duseshrplib"
(string-append "-Dlocincpth=" libc "/include") (string-append "-Dlocincpth=" libc "/include")
(string-append "-Dloclibpth=" libc "/lib"))))) (string-append "-Dloclibpth=" libc "/lib")))))
%standard-phases)))) %standard-phases)))
(inputs `(("patch/no-sys-dirs" ,(search-patch "perl-no-sys-dirs.patch")))) (inputs `(("patch/no-sys-dirs" ,(search-patch "perl-no-sys-dirs.patch"))))
(synopsis "Implementation of the Perl programming language") (synopsis "Implementation of the Perl programming language")
(description (description