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.2.0";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchFromGitHub {
20 owner = "networktocode";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 hash = "sha256-uEGl245tmc+W/9G+IclSNu76VTJ7w3zw6BQkhmGgEnY=";
24 };
25
26 nativeBuildInputs = [
27 poetry-core
28 ];
29
30 propagatedBuildInputs = [
31 textfsm
32 ];
33
34 nativeCheckInputs = [
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}