Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113{ lib, stdenv, buildPythonPackage, fetchpatch, inkscape, poetry-core, cssselect, lxml, numpy, pillow, pygobject3, pyparsing, pyserial, scour, tinycss2, gobject-introspection, pytestCheckHook, gtk3,}:
buildPythonPackage { pname = "inkex"; inherit (inkscape) version; pyproject = true;
inherit (inkscape) src;
patches = [ # Fix tests with newer libxml2 # https://gitlab.com/inkscape/extensions/-/merge_requests/712 (fetchpatch { url = "https://gitlab.com/inkscape/extensions/-/commit/b04ab718b400778a264f2085bbc779faebc08368.patch"; hash = "sha256-BXRcfoeX7X8+x6CuKKBhrnzUHIwgnPay22Z8+rPZS54="; stripLen = 1; extraPrefix = "share/extensions/"; })
# Fix binary DXF parsing on big-endian # https://gitlab.com/inkscape/extensions/-/merge_requests/721 ./1001-dxf-fix-binary-dxf-double-parsing-on-big-endian.patch ];
build-system = [ poetry-core ];
pythonRelaxDeps = [ "lxml" "numpy" ];
dependencies = [ cssselect lxml numpy pillow pygobject3 pyparsing pyserial scour tinycss2 ];
pythonImportsCheck = [ "inkex" ];
# The inkex version isn't update in tandem with inkscape dontCheckPythonMetadata = true;
nativeCheckInputs = [ gobject-introspection pytestCheckHook ];
checkInputs = [ gtk3 ];
disabledTests = [ "test_extract_multiple" "test_lookup_and" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_image_extract" "test_path_number_nodes" "test_plotter" # Hangs ] ++ lib.optionals stdenv.hostPlatform.isMusl [ "test_ellipse_arc" ];
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" ];
postPatch = '' cd share/extensions
substituteInPlace pyproject.toml \ --replace-fail '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"; license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ dotlambda ]; };}