diff mbox series

[bug#52075,3/4] gnu: Add python-notmuch2.

Message ID 20211124100016.21905-3-tanguy@bioneland.org
State Accepted
Headers show
Series gnu: alot: Update to 0.10. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Tanguy LE CARROUR Nov. 24, 2021, 10 a.m. UTC
* gnu/packages/mail.scm (python-notmuch2): New variable.
---
 gnu/packages/mail.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Nicolas Goaziou Nov. 24, 2021, 10:29 a.m. UTC | #1
Hello,

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> * gnu/packages/mail.scm (python-notmuch2): New variable.

Thanks.

Would it be possible (or appropriate) to inherit from python-notmuch
instead?

Regards,
diff mbox series

Patch

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 7c7e411d5c..9dc38708bf 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -107,6 +107,7 @@  (define-module (gnu packages mail)
   #:use-module (gnu packages language)
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages libevent)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages libidn)
   #:use-module (gnu packages libunistring)
   #:use-module (gnu packages libunwind)
@@ -1511,6 +1512,29 @@  (define-public python-notmuch
 (define-public python2-notmuch
   (package-with-python2 python-notmuch))
 
+(define-public python-notmuch2
+  (package
+    (name "python-notmuch2")
+    (version (package-version notmuch))
+    ;; The bindings are distributed via the notmuch release tarball.
+    (source (package-source notmuch))
+    (build-system python-build-system)
+    (inputs `(("notmuch" ,notmuch)))
+    (propagated-inputs `(("python-cffi" ,python-cffi)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; This python package lives in a subdirectory of the notmuch source
+         ;; tree, so chdir into it before building.
+         (add-after 'unpack 'enter-python-dir
+           (lambda _ (chdir "bindings/python-cffi") #t)))))
+    (home-page (package-home-page notmuch))
+    (synopsis "Pythonic bindings for the notmuch mail database using CFFI")
+    (description
+     "This package provides Python bindings to use the Notmuch mail indexing
+and search library.")
+    (license license:gpl3+)))
+
 (define-public muchsync
   (package
     (name "muchsync")