nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 80 lines 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 9 # dependencies 10 django, 11 12 # optionals 13 bleach, 14 docutils, 15 markdown, 16 pygments, 17 python-creole, 18 smartypants, 19 textile, 20 21 # tests 22 pytest-cov-stub, 23 pytest-django, 24 pytestCheckHook, 25}: 26 27buildPythonPackage rec { 28 pname = "django-markup"; 29 version = "1.10"; 30 pyproject = true; 31 32 src = fetchFromGitHub { 33 owner = "bartTC"; 34 repo = "django-markup"; 35 tag = "v${version}"; 36 hash = "sha256-LcEbN5/LbY3xWellBVK2Kfvt/XLzRJjGWcEk8h722Og="; 37 }; 38 39 build-system = [ poetry-core ]; 40 41 dependencies = [ django ]; 42 43 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 = [ "django_markup" ]; 56 57 nativeCheckInputs = [ 58 pytest-cov-stub 59 pytest-django 60 pytestCheckHook 61 ] 62 ++ optional-dependencies.all_filter_dependencies; 63 64 disabledTests = [ 65 # pygments compat issue 66 "test_rst_with_pygments" 67 ]; 68 69 preCheck = '' 70 export DJANGO_SETTINGS_MODULE=django_markup.tests 71 ''; 72 73 meta = { 74 description = "Generic Django application to convert text with specific markup to html"; 75 homepage = "https://github.com/bartTC/django-markup"; 76 changelog = "https://github.com/bartTC/django-markup/blob/${src.tag}/CHANGELOG.md"; 77 license = lib.licenses.mit; 78 maintainers = with lib.maintainers; [ hexa ]; 79 }; 80}