1{ lib 2, buildPythonPackage 3, fetchPypi 4, pytestCheckHook 5, google-auth 6, google-cloud-iam 7, google-cloud-core 8, google-cloud-kms 9, google-cloud-testutils 10, google-resumable-media 11, mock 12}: 13 14buildPythonPackage rec { 15 pname = "google-cloud-storage"; 16 version = "1.42.3"; 17 18 src = fetchPypi { 19 inherit pname version; 20 sha256 = "sha256-d1TU3KpFl1UUtATs4NortCkqy8Z8pVmmnhKhnVT82wY="; 21 }; 22 23 propagatedBuildInputs = [ 24 google-auth 25 google-cloud-core 26 google-resumable-media 27 ]; 28 29 checkInputs = [ 30 google-cloud-iam 31 google-cloud-kms 32 google-cloud-testutils 33 mock 34 pytestCheckHook 35 ]; 36 37 # disable tests which require credentials and network access 38 disabledTests = [ 39 "create" 40 "download" 41 "get" 42 "post" 43 "test_build_api_url" 44 "test_ctor_mtls" 45 "test_hmac_key_crud" 46 "test_list_buckets" 47 "test_open" 48 "test_anonymous_client_access_to_public_bucket" 49 ]; 50 51 disabledTestPaths = [ 52 "tests/unit/test_bucket.py" 53 "tests/system/test_blob.py" 54 "tests/system/test_bucket.py" 55 "tests/system/test_fileio.py" 56 "tests/system/test_kms_integration.py" 57 ]; 58 59 preCheck = '' 60 # prevent google directory from shadowing google imports 61 rm -r google 62 63 # requires docker and network 64 rm tests/conformance/test_conformance.py 65 ''; 66 67 pythonImportsCheck = [ "google.cloud.storage" ]; 68 69 meta = with lib; { 70 description = "Google Cloud Storage API client library"; 71 homepage = "https://github.com/googleapis/python-storage"; 72 license = licenses.asl20; 73 maintainers = with maintainers; [ SuperSandro2000 ]; 74 }; 75}