Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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.2"; 29 pyproject = true; 30 31 src = fetchFromGitHub { 32 owner = "googleapis"; 33 repo = "google-auth-library-python"; 34 tag = "v${version}"; 35 hash = "sha256-jO6brNdTH8BitLKKP/nwrlUo5hfQnThT/bPbzefvRbM="; 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 nativeCheckInputs = [ 68 aioresponses 69 flask 70 freezegun 71 grpcio 72 mock 73 pytest-asyncio 74 pytest-localserver 75 pytestCheckHook 76 responses 77 ] 78 ++ lib.flatten (lib.attrValues optional-dependencies); 79 80 disabledTestPaths = [ 81 "samples/" 82 "system_tests/" 83 # Requires a running aiohttp event loop 84 "tests_async/" 85 86 # cryptography 44 compat issue 87 "tests/transport/test__mtls_helper.py::TestDecryptPrivateKey::test_success" 88 ]; 89 90 pythonImportsCheck = [ 91 "google.auth" 92 "google.oauth2" 93 ]; 94 95 __darwinAllowLocalNetworking = true; 96 97 meta = { 98 description = "Google Auth Python Library"; 99 longDescription = '' 100 This library simplifies using Google's various server-to-server 101 authentication mechanisms to access Google APIs. 102 ''; 103 homepage = "https://github.com/googleapis/google-auth-library-python"; 104 changelog = "https://github.com/googleapis/google-auth-library-python/blob/v${version}/CHANGELOG.md"; 105 license = lib.licenses.asl20; 106 maintainers = [ lib.maintainers.sarahec ]; 107 }; 108}