me
/
guix
Archived
1
0
Fork 0

gnu: mailutils: Use G-expressions.

* gnu/packages/mail.scm (mailutils)[arguments]:
Rewrite as G-expressions.
Tobias Geerinckx-Rice 2022-01-11 23:03:22 +00:00
parent 97e596e4f6
commit 76f5e5f775
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 62 additions and 62 deletions

View File

@ -22,7 +22,7 @@
;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be> ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com> ;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 20172021 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 20172022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017, 2018, 2020 Rene Saavedra <pacoon@protonmail.com> ;;; Copyright © 2017, 2018, 2020 Rene Saavedra <pacoon@protonmail.com>
;;; Copyright © 2018, 2019, 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com> ;;; Copyright © 2018, 2019, 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
@ -274,76 +274,76 @@ example, modify the message headers or body, or encrypt or sign the message.")
(search-patches "mailutils-variable-lookup.patch")))) (search-patches "mailutils-variable-lookup.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases (list #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-before 'check 'prepare-test-suite (add-before 'check 'prepare-test-suite
(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 'mda' such that it looks up the ;; Tests try to invoke 'mda' 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* '("mda/mda/tests/testsuite" (substitute* '("mda/mda/tests/testsuite"
"mda/lmtpd/tests/testsuite") "mda/lmtpd/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"
"libmailutils/tests/lock.at") "libmailutils/tests/lock.at")
(("#! ?/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)))
;; XXX: The moderator: program discard test does not specify ;; XXX: The moderator: program discard test does not
;; an explicit From: but does expect an exact match. But why are ;; specify an explicit From: but does expect an exact
;; all other tests unaffected? ;; match. But why are all other tests unaffected?
(substitute* "sieve/tests/testsuite" (substitute* "sieve/tests/testsuite"
(("gray@") (("gray@")
"nixbld@")) "nixbld@"))
;; 'frm' tests expect write access to $HOME. ;; 'frm' tests expect write access to $HOME.
(setenv "HOME" (getcwd)) (setenv "HOME" (getcwd))
;; Avoid the message "I'm going to create the standard MH path ;; Avoid the message "I'm going to create the standard MH
;; for you", which would lead to one test failure (when diffing ;; path for you", which would lead to one test failure
;; stdout of 'fmtcheck'.) ;; (when diffing stdout of 'fmtcheck'.)
(call-with-output-file ".mh_profile" (call-with-output-file ".mh_profile"
(lambda (port) (lambda (port)
(format port "Path: ~a/Mail-for-tests~%" (format port "Path: ~a/Mail-for-tests~%"
(getcwd)))) (getcwd))))
(substitute* "imap4d/tests/testclient.c" (substitute* "imap4d/tests/testclient.c"
(("\"/bin/sh\"") (("\"/bin/sh\"")
(string-append "\"" (which "sh") "\"")))))) (string-append "\"" (which "sh") "\""))))))
#:configure-flags #:configure-flags
(list "--sysconfdir=/etc" #~(list "--sysconfdir=/etc"
;; Add "/X.Y" to the installation directory. ;; Add "/X.Y" to the installation directory.
(string-append "--with-guile-site-dir=" (string-append "--with-guile-site-dir="
(assoc-ref %outputs "out") (assoc-ref %outputs "out")
"/share/guile/site/" "/share/guile/site/"
,(match (assoc "guile" #$(match (assoc "guile"
(package-inputs this-package)) (package-inputs this-package))
(("guile" guile) (("guile" guile)
(version-major+minor (version-major+minor
(package-version guile)))))))) (package-version guile))))))))
(native-inputs (native-inputs
;; Regeneration of the build system is triggered by touching the ;; Regeneration of the build system is triggered by touching the
;; 'libmailutils/tests/lock.at' file. ;; 'libmailutils/tests/lock.at' file.