Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv 2, buildPythonPackage 3, fetchPypi 4, enum34 5, google_api_core 6, pytest 7, mock 8}: 9 10buildPythonPackage rec { 11 pname = "google-cloud-redis"; 12 version = "1.0.0"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "73057750d6afcfc90c224ee4ffa3262b5e85e866b4db676f74a07b49713f2c3a"; 17 }; 18 19 checkInputs = [ pytest mock ]; 20 propagatedBuildInputs = [ enum34 google_api_core ]; 21 22 # requires old version of google-api-core (override) 23 preBuild = '' 24 sed -i "s/'google-api-core\[grpc\] >= 0.1.0, < 0.2.0dev'/'google-api-core'/g" setup.py 25 sed -i "s/google-api-core\[grpc\]<0.2.0dev,>=0.1.0/google-api-core/g" google_cloud_redis.egg-info/requires.txt 26 ''; 27 28 checkPhase = '' 29 pytest tests/unit 30 ''; 31 32 meta = with stdenv.lib; { 33 description = "Google Cloud Memorystore for Redis API client library"; 34 homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python"; 35 license = licenses.asl20; 36 maintainers = [ maintainers.costrouc ]; 37 }; 38}