nixpkgs/pkgs/development/python-modules/dot2tex/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

49 lines
1000 B
Nix

{ lib
, buildPythonPackage
, fetchpatch
, fetchPypi
, substituteAll
, pyparsing
, graphviz
, pytestCheckHook
, texliveSmall
}:
buildPythonPackage rec {
pname = "dot2tex";
version = "2.11.3";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-KZoq8FruW74CV6VipQapPieSk9XDjyjQirissyM/584=";
};
patches = [
(substituteAll {
src = ./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
];
propagatedBuildInputs = [
pyparsing
];
nativeCheckInputs = [
pytestCheckHook
(texliveSmall.withPackages (ps: with ps; [ preview pstricks ]))
];
meta = with lib; {
description = "Convert graphs generated by Graphviz to LaTeX friendly formats";
mainProgram = "dot2tex";
homepage = "https://github.com/kjellmf/dot2tex";
license = licenses.mit;
};
}