2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
poetry-core,
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
ntc-templates,
|
|
|
|
paramiko,
|
|
|
|
pyserial,
|
|
|
|
pyyaml,
|
|
|
|
scp,
|
|
|
|
textfsm,
|
2024-01-13 08:15:51 +00:00
|
|
|
}:
|
2022-02-21 08:47:16 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "netmiko";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "4.3.0";
|
|
|
|
pyproject = true;
|
2022-02-21 08:47:16 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-2pD2798ztBQOts1/InJ3PCzhRPp0rDTV7KwbTUYH8fs=";
|
2022-02-21 08:47:16 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "poetry==1.3.2" "poetry-core" \
|
|
|
|
--replace "poetry.masonry.api" "poetry.core.masonry.api"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ntc-templates
|
|
|
|
paramiko
|
|
|
|
pyserial
|
|
|
|
pyyaml
|
|
|
|
scp
|
|
|
|
textfsm
|
|
|
|
];
|
2022-02-21 08:47:16 +00:00
|
|
|
|
|
|
|
# tests require closed-source pyats and genie packages
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-05 15:53:02 +00:00
|
|
|
description = "Multi-vendor library to simplify Paramiko SSH connections to network devices";
|
2022-02-21 08:47:16 +00:00
|
|
|
homepage = "https://github.com/ktbyers/netmiko/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.astro ];
|
|
|
|
};
|
|
|
|
}
|