2022-12-02 08:20:57 +00:00
|
|
|
{ lib
|
|
|
|
, aiofiles
|
2023-03-30 22:05:00 +00:00
|
|
|
, aiosqlite
|
|
|
|
, buildPythonPackage
|
2022-12-02 08:20:57 +00:00
|
|
|
, cryptography
|
2023-03-30 22:05:00 +00:00
|
|
|
, fetchFromGitHub
|
2022-12-02 08:20:57 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
2023-03-30 22:05:00 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, python-dateutil
|
2022-12-02 08:20:57 +00:00
|
|
|
, pythonOlder
|
2023-03-30 22:05:00 +00:00
|
|
|
, pytz
|
|
|
|
, sortedcontainers
|
|
|
|
, typing-extensions
|
2022-12-02 08:20:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asyncua";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "1.0.2";
|
2022-12-02 08:20:57 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-12-02 08:20:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FreeOpcUa";
|
|
|
|
repo = "opcua-asyncio";
|
2023-03-30 22:05:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-DnBxR4nD3dBBhiElDuRgljHaoBPiakdjY/VFn3VsKEQ=";
|
|
|
|
fetchSubmodules = true;
|
2022-12-02 08:20:57 +00:00
|
|
|
};
|
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/FreeOpcUa/opcua-asyncio/issues/1263
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace ", 'asynctest'" ""
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
# Workaround hardcoded paths in test
|
|
|
|
# "test_cli_tools_which_require_sigint"
|
|
|
|
substituteInPlace tests/test_tools.py \
|
|
|
|
--replace "tools/" "$out/bin/"
|
2023-03-30 22:05:00 +00:00
|
|
|
'';
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiosqlite
|
|
|
|
aiofiles
|
|
|
|
pytz
|
|
|
|
python-dateutil
|
|
|
|
sortedcontainers
|
|
|
|
cryptography
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-12-02 08:20:57 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
2023-03-30 22:05:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"asyncua"
|
2022-12-02 08:20:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "OPC UA / IEC 62541 Client and Server for Python";
|
|
|
|
homepage = "https://github.com/FreeOpcUa/opcua-asyncio";
|
2023-03-30 22:05:00 +00:00
|
|
|
changelog = "https://github.com/FreeOpcUa/opcua-asyncio/releases/tag/v${version}";
|
2022-12-02 08:20:57 +00:00
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
maintainers = with maintainers; [ harvidsen ];
|
|
|
|
};
|
|
|
|
}
|