depot/third_party/nixpkgs/pkgs/development/python-modules/espeak-phonemizer/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

40 lines
951 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, substituteAll
, espeak-ng
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "espeak-phonemizer";
version = "1.2.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "rhasspy";
repo = "espeak-phonemizer";
rev = "refs/tags/v${version}";
hash = "sha256-FiajWpxSDRxTiCj8xGHea4e0voqOvaX6oQYB72FkVbw=";
};
patches = [
(substituteAll {
src = ./cdll.patch;
libespeak_ng = "${lib.getLib espeak-ng}/lib/libespeak-ng.so";
})
];
nativeCheckInputs = [
pytestCheckHook
];
meta = with lib; {
changelog = "https://github.com/rhasspy/espeak-phonemizer/releases/tag/v${version}";
description = "Uses ctypes and libespeak-ng to transform test into IPA phonemes";
homepage = "https://github.com/rhasspy/espeak-phonemizer";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
platforms = platforms.linux;
};
}