diff --git a/pkgs/development/python-modules/pygnmi/default.nix b/pkgs/development/python-modules/pygnmi/default.nix new file mode 100644 index 000000000000..584e6a2aca2c --- /dev/null +++ b/pkgs/development/python-modules/pygnmi/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, cryptography +, dictdiffer +, grpcio +, protobuf +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pygnmi"; + version = "0.8.12"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "akarneliuk"; + repo = "pygnmi"; + rev = "v${version}"; + sha256 = "sha256-5dAjN/HDFKQmJIjhergBjSmHQKhBxqy/Jneh1pLCHrw="; + }; + + propagatedBuildInputs = [ + cryptography + dictdiffer + grpcio + protobuf + ]; + + # almost all tests fail with: + # TypeError: expected string or bytes-like object + doCheck = false; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "pygnmi" ]; + + meta = with lib; { + description = "Pure Python gNMI client to manage network functions and collect telemetry"; + homepage = "https://github.com/akarneliuk/pygnmi"; + license = licenses.bsd3; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 81ba70112431..f00eec7bdcab 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7713,6 +7713,8 @@ self: super: with self; { pygments-style-github = callPackage ../development/python-modules/pygments-style-github { }; + pygnmi = callPackage ../development/python-modules/pygnmi { }; + pygti = callPackage ../development/python-modules/pygti { }; pyheos = callPackage ../development/python-modules/pyheos { };