From 062bc0d32e53740838ef3134a84fb826c5a7a592 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 24 Oct 2022 10:17:01 +0200 Subject: [PATCH] python310Packages.mailmanclient: add pythonImportsCheck - specify license - adjust inputs - disable on older Python releases --- .../python-modules/mailmanclient/default.nix | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/mailmanclient/default.nix b/pkgs/development/python-modules/mailmanclient/default.nix index 6fcb91e542e7..e7a752663c6d 100644 --- a/pkgs/development/python-modules/mailmanclient/default.nix +++ b/pkgs/development/python-modules/mailmanclient/default.nix @@ -1,22 +1,41 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k, six, httplib2, requests }: +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, requests +, typing-extensions +}: buildPythonPackage rec { pname = "mailmanclient"; version = "3.3.4"; - disabled = !isPy3k; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-0y31HXjvU/bwy0s0PcDOlrX1RdyTTnk41ceD4A0R4p4="; + hash = "sha256-0y31HXjvU/bwy0s0PcDOlrX1RdyTTnk41ceD4A0R4p4="; }; - propagatedBuildInputs = [ six httplib2 requests ]; + propagatedBuildInputs = [ + requests + ] ++ lib.optionals (pythonOlder "3.8") [ + typing-extensions + ]; + + # Tests require a running Mailman instance + doCheck = false; + + pythonImportsCheck = [ + "mailmanclient" + ]; meta = with lib; { - homepage = "https://www.gnu.org/software/mailman/"; description = "REST client for driving Mailman 3"; - license = licenses.lgpl3; - platforms = platforms.linux; + homepage = "https://www.gnu.org/software/mailman/"; + license = licenses.lgpl3Plus; maintainers = with maintainers; [ globin qyliss ]; + platforms = platforms.linux; }; }