From ebf252618c531b082e5ec035db3e6f1a50bdad01 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Sat, 7 Jan 2023 15:56:33 -0500 Subject: [PATCH] python3.pkgs.sphinx-hoverxref: init at 1.3.0 --- .../sphinx-hoverxref/default.nix | 67 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 69 insertions(+) create mode 100644 pkgs/development/python-modules/sphinx-hoverxref/default.nix diff --git a/pkgs/development/python-modules/sphinx-hoverxref/default.nix b/pkgs/development/python-modules/sphinx-hoverxref/default.nix new file mode 100644 index 000000000000..c606297e1afc --- /dev/null +++ b/pkgs/development/python-modules/sphinx-hoverxref/default.nix @@ -0,0 +1,67 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, flit-core +, pythonImportsCheckHook +# documentation build dependencies +, sphinxHook +, sphinx-notfound-page +, sphinx-prompt +, sphinx-rtd-theme +, sphinx-tabs +, sphinx-version-warning +, sphinxcontrib-autoapi +, sphinxcontrib-bibtex +, sphinxemoji +# runtime dependencies +, sphinx +, sphinx-jquery +}: + +buildPythonPackage rec { + pname = "sphinx-hoverxref"; + version = "1.3.0"; + format = "flit"; + outputs = [ "out" "doc" ]; + + src = fetchFromGitHub { + owner = "readthedocs"; + repo = "sphinx-hoverxref"; + rev = version; + hash = "sha256-DJ+mHu9IeEYEyf/SD+nDNtWpTf6z7tQzG0ogaECDpkU="; + }; + + nativeBuildInputs = [ + flit-core + pythonImportsCheckHook + + sphinxHook + sphinx-notfound-page + sphinx-prompt + sphinx-rtd-theme + sphinx-tabs + sphinx-version-warning + sphinxcontrib-autoapi + sphinxcontrib-bibtex + sphinxemoji + ]; + + propagatedBuildInputs = [ sphinx sphinx-jquery ]; + + pythonImportsCheck = [ "hoverxref" ]; + + meta = with lib; { + description = "A sphinx extension for creating tooltips on the cross references of the documentation"; + longDescription = '' + sphinx-hoverxref is a Sphinx extension to show a floating window + (tooltips or modal dialogues) on the cross references of the + documentation embedding the content of the linked section on them. + + With sphinx-hoverxref, you don’t need to click a link to see what’s + in there. + ''; + homepage = "https://github.com/readthedocs/sphinx-hoverxref"; + license = licenses.mit; + maintainers = with maintainers; [ kaction ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 43e505eb91e4..8ead4192c672 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10730,6 +10730,8 @@ self: super: with self; { sphinx-fortran = callPackage ../development/python-modules/sphinx-fortran { }; + sphinx-hoverxref = callPackage ../development/python-modules/sphinx-hoverxref { }; + sphinx-jupyterbook-latex = callPackage ../development/python-modules/sphinx-jupyterbook-latex { }; sphinx-multitoc-numbering = callPackage ../development/python-modules/sphinx-multitoc-numbering { };