2021-01-06 21:43:04 +00:00
|
|
|
{ lib
|
2021-04-03 20:03:24 +01:00
|
|
|
, aiohttp
|
2021-01-06 21:43:04 +00:00
|
|
|
, asynctest
|
|
|
|
, buildPythonPackage
|
2021-04-03 20:03:24 +01:00
|
|
|
, click
|
2021-01-06 21:43:04 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
2021-04-03 20:03:24 +01:00
|
|
|
, prompt_toolkit
|
|
|
|
, pygments
|
2021-01-06 21:43:04 +00:00
|
|
|
, pyserial
|
|
|
|
, pyserial-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, redis
|
|
|
|
, sqlalchemy
|
|
|
|
, tornado
|
|
|
|
, twisted
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pymodbus";
|
2021-04-03 20:03:24 +01:00
|
|
|
version = "2.5.1";
|
2021-01-06 21:43:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "riptideio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-04-03 20:03:24 +01:00
|
|
|
sha256 = "sha256-b85jfBZfMZtqtmID+tGBgOe9o0BbmBH83UV71lYAI5c=";
|
2021-01-06 21:43:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Twisted asynchronous version is not supported due to a missing dependency
|
|
|
|
propagatedBuildInputs = [
|
2021-04-03 20:03:24 +01:00
|
|
|
aiohttp
|
|
|
|
click
|
|
|
|
prompt_toolkit
|
|
|
|
pygments
|
2021-01-06 21:43:04 +00:00
|
|
|
pyserial
|
|
|
|
pyserial-asyncio
|
|
|
|
tornado
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
asynctest
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
redis
|
|
|
|
sqlalchemy
|
|
|
|
twisted
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pymodbus" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python implementation of the Modbus protocol";
|
|
|
|
longDescription = ''
|
|
|
|
Pymodbus is a full Modbus protocol implementation using twisted,
|
|
|
|
torndo or asyncio for its asynchronous communications core. It can
|
|
|
|
also be used without any third party dependencies if a more
|
|
|
|
lightweight project is needed.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/riptideio/pymodbus";
|
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|