2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2023-03-04 12:14:45 +00:00
|
|
|
, pythonOlder
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchFromGitHub
|
2023-03-04 12:14:45 +00:00
|
|
|
, poetry-core
|
|
|
|
, inkex
|
2020-04-24 23:36:52 +00:00
|
|
|
, lxml
|
2022-11-27 09:42:12 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "svg2tikz";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "1.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchFromGitHub {
|
2022-11-27 09:42:12 +00:00
|
|
|
owner = "xyz2tex";
|
2022-03-30 09:31:56 +00:00
|
|
|
repo = "svg2tikz";
|
2023-03-04 12:14:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-oFcKRcXef1Uz0qFi6Gga/D4u8zW0RjXAnHDlhRr33Ts=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "+dairiki.1" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-03-04 12:14:45 +00:00
|
|
|
inkex
|
2022-11-27 09:42:12 +00:00
|
|
|
lxml
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-11-27 09:42:12 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "svg2tikz" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/xyz2tex/svg2tikz/blob/${src.rev}/README.md#changes-bug-fixes-and-known-problems-from-the-original";
|
2022-11-27 09:42:12 +00:00
|
|
|
homepage = "https://github.com/xyz2tex/svg2tikz";
|
|
|
|
description = "Set of tools for converting SVG graphics to TikZ/PGF code";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2022-11-27 09:42:12 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda gal_bolle ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|