* gnu/packages/patches/notmuch-emacs-25-compatibility-fix.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/mail.scm (notmuch)[source]: Use patch.
[arguments]: Add verbose make flags. Add phase 'patch-notmuch-lib.el' to
fix hard-coded /bin/sh. Add 'prepare-test-environment' phase to patch
test shebangs and set environment.
[native-inputs]: Change from 'emacs-minimal' to 'emacs-no-x'. Add dtach,
gnupg, man, perl and which.