1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5 graphql-core,
6 promise,
7 fetchpatch,
8 pythonOlder,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "graphql-server-core";
14 version = "2.0.0";
15 format = "setuptools";
16 disabled = pythonOlder "3.6";
17
18 src = fetchFromGitHub {
19 owner = "graphql-python";
20 repo = "graphql-server-core";
21 rev = "v${version}";
22 sha256 = "1w3biv2za2m1brwjy0z049c2m94gm1zfwxzgc6lwrsci724jv9fr";
23 };
24
25 patches = [
26 (fetchpatch {
27 url = "https://github.com/graphql-python/graphql-server-core/commit/865ee9d5602f352c958f6f7e15adbe9abe216784.patch";
28 sha256 = "03p44p4j8rys7mgamh2h9ibbnac2cqwvp5f5hrl2avj2hh0l6j46";
29 })
30 ];
31
32 propagatedBuildInputs = [
33 graphql-core
34 promise
35 ];
36
37 # fail with: cannot import name 'format_error' from 'graphql'
38 doCheck = false;
39
40 nativeCheckInputs = [ pytestCheckHook ];
41
42 meta = with lib; {
43 description = "Core package for using GraphQL in a custom server easily";
44 homepage = "https://github.com/graphql-python/graphql-server-core";
45 license = licenses.mit;
46 maintainers = with maintainers; [ kamadorueda ];
47 };
48}