1{
2 lib,
3 attrs,
4 buildPythonPackage,
5 dnspython,
6 fetchFromGitHub,
7 hatchling,
8 hier-config,
9 loguru,
10 macaddress,
11 passlib,
12 pyparsing,
13 pytest-cov-stub,
14 pytestCheckHook,
15 pyyaml,
16 rich,
17 scrypt,
18 tomlkit,
19 typeguard,
20}:
21
22buildPythonPackage rec {
23 pname = "ciscoconfparse2";
24 version = "0.8.29";
25 pyproject = true;
26
27 src = fetchFromGitHub {
28 owner = "mpenning";
29 repo = "ciscoconfparse2";
30 tag = version;
31 hash = "sha256-Dvryv3VPdyRuvIPksEnSlKnCJU70j2xd2aWpwXUGbUY=";
32 };
33
34 pythonRelaxDeps = [
35 "attrs"
36 "hier-config"
37 "passlib"
38 "tomlkit"
39 "typeguard"
40 ];
41
42 build-system = [ hatchling ];
43
44 dependencies = [
45 attrs
46 dnspython
47 hier-config
48 loguru
49 macaddress
50 passlib
51 pyparsing
52 pyyaml
53 rich
54 scrypt
55 tomlkit
56 typeguard
57 ];
58
59 nativeCheckInputs = [
60 pytest-cov-stub
61 pytestCheckHook
62 ];
63
64 pythonImportsCheck = [ "ciscoconfparse2" ];
65
66 disabledTests = [
67 # Fixtures are missing
68 "testParse_parse_syntax"
69 "testParse_syntax"
70 "testVal_IOSHSRPGroups"
71 "testVal_IOSSDWAN"
72 "testVal_junos_factory"
73 "testVal_JunosCfgLine"
74 "testValues_ccp_script_entry_cliapplication"
75 "testValues_Diff"
76 "testValues_IOSCfgLine"
77 "testValues_pickle"
78 "testValues_save_as_01"
79 ];
80
81 meta = {
82 description = "Module to parse, audit, query, build and modify device configurations";
83 homepage = "https://github.com/mpenning/ciscoconfparse2";
84 changelog = "https://github.com/mpenning/ciscoconfparse2/blob/${src.tag}/CHANGES.md";
85 license = lib.licenses.gpl3Only;
86 maintainers = with lib.maintainers; [ fab ];
87 # https://github.com/mpenning/ciscoconfparse2/issues/19
88 broken = lib.versionAtLeast hier-config.version "3";
89 };
90}