summary refs log tree commit diff
path: root/pkgs/development/python-modules/duo-client/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/duo-client/default.nix')
-rw-r--r--pkgs/development/python-modules/duo-client/default.nix23
1 files changed, 18 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/duo-client/default.nix b/pkgs/development/python-modules/duo-client/default.nix
index 088e9dc844c..129ec14cd0a 100644
--- a/pkgs/development/python-modules/duo-client/default.nix
+++ b/pkgs/development/python-modules/duo-client/default.nix
@@ -3,7 +3,8 @@
 , fetchFromGitHub
 , freezegun
 , mock
-, nose2
+, pytestCheckHook
+, pythonOlder
 , pytz
 , setuptools
 , six
@@ -11,13 +12,16 @@
 
 buildPythonPackage rec {
   pname = "duo-client";
-  version = "4.7.1";
+  version = "5.0.1";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "duosecurity";
     repo = "duo_client_python";
     rev = "refs/tags/${version}";
-    hash = "sha256-nnKujvhOtuNnlFrbmYtD7L++S7DK0Qqrc0LyAVYe7Xg=";
+    hash = "sha256-G0XLZZaQTPD64WXN34wq2z+YtzECgtC2nJXzDxAlgyg=";
   };
 
   postPatch = ''
@@ -26,15 +30,18 @@ buildPythonPackage rec {
       --replace "flake8" ""
   '';
 
-  propagatedBuildInputs = [
+  nativeBuildInputs = [
     setuptools
+  ];
+
+  propagatedBuildInputs = [
     six
   ];
 
   nativeCheckInputs = [
     freezegun
     mock
-    nose2
+    pytestCheckHook
     pytz
   ];
 
@@ -42,6 +49,12 @@ buildPythonPackage rec {
     "duo_client"
   ];
 
+  disabledTests = [
+    # Tests require network access
+    "test_server_hostname"
+    "test_server_hostname_with_port"
+  ];
+
   meta = with lib; {
     description = "Python library for interacting with the Duo Auth, Admin, and Accounts APIs";
     homepage = "https://github.com/duosecurity/duo_client_python";