2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
2024-09-19 14:19:46 +00:00
|
|
|
stdenv,
|
2024-06-05 15:53:02 +00:00
|
|
|
buildPythonPackage,
|
|
|
|
inkscape,
|
2024-07-27 06:49:29 +00:00
|
|
|
fetchpatch,
|
2024-06-05 15:53:02 +00:00
|
|
|
poetry-core,
|
|
|
|
cssselect,
|
|
|
|
lxml,
|
|
|
|
numpy,
|
|
|
|
packaging,
|
|
|
|
pillow,
|
|
|
|
pygobject3,
|
|
|
|
pyparsing,
|
|
|
|
pyserial,
|
|
|
|
scour,
|
|
|
|
gobject-introspection,
|
|
|
|
pytestCheckHook,
|
|
|
|
gtk3,
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
buildPythonPackage {
|
2021-06-28 23:13:55 +00:00
|
|
|
pname = "inkex";
|
2023-11-16 04:20:00 +00:00
|
|
|
inherit (inkscape) version;
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
inherit (inkscape) src;
|
2023-03-04 12:14:45 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
patches = [
|
|
|
|
# Fix “distribute along path” test with Python 3.12.
|
|
|
|
# https://gitlab.com/inkscape/extensions/-/issues/580
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.com/inkscape/extensions/-/commit/c576043c195cd044bdfc975e6367afb9b655eb14.patch";
|
|
|
|
extraPrefix = "share/extensions/";
|
|
|
|
stripLen = 1;
|
|
|
|
hash = "sha256-D9HxBx8RNkD7hHuExJqdu3oqlrXX6IOUw9m9Gx6+Dr8=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
cssselect
|
2021-06-28 23:13:55 +00:00
|
|
|
lxml
|
2022-06-16 17:23:12 +00:00
|
|
|
numpy
|
|
|
|
pygobject3
|
2023-03-04 12:14:45 +00:00
|
|
|
pyserial
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
pythonImportsCheck = [ "inkex" ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
checkInputs = [
|
|
|
|
gtk3
|
2023-11-16 04:20:00 +00:00
|
|
|
packaging
|
|
|
|
pillow
|
|
|
|
pyparsing
|
|
|
|
scour
|
2023-03-04 12:14:45 +00:00
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
"test_extract_multiple"
|
|
|
|
"test_lookup_and"
|
|
|
|
]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optional stdenv.hostPlatform.isDarwin [
|
2024-09-19 14:19:46 +00:00
|
|
|
"test_image_extract"
|
|
|
|
"test_path_number_nodes"
|
|
|
|
"test_plotter" # Hangs
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Fatal Python error: Segmentation fault
|
|
|
|
"tests/test_inkex_gui.py"
|
|
|
|
"tests/test_inkex_gui_listview.py"
|
|
|
|
"tests/test_inkex_gui_window.py"
|
|
|
|
# Failed to find pixmap 'image-missing' in /build/source/tests/data/
|
|
|
|
"tests/test_inkex_gui_pixmaps.py"
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
cd share/extensions
|
|
|
|
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail 'scour = "^0.37"' 'scour = ">=0.37"' \
|
|
|
|
--replace-fail 'lxml = "^4.5.0"' 'lxml = "^4.5.0 || ^5.0.0"'
|
2023-11-16 04:20:00 +00:00
|
|
|
'';
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
meta = {
|
|
|
|
description = "Library for manipulating SVG documents which is the basis for Inkscape extensions";
|
|
|
|
homepage = "https://gitlab.com/inkscape/extensions";
|
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
}
|