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