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.4.0";
19 format = "pyproject";
20
21 src = fetchFromGitHub {
22 owner = "pndurette";
23 repo = "gTTS";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-M/RbNw5SJb1R78MDTqBHNWE0I/9PlqikrrJAy1r02f8=";
26 };
27
28 propagatedBuildInputs = [
29 beautifulsoup4
30 click
31 gtts-token
32 requests
33 six
34 urllib3
35 twine
36 ];
37
38 nativeCheckInputs = [ pytest mock testfixtures ];
39
40 # majority of tests just try to call out to Google's Translate API endpoint
41 doCheck = false;
42 checkPhase = ''
43 pytest
44 '';
45
46 pythonImportsCheck = [ "gtts" ];
47
48 meta = with lib; {
49 description = "A Python library and CLI tool to interface with Google Translate text-to-speech API";
50 homepage = "https://gtts.readthedocs.io";
51 changelog = "https://gtts.readthedocs.io/en/latest/changelog.html";
52 license = licenses.mit;
53 maintainers = with maintainers; [ unode ];
54 };
55}