1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, django 6 7# optionals 8, bleach 9, docutils 10, markdown 11, pygments 12, python-creole 13, smartypants 14, textile 15 16# tests 17, pytest-django 18, pytestCheckHook 19}: 20 21buildPythonPackage rec { 22 pname = "django-markup"; 23 version = "1.8.1"; 24 pyproject = true; 25 26 disabled = pythonOlder "3.8"; 27 28 src = fetchFromGitHub { 29 owner = "bartTC"; 30 repo = "django-markup"; 31 rev = "refs/tags/v${version}"; 32 hash = "sha256-Hhcp4wVJEcYV1lEZ2jWf7nOlt5m4lVAfC6VmKIdxf4c="; 33 }; 34 35 postPatch = '' 36 sed -i "/--cov/d" pyproject.toml 37 ''; 38 39 buildInputs = [ 40 django 41 ]; 42 43 passthru.optional-dependencies = { 44 all_filter_dependencies = [ 45 bleach 46 docutils 47 markdown 48 pygments 49 python-creole 50 smartypants 51 textile 52 ]; 53 }; 54 55 pythonImportsCheck = [ 56 "django_markup" 57 ]; 58 59 nativeCheckInputs = [ 60 pytest-django 61 pytestCheckHook 62 ] ++ passthru.optional-dependencies.all_filter_dependencies; 63 64 env.DJANGO_SETTINGS_MODULE = "django_markup.tests"; 65 66 meta = with lib; { 67 description = "Generic Django application to convert text with specific markup to html."; 68 homepage = "https://github.com/bartTC/django-markup"; 69 changelog = "https://github.com/bartTC/django-markup/blob/v${version}/CHANGELOG.rst"; 70 license = licenses.mit; 71 maintainers = with maintainers; [ hexa ]; 72 }; 73}