ttaenc: init at 3.4.1 (#238757)
[NixPkgs.git] / pkgs / development / python-modules / gruut-ipa / default.nix
blob5ebc3f1f33612d70715ff916f9dd4c612bbff2be
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   espeak,
6   numpy,
7   python,
8   unittestCheckHook,
9 }:
11 buildPythonPackage rec {
12   pname = "gruut-ipa";
13   version = "0.13.0";
14   format = "setuptools";
16   src = fetchFromGitHub {
17     owner = "rhasspy";
18     repo = pname;
19     rev = "v${version}";
20     hash = "sha256-Q2UKELoG8OaAPxIrZNCpXgeWZ2fCzb3g3SOVzCm/gg0=";
21   };
23   postPatch = ''
24     patchShebangs bin/*
25     substituteInPlace bin/speak-ipa \
26       --replace '${"\${src_dir}:"}' "$out/${python.sitePackages}:" \
27       --replace "do espeak" "do ${espeak}/bin/espeak"
28   '';
30   propagatedBuildInputs = [ numpy ];
32   nativeCheckInputs = [ unittestCheckHook ];
34   pythonImportsCheck = [ "gruut_ipa" ];
36   meta = with lib; {
37     description = "Library for manipulating pronunciations using the International Phonetic Alphabet (IPA)";
38     mainProgram = "gruut-ipa";
39     homepage = "https://github.com/rhasspy/gruut-ipa";
40     license = licenses.mit;
41     maintainers = teams.tts.members;
42   };