Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 aiohttp, 5 aioresponses, 6 buildPythonPackage, 7 cachetools, 8 cryptography, 9 fetchPypi, 10 flask, 11 freezegun, 12 grpcio, 13 mock, 14 oauth2client, 15 pyasn1-modules, 16 pyopenssl, 17 pytest-asyncio, 18 pytest-localserver, 19 pytestCheckHook, 20 pythonOlder, 21 pyu2f, 22 requests, 23 responses, 24 rsa, 25 setuptools, 26}: 27 28buildPythonPackage rec { 29 pname = "google-auth"; 30 version = "2.30.0"; 31 pyproject = true; 32 33 disabled = pythonOlder "3.7"; 34 35 src = fetchPypi { 36 inherit pname version; 37 hash = "sha256-q2MKEyD2cgkJrXan29toQc31xmsyjWkAJ+SGe9+xZog="; 38 }; 39 40 nativeBuildInputs = [ setuptools ]; 41 42 propagatedBuildInputs = [ 43 cachetools 44 pyasn1-modules 45 rsa 46 ]; 47 48 passthru.optional-dependencies = { 49 aiohttp = [ 50 aiohttp 51 requests 52 ]; 53 enterprise_cert = [ 54 cryptography 55 pyopenssl 56 ]; 57 pyopenssl = [ 58 cryptography 59 pyopenssl 60 ]; 61 reauth = [ pyu2f ]; 62 requests = [ requests ]; 63 }; 64 65 nativeCheckInputs = 66 [ 67 aioresponses 68 flask 69 freezegun 70 grpcio 71 mock 72 oauth2client 73 pytest-asyncio 74 pytest-localserver 75 pytestCheckHook 76 responses 77 ] 78 ++ passthru.optional-dependencies.aiohttp 79 ++ passthru.optional-dependencies.enterprise_cert 80 ++ passthru.optional-dependencies.reauth; 81 82 pythonImportsCheck = [ 83 "google.auth" 84 "google.oauth2" 85 ]; 86 87 disabledTestPaths = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ 88 # Disable tests using pyOpenSSL as it does not build on M1 Macs 89 "tests/transport/test__mtls_helper.py" 90 "tests/transport/test_requests.py" 91 "tests/transport/test_urllib3.py" 92 "tests/transport/test__custom_tls_signer.py" 93 ]; 94 95 __darwinAllowLocalNetworking = true; 96 97 meta = with lib; { 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 = licenses.asl20; 106 maintainers = [ ]; 107 }; 108}