1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 requests,
6 beautifulsoup4,
7 pyuseragents,
8 safeio,
9 inquirer,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "translatepy";
15 version = "2.3";
16 format = "setuptools";
17
18 src = fetchFromGitHub {
19 owner = "Animenosekai";
20 repo = "translate";
21 tag = "v${version}";
22 hash = "sha256-cx5OeBrB8il8KrcyOmQbQ7VCXoaA5RP++oTTxCs/PcM=";
23 };
24
25 propagatedBuildInputs = [
26 requests
27 beautifulsoup4
28 pyuseragents
29 safeio
30 inquirer
31 ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34 disabledTestPaths = [
35 # Requires network connection
36 "tests/test_translate.py"
37 "tests/test_translators.py"
38 ];
39 pythonImportsCheck = [ "translatepy" ];
40
41 meta = with lib; {
42 description = "Module grouping multiple translation APIs";
43 mainProgram = "translatepy";
44 homepage = "https://github.com/Animenosekai/translate";
45 license = with licenses; [ agpl3Only ];
46 maintainers = with maintainers; [ emilytrau ];
47 };
48}