From 2a258f0692183b69c45302213f3dbb761f4fa0e4 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 11 Oct 2021 21:50:07 +0200 Subject: [PATCH] python3Packages.graphene-django: init at 3.0.0b7 --- .../graphene-django/default.nix | 65 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 67 insertions(+) create mode 100644 pkgs/development/python-modules/graphene-django/default.nix diff --git a/pkgs/development/python-modules/graphene-django/default.nix b/pkgs/development/python-modules/graphene-django/default.nix new file mode 100644 index 000000000000..8c0e31f809da --- /dev/null +++ b/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 = "3.0.0b7"; + format = "setuptools"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "graphql-python"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-uPc9HNcciQpCcHLYespK8ICny5jOQaliFMyd2Yt6/as="; + }; + + 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"; + licenses = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5173758719d3..2c2a4586055d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3283,6 +3283,8 @@ in { graphene = callPackage ../development/python-modules/graphene { }; + graphene-django = callPackage ../development/python-modules/graphene-django { }; + graphqlclient= callPackage ../development/python-modules/graphqlclient { }; graphql-core = callPackage ../development/python-modules/graphql-core { };