mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-24 22:04:20 +00:00
python39Packages.sphinxcontrib-tikz: replace patch by substituteInPlace to prevent apply errors
This commit is contained in:
parent
359d8035f3
commit
f0292c3c25
@ -1,22 +0,0 @@
|
||||
diff --git a/sphinxcontrib/tikz.py b/sphinxcontrib/tikz.py
|
||||
index ee21113..a4f4589 100644
|
||||
--- a/sphinxcontrib/tikz.py
|
||||
+++ b/sphinxcontrib/tikz.py
|
||||
@@ -242,7 +242,7 @@ def render_tikz(self, node, libs='', stringsubst=False):
|
||||
tf.write(latex)
|
||||
tf.close()
|
||||
|
||||
- system([self.builder.config.latex_engine, '--interaction=nonstopmode',
|
||||
+ system(['@texLive@/bin/pdflatex', '--interaction=nonstopmode',
|
||||
'tikz-%s.tex' % shasum],
|
||||
self.builder)
|
||||
|
||||
@@ -281,7 +281,7 @@ def render_tikz(self, node, libs='', stringsubst=False):
|
||||
'-sOutputFile=%s' % outfn, '-r' + resolution + 'x' + resolution,
|
||||
'-f', 'tikz-%s.pdf' % shasum], self.builder)
|
||||
elif self.builder.config.tikz_proc_suite == "pdf2svg":
|
||||
- system(['pdf2svg', 'tikz-%s.pdf' % shasum, outfn], self.builder)
|
||||
+ system(['@pdf2svg@/bin/pdf2svg', 'tikz-%s.pdf' % shasum, outfn], self.builder)
|
||||
else:
|
||||
self.builder._tikz_warned = True
|
||||
raise TikzExtError('Error (tikz extension): Invalid configuration '
|
@ -16,12 +16,11 @@ buildPythonPackage rec {
|
||||
sha256 = "1614a45c960b80009dd42f96689122c9c0781018a0c5ec5828f4cdc5e35b11ad";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./binary-paths.patch;
|
||||
inherit texLive pdf2svg;
|
||||
})
|
||||
];
|
||||
postPatch = ''
|
||||
substituteInPlace sphinxcontrib/tikz.py \
|
||||
--replace "config.latex_engine" "${texLive}/bin/pdflatex" \
|
||||
--replace "system(['pdf2svg'" "system(['${pdf2svg}/bin/pdf2svg'"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ sphinx ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user