1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 requests,
6}:
7
8buildPythonPackage rec {
9 pname = "googletrans";
10 version = "2.4.0";
11 format = "setuptools";
12
13 src = fetchFromGitHub {
14 owner = "ssut";
15 repo = "py-googletrans";
16 rev = "v${version}";
17 sha256 = "0wzzinn0k9rfv9z1gmfk9l4kljyd4n6kizsjw4wjxv91kfhj92hz";
18 };
19
20 propagatedBuildInputs = [ requests ];
21
22 # majority of tests just try to ping Google's Translate API endpoint
23 doCheck = false;
24
25 pythonImportsCheck = [ "googletrans" ];
26
27 meta = with lib; {
28 description = "Googletrans is python library to interact with Google Translate API";
29 mainProgram = "translate";
30 homepage = "https://py-googletrans.readthedocs.io";
31 license = licenses.mit;
32 maintainers = with maintainers; [ unode ];
33 };
34}