diff --git a/pkgs/development/python-modules/rstcheck/default.nix b/pkgs/development/python-modules/rstcheck/default.nix index 96c5bcea3ecc..e188bd30c836 100644 --- a/pkgs/development/python-modules/rstcheck/default.nix +++ b/pkgs/development/python-modules/rstcheck/default.nix @@ -1,17 +1,14 @@ { lib, - stdenv, buildPythonPackage, - docutils, fetchFromGitHub, setuptools, setuptools-scm, - pydantic, pytestCheckHook, pythonOlder, rstcheck-core, + sphinx, typer, - types-docutils, }: buildPythonPackage rec { @@ -34,20 +31,15 @@ buildPythonPackage rec { ]; dependencies = [ - docutils rstcheck-core - types-docutils - pydantic typer ]; - nativeCheckInputs = [ pytestCheckHook ]; + optional-dependencies = { + sphinx = [ sphinx ]; + }; - disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ - # Disabled until https://github.com/rstcheck/rstcheck-core/issues/19 is resolved. - "test_error_without_config_file_macos" - "test_file_1_is_bad_without_config_macos" - ]; + nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "rstcheck" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8bf80e166da9..98db1754b3cd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4362,6 +4362,10 @@ with pkgs; rstcheck = with python3Packages; toPythonApplication rstcheck; + rstcheckWithSphinx = rstcheck.overridePythonAttrs (oldAttrs: { + dependencies = oldAttrs.dependencies ++ oldAttrs.optional-dependencies.sphinx; + }); + rtmpdump_gnutls = rtmpdump.override { gnutlsSupport = true; opensslSupport = false;