121 lines
2.2 KiB
Nix
121 lines
2.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitea,
|
|
pythonOlder,
|
|
python,
|
|
|
|
# build-system
|
|
setuptools,
|
|
|
|
# build-time dependencies
|
|
gettext,
|
|
|
|
# dependencies
|
|
asgiref,
|
|
django,
|
|
|
|
# optional-dependencies
|
|
fido2,
|
|
oauthlib,
|
|
python3-openid,
|
|
python3-saml,
|
|
requests,
|
|
requests-oauthlib,
|
|
pyjwt,
|
|
qrcode,
|
|
|
|
# tests
|
|
django-ninja,
|
|
djangorestframework,
|
|
pillow,
|
|
psycopg2,
|
|
pytest-asyncio,
|
|
pytest-django,
|
|
pytestCheckHook,
|
|
pyyaml,
|
|
|
|
# passthru tests
|
|
dj-rest-auth,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "django-allauth";
|
|
version = "65.9.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitea {
|
|
domain = "codeberg.org";
|
|
owner = "allauth";
|
|
repo = "django-allauth";
|
|
tag = version;
|
|
hash = "sha256-gusA9TnsgSSnWBPwHsNYeESD9nX5DWh4HqMgcsoJRw0=";
|
|
};
|
|
|
|
nativeBuildInputs = [ gettext ];
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
asgiref
|
|
django
|
|
];
|
|
|
|
preBuild = ''
|
|
${python.pythonOnBuildForHost.interpreter} -m django compilemessages
|
|
'';
|
|
|
|
optional-dependencies = {
|
|
idp-oidc = [
|
|
oauthlib
|
|
pyjwt
|
|
]
|
|
++ pyjwt.optional-dependencies.crypto;
|
|
mfa = [
|
|
fido2
|
|
qrcode
|
|
];
|
|
openid = [ python3-openid ];
|
|
saml = [ python3-saml ];
|
|
socialaccount = [
|
|
requests
|
|
requests-oauthlib
|
|
pyjwt
|
|
]
|
|
++ pyjwt.optional-dependencies.crypto;
|
|
steam = [ python3-openid ];
|
|
};
|
|
|
|
pythonImportsCheck = [ "allauth" ];
|
|
|
|
nativeCheckInputs = [
|
|
django-ninja
|
|
djangorestframework
|
|
pillow
|
|
psycopg2
|
|
pytest-asyncio
|
|
pytest-django
|
|
pytestCheckHook
|
|
pyyaml
|
|
]
|
|
++ lib.flatten (builtins.attrValues optional-dependencies);
|
|
|
|
disabledTests = [
|
|
# Tests require network access
|
|
"test_login"
|
|
];
|
|
|
|
passthru.tests = { inherit dj-rest-auth; };
|
|
|
|
meta = {
|
|
description = "Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication";
|
|
changelog = "https://codeberg.org/allauth/django-allauth/src/tag/${version}/ChangeLog.rst";
|
|
downloadPage = "https://codeberg.org/allauth/django-allauth";
|
|
homepage = "https://allauth.org";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ derdennisop ];
|
|
};
|
|
}
|