Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / gruut-ipa / default.nix
blob717a439393e1212fe589719aad3237f57c990a87
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , espeak
5 , numpy
6 , python
7 , unittestCheckHook
8 }:
10 buildPythonPackage rec {
11   pname = "gruut-ipa";
12   version = "0.13.0";
13   format = "setuptools";
15   src = fetchFromGitHub {
16     owner = "rhasspy";
17     repo = pname;
18     rev = "v${version}";
19     hash = "sha256-Q2UKELoG8OaAPxIrZNCpXgeWZ2fCzb3g3SOVzCm/gg0=";
20   };
22   postPatch = ''
23     patchShebangs bin/*
24     substituteInPlace bin/speak-ipa \
25       --replace '${"\${src_dir}:"}' "$out/${python.sitePackages}:" \
26       --replace "do espeak" "do ${espeak}/bin/espeak"
27   '';
29   propagatedBuildInputs = [
30     numpy
31   ];
33   nativeCheckInputs = [ unittestCheckHook ];
35   pythonImportsCheck = [
36     "gruut_ipa"
37   ];
39   meta = with lib; {
40     description = "Library for manipulating pronunciations using the International Phonetic Alphabet (IPA)";
41     mainProgram = "gruut-ipa";
42     homepage = "https://github.com/rhasspy/gruut-ipa";
43     license = licenses.mit;
44     maintainers = teams.tts.members;
45   };