1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytest-asyncio, 6 pytest-xdist, 7 pytestCheckHook, 8 pythonOlder, 9 poetry-core, 10 toml, 11}: 12 13buildPythonPackage rec { 14 pname = "librouteros"; 15 version = "3.4.1"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.8"; 19 20 src = fetchFromGitHub { 21 owner = "luqasz"; 22 repo = "librouteros"; 23 tag = version; 24 hash = "sha256-vN12LYqFOU7flD6bTFtGw5VhPJ238pZ0MStM3ljwDU4="; 25 }; 26 27 build-system = [ poetry-core ]; 28 29 dependencies = [ toml ]; 30 31 nativeCheckInputs = [ 32 pytest-asyncio 33 pytest-xdist 34 pytestCheckHook 35 ]; 36 37 disabledTests = [ 38 # Disable tests which require QEMU to run 39 "test_login" 40 "test_long_word" 41 "test_query" 42 "test_add_then_remove" 43 "test_add_then_update" 44 "test_generator_ditch" 45 ]; 46 47 pythonImportsCheck = [ "librouteros" ]; 48 49 meta = with lib; { 50 description = "Python implementation of the MikroTik RouterOS API"; 51 homepage = "https://librouteros.readthedocs.io/"; 52 changelog = "https://github.com/luqasz/librouteros/blob/${version}/CHANGELOG.rst"; 53 license = licenses.gpl2Only; 54 maintainers = with maintainers; [ fab ]; 55 }; 56}