1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, grpc_google_iam_v1
5, grpcio-gcp
6, google_api_core
7, google_cloud_core
8, pytest
9, mock
10}:
11
12buildPythonPackage rec {
13 pname = "google-cloud-spanner";
14 version = "1.7.1";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "422a1bd5bded723151faeb4d1b1711f5776d2cc23d5c192cf53634eaf55c74aa";
19 };
20
21 checkInputs = [ pytest mock ];
22 propagatedBuildInputs = [ grpcio-gcp grpc_google_iam_v1 google_api_core google_cloud_core ];
23
24 checkPhase = ''
25 pytest tests/unit
26 '';
27
28 meta = with stdenv.lib; {
29 description = "Cloud Spanner API client library";
30 homepage = https://github.com/GoogleCloudPlatform/google-cloud-python;
31 license = licenses.asl20;
32 maintainers = [ maintainers.costrouc ];
33 };
34}