depot/third_party/nixpkgs/pkgs/development/python-modules/sphinxcontrib-tikz/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

48 lines
1,023 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
sphinx,
pdf2svg,
texliveSmall,
}:
buildPythonPackage rec {
pname = "sphinxcontrib-tikz";
version = "0.4.19";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-gen+bH4NvEbxnxr5HStisB1BqyKIS4n1VoHyAK4mXUk=";
};
postPatch = ''
substituteInPlace sphinxcontrib/tikz.py \
--replace "config.latex_engine" "'${
texliveSmall.withPackages (
ps: with ps; [
standalone
pgfplots
]
)
}/bin/pdflatex'" \
--replace "system(['pdf2svg'" "system(['${pdf2svg}/bin/pdf2svg'"
'';
propagatedBuildInputs = [ sphinx ];
# no tests in package
doCheck = false;
pythonImportsCheck = [ "sphinxcontrib.tikz" ];
pythonNamespaces = [ "sphinxcontrib" ];
meta = with lib; {
description = "TikZ extension for Sphinx";
homepage = "https://bitbucket.org/philexander/tikz";
maintainers = with maintainers; [ ];
license = licenses.bsd3;
};
}