nixpkgs/pkgs/development/python-modules/pyroute2/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchPypi
, importlib-metadata
, mitogen
, pythonOlder
, setuptools
}:
2016-12-23 23:53:15 +00:00
buildPythonPackage rec {
pname = "pyroute2";
version = "0.7.3";
format = "pyproject";
disabled = pythonOlder "3.7";
2016-12-23 23:53:15 +00:00
src = fetchPypi {
inherit pname version;
hash = "sha256-cEEEDbHC0Yf7zNFRSFsSRMQddYvoIXhYR5RjcOtrtwY=";
2016-12-23 23:53:15 +00:00
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
mitogen
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
# Requires root privileges, https://github.com/svinota/pyroute2/issues/778
2016-12-23 23:53:15 +00:00
doCheck = false;
pythonImportsCheck = [
"pyroute2"
"pr2modules.common"
"pr2modules.config"
"pr2modules.ethtool"
"pr2modules.ipdb"
"pr2modules.ipset"
"pr2modules.ndb"
"pr2modules.nftables"
"pr2modules.nslink"
"pr2modules.protocols"
];
meta = with lib; {
2016-12-23 23:53:15 +00:00
description = "Python Netlink library";
homepage = "https://github.com/svinota/pyroute2";
2016-12-23 23:53:15 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ fab mic92 ];
platforms = platforms.unix;
2016-12-23 23:53:15 +00:00
};
}