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
|
2022-10-30 15:09:59 +00:00
|
|
|
, buildPythonPackage
|
2020-11-15 13:44:38 +00:00
|
|
|
, 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
|
|
|
}:
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildPythonPackage rec {
|
2020-11-15 13:44:38 +00:00
|
|
|
pname = "phonemizer";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "3.2.1";
|
2022-10-30 15:09:59 +00:00
|
|
|
format = "setuptools";
|
2020-11-15 13:44:38 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-10-30 15:09:59 +00:00
|
|
|
hash = "sha256-Bo+F+FqKmtxjijeHrqyvcaU+R1eLEtdzwJdDNQDNiSs=";
|
2020-11-15 13:44:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-02-09 11:40:11 +00:00
|
|
|
sed -i '/pytest-runner/d' setup.py
|
2020-11-15 13:44:38 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
joblib
|
|
|
|
segments
|
|
|
|
attrs
|
2022-05-18 14:49:53 +00:00
|
|
|
dlinfo
|
|
|
|
typing-extensions
|
2020-11-15 13:44:38 +00:00
|
|
|
];
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
# We tried to package festival, but were unable to get the backend running,
|
2020-11-15 13:44:38 +00:00
|
|
|
# so let's disable related tests.
|
2023-02-09 11:40:11 +00:00
|
|
|
doCheck = false;
|
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
|
|
|
};
|
|
|
|
}
|