summary refs log tree commit diff
path: root/pkgs/development/python-modules/ciscoconfparse/default.nix
blob: e6db689a45c5f61adb7f85bdec3bbc23f2f6b8f9 (plain) (blame)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, passlib
, dnspython
, loguru
, toml
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "ciscoconfparse";
  version = "1.6.36";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "mpenning";
    repo = pname;
    rev = version;
    sha256 = "sha256-nIuuqAxz8eHEQRuH8nfYVQ+vGMmcDcARJLizoI5Mty8=";
  };

  postPatch = ''
    patchShebangs tests
  '';

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    passlib
    dnspython
    loguru
  ];

  checkInputs = [
    pytestCheckHook
  ];

  disabledTestPaths = [
    "tests/parse_test.py"
  ];

  disabledTests = [
    "test_dns_lookup"
    "test_reverse_dns_lookup"
  ];

  pythonImportsCheck = [ "ciscoconfparse" ];

  meta = with lib; {
    description =
      "Parse, Audit, Query, Build, and Modify Cisco IOS-style configurations";
    homepage = "https://github.com/mpenning/ciscoconfparse";
    license = licenses.gpl3Only;
    maintainers = [ maintainers.astro ];
  };
}