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