Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitea, 5 pythonOlder, 6 python, 7 8 # build-system 9 setuptools, 10 11 # build-time dependencies 12 gettext, 13 14 # dependencies 15 asgiref, 16 django, 17 18 # optional-dependencies 19 fido2, 20 oauthlib, 21 python3-openid, 22 python3-saml, 23 requests, 24 requests-oauthlib, 25 pyjwt, 26 qrcode, 27 28 # tests 29 django-ninja, 30 djangorestframework, 31 pillow, 32 psycopg2, 33 pytest-asyncio, 34 pytest-django, 35 pytestCheckHook, 36 pyyaml, 37 38 # passthru tests 39 dj-rest-auth, 40}: 41 42buildPythonPackage rec { 43 pname = "django-allauth"; 44 version = "65.9.0"; 45 pyproject = true; 46 47 disabled = pythonOlder "3.8"; 48 49 src = fetchFromGitea { 50 domain = "codeberg.org"; 51 owner = "allauth"; 52 repo = "django-allauth"; 53 tag = version; 54 hash = "sha256-gusA9TnsgSSnWBPwHsNYeESD9nX5DWh4HqMgcsoJRw0="; 55 }; 56 57 nativeBuildInputs = [ gettext ]; 58 59 build-system = [ setuptools ]; 60 61 dependencies = [ 62 asgiref 63 django 64 ]; 65 66 preBuild = '' 67 ${python.pythonOnBuildForHost.interpreter} -m django compilemessages 68 ''; 69 70 optional-dependencies = { 71 idp-oidc = [ 72 oauthlib 73 pyjwt 74 ] 75 ++ pyjwt.optional-dependencies.crypto; 76 mfa = [ 77 fido2 78 qrcode 79 ]; 80 openid = [ python3-openid ]; 81 saml = [ python3-saml ]; 82 socialaccount = [ 83 requests 84 requests-oauthlib 85 pyjwt 86 ] 87 ++ pyjwt.optional-dependencies.crypto; 88 steam = [ python3-openid ]; 89 }; 90 91 pythonImportsCheck = [ "allauth" ]; 92 93 nativeCheckInputs = [ 94 django-ninja 95 djangorestframework 96 pillow 97 psycopg2 98 pytest-asyncio 99 pytest-django 100 pytestCheckHook 101 pyyaml 102 ] 103 ++ lib.flatten (builtins.attrValues optional-dependencies); 104 105 disabledTests = [ 106 # Tests require network access 107 "test_login" 108 ]; 109 110 passthru.tests = { inherit dj-rest-auth; }; 111 112 meta = { 113 description = "Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication"; 114 changelog = "https://codeberg.org/allauth/django-allauth/src/tag/${version}/ChangeLog.rst"; 115 downloadPage = "https://codeberg.org/allauth/django-allauth"; 116 homepage = "https://allauth.org"; 117 license = lib.licenses.mit; 118 maintainers = with lib.maintainers; [ derdennisop ]; 119 }; 120}