3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/gruut-ipa/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1 KiB
Nix
Raw Normal View History

2021-07-03 19:20:09 +01:00
{ lib
, buildPythonPackage
, fetchFromGitHub
2022-03-20 02:50:58 +00:00
, espeak
, numpy
2021-07-03 19:20:09 +01:00
, python
}:
buildPythonPackage rec {
pname = "gruut-ipa";
2022-03-20 02:50:58 +00:00
version = "0.13.0";
2021-07-03 19:20:09 +01:00
format = "setuptools";
src = fetchFromGitHub {
owner = "rhasspy";
repo = pname;
rev = "v${version}";
2022-03-20 02:50:58 +00:00
sha256 = "sha256-Q2UKELoG8OaAPxIrZNCpXgeWZ2fCzb3g3SOVzCm/gg0=";
2021-07-03 19:20:09 +01:00
};
postPatch = ''
2022-03-20 02:50:58 +00:00
patchShebangs bin/*
2021-07-03 19:20:09 +01:00
substituteInPlace bin/speak-ipa \
--replace '${"\${src_dir}:"}' "$out/lib/${python.libPrefix}/site-packages:" \
2022-03-20 02:50:58 +00:00
--replace "do espeak" "do ${espeak}/bin/espeak"
2021-07-03 19:20:09 +01:00
'';
2022-03-20 02:50:58 +00:00
propagatedBuildInputs = [
numpy
];
2021-07-03 19:20:09 +01:00
checkPhase = ''
runHook preCheck
${python.interpreter} -m unittest discover
runHook postCheck
'';
pythonImportsCheck = [
"gruut_ipa"
];
meta = with lib; {
description = "Library for manipulating pronunciations using the International Phonetic Alphabet (IPA)";
homepage = "https://github.com/rhasspy/gruut-ipa";
license = licenses.mit;
maintainers = teams.tts.members;
};
}