mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-30 05:55:40 +00:00
54 lines
1.0 KiB
Nix
54 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
replaceVars,
|
|
pyparsing,
|
|
graphviz,
|
|
setuptools,
|
|
pytestCheckHook,
|
|
texliveSmall,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "dot2tex";
|
|
version = "2.11.3";
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit (finalAttrs) pname version;
|
|
hash = "sha256-KZoq8FruW74CV6VipQapPieSk9XDjyjQirissyM/584=";
|
|
};
|
|
|
|
patches = [
|
|
(replaceVars ./path.patch {
|
|
inherit graphviz;
|
|
})
|
|
./test.patch # https://github.com/kjellmf/dot2tex/issues/5
|
|
|
|
# https://github.com/xyz2tex/dot2tex/pull/104 does not merge cleanly
|
|
./remove-duplicate-script.patch
|
|
];
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ pyparsing ];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
(texliveSmall.withPackages (
|
|
ps: with ps; [
|
|
preview
|
|
pstricks
|
|
]
|
|
))
|
|
];
|
|
|
|
meta = {
|
|
description = "Convert graphs generated by Graphviz to LaTeX friendly formats";
|
|
mainProgram = "dot2tex";
|
|
homepage = "https://github.com/kjellmf/dot2tex";
|
|
license = lib.licenses.mit;
|
|
};
|
|
})
|