From b3887e543271123e012d303ebec24b49ab84b0ee Mon Sep 17 00:00:00 2001 From: dansbandit <4530687+dansbandit@users.noreply.github.com> Date: Thu, 13 Jun 2024 19:12:58 +0200 Subject: [PATCH] python3Packages.sphinxcontrib-svg2pdfconverter: init at 1.2.3 --- .../default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/sphinxcontrib-svg2pdfconverter/default.nix 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 { };