biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / sphinxcontrib-tikz / default.nix
blob50c892cd5cd51b659dadd5c446a3225b566ca332
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   sphinx,
6   pdf2svg,
7   texliveSmall,
8 }:
10 buildPythonPackage rec {
11   pname = "sphinxcontrib-tikz";
12   version = "0.4.20";
13   format = "setuptools";
15   src = fetchPypi {
16     inherit pname version;
17     hash = "sha256-LuO9H5yi80nAgjpPNQfZHEEOf5a+IPBR/vevFmXzQco=";
18   };
20   postPatch = ''
21     substituteInPlace sphinxcontrib/tikz.py \
22       --replace "config.latex_engine" "'${
23         texliveSmall.withPackages (
24           ps: with ps; [
25             standalone
26             pgfplots
27           ]
28         )
29       }/bin/pdflatex'" \
30       --replace "system(['pdf2svg'" "system(['${pdf2svg}/bin/pdf2svg'"
31   '';
33   propagatedBuildInputs = [ sphinx ];
35   # no tests in package
36   doCheck = false;
38   pythonImportsCheck = [ "sphinxcontrib.tikz" ];
40   pythonNamespaces = [ "sphinxcontrib" ];
42   meta = with lib; {
43     description = "TikZ extension for Sphinx";
44     homepage = "https://bitbucket.org/philexander/tikz";
45     maintainers = [ ];
46     license = licenses.bsd3;
47   };