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