nixpkgs/pkgs/development/python-modules/pyroute2/default.nix
2022-06-07 23:22:49 +02:00

55 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, importlib-metadata
, mitogen
, pyroute2-core
, pyroute2-ethtool
, pyroute2-ipdb
, pyroute2-ipset
, pyroute2-ndb
, pyroute2-nftables
, pyroute2-nslink
, pythonOlder
}:
buildPythonPackage rec {
pname = "pyroute2";
version = "0.6.11";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-E2NGvmbVUuRUHQZ52/+say4SN9/TnuGpUGL4UCRJF70=";
};
propagatedBuildInputs = [
mitogen
pyroute2-core
pyroute2-ethtool
pyroute2-ipdb
pyroute2-ipset
pyroute2-ndb
pyroute2-nftables
pyroute2-nslink
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
# Requires root privileges, https://github.com/svinota/pyroute2/issues/778
doCheck = false;
pythonImportsCheck = [
"pyroute2"
];
meta = with lib; {
description = "Python Netlink library";
homepage = "https://github.com/svinota/pyroute2";
license = licenses.asl20;
maintainers = with maintainers; [ fab mic92 ];
platforms = platforms.unix;
};
}