1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 aiohttp,
7 asn1,
8 python-dateutil,
9 setuptools,
10 tenacity,
11}:
12
13buildPythonPackage rec {
14 pname = "smart-meter-texas";
15 version = "0.5.5";
16 pyproject = true;
17
18 disabled = pythonOlder "3.6";
19
20 src = fetchFromGitHub {
21 owner = "grahamwetzler";
22 repo = "smart-meter-texas";
23 tag = "v${version}";
24 hash = "sha256-dHWcYrBtmKdEIU45rMy4KvoPX88hnRpd4KBlbJaNvgI=";
25 };
26
27 postPatch = ''
28 substituteInPlace setup.py \
29 --replace-fail "pytest-runner" ""
30 '';
31
32 build-system = [ setuptools ];
33
34 dependencies = [
35 aiohttp
36 asn1
37 python-dateutil
38 tenacity
39 ];
40
41 # no tests implemented
42 doCheck = false;
43
44 meta = with lib; {
45 description = "Connect to and retrieve data from the unofficial Smart Meter Texas API";
46 homepage = "https://github.com/grahamwetzler/smart-meter-texas";
47 license = licenses.mit;
48 maintainers = with maintainers; [ dotlambda ];
49 };
50}