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