2021-04-25 03:57:28 +00:00
|
|
|
|
{ stdenv
|
|
|
|
|
, lib
|
2021-01-09 10:05:03 +00:00
|
|
|
|
, buildPythonPackage
|
|
|
|
|
, fetchPypi
|
|
|
|
|
, cachetools
|
2022-08-12 12:06:08 +00:00
|
|
|
|
, pyasn1-modules
|
|
|
|
|
, rsa
|
|
|
|
|
, six
|
|
|
|
|
, aiohttp
|
2022-07-14 12:49:19 +00:00
|
|
|
|
, cryptography
|
2022-08-12 12:06:08 +00:00
|
|
|
|
, pyopenssl
|
|
|
|
|
, pyu2f
|
|
|
|
|
, requests
|
|
|
|
|
, aioresponses
|
|
|
|
|
, asynctest
|
2021-01-09 10:05:03 +00:00
|
|
|
|
, flask
|
|
|
|
|
, freezegun
|
2022-08-12 12:06:08 +00:00
|
|
|
|
, grpcio
|
2021-01-09 10:05:03 +00:00
|
|
|
|
, mock
|
|
|
|
|
, oauth2client
|
2022-08-12 12:06:08 +00:00
|
|
|
|
, pytest-asyncio
|
2021-01-09 10:05:03 +00:00
|
|
|
|
, pytest-localserver
|
2022-08-12 12:06:08 +00:00
|
|
|
|
, pytestCheckHook
|
2021-01-09 10:05:03 +00:00
|
|
|
|
, responses
|
2022-08-12 12:06:08 +00:00
|
|
|
|
, urllib3
|
2021-01-09 10:05:03 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
|
pname = "google-auth";
|
2022-11-04 12:27:35 +00:00
|
|
|
|
version = "2.14.0";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
|
inherit pname version;
|
2022-11-04 12:27:35 +00:00
|
|
|
|
sha256 = "sha256-zySBeFXYdO3i79BxqiISVEX1Vd4Whbc5qXgvz0CMKj0=";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
|
cachetools
|
|
|
|
|
pyasn1-modules
|
|
|
|
|
rsa
|
2022-08-12 12:06:08 +00:00
|
|
|
|
six
|
2021-04-05 15:23:46 +00:00
|
|
|
|
];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
|
aiohttp = [
|
|
|
|
|
aiohttp
|
|
|
|
|
requests
|
|
|
|
|
];
|
|
|
|
|
enterprise_cert = [
|
|
|
|
|
cryptography
|
|
|
|
|
pyopenssl
|
|
|
|
|
];
|
|
|
|
|
pyopenssl = [
|
|
|
|
|
pyopenssl
|
|
|
|
|
];
|
|
|
|
|
reauth = [
|
|
|
|
|
pyu2f
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
|
checkInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
|
aioresponses
|
|
|
|
|
asynctest
|
2021-01-09 10:05:03 +00:00
|
|
|
|
flask
|
|
|
|
|
freezegun
|
2022-08-12 12:06:08 +00:00
|
|
|
|
grpcio
|
2021-01-09 10:05:03 +00:00
|
|
|
|
mock
|
|
|
|
|
oauth2client
|
2022-08-12 12:06:08 +00:00
|
|
|
|
pytest-asyncio
|
2021-01-09 10:05:03 +00:00
|
|
|
|
pytest-localserver
|
2022-08-12 12:06:08 +00:00
|
|
|
|
pytestCheckHook
|
2021-01-09 10:05:03 +00:00
|
|
|
|
responses
|
2022-08-12 12:06:08 +00:00
|
|
|
|
urllib3
|
|
|
|
|
] ++ passthru.optional-dependencies.aiohttp
|
2022-09-09 14:08:57 +00:00
|
|
|
|
# `cryptography` is still required on `aarch64-darwin` for `tests/crypt/*`
|
|
|
|
|
++ (if (stdenv.isDarwin && stdenv.isAarch64) then [ cryptography ] else passthru.optional-dependencies.enterprise_cert)
|
2022-08-12 12:06:08 +00:00
|
|
|
|
++ passthru.optional-dependencies.reauth;
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
|
"google.auth"
|
|
|
|
|
"google.oauth2"
|
|
|
|
|
];
|
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
|
disabledTestPaths = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
|
|
|
|
|
# Disable tests using pyOpenSSL as it does not build on M1 Macs
|
2022-07-14 12:49:19 +00:00
|
|
|
|
"tests/transport/test__mtls_helper.py"
|
|
|
|
|
"tests/transport/test_requests.py"
|
|
|
|
|
"tests/transport/test_urllib3.py"
|
2022-09-09 14:08:57 +00:00
|
|
|
|
"tests/transport/test__custom_tls_signer.py"
|
2021-04-25 03:57:28 +00:00
|
|
|
|
];
|
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
|
meta = with lib; {
|
2021-01-09 10:05:03 +00:00
|
|
|
|
description = "Google Auth Python Library";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
This library simplifies using Google’s various server-to-server
|
|
|
|
|
authentication mechanisms to access Google APIs.
|
|
|
|
|
'';
|
|
|
|
|
homepage = "https://github.com/googleapis/google-auth-library-python";
|
|
|
|
|
changelog = "https://github.com/googleapis/google-auth-library-python/blob/v${version}/CHANGELOG.md";
|
|
|
|
|
license = licenses.asl20;
|
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
|
};
|
|
|
|
|
}
|