1{ stdenv
2, lib
3
4, buildPythonPackage
5, notmuch
6, python
7, cffi
8}:
9
10buildPythonPackage {
11 pname = "notmuch2";
12 inherit (notmuch) version src;
13
14 sourceRoot = "notmuch-${notmuch.version}/bindings/python-cffi";
15
16 buildInputs = [ python notmuch cffi ];
17
18 # since notmuch 0.35, this package expects _notmuch_config.py that is
19 # generated by notmuch's configure script
20 postPatch = ''
21 cp ${notmuch.bindingconfig}/_notmuch_config.py .
22 '';
23
24 # no tests
25 doCheck = false;
26 pythonImportsCheck = [ "notmuch2" ];
27
28 meta = with lib; {
29 broken = stdenv.isDarwin;
30 description = "Pythonic bindings for the notmuch mail database using CFFI";
31 homepage = "https://notmuchmail.org/";
32 license = licenses.gpl3;
33 maintainers = with maintainers; [ teto ];
34 };
35}