2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2023-08-22 20:05:09 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2020-06-18 07:06:33 +00:00
|
|
|
, substituteAll
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyparsing
|
2020-06-18 07:06:33 +00:00
|
|
|
, graphviz
|
2023-08-22 20:05:09 +00:00
|
|
|
, pytestCheckHook
|
2023-11-16 04:20:00 +00:00
|
|
|
, texliveSmall
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dot2tex";
|
|
|
|
version = "2.11.3";
|
2023-08-22 20:05:09 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-KZoq8FruW74CV6VipQapPieSk9XDjyjQirissyM/584=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./path.patch;
|
|
|
|
inherit graphviz;
|
|
|
|
})
|
|
|
|
./test.patch # https://github.com/kjellmf/dot2tex/issues/5
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
# https://github.com/xyz2tex/dot2tex/pull/104 does not merge cleanly
|
|
|
|
./remove-duplicate-script.patch
|
2020-06-18 07:06:33 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyparsing
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
pytestCheckHook
|
2023-11-16 04:20:00 +00:00
|
|
|
(texliveSmall.withPackages (ps: with ps; [ preview pstricks ]))
|
2020-06-18 07:06:33 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Convert graphs generated by Graphviz to LaTeX friendly formats";
|
|
|
|
homepage = "https://github.com/kjellmf/dot2tex";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|