Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 poetry-core, 6 pytest-benchmark, 7 pytest-asyncio, 8 pytestCheckHook, 9 pythonOlder, 10}: 11 12buildPythonPackage rec { 13 pname = "graphql-core"; 14 version = "3.2.5"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.6"; 18 19 src = fetchFromGitHub { 20 owner = "graphql-python"; 21 repo = "graphql-core"; 22 tag = "v${version}"; 23 hash = "sha256-xZOiQOFWnImDXuvHP9V6BDjIZwlwHSxN/os+UYV4A0M="; 24 }; 25 26 postPatch = '' 27 substituteInPlace pyproject.toml \ 28 --replace-fail "poetry_core>=1,<2" "poetry-core" \ 29 --replace-fail ', "setuptools>=59,<70"' "" 30 ''; 31 32 build-system = [ 33 poetry-core 34 ]; 35 36 nativeCheckInputs = [ 37 pytest-asyncio 38 pytest-benchmark 39 pytestCheckHook 40 ]; 41 42 pytestFlags = [ "--benchmark-disable" ]; 43 44 pythonImportsCheck = [ "graphql" ]; 45 46 meta = with lib; { 47 changelog = "https://github.com/graphql-python/graphql-core/releases/tag/v${version}"; 48 description = "Port of graphql-js to Python"; 49 homepage = "https://github.com/graphql-python/graphql-core"; 50 license = licenses.mit; 51 maintainers = with maintainers; [ kamadorueda ]; 52 }; 53}