2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
espeak,
|
|
|
|
numpy,
|
|
|
|
python,
|
|
|
|
unittestCheckHook,
|
2021-07-14 22:03:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gruut-ipa";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "0.13.0";
|
2021-07-14 22:03:04 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rhasspy";
|
|
|
|
repo = pname;
|
2021-07-16 19:40:57 +00:00
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-Q2UKELoG8OaAPxIrZNCpXgeWZ2fCzb3g3SOVzCm/gg0=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
patchShebangs bin/*
|
2021-07-14 22:03:04 +00:00
|
|
|
substituteInPlace bin/speak-ipa \
|
2024-02-07 01:22:34 +00:00
|
|
|
--replace '${"\${src_dir}:"}' "$out/${python.sitePackages}:" \
|
2022-03-30 09:31:56 +00:00
|
|
|
--replace "do espeak" "do ${espeak}/bin/espeak"
|
2021-07-14 22:03:04 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ numpy ];
|
2021-07-14 22:03:04 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
2021-07-14 22:03:04 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "gruut_ipa" ];
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library for manipulating pronunciations using the International Phonetic Alphabet (IPA)";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "gruut-ipa";
|
2021-07-14 22:03:04 +00:00
|
|
|
homepage = "https://github.com/rhasspy/gruut-ipa";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = teams.tts.members;
|
|
|
|
};
|
|
|
|
}
|