1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 freezegun,
6 graphql-core,
7 hatchling,
8 httpx,
9 pytest-asyncio,
10 pytest-mock,
11 pytestCheckHook,
12 python-multipart,
13 starlette,
14 syrupy,
15 typing-extensions,
16 werkzeug,
17}:
18
19buildPythonPackage rec {
20 pname = "ariadne";
21 version = "0.26.2";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "mirumee";
26 repo = "ariadne";
27 tag = version;
28 hash = "sha256-zkxRg11O/P7+qU+vdDG3i8Tpn6dXByaGLN9t+e2dhyE=";
29 };
30
31 patches = [ ./remove-opentracing.patch ];
32
33 pythonRelaxDeps = [ "graphql-core" ];
34
35 build-system = [ hatchling ];
36
37 dependencies = [
38 graphql-core
39 starlette
40 typing-extensions
41 ];
42
43 nativeCheckInputs = [
44 freezegun
45 httpx
46 pytest-asyncio
47 pytest-mock
48 pytestCheckHook
49 python-multipart
50 syrupy
51 werkzeug
52 ];
53
54 pythonImportsCheck = [ "ariadne" ];
55
56 pytestFlags = [ "--snapshot-update" ];
57
58 disabledTests = [
59 # TypeError: TestClient.request() got an unexpected keyword argument 'content'
60 "test_attempt_parse_request_missing_content_type_raises_bad_request_error"
61 "test_attempt_parse_non_json_request_raises_bad_request_error"
62 "test_attempt_parse_non_json_request_body_raises_bad_request_error"
63 # opentracing
64 "test_query_is_executed_for_multipart_form_request_with_file"
65 "test_query_is_executed_for_multipart_request_with_large_file_with_tracing"
66 # AssertionError: assert not [GraphQLError(...
67 "test_enum_with_int_values_from_dict"
68 "test_enum_with_int_enum_values"
69 "test_enum_with_str_enum_values"
70 ];
71
72 disabledTestPaths = [
73 # missing graphql-sync-dataloader test dep
74 "tests/test_dataloaders.py"
75 "tests/wsgi/test_configuration.py"
76 # both include opentracing module, which has been removed from nixpkgs
77 "tests/tracing/test_opentracing.py"
78 "tests/tracing/test_opentelemetry.py"
79 ];
80
81 meta = with lib; {
82 description = "Python library for implementing GraphQL servers using schema-first approach";
83 homepage = "https://ariadnegraphql.org";
84 changelog = "https://github.com/mirumee/ariadne/blob/${src.tag}/CHANGELOG.md";
85 license = licenses.bsd3;
86 maintainers = with maintainers; [ samuela ];
87 };
88}