about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/dot2tex/default.nix
blob: 03445f79117f7b8bbe8249c2ff4f224543b01d80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ stdenv
, python
, buildPythonPackage
, fetchPypi
, substituteAll
, pyparsing
, graphviz
, texlive
}:

buildPythonPackage rec {
  pname = "dot2tex";
  version = "2.11.3";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1kp77wiv7b5qib82i3y3sn9r49rym43aaqm5aw1bwnzfbbq2m6i9";
  };

  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";
    license = licenses.mit;
  };

}