1{ lib
2, buildPythonPackage
3, fetchPypi
4, docutils
5, sphinx
6, readthedocs-sphinx-ext
7, pytestCheckHook
8}:
9
10buildPythonPackage rec {
11 pname = "sphinx-rtd-theme";
12 version = "1.0.0";
13
14 src = fetchPypi {
15 pname = "sphinx_rtd_theme";
16 inherit version;
17 sha256 = "0p3abj91c3l72ajj5jwblscsdf1jflrnn0djx2h5y6f2wjbx9ipf";
18 };
19
20 postPatch = ''
21 substituteInPlace setup.py \
22 --replace "docutils<0.18" "docutils"
23 '';
24
25 preBuild = ''
26 # Don't use NPM to fetch assets. Assets are included in sdist.
27 export CI=1
28 '';
29
30 propagatedBuildInputs = [
31 docutils
32 sphinx
33 ];
34
35 checkInputs = [
36 readthedocs-sphinx-ext
37 pytestCheckHook
38 ];
39
40 meta = with lib; {
41 description = "ReadTheDocs.org theme for Sphinx";
42 homepage = "https://github.com/readthedocs/sphinx_rtd_theme";
43 license = licenses.mit;
44 platforms = platforms.unix;
45 };
46
47}