1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 httpx,
6 pythonOlder,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "ha-iotawattpy";
12 version = "0.1.2";
13 pyproject = true;
14
15 disabled = pythonOlder "3.8";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-eMsBEbmENjbJME9Gzo4O9LbGo1i0MP0IuwLUAYqxbI8=";
20 };
21
22 build-system = [ setuptools ];
23
24 propagatedBuildInputs = [ httpx ];
25
26 # Project doesn't tag releases or ship the tests with PyPI
27 # https://github.com/gtdiehl/iotawattpy/issues/14
28 doCheck = false;
29
30 pythonImportsCheck = [ "iotawattpy" ];
31
32 meta = with lib; {
33 description = "Python library for the IoTaWatt Energy device";
34 homepage = "https://github.com/gtdiehl/iotawattpy";
35 license = licenses.gpl3Plus;
36 maintainers = with maintainers; [ fab ];
37 };
38}