Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / roombapy / default.nix
blob4b65adafdc9fddaff79c61cf1236f7c3654b9f41
1 { lib
2 , amqtt
3 , buildPythonPackage
4 , fetchFromGitHub
5 , orjson
6 , paho-mqtt
7 , poetry-core
8 , pytest-asyncio
9 , pytestCheckHook
10 , pythonOlder
13 buildPythonPackage rec {
14   pname = "roombapy";
15   version = "1.6.9";
16   format = "pyproject";
18   disabled = pythonOlder "3.7";
20   src = fetchFromGitHub {
21     owner = "pschmitt";
22     repo = "roombapy";
23     rev = "refs/tags/${version}";
24     hash = "sha256-Bu8wl5Qtys1sy5FnB+2NCGnXnuq9u+TUUR9zNdlOFTU=";
25   };
27   postPatch = ''
28     # hbmqtt was replaced by amqtt
29     substituteInPlace tests/test_roomba_integration.py \
30       --replace "from hbmqtt.broker import Broker" "from amqtt.broker import Broker"
32     substituteInPlace pyproject.toml \
33       --replace 'orjson = ">=3.8.7"' 'orjson = "*"'
34   '';
36   nativeBuildInputs = [
37     poetry-core
38   ];
40   propagatedBuildInputs = [
41     orjson
42     paho-mqtt
43   ];
45   nativeCheckInputs = [
46     amqtt
47     pytest-asyncio
48     pytestCheckHook
49   ];
51   disabledTestPaths = [
52     # Requires network access
53     "tests/test_discovery.py"
54   ];
56   disabledTests = [
57     # Test want to connect to a local MQTT broker
58     "test_roomba_connect"
59   ];
61   pythonImportsCheck = [
62     "roombapy"
63   ];
65   meta = with lib; {
66     description = "Python program and library to control Wi-Fi enabled iRobot Roombas";
67     homepage = "https://github.com/pschmitt/roombapy";
68     changelog = "https://github.com/pschmitt/roombapy/releases/tag/${version}";
69     license = licenses.mit;
70     maintainers = [ ];
71   };