1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 poetry-core,
7 textfsm,
8 invoke,
9 pytestCheckHook,
10 ruamel-yaml,
11 toml,
12 yamllint,
13}:
14
15buildPythonPackage rec {
16 pname = "ntc-templates";
17 version = "7.8.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "networktocode";
24 repo = "ntc-templates";
25 tag = "v${version}";
26 hash = "sha256-v9+d9nZiYneG3vULtQZsa/gD6FCyBrrbGxUJsv1sMYA=";
27 };
28
29 build-system = [ poetry-core ];
30
31 propagatedBuildInputs = [ textfsm ];
32
33 nativeCheckInputs = [
34 invoke
35 pytestCheckHook
36 ruamel-yaml
37 toml
38 yamllint
39 ];
40
41 # https://github.com/networktocode/ntc-templates/issues/743
42 disabledTests = [
43 "test_raw_data_against_mock"
44 "test_verify_parsed_and_reference_data_exists"
45 ];
46
47 meta = with lib; {
48 description = "TextFSM templates for parsing show commands of network devices";
49 homepage = "https://github.com/networktocode/ntc-templates";
50 changelog = "https://github.com/networktocode/ntc-templates/releases/tag/${src.tag}";
51 license = licenses.asl20;
52 maintainers = [ ];
53 };
54}