about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/ntc-templates
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/ntc-templates')
-rw-r--r--nixpkgs/pkgs/development/python-modules/ntc-templates/default.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/ntc-templates/default.nix b/nixpkgs/pkgs/development/python-modules/ntc-templates/default.nix
new file mode 100644
index 000000000000..38927877146a
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/ntc-templates/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, poetry-core
+, textfsm
+, pytestCheckHook
+, ruamel-yaml
+, yamllint
+}:
+
+buildPythonPackage rec {
+  pname = "ntc-templates";
+  version = "4.0.1";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "networktocode";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    hash = "sha256-tenztWqSjVVDJygBvJpdLFbKmz+TPKYu0UhscqJBhLc=";
+  };
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = [
+    textfsm
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+    ruamel-yaml
+    yamllint
+  ];
+
+  # https://github.com/networktocode/ntc-templates/issues/743
+  disabledTests = [
+    "test_raw_data_against_mock"
+    "test_verify_parsed_and_reference_data_exists"
+  ];
+
+  meta = with lib; {
+    description = "TextFSM templates for parsing show commands of network devices";
+    homepage = "https://github.com/networktocode/ntc-templates";
+    changelog = "https://github.com/networktocode/ntc-templates/releases/tag/v${version}";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ ];
+  };
+}