nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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 inherit pname version;
16 sha256 = "0p3abj91c3l72ajj5jwblscsdf1jflrnn0djx2h5y6f2wjbx9ipf";
17 };
18
19 postPatch = ''
20 substituteInPlace setup.py \
21 --replace "docutils<0.18" "docutils"
22 '';
23
24 preBuild = ''
25 # Don't use NPM to fetch assets. Assets are included in sdist.
26 export CI=1
27 '';
28
29 propagatedBuildInputs = [
30 docutils
31 sphinx
32 ];
33
34 checkInputs = [
35 readthedocs-sphinx-ext
36 pytestCheckHook
37 ];
38
39 meta = with lib; {
40 description = "ReadTheDocs.org theme for Sphinx";
41 homepage = "https://github.com/readthedocs/sphinx_rtd_theme";
42 license = licenses.mit;
43 platforms = platforms.unix;
44 };
45
46}