1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 replaceVars, 6 espeak-ng, 7 pytestCheckHook, 8}: 9 10buildPythonPackage rec { 11 pname = "espeak-phonemizer"; 12 version = "1.3.1"; 13 format = "setuptools"; 14 15 src = fetchFromGitHub { 16 owner = "rhasspy"; 17 repo = "espeak-phonemizer"; 18 tag = "v${version}"; 19 hash = "sha256-K0s24mzXUqG0Au40jjGbpKNAznBkMHQzfh2/CDBN0F8="; 20 }; 21 22 patches = [ 23 (replaceVars ./cdll.patch { 24 libespeak_ng = "${lib.getLib espeak-ng}/lib/libespeak-ng.so"; 25 }) 26 ]; 27 28 nativeCheckInputs = [ pytestCheckHook ]; 29 30 meta = with lib; { 31 changelog = "https://github.com/rhasspy/espeak-phonemizer/releases/tag/v${version}"; 32 description = "Uses ctypes and libespeak-ng to transform test into IPA phonemes"; 33 mainProgram = "espeak-phonemizer"; 34 homepage = "https://github.com/rhasspy/espeak-phonemizer"; 35 license = licenses.mit; 36 maintainers = with maintainers; [ hexa ]; 37 platforms = platforms.linux; 38 }; 39}