python3Packages.sphinxcontrib-svg2pdfconverter: init at 1.3.0

dansbandit f8b11e8a a9bd4f2b

+61
+59
pkgs/development/python-modules/sphinxcontrib-svg2pdfconverter/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + setuptools, 5 + sphinx, 6 + cairosvg, 7 + inkscape, 8 + librsvg, 9 + fetchPypi, 10 + 11 + withCairosvg ? false, 12 + withInkscape ? false, 13 + withLibrsvg ? true, 14 + }: 15 + 16 + assert (withCairosvg || withInkscape || withLibrsvg); 17 + 18 + buildPythonPackage rec { 19 + pname = "sphinxcontrib-svg2pdfconverter"; 20 + version = "1.3.0"; 21 + pyproject = true; 22 + 23 + src = fetchPypi { 24 + inherit version; 25 + pname = "sphinxcontrib_svg2pdfconverter"; 26 + hash = "sha256-ZBGkzC9X7tlqDXu/oTn2jL55gwGIgeHm18RgU81pkR8="; 27 + }; 28 + 29 + # for enabled modules: provide the full path to the binary 30 + postPatch = 31 + lib.optionalString withLibrsvg '' 32 + substituteInPlace sphinxcontrib/rsvgconverter.py \ 33 + --replace-fail "'rsvg_converter_bin', 'rsvg-convert'" "'rsvg_converter_bin', '${lib.getExe' librsvg "rsvg-convert"}'" 34 + '' 35 + + lib.optionalString withInkscape '' 36 + substituteInPlace sphinxcontrib/inkscapeconverter.py \ 37 + --replace-fail "'inkscape_converter_bin', 'inkscape'" "'inkscape_converter_bin', '${lib.getExe inkscape}'" 38 + ''; 39 + 40 + build-system = [ setuptools ]; 41 + 42 + dependencies = [ sphinx ] ++ lib.optional withCairosvg cairosvg; 43 + 44 + doCheck = false; # no tests 45 + 46 + pythonImportsCheck = 47 + lib.optional withCairosvg "sphinxcontrib.cairosvgconverter" 48 + ++ lib.optional withInkscape "sphinxcontrib.inkscapeconverter" 49 + ++ lib.optional withLibrsvg "sphinxcontrib.rsvgconverter"; 50 + 51 + pythonNamespaces = [ "sphinxcontrib" ]; 52 + 53 + meta = { 54 + description = "Sphinx SVG to PDF converter extension"; 55 + homepage = "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter"; 56 + license = lib.licenses.bsd2; 57 + maintainers = with lib.maintainers; [ dansbandit ]; 58 + }; 59 + }
+2
pkgs/top-level/python-packages.nix
··· 15694 15694 15695 15695 sphinxcontrib-spelling = callPackage ../development/python-modules/sphinxcontrib-spelling { }; 15696 15696 15697 + sphinxcontrib-svg2pdfconverter = callPackage ../development/python-modules/sphinxcontrib-svg2pdfconverter { }; 15698 + 15697 15699 sphinxcontrib-tikz = callPackage ../development/python-modules/sphinxcontrib-tikz { }; 15698 15700 15699 15701 sphinxcontrib-wavedrom = callPackage ../development/python-modules/sphinxcontrib-wavedrom { };