2021-01-09 10:05:03 +00:00
|
|
|
{ lib
|
2021-04-08 16:26:57 +00:00
|
|
|
, aiohttp
|
2021-01-09 10:05:03 +00:00
|
|
|
, buildPythonPackage
|
2021-04-08 16:26:57 +00:00
|
|
|
, click
|
2021-01-09 10:05:03 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
2021-08-05 21:33:18 +00:00
|
|
|
, prompt-toolkit
|
2021-04-08 16:26:57 +00:00
|
|
|
, pygments
|
2021-01-09 10:05:03 +00:00
|
|
|
, pyserial
|
|
|
|
, pyserial-asyncio
|
2023-01-20 10:41:00 +00:00
|
|
|
, pytest-asyncio
|
2023-02-02 18:25:31 +00:00
|
|
|
, pytest-rerunfailures
|
|
|
|
, pytest-xdist
|
2021-01-09 10:05:03 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, redis
|
|
|
|
, sqlalchemy
|
|
|
|
, tornado
|
|
|
|
, twisted
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pymodbus";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "3.1.3";
|
2023-02-02 18:25:31 +00:00
|
|
|
format = "setuptools";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-02-02 18:25:31 +00:00
|
|
|
owner = "pymodbus-dev";
|
2021-01-09 10:05:03 +00:00
|
|
|
repo = pname;
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-02-16 17:41:37 +00:00
|
|
|
hash = "sha256-GHyDlt046v4KP9KQRnXH6F+3ikoCjbhVHEQuSdm99a8=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Twisted asynchronous version is not supported due to a missing dependency
|
|
|
|
propagatedBuildInputs = [
|
2021-04-08 16:26:57 +00:00
|
|
|
aiohttp
|
|
|
|
click
|
2021-08-05 21:33:18 +00:00
|
|
|
prompt-toolkit
|
2021-04-08 16:26:57 +00:00
|
|
|
pygments
|
2021-01-09 10:05:03 +00:00
|
|
|
pyserial
|
|
|
|
pyserial-asyncio
|
|
|
|
tornado
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
mock
|
2023-01-20 10:41:00 +00:00
|
|
|
pytest-asyncio
|
2023-02-02 18:25:31 +00:00
|
|
|
pytest-rerunfailures
|
|
|
|
pytest-xdist
|
2021-01-09 10:05:03 +00:00
|
|
|
pytestCheckHook
|
|
|
|
redis
|
|
|
|
sqlalchemy
|
|
|
|
twisted
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--reruns" "3" # Racy socket tests
|
|
|
|
];
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
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.
|
|
|
|
'';
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://github.com/pymodbus-dev/pymodbus";
|
|
|
|
changelog = "https://github.com/pymodbus-dev/pymodbus/releases/tag/v${version}";
|
2021-01-09 10:05:03 +00:00
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|