nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 71 lines 1.7 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 7 # build-system 8 poetry-core, 9 10 # dependencies 11 django, 12 django-debug-toolbar, 13 graphene-django, 14 15 # tests 16 pytest-django, 17 pytestCheckHook, 18}: 19 20buildPythonPackage rec { 21 pname = "django-graphiql-debug-toolbar"; 22 version = "0.2.0"; 23 pyproject = true; 24 25 src = fetchFromGitHub { 26 owner = "flavors"; 27 repo = "django-graphiql-debug-toolbar"; 28 rev = version; 29 sha256 = "0fikr7xl786jqfkjdifymqpqnxy4qj8g3nlkgfm24wwq0za719dw"; 30 }; 31 32 patches = [ 33 # Add compatibility for py-django-debug-toolbar >= 4.4.6 34 # https://github.com/flavors/django-graphiql-debug-toolbar/pull/27 35 (fetchpatch { 36 url = "https://github.com/flavors/django-graphiql-debug-toolbar/commit/2b42fdb1bc40109d9bb0ae1fb4d2163d13904724.patch"; 37 hash = "sha256-ywTLqXlAxA2DCacrJOqmB7jSzfpeuGTX2ETu0fKmhq4="; 38 }) 39 ]; 40 41 build-system = [ poetry-core ]; 42 43 dependencies = [ 44 django 45 django-debug-toolbar 46 graphene-django 47 ]; 48 49 pythonImportsCheck = [ "graphiql_debug_toolbar" ]; 50 51 nativeCheckInputs = [ 52 pytest-django 53 pytestCheckHook 54 ]; 55 56 preCheck = '' 57 export DB_BACKEND=sqlite 58 export DB_NAME=:memory: 59 export DJANGO_SETTINGS_MODULE=tests.settings 60 ''; 61 62 doCheck = false; # tests broke with django-debug-toolbar 6.0 63 64 meta = { 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 = lib.licenses.mit; 69 maintainers = with lib.maintainers; [ hexa ]; 70 }; 71}