diff options
Diffstat (limited to 'pkgs/development/python-modules/python-ethtool/default.nix')
-rw-r--r-- | pkgs/development/python-modules/python-ethtool/default.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-ethtool/default.nix b/pkgs/development/python-modules/python-ethtool/default.nix new file mode 100644 index 00000000000..03c14739706 --- /dev/null +++ b/pkgs/development/python-modules/python-ethtool/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pkg-config +, libnl +, nettools +}: + +buildPythonPackage rec { + pname = "python-ethtool"; + version = "0.14"; + + src = fetchFromGitHub { + owner = "fedora-python"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-Sp7ssfLZ/1FEKrvX257pKcaureZ5mdpJ7jCEh/ft1l0="; + }; + + postPatch = '' + substituteInPlace tests/parse_ifconfig.py --replace "Popen('ifconfig'," "Popen('${nettools}/bin/ifconfig'," + ''; + + buildInputs = [ libnl ]; + nativeBuildInputs = [ pkg-config ]; + pythonImportsCheck = [ "ethtool" ]; + + meta = with lib; { + description = "Python bindings for the ethtool kernel interface"; + homepage = "https://github.com/fedora-python/python-ethtool"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ elohmeier ]; + }; +} |