depot/third_party/nixpkgs/pkgs/development/python-modules/django-markup/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

70 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
django,
# optionals
bleach,
docutils,
markdown,
pygments,
python-creole,
smartypants,
textile,
# tests
pytest-django,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "django-markup";
version = "1.8.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bartTC";
repo = "django-markup";
rev = "refs/tags/v${version}";
hash = "sha256-Hhcp4wVJEcYV1lEZ2jWf7nOlt5m4lVAfC6VmKIdxf4c=";
};
postPatch = ''
sed -i "/--cov/d" pyproject.toml
'';
buildInputs = [ django ];
passthru.optional-dependencies = {
all_filter_dependencies = [
bleach
docutils
markdown
pygments
python-creole
smartypants
textile
];
};
pythonImportsCheck = [ "django_markup" ];
nativeCheckInputs = [
pytest-django
pytestCheckHook
] ++ passthru.optional-dependencies.all_filter_dependencies;
env.DJANGO_SETTINGS_MODULE = "django_markup.tests";
meta = with lib; {
description = "Generic Django application to convert text with specific markup to html";
homepage = "https://github.com/bartTC/django-markup";
changelog = "https://github.com/bartTC/django-markup/blob/v${version}/CHANGELOG.rst";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}