1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, pycryptodomex
6, pytestCheckHook
7, requests
8, xmltodict
9}:
10
11buildPythonPackage rec {
12 pname = "huawei-lte-api";
13 version = "1.5.2";
14
15 disabled = pythonOlder "3.4";
16
17 src = fetchFromGitHub {
18 owner = "Salamek";
19 repo = "huawei-lte-api";
20 rev = version;
21 sha256 = "sha256-xG0QTvjYW0/C/7NNhl/d024TSAe0TzgMknOXvNxrPOY=";
22 };
23
24 postPatch = ''
25 substituteInPlace setup.py \
26 --replace "pytest-runner" ""
27 '';
28
29 propagatedBuildInputs = [
30 pycryptodomex
31 requests
32 xmltodict
33 ];
34
35 checkInputs = [
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [
40 "huawei_lte_api.AuthorizedConnection"
41 "huawei_lte_api.Client"
42 "huawei_lte_api.Connection"
43 ];
44
45 meta = with lib; {
46 description = "API For huawei LAN/WAN LTE Modems";
47 homepage = "https://github.com/Salamek/huawei-lte-api";
48 license = licenses.lgpl3Only;
49 maintainers = with maintainers; [ dotlambda ];
50 };
51}