1{ lib
2, aiohttp
3, buildPythonPackage
4, fetchFromGitHub
5, requests
6, pytestCheckHook
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "heatzypy";
12 version = "2.1.5";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.8";
16
17 src = fetchFromGitHub {
18 owner = "Cyr-ius";
19 repo = pname;
20 rev = "refs/tags/${version}";
21 hash = "sha256-Z60apquRzhkPbxgGKgDswtW9GUXGt9MbdAsh3Yh31b0=";
22 };
23
24 postPatch = ''
25 # https://github.com/Cyr-ius/heatzypy/issues/7
26 substituteInPlace setup.py \
27 --replace 'version="replace_by_workflow"' 'version="${version}"'
28 '';
29
30 propagatedBuildInputs = [
31 aiohttp
32 requests
33 ];
34
35 # Module has no tests
36 doCheck = false;
37
38 pythonImportsCheck = [
39 "heatzypy"
40 ];
41
42 meta = with lib; {
43 description = "Python module to interact with Heatzy devices";
44 homepage = "https://github.com/Cyr-ius/heatzypy";
45 license = licenses.gpl3Plus;
46 maintainers = with maintainers; [ fab ];
47 };
48}