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-03-15 08:37:03 +00:00
|
|
|
version = "2.0.0";
|
|
|
|
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}";
|
|
|
|
sha256 = "05ifbzps9jxrrkrqybsdbm67jhynfcjc298pqkhp21q5jwnlrl72";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|