2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonOlder,
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build
|
|
|
|
poetry-core,
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# runtime
|
|
|
|
graphql-core,
|
|
|
|
typing-extensions,
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-describe,
|
|
|
|
pytestCheckHook,
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "graphql-relay";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "3.2.0";
|
|
|
|
format = "pyproject";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-27 09:35:20 +00:00
|
|
|
hash = "sha256-H/HFEpg1bkgaC+AJzN/ySYMs5T8wVZwTOPIqDg0XJQw=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
# This project doesn't seem to actually need setuptools. To find out why it
|
|
|
|
# specifies it, follow up in:
|
|
|
|
#
|
|
|
|
# https://github.com/graphql-python/graphql-relay-py/issues/49
|
|
|
|
#
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace ', "setuptools>=59,<70"' ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ graphql-core ] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-09 03:18:52 +00:00
|
|
|
pytest-asyncio
|
2022-04-27 09:35:20 +00:00
|
|
|
pytest-describe
|
2021-03-09 03:18:52 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "graphql_relay" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A library to help construct a graphql-py server supporting react-relay";
|
|
|
|
homepage = "https://github.com/graphql-python/graphql-relay-py/";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
}
|