2018-10-29 16:16:55 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
2020-03-13 15:31:28 +00:00
|
|
|
, fetchFromGitHub
|
2018-10-29 16:16:55 +00:00
|
|
|
, mock
|
2020-03-13 15:31:28 +00:00
|
|
|
, six
|
2018-10-29 16:16:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "IMAPClient";
|
2020-03-13 15:31:28 +00:00
|
|
|
version = "2.1.0";
|
2018-10-29 16:16:55 +00:00
|
|
|
|
2020-03-13 15:31:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mjs";
|
|
|
|
repo = "imapclient";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1zc8qj8ify2zygbz255b6fcg7jhprswf008ccwjmbrnj08kh9l4x";
|
2018-10-29 16:16:55 +00:00
|
|
|
};
|
|
|
|
|
2020-03-13 15:31:28 +00:00
|
|
|
# fix test failing in python 36
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/test_imapclient.py \
|
|
|
|
--replace "if sys.version_info >= (3, 7):" "if sys.version_info >= (3, 6, 4):"
|
2018-10-29 16:16:55 +00:00
|
|
|
'';
|
|
|
|
|
2020-03-13 15:31:28 +00:00
|
|
|
propagatedBuildInputs = [ six ];
|
|
|
|
|
|
|
|
checkInputs = [ mock ];
|
|
|
|
|
2018-10-29 16:16:55 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-03-13 15:31:28 +00:00
|
|
|
homepage = "https://imapclient.readthedocs.io";
|
2018-10-29 16:16:55 +00:00
|
|
|
description = "Easy-to-use, Pythonic and complete IMAP client library";
|
|
|
|
license = licenses.bsd3;
|
2020-03-13 15:31:28 +00:00
|
|
|
maintainers = [ maintainers.almac ];
|
2018-10-29 16:16:55 +00:00
|
|
|
};
|
|
|
|
}
|