Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.sphinxcontrib-tikz: init at 0.4.6 #57583

Merged
merged 1 commit into from
Jan 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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 '
38 changes: 38 additions & 0 deletions pkgs/development/python-modules/sphinxcontrib-tikz/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ lib
, substituteAll
, buildPythonPackage
, fetchPypi
, sphinx
, pdf2svg
, texLive
}:

buildPythonPackage rec {
pname = "sphinxcontrib-tikz";
version = "0.4.6";

src = fetchPypi {
inherit pname version;
sha256 = "4f362b11e3c2bd17d5f0f07fec03917c16fc5bbcda6fe31ee137c547ed6b03a3";
};

patches = [
(substituteAll {
src = ./binary-paths.patch;
inherit texLive pdf2svg;
})
];

propagatedBuildInputs = [ sphinx ];

# no tests in package
doCheck = false;

meta = with lib; {
description = "TikZ extension for Sphinx";
homepage = https://bitbucket.org/philexander/tikz;
maintainers = with maintainers; [ costrouc ];
license = licenses.bsd3;
};

}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4556,6 +4556,10 @@ in {

sphinxcontrib-spelling = callPackage ../development/python-modules/sphinxcontrib-spelling { };

sphinxcontrib-tikz = callPackage ../development/python-modules/sphinxcontrib-tikz {
texLive = pkgs.texlive.combine { inherit (pkgs.texlive) scheme-small standalone pgfplots; };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
texLive = pkgs.texlive.combine { inherit (pkgs.texlive) scheme-small standalone pgfplots; };
texlive = pkgs.texlive.combine { inherit (pkgs.texlive) scheme-small standalone pgfplots; };

};

sphinx_pypi_upload = callPackage ../development/python-modules/sphinx_pypi_upload { };

Pweave = callPackage ../development/python-modules/pweave { };
Expand Down