1{ stdenv, lib, buildPythonPackage, fetchFromGitHub, python, pkg-config, pango, cython, AppKit, pytestCheckHook }:
2
3buildPythonPackage rec {
4 pname = "manimpango";
5 version = "0.3.1";
6
7 src = fetchFromGitHub {
8 owner = "ManimCommunity";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "ldZfvv5kloQ0uj0agxOP8cRh+Ix8f9Z0PT+pnhWYjiQ=";
12 };
13
14 postPatch = ''
15 substituteInPlace setup.cfg --replace "--cov --no-cov-on-fail" ""
16 '';
17
18 nativeBuildInputs = [ pkg-config ];
19 buildInputs = [ pango ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
20 propagatedBuildInputs = [
21 cython
22 ];
23
24 preBuild = ''
25 ${python.interpreter} setup.py build_ext --inplace
26 '';
27
28 checkInputs = [ pytestCheckHook ];
29 pythonImportsCheck = [ "manimpango" ];
30
31 meta = with lib; {
32 homepage = "https://github.com/ManimCommunity/ManimPango";
33 license = licenses.gpl3Plus;
34 description = "Binding for Pango";
35 maintainers = [ maintainers.angustrau ];
36 };
37}