Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 django-guardian, 6 djangorestframework, 7 setuptools, 8}: 9 10buildPythonPackage rec { 11 pname = "djangorestframework-guardian2"; 12 version = "0.7.0"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "johnthagen"; 17 repo = "django-rest-framework-guardian2"; 18 tag = "v${version}"; 19 hash = "sha256-LrIhOoBWC3HttjAGbul4zof++OW35pGMyFGZzUpG1Tk="; 20 }; 21 22 postPatch = '' 23 chmod +x manage.py 24 patchShebangs manage.py 25 ''; 26 27 build-system = [ setuptools ]; 28 29 dependencies = [ 30 django-guardian 31 djangorestframework 32 ]; 33 34 checkPhase = '' 35 ./manage.py test 36 ''; 37 38 pythonImportsCheck = [ "rest_framework_guardian" ]; 39 40 meta = with lib; { 41 description = "Django-guardian support for Django REST Framework"; 42 homepage = "https://github.com/johnthagen/django-rest-framework-guardian2/"; 43 license = licenses.bsd3; 44 maintainers = with maintainers; [ e1mo ]; 45 }; 46}