
This was achieved using the following command: sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b') And then manually reverted the following changes: - alias in top-level.nix - function name in wrap-gapps-hook.sh - comment in postFixup of at-spi2-core - comment in gtk4 - comment in preFixup of 1password-gui/linux.nix - comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix - comment in postFixup of telegram-desktop - comment in postFixup of fwupd - buildCommand of mongodb-compass - postFixup of xflux-gui - comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config - description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
63 lines
1.5 KiB
Nix
63 lines
1.5 KiB
Nix
{ lib
|
|
, buildPythonApplication
|
|
, fetchzip
|
|
, pygobject3
|
|
, pytestCheckHook
|
|
, gdk-pixbuf
|
|
, glib
|
|
, gobject-introspection
|
|
, gtk3
|
|
, python-linux-procfs
|
|
, python-ethtool
|
|
, wrapGAppsHook3
|
|
}:
|
|
|
|
buildPythonApplication rec {
|
|
pname = "tuna";
|
|
version = "0.15";
|
|
|
|
src = fetchzip {
|
|
url = "https://git.kernel.org/pub/scm/utils/tuna/tuna.git/snapshot/tuna-v${version}.tar.gz";
|
|
sha256 = "MwyLBwKz5ur1sBXHiCLq/Nq2u5aaiC+KzXqvGBmQii8=";
|
|
};
|
|
|
|
postPatch = ''
|
|
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
|
|
wrapGAppsHook3
|
|
];
|
|
|
|
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";
|
|
mainProgram = "tuna";
|
|
homepage = "https://git.kernel.org/pub/scm/utils/tuna/tuna.git";
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ elohmeier ];
|
|
};
|
|
}
|