summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2026-05-06 01:45:30 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2026-05-24 10:19:26 +0100
commit81cb24829ac214b07dbefcbd1ac325d7d0e2ae66 (patch)
tree7529277fc25338bacb82576c0e89c4ca66d850e9
parentc1378240697903ba7cdbfe5532d59a02887533b7 (diff)
gnu: notmuch: Update to 0.40.
* gnu/packages/mail.scm (notmuch): Update to 0.40. [outputs]: Add output python. [arguments]<#:imported-modules, #:modules>: Import pyproject modules. <#:phases>: Add phase 'build-and-install-python, improve style of phase 'prepare-test-environment. [native-inputs]: Add patchelf, python-cffi, python-pytest, python-setuptools. Replace python by python-wrapper. Remove emacs-no-x, which is not used (--without-emacs is set). Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
-rw-r--r--gnu/packages/mail.scm64
1 files changed, 46 insertions, 18 deletions
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 8a73265a81f..b622509164a 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -113,6 +113,7 @@
113 #:use-module (gnu packages docbook) 113 #:use-module (gnu packages docbook)
114 #:use-module (gnu packages docker) 114 #:use-module (gnu packages docker)
115 #:use-module (gnu packages documentation) 115 #:use-module (gnu packages documentation)
116 #:use-module (gnu packages elf)
116 #:use-module (gnu packages emacs) 117 #:use-module (gnu packages emacs)
117 #:use-module (gnu packages enchant) 118 #:use-module (gnu packages enchant)
118 #:use-module (gnu packages file) 119 #:use-module (gnu packages file)
@@ -1544,45 +1545,72 @@ invoking @command{notifymuch} from the post-new hook.")
1544(define-public notmuch 1545(define-public notmuch
1545 (package 1546 (package
1546 (name "notmuch") 1547 (name "notmuch")
1547 (version "0.39") 1548 (version "0.40")
1548 (source 1549 (source
1549 (origin 1550 (origin
1550 (method url-fetch) 1551 (method url-fetch)
1551 (uri (string-append "https://notmuchmail.org/releases/notmuch-" 1552 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
1552 version ".tar.xz")) 1553 version ".tar.xz"))
1553 (sha256 1554 (sha256
1554 (base32 "1qq4yzpc704z9lqfpjvgyr8qna9rir7vpliz666sssy4fqmb12xq")))) 1555 (base32 "0vs4pidqrj8392h9mgi21mrv3h8mpg3ycdrng7gry0n2y6xi8hsb"))))
1555 (build-system gnu-build-system) 1556 (build-system gnu-build-system)
1557 (outputs (list "out" "python"))
1556 (arguments 1558 (arguments
1557 (list 1559 (list
1560 #:imported-modules %pyproject-build-system-modules
1561 #:modules '((guix build gnu-build-system)
1562 ((guix build pyproject-build-system) #:prefix py:)
1563 (guix build utils))
1558 #:make-flags 1564 #:make-flags
1559 #~(list "V=1" ; verbose test output 1565 #~(list "V=1" ; verbose test output
1560 "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines 1566 "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines
1561 #:phases 1567 #:phases
1562 #~(modify-phases %standard-phases 1568 (with-extensions (list (pyproject-guile-json))
1563 (replace 'configure 1569 #~(modify-phases %standard-phases
1564 (lambda* (#:key inputs #:allow-other-keys) 1570 (replace 'configure
1565 (setenv "CC" #$(cc-for-target)) 1571 (lambda* (#:key inputs #:allow-other-keys)
1566 (setenv "CONFIG_SHELL" (search-input-file inputs "/bin/sh")) 1572 (setenv "CC" #$(cc-for-target))
1567 (invoke "./configure" 1573 (setenv "CONFIG_SHELL" (search-input-file inputs "/bin/sh"))
1568 (string-append "--prefix=" #$output) 1574 (invoke "./configure"
1569 "--without-emacs"))) 1575 (string-append "--prefix=" #$output)
1570 (add-before 'check 'prepare-test-environment 1576 "--without-emacs")))
1571 (lambda* (#:key inputs #:allow-other-keys) 1577 (add-after 'build 'build-and-install-python
1572 (setenv "TEST_CC" #$(cc-for-target)) 1578 (lambda* (#:key inputs #:allow-other-keys)
1573 ;; Patch various inline shell invocations. 1579 (let* ((outputs `(("out" . ,#$output:python)))
1574 (let ((sh (search-input-file inputs "/bin/sh"))) 1580 (site (py:site-packages inputs outputs)))
1581 (with-directory-excursion "bindings/python-cffi"
1582 (for-each
1583 (lambda (phase)
1584 (format #t "Running pyproject phase: ~a~%" phase)
1585 ((assoc-ref py:%standard-phases phase)
1586 #:inputs inputs
1587 #:outputs outputs))
1588 '(enable-bytecode-determinism
1589 build
1590 install
1591 compile-bytecode)))
1592 (invoke "patchelf" "--add-rpath"
1593 (string-append #$output "/lib")
1594 (string-append site "/notmuch2/_capi.abi3.so")))))
1595 (add-before 'check 'prepare-test-environment
1596 (lambda* (#:key inputs #:allow-other-keys)
1597 (setenv "TEST_CC" #$(cc-for-target))
1598 ;; Patch various inline shell invocations.
1575 (substitute* (find-files "test" "\\.sh$") 1599 (substitute* (find-files "test" "\\.sh$")
1576 (("/bin/sh") sh)))))))) 1600 (("/bin/sh")
1601 (search-input-file inputs "/bin/sh")))))))))
1577 (native-inputs 1602 (native-inputs
1578 (list bash-completion 1603 (list bash-completion
1579 pkg-config 1604 pkg-config
1580 python 1605 patchelf
1606 python-cffi
1581 python-docutils 1607 python-docutils
1608 python-pytest
1609 python-setuptools
1582 python-sphinx 1610 python-sphinx
1611 python-wrapper
1583 texinfo 1612 texinfo
1584 ;; The following are required for tests only. 1613 ;; The following are required for tests only.
1585 emacs-no-x ; -minimal lacks libxml, needed for some tests
1586 which 1614 which
1587 dtach 1615 dtach
1588 git-minimal/pinned 1616 git-minimal/pinned