2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, beautifulsoup4
|
|
|
|
, click
|
|
|
|
, gtts-token
|
|
|
|
, mock
|
|
|
|
, pytest
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, testfixtures
|
|
|
|
, twine
|
|
|
|
, urllib3
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gtts";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.4.0";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pndurette";
|
|
|
|
repo = "gTTS";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-M/RbNw5SJb1R78MDTqBHNWE0I/9PlqikrrJAy1r02f8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
beautifulsoup4
|
|
|
|
click
|
|
|
|
gtts-token
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
urllib3
|
|
|
|
twine
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytest mock testfixtures ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# majority of tests just try to call out to Google's Translate API endpoint
|
|
|
|
doCheck = false;
|
|
|
|
checkPhase = ''
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "gtts" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Python library and CLI tool to interface with Google Translate text-to-speech API";
|
|
|
|
homepage = "https://gtts.readthedocs.io";
|
2021-02-13 14:23:35 +00:00
|
|
|
changelog = "https://gtts.readthedocs.io/en/latest/changelog.html";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ unode ];
|
|
|
|
};
|
|
|
|
}
|