From 839d9c7974129098ec1bed1066e304b93dec2271 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 8 May 2025 03:42:24 +0200 Subject: [PATCH 1/2] rstcheck: cleanup dependencies, expose sphinx extra --- .../python-modules/rstcheck/default.nix | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) 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" ]; From 20df1577c16f025219d866edd6add173bb272138 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 8 May 2025 04:17:40 +0200 Subject: [PATCH 2/2] rstcheckWithSphinx: init flavor with sphinx This is useful to get it cached and usable in downstream CI jobs. --- pkgs/top-level/all-packages.nix | 4 ++++ 1 file changed, 4 insertions(+) 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;