Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / graphql-relay / default.nix
blobac91b749070de6ddb70186da9d3edff49125bfc2
1 { lib
2 , buildPythonPackage
3 , fetchPypi
5 , pythonOlder
7 # build
8 , poetry-core
10 # runtime
11 , graphql-core
12 , typing-extensions
14 # tests
15 , pytest-asyncio
16 , pytest-describe
17 , pytestCheckHook
20 buildPythonPackage rec {
21   pname = "graphql-relay";
22   version = "3.2.0";
23   format = "pyproject";
25   src = fetchPypi {
26     inherit pname version;
27     hash = "sha256-H/HFEpg1bkgaC+AJzN/ySYMs5T8wVZwTOPIqDg0XJQw=";
28   };
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   '';
40   nativeBuildInputs = [
41     poetry-core
42   ];
44   propagatedBuildInputs = [
45     graphql-core
46   ] ++ lib.optionals (pythonOlder "3.8") [
47     typing-extensions
48   ];
50   nativeCheckInputs = [
51     pytest-asyncio
52     pytest-describe
53     pytestCheckHook
54   ];
56   pythonImportsCheck = [ "graphql_relay" ];
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   };