1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, freezegun 5, mock 6, pytestCheckHook 7, pythonOlder 8, pytz 9, setuptools 10, six 11}: 12 13buildPythonPackage rec { 14 pname = "duo-client"; 15 version = "5.0.1"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "duosecurity"; 22 repo = "duo_client_python"; 23 rev = "refs/tags/${version}"; 24 hash = "sha256-G0XLZZaQTPD64WXN34wq2z+YtzECgtC2nJXzDxAlgyg="; 25 }; 26 27 postPatch = '' 28 substituteInPlace requirements-dev.txt \ 29 --replace "dlint" "" \ 30 --replace "flake8" "" 31 ''; 32 33 nativeBuildInputs = [ 34 setuptools 35 ]; 36 37 propagatedBuildInputs = [ 38 six 39 ]; 40 41 nativeCheckInputs = [ 42 freezegun 43 mock 44 pytestCheckHook 45 pytz 46 ]; 47 48 pythonImportsCheck = [ 49 "duo_client" 50 ]; 51 52 disabledTests = [ 53 # Tests require network access 54 "test_server_hostname" 55 "test_server_hostname_with_port" 56 ]; 57 58 meta = with lib; { 59 description = "Python library for interacting with the Duo Auth, Admin, and Accounts APIs"; 60 homepage = "https://github.com/duosecurity/duo_client_python"; 61 changelog = "https://github.com/duosecurity/duo_client_python/releases/tag/${version}"; 62 license = licenses.bsd3; 63 maintainers = with maintainers; [ ]; 64 }; 65}