lol

python310Packages.inkex: build independently

Previously it was missing the .dist-info directory.

authored by

Robert Schütz and committed by
Robert Schütz
5d12e405 5261692e

+60 -24
+60 -24
pkgs/development/python-modules/inkex/default.nix
··· 1 - { buildPythonPackage 2 - , inkscape 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitLab 4 + , poetry-core 3 5 , cssselect 4 6 , lxml 5 7 , numpy 8 + , packaging 9 + , pillow 6 10 , pygobject3 7 - , python 11 + , pyserial 12 + , scour 13 + , gobject-introspection 14 + , pytestCheckHook 15 + , gtk3 8 16 }: 9 17 10 - buildPythonPackage { 18 + buildPythonPackage rec { 11 19 pname = "inkex"; 12 - inherit (inkscape) version; 20 + version = "1.2.2"; 13 21 14 - format = "other"; 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 + ]; 15 40 16 41 propagatedBuildInputs = [ 17 42 cssselect 18 43 lxml 19 44 numpy 45 + packaging 46 + pillow 20 47 pygobject3 48 + pyserial 49 + scour 21 50 ]; 22 51 23 - # We just copy the files. 24 - dontUnpack = true; 25 - dontBuild = true; 52 + pythonImportsCheck = [ "inkex" ]; 26 53 27 - # No tests installed. 28 - doCheck = false; 54 + nativeCheckInputs = [ 55 + gobject-introspection 56 + pytestCheckHook 57 + ]; 29 58 30 - installPhase = '' 31 - runHook preInstall 32 - 33 - mkdir -p "$out/${python.sitePackages}" 34 - cp -r "${inkscape}/share/inkscape/extensions/inkex" "$out/${python.sitePackages}" 59 + checkInputs = [ 60 + gtk3 61 + ]; 35 62 36 - runHook postInstall 37 - ''; 63 + disabledTests = [ 64 + "test_extract_multiple" 65 + "test_lookup_and" 66 + ]; 38 67 39 - meta = inkscape.meta // { 40 - description = "Inkscape Extensions Library"; 41 - longDescription = '' 42 - This module provides support for inkscape extensions, it includes support for opening svg files and processing them. 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 + ]; 43 76 44 - Standalone, it is especially useful for running tests for Inkscape extensions. 45 - ''; 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 ]; 46 82 }; 47 83 }