2021-04-15 00:37:46 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-03-05 16:20:37 +00:00
|
|
|
, importlib-metadata
|
2021-06-04 09:07:49 +00:00
|
|
|
, mitogen
|
|
|
|
, pyroute2-core
|
|
|
|
, pyroute2-ethtool
|
|
|
|
, pyroute2-ipdb
|
|
|
|
, pyroute2-ipset
|
|
|
|
, pyroute2-ndb
|
|
|
|
, pyroute2-nftables
|
|
|
|
, pyroute2-nslink
|
2022-03-05 16:20:37 +00:00
|
|
|
, pythonOlder
|
2021-04-15 00:37:46 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyroute2";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "0.6.13";
|
2022-03-05 16:20:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-06-26 10:26:21 +00:00
|
|
|
hash = "sha256-sD1JpYGUX+wrHsfR1RJcb0C6BO0Rr/yQxMrdwBniV5I=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
mitogen
|
|
|
|
pyroute2-core
|
|
|
|
pyroute2-ethtool
|
|
|
|
pyroute2-ipdb
|
|
|
|
pyroute2-ipset
|
|
|
|
pyroute2-ndb
|
|
|
|
pyroute2-nftables
|
|
|
|
pyroute2-nslink
|
2022-03-05 16:20:37 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
2021-06-04 09:07:49 +00:00
|
|
|
];
|
|
|
|
|
2021-04-15 00:37:46 +00:00
|
|
|
# Requires root privileges, https://github.com/svinota/pyroute2/issues/778
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyroute2"
|
|
|
|
];
|
2021-04-15 00:37:46 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python Netlink library";
|
|
|
|
homepage = "https://github.com/svinota/pyroute2";
|
|
|
|
license = licenses.asl20;
|
2022-03-05 16:20:37 +00:00
|
|
|
maintainers = with maintainers; [ fab mic92 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|