2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-02-16 17:04:54 +00:00
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
2021-03-09 03:18:52 +00:00
|
|
|
, google-api-python-client
|
2021-02-16 17:04:54 +00:00
|
|
|
, google-auth-oauthlib
|
2020-04-24 23:36:52 +00:00
|
|
|
, jupyterhub
|
|
|
|
, mwoauth
|
|
|
|
, pyjwt
|
2021-02-16 17:04:54 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "oauthenticator";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "16.1.1";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-Obv4MJvO7li+KqI2l6KxfxjpbZVD5KFJwjn/u+UtaQQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace " --cov=oauthenticator" ""
|
|
|
|
'';
|
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jupyterhub
|
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
azuread = [
|
|
|
|
pyjwt
|
|
|
|
];
|
|
|
|
googlegroups = [
|
|
|
|
google-api-python-client
|
|
|
|
google-auth-oauthlib
|
|
|
|
];
|
|
|
|
mediawiki = [
|
|
|
|
mwoauth
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-16 17:04:54 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
2023-08-22 20:05:09 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTests = [
|
2022-06-16 17:23:12 +00:00
|
|
|
# Tests are outdated, https://github.com/jupyterhub/oauthenticator/issues/432
|
2021-05-20 23:08:51 +00:00
|
|
|
"test_azuread"
|
|
|
|
"test_mediawiki"
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"oauthenticator"
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2023-08-22 20:05:09 +00:00
|
|
|
description = "Authenticate JupyterHub users with common OAuth providers";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/jupyterhub/oauthenticator";
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://github.com/jupyterhub/oauthenticator/blob/${version}/docs/source/reference/changelog.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|