evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / inkex / default.nix
blob2435c7e4678687303fc760cf2df55c78ad870592
2   lib,
3   stdenv,
4   buildPythonPackage,
5   inkscape,
6   fetchpatch,
7   poetry-core,
8   cssselect,
9   lxml,
10   numpy,
11   packaging,
12   pillow,
13   pygobject3,
14   pyparsing,
15   pyserial,
16   scour,
17   gobject-introspection,
18   pytestCheckHook,
19   gtk3,
22 buildPythonPackage {
23   pname = "inkex";
24   inherit (inkscape) version;
26   format = "pyproject";
28   inherit (inkscape) src;
30   patches = [
31     # Fix “distribute along path” test with Python 3.12.
32     # https://gitlab.com/inkscape/extensions/-/issues/580
33     (fetchpatch {
34       url = "https://gitlab.com/inkscape/extensions/-/commit/c576043c195cd044bdfc975e6367afb9b655eb14.patch";
35       extraPrefix = "share/extensions/";
36       stripLen = 1;
37       hash = "sha256-D9HxBx8RNkD7hHuExJqdu3oqlrXX6IOUw9m9Gx6+Dr8=";
38     })
39   ];
41   nativeBuildInputs = [ poetry-core ];
43   propagatedBuildInputs = [
44     cssselect
45     lxml
46     numpy
47     pygobject3
48     pyserial
49   ];
51   pythonImportsCheck = [ "inkex" ];
53   nativeCheckInputs = [
54     gobject-introspection
55     pytestCheckHook
56   ];
58   checkInputs = [
59     gtk3
60     packaging
61     pillow
62     pyparsing
63     scour
64   ];
66   disabledTests =
67     [
68       "test_extract_multiple"
69       "test_lookup_and"
70     ]
71     ++ lib.optional stdenv.hostPlatform.isDarwin [
72       "test_image_extract"
73       "test_path_number_nodes"
74       "test_plotter" # Hangs
75     ];
77   disabledTestPaths = [
78     # Fatal Python error: Segmentation fault
79     "tests/test_inkex_gui.py"
80     "tests/test_inkex_gui_listview.py"
81     "tests/test_inkex_gui_window.py"
82     # Failed to find pixmap 'image-missing' in /build/source/tests/data/
83     "tests/test_inkex_gui_pixmaps.py"
84   ];
86   postPatch = ''
87     cd share/extensions
89     substituteInPlace pyproject.toml \
90       --replace-fail 'scour = "^0.37"' 'scour = ">=0.37"' \
91       --replace-fail 'lxml = "^4.5.0"' 'lxml = "^4.5.0 || ^5.0.0"'
92   '';
94   meta = {
95     description = "Library for manipulating SVG documents which is the basis for Inkscape extensions";
96     homepage = "https://gitlab.com/inkscape/extensions";
97     license = lib.licenses.gpl2Plus;
98     maintainers = with lib.maintainers; [ dotlambda ];
99   };