1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 python, 7 pkg-config, 8 pango, 9 cython, 10 AppKit, 11 pytestCheckHook, 12 pythonOlder, 13}: 14 15buildPythonPackage rec { 16 pname = "manimpango"; 17 version = "0.5.0"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = "ManimCommunity"; 24 repo = pname; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-EBSbvjQyQIXOzvQMbuTwOoV8xSAOYDlCBZ56NLneuQI="; 27 }; 28 29 nativeBuildInputs = [ pkg-config ]; 30 31 buildInputs = [ pango ] ++ lib.optionals stdenv.isDarwin [ AppKit ]; 32 33 propagatedBuildInputs = [ cython ]; 34 35 nativeCheckInputs = [ pytestCheckHook ]; 36 37 postPatch = '' 38 substituteInPlace setup.cfg \ 39 --replace "--cov --no-cov-on-fail" "" 40 ''; 41 42 preBuild = '' 43 ${python.pythonOnBuildForHost.interpreter} setup.py build_ext --inplace 44 ''; 45 46 pythonImportsCheck = [ "manimpango" ]; 47 48 meta = with lib; { 49 description = "Binding for Pango"; 50 homepage = "https://github.com/ManimCommunity/ManimPango"; 51 changelog = "https://github.com/ManimCommunity/ManimPango/releases/tag/v${version}"; 52 license = licenses.mit; 53 maintainers = with maintainers; [ emilytrau ]; 54 }; 55}