diff --git a/pkgs/development/python-modules/djangorestframework/default.nix b/pkgs/development/python-modules/djangorestframework/default.nix index f8de884a24f0..7feb65620265 100644 --- a/pkgs/development/python-modules/djangorestframework/default.nix +++ b/pkgs/development/python-modules/djangorestframework/default.nix @@ -1,26 +1,52 @@ -{ lib, buildPythonPackage, fetchFromGitHub, django, pytz, isPy27 }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, coreapi +, django +, django-guardian +, pythonOlder +, pytest-django +, pytestCheckHook +, pytz +, pyyaml +, uritemplate +}: buildPythonPackage rec { - version = "3.12.4"; pname = "djangorestframework"; - disabled = isPy27; + version = "3.13.1"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "encode"; repo = "django-rest-framework"; rev = version; - sha256 = "sha256-FjMRfVyLmm5J9uOUTLZpO3Pvge3RoYnqIRvzMng7wZo="; + sha256 = "sha256-XmX6DZBZYzVCe72GERplAWt5jIjV/cYercZGb0pYjoc="; }; - # Test settings are missing - doCheck = false; - propagatedBuildInputs = [ django pytz ]; + propagatedBuildInputs = [ + django + pytz + ]; + + checkInputs = [ + pytest-django + pytestCheckHook + + # optional tests + coreapi + django-guardian + pyyaml + uritemplate + ]; + + pythonImportsCheck = [ "rest_framework" ]; meta = with lib; { description = "Web APIs for Django, made easy"; homepage = "https://www.django-rest-framework.org/"; - maintainers = with maintainers; [ desiderius ]; + maintainers = with maintainers; [ desiderius SuperSandro2000 ]; license = licenses.bsd2; }; }