1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, fetchpatch
, graphene
, graphql-core
, django
, djangorestframework
, promise
, text-unidecode
, django-filter
, mock
, pytest-django
, pytest-random-order
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "graphene-django";
version = "unstable-2022-03-03";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "graphql-python";
repo = pname;
rev = "f6ec0689c18929344c79ae363d2e3d5628fa4a2d";
hash = "sha256-KTZ5jcoeHYXnlaF47t8jIi6+7NyMyA4hDPv+il3bt+U=";
};
patches = [
./graphene-3_2_0.patch
(fetchpatch {
url = "https://github.com/graphql-python/graphene-django/commit/ca555293a4334c26cf9a390dd1e3d0bd4c819a17.patch";
excludes = [ "setup.py" ];
sha256 = "sha256-RxG1MRhmpBKnHhSg4SV+DjZ3uA0nl9oUeei56xjtUpw=";
})
];
postPatch = ''
substituteInPlace setup.py \
--replace '"pytest-runner"' ""
'';
propagatedBuildInputs = [
djangorestframework
graphene
graphql-core
django
promise
text-unidecode
];
preCheck = ''
export DJANGO_SETTINGS_MODULE=examples.django_test_settings
'';
checkInputs = [
django-filter
mock
pytest-django
pytest-random-order
pytestCheckHook
];
meta = with lib; {
description = "Integrate GraphQL into your Django project";
homepage = "https://github.com/graphql-python/graphene-django";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}
|