21 buildPythonPackage rec {
26 disabled = pythonOlder "3.9";
28 src = fetchFromGitHub {
29 owner = "pymodbus-dev";
31 rev = "refs/tags/v${version}";
32 hash = "sha256-6Rt5fbuaeAgbW5KKse1zZIJyq/p2P2MjXGwA7q0C7wA=";
36 substituteInPlace pyproject.toml \
37 --replace-fail "--cov-report html " ""
40 build-system = [ setuptools ];
42 passthru.optional-dependencies = {
49 ] ++ typer.optional-dependencies.all;
50 serial = [ pyserial ];
60 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
70 pythonImportsCheck = [ "pymodbus" ];
77 ++ lib.optionals (lib.versionAtLeast aiohttp.version "3.9.0") [
78 "test_split_serial_packet"
84 description = "Python implementation of the Modbus protocol";
86 Pymodbus is a full Modbus protocol implementation using twisted,
87 torndo or asyncio for its asynchronous communications core. It can
88 also be used without any third party dependencies if a more
89 lightweight project is needed.
91 homepage = "https://github.com/pymodbus-dev/pymodbus";
92 changelog = "https://github.com/pymodbus-dev/pymodbus/releases/tag/v${version}";
93 license = with licenses; [ bsd3 ];
94 maintainers = with maintainers; [ fab ];
95 mainProgram = "pymodbus.simulator";