summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/ciscoconfparse2/default.nix
blob: 731c78292b6844d59d757ca7c2c287af3de4a493 (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
  lib,
  attrs,
  buildPythonPackage,
  dnspython,
  fetchFromGitHub,
  hatchling,
  hier-config,
  loguru,
  macaddress,
  passlib,
  pyparsing,
  pytest-cov-stub,
  pytestCheckHook,
  pyyaml,
  rich,
  scrypt,
  tomlkit,
  typeguard,
}:

buildPythonPackage rec {
  pname = "ciscoconfparse2";
  version = "0.8.29";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "mpenning";
    repo = "ciscoconfparse2";
    tag = version;
    hash = "sha256-Dvryv3VPdyRuvIPksEnSlKnCJU70j2xd2aWpwXUGbUY=";
  };

  pythonRelaxDeps = [
    "attrs"
    "hier-config"
    "passlib"
    "tomlkit"
    "typeguard"
  ];

  build-system = [ hatchling ];

  dependencies = [
    attrs
    dnspython
    hier-config
    loguru
    macaddress
    passlib
    pyparsing
    pyyaml
    rich
    scrypt
    tomlkit
    typeguard
  ];

  nativeCheckInputs = [
    pytest-cov-stub
    pytestCheckHook
  ];

  pythonImportsCheck = [ "ciscoconfparse2" ];

  disabledTests = [
    # Fixtures are missing
    "testParse_parse_syntax"
    "testParse_syntax"
    "testVal_IOSHSRPGroups"
    "testVal_IOSSDWAN"
    "testVal_junos_factory"
    "testVal_JunosCfgLine"
    "testValues_ccp_script_entry_cliapplication"
    "testValues_Diff"
    "testValues_IOSCfgLine"
    "testValues_pickle"
    "testValues_save_as_01"
  ];

  meta = {
    description = "Module to parse, audit, query, build and modify device configurations";
    homepage = "https://github.com/mpenning/ciscoconfparse2";
    changelog = "https://github.com/mpenning/ciscoconfparse2/blob/${src.tag}/CHANGES.md";
    license = lib.licenses.gpl3Only;
    maintainers = with lib.maintainers; [ fab ];
    # https://github.com/mpenning/ciscoconfparse2/issues/19
    broken = lib.versionAtLeast hier-config.version "3";
  };
}