2021-08-11 14:56:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, requests
|
|
|
|
, beautifulsoup4
|
|
|
|
, pyuseragents
|
2022-08-12 12:06:08 +00:00
|
|
|
, safeio
|
2021-08-11 14:56:57 +00:00
|
|
|
, inquirer
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "translatepy";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "2.3";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-08-11 14:56:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Animenosekai";
|
|
|
|
repo = "translate";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-cx5OeBrB8il8KrcyOmQbQ7VCXoaA5RP++oTTxCs/PcM=";
|
2021-08-11 14:56:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
beautifulsoup4
|
|
|
|
pyuseragents
|
2022-08-12 12:06:08 +00:00
|
|
|
safeio
|
2021-08-11 14:56:57 +00:00
|
|
|
inquirer
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-08-11 14:56:57 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Requires network connection
|
2021-12-06 16:07:01 +00:00
|
|
|
"tests/test_translate.py"
|
2021-08-11 14:56:57 +00:00
|
|
|
"tests/test_translators.py"
|
|
|
|
];
|
|
|
|
pythonImportsCheck = [ "translatepy" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A module grouping multiple translation APIs";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "translatepy";
|
2021-08-11 14:56:57 +00:00
|
|
|
homepage = "https://github.com/Animenosekai/translate";
|
|
|
|
license = with licenses; [ agpl3Only ];
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ emilytrau ];
|
2021-08-11 14:56:57 +00:00
|
|
|
};
|
|
|
|
}
|