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