python3Packages.djangorestframework-guardian2: drop in favor of djangorestframework-guardian 0.4.0

This commit is contained in:
Sandro Jäckel
2025-08-22 15:11:19 +02:00
parent e6330dcf18
commit 4d8d60a037
5 changed files with 4 additions and 56 deletions
+1 -3
View File
@@ -308,8 +308,6 @@ let
substituteInPlace authentik/lib/default.yml \
--replace-fail '/blueprints' "$out/blueprints" \
--replace-fail './media' '/var/lib/authentik/media'
substituteInPlace pyproject.toml \
--replace-fail 'djangorestframework-guardian' 'djangorestframework-guardian2'
substituteInPlace authentik/stages/email/utils.py \
--replace-fail 'web/' '${webui}/'
'';
@@ -346,7 +344,7 @@ let
django-storages
django-tenants
djangorestframework
djangorestframework-guardian2
djangorestframework-guardian
docker
drf-orjson-renderer
drf-spectacular
+2 -3
View File
@@ -149,8 +149,7 @@ python.pkgs.buildPythonApplication rec {
fi
substituteInPlace pyproject.toml \
--replace-fail '"--numprocesses=auto",' "" \
--replace-fail '--maxprocesses=16' "--numprocesses=$NIX_BUILD_CORES" \
--replace-fail "djangorestframework-guardian~=0.3.0" "djangorestframework-guardian2"
--replace-fail '--maxprocesses=16' "--numprocesses=$NIX_BUILD_CORES"
'';
nativeBuildInputs = [
@@ -194,7 +193,7 @@ python.pkgs.buildPythonApplication rec {
django-multiselectfield
django-soft-delete
djangorestframework
djangorestframework-guardian2
djangorestframework-guardian
drf-spectacular
drf-spectacular-sidecar
drf-writable-nested
@@ -1,46 +0,0 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
django-guardian,
djangorestframework,
setuptools,
}:
buildPythonPackage rec {
pname = "djangorestframework-guardian2";
version = "0.7.0";
pyproject = true;
src = fetchFromGitHub {
owner = "johnthagen";
repo = "django-rest-framework-guardian2";
tag = "v${version}";
hash = "sha256-LrIhOoBWC3HttjAGbul4zof++OW35pGMyFGZzUpG1Tk=";
};
postPatch = ''
chmod +x manage.py
patchShebangs manage.py
'';
build-system = [ setuptools ];
dependencies = [
django-guardian
djangorestframework
];
checkPhase = ''
./manage.py test
'';
pythonImportsCheck = [ "rest_framework_guardian" ];
meta = with lib; {
description = "Django-guardian support for Django REST Framework";
homepage = "https://github.com/johnthagen/django-rest-framework-guardian2/";
license = licenses.bsd3;
maintainers = with maintainers; [ e1mo ];
};
}
+1
View File
@@ -188,6 +188,7 @@ mapAliases ({
distutils_extra = distutils-extra; # added 2023-10-12
digital-ocean = python-digitalocean; # addad 2024-04-12
dj-stripe = throw "dj-stripe has been removed because it is unused and broken"; # added 2025-07-21
djangorestframework-guardian2 = throw "djangorestframework-guardian2 has been removed because djangorestframework-guardian is active again and the upstream project was archived"; # added 2025-08-22
djangorestframework-jwt = drf-jwt; # added 2021-07-20
django-allauth-2fa = throw "django-allauth-2fa was removed because it was unused and django-allauth now contains 2fa logic itself."; # added 2025-02-15
django-sampledatahelper = throw "django-sampledatahelper was removed because it is no longer compatible to latest Django version"; # added 2022-07-18
-4
View File
@@ -4142,10 +4142,6 @@ self: super: with self; {
callPackage ../development/python-modules/djangorestframework-guardian
{ };
djangorestframework-guardian2 =
callPackage ../development/python-modules/djangorestframework-guardian2
{ };
djangorestframework-jsonp = callPackage ../development/python-modules/djangorestframework-jsonp { };
djangorestframework-recursive =