python3.pkgs.inkex: inherit source from Inkscape

This partly reverts 5d12e405f6 to avoid potential conflicts.
Also move dependencies only introduced because of tests to checkInputs.
This commit is contained in:
Jan Tojnar 2023-09-13 22:10:46 +02:00
parent aae20a0f43
commit e7eb9f5e0f

View File

@ -1,5 +1,6 @@
{ lib
, buildPythonPackage
, inkscape
, fetchFromGitLab
, poetry-core
, cssselect
@ -15,24 +16,13 @@
, gtk3
}:
buildPythonPackage rec {
buildPythonPackage {
pname = "inkex";
version = "1.2.2";
inherit (inkscape) version;
format = "pyproject";
src = fetchFromGitLab {
owner = "inkscape";
repo = "extensions";
rev = "EXTENSIONS_AT_INKSCAPE_${version}";
hash = "sha256-jw7daZQTBxLHWOpjZkMYtP1vIQvd/eLgiktWqVSjEgU=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace '"1.2.0"' '"${version}"' \
--replace 'scour = "^0.37"' 'scour = ">=0.37"'
'';
inherit (inkscape) src;
nativeBuildInputs = [
poetry-core
@ -42,11 +32,8 @@ buildPythonPackage rec {
cssselect
lxml
numpy
packaging
pillow
pygobject3
pyserial
scour
];
pythonImportsCheck = [ "inkex" ];
@ -58,6 +45,9 @@ buildPythonPackage rec {
checkInputs = [
gtk3
packaging
pillow
scour
];
disabledTests = [
@ -74,6 +64,13 @@ buildPythonPackage rec {
"tests/test_inkex_gui_pixmaps.py"
];
postPatch = ''
cd share/extensions
substituteInPlace pyproject.toml \
--replace 'scour = "^0.37"' 'scour = ">=0.37"'
'';
meta = {
description = "Library for manipulating SVG documents which is the basis for Inkscape extensions";
homepage = "https://gitlab.com/inkscape/extensions";