at 25.11-pre 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 ntc-templates, 6 paramiko, 7 poetry-core, 8 pyserial, 9 pythonOlder, 10 pyyaml, 11 rich, 12 ruamel-yaml, 13 scp, 14 textfsm, 15}: 16 17buildPythonPackage rec { 18 pname = "netmiko"; 19 version = "4.5.0"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.9"; 23 24 src = fetchPypi { 25 inherit pname version; 26 hash = "sha256-29/CC2yq+OXXpXC7G0Kia5pvjYI06R9cZfTb/gwOT1A="; 27 }; 28 29 postPatch = '' 30 substituteInPlace pyproject.toml \ 31 --replace-fail "poetry>=1.6.1" "poetry-core" \ 32 --replace-fail "poetry.masonry.api" "poetry.core.masonry.api" 33 ''; 34 35 build-system = [ poetry-core ]; 36 37 dependencies = [ 38 ntc-templates 39 paramiko 40 pyserial 41 pyyaml 42 rich 43 ruamel-yaml 44 scp 45 textfsm 46 ]; 47 48 # Tests require closed-source pyats and genie packages 49 doCheck = false; 50 51 pythonImportsCheck = [ "netmiko" ]; 52 53 meta = with lib; { 54 description = "Multi-vendor library to simplify Paramiko SSH connections to network devices"; 55 homepage = "https://github.com/ktbyers/netmiko/"; 56 changelog = "https://github.com/ktbyers/netmiko/releases/tag/v${version}"; 57 license = licenses.mit; 58 maintainers = [ maintainers.astro ]; 59 }; 60}