2020-09-25 04:45:31 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy27
|
2021-03-15 08:37:03 +00:00
|
|
|
, poetry-core
|
2020-09-25 04:45:31 +00:00
|
|
|
, textfsm
|
|
|
|
, pytestCheckHook
|
|
|
|
, ruamel_yaml
|
|
|
|
, yamllint
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ntc-templates";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "2.3.2";
|
2021-03-15 08:37:03 +00:00
|
|
|
format = "pyproject";
|
2020-09-25 04:45:31 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "networktocode";
|
|
|
|
repo = pname;
|
2021-03-15 08:37:03 +00:00
|
|
|
rev = "v${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "0sga86ajbh3a8wsb7q5mxzxhlg4fds8pr33ybjgi1sda4bvp2dvp";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2021-03-15 08:37:03 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-03-15 08:37:03 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
textfsm
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
ruamel_yaml
|
|
|
|
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";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|