2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, amqtt
|
|
|
|
, buildPythonPackage
|
2021-02-05 17:12:51 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, paho-mqtt
|
2021-05-20 23:08:51 +00:00
|
|
|
, poetry-core
|
2021-02-05 17:12:51 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2021-05-20 23:08:51 +00:00
|
|
|
, pythonOlder
|
2021-02-05 17:12:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "roombapy";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "1.6.6";
|
2021-05-20 23:08:51 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pschmitt";
|
|
|
|
repo = "roombapy";
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-dfeMd/THlj2HQYcLPmeC3AWP3vR/6+8BFU1QtSu5xg4=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
paho-mqtt
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
amqtt
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
# hbmqtt was replaced by amqtt
|
|
|
|
substituteInPlace tests/test_roomba_integration.py \
|
|
|
|
--replace "from hbmqtt.broker import Broker" "from amqtt.broker import Broker"
|
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Requires network access
|
|
|
|
"tests/test_discovery.py"
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Test want to connect to a local MQTT broker
|
|
|
|
"test_roomba_connect"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"roombapy"
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python program and library to control Wi-Fi enabled iRobot Roombas";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/pschmitt/roombapy";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.mit;
|
2022-10-30 15:09:59 +00:00
|
|
|
maintainers = [ ];
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
}
|