Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 aiounittest, 4 buildPythonPackage, 5 fetchPypi, 6 freezegun, 7 google-api-core, 8 google-cloud-core, 9 google-cloud-testutils, 10 mock, 11 proto-plus, 12 protobuf, 13 pytest-asyncio, 14 pytestCheckHook, 15 pythonOlder, 16 setuptools, 17}: 18 19buildPythonPackage rec { 20 pname = "google-cloud-firestore"; 21 version = "2.17.0"; 22 pyproject = true; 23 24 disabled = pythonOlder "3.7"; 25 26 src = fetchPypi { 27 inherit pname version; 28 hash = "sha256-PoG3HZY7fjvMh/uBMjbzhkvHsKPyB6xNh7xlle/iuKM="; 29 }; 30 31 build-system = [ setuptools ]; 32 33 dependencies = [ 34 google-api-core 35 google-cloud-core 36 proto-plus 37 protobuf 38 ] ++ google-api-core.optional-dependencies.grpc; 39 40 nativeCheckInputs = [ 41 aiounittest 42 freezegun 43 google-cloud-testutils 44 mock 45 pytest-asyncio 46 pytestCheckHook 47 ]; 48 49 preCheck = '' 50 # do not shadow imports 51 rm -r google 52 ''; 53 54 disabledTestPaths = [ 55 # Tests are broken 56 "tests/system/test_system.py" 57 "tests/system/test_system_async.py" 58 # Test requires credentials 59 "tests/unit/v1/test_bulk_writer.py" 60 ]; 61 62 disabledTests = [ 63 # Test requires credentials 64 "test_collections" 65 ]; 66 67 pythonImportsCheck = [ 68 "google.cloud.firestore_v1" 69 "google.cloud.firestore_admin_v1" 70 ]; 71 72 meta = with lib; { 73 description = "Google Cloud Firestore API client library"; 74 homepage = "https://github.com/googleapis/python-firestore"; 75 changelog = "https://github.com/googleapis/python-firestore/blob/v${version}/CHANGELOG.md"; 76 license = licenses.asl20; 77 maintainers = [ ]; 78 }; 79}