From 76f5e5f7752b7138b33952a4d25a0dee41892039 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 11 Jan 2022 23:03:22 +0000 Subject: gnu: mailutils: Use G-expressions. * gnu/packages/mail.scm (mailutils)[arguments]: Rewrite as G-expressions. --- gnu/packages/mail.scm | 142 +++++++++++++++++++++++++------------------------- 1 file changed, 71 insertions(+), 71 deletions(-) (limited to 'gnu/packages') diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index f854080e9e..5d9dc1e8b9 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -22,7 +22,7 @@ ;;; Copyright © 2016, 2018 Marius Bakke ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2017 Kyle Meyer -;;; Copyright © 2017–2021 Tobias Geerinckx-Rice +;;; Copyright © 2017–2022 Tobias Geerinckx-Rice ;;; Copyright © 2017, 2018, 2020 Rene Saavedra ;;; Copyright © 2018, 2019, 2020, 2021 Pierre Langlois ;;; Copyright © 2018 Alex Vong @@ -274,76 +274,76 @@ example, modify the message headers or body, or encrypt or sign the message.") (search-patches "mailutils-variable-lookup.patch")))) (build-system gnu-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'check 'prepare-test-suite - (lambda _ - ;; Use the right file name for `cat'. - (substitute* "testsuite/lib/mailutils.exp" - (("/bin/cat") - (which "cat"))) - - ;; Tests try to invoke 'mda' such that it looks up the - ;; 'root' user, which does not exist in the build - ;; environment. - (substitute* '("mda/mda/tests/testsuite" - "mda/lmtpd/tests/testsuite") - (("root <") "nobody <") - (("spool/root") "spool/nobody") - (("root@localhost") "nobody@localhost")) - - ;; The 'pipeact.at' tests generate a shell script; make - ;; sure it uses the right shell. - (substitute* '("sieve/tests/testsuite" - "mh/tests/testsuite" - "libmailutils/tests/lock.at") - (("#! ?/bin/sh") - (string-append "#!" (which "sh")))) - - (substitute* "mh/tests/testsuite" - (("moreproc: /bin/cat") - (string-append "moreproc: " (which "cat")))) - - ;; XXX: The comsatd tests rely on being able to open - ;; /dev/tty, but that gives ENODEV in the build - ;; environment. Thus, ignore test failures here. - (substitute* "comsat/tests/Makefile.in" - (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all) - (string-append "-" all))) - - ;; XXX: The ‘moderator: program discard’ test does not specify - ;; an explicit From: but does expect an exact match. But why are - ;; all other tests unaffected? - (substitute* "sieve/tests/testsuite" - (("gray@") - "nixbld@")) - - ;; 'frm' tests expect write access to $HOME. - (setenv "HOME" (getcwd)) - - ;; Avoid the message "I'm going to create the standard MH path - ;; for you", which would lead to one test failure (when diffing - ;; stdout of 'fmtcheck'.) - (call-with-output-file ".mh_profile" - (lambda (port) - (format port "Path: ~a/Mail-for-tests~%" - (getcwd)))) - - (substitute* "imap4d/tests/testclient.c" - (("\"/bin/sh\"") - (string-append "\"" (which "sh") "\"")))))) - #:configure-flags - (list "--sysconfdir=/etc" - - ;; Add "/X.Y" to the installation directory. - (string-append "--with-guile-site-dir=" - (assoc-ref %outputs "out") - "/share/guile/site/" - ,(match (assoc "guile" - (package-inputs this-package)) - (("guile" guile) - (version-major+minor - (package-version guile)))))))) + (list #:phases + #~(modify-phases %standard-phases + (add-before 'check 'prepare-test-suite + (lambda _ + ;; Use the right file name for `cat'. + (substitute* "testsuite/lib/mailutils.exp" + (("/bin/cat") + (which "cat"))) + + ;; Tests try to invoke 'mda' such that it looks up the + ;; 'root' user, which does not exist in the build + ;; environment. + (substitute* '("mda/mda/tests/testsuite" + "mda/lmtpd/tests/testsuite") + (("root <") "nobody <") + (("spool/root") "spool/nobody") + (("root@localhost") "nobody@localhost")) + + ;; The 'pipeact.at' tests generate a shell script; make + ;; sure it uses the right shell. + (substitute* '("sieve/tests/testsuite" + "mh/tests/testsuite" + "libmailutils/tests/lock.at") + (("#! ?/bin/sh") + (string-append "#!" (which "sh")))) + + (substitute* "mh/tests/testsuite" + (("moreproc: /bin/cat") + (string-append "moreproc: " (which "cat")))) + + ;; XXX: The comsatd tests rely on being able to open + ;; /dev/tty, but that gives ENODEV in the build + ;; environment. Thus, ignore test failures here. + (substitute* "comsat/tests/Makefile.in" + (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all) + (string-append "-" all))) + + ;; XXX: The ‘moderator: program discard’ test does not + ;; specify an explicit From: but does expect an exact + ;; match. But why are all other tests unaffected? + (substitute* "sieve/tests/testsuite" + (("gray@") + "nixbld@")) + + ;; 'frm' tests expect write access to $HOME. + (setenv "HOME" (getcwd)) + + ;; Avoid the message "I'm going to create the standard MH + ;; path for you", which would lead to one test failure + ;; (when diffing stdout of 'fmtcheck'.) + (call-with-output-file ".mh_profile" + (lambda (port) + (format port "Path: ~a/Mail-for-tests~%" + (getcwd)))) + + (substitute* "imap4d/tests/testclient.c" + (("\"/bin/sh\"") + (string-append "\"" (which "sh") "\"")))))) + #:configure-flags + #~(list "--sysconfdir=/etc" + + ;; Add "/X.Y" to the installation directory. + (string-append "--with-guile-site-dir=" + (assoc-ref %outputs "out") + "/share/guile/site/" + #$(match (assoc "guile" + (package-inputs this-package)) + (("guile" guile) + (version-major+minor + (package-version guile)))))))) (native-inputs ;; Regeneration of the build system is triggered by touching the ;; 'libmailutils/tests/lock.at' file. -- cgit v1.2.3