1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 nix-update-script, 6 fetchpatch2, 7 8 # build system 9 setuptools, 10 wheel, 11 12 # deps 13 docutils, 14 sphinx, 15 tabulate, 16 17 # tests 18 pytestCheckHook, 19 20 # optional deps 21 black, 22 bumpver, 23 coveralls, 24 flake8, 25 isort, 26 pip-tools, 27 pylint, 28 pytest, 29 pytest-cov, 30 sphinxcontrib-httpdomain, 31 sphinxcontrib-plantuml, 32}: 33 34buildPythonPackage rec { 35 pname = "sphinx-markdown-builder"; 36 version = "0.6.8"; 37 pyproject = true; 38 39 src = fetchFromGitHub { 40 owner = "liran-funaro"; 41 repo = "sphinx-markdown-builder"; 42 tag = version; 43 hash = "sha256-dPMOOG3myh9i2ez9uhasqLnlV0BEsE9CHEbZ57VWzAo="; 44 }; 45 46 patches = [ 47 # FIX: tests (remove with the next release) 48 # https://github.com/liran-funaro/sphinx-markdown-builder/issues/32 49 (fetchpatch2 { 50 url = "https://github.com/liran-funaro/sphinx-markdown-builder/commit/967edca036a73f7644251abd52a5da8451a10dd4.patch"; 51 hash = "sha256-FGMYzd5k3Q0UvOccCvUSW3y6gor+AUncj2qv38xyOp4="; 52 }) 53 ]; 54 55 build-system = [ 56 setuptools 57 wheel 58 ]; 59 60 dependencies = [ 61 docutils 62 sphinx 63 tabulate 64 ]; 65 66 optional-dependencies = { 67 dev = [ 68 black 69 bumpver 70 coveralls 71 flake8 72 isort 73 pip-tools 74 pylint 75 pytest 76 pytest-cov 77 sphinx 78 sphinxcontrib-httpdomain 79 sphinxcontrib-plantuml 80 ]; 81 }; 82 83 pythonImportsCheck = [ 84 "sphinx_markdown_builder" 85 ]; 86 87 nativeCheckInputs = [ 88 pytestCheckHook 89 ]; 90 91 # NOTE: not sure why, but a `Missing dependencies: wheel` error happens when 92 # `black` is included here, with python3.13 93 checkInputs = lib.remove black optional-dependencies.dev; 94 95 passthru.updateScript = nix-update-script { }; 96 97 meta = { 98 description = "Sphinx extension to add markdown generation support"; 99 homepage = "https://github.com/liran-funaro/sphinx-markdown-builder"; 100 license = lib.licenses.mit; 101 maintainers = with lib.maintainers; [ eljamm ]; 102 }; 103}