Files
nixpkgs/pkgs/development/python-modules/django-allauth/default.nix
T
Fernando Rodrigues 3562403503 treewide: fetchFromGitea -> fetchFromCodeberg
Most packages that used fetchFromGitea fetch their sources from Codeberg, so might as well migrate them.

The following command was used for this treewide:
```fish
for i in (rg 'fetchFromGitea \{\n *domain = "codeberg.org";' --multiline --files-with-matches)
    sed -z 's/fetchFromGitea {\n *domain = "codeberg.org";/fetchFromCodeberg {/g' $i > $i.tmp && mv $i.tmp $i
    sed -i 's/fetchFromGitea/fetchFromCodeberg/g' $i
end
```

The following paths were manually edited:

* pkgs/by-name/xr/xrsh/package.nix
* pkgs/applications/networking/browsers/librewolf/src.nix
* pkgs/by-name/go/gotosocial/package.nix
* pkgs/by-name/ka/katawa-shoujo-re-engineered/package.nix

Co-authored-by: Gutyina Gergő <gutyina.gergo.2@gmail.com>
Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2026-01-31 21:08:16 +11:00

126 lines
2.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromCodeberg,
python,
# build-system
setuptools,
setuptools-scm,
# 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.14.0";
pyproject = true;
src = fetchFromCodeberg {
owner = "allauth";
repo = "django-allauth";
tag = version;
hash = "sha256-hoPNSMzn/bX98Qe+7guaLK8UhA5FfHpUCjzN6hCXVgs=";
};
nativeBuildInputs = [ gettext ];
build-system = [
setuptools
setuptools-scm
];
dependencies = [
asgiref
django
];
preBuild = ''
${python.pythonOnBuildForHost.interpreter} -m django compilemessages
'';
optional-dependencies = {
headless = [
pyjwt
]
++ pyjwt.optional-dependencies.crypto;
headless-spec = [ pyyaml ];
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.concatAttrValues 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/${src.tag}/ChangeLog.rst";
downloadPage = "https://codeberg.org/allauth/django-allauth";
homepage = "https://allauth.org";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ derdennisop ];
};
}