Merge pull request #127923 from dotlambda/huawei-lte-api-init

This commit is contained in:
Martin Weinelt 2021-06-23 17:31:11 +02:00 committed by GitHub
commit 75bd996363
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 1 deletions

View file

@ -0,0 +1,51 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, dicttoxml
, requests
, xmltodict
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "huawei-lte-api";
version = "1.4.18";
disabled = pythonOlder "3.4";
src = fetchFromGitHub {
owner = "Salamek";
repo = "huawei-lte-api";
rev = version;
sha256 = "1qaqxmh03j10wa9wqbwgc5r3ays8wfr7bldvsm45fycr3qfyn5fg";
};
postPatch = ''
substituteInPlace setup.py \
--replace "pytest-runner" ""
'';
propagatedBuildInputs = [
dicttoxml
requests
xmltodict
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"huawei_lte_api.AuthorizedConnection"
"huawei_lte_api.Client"
"huawei_lte_api.Connection"
];
meta = with lib; {
description = "API For huawei LAN/WAN LTE Modems";
homepage = "https://github.com/Salamek/huawei-lte-api";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ dotlambda ];
};
}

View file

@ -368,7 +368,7 @@
"html5" = ps: with ps; [ aiohttp-cors pywebpush ];
"http" = ps: with ps; [ aiohttp-cors ];
"htu21d" = ps: with ps; [ smbus-cffi ]; # missing inputs: i2csense
"huawei_lte" = ps: with ps; [ getmac stringcase url-normalize ]; # missing inputs: huawei-lte-api
"huawei_lte" = ps: with ps; [ getmac huawei-lte-api stringcase url-normalize ];
"huawei_router" = ps: with ps; [ ];
"hue" = ps: with ps; [ aiohue ];
"huisbaasje" = ps: with ps; [ ]; # missing inputs: huisbaasje-client

View file

@ -457,6 +457,7 @@ in with py.pkgs; buildPythonApplication rec {
"honeywell"
"html5"
"http"
"huawei_lte"
"hue"
"humidifier"
"hyperion"

View file

@ -3326,6 +3326,8 @@ in {
httpx = callPackage ../development/python-modules/httpx { };
huawei-lte-api = callPackage ../development/python-modules/huawei-lte-api { };
huey = callPackage ../development/python-modules/huey { };
hug = callPackage ../development/python-modules/hug { };