1{ lib
2, aiohttp
3, buildPythonPackage
4, fetchFromGitHub
5, jsonpickle
6, paho-mqtt
7, pytest-asyncio
8, pytest-timeout
9, pytestCheckHook
10, python-dateutil
11, pythonOlder
12}:
13
14buildPythonPackage rec {
15 pname = "pyduke-energy";
16 version = "1.0.6";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "mjmeli";
23 repo = pname;
24 rev = "refs/tags/v${version}";
25 hash = "sha256-7KkUpsHg3P2cF0bVl3FzyAQwzeaCmg+vzRHlM/TIcNA=";
26 };
27
28 propagatedBuildInputs = [
29 aiohttp
30 jsonpickle
31 paho-mqtt
32 python-dateutil
33 ];
34
35 nativeCheckInputs = [
36 pytest-asyncio
37 pytest-timeout
38 pytestCheckHook
39 ];
40
41 pythonImportsCheck = [
42 "pyduke_energy"
43 ];
44
45 meta = with lib; {
46 description = "Python module for the Duke Energy API";
47 homepage = "https://github.com/mjmeli/pyduke-energy";
48 changelog = "https://github.com/mjmeli/pyduke-energy/releases/tag/v${version}";
49 license = licenses.mit;
50 maintainers = with maintainers; [ fab ];
51 };
52}