1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pkg-config, 6 libnl, 7 nettools, 8}: 9 10buildPythonPackage rec { 11 pname = "python-ethtool"; 12 version = "0.15"; 13 format = "setuptools"; 14 15 src = fetchFromGitHub { 16 owner = "fedora-python"; 17 repo = pname; 18 rev = "v${version}"; 19 sha256 = "0arkcfq64a4fl88vjjsx4gd3mhcpa7mpq6sblpkgs4k4m9mccz6i"; 20 }; 21 22 postPatch = '' 23 substituteInPlace tests/parse_ifconfig.py --replace "Popen('ifconfig'," "Popen('${nettools}/bin/ifconfig'," 24 ''; 25 26 buildInputs = [ libnl ]; 27 nativeBuildInputs = [ pkg-config ]; 28 pythonImportsCheck = [ "ethtool" ]; 29 30 meta = with lib; { 31 description = "Python bindings for the ethtool kernel interface"; 32 homepage = "https://github.com/fedora-python/python-ethtool"; 33 license = licenses.gpl2Plus; 34 maintainers = with maintainers; [ elohmeier ]; 35 }; 36}