1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytest-benchmark,
7 pytest-asyncio,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "graphql-core";
13 version = "3.2.6";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "graphql-python";
18 repo = "graphql-core";
19 tag = "v${version}";
20 hash = "sha256-RkVyoTSVmtKhs42IK+oOrOL4uBs3As3N5KY0Sz1VaDQ=";
21 };
22
23 postPatch = ''
24 substituteInPlace pyproject.toml \
25 --replace-fail ', "setuptools>=59,<76"' ""
26 '';
27
28 build-system = [
29 poetry-core
30 ];
31
32 nativeCheckInputs = [
33 pytest-asyncio
34 pytest-benchmark
35 pytestCheckHook
36 ];
37
38 pytestFlags = [ "--benchmark-disable" ];
39
40 pythonImportsCheck = [ "graphql" ];
41
42 meta = with lib; {
43 changelog = "https://github.com/graphql-python/graphql-core/releases/tag/${src.tag}";
44 description = "Port of graphql-js to Python";
45 homepage = "https://github.com/graphql-python/graphql-core";
46 license = licenses.mit;
47 maintainers = with maintainers; [ kamadorueda ];
48 };
49}