Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 google-api-core, 6 google-cloud-testutils, 7 mock, 8 pandas, 9 proto-plus, 10 protobuf, 11 pytest-asyncio, 12 pytestCheckHook, 13 pythonOlder, 14 setuptools, 15}: 16 17buildPythonPackage rec { 18 pname = "google-cloud-monitoring"; 19 version = "2.27.1"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchPypi { 25 pname = "google_cloud_monitoring"; 26 inherit version; 27 hash = "sha256-9HAJAKZYzWybf3FLsp0Af6zvDPDWKNAHVpnDpzvOilU="; 28 }; 29 30 build-system = [ setuptools ]; 31 32 dependencies = [ 33 google-api-core 34 proto-plus 35 protobuf 36 ] ++ google-api-core.optional-dependencies.grpc; 37 38 optional-dependencies = { 39 pandas = [ pandas ]; 40 }; 41 42 nativeCheckInputs = [ 43 google-cloud-testutils 44 mock 45 pytestCheckHook 46 pytest-asyncio 47 ] ++ optional-dependencies.pandas; 48 49 disabledTests = [ 50 # Test requires credentials 51 "test_list_monitored_resource_descriptors" 52 # Test requires PRROJECT_ID 53 "test_list_alert_policies" 54 ]; 55 56 pythonImportsCheck = [ 57 "google.cloud.monitoring" 58 "google.cloud.monitoring_v3" 59 ]; 60 61 meta = with lib; { 62 description = "Stackdriver Monitoring API client library"; 63 homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-monitoring"; 64 changelog = "https://github.com/googleapis/google-cloud-python/tree/google-cloud-monitoring-v${version}/packages/google-cloud-monitoring"; 65 license = licenses.asl20; 66 maintainers = [ ]; 67 }; 68}