1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5
6 pythonOlder,
7
8 # build
9 poetry-core,
10
11 # runtime
12 graphql-core,
13 typing-extensions,
14
15 # tests
16 pytest-asyncio,
17 pytest-describe,
18 pytestCheckHook,
19}:
20
21buildPythonPackage rec {
22 pname = "graphql-relay";
23 version = "3.2.0";
24 format = "pyproject";
25
26 src = fetchPypi {
27 inherit pname version;
28 hash = "sha256-H/HFEpg1bkgaC+AJzN/ySYMs5T8wVZwTOPIqDg0XJQw=";
29 };
30
31 # This project doesn't seem to actually need setuptools. To find out why it
32 # specifies it, follow up in:
33 #
34 # https://github.com/graphql-python/graphql-relay-py/issues/49
35 #
36 postPatch = ''
37 substituteInPlace pyproject.toml \
38 --replace ', "setuptools>=59,<70"' ""
39 '';
40
41 nativeBuildInputs = [ poetry-core ];
42
43 propagatedBuildInputs = [ graphql-core ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
44
45 nativeCheckInputs = [
46 pytest-asyncio
47 pytest-describe
48 pytestCheckHook
49 ];
50
51 pythonImportsCheck = [ "graphql_relay" ];
52
53 meta = with lib; {
54 description = "Library to help construct a graphql-py server supporting react-relay";
55 homepage = "https://github.com/graphql-python/graphql-relay-py/";
56 license = licenses.mit;
57 maintainers = [ ];
58 };
59}