Merge pull request #133457 from angustrau/translatepy
This commit is contained in:
commit
0f0fe74a11
28
pkgs/development/python-modules/pyuseragents/default.nix
Normal file
28
pkgs/development/python-modules/pyuseragents/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
42
pkgs/development/python-modules/translatepy/default.nix
Normal file
42
pkgs/development/python-modules/translatepy/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
@ -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 { };
|
||||
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user