2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
importlib-metadata,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2021-04-15 00:37:46 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyroute2";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.7.12";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "svinota";
|
|
|
|
repo = "pyroute2";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-zB792ZwDWd74YBYvQ5au0t2RWTIAqrWvNtQ/e+ZEk50=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = 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"
|
2023-04-29 16:46:19 +00:00
|
|
|
"pyroute2.common"
|
|
|
|
"pyroute2.config"
|
|
|
|
"pyroute2.ethtool"
|
|
|
|
"pyroute2.ipdb"
|
|
|
|
"pyroute2.ipset"
|
|
|
|
"pyroute2.ndb"
|
|
|
|
"pyroute2.nftables"
|
|
|
|
"pyroute2.nslink"
|
|
|
|
"pyroute2.protocols"
|
2022-03-05 16:20:37 +00:00
|
|
|
];
|
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";
|
2023-04-29 16:46:19 +00:00
|
|
|
changelog = "https://github.com/svinota/pyroute2/blob/${version}/CHANGELOG.rst";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
asl20 # or
|
|
|
|
gpl2Plus
|
|
|
|
];
|
|
|
|
maintainers = with maintainers; [
|
|
|
|
fab
|
|
|
|
mic92
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|