aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/dot2tex/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/dot2tex/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/dot2tex/default.nix24
1 files changed, 21 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/dot2tex/default.nix b/nixpkgs/pkgs/development/python-modules/dot2tex/default.nix
index f671cdc9642..03445f79117 100644
--- a/nixpkgs/pkgs/development/python-modules/dot2tex/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/dot2tex/default.nix
@@ -1,8 +1,11 @@
{ stdenv
+, python
, buildPythonPackage
, fetchPypi
-, isPy3k
+, substituteAll
, pyparsing
+, graphviz
+, texlive
}:
buildPythonPackage rec {
@@ -14,11 +17,26 @@ buildPythonPackage rec {
sha256 = "1kp77wiv7b5qib82i3y3sn9r49rym43aaqm5aw1bwnzfbbq2m6i9";
};
- # Tests fail with 3.x. Furthermore, package is no longer maintained.
- disabled = isPy3k;
+ patches = [
+ (substituteAll {
+ src = ./path.patch;
+ inherit graphviz;
+ })
+ ./test.patch # https://github.com/kjellmf/dot2tex/issues/5
+ ];
propagatedBuildInputs = [ pyparsing ];
+ checkInputs = [
+ (texlive.combine {
+ inherit (texlive) scheme-small preview pstricks;
+ })
+ ];
+
+ checkPhase = ''
+ ${python.interpreter} tests/test_dot2tex.py
+ '';
+
meta = with stdenv.lib; {
description = "Convert graphs generated by Graphviz to LaTeX friendly formats";
homepage = "https://github.com/kjellmf/dot2tex";