Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

81 lines
1.6 KiB
Nix

{
lib,
buildNpmPackage,
buildPythonPackage,
fetchFromGitHub,
flit-core,
accessible-pygments,
beautifulsoup4,
pygments,
sphinx,
sphinx-basic-ng,
}:
let
pname = "furo";
version = "2025.07.19";
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" ];
dependencies = [
accessible-pygments
beautifulsoup4
pygments
sphinx
sphinx-basic-ng
];
pythonImportsCheck = [ "furo" ];
passthru = {
inherit web;
};
meta = with lib; {
description = "Clean customizable documentation theme for Sphinx";
homepage = "https://github.com/pradyunsg/furo";
changelog = "https://github.com/pradyunsg/furo/blob/${version}/docs/changelog.md";
license = licenses.mit;
maintainers = with maintainers; [ Luflosi ];
};
}