From 6b19bd9a3dd4e009d37c2515c8c87ac874aaf4ab Mon Sep 17 00:00:00 2001 From: Nico Felbinger Date: Fri, 10 Jul 2026 15:49:19 +0200 Subject: [PATCH] python3Packages.sphinx-llm: init at 0.4.1 --- .../python-modules/sphinx-llm/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/sphinx-llm/default.nix diff --git a/pkgs/development/python-modules/sphinx-llm/default.nix b/pkgs/development/python-modules/sphinx-llm/default.nix new file mode 100644 index 000000000000..2a00de00b91c --- /dev/null +++ b/pkgs/development/python-modules/sphinx-llm/default.nix @@ -0,0 +1,49 @@ +{ + lib, + fetchFromGitHub, + buildPythonPackage, + hatchling, + hatch-vcs, + sphinx, + sphinx-markdown-builder, + langchain-ollama, + pytestCheckHook, +}: +buildPythonPackage (finalAttrs: { + pname = "sphinx-llm"; + version = "0.4.1"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "NVIDIA"; + repo = "sphinx-llm"; + tag = finalAttrs.version; + hash = "sha256-hrJ2g4Zcjs0ojueCtrMpsMv1MRwd5kuBFYI4cnhPZrs="; + }; + + build-system = [ + hatchling + hatch-vcs + ]; + + dependencies = [ + sphinx + sphinx-markdown-builder + langchain-ollama + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ + "sphinx_llm.txt" + "sphinx_llm.docref" + ]; + + meta = { + description = "LLM extensions for Sphinx Documentation"; + homepage = "https://github.com/NVIDIA/sphinx-llm"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ benley ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c96c2839b5d9..b3d25b5a56b2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -19073,6 +19073,8 @@ self: super: with self; { callPackage ../development/python-modules/sphinx-last-updated-by-git { }; + sphinx-llm = callPackage ../development/python-modules/sphinx-llm { }; + sphinx-llms-txt = callPackage ../development/python-modules/sphinx-llms-txt { }; sphinx-lv2-theme = callPackage ../development/python-modules/sphinx-lv2-theme { };