diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-04 10:43:07 +0000 |
commit | 62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch) | |
tree | c2630f69080637987b68acb1ee8676d2681fe304 /pkgs/os-specific/linux/tuna/default.nix | |
parent | d9c82ed3044c72cecf01c6ea042489d30914577c (diff) | |
parent | e24069138dfec3ef94f211f1da005bb5395adc11 (diff) | |
download | nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2 nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip |
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/os-specific/linux/tuna/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/tuna/default.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/tuna/default.nix b/pkgs/os-specific/linux/tuna/default.nix new file mode 100644 index 00000000000..0e621a24f08 --- /dev/null +++ b/pkgs/os-specific/linux/tuna/default.nix @@ -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 ]; + }; +} |