nav: init at 1.2.1 (#356071)
[NixPkgs.git] / pkgs / development / python-modules / inkex / default.nix
blobc3c65ae3184fae88eac859ee6238e74d62e28817
2   lib,
3   stdenv,
4   buildPythonPackage,
5   inkscape,
6   poetry-core,
7   cssselect,
8   lxml,
9   numpy,
10   packaging,
11   pillow,
12   pygobject3,
13   pyparsing,
14   pyserial,
15   scour,
16   tinycss2,
17   gobject-introspection,
18   pytestCheckHook,
19   gtk3,
22 buildPythonPackage {
23   pname = "inkex";
24   inherit (inkscape) version;
26   format = "pyproject";
28   inherit (inkscape) src;
30   nativeBuildInputs = [ poetry-core ];
32   propagatedBuildInputs = [
33     cssselect
34     lxml
35     numpy
36     pygobject3
37     pyserial
38     tinycss2
39   ];
41   pythonImportsCheck = [ "inkex" ];
43   nativeCheckInputs = [
44     gobject-introspection
45     pytestCheckHook
46   ];
48   checkInputs = [
49     gtk3
50     packaging
51     pillow
52     pyparsing
53     scour
54   ];
56   disabledTests =
57     [
58       "test_extract_multiple"
59       "test_lookup_and"
60     ]
61     ++ lib.optional stdenv.hostPlatform.isDarwin [
62       "test_image_extract"
63       "test_path_number_nodes"
64       "test_plotter" # Hangs
65     ];
67   disabledTestPaths = [
68     # Fatal Python error: Segmentation fault
69     "tests/test_inkex_gui.py"
70     "tests/test_inkex_gui_listview.py"
71     "tests/test_inkex_gui_window.py"
72     # Failed to find pixmap 'image-missing' in /build/source/tests/data/
73     "tests/test_inkex_gui_pixmaps.py"
74   ];
76   postPatch = ''
77     cd share/extensions
79     substituteInPlace pyproject.toml \
80       --replace-fail 'scour = "^0.37"' 'scour = ">=0.37"'
81   '';
83   meta = {
84     description = "Library for manipulating SVG documents which is the basis for Inkscape extensions";
85     homepage = "https://gitlab.com/inkscape/extensions";
86     license = lib.licenses.gpl2Plus;
87     maintainers = with lib.maintainers; [ dotlambda ];
88   };