nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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-2022-03-03";
23 format = "setuptools";
24 disabled = pythonOlder "3.6";
25
26 src = fetchFromGitHub {
27 owner = "graphql-python";
28 repo = pname;
29 rev = "f6ec0689c18929344c79ae363d2e3d5628fa4a2d";
30 hash = "sha256-KTZ5jcoeHYXnlaF47t8jIi6+7NyMyA4hDPv+il3bt+U=";
31 };
32
33 patches = [
34 ./graphene-3_2_0.patch
35 ];
36
37 postPatch = ''
38 substituteInPlace setup.py \
39 --replace '"pytest-runner"' ""
40 '';
41
42 propagatedBuildInputs = [
43 djangorestframework
44 graphene
45 graphql-core
46 django
47 promise
48 text-unidecode
49 ];
50
51 preCheck = ''
52 export DJANGO_SETTINGS_MODULE=examples.django_test_settings
53 '';
54
55 checkInputs = [
56 django-filter
57 mock
58 pytest-django
59 pytest-random-order
60 pytestCheckHook
61 ];
62
63 meta = with lib; {
64 description = "Integrate GraphQL into your Django project";
65 homepage = "https://github.com/graphql-python/graphene-django";
66 license = licenses.mit;
67 maintainers = with maintainers; [ hexa ];
68 };
69}