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