about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/librouteros/default.nix
blob: 32c9889681ca36582a870d8f4f0016b985acbb74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy3k
, pytestCheckHook
, pytest-xdist
}:

buildPythonPackage rec {
  pname = "librouteros";
  version = "3.1.0";
  disabled = !isPy3k;

  src = fetchFromGitHub {
    owner = "luqasz";
    repo = pname;
    rev = version;
    sha256 = "1skjwnqa3vcpq9gzgpw93wdmisq15fp0q07kzyq3fgx4yg7b6sql";
  };

  checkInputs = [
    pytest-xdist
    pytestCheckHook
  ];

  disabledTests = [
    # Disable tests which require QEMU to run
    "test_login"
    "test_long_word"
    "test_query"
    "test_add_then_remove"
    "test_add_then_update"
    "test_generator_ditch"
  ];

  pythonImportsCheck = [ "librouteros" ];

  meta = with lib; {
    description = "Python implementation of the MikroTik RouterOS API";
    homepage = "https://librouteros.readthedocs.io/";
    license = with licenses; [ gpl2Only ];
    maintainers = with maintainers; [ fab ];
  };
}