1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5
6, graphene
7, graphql-core
8, django
9, djangorestframework
10, promise
11, text-unidecode
12
13, django-filter
14, mock
15, pytest-django
16, pytest-random-order
17, pytestCheckHook
18}:
19
20buildPythonPackage rec {
21 pname = "graphene-django";
22 version = "unstable-2021-06-11";
23 format = "setuptools";
24 disabled = pythonOlder "3.6";
25
26 src = fetchFromGitHub {
27 owner = "graphql-python";
28 repo = pname;
29 rev = "e7f7d8da07ba1020f9916153f17e97b0ec037712";
30 sha256 = "0b33q1im90ahp3gzy9wx5amfzy6q57ydjpy5rn988gh81hbyqaxv";
31 };
32
33 postPatch = ''
34 substituteInPlace setup.py \
35 --replace '"pytest-runner"' ""
36 '';
37
38 propagatedBuildInputs = [
39 djangorestframework
40 graphene
41 graphql-core
42 django
43 promise
44 text-unidecode
45 ];
46
47 preCheck = ''
48 export DJANGO_SETTINGS_MODULE=examples.django_test_settings
49 '';
50
51 checkInputs = [
52 django-filter
53 mock
54 pytest-django
55 pytest-random-order
56 pytestCheckHook
57 ];
58
59 meta = with lib; {
60 description = "Integrate GraphQL into your Django project";
61 homepage = "https://github.com/graphql-python/graphene-django";
62 license = licenses.mit;
63 maintainers = with maintainers; [ hexa ];
64 };
65}