From b3c53dec33e35d554e4a30de108477bc4fbe932f Mon Sep 17 00:00:00 2001 From: Troy Sankey Date: Sun, 7 Aug 2016 13:26:30 -0400 Subject: [PATCH 2/3] gnu: Add python-notmuch --- gnu/packages/mail.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index c58e5f5..96537c4 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -517,6 +517,48 @@ ing, and tagging large collections of email messages.") useful for email address completion.") (license license:expat))) +(define-public python-notmuch + (package + (name "python-notmuch") + (version "0.22.1") + (source (origin + (method url-fetch) + ; notmuch python bindings are now unavailable on pypi. The + ; bindings are distributed via the notmuch release tarball. + (uri (string-append + "https://notmuchmail.org/releases/notmuch-" + version + ".tar.gz")) + (sha256 + (base32 + "0jwpda3q023dn3sp41n8648951i7iagfv8zzpriv7hpkjivlafg7")))) + (build-system python-build-system) + (inputs `(("notmuch" ,notmuch))) + (arguments + `(#:tests? #f ;; no "test" target + #:phases + (modify-phases %standard-phases + ;; this python package lives in a subdirectory of the notmuch source + ;; tree, so chdir into it before building: + (add-before 'build 'chdir + (lambda* (#:key inputs outputs #:allow-other-keys) + (chdir "bindings/python"))) + ;; make sure the correct notmuch shared library gets loaded: + (add-before + 'build 'set-libnotmuch-file-name + (lambda* (#:key inputs #:allow-other-keys) + (let ((notmuch (assoc-ref inputs "notmuch"))) + (substitute* "notmuch/globals.py" + (("libnotmuch\\.so\\.") + (string-append notmuch "/lib/libnotmuch.so."))) + #t)))))) + (home-page "http://notmuchmail.org/") + (synopsis "Python bindings of the Notmuch mail indexing library") + (description + "This package provides Python bindings to use the Notmuch mail indexing +and search library.") + (license gpl3+))) + (define-public python2-notmuch (package (name "python2-notmuch") -- 2.1.4