2020-11-15 13:44:38 +00:00
|
|
|
{ lib
|
2022-05-18 14:49:53 +00:00
|
|
|
, stdenv
|
2020-11-15 13:44:38 +00:00
|
|
|
, substituteAll
|
|
|
|
, buildPythonApplication
|
|
|
|
, fetchPypi
|
|
|
|
, joblib
|
|
|
|
, segments
|
|
|
|
, attrs
|
2022-05-18 14:49:53 +00:00
|
|
|
, dlinfo
|
|
|
|
, typing-extensions
|
2020-11-15 13:44:38 +00:00
|
|
|
, 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";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "3.1.1";
|
2020-11-15 13:44:38 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-PWVK0NLVa0Rx1xyUyQF2/RvUo3/geskn53FcEv0Jr0c=";
|
2020-11-15 13:44:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e '/\'pytest-runner\'/d setup.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./backend-paths.patch;
|
2022-05-18 14:49:53 +00:00
|
|
|
libespeak = "${lib.getLib espeak-ng}/lib/libespeak-ng${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
# FIXME package festival
|
2020-11-15 13:44:38 +00:00
|
|
|
})
|
|
|
|
./remove-intertwined-festival-test.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
joblib
|
|
|
|
segments
|
|
|
|
attrs
|
2022-05-18 14:49:53 +00:00
|
|
|
dlinfo
|
|
|
|
typing-extensions
|
2020-11-15 13:44:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
# We tried to package festvial, but were unable to get the backend running,
|
|
|
|
# so let's disable related tests.
|
2022-05-18 14:49:53 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"test/test_festival.py"
|
2020-11-15 13:44:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_festival"
|
2022-05-18 14:49:53 +00:00
|
|
|
"test_festival_path"
|
2020-11-15 13:44:38 +00:00
|
|
|
"test_readme_festival_syll"
|
2022-05-18 14:49:53 +00:00
|
|
|
"test_unicode"
|
2020-11-15 13:44:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/bootphon/phonemizer";
|
2022-05-18 14:49:53 +00:00
|
|
|
changelog = "https://github.com/bootphon/phonemizer/blob/v${version}/CHANGELOG.md";
|
2020-11-15 13:44:38 +00:00
|
|
|
description = "Simple text to phones converter for multiple languages";
|
2022-05-18 14:49:53 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-11-15 13:44:38 +00:00
|
|
|
};
|
|
|
|
}
|