2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cryptography,
|
|
|
|
dictdiffer,
|
|
|
|
grpcio,
|
|
|
|
protobuf,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygnmi";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.8.14";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "akarneliuk";
|
|
|
|
repo = "pygnmi";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-ncp/OwELy/QOvGhLUZW2qTQZsckWI4CGrlEAZ20RtQI=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
dictdiffer
|
|
|
|
grpcio
|
|
|
|
protobuf
|
|
|
|
];
|
|
|
|
|
|
|
|
# almost all tests fail with:
|
|
|
|
# TypeError: expected string or bytes-like object
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pygnmi" ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Pure Python gNMI client to manage network functions and collect telemetry";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pygnmicli";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/akarneliuk/pygnmi";
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/akarneliuk/pygnmi/releases/tag/v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.bsd3;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
}
|