1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, isPy3k
5, pytestCheckHook
6, pytest-xdist
7}:
8
9buildPythonPackage rec {
10 pname = "librouteros";
11 version = "3.2.1";
12 format = "setuptools";
13
14 disabled = !isPy3k;
15
16 src = fetchFromGitHub {
17 owner = "luqasz";
18 repo = pname;
19 rev = version;
20 hash = "sha256-VwpZ1RY6Sul7xvWY7ZoOxZ7KgbRmKRwcVdF9e2b3f6Q=";
21 };
22
23 nativeCheckInputs = [
24 pytest-xdist
25 pytestCheckHook
26 ];
27
28 disabledTests = [
29 # Disable tests which require QEMU to run
30 "test_login"
31 "test_long_word"
32 "test_query"
33 "test_add_then_remove"
34 "test_add_then_update"
35 "test_generator_ditch"
36 ];
37
38 pythonImportsCheck = [
39 "librouteros"
40 ];
41
42 meta = with lib; {
43 description = "Python implementation of the MikroTik RouterOS API";
44 homepage = "https://librouteros.readthedocs.io/";
45 license = with licenses; [ gpl2Only ];
46 maintainers = with maintainers; [ fab ];
47 };
48}