1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 coreapi,
6 django,
7 django-guardian,
8 pythonOlder,
9 pytest-django,
10 pytest7CheckHook,
11 pytz,
12 pyyaml,
13 uritemplate,
14}:
15
16buildPythonPackage rec {
17 pname = "djangorestframework";
18 version = "3.14.0";
19 format = "setuptools";
20 disabled = pythonOlder "3.6";
21
22 src = fetchFromGitHub {
23 owner = "encode";
24 repo = "django-rest-framework";
25 rev = version;
26 hash = "sha256-Fnj0n3NS3SetOlwSmGkLE979vNJnYE6i6xwVBslpNz4=";
27 };
28
29 propagatedBuildInputs = [
30 django
31 pytz
32 ];
33
34 nativeCheckInputs = [
35 pytest-django
36 pytest7CheckHook
37
38 # optional tests
39 coreapi
40 django-guardian
41 pyyaml
42 uritemplate
43 ];
44
45 pythonImportsCheck = [ "rest_framework" ];
46
47 meta = with lib; {
48 description = "Web APIs for Django, made easy";
49 homepage = "https://www.django-rest-framework.org/";
50 maintainers = with maintainers; [ desiderius ];
51 license = licenses.bsd2;
52 };
53}