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";
|
2021-12-30 13:39:12 +00:00
|
|
|
version = "1.6.5";
|
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;
|
2021-12-30 13:39:12 +00:00
|
|
|
sha256 = "sha256-Xjeh29U+FCzI5n/i5s6wC0B88Ktmb8pnNDdOzCiKWi4=";
|
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
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
checkInputs = [
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|