2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, aiofiles
|
|
|
|
, aiohttp
|
2022-09-30 11:47:45 +00:00
|
|
|
, backoff
|
2022-01-13 20:06:32 +00:00
|
|
|
, botocore
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, graphql-core
|
|
|
|
, mock
|
|
|
|
, parse
|
|
|
|
, pytest-asyncio
|
2022-09-30 11:47:45 +00:00
|
|
|
, pytest-console-scripts
|
2022-01-13 20:06:32 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-toolbelt
|
|
|
|
, urllib3
|
|
|
|
, vcrpy
|
|
|
|
, websockets
|
|
|
|
, yarl
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gql";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "3.4.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "graphql-python";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-yr8IyAwZ6y2MPTe6bHRW+CIp19R3ZJWHuqdN5qultnQ=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2022-09-30 11:47:45 +00:00
|
|
|
backoff
|
2022-01-13 20:06:32 +00:00
|
|
|
botocore
|
|
|
|
graphql-core
|
|
|
|
requests
|
|
|
|
requests-toolbelt
|
|
|
|
urllib3
|
|
|
|
websockets
|
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aiofiles
|
|
|
|
mock
|
|
|
|
parse
|
|
|
|
pytest-asyncio
|
2022-09-30 11:47:45 +00:00
|
|
|
pytest-console-scripts
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestCheckHook
|
|
|
|
vcrpy
|
|
|
|
];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
preCheck = ''
|
|
|
|
export PATH=$out/bin:$PATH
|
|
|
|
'';
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--asyncio-mode=legacy"
|
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests requires network access
|
|
|
|
"test_execute_result_error"
|
|
|
|
"test_http_transport"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Exclude linter tests
|
|
|
|
"gql-checker/tests/test_flake8_linter.py"
|
|
|
|
"gql-checker/tests/test_pylama_linter.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"gql"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "GraphQL client in Python";
|
|
|
|
homepage = "https://github.com/graphql-python/gql";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|