nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 80 lines 1.8 kB view raw
1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchFromGitHub, 6 7 graphene, 8 graphql-core, 9 django, 10 djangorestframework, 11 promise, 12 text-unidecode, 13 14 django-filter, 15 mock, 16 py, 17 pytest-django, 18 pytest-random-order, 19 pytest7CheckHook, 20}: 21 22buildPythonPackage rec { 23 pname = "graphene-django"; 24 version = "3.2.3"; 25 format = "setuptools"; 26 27 src = fetchFromGitHub { 28 owner = "graphql-python"; 29 repo = "graphene-django"; 30 tag = "v${version}"; 31 hash = "sha256-uMkzgXn3YRgEU46Sv5lg60cvetHir9bv0mzJGDv79DI="; 32 }; 33 34 postPatch = '' 35 substituteInPlace setup.py \ 36 --replace '"pytest-runner"' "" 37 ''; 38 39 propagatedBuildInputs = [ 40 djangorestframework 41 graphene 42 graphql-core 43 django 44 promise 45 text-unidecode 46 ]; 47 48 preCheck = '' 49 export DJANGO_SETTINGS_MODULE=examples.django_test_settings 50 ''; 51 52 nativeCheckInputs = [ 53 django-filter 54 mock 55 py 56 pytest-django 57 pytest-random-order 58 pytest7CheckHook 59 ]; 60 61 disabledTests = [ 62 # https://github.com/graphql-python/graphene-django/issues/1510 63 "test_should_filepath_convert_string" 64 "test_should_choice_convert_enum" 65 "test_should_multiplechoicefield_convert_to_list_of_enum" 66 "test_perform_mutate_success_with_enum_choice_field" 67 ] 68 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 69 # this test touches files in the "/" directory and fails in darwin sandbox 70 "test_should_filepath_convert_string" 71 ]; 72 73 meta = { 74 description = "Integrate GraphQL into your Django project"; 75 homepage = "https://github.com/graphql-python/graphene-django"; 76 changelog = "https://github.com/graphql-python/graphene-django/releases/tag/v${version}"; 77 license = lib.licenses.mit; 78 maintainers = with lib.maintainers; [ hexa ]; 79 }; 80}