From 7933685ffb9109508d071886ac993ba9c2446295 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Wed, 21 May 2025 21:57:43 +0200 Subject: [PATCH] docs: Update sphinx-rtd-theme to 3.0.2 --- docs/conf.py | 2 +- docs/requirements.txt | 4 ++-- nix/tools/docs.nix | 29 +++++++++++++++++++++-------- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index c15e1f60c..165461a83 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -114,7 +114,7 @@ html_theme = "sphinx_rtd_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -html_theme_options = {"display_version": False} +html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] diff --git a/docs/requirements.txt b/docs/requirements.txt index 7ed326401..e59a65693 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,6 +2,6 @@ sphinx==7.4.7 sphinx-copybutton==0.5.2 sphinx-rtd-dark-mode==1.3.0 -sphinx-rtd-theme==2.0.0 +sphinx-rtd-theme==3.0.2 sphinx-tabs==3.4.7 -sphinxext-opengraph==0.9.1 \ No newline at end of file +sphinxext-opengraph==0.9.1 diff --git a/nix/tools/docs.nix b/nix/tools/docs.nix index e6352389b..3393c3f11 100644 --- a/nix/tools/docs.nix +++ b/nix/tools/docs.nix @@ -2,6 +2,7 @@ , aspellDicts , buildToolbox , checkedShellScript +, fetchPypi , lib , plantuml , python3 @@ -10,14 +11,26 @@ , writers }: let - selectPythonPackages = ps: [ - ps.sphinx - ps.sphinx-copybutton - ps.sphinx-rtd-dark-mode - ps.sphinx-rtd-theme - ps.sphinx-tabs - ps.sphinxext-opengraph - ]; + selectPythonPackages = ps: + let + # TODO: Remove with next nixpkgs update + sphinx-rtd-theme = assert ps.sphinx-rtd-theme.version == "2.0.0"; ps.sphinx-rtd-theme.overrideAttrs rec { + version = "3.0.2"; + src = fetchPypi { + pname = "sphinx_rtd_theme"; + inherit version; + hash = "sha256-t0V7wl3acjsgsIamcLmVPIWeq2CioD7o6yuyPhduX4U="; + }; + }; + in + [ + ps.sphinx + ps.sphinx-copybutton + (ps.sphinx-rtd-dark-mode.override { inherit sphinx-rtd-theme; }) + sphinx-rtd-theme + ps.sphinx-tabs + ps.sphinxext-opengraph + ]; requirements = writeTextFile { name = "requirements.txt";