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 # This project doesn't seem to actually need setuptools. To find out why it 31 # specifies it, follow up in: 32 # 33 # https://github.com/graphql-python/graphql-relay-py/issues/49 34 # 35 postPatch = '' 36 substituteInPlace pyproject.toml \ 37 --replace ', "setuptools>=59,<70"' "" 38 ''; 39 40 nativeBuildInputs = [ 41 poetry-core 42 ]; 43 44 propagatedBuildInputs = [ 45 graphql-core 46 ] ++ lib.optionals (pythonOlder "3.8") [ 47 typing-extensions 48 ]; 49 50 nativeCheckInputs = [ 51 pytest-asyncio 52 pytest-describe 53 pytestCheckHook 54 ]; 55 56 pythonImportsCheck = [ "graphql_relay" ]; 57 58 meta = with lib; { 59 description = "A library to help construct a graphql-py server supporting react-relay"; 60 homepage = "https://github.com/graphql-python/graphql-relay-py/"; 61 license = licenses.mit; 62 maintainers = with maintainers; [ ]; 63 }; 64}