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