1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, runtimeShell 6 7# build 8, poetry-core 9 10# propagates 11, docutils 12 13# tests 14, pytestCheckHook 15, readme_renderer 16, textile 17}: 18 19buildPythonPackage rec { 20 pname = "python-creole"; 21 version = "1.4.10"; 22 format = "pyproject"; 23 24 src = fetchFromGitHub { 25 owner = "jedie"; 26 repo = "python-creole"; 27 rev = "refs/tags/v${version}"; 28 hash = "sha256-8pXOnLNjhIv0d+BqjW8wlb6BT6CmFHSsxn5wLOv3LBQ="; 29 }; 30 31 patches = [ 32 # https://github.com/jedie/python-creole/pull/77 33 (fetchpatch { 34 name = "replace-poetry-with-poetry-core.patch"; 35 url = "https://github.com/jedie/python-creole/commit/bfc46730ab4a189f3142246cead8d26005a28671.patch"; 36 hash = "sha256-WtoEQyu/154Cfj6eSnNA+t37+o7Ij328QGMKxwcLg5k="; 37 }) 38 ]; 39 40 nativeBuildInputs = [ 41 poetry-core 42 ]; 43 44 postPatch = '' 45 substituteInPlace Makefile \ 46 --replace "/bin/bash" "${runtimeShell}" 47 48 sed -i "/-cov/d" pytest.ini 49 ''; 50 51 propagatedBuildInputs = [ 52 docutils 53 ]; 54 55 pythonImportsCheck = [ 56 "creole" 57 ]; 58 59 nativeCheckInputs = [ 60 pytestCheckHook 61 readme_renderer 62 textile 63 ]; 64 65 preCheck = '' 66 export PATH=$out/bin:$PATH 67 ''; 68 69 disabledTests = [ 70 # macro didn't expect argument 71 "test_macro_wrong_arguments_quite" 72 "test_macro_wrong_arguments_with_error_report" 73 # rendering mismatches, likely docutils version mismatch 74 "test_headlines1" 75 "test_simple_table" 76 ]; 77 78 disabledTestPaths = [ 79 # requires poetry 80 "creole/tests/test_Makefile.py" 81 # requires poetry_publish 82 "creole/publish.py" 83 "creole/tests/test_project_setup.py" 84 # rendering differencenes, likely docutils version mismatch 85 "creole/tests/test_cross_compare_rest.py" 86 "creole/tests/test_rest2html.py" 87 ]; 88 89 meta = with lib; { 90 description = "Creole markup tools written in Python"; 91 homepage = "https://github.com/jedie/python-creole"; 92 changelog = "https://github.com/jedie/python-creole/releases/tag/v${version}"; 93 license = licenses.gpl3Plus; 94 maintainers = with maintainers; [ hexa ]; 95 }; 96}