1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, beautifulsoup4
5, click
6, gtts-token
7, mock
8, pytest
9, requests
10, six
11, testfixtures
12, twine
13, urllib3
14}:
15
16buildPythonPackage rec {
17 pname = "gtts";
18 version = "2.2.4";
19
20 src = fetchFromGitHub {
21 owner = "pndurette";
22 repo = "gTTS";
23 rev = "v${version}";
24 sha256 = "sha256-hQnFHi85Rifco0afLF8kKNOy9oPxKoupfmdm+fht6Cg=";
25 };
26
27 propagatedBuildInputs = [
28 beautifulsoup4
29 click
30 gtts-token
31 requests
32 six
33 urllib3
34 twine
35 ];
36
37 checkInputs = [ pytest mock testfixtures ];
38
39 # majority of tests just try to call out to Google's Translate API endpoint
40 doCheck = false;
41 checkPhase = ''
42 pytest
43 '';
44
45 pythonImportsCheck = [ "gtts" ];
46
47 meta = with lib; {
48 description = "A Python library and CLI tool to interface with Google Translate text-to-speech API";
49 homepage = "https://gtts.readthedocs.io";
50 changelog = "https://gtts.readthedocs.io/en/latest/changelog.html";
51 license = licenses.mit;
52 maintainers = with maintainers; [ unode ];
53 };
54}