1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 django, 6 python, 7 pytest-django, 8 pytestCheckHook, 9 djangorestframework, 10 setuptools, 11}: 12 13buildPythonPackage rec { 14 pname = "djangorestframework-jsonp"; 15 version = "1.0.2"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "jpadilla"; 20 repo = "django-rest-framework-jsonp"; 21 tag = version; 22 hash = "sha256-4mIO69GhtvbQBtztHVQYIDDDSZpKg0g7BFNHEupiYTs="; 23 }; 24 25 build-system = [ setuptools ]; 26 27 dependencies = [ 28 django 29 djangorestframework 30 ]; 31 32 checkInputs = [ 33 pytestCheckHook 34 pytest-django 35 ]; 36 37 # Test fail with Django >=4 38 # https://github.com/jpadilla/django-rest-framework-jsonp/issues/14 39 doCheck = false; 40 41 checkPhase = '' 42 runHook preCheck 43 rm tests/test_renderers.py 44 ${python.interpreter} runtests.py 45 runHook postCheck 46 ''; 47 48 pythonImportsCheck = [ "rest_framework_jsonp" ]; 49 50 meta = { 51 description = "JSONP support for Django REST Framework"; 52 homepage = "https://jpadilla.github.io/django-rest-framework-jsonp/"; 53 license = lib.licenses.bsd3; 54 maintainers = [ lib.maintainers.onny ]; 55 }; 56}