1{ 2 lib, 3 fetchFromGitHub, 4 aiohttp, 5 aioresponses, 6 buildPythonPackage, 7 cachetools, 8 cryptography, 9 flask, 10 freezegun, 11 grpcio, 12 mock, 13 pyasn1-modules, 14 pyjwt, 15 pyopenssl, 16 pytest-asyncio, 17 pytest-localserver, 18 pytestCheckHook, 19 pyu2f, 20 requests, 21 responses, 22 rsa, 23 setuptools, 24}: 25 26buildPythonPackage rec { 27 pname = "google-auth"; 28 version = "2.40.3"; 29 pyproject = true; 30 31 src = fetchFromGitHub { 32 owner = "googleapis"; 33 repo = "google-auth-library-python"; 34 tag = "v${version}"; 35 hash = "sha256-X1HTh24oos2GUxB9DDLtNH7BsBRLD0S/ngjsDAQYvhI="; 36 }; 37 38 build-system = [ setuptools ]; 39 40 dependencies = [ 41 cachetools 42 pyasn1-modules 43 rsa 44 ]; 45 46 optional-dependencies = { 47 aiohttp = [ 48 aiohttp 49 requests 50 ]; 51 enterprise_cert = [ 52 cryptography 53 pyopenssl 54 ]; 55 pyopenssl = [ 56 cryptography 57 pyopenssl 58 ]; 59 pyjwt = [ 60 cryptography 61 pyjwt 62 ]; 63 reauth = [ pyu2f ]; 64 requests = [ requests ]; 65 }; 66 67 pythonRelaxDeps = [ "cachetools" ]; 68 69 nativeCheckInputs = [ 70 aioresponses 71 flask 72 freezegun 73 grpcio 74 mock 75 pytest-asyncio 76 pytest-localserver 77 pytestCheckHook 78 responses 79 ] 80 ++ lib.flatten (lib.attrValues optional-dependencies); 81 82 disabledTestPaths = [ 83 "samples/" 84 "system_tests/" 85 # Requires a running aiohttp event loop 86 "tests_async/" 87 88 # cryptography 44 compat issue 89 "tests/transport/test__mtls_helper.py::TestDecryptPrivateKey::test_success" 90 ]; 91 92 pythonImportsCheck = [ 93 "google.auth" 94 "google.oauth2" 95 ]; 96 97 __darwinAllowLocalNetworking = true; 98 99 meta = { 100 description = "Google Auth Python Library"; 101 longDescription = '' 102 This library simplifies using Google's various server-to-server 103 authentication mechanisms to access Google APIs. 104 ''; 105 homepage = "https://github.com/googleapis/google-auth-library-python"; 106 changelog = "https://github.com/googleapis/google-auth-library-python/blob/${src.tag}/CHANGELOG.md"; 107 license = lib.licenses.asl20; 108 maintainers = [ lib.maintainers.sarahec ]; 109 }; 110}