Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchPypi, 6 google-api-python-client, 7 google-auth-oauthlib, 8 jsonschema, 9 jupyterhub, 10 mwoauth, 11 pyjwt, 12 pytest-asyncio, 13 pytestCheckHook, 14 requests, 15 requests-mock, 16 ruamel-yaml, 17 setuptools, 18 tornado, 19 traitlets, 20}: 21 22buildPythonPackage rec { 23 pname = "oauthenticator"; 24 version = "16.3.1"; 25 pyproject = true; 26 27 disabled = pythonOlder "3.7"; 28 29 src = fetchPypi { 30 inherit pname version; 31 hash = "sha256-gFhhOCcmorkrLxrup9fICh5ueCrc64fxfuZXTQG1tMk="; 32 }; 33 34 postPatch = '' 35 substituteInPlace pyproject.toml \ 36 --replace-fail " --cov=oauthenticator" "" 37 ''; 38 39 build-system = [ setuptools ]; 40 41 dependencies = [ 42 jsonschema 43 jupyterhub 44 pyjwt 45 requests 46 ruamel-yaml 47 tornado 48 traitlets 49 ]; 50 51 passthru.optional-dependencies = { 52 googlegroups = [ 53 google-api-python-client 54 google-auth-oauthlib 55 ]; 56 mediawiki = [ mwoauth ]; 57 }; 58 59 nativeCheckInputs = [ 60 pytest-asyncio 61 pytestCheckHook 62 requests-mock 63 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 64 65 disabledTests = [ 66 # Tests are outdated, https://github.com/jupyterhub/oauthenticator/issues/432 67 "test_azuread" 68 "test_mediawiki" 69 # Tests require network access 70 "test_allowed" 71 "test_auth0" 72 "test_bitbucket" 73 "test_cilogon" 74 "test_github" 75 "test_gitlab" 76 "test_globus" 77 "test_google" 78 "test_openshift" 79 ]; 80 81 pythonImportsCheck = [ "oauthenticator" ]; 82 83 meta = with lib; { 84 description = "Authenticate JupyterHub users with common OAuth providers"; 85 homepage = "https://github.com/jupyterhub/oauthenticator"; 86 changelog = "https://github.com/jupyterhub/oauthenticator/blob/${version}/docs/source/reference/changelog.md"; 87 license = licenses.bsd3; 88 maintainers = [ ]; 89 }; 90}