1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5# propagatedBuildInputs
6, Babel
7, alabaster
8, docutils
9, imagesize
10, jinja2
11, packaging
12, pygments
13, requests
14, setuptools
15, snowballstemmer
16, sphinxcontrib-applehelp
17, sphinxcontrib-devhelp
18, sphinxcontrib-htmlhelp
19, sphinxcontrib-jsmath
20, sphinxcontrib-qthelp
21, sphinxcontrib-serializinghtml
22, sphinxcontrib-websupport
23# check phase
24, html5lib
25, imagemagick
26, pytestCheckHook
27, typed-ast
28}:
29
30buildPythonPackage rec {
31 pname = "sphinx";
32 version = "3.5.4";
33 disabled = pythonOlder "3.5";
34
35 src = fetchFromGitHub {
36 owner = "sphinx-doc";
37 repo = pname;
38 rev = "v${version}";
39 sha256 = "1xjii3dl01rq8x2bsxc6zywiy1s7arfgxrg5l8ml54w1748shadd";
40 };
41
42 propagatedBuildInputs = [
43 Babel
44 alabaster
45 docutils
46 imagesize
47 jinja2
48 packaging
49 pygments
50 requests
51 setuptools
52 snowballstemmer
53 sphinxcontrib-applehelp
54 sphinxcontrib-devhelp
55 sphinxcontrib-htmlhelp
56 sphinxcontrib-jsmath
57 sphinxcontrib-qthelp
58 sphinxcontrib-serializinghtml
59 # extra[docs]
60 sphinxcontrib-websupport
61 ];
62
63 checkInputs = [
64 imagemagick
65 html5lib
66 pytestCheckHook
67 ] ++ lib.optionals (pythonOlder "3.8") [
68 typed-ast
69 ];
70
71 disabledTests = [
72 # requires network access
73 "test_anchors_ignored"
74 "test_defaults"
75 "test_defaults_json"
76 "test_latex_images"
77 ];
78
79 meta = with lib; {
80 description = "Python documentation generator";
81 longDescription = ''
82 A tool that makes it easy to create intelligent and beautiful
83 documentation for Python projects
84 '';
85 homepage = "https://www.sphinx-doc.org";
86 license = licenses.bsd3;
87 maintainers = with maintainers; [ ];
88 };
89}