20 buildPythonPackage rec {
25 disabled = pythonOlder "3.8";
27 src = fetchFromGitHub {
29 repo = "opcua-asyncio";
30 rev = "refs/tags/v${version}";
31 hash = "sha256-tHlo5oNsb8E6r0vmSi0eVbk4RCMg0xe97LITzW9FQWA=";
32 fetchSubmodules = true;
36 # https://github.com/FreeOpcUa/opcua-asyncio/issues/1263
37 substituteInPlace setup.py \
38 --replace ", 'asynctest'" ""
40 # Workaround hardcoded paths in test
41 # "test_cli_tools_which_require_sigint"
42 substituteInPlace tests/test_tools.py \
43 --replace "tools/" "$out/bin/"
50 propagatedBuildInputs = [
67 pythonImportsCheck = [
71 disabledTests = lib.optionals stdenv.isDarwin [
72 # Failed: DID NOT RAISE <class 'asyncio.exceptions.TimeoutError'>
74 # OSError: [Errno 48] error while attempting to bind on address ('127.0.0.1',...
75 "test_anonymous_rejection"
76 "test_certificate_handling_success"
77 "test_encrypted_private_key_handling_success"
78 "test_encrypted_private_key_handling_success_with_cert_props"
79 "test_encrypted_private_key_handling_failure"
83 description = "OPC UA / IEC 62541 Client and Server for Python";
84 homepage = "https://github.com/FreeOpcUa/opcua-asyncio";
85 changelog = "https://github.com/FreeOpcUa/opcua-asyncio/releases/tag/v${version}";
86 license = licenses.lgpl3Plus;
87 maintainers = with maintainers; [ harvidsen ];