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