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.5.0";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "networktocode";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 hash = "sha256-FhKMDSAW+MifAy2EnHePbSfY56rdK1SfOe85bFte6ps=";
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 changelog = "https://github.com/networktocode/ntc-templates/releases/tag/v${version}";
50 license = licenses.asl20;
51 maintainers = with maintainers; [ hexa ];
52 };
53}