From 7e8135c8e1c7b9283fa0cf7965fe11027a3fe9ea Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 5 Aug 2025 04:39:17 +0200 Subject: [PATCH] python3Packages.furo: 2024.8.6 -> 2025.7.19 https://github.com/pradyunsg/furo/blob/2025.7.19/docs/changelog.md This commit was automatically generated using update-python-libraries. --- .../python-modules/furo/default.nix | 79 +++++++++++++------ 1 file changed, 53 insertions(+), 26 deletions(-) diff --git a/pkgs/development/python-modules/furo/default.nix b/pkgs/development/python-modules/furo/default.nix index 71bc32d7a516..2bb4606fada4 100644 --- a/pkgs/development/python-modules/furo/default.nix +++ b/pkgs/development/python-modules/furo/default.nix @@ -1,48 +1,75 @@ { lib, + buildNpmPackage, buildPythonPackage, - pythonOlder, - fetchPypi, - sphinx, + fetchFromGitHub, + flit-core, + accessible-pygments, beautifulsoup4, + pygments, + sphinx, sphinx-basic-ng, }: -buildPythonPackage rec { +let pname = "furo"; - version = "2024.8.6"; - format = "wheel"; + version = "2025.07.19"; - disabled = pythonOlder "3.8"; - - src = fetchPypi { - inherit pname version format; - dist = "py3"; - python = "py3"; - hash = "sha256-bNl8WLR4E9NhnmPpCBFpiA++Mx8MqIPIcf8fPxGBT1w="; + src = fetchFromGitHub { + owner = "pradyunsg"; + repo = "furo"; + tag = version; + hash = "sha256-pIF5zrh5YbkuSkrateEB/tDULSNbeVn2Qx+Fm3nOYGE="; }; + web = buildNpmPackage { + pname = "${pname}-web"; + inherit version src; + + npmDepsHash = "sha256-dcdHoyqF9zC/eKtEqMho7TK2E1KIvoXo0iwSPTzj+Kw="; + + installPhase = '' + pushd src/furo/theme/furo/static + mkdir $out + cp -rv scripts styles $out/ + popd + ''; + }; +in + +buildPythonPackage rec { + inherit pname version src; + pyproject = true; + + postPatch = '' + # build with boring backend that does not manage a node env + substituteInPlace pyproject.toml \ + --replace-fail "sphinx-theme-builder >= 0.2.0a10" "flit-core" \ + --replace-fail "sphinx_theme_builder" "flit_core.buildapi" + + pushd src/furo/theme/furo/static + cp -rv ${web}/{scripts,styles} . + popd + ''; + + build-system = [ flit-core ]; + pythonRelaxDeps = [ "sphinx" ]; - propagatedBuildInputs = [ - sphinx + dependencies = [ + accessible-pygments beautifulsoup4 + pygments + sphinx sphinx-basic-ng ]; - installCheckPhase = '' - # furo was built incorrectly if this directory is empty - # Ignore the hidden file .gitignore - cd "$out/lib/python"* - if [ "$(ls 'site-packages/furo/theme/furo/static/' | wc -l)" -le 0 ]; then - echo 'static directory must not be empty' - exit 1 - fi - cd - - ''; - pythonImportsCheck = [ "furo" ]; + passthru = { + inherit web; + }; + meta = with lib; { description = "Clean customizable documentation theme for Sphinx"; homepage = "https://github.com/pradyunsg/furo";