aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/ntc-templates/default.nix
blob: 923f8c1969862aaef46f096c9dda7cf7cb5b295f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, textfsm
, pytestCheckHook
, ruamel_yaml
, yamllint
}:

buildPythonPackage rec {
  pname = "ntc-templates";
  version = "1.5.0";
  disabled = isPy27;

  src = fetchFromGitHub {
    owner = "networktocode";
    repo = pname;
    rev = "v${version}";
    sha256 = "0pvd9n7hcmxl9cr8m1xlqcjmy3k2hga0qmn2k3x9hripjis7pbbi";
  };

  propagatedBuildInputs = [ textfsm ];

  checkInputs = [ 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";
    license = licenses.asl20;
    maintainers = with maintainers; [ hexa ];
  };
}