From dfa18fb29d7b167a705b85292f2b7eed033073b1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 21 Jun 2021 13:32:58 +0200 Subject: [PATCH] python3Packages.sphinx-rtd-theme: fix build Adds the missing docutils dependency and relaxes its constraint. Migrates from pytest to pytestCheckHook and moves the CI environment variable export into preBuild. --- .../sphinx_rtd_theme/default.nix | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/sphinx_rtd_theme/default.nix b/pkgs/development/python-modules/sphinx_rtd_theme/default.nix index ec03fb8d7ffb..f5ec90755c1d 100644 --- a/pkgs/development/python-modules/sphinx_rtd_theme/default.nix +++ b/pkgs/development/python-modules/sphinx_rtd_theme/default.nix @@ -1,9 +1,10 @@ { lib , buildPythonPackage , fetchPypi +, docutils , sphinx , readthedocs-sphinx-ext -, pytest +, pytestCheckHook }: buildPythonPackage rec { @@ -15,15 +16,26 @@ buildPythonPackage rec { sha256 = "32bd3b5d13dc8186d7a42fc816a23d32e83a4827d7d9882948e7b837c232da5a"; }; - propagatedBuildInputs = [ sphinx ]; - - checkInputs = [ readthedocs-sphinx-ext pytest ]; - CI=1; # Don't use NPM to fetch assets. Assets are included in sdist. - - checkPhase = '' - py.test + postPatch = '' + substituteInPlace setup.py \ + --replace "docutils<0.17" "docutils" ''; + preBuild = '' + # Don't use NPM to fetch assets. Assets are included in sdist. + export CI=1 + ''; + + propagatedBuildInputs = [ + docutils + sphinx + ]; + + checkInputs = [ + readthedocs-sphinx-ext + pytestCheckHook + ]; + meta = with lib; { description = "ReadTheDocs.org theme for Sphinx"; homepage = "https://github.com/readthedocs/sphinx_rtd_theme";