d56f44df06
GitOrigin-RevId: bc4b9eef3ce3d5a90d8693e8367c9cbfc9fc1e13
51 lines
971 B
Nix
51 lines
971 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, pythonOlder
|
|
, fetchFromGitHub
|
|
, pycryptodomex
|
|
, pytestCheckHook
|
|
, requests
|
|
, xmltodict
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "huawei-lte-api";
|
|
version = "1.6";
|
|
|
|
disabled = pythonOlder "3.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Salamek";
|
|
repo = "huawei-lte-api";
|
|
rev = version;
|
|
hash = "sha256-dJWGs5ZFVYp8/3U24eVRMtA7Marpd88GeW8uX+n6nhY=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "pytest-runner" ""
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
pycryptodomex
|
|
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 ];
|
|
};
|
|
}
|