diff options
| author | Angus Trau <me@angus.ws> | 2021-08-11 22:13:20 +1000 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2021-08-11 14:34:24 +0000 |
| commit | e0b2486957169cc9795a77b814af6bf6514ad08b (patch) | |
| tree | 0fce42cbaac0bd6e9536f9161f7f2baad47c7871 | |
| parent | python3Packages.pyuseragents: init at 1.0.5 (diff) | |
| download | nixpkgs-origin/backport-133457-to-release-21.05.tar.gz | |
translatepy: init at 2.0origin/backport-133457-to-release-21.05
(cherry picked from commit 632730c76dedfd73a2d2808fe330f9613252d125)
| -rw-r--r-- | pkgs/development/python-modules/translatepy/default.nix | 42 | ||||
| -rw-r--r-- | pkgs/top-level/all-packages.nix | 2 | ||||
| -rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
3 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/translatepy/default.nix b/pkgs/development/python-modules/translatepy/default.nix new file mode 100644 index 000000000000..8428f0b06e4c --- /dev/null +++ b/pkgs/development/python-modules/translatepy/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, requests +, beautifulsoup4 +, pyuseragents +, inquirer +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "translatepy"; + version = "2.0"; + + src = fetchFromGitHub { + owner = "Animenosekai"; + repo = "translate"; + rev = "v${version}"; + sha256 = "Rt6FvB4kZVaB/jxxqOHsnkReTFCCyiEaZf240n0zVZs="; + }; + + propagatedBuildInputs = [ + requests + beautifulsoup4 + pyuseragents + inquirer + ]; + + checkInputs = [ pytestCheckHook ]; + disabledTestPaths = [ + # Requires network connection + "tests/test_translators.py" + ]; + pythonImportsCheck = [ "translatepy" ]; + + meta = with lib; { + description = "A module grouping multiple translation APIs"; + homepage = "https://github.com/Animenosekai/translate"; + license = with licenses; [ agpl3Only ]; + maintainers = with maintainers; [ angustrau ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 959d8cb2ea11..b9da2c011ec4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9177,6 +9177,8 @@ in translate-shell = callPackage ../applications/misc/translate-shell { }; + translatepy = with python3.pkgs; toPythonApplication translatepy; + trash-cli = callPackage ../tools/misc/trash-cli { }; trebleshot = libsForQt5.callPackage ../applications/networking/trebleshot { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 97e3c62326c2..96c1c547294a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8367,6 +8367,8 @@ in { transitions = callPackage ../development/python-modules/transitions { }; + translatepy = callPackage ../development/python-modules/translatepy { }; + translationstring = callPackage ../development/python-modules/translationstring { }; transmission-rpc = callPackage ../development/python-modules/transmission-rpc { }; |
