1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 20:21:14 +00:00
Robert Schütz 2023-02-21 17:47:07 -08:00 committed by Robert Schütz
parent 5d12e405f6
commit 6d945d2803

View file

@ -1,24 +1,39 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, poetry-core
, inkex
, lxml
, pytestCheckHook
}:
buildPythonPackage {
buildPythonPackage rec {
pname = "svg2tikz";
version = "unstable-2021-01-12";
version = "1.2.0";
format = "setuptools";
disabled = pythonOlder "3.10";
format = "pyproject";
src = fetchFromGitHub {
owner = "xyz2tex";
repo = "svg2tikz";
rev = "7a9959c295e1ed73e543474c6f3679d04cebc9e9";
hash = "sha256-OLMFtEEdcY8ARI+hUSOhMwwcrtOAsbKRJRdDJcuaIBg=";
rev = "refs/tags/v${version}";
hash = "sha256-oFcKRcXef1Uz0qFi6Gga/D4u8zW0RjXAnHDlhRr33Ts=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "+dairiki.1" ""
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
inkex
lxml
];
@ -26,12 +41,10 @@ buildPythonPackage {
pytestCheckHook
];
# upstream hasn't updated the tests in a while
doCheck = false;
pythonImportsCheck = [ "svg2tikz" ];
meta = with lib; {
changelog = "https://github.com/xyz2tex/svg2tikz/blob/${src.rev}/README.md#changes-bug-fixes-and-known-problems-from-the-original";
homepage = "https://github.com/xyz2tex/svg2tikz";
description = "Set of tools for converting SVG graphics to TikZ/PGF code";
license = licenses.gpl2Plus;