gnu: alot: Update to 0.11, fix build.

* gnu/packages/mail.scm (alot): Update to 0.11. Improve package style.
[buld-system]: Switch to pyproject-build-system.
[arguments] <tests?>: Disable for now.
<phases>: Remove 'fix-tests, disable-failing-tests; add
'relax-requirements.
[inputs]: Remove python-service-identity.
[native-inputs]: Remove python-mock; add python-setuptools.

Change-Id: I824e0f5c07739f2f69c037f56043824948638d13
This commit is contained in:
Sharlatan Hellseher 2025-09-22 21:34:04 +01:00
parent f0f35ff8a3
commit a54fa374f9
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -1415,54 +1415,43 @@ attachments, create new maildirs, and so on.")
(define-public alot
(package
(name "alot")
(version "0.10")
(source (origin
(version "0.11")
(source
(origin
(method git-fetch)
;; package author intends on distributing via github rather
;; than pypi:
;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
(uri (git-reference
(url "https://github.com/pazz/alot")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0awf1phdy1wqm01cy9zmvqlw6c8pvkxm2f9ncjd0cmzxqnmq1dyn"))))
(build-system python-build-system)
(base32 "19rn587n81gwx1f49bvm34m60708h5z47hcgiaqlpsznbv792xlr"))))
(build-system pyproject-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-before 'check 'fix-tests
(lambda* (#:key inputs #:allow-other-keys)
(let ((gnupg (assoc-ref inputs "gnupg")))
(substitute* "tests/test_crypto.py"
(("gpg2") (string-append gnupg "/bin/gpg")))
#t)))
(add-before 'check 'disable-failing-tests
;; FIXME: Investigate why these tests are failing.
(list
;; TODO: Tests fail with error: alot.settings.errors.ConfigError:
;; failed to read notmuch config with command
;;
;; CI is complex, see: <.github/workflows/test.yml>.
#:tests? #f
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'relax-requirements
(lambda _
(substitute* "tests/test_helper.py"
(("def test_env_set") "def _test_env_set"))
(substitute* "tests/commands/test_global.py"
(("def test_no_spawn_no_stdin_attached")
"def _test_no_spawn_no_stdin_attached"))
;; FIXME: Investigate why this test hangs.
(substitute* "tests/db/test_manager.py"
(("def test_save_named_query")
"def _test_save_named_query"))
#t)))))
(substitute* "pyproject.toml"
;; python-gpg is added and it's on the latest version.
(("gpg>1.10.0") "gpg")))))))
(native-inputs
(list procps python-mock))
(list procps
python-setuptools))
(inputs
(list gnupg
python-magic
python-configobj
python-twisted
python-service-identity
python-urwid
python-urwidtrees
python-gpg
python-notmuch2))
python-notmuch2
python-magic
python-twisted
python-urwid
python-urwidtrees))
(home-page "https://github.com/pazz/alot")
(synopsis "Command-line MUA using Notmuch")
(description