about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/graphene-django/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/graphene-django/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/graphene-django/default.nix65
1 files changed, 65 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/graphene-django/default.nix b/nixpkgs/pkgs/development/python-modules/graphene-django/default.nix
new file mode 100644
index 000000000000..f736fbe39d85
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/graphene-django/default.nix
@@ -0,0 +1,65 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+
+, graphene
+, graphql-core
+, django
+, djangorestframework
+, promise
+, text-unidecode
+
+, django-filter
+, mock
+, pytest-django
+, pytest-random-order
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "graphene-django";
+  version = "unstable-2021-06-11";
+  format = "setuptools";
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "graphql-python";
+    repo = pname;
+    rev = "e7f7d8da07ba1020f9916153f17e97b0ec037712";
+    sha256 = "0b33q1im90ahp3gzy9wx5amfzy6q57ydjpy5rn988gh81hbyqaxv";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace '"pytest-runner"' ""
+  '';
+
+  propagatedBuildInputs = [
+    djangorestframework
+    graphene
+    graphql-core
+    django
+    promise
+    text-unidecode
+  ];
+
+  preCheck = ''
+    export DJANGO_SETTINGS_MODULE=examples.django_test_settings
+  '';
+
+  checkInputs = [
+    django-filter
+    mock
+    pytest-django
+    pytest-random-order
+    pytestCheckHook
+  ];
+
+  meta = with lib; {
+    description = "Integrate GraphQL into your Django project";
+    homepage = "https://github.com/graphql-python/graphene-django";
+    license = licenses.mit;
+    maintainers = with maintainers; [ hexa ];
+  };
+}