1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6
7 # build-system
8 poetry-core,
9
10 # dependencies
11 django,
12 django-debug-toolbar,
13 graphene-django,
14
15 # tests
16 python,
17 pytest-django,
18 pytestCheckHook
19}:
20
21buildPythonPackage rec {
22 pname = "django-graphiql-debug-toolbar";
23 version = "0.2.0";
24 format = "pyproject";
25 disabled = pythonOlder "3.6";
26
27 src = fetchFromGitHub {
28 owner = "flavors";
29 repo = pname;
30 rev = version;
31 sha256 = "0fikr7xl786jqfkjdifymqpqnxy4qj8g3nlkgfm24wwq0za719dw";
32 };
33
34 nativeBuildInputs = [ poetry-core ];
35
36 propagatedBuildInputs = [
37 django
38 django-debug-toolbar
39 graphene-django
40 ];
41
42 pythonImportsCheck = [ "graphiql_debug_toolbar" ];
43
44 nativeCheckInputs = [
45 pytest-django
46 pytestCheckHook
47 ];
48
49 preCheck = ''
50 export DB_BACKEND=sqlite
51 export DB_NAME=:memory:
52 export DJANGO_SETTINGS_MODULE=tests.settings
53 '';
54
55 meta = with lib; {
56 changelog = "https://github.com/flavors/django-graphiql-debug-toolbar/releases/tag/${src.rev}";
57 description = "Django Debug Toolbar for GraphiQL IDE";
58 homepage = "https://github.com/flavors/django-graphiql-debug-toolbar";
59 license = licenses.mit;
60 maintainers = with maintainers; [ hexa ];
61 };
62}