evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / django-graphiql-debug-toolbar / default.nix
blobcbd1e348c74d45faac88ff796c0596369fcc814e
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
6   fetchpatch,
8   # build-system
9   poetry-core,
11   # dependencies
12   django,
13   django-debug-toolbar,
14   graphene-django,
16   # tests
17   pytest-django,
18   pytestCheckHook
21 buildPythonPackage rec {
22   pname = "django-graphiql-debug-toolbar";
23   version = "0.2.0";
24   pyproject = true;
25   disabled = pythonOlder "3.6";
27   src = fetchFromGitHub {
28     owner = "flavors";
29     repo = pname;
30     rev = version;
31     sha256 = "0fikr7xl786jqfkjdifymqpqnxy4qj8g3nlkgfm24wwq0za719dw";
32   };
34   patches = [
35     # Add compatibility for py-django-debug-toolbar >= 4.4.6
36     # https://github.com/flavors/django-graphiql-debug-toolbar/pull/27
37     (fetchpatch {
38       url = "https://github.com/flavors/django-graphiql-debug-toolbar/commit/2b42fdb1bc40109d9bb0ae1fb4d2163d13904724.patch";
39       hash = "sha256-ywTLqXlAxA2DCacrJOqmB7jSzfpeuGTX2ETu0fKmhq4=";
40      })
41   ];
43   build-system = [ poetry-core ];
45   dependencies = [
46     django
47     django-debug-toolbar
48     graphene-django
49   ];
51   pythonImportsCheck = [ "graphiql_debug_toolbar" ];
53   nativeCheckInputs = [
54     pytest-django
55     pytestCheckHook
56   ];
58   preCheck = ''
59     export DB_BACKEND=sqlite
60     export DB_NAME=:memory:
61     export DJANGO_SETTINGS_MODULE=tests.settings
62   '';
64   meta = with lib; {
65     changelog = "https://github.com/flavors/django-graphiql-debug-toolbar/releases/tag/${src.rev}";
66     description = "Django Debug Toolbar for GraphiQL IDE";
67     homepage = "https://github.com/flavors/django-graphiql-debug-toolbar";
68     license = licenses.mit;
69     maintainers = with maintainers; [ hexa ];
70   };