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.9.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-ujWPcVqwdtMlCkTZP/PJ3oMR60F6IHrZXXhcNT7JmmM=";
27 };
28
29 build-system = [ poetry-core ];
30
31 pythonRelaxDeps = [ "textfsm" ];
32
33 dependencies = [ textfsm ];
34
35 nativeCheckInputs = [
36 invoke
37 pytestCheckHook
38 ruamel-yaml
39 toml
40 yamllint
41 ];
42
43 meta = with lib; {
44 description = "TextFSM templates for parsing show commands of network devices";
45 homepage = "https://github.com/networktocode/ntc-templates";
46 changelog = "https://github.com/networktocode/ntc-templates/releases/tag/${src.tag}";
47 license = licenses.asl20;
48 maintainers = [ ];
49 };
50}