2021-01-09 10:05:03 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, requests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "googletrans";
|
|
|
|
version = "2.4.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ssut";
|
|
|
|
repo = "py-googletrans";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0wzzinn0k9rfv9z1gmfk9l4kljyd4n6kizsjw4wjxv91kfhj92hz";
|
|
|
|
};
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
propagatedBuildInputs = [ requests ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# majority of tests just try to ping Google's Translate API endpoint
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "googletrans" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Googletrans is python library to interact with Google Translate API";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "translate";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://py-googletrans.readthedocs.io";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ unode ];
|
|
|
|
};
|
|
|
|
}
|