From cc27643528bb9f8f191006a817d689528ead5d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 25 Jun 2021 15:41:55 +0200 Subject: [PATCH] python3Packages.imaplib2: 2.45.0 -> 3.6 --- .../python-modules/imaplib2/default.nix | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/imaplib2/default.nix b/pkgs/development/python-modules/imaplib2/default.nix index 1825e1a40d8..c58b698a4a4 100644 --- a/pkgs/development/python-modules/imaplib2/default.nix +++ b/pkgs/development/python-modules/imaplib2/default.nix @@ -1,22 +1,33 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, pytestCheckHook +}: buildPythonPackage rec { pname = "imaplib2"; - version = "2.45.0"; + version = "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "a35b6d88258696e80aabecfb784e08730b8558fcaaa3061ff2c7f8637afbd0b3"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "jazzband"; + repo = "imaplib2"; + rev = "v${version}"; + sha256 = "14asi3xnvf4bb394k5j8c3by6svvmrr75pawzy6kaax5jx0h793m"; }; - # No tests on PyPI and no tags on GitHub :( - doCheck = false; + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "imaplib2" ]; meta = with lib; { description = "A threaded Python IMAP4 client"; - homepage = "https://github.com/bcoe/imaplib2"; - # See https://github.com/bcoe/imaplib2/issues/25 - license = licenses.psfl; + homepage = "https://github.com/jazzband/imaplib2"; + license = licenses.mit; maintainers = with maintainers; [ dotlambda ]; }; }