Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 7 # build-system 8 setuptools, 9 10 # dependencies 11 django, 12 pytz, 13 14 # tests 15 coreapi, 16 coreschema, 17 django-guardian, 18 inflection, 19 psycopg2, 20 pytestCheckHook, 21 pytest-django, 22 pyyaml, 23}: 24 25buildPythonPackage rec { 26 pname = "djangorestframework"; 27 version = "3.15.1"; 28 format = "setuptools"; 29 disabled = pythonOlder "3.6"; 30 31 src = fetchFromGitHub { 32 owner = "encode"; 33 repo = "django-rest-framework"; 34 rev = version; 35 hash = "sha256-G914NvxRmKGkxrozoWNUIoI74YkYRbeNcQwIG4iSeXU="; 36 }; 37 38 build-system = [ 39 setuptools 40 ]; 41 42 dependencies = [ 43 django 44 pytz 45 ]; 46 47 nativeCheckInputs = [ 48 pytest-django 49 pytestCheckHook 50 51 # optional tests 52 coreapi 53 coreschema 54 django-guardian 55 inflection 56 psycopg2 57 pyyaml 58 ]; 59 60 disabledTests = [ 61 # https://github.com/encode/django-rest-framework/issues/9422 62 "test_urlpatterns" 63 ]; 64 65 pythonImportsCheck = [ "rest_framework" ]; 66 67 meta = with lib; { 68 changelog = "https://github.com/encode/django-rest-framework/releases/tag/3.15.1"; 69 description = "Web APIs for Django, made easy"; 70 homepage = "https://www.django-rest-framework.org/"; 71 maintainers = with maintainers; [ desiderius ]; 72 license = licenses.bsd2; 73 }; 74}