1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 hatchling,
6 httpx,
7}:
8
9buildPythonPackage rec {
10 pname = "googletrans";
11 version = "4.0.2";
12 pyproject = true;
13
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-2e8Sa12S+r7sC7ndzb7s1Dhl/ADhfx36B3F4N4J6F94=";
17 };
18
19 build-system = [ hatchling ];
20
21 dependencies = [ httpx ] ++ httpx.optional-dependencies.http2;
22
23 # Majority of tests just try to ping Google's Translate API endpoint
24 doCheck = false;
25
26 pythonImportsCheck = [ "googletrans" ];
27
28 meta = with lib; {
29 description = "Library to interact with Google Translate API";
30 homepage = "https://py-googletrans.readthedocs.io";
31 changelog = "https://github.com/ssut/py-googletrans/releases/tag/v${version}";
32 license = licenses.mit;
33 maintainers = with maintainers; [ unode ];
34 mainProgram = "translate";
35 };
36}