2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
poetry-core,
|
|
|
|
textfsm,
|
|
|
|
invoke,
|
|
|
|
pytestCheckHook,
|
|
|
|
ruamel-yaml,
|
|
|
|
toml,
|
|
|
|
yamllint,
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ntc-templates";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "5.1.0";
|
2021-03-15 08:37:03 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "networktocode";
|
|
|
|
repo = pname;
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-SnmI1/lB1p/zldgn9jIid4yJ5+ubr5mh/IAqXY/1Wbc=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ textfsm ];
|
2021-03-15 08:37:03 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
invoke
|
2021-03-15 08:37:03 +00:00
|
|
|
pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
ruamel-yaml
|
2024-04-21 15:54:59 +00:00
|
|
|
toml
|
2021-03-15 08:37:03 +00:00
|
|
|
yamllint
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
# https://github.com/networktocode/ntc-templates/issues/743
|
2021-03-15 08:37:03 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_raw_data_against_mock"
|
|
|
|
"test_verify_parsed_and_reference_data_exists"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "TextFSM templates for parsing show commands of network devices";
|
|
|
|
homepage = "https://github.com/networktocode/ntc-templates";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/networktocode/ntc-templates/releases/tag/v${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.asl20;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|