2023-02-09 11:40:11 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, beautifulsoup4
|
|
|
|
, requests
|
|
|
|
, click
|
|
|
|
, pythonOlder
|
2023-07-15 17:15:38 +00:00
|
|
|
, poetry-core
|
2023-02-09 11:40:11 +00:00
|
|
|
}:
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "deep-translator";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.11.4";
|
|
|
|
format = "pyproject";
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2023-03-15 16:39:30 +00:00
|
|
|
pname = "deep_translator";
|
|
|
|
inherit version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-gBJgxpIxE4cH6oiglV5ITbfUDiEMngrg93Ny/9pfS/U=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
beautifulsoup4
|
|
|
|
requests
|
|
|
|
click
|
|
|
|
];
|
|
|
|
|
|
|
|
# Initializing it during build won't work as it needs connection with
|
|
|
|
# APIs and the build environment is isolated (#148572 for details).
|
|
|
|
# After built, it works as intended.
|
|
|
|
#pythonImportsCheck = [ "deep_translator" ];
|
|
|
|
|
|
|
|
# Again, initializing an instance needs network connection.
|
|
|
|
# Tests will fail.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-02-09 11:40:11 +00:00
|
|
|
description = "Python tool to translate between different languages by using multiple translators";
|
2021-12-19 01:06:50 +00:00
|
|
|
homepage = "https://deep-translator.readthedocs.io";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/nidhaloff/deep-translator/releases/tag/v${version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
license = licenses.asl20;
|
2021-12-19 01:06:50 +00:00
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
|
|
|
};
|
|
|
|
}
|