about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/netmiko/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/netmiko/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/netmiko/default.nix43
1 files changed, 36 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/netmiko/default.nix b/nixpkgs/pkgs/development/python-modules/netmiko/default.nix
index 7c2fbda27ced..f893ce204455 100644
--- a/nixpkgs/pkgs/development/python-modules/netmiko/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/netmiko/default.nix
@@ -1,18 +1,47 @@
-{ lib, buildPythonPackage, fetchPypi, setuptools, paramiko, scp, tenacity
-, textfsm, ntc-templates, pyserial, pytestCheckHook, pyyaml }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+
+# build-system
+, poetry-core
+
+# dependencies
+, ntc-templates
+, paramiko
+, pyserial
+, pyyaml
+, scp
+, textfsm
+}:
 
 buildPythonPackage rec {
   pname = "netmiko";
-  version = "4.2.0";
-  format = "setuptools";
+  version = "4.3.0";
+  pyproject = true;
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-et3m/j6mMzYij0moY2UMLYP7DmgODw0Vi1sPsExBAOE=";
+    hash = "sha256-2pD2798ztBQOts1/InJ3PCzhRPp0rDTV7KwbTUYH8fs=";
   };
 
-  buildInputs = [ setuptools ];
-  propagatedBuildInputs = [ paramiko scp tenacity pyyaml textfsm ntc-templates pyserial ];
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace "poetry==1.3.2" "poetry-core" \
+      --replace "poetry.masonry.api" "poetry.core.masonry.api"
+  '';
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = [
+    ntc-templates
+    paramiko
+    pyserial
+    pyyaml
+    scp
+    textfsm
+  ];
 
   # tests require closed-source pyats and genie packages
   doCheck = false;