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