23 sphinxcontrib-applehelp,
24 sphinxcontrib-devhelp,
25 sphinxcontrib-htmlhelp,
28 sphinxcontrib-serializinghtml,
29 sphinxcontrib-websupport,
41 buildPythonPackage rec {
46 disabled = pythonOlder "3.9";
48 src = fetchFromGitHub {
53 # Change ä to æ in file names, since ä can be encoded multiple ways on different
54 # filesystems, leading to different hashes on different platforms.
56 mv tests/roots/test-images/{testimäge,testimæge}.png
57 sed -i 's/testimäge/testimæge/g' tests/{test_build*.py,roots/test-images/index.rst}
59 hash = "sha256-/5zH9IdLmTGnn5MY4FFSuZOIeF/x1L9Ga/wp57XrAQo=";
62 build-system = [ flit-core ];
75 sphinxcontrib-applehelp
77 sphinxcontrib-htmlhelp
80 sphinxcontrib-serializinghtml
82 sphinxcontrib-websupport
84 ++ lib.optionals (pythonOlder "3.11") [ tomli ]
85 ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
87 __darwinAllowLocalNetworking = true;
104 # requires network access
108 "test_check_link_response_only"
109 "test_anchors_ignored_for_url"
110 "test_autodoc_default_options"
111 "test_too_many_requests_retry_after_int_delay"
112 # racy with pytest-xdist
113 "test_domain_cpp_build_semicolon"
115 "test_class_alias_having_doccomment"
116 "test_class_alias_for_imported_object_having_doccomment"
118 # racy with too many threads
119 # https://github.com/NixOS/nixpkgs/issues/353176
120 "test_document_toc_only"
122 "test_gettext_literalblock_additional"
123 # requires cython_0, but fails miserably on 3.11
125 # Could not fetch remote image: http://localhost:7777/sphinx.png
128 ++ lib.optionals (pythonAtLeast "3.12") [
129 # https://github.com/sphinx-doc/sphinx/issues/12430
130 "test_autodoc_type_aliases"
132 ++ lib.optionals isPyPy [
133 # PyPy has not __builtins__ which get asserted
134 # https://doc.pypy.org/en/latest/cpython_differences.html#miscellaneous
135 "test_autosummary_generate_content_for_module"
136 "test_autosummary_generate_content_for_module_skipped"
137 # internals are asserted which are sightly different in PyPy
138 "test_autodoc_inherited_members_None"
139 "test_automethod_for_builtin"
140 "test_builtin_function"
141 "test_isattributedescriptor"
142 "test_methoddescriptor"
143 "test_partialfunction"
147 description = "Python documentation generator";
149 Sphinx makes it easy to create intelligent and beautiful documentation.
151 Here are some of Sphinx’s major features:
152 - Output formats: HTML (including Windows HTML Help), LaTeX (for printable
153 PDF versions), ePub, Texinfo, manual pages, plain text
154 - Extensive cross-references: semantic markup and automatic links for
155 functions, classes, citations, glossary terms and similar pieces of
157 - Hierarchical structure: easy definition of a document tree, with
158 automatic links to siblings, parents and children
159 - Automatic indices: general index as well as a language-specific module
161 - Code handling: automatic highlighting using the Pygments highlighter
162 - Extensions: automatic testing of code snippets, inclusion of docstrings
163 from Python modules (API docs) via built-in extensions, and much more
164 functionality via third-party extensions.
165 - Themes: modify the look and feel of outputs via creating themes, and
166 re-use many third-party themes.
167 - Contributed extensions: dozens of extensions contributed by users; most
168 of them installable from PyPI.
170 Sphinx uses the reStructuredText markup language by default, and can read
171 MyST markdown via third-party extensions. Both of these are powerful and
172 straightforward to use, and have functionality for complex documentation
173 and publishing workflows. They both build upon Docutils to parse and write
176 homepage = "https://www.sphinx-doc.org";
177 changelog = "https://www.sphinx-doc.org/en/master/changes.html";
178 license = lib.licenses.bsd3;
179 maintainers = lib.teams.sphinx.members;