at master 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 setuptools, 7}: 8 9buildPythonPackage rec { 10 pname = "pyroute2"; 11 version = "0.9.4"; 12 pyproject = true; 13 14 disabled = pythonOlder "3.9"; 15 16 src = fetchFromGitHub { 17 owner = "svinota"; 18 repo = "pyroute2"; 19 tag = version; 20 hash = "sha256-D603ZrLbc/6REx6X0bMvZzeyo0fgTsFL7J+iRTiQLgQ="; 21 }; 22 23 build-system = [ setuptools ]; 24 25 # Requires root privileges, https://github.com/svinota/pyroute2/issues/778 26 doCheck = false; 27 28 pythonImportsCheck = [ 29 "pyroute2" 30 "pyroute2.common" 31 "pyroute2.config" 32 "pyroute2.ethtool" 33 "pyroute2.ipdb" 34 "pyroute2.ipset" 35 "pyroute2.ndb" 36 "pyroute2.nftables" 37 "pyroute2.nslink" 38 "pyroute2.protocols" 39 ]; 40 41 postPatch = '' 42 patchShebangs util 43 make VERSION 44 ''; 45 46 meta = with lib; { 47 description = "Python Netlink library"; 48 homepage = "https://github.com/svinota/pyroute2"; 49 changelog = "https://github.com/svinota/pyroute2/blob/${src.tag}/CHANGELOG.rst"; 50 license = with licenses; [ 51 asl20 # or 52 gpl2Plus 53 ]; 54 maintainers = with maintainers; [ 55 fab 56 mic92 57 ]; 58 platforms = platforms.unix; 59 }; 60}