1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, beautifulsoup4
, click
, gtts-token
, mock
, pytest
, requests
, six
, testfixtures
, twine
, urllib3
}:
buildPythonPackage rec {
pname = "gtts";
version = "2.5.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "pndurette";
repo = "gTTS";
rev = "refs/tags/v${version}";
hash = "sha256-CCxD73fpHGsO4zSifWLQtgDkbPvPEnA2357umhOCNoI=";
};
build-system = [
setuptools
];
dependencies = [
beautifulsoup4
click
gtts-token
requests
six
urllib3
twine
];
nativeCheckInputs = [ pytest mock testfixtures ];
# 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";
mainProgram = "gtts-cli";
homepage = "https://gtts.readthedocs.io";
changelog = "https://gtts.readthedocs.io/en/latest/changelog.html";
license = licenses.mit;
maintainers = with maintainers; [ unode ];
};
}
|