2020-09-19 02:32:44 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-11-16 11:10:19 +00:00
|
|
|
, pythonOlder
|
2021-03-12 19:55:38 +00:00
|
|
|
, poetry-core
|
2020-09-19 02:32:44 +01:00
|
|
|
, textfsm
|
|
|
|
, pytestCheckHook
|
2021-11-01 20:59:40 +00:00
|
|
|
, ruamel-yaml
|
2020-09-19 02:32:44 +01:00
|
|
|
, yamllint
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ntc-templates";
|
2021-11-15 00:57:10 +00:00
|
|
|
version = "3.0.0";
|
2021-03-12 19:55:38 +00:00
|
|
|
format = "pyproject";
|
2021-11-16 11:10:19 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-09-19 02:32:44 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "networktocode";
|
|
|
|
repo = pname;
|
2021-03-12 19:55:38 +00:00
|
|
|
rev = "v${version}";
|
2021-11-15 00:57:10 +00:00
|
|
|
sha256 = "0kijzmmvq2rw7ima19w7lyb2p26a5w52k70fzbkaqqw78qzw8178";
|
2020-09-19 02:32:44 +01:00
|
|
|
};
|
|
|
|
|
2021-03-12 19:55:38 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2020-09-19 02:32:44 +01:00
|
|
|
|
2021-03-12 19:55:38 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
textfsm
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2021-11-01 20:59:40 +00:00
|
|
|
ruamel-yaml
|
2021-03-12 19:55:38 +00:00
|
|
|
yamllint
|
|
|
|
];
|
2020-09-19 02:32:44 +01:00
|
|
|
|
|
|
|
# https://github.com/networktocode/ntc-templates/issues/743
|
2021-03-12 19:55:38 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_raw_data_against_mock"
|
|
|
|
"test_verify_parsed_and_reference_data_exists"
|
|
|
|
];
|
2020-09-19 02:32:44 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|