2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
2022-01-26 04:04:25 +00:00
|
|
|
, aiohttp
|
2021-12-06 16:07:01 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, requests
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "heatzypy";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "2.1.5";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Cyr-ius";
|
|
|
|
repo = pname;
|
2022-10-30 15:09:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-Z60apquRzhkPbxgGKgDswtW9GUXGt9MbdAsh3Yh31b0=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/Cyr-ius/heatzypy/issues/7
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'version="replace_by_workflow"' 'version="${version}"'
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-01-26 04:04:25 +00:00
|
|
|
aiohttp
|
2021-12-06 16:07:01 +00:00
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# Module has no tests
|
2021-12-06 16:07:01 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"heatzypy"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to interact with Heatzy devices";
|
|
|
|
homepage = "https://github.com/Cyr-ius/heatzypy";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|