Files
nixpkgs/pkgs/development/python-modules/django-mptt/default.nix
2026-11-01 21:56:59 +00:00

55 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
django,
django-js-asset,
model-bakery,
pytestCheckHook,
pytest-django,
}:
buildPythonPackage rec {
pname = "django-mptt";
version = "0.21";
pyproject = true;
src = fetchFromGitHub {
owner = "django-mptt";
repo = "django-mptt";
rev = version;
hash = "sha256-GdY6ISaaG8sTVEOrLGUO0dOKHgsPVDuwdUGAn0UBNNM=";
};
build-system = [ hatchling ];
dependencies = [
django
django-js-asset
];
pythonImportsCheck = [ "mptt" ];
nativeCheckInputs = [
model-bakery
pytestCheckHook
pytest-django
];
# XXX: some HTML tests fail with Django 6.1+
doCheck = lib.versionOlder django.version "6.1";
preCheck = ''
export DJANGO_SETTINGS_MODULE=tests.settings
export PYTHONPATH=$(pwd)/tests:$PYTHONPATH
'';
meta = {
description = "Utilities for implementing a modified pre-order traversal tree in Django";
homepage = "https://github.com/django-mptt/django-mptt";
maintainers = with lib.maintainers; [ hexa ];
license = lib.licenses.mit;
};
}