nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchPypi
4, importlib-metadata
5, mitogen
6, pyroute2-core
7, pyroute2-ethtool
8, pyroute2-ipdb
9, pyroute2-ipset
10, pyroute2-ndb
11, pyroute2-nftables
12, pyroute2-nslink
13, pythonOlder
14}:
15
16buildPythonPackage rec {
17 pname = "pyroute2";
18 version = "0.6.9";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-PRxNGnH7VpyrV49V9xNO8C1I6LMYK05+ZrKndWKO2vs=";
26 };
27
28 propagatedBuildInputs = [
29 mitogen
30 pyroute2-core
31 pyroute2-ethtool
32 pyroute2-ipdb
33 pyroute2-ipset
34 pyroute2-ndb
35 pyroute2-nftables
36 pyroute2-nslink
37 ] ++ lib.optionals (pythonOlder "3.8") [
38 importlib-metadata
39 ];
40
41 # Requires root privileges, https://github.com/svinota/pyroute2/issues/778
42 doCheck = false;
43
44 pythonImportsCheck = [
45 "pyroute2"
46 ];
47
48 meta = with lib; {
49 description = "Python Netlink library";
50 homepage = "https://github.com/svinota/pyroute2";
51 license = licenses.asl20;
52 maintainers = with maintainers; [ fab mic92 ];
53 platforms = platforms.unix;
54 };
55}