Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 packaging, 6 pytestCheckHook, 7 pythonOlder, 8 pythonRelaxDepsHook, 9 scapy, 10 setuptools, 11}: 12 13buildPythonPackage rec { 14 pname = "boiboite-opener-framework"; 15 version = "1.2.1"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "Orange-Cyberdefense"; 22 repo = "bof"; 23 rev = "refs/tags/${version}"; 24 hash = "sha256-atKqHRX24UjF/9Dy0aYXAN+80nBJKCd07FmaR5Vl1q4="; 25 }; 26 27 postPatch = '' 28 substituteInPlace setup.py \ 29 --replace "scapy==2.5.0rc1" "scapy" 30 ''; 31 32 build-system = [ setuptools ]; 33 34 dependencies = [ 35 packaging 36 scapy 37 ]; 38 39 nativeCheckInputs = [ pytestCheckHook ]; 40 41 pythonImportsCheck = [ "bof" ]; 42 43 disabledTests = [ 44 # Tests are using netcat and cat to do UDP connections 45 "test_0101_knxnet_instantiate" 46 "test_0101_modbusnet_instantiate" 47 "test_0102_knxnet_connect" 48 "test_0102_modbusnet_connect" 49 "test_0201_knxnet_send_knxpacket" 50 "test_0201_modbus_send_modbuspacket" 51 "test_0201_udp_send_str_bytes" 52 "test_0202_knxnet_send_knxpacket" 53 "test_0202_modbus_send_modbuspacket" 54 "test_0202_udp_send_receive" 55 "test_0203_knxnet_send_raw" 56 "test_0203_modbus_send_raw" 57 "test_0203_send_receive_timeout" 58 "test_0204_knxnet_receive" 59 "test_0204_modbus_receive" 60 "test_0204_multicast_error_handling" 61 "test_0205_broadcast_error_handling" 62 "test_0301_pndcp_device_raise" 63 "test_0301_tcp_instantiate" 64 "test_0302_tcp_connect" 65 "test_0303_tcp_connect_bad_addr" 66 "test_0304_tcp_connect_bad_port" 67 "test_0401_tcp_send_str_bytes" 68 "test_0402_tcp_send_receive" 69 "test_0802_search_valid" 70 ]; 71 72 meta = with lib; { 73 description = "Testing framework for industrial protocols implementations and devices"; 74 homepage = "https://github.com/Orange-Cyberdefense/bof"; 75 changelog = "https://github.com/Orange-Cyberdefense/bof/releases/tag/${version}"; 76 license = licenses.gpl3Only; 77 maintainers = with maintainers; [ fab ]; 78 platforms = platforms.linux; 79 }; 80}