2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-06-28 23:13:55 +00:00
|
|
|
, docutils
|
2020-04-24 23:36:52 +00:00
|
|
|
, sphinx
|
|
|
|
, readthedocs-sphinx-ext
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-08-12 12:06:08 +00:00
|
|
|
pname = "sphinx-rtd-theme";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "1.1.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2022-08-12 12:06:08 +00:00
|
|
|
pname = "sphinx_rtd_theme";
|
|
|
|
inherit version;
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-YUbIRfHhlHs8PdRDLCiZihaTzMdCtPmtfGMSnwdXwQM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postPatch = ''
|
2023-01-20 10:41:00 +00:00
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "docutils <0.18" "docutils" \
|
|
|
|
--replace "sphinx >=1.6,<6" "sphinx"
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
preBuild = ''
|
|
|
|
# Don't use NPM to fetch assets. Assets are included in sdist.
|
|
|
|
export CI=1
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
docutils
|
|
|
|
sphinx
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
readthedocs-sphinx-ext
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "ReadTheDocs.org theme for Sphinx";
|
2021-04-26 19:14:03 +00:00
|
|
|
homepage = "https://github.com/readthedocs/sphinx_rtd_theme";
|
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|