1{ 2 lib, 3 stdenv, 4 replaceVars, 5 buildPythonPackage, 6 fetchPypi, 7 joblib, 8 segments, 9 attrs, 10 dlinfo, 11 typing-extensions, 12 espeak-ng, 13 setuptools, 14 pytest, 15}: 16 17buildPythonPackage rec { 18 pname = "phonemizer"; 19 version = "3.3.0"; 20 pyproject = true; 21 22 build-system = [ setuptools ]; 23 24 src = fetchPypi { 25 inherit pname version; 26 hash = "sha256-Xgw4Ei7/4LMxok5nSv8laHTs4WnXCpzxEgM3tW+OPQw="; 27 }; 28 29 patches = [ 30 (replaceVars ./backend-paths.patch { 31 libespeak = "${lib.getLib espeak-ng}/lib/libespeak-ng${stdenv.hostPlatform.extensions.sharedLibrary}"; 32 # FIXME package festival 33 }) 34 ]; 35 36 propagatedBuildInputs = [ 37 joblib 38 segments 39 attrs 40 dlinfo 41 typing-extensions 42 ]; 43 44 # We tried to package festival, but were unable to get the backend running, 45 # so let's disable related tests. 46 doCheck = false; 47 48 meta = { 49 homepage = "https://github.com/bootphon/phonemizer"; 50 changelog = "https://github.com/bootphon/phonemizer/blob/v${version}/CHANGELOG.md"; 51 description = "Simple text to phones converter for multiple languages"; 52 mainProgram = "phonemize"; 53 license = lib.licenses.gpl3Plus; 54 maintainers = with lib.maintainers; [ bot-wxt1221 ]; 55 }; 56}