Merge pull request #127656 from elohmeier/tuna
This commit is contained in:
commit
d599524ef1
34
pkgs/development/python-modules/python-ethtool/default.nix
Normal file
34
pkgs/development/python-modules/python-ethtool/default.nix
Normal file
|
@ -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 ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, buildPythonPackage, fetchgit, six }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-linux-procfs";
|
||||
version = "0.6.3";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://git.kernel.org/pub/scm/libs/python/${pname}/${pname}.git";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-PPgMlL9oj4HYUsr444ZrGo1LSZBl9hL5SE98IASUpbc=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ six ];
|
||||
|
||||
# contains no tests
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "procfs" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python classes to extract information from the Linux kernel /proc files";
|
||||
homepage = "https://git.kernel.org/pub/scm/libs/python/python-linux-procfs/python-linux-procfs.git/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ elohmeier ];
|
||||
};
|
||||
}
|
62
pkgs/os-specific/linux/tuna/default.nix
Normal file
62
pkgs/os-specific/linux/tuna/default.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{ lib
|
||||
, buildPythonApplication
|
||||
, fetchgit
|
||||
, pygobject3
|
||||
, pytestCheckHook
|
||||
, gdk-pixbuf
|
||||
, glib
|
||||
, gobject-introspection
|
||||
, gtk3
|
||||
, python-linux-procfs
|
||||
, python-ethtool
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "tuna";
|
||||
version = "0.15";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://git.kernel.org/pub/scm/utils/${pname}/${pname}.git";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-lRHlbdCQ0NcjcWgLvCze67kN8NsK0f5RmKfPbkHhk78=";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
mv tuna-cmd.py tuna/cmd.py
|
||||
|
||||
substituteInPlace setup.py \
|
||||
--replace 'packages = ["tuna", "tuna/gui"],' \
|
||||
'packages = ["tuna", "tuna/gui"], entry_points={"console_scripts":["tuna=tuna.cmd:main"]},'
|
||||
|
||||
substituteInPlace tuna/tuna_gui.py \
|
||||
--replace "self.binpath + 'pkexec'" "'/run/wrappers/bin/pkexec'" \
|
||||
--replace 'tuna_glade_dirs = [".", "tuna", "/usr/share/tuna"]' "tuna_glade_dirs = [ \"$out/share/tuna\" ]"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
glib.dev
|
||||
gobject-introspection
|
||||
gtk3
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ pygobject3 python-linux-procfs python-ethtool ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/tuna
|
||||
cp tuna/tuna_gui.glade $out/share/tuna/
|
||||
'';
|
||||
|
||||
# contains no tests
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "tuna" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Thread and IRQ affinity setting GUI and cmd line tool";
|
||||
homepage = "https://git.kernel.org/pub/scm/utils/tuna/tuna.git";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ elohmeier ];
|
||||
};
|
||||
}
|
|
@ -27191,6 +27191,8 @@ in
|
|||
|
||||
tudu = callPackage ../applications/office/tudu { };
|
||||
|
||||
tuna = python3Packages.callPackage ../os-specific/linux/tuna { };
|
||||
|
||||
tunefish = callPackage ../applications/audio/tunefish {
|
||||
stdenv = clangStdenv; # https://github.com/jpcima/tunefish/issues/4
|
||||
};
|
||||
|
|
|
@ -6885,6 +6885,8 @@ in {
|
|||
|
||||
python-etcd = callPackage ../development/python-modules/python-etcd { };
|
||||
|
||||
python-ethtool = callPackage ../development/python-modules/python-ethtool { };
|
||||
|
||||
python_fedora = callPackage ../development/python-modules/python_fedora { };
|
||||
|
||||
python-fontconfig = callPackage ../development/python-modules/python-fontconfig { };
|
||||
|
@ -6929,6 +6931,8 @@ in {
|
|||
|
||||
python-Levenshtein = callPackage ../development/python-modules/python-levenshtein { };
|
||||
|
||||
python-linux-procfs = callPackage ../development/python-modules/python-linux-procfs { };
|
||||
|
||||
python-logstash = callPackage ../development/python-modules/python-logstash { };
|
||||
|
||||
python-ly = callPackage ../development/python-modules/python-ly { };
|
||||
|
|
Loading…
Reference in a new issue