gnu: mailutils: Use 'modify-phases' syntax.

* gnu/packages/mail.scm (mailutils)[arguments]: Use 'modify-phases'.
This commit is contained in:
Efraim Flashner 2016-12-20 21:55:53 +02:00
parent abe5d2dc8d
commit de75f0b1bf
No known key found for this signature in database
GPG key ID: F4C1D3917EACEE93

View file

@ -113,43 +113,43 @@ (define-public mailutils
"1dpylyg79avi7brpkcmzaq7bqqkz45flp0ws6f2c8b1gyz4hdnzm")))) "1dpylyg79avi7brpkcmzaq7bqqkz45flp0ws6f2c8b1gyz4hdnzm"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(;; TODO: Add `--with-sql'. '(#:phases
#:phases (alist-cons-before (modify-phases %standard-phases
'build 'pre-build (add-before 'build 'pre-build
(lambda _ (lambda _
;; Use the right file name for `cat'. ;; Use the right file name for `cat'.
(substitute* "testsuite/lib/mailutils.exp" (substitute* "testsuite/lib/mailutils.exp"
(("/bin/cat") (("/bin/cat")
(which "cat"))) (which "cat")))
;; Tests try to invoke 'maidag' such that it looks up the ;; Tests try to invoke 'maidag' such that it looks up the
;; 'root' user, which does not exist in the build ;; 'root' user, which does not exist in the build
;; environment. ;; environment.
(substitute* "maidag/tests/testsuite" (substitute* "maidag/tests/testsuite"
(("root <") "nobody <") (("root <") "nobody <")
(("spool/root") "spool/nobody") (("spool/root") "spool/nobody")
(("root@localhost") "nobody@localhost")) (("root@localhost") "nobody@localhost"))
;; The 'pipeact.at' tests generate a shell script; make ;; The 'pipeact.at' tests generate a shell script; make
;; sure it uses the right shell. ;; sure it uses the right shell.
(substitute* '("sieve/tests/testsuite" (substitute* '("sieve/tests/testsuite"
"mh/tests/testsuite") "mh/tests/testsuite")
(("#! /bin/sh") (("#! /bin/sh")
(string-append "#!" (which "sh")))) (string-append "#!" (which "sh"))))
(substitute* "mh/tests/testsuite" (substitute* "mh/tests/testsuite"
(("moreproc: /bin/cat") (("moreproc: /bin/cat")
(string-append "moreproc: " (which "cat")))) (string-append "moreproc: " (which "cat"))))
;; XXX: The comsatd tests rely on being able to open ;; XXX: The comsatd tests rely on being able to open
;; /dev/tty, but that gives ENODEV in the build ;; /dev/tty, but that gives ENODEV in the build
;; environment. Thus, ignore test failures here. ;; environment. Thus, ignore test failures here.
(substitute* "comsat/tests/Makefile.in" (substitute* "comsat/tests/Makefile.in"
(("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all) (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
(string-append "-" all))) (string-append "-" all)))
#t) #t)))
%standard-phases) ;; TODO: Add `--with-sql'.
#:configure-flags '("--sysconfdir=/etc") #:configure-flags '("--sysconfdir=/etc")
#:parallel-tests? #f)) #:parallel-tests? #f))
(inputs (inputs