summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pygnmi/default.nix
blob: f3bee76cba28eb20ffc613ea30e00437195db60d (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
37
38
39
40
41
42
43
44
45
46
47
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  cryptography,
  dictdiffer,
  grpcio,
  protobuf,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "pygnmi";
  version = "0.8.15";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "akarneliuk";
    repo = "pygnmi";
    tag = "v${version}";
    sha256 = "sha256-2QPUyPGTtXlO6A05mmb/jofRidXfKq0xvH7lv1f9OQk=";
  };

  propagatedBuildInputs = [
    cryptography
    dictdiffer
    grpcio
    protobuf
  ];

  # almost all tests fail with:
  # TypeError: expected string or bytes-like object
  doCheck = false;

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "pygnmi" ];

  meta = {
    description = "Pure Python gNMI client to manage network functions and collect telemetry";
    mainProgram = "pygnmicli";
    homepage = "https://github.com/akarneliuk/pygnmi";
    changelog = "https://github.com/akarneliuk/pygnmi/releases/tag/${src.tag}";
    license = lib.licenses.bsd3;
    maintainers = [ ];
  };
}