python3Packages.djangorestframework-guardian2: init at 0.5.0

This commit is contained in:
Moritz 'e1mo' Fromm 2023-04-24 23:07:44 +02:00 committed by Yureka
parent 5effdaaa40
commit 775f14969b
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, django-guardian
, djangorestframework
}:
buildPythonPackage rec {
pname = "djangorestframework-guardian2";
version = "0.5.0";
src = fetchFromGitHub {
owner = "johnthagen";
repo = "django-rest-framework-guardian2";
rev = "v${version}";
hash = "sha256-aW20xEmVTAgwayWMJsabmyKNW65NftJyQANtT6JV74U=";
};
postPatch = ''
chmod +x manage.py
patchShebangs manage.py
'';
propagatedBuildInputs = [
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 ];
};
}

View File

@ -2747,6 +2747,8 @@ self: super: with self; {
djangorestframework-guardian = callPackage ../development/python-modules/djangorestframework-guardian { };
djangorestframework-guardian2 = callPackage ../development/python-modules/djangorestframework-guardian2 { };
djangorestframework-recursive = callPackage ../development/python-modules/djangorestframework-recursive { };
djangorestframework-simplejwt = callPackage ../development/python-modules/djangorestframework-simplejwt { };