2021-12-26 17:43:05 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
2021-05-20 23:08:51 +00:00
|
|
|
, fetchFromGitHub
|
2022-08-12 12:06:08 +00:00
|
|
|
, fetchpatch
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
# nativeBuildInputs
|
|
|
|
, flit-core
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# propagatedBuildInputs
|
2022-05-18 14:49:53 +00:00
|
|
|
, babel
|
2021-05-20 23:08:51 +00:00
|
|
|
, alabaster
|
2020-04-24 23:36:52 +00:00
|
|
|
, docutils
|
2021-05-20 23:08:51 +00:00
|
|
|
, imagesize
|
2022-02-10 20:34:41 +00:00
|
|
|
, importlib-metadata
|
2020-04-24 23:36:52 +00:00
|
|
|
, jinja2
|
2021-05-20 23:08:51 +00:00
|
|
|
, packaging
|
2020-04-24 23:36:52 +00:00
|
|
|
, pygments
|
|
|
|
, requests
|
2021-05-20 23:08:51 +00:00
|
|
|
, snowballstemmer
|
2022-02-10 20:34:41 +00:00
|
|
|
, sphinxcontrib-apidoc
|
2020-04-24 23:36:52 +00:00
|
|
|
, sphinxcontrib-applehelp
|
|
|
|
, sphinxcontrib-devhelp
|
|
|
|
, sphinxcontrib-htmlhelp
|
|
|
|
, sphinxcontrib-jsmath
|
|
|
|
, sphinxcontrib-qthelp
|
|
|
|
, sphinxcontrib-serializinghtml
|
|
|
|
, sphinxcontrib-websupport
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# check phase
|
2022-09-09 14:08:57 +00:00
|
|
|
, cython
|
2021-05-20 23:08:51 +00:00
|
|
|
, html5lib
|
|
|
|
, pytestCheckHook
|
|
|
|
, typed-ast
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sphinx";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "5.3.0";
|
|
|
|
format = "pyproject";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sphinx-doc";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-80bVg1rfBebgSOKbWkzP84vpm39iLgM8lWlVD64nSsQ=";
|
2022-06-16 17:23:12 +00:00
|
|
|
postFetch = ''
|
2021-12-26 17:43:05 +00:00
|
|
|
cd $out
|
|
|
|
mv tests/roots/test-images/testimäge.png \
|
|
|
|
tests/roots/test-images/testimæge.png
|
|
|
|
patch -p1 < ${./0001-test-images-Use-normalization-equivalent-character.patch}
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
babel
|
2021-05-20 23:08:51 +00:00
|
|
|
alabaster
|
2020-04-24 23:36:52 +00:00
|
|
|
docutils
|
2021-05-20 23:08:51 +00:00
|
|
|
imagesize
|
2020-04-24 23:36:52 +00:00
|
|
|
jinja2
|
2021-04-05 15:23:46 +00:00
|
|
|
packaging
|
2021-05-20 23:08:51 +00:00
|
|
|
pygments
|
|
|
|
requests
|
2020-04-24 23:36:52 +00:00
|
|
|
snowballstemmer
|
|
|
|
sphinxcontrib-applehelp
|
|
|
|
sphinxcontrib-devhelp
|
|
|
|
sphinxcontrib-htmlhelp
|
|
|
|
sphinxcontrib-jsmath
|
|
|
|
sphinxcontrib-qthelp
|
|
|
|
sphinxcontrib-serializinghtml
|
2021-05-20 23:08:51 +00:00
|
|
|
# extra[docs]
|
2020-04-24 23:36:52 +00:00
|
|
|
sphinxcontrib-websupport
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
# extra plugins which are otherwise not found by sphinx-build
|
|
|
|
sphinxcontrib-apidoc
|
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
|
|
importlib-metadata
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
cython
|
2021-05-20 23:08:51 +00:00
|
|
|
html5lib
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
typed-ast
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
# requires network access
|
|
|
|
"test_anchors_ignored"
|
|
|
|
"test_defaults"
|
|
|
|
"test_defaults_json"
|
|
|
|
"test_latex_images"
|
2021-09-26 12:46:18 +00:00
|
|
|
|
|
|
|
# requires imagemagick (increases build closure size), doesn't
|
|
|
|
# test anything substantial
|
|
|
|
"test_ext_imgconverter"
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2021-12-26 17:43:05 +00:00
|
|
|
# Due to lack of network sandboxing can't guarantee port 7777 isn't bound
|
|
|
|
"test_inspect_main_url"
|
|
|
|
"test_auth_header_uses_first_match"
|
2022-04-15 01:41:22 +00:00
|
|
|
"test_linkcheck_allowed_redirects"
|
2021-12-26 17:43:05 +00:00
|
|
|
"test_linkcheck_request_headers"
|
|
|
|
"test_linkcheck_request_headers_no_slash"
|
|
|
|
"test_follows_redirects_on_HEAD"
|
2022-04-15 01:41:22 +00:00
|
|
|
"test_get_after_head_raises_connection_error"
|
2021-12-26 17:43:05 +00:00
|
|
|
"test_invalid_ssl"
|
|
|
|
"test_connect_to_selfsigned_with_tls_verify_false"
|
|
|
|
"test_connect_to_selfsigned_with_tls_cacerts"
|
|
|
|
"test_connect_to_selfsigned_with_requests_env_var"
|
|
|
|
"test_connect_to_selfsigned_nonexistent_cert_file"
|
|
|
|
"test_TooManyRedirects_on_HEAD"
|
|
|
|
"test_too_many_requests_retry_after_int_del"
|
|
|
|
"test_too_many_requests_retry_after_HTTP_date"
|
|
|
|
"test_too_many_requests_retry_after_without_header"
|
|
|
|
"test_too_many_requests_user_timeout"
|
|
|
|
"test_raises_for_invalid_status"
|
|
|
|
"test_auth_header_no_match"
|
|
|
|
"test_follows_redirects_on_GET"
|
|
|
|
"test_connect_to_selfsigned_fails"
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python documentation generator";
|
|
|
|
longDescription = ''
|
|
|
|
A tool that makes it easy to create intelligent and beautiful
|
|
|
|
documentation for Python projects
|
|
|
|
'';
|
|
|
|
homepage = "https://www.sphinx-doc.org";
|
|
|
|
license = licenses.bsd3;
|
2022-02-10 20:34:41 +00:00
|
|
|
maintainers = teams.sphinx.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|