diff --git a/pkgs/development/python-modules/sphinxcontrib-svg2pdfconverter/default.nix b/pkgs/development/python-modules/sphinxcontrib-svg2pdfconverter/default.nix new file mode 100644 index 0000000000000..6777cd0d3136a --- /dev/null +++ b/pkgs/development/python-modules/sphinxcontrib-svg2pdfconverter/default.nix @@ -0,0 +1,45 @@ +{ + lib, + buildPythonPackage, + setuptools, + sphinx, + cairosvg, + inkscape, + librsvg, + fetchPypi, + + withCairosvg ? false, + withInkscape ? false, + withLibrsvg ? false, +}: + +buildPythonPackage rec { + pname = "sphinxcontrib-svg2pdfconverter"; + version = "1.2.3"; + pyproject = true; + + src = fetchPypi { + inherit version; + pname = "sphinxcontrib_svg2pdfconverter"; + hash = "sha256-+11Re2NMVilSIATFntzk2QUNiYIkCMq0UsfVL+WumCQ="; + }; + + build-system = [ setuptools ]; + + dependencies = + [ sphinx ] + ++ lib.optional withCairosvg cairosvg + ++ lib.optional withInkscape inkscape + ++ lib.optional withLibrsvg librsvg; + + doCheck = false; + + pythonNamespaces = [ "sphinxcontrib" ]; + + meta = { + description = "Sphinx SVG to PDF converter extension"; + homepage = "https://pypi.org/project/sphinxcontrib-svg2pdfconverter"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ dansbandit ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f76e097653155..903b2bdbf1980 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14891,6 +14891,8 @@ self: super: with self; { sphinxcontrib-spelling = callPackage ../development/python-modules/sphinxcontrib-spelling { }; + sphinxcontrib-svg2pdfconverter = callPackage ../development/python-modules/sphinxcontrib-svg2pdfconverter { }; + sphinxcontrib-tikz = callPackage ../development/python-modules/sphinxcontrib-tikz { }; sphinxcontrib-wavedrom = callPackage ../development/python-modules/sphinxcontrib-wavedrom { };