1{ lib
2, buildPythonPackage
3, fetchPypi
4
5, pythonOlder
6
7# build
8, poetry-core
9
10# runtime
11, graphql-core
12, typing-extensions
13
14# tests
15, pytest-asyncio
16, pytest-describe
17, pytestCheckHook
18}:
19
20buildPythonPackage rec {
21 pname = "graphql-relay";
22 version = "3.2.0";
23 format = "pyproject";
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-H/HFEpg1bkgaC+AJzN/ySYMs5T8wVZwTOPIqDg0XJQw=";
28 };
29
30 nativeBuildInputs = [
31 poetry-core
32 ];
33
34 propagatedBuildInputs = [
35 graphql-core
36 ] ++ lib.optionals (pythonOlder "3.8") [
37 typing-extensions
38 ];
39
40 checkInputs = [
41 pytest-asyncio
42 pytest-describe
43 pytestCheckHook
44 ];
45
46 pythonImportsCheck = [ "graphql_relay" ];
47
48 meta = with lib; {
49 description = "A library to help construct a graphql-py server supporting react-relay";
50 homepage = "https://github.com/graphql-python/graphql-relay-py/";
51 license = licenses.mit;
52 maintainers = with maintainers; [ SuperSandro2000 ];
53 };
54}