1{ lib
2, buildPythonPackage
3, fetchFromGitLab
4, poetry-core
5, cssselect
6, lxml
7, numpy
8, packaging
9, pillow
10, pygobject3
11, pyserial
12, scour
13, gobject-introspection
14, pytestCheckHook
15, gtk3
16}:
17
18buildPythonPackage rec {
19 pname = "inkex";
20 version = "1.2.2";
21
22 format = "pyproject";
23
24 src = fetchFromGitLab {
25 owner = "inkscape";
26 repo = "extensions";
27 rev = "EXTENSIONS_AT_INKSCAPE_${version}";
28 hash = "sha256-jw7daZQTBxLHWOpjZkMYtP1vIQvd/eLgiktWqVSjEgU=";
29 };
30
31 postPatch = ''
32 substituteInPlace pyproject.toml \
33 --replace '"1.2.0"' '"${version}"' \
34 --replace 'scour = "^0.37"' 'scour = ">=0.37"'
35 '';
36
37 nativeBuildInputs = [
38 poetry-core
39 ];
40
41 propagatedBuildInputs = [
42 cssselect
43 lxml
44 numpy
45 packaging
46 pillow
47 pygobject3
48 pyserial
49 scour
50 ];
51
52 pythonImportsCheck = [ "inkex" ];
53
54 nativeCheckInputs = [
55 gobject-introspection
56 pytestCheckHook
57 ];
58
59 checkInputs = [
60 gtk3
61 ];
62
63 disabledTests = [
64 "test_extract_multiple"
65 "test_lookup_and"
66 ];
67
68 disabledTestPaths = [
69 # Fatal Python error: Segmentation fault
70 "tests/test_inkex_gui.py"
71 "tests/test_inkex_gui_listview.py"
72 "tests/test_inkex_gui_window.py"
73 # Failed to find pixmap 'image-missing' in /build/source/tests/data/
74 "tests/test_inkex_gui_pixmaps.py"
75 ];
76
77 meta = {
78 description = "Library for manipulating SVG documents which is the basis for Inkscape extensions";
79 homepage = "https://gitlab.com/inkscape/extensions";
80 license = lib.licenses.gpl2Plus;
81 maintainers = with lib.maintainers; [ dotlambda ];
82 };
83}