1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 setuptools,
7 wheel,
8 anyio,
9 numpy,
10 pillow,
11 pytest-forked,
12 pytest-xdist,
13 pytestCheckHook,
14 scipy,
15}:
16
17buildPythonPackage rec {
18 pname = "svgelements";
19 version = "1.9.6";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "meerk40t";
24 repo = "svgelements";
25 tag = version;
26 hash = "sha256-nx2sGXeeh8S17TfRDFifQbdSxc4YGsDNnrPSSbxv7S4=";
27 };
28
29 patches = [
30 (fetchpatch {
31 name = "fix-assert-tests";
32 url = "https://github.com/meerk40t/svgelements/commit/23da98941a94cf1afed39c10750222ccfee73c9f.patch";
33 hash = "sha256-/53w4eWlaSNEQxuoAxPrN2HciZ3Az2A2SKcIAlNgKAs=";
34 })
35 ];
36
37 build-system = [
38 setuptools
39 wheel
40 ];
41
42 pythonImportsCheck = [ "svgelements" ];
43
44 nativeCheckInputs = [
45 anyio
46 numpy
47 pillow
48 pytest-forked
49 pytest-xdist
50 pytestCheckHook
51 scipy
52 ];
53
54 meta = {
55 description = "SVG Parsing for Elements, Paths, and other SVG Objects";
56 homepage = "https://github.com/meerk40t/svgelements";
57 license = lib.licenses.mit;
58 maintainers = with lib.maintainers; [ GaetanLepage ];
59 };
60}