diff --git a/pkgs/development/python-modules/django-tree-queries/default.nix b/pkgs/development/python-modules/django-tree-queries/default.nix new file mode 100644 index 000000000000..36ffc5712e53 --- /dev/null +++ b/pkgs/development/python-modules/django-tree-queries/default.nix @@ -0,0 +1,53 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + django, + pytest-django, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "django-tree-queries"; + version = "0.19"; + pyproject = true; + + src = fetchFromGitHub { + owner = "feincms"; + repo = "django-tree-queries"; + tag = version; + hash = "sha256-0RSmwgyXaLCp2GcUZ0l7zkyofd5qemd/er+7KfGsoGM="; + }; + + build-system = [ + hatchling + ]; + + nativeCheckInputs = [ + django + pytest-django + pytestCheckHook + ]; + + preCheck = '' + pushd tests + export DJANGO_SETTINGS_MODULE=testapp.settings + ''; + + postCheck = '' + popd + ''; + + pythonImportsCheck = [ + "tree_queries" + ]; + + meta = { + description = "Adjacency-list trees for Django using recursive common table expressions. Supports PostgreSQL, sqlite, MySQL and MariaDB"; + homepage = "https://github.com/feincms/django-tree-queries"; + changelog = "https://github.com/feincms/django-tree-queries/blob/${src.tag}/CHANGELOG.rst"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7f6f09217d1f..79d4b840bca9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3705,6 +3705,8 @@ self: super: with self; { django-tinymce = callPackage ../development/python-modules/django-tinymce { }; + django-tree-queries = callPackage ../development/python-modules/django-tree-queries { }; + django-treebeard = callPackage ../development/python-modules/django-treebeard { }; django-two-factor-auth = callPackage ../development/python-modules/django-two-factor-auth { };