1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pkg-config,
6 setuptools,
7 pango,
8 cython,
9 pytest-cov-stub,
10 pytestCheckHook,
11 pythonOlder,
12}:
13
14buildPythonPackage rec {
15 pname = "manimpango";
16 version = "0.6.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "ManimCommunity";
23 repo = "manimpango";
24 tag = "v${version}";
25 hash = "sha256-nN+XOnki8fG7URMy2Fhs2X+yNi8Y7wDo53d61xaRa3w=";
26 };
27
28 postPatch = ''
29 substituteInPlace pyproject.toml \
30 --replace-fail "Cython>=3.0.2,<3.1" Cython
31 '';
32
33 nativeBuildInputs = [ pkg-config ];
34
35 buildInputs = [ pango ];
36
37 build-system = [
38 setuptools
39 cython
40 ];
41
42 nativeCheckInputs = [
43 pytest-cov-stub
44 pytestCheckHook
45 ];
46
47 preCheck = ''
48 rm -r manimpango
49 '';
50
51 pythonImportsCheck = [ "manimpango" ];
52
53 meta = with lib; {
54 description = "Binding for Pango";
55 homepage = "https://github.com/ManimCommunity/ManimPango";
56 changelog = "https://github.com/ManimCommunity/ManimPango/releases/tag/v${version}";
57 license = licenses.mit;
58 maintainers = with maintainers; [ emilytrau ];
59 };
60}