depot/third_party/nixpkgs/pkgs/development/python-modules/sphinxcontrib-tikz/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

38 lines
816 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, sphinx
, pdf2svg
, texLive
}:
buildPythonPackage rec {
pname = "sphinxcontrib-tikz";
version = "0.4.16";
src = fetchPypi {
inherit pname version;
hash = "sha256-8f9FNx6WMopcqihUzNlQoPBGYoW2YkFi6W1iaFLD4qU=";
};
postPatch = ''
substituteInPlace sphinxcontrib/tikz.py \
--replace "config.latex_engine" "'${texLive}/bin/pdflatex'" \
--replace "system(['pdf2svg'" "system(['${pdf2svg}/bin/pdf2svg'"
'';
propagatedBuildInputs = [ sphinx ];
# no tests in package
doCheck = false;
pythonImportsCheck = [ "sphinxcontrib.tikz" ];
meta = with lib; {
description = "TikZ extension for Sphinx";
homepage = "https://bitbucket.org/philexander/tikz";
maintainers = with maintainers; [ ];
license = licenses.bsd3;
};
}