2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-11-27 09:42:12 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, freezegun
|
|
|
|
, graphql-core
|
2024-02-29 20:09:43 +00:00
|
|
|
, hatchling
|
|
|
|
, httpx
|
2022-11-27 09:42:12 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
2023-01-11 07:51:40 +00:00
|
|
|
, pythonOlder
|
2024-02-29 20:09:43 +00:00
|
|
|
, python-multipart
|
2022-11-27 09:42:12 +00:00
|
|
|
, starlette
|
2024-02-29 20:09:43 +00:00
|
|
|
, syrupy
|
2022-11-27 09:42:12 +00:00
|
|
|
, typing-extensions
|
|
|
|
, werkzeug
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ariadne";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.23.0";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-11-27 09:42:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mirumee";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "ariadne";
|
2022-11-27 09:42:12 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-zdM6LKtrD6m3hWn90yAgsinCvaa86BaTdhgf/VzGDLA=";
|
2022-11-27 09:42:12 +00:00
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
patches = [
|
|
|
|
./remove-opentracing.patch
|
|
|
|
];
|
2022-11-27 09:42:12 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
graphql-core
|
|
|
|
starlette
|
|
|
|
typing-extensions
|
|
|
|
];
|
2022-11-27 09:42:12 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-11-27 09:42:12 +00:00
|
|
|
freezegun
|
2024-02-29 20:09:43 +00:00
|
|
|
httpx
|
2022-11-27 09:42:12 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
2024-02-29 20:09:43 +00:00
|
|
|
python-multipart
|
|
|
|
syrupy
|
2022-11-27 09:42:12 +00:00
|
|
|
werkzeug
|
|
|
|
];
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"ariadne"
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--snapshot-update"
|
|
|
|
];
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
disabledTests = [
|
|
|
|
# TypeError: TestClient.request() got an unexpected keyword argument 'content'
|
|
|
|
"test_attempt_parse_request_missing_content_type_raises_bad_request_error"
|
|
|
|
"test_attempt_parse_non_json_request_raises_bad_request_error"
|
|
|
|
"test_attempt_parse_non_json_request_body_raises_bad_request_error"
|
2024-01-02 11:29:13 +00:00
|
|
|
# opentracing
|
|
|
|
"test_query_is_executed_for_multipart_form_request_with_file"
|
|
|
|
"test_query_is_executed_for_multipart_request_with_large_file_with_tracing"
|
2023-01-11 07:51:40 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# missing graphql-sync-dataloader test dep
|
|
|
|
"tests/test_dataloaders.py"
|
|
|
|
"tests/wsgi/test_configuration.py"
|
2024-01-02 11:29:13 +00:00
|
|
|
# both include opentracing module, which has been removed from nixpkgs
|
|
|
|
"tests/tracing/test_opentracing.py"
|
|
|
|
"tests/tracing/test_opentelemetry.py"
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for implementing GraphQL servers using schema-first approach";
|
|
|
|
homepage = "https://ariadnegraphql.org";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/mirumee/ariadne/blob/${version}/CHANGELOG.md";
|
2022-11-27 09:42:12 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ samuela ];
|
|
|
|
};
|
|
|
|
}
|