mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 21:53:32 +00:00
e56f2db3fc
Changelog: https://github.com/jupyterhub/oauthenticator/blob/16.1.1/docs/source/reference/changelog.md
73 lines
1.5 KiB
Nix
73 lines
1.5 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, pythonOlder
|
|
, fetchPypi
|
|
, google-api-python-client
|
|
, google-auth-oauthlib
|
|
, jupyterhub
|
|
, mwoauth
|
|
, pyjwt
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
, requests-mock
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "oauthenticator";
|
|
version = "16.1.1";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-Obv4MJvO7li+KqI2l6KxfxjpbZVD5KFJwjn/u+UtaQQ=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace " --cov=oauthenticator" ""
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
jupyterhub
|
|
];
|
|
|
|
passthru.optional-dependencies = {
|
|
azuread = [
|
|
pyjwt
|
|
];
|
|
googlegroups = [
|
|
google-api-python-client
|
|
google-auth-oauthlib
|
|
];
|
|
mediawiki = [
|
|
mwoauth
|
|
];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
requests-mock
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
|
|
|
disabledTests = [
|
|
# Tests are outdated, https://github.com/jupyterhub/oauthenticator/issues/432
|
|
"test_azuread"
|
|
"test_mediawiki"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"oauthenticator"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Authenticate JupyterHub users with common OAuth providers";
|
|
homepage = "https://github.com/jupyterhub/oauthenticator";
|
|
changelog = "https://github.com/jupyterhub/oauthenticator/blob/${version}/docs/source/reference/changelog.md";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ ixxie ];
|
|
};
|
|
}
|