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.6.7";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.4";
17
18 src = fetchFromGitHub {
19 owner = "Salamek";
20 repo = "huawei-lte-api";
21 rev = "refs/tags/${version}";
22 hash = "sha256-CMGOR5b8Uc8ZIuMlkCkxZqTqUA/Im2RgXK4uFZdoHeU=";
23 };
24
25 postPatch = ''
26 substituteInPlace setup.py \
27 --replace "pytest-runner" ""
28 '';
29
30 propagatedBuildInputs = [
31 pycryptodomex
32 requests
33 xmltodict
34 ];
35
36 checkInputs = [
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [
41 "huawei_lte_api.AuthorizedConnection"
42 "huawei_lte_api.Client"
43 "huawei_lte_api.Connection"
44 ];
45
46 meta = with lib; {
47 description = "API For huawei LAN/WAN LTE Modems";
48 homepage = "https://github.com/Salamek/huawei-lte-api";
49 license = licenses.lgpl3Only;
50 maintainers = with maintainers; [ dotlambda ];
51 };
52}