2020-11-15 13:44:38 +00:00
|
|
|
{ lib
|
|
|
|
, substituteAll
|
|
|
|
, buildPythonApplication
|
|
|
|
, fetchPypi
|
|
|
|
, joblib
|
|
|
|
, segments
|
|
|
|
, attrs
|
|
|
|
, espeak-ng
|
|
|
|
, pytestCheckHook
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-cov
|
2020-11-15 13:44:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "phonemizer";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "2.2.2";
|
2020-11-15 13:44:38 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "ae252f0bc7633e172b08622f318e7e112cde847e9281d4675ea7210157325146";
|
2020-11-15 13:44:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e '/\'pytest-runner\'/d setup.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./backend-paths.patch;
|
|
|
|
espeak = "${lib.getBin espeak-ng}/bin/espeak";
|
|
|
|
# override festival path should you try to integrate it
|
|
|
|
festival = "";
|
|
|
|
})
|
|
|
|
./remove-intertwined-festival-test.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
joblib
|
|
|
|
segments
|
|
|
|
attrs
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2021-07-24 12:14:16 +00:00
|
|
|
pytest-cov
|
2020-11-15 13:44:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# We tried to package festvial, but were unable to get the backend running,
|
|
|
|
# so let's disable related tests.
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--ignore=test/test_festival.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_festival"
|
|
|
|
"test_relative"
|
|
|
|
"test_absolute"
|
|
|
|
"test_readme_festival_syll"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/bootphon/phonemizer";
|
|
|
|
description = "Simple text to phones converter for multiple languages";
|
|
|
|
license = licenses.gpl3;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-11-15 13:44:38 +00:00
|
|
|
};
|
|
|
|
}
|