Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 gitUpdater,
6 google-api-core,
7 google-auth,
8 grpc-google-iam-v1,
9 libcst,
10 mock,
11 proto-plus,
12 protobuf,
13 pytest-asyncio,
14 pytestCheckHook,
15 setuptools,
16}:
17
18buildPythonPackage rec {
19 pname = "google-cloud-iam";
20 version = "3.31.3";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "googleapis";
25 repo = "google-cloud-python";
26 tag = "google-cloud-build-v${version}";
27 hash = "sha256-qQ+8X6I8lt4OTgbvODsbdab2dYUk0wxWsbaVT2T651U=";
28 };
29
30 sourceRoot = "${src.name}/packages/google-cloud-iam";
31
32 build-system = [ setuptools ];
33
34 dependencies = [
35 google-api-core
36 google-auth
37 grpc-google-iam-v1
38 libcst
39 proto-plus
40 protobuf
41 ]
42 ++ google-api-core.optional-dependencies.grpc;
43
44 nativeCheckInputs = [
45 mock
46 pytest-asyncio
47 pytestCheckHook
48 ];
49
50 disabledTestPaths = [
51 # unmaintained, reference wrong import path for google.cloud.iam.v1
52 "tests/unit/gapic/iam_admin_v1/test_iam.py"
53 ];
54
55 pythonImportsCheck = [
56 "google.cloud.iam_credentials"
57 "google.cloud.iam_credentials_v1"
58 ];
59
60 passthru.updateScript = gitUpdater {
61 rev-prefix = "google-cloud-iam-v";
62 };
63
64 meta = {
65 description = "IAM Service Account Credentials API client library";
66 homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-iam";
67 changelog = "https://github.com/googleapis/google-cloud-python/blob/${src.tag}/packages/google-cloud-iam/CHANGELOG.md";
68 license = lib.licenses.asl20;
69 maintainers = with lib.maintainers; [
70 austinbutler
71 sarahec
72 ];
73 };
74}