2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, sphinx
|
|
|
|
, pdf2svg
|
|
|
|
, texLive
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sphinxcontrib-tikz";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "0.4.16";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-8f9FNx6WMopcqihUzNlQoPBGYoW2YkFi6W1iaFLD4qU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace sphinxcontrib/tikz.py \
|
2021-10-28 06:52:43 +00:00
|
|
|
--replace "config.latex_engine" "'${texLive}/bin/pdflatex'" \
|
2021-09-18 10:52:07 +00:00
|
|
|
--replace "system(['pdf2svg'" "system(['${pdf2svg}/bin/pdf2svg'"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ sphinx ];
|
|
|
|
|
|
|
|
# no tests in package
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
pythonImportsCheck = [ "sphinxcontrib.tikz" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "TikZ extension for Sphinx";
|
|
|
|
homepage = "https://bitbucket.org/philexander/tikz";
|
|
|
|
maintainers = with maintainers; [ costrouc ];
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|