Files
nixpkgs/pkgs/development/python-modules/graphene-django/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

81 lines
1.7 KiB
Nix

{
stdenv,
lib,
buildPythonPackage,
fetchFromGitHub,
graphene,
graphql-core,
django,
djangorestframework,
promise,
text-unidecode,
django-filter,
mock,
py,
pytest-django,
pytest-random-order,
pytest7CheckHook,
}:
buildPythonPackage rec {
pname = "graphene-django";
version = "3.2.3";
format = "setuptools";
src = fetchFromGitHub {
owner = "graphql-python";
repo = "graphene-django";
tag = "v${version}";
hash = "sha256-uMkzgXn3YRgEU46Sv5lg60cvetHir9bv0mzJGDv79DI=";
};
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
'';
nativeCheckInputs = [
django-filter
mock
py
pytest-django
pytest-random-order
pytest7CheckHook
];
disabledTests = [
# https://github.com/graphql-python/graphene-django/issues/1510
"test_should_filepath_convert_string"
"test_should_choice_convert_enum"
"test_should_multiplechoicefield_convert_to_list_of_enum"
"test_perform_mutate_success_with_enum_choice_field"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# this test touches files in the "/" directory and fails in darwin sandbox
"test_should_filepath_convert_string"
];
meta = {
description = "Integrate GraphQL into your Django project";
homepage = "https://github.com/graphql-python/graphene-django";
changelog = "https://github.com/graphql-python/graphene-django/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ hexa ];
};
}