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