Merge pull request #133457 from angustrau/translatepy

This commit is contained in:
Sandro 2021-08-11 16:30:55 +02:00 committed by GitHub
commit 0f0fe74a11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 76 additions and 0 deletions

View file

@ -0,0 +1,28 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pyuseragents";
version = "1.0.5";
src = fetchFromGitHub {
owner = "Animenosekai";
repo = "useragents";
rev = "v${version}";
sha256 = "D7Qs3vsfkRH2FDkbfakrR+FfWzQFiOCQM7q9AdJavyU=";
};
checkInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "test.py" ];
pythonImportsCheck = [ "pyuseragents" ];
meta = with lib; {
description = "Giving you a random User-Agent Header";
homepage = "https://github.com/Animenosekai/useragents";
license = with licenses; [ mit ];
maintainers = with maintainers; [ angustrau ];
};
}

View file

@ -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 ];
};
}

View file

@ -9558,6 +9558,8 @@ with pkgs;
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 { };

View file

@ -7338,6 +7338,8 @@ in {
inherit (pkgs) libusb1;
};
pyuseragents = callPackage ../development/python-modules/pyuseragents { };
pyutilib = callPackage ../development/python-modules/pyutilib { };
pyuv = callPackage ../development/python-modules/pyuv { };
@ -8848,6 +8850,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 { };