depot/third_party/nixpkgs/pkgs/development/python-modules/django-markup/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

70 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, django
# optionals
, bleach
, docutils
, markdown
, pygments
, python-creole
, smartypants
, textile
# tests
, pytest-django
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "django-markup";
version = "1.7";
format = "setuptools";
src = fetchFromGitHub {
owner = "bartTC";
repo = "django-markup";
rev = "refs/tags/v${version}";
hash = "sha256-P36DYOcjYAvzhSLe5CwzRaIm/KzrpUh0YZjzcwnSBG8=";
};
postPatch = ''
sed -i "/--cov/d" setup.cfg
'';
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 ];
};
}