2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
aiohttp,
|
|
|
|
xmltodict,
|
|
|
|
python-socketio,
|
|
|
|
websocket-client,
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycontrol4";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.1.2";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2023-02-22 10:55:15 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lawtancool";
|
|
|
|
repo = "pyControl4";
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-oKKc9s3/fO7cFMjOeKtpvEwmfglxI2lxlN3EIva7zR8=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "python-socketio>=4,<5" "python-socketio>=4"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
xmltodict
|
2023-02-22 10:55:15 +00:00
|
|
|
python-socketio
|
|
|
|
websocket-client
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# tests access network
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyControl4.account"
|
|
|
|
"pyControl4.alarm"
|
|
|
|
"pyControl4.director"
|
|
|
|
"pyControl4.light"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python 3 asyncio package for interacting with Control4 systems";
|
|
|
|
homepage = "https://github.com/lawtancool/pyControl4";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|