2021-07-19 20:48:02 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2017-08-12 06:55:59 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
2021-05-08 12:34:58 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
# propagatedBuildInputs
|
|
|
|
, Babel
|
|
|
|
, alabaster
|
2017-08-12 06:55:59 +00:00
|
|
|
, docutils
|
2021-05-08 12:34:58 +00:00
|
|
|
, imagesize
|
2017-08-12 06:55:59 +00:00
|
|
|
, jinja2
|
2021-05-08 12:34:58 +00:00
|
|
|
, packaging
|
2017-08-12 06:55:59 +00:00
|
|
|
, pygments
|
|
|
|
, requests
|
2021-05-08 12:34:58 +00:00
|
|
|
, setuptools
|
|
|
|
, snowballstemmer
|
2019-10-21 22:41:10 +00:00
|
|
|
, sphinxcontrib-applehelp
|
|
|
|
, sphinxcontrib-devhelp
|
|
|
|
, sphinxcontrib-htmlhelp
|
|
|
|
, sphinxcontrib-jsmath
|
|
|
|
, sphinxcontrib-qthelp
|
|
|
|
, sphinxcontrib-serializinghtml
|
2017-08-24 17:34:20 +00:00
|
|
|
, sphinxcontrib-websupport
|
2021-05-08 12:34:58 +00:00
|
|
|
# check phase
|
|
|
|
, html5lib
|
|
|
|
, pytestCheckHook
|
|
|
|
, typed-ast
|
2017-08-12 06:55:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-11-04 23:49:33 +00:00
|
|
|
pname = "sphinx";
|
2022-01-14 07:51:05 +00:00
|
|
|
version = "4.3.2";
|
2021-05-08 12:34:58 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sphinx-doc";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-01-14 07:51:05 +00:00
|
|
|
sha256 = "sha256-ze6+iGGWSDljb8SPc1Z9UcPfUrleDTeaol5ZDGj1iYg=";
|
2021-07-12 15:37:04 +00:00
|
|
|
extraPostFetch = ''
|
|
|
|
cd $out
|
2021-10-13 14:00:28 +00:00
|
|
|
mv tests/roots/test-images/testimäge.png \
|
2021-07-12 15:37:04 +00:00
|
|
|
tests/roots/test-images/testimæge.png
|
|
|
|
patch -p1 < ${./0001-test-images-Use-normalization-equivalent-character.patch}
|
|
|
|
'';
|
2017-08-12 06:55:59 +00:00
|
|
|
};
|
2017-08-24 17:34:20 +00:00
|
|
|
|
2017-08-12 06:55:59 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-05-08 12:34:58 +00:00
|
|
|
Babel
|
|
|
|
alabaster
|
2017-08-12 06:55:59 +00:00
|
|
|
docutils
|
2021-05-08 12:34:58 +00:00
|
|
|
imagesize
|
2017-08-12 06:55:59 +00:00
|
|
|
jinja2
|
2021-03-20 13:54:36 +00:00
|
|
|
packaging
|
2021-05-08 12:34:58 +00:00
|
|
|
pygments
|
|
|
|
requests
|
2019-09-08 14:34:51 +00:00
|
|
|
setuptools
|
2017-08-12 06:55:59 +00:00
|
|
|
snowballstemmer
|
2019-10-21 22:41:10 +00:00
|
|
|
sphinxcontrib-applehelp
|
|
|
|
sphinxcontrib-devhelp
|
|
|
|
sphinxcontrib-htmlhelp
|
|
|
|
sphinxcontrib-jsmath
|
|
|
|
sphinxcontrib-qthelp
|
|
|
|
sphinxcontrib-serializinghtml
|
2021-05-08 12:34:58 +00:00
|
|
|
# extra[docs]
|
2017-08-24 17:34:20 +00:00
|
|
|
sphinxcontrib-websupport
|
2021-05-08 12:34:58 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
html5lib
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
typed-ast
|
|
|
|
];
|
2017-08-12 06:55:59 +00:00
|
|
|
|
2021-05-08 12:34:58 +00:00
|
|
|
disabledTests = [
|
|
|
|
# requires network access
|
|
|
|
"test_anchors_ignored"
|
|
|
|
"test_defaults"
|
|
|
|
"test_defaults_json"
|
|
|
|
"test_latex_images"
|
2021-08-21 05:42:49 +00:00
|
|
|
|
|
|
|
# requires imagemagick (increases build closure size), doesn't
|
|
|
|
# test anything substantial
|
|
|
|
"test_ext_imgconverter"
|
2021-07-19 20:48:02 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin [
|
|
|
|
# Due to lack of network sandboxing can't guarantee port 7777 isn't bound
|
|
|
|
"test_inspect_main_url"
|
2021-07-20 13:32:33 +00:00
|
|
|
"test_auth_header_uses_first_match"
|
|
|
|
"test_linkcheck_request_headers"
|
|
|
|
"test_linkcheck_request_headers_no_slash"
|
|
|
|
"test_follows_redirects_on_HEAD"
|
|
|
|
"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-08 12:34:58 +00:00
|
|
|
];
|
2017-08-24 17:34:20 +00:00
|
|
|
|
2021-05-08 12:34:58 +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
|
|
|
|
'';
|
2021-04-16 17:08:47 +00:00
|
|
|
homepage = "https://www.sphinx-doc.org";
|
2021-05-08 12:34:58 +00:00
|
|
|
license = licenses.bsd3;
|
2021-05-14 14:00:41 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-08-12 06:55:59 +00:00
|
|
|
};
|
2018-06-06 20:07:04 +00:00
|
|
|
}
|