1{ stdenv
2, buildPythonPackage
3, fetchFromGitHub
4, mock
5, six
6}:
7
8buildPythonPackage rec {
9 pname = "IMAPClient";
10 version = "2.1.0";
11
12 src = fetchFromGitHub {
13 owner = "mjs";
14 repo = "imapclient";
15 rev = version;
16 sha256 = "1zc8qj8ify2zygbz255b6fcg7jhprswf008ccwjmbrnj08kh9l4x";
17 };
18
19 # fix test failing in python 36
20 postPatch = ''
21 substituteInPlace tests/test_imapclient.py \
22 --replace "if sys.version_info >= (3, 7):" "if sys.version_info >= (3, 6, 4):"
23 '';
24
25 propagatedBuildInputs = [ six ];
26
27 checkInputs = [ mock ];
28
29 meta = with stdenv.lib; {
30 homepage = "https://imapclient.readthedocs.io";
31 description = "Easy-to-use, Pythonic and complete IMAP client library";
32 license = licenses.bsd3;
33 maintainers = [ maintainers.almac ];
34 };
35}