Archived
1
0
Fork 0

gnu: nullmailer: Use G-expressions.

* gnu/packages/mail.scm (nullmailer)[arguments]:
Rewrite as G-expressions.
This commit is contained in:
Tobias Geerinckx-Rice 2023-07-02 02:00:01 +02:00
parent 0c9f663cd2
commit d235e4daea
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -501,45 +501,47 @@ messages) using IDLE. Implemented in Go.")
(base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq")))) (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:configure-flags (list #:configure-flags
(list "--enable-tls" #~(list "--enable-tls"
"--localstatedir=/var" "--localstatedir=/var"
"--sysconfdir=/etc") "--sysconfdir=/etc")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-before 'check 'patch-test-FHS-file-names (add-before 'check 'patch-test-FHS-file-names
(lambda _ (lambda _
(with-directory-excursion "test" (with-directory-excursion "test"
(substitute* (list "functions.in" (substitute* (list "functions.in"
"tests/send") "tests/send")
;; Fix some shebangs later generated on the fly. ;; Fix some shebangs later generated on the fly.
(("/bin/sh") (which "bash")))))) (("/bin/sh") (which "bash"))))))
(add-before 'check 'pass-PATH-to-tests (add-before 'check 'pass-PATH-to-tests
;; runtest launches each test through env -, clearing $PATH. The ;; runtest launches each test through env -, clearing
;; tests then source functions, which first demands a working $PATH ;; $PATH. The tests then source functions, which first
;; only to clobber it later. Pass our $PATH to the test environment ;; demands a working $PATH only to clobber it later. Pass
;; and don't touch it after that. ;; our $PATH to the test environment and don't touch it after
(lambda _ ;; that.
(with-directory-excursion "test" (lambda _
(substitute* "runtests" (with-directory-excursion "test"
(("env - bash") (substitute* "runtests"
(string-append "env - PATH=\"" (getenv "PATH") "\" bash"))) (("env - bash")
(substitute* "functions.in" (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
(("export PATH=.*") ""))))) (substitute* "functions.in"
(add-before 'check 'delete-failing-tests (("export PATH=.*") "")))))
(lambda _ (add-before 'check 'delete-failing-tests
(with-directory-excursion "test/tests" (lambda _
(for-each delete-file (with-directory-excursion "test/tests"
(list (for-each
;; XXX nullmailer-inject: nullmailer-queue failed: 15 delete-file
"inject/queue" (list
;; XXX These require the not-yet-packaged tcpserver. ;; XXX nullmailer-inject: nullmailer-queue failed: 15
"protocols" "smtp-auth"))))) "inject/queue"
(add-before 'install 'skip-install-data-local ;; XXX These require the not-yet-packaged tcpserver.
;; Don't attempt to install run-time files outside of the store. "protocols" "smtp-auth")))))
(lambda _ (add-before 'install 'skip-install-data-local
(substitute* "Makefile" ;; Don't try to install run-time files outside of the store.
((" install-data-local") ""))))))) (lambda _
(substitute* "Makefile"
((" install-data-local") "")))))))
(native-inputs (native-inputs
;; For tests. ;; For tests.
(list daemontools)) ; for svc (list daemontools)) ; for svc