Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, packaging 5, pytestCheckHook 6, pythonOlder 7, pythonRelaxDepsHook 8, scapy 9}: 10 11buildPythonPackage rec { 12 pname = "boiboite-opener-framework"; 13 version = "1.2.1"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "Orange-Cyberdefense"; 20 repo = "bof"; 21 rev = "refs/tags/${version}"; 22 hash = "sha256-atKqHRX24UjF/9Dy0aYXAN+80nBJKCd07FmaR5Vl1q4="; 23 }; 24 25 postPatch = '' 26 substituteInPlace setup.py \ 27 --replace "scapy==2.5.0rc1" "scapy" 28 ''; 29 30 propagatedBuildInputs = [ 31 packaging 32 scapy 33 ]; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 ]; 38 39 pythonImportsCheck = [ 40 "bof" 41 ]; 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 }; 79}