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 ./remove-intertwined-festival-test.patch 37 ]; 38 39 propagatedBuildInputs = [ 40 joblib 41 segments 42 attrs 43 dlinfo 44 typing-extensions 45 ]; 46 47 preCheck = '' 48 export HOME=$TMPDIR 49 ''; 50 51 checkInputs = [ 52 pytestCheckHook 53 ]; 54 55 # We tried to package festvial, but were unable to get the backend running, 56 # so let's disable related tests. 57 disabledTestPaths = [ 58 "test/test_festival.py" 59 ]; 60 61 disabledTests = [ 62 "test_festival" 63 "test_festival_path" 64 "test_readme_festival_syll" 65 "test_unicode" 66 ]; 67 68 meta = with lib; { 69 homepage = "https://github.com/bootphon/phonemizer"; 70 changelog = "https://github.com/bootphon/phonemizer/blob/v${version}/CHANGELOG.md"; 71 description = "Simple text to phones converter for multiple languages"; 72 license = licenses.gpl3Plus; 73 maintainers = with maintainers; [ ]; 74 }; 75}