fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{
2 lib,
3 python3,
4 fetchurl,
5 glib,
6 gobject-introspection,
7 gtk3,
8 wrapGAppsHook3,
9}:
10
11python3.pkgs.buildPythonApplication rec {
12 pname = "tuna";
13 version = "0.19";
14 pyproject = true;
15
16 src = fetchurl {
17 url = "https://git.kernel.org/pub/scm/utils/tuna/tuna.git/snapshot/tuna-v${version}.tar.gz";
18 hash = "sha256-t10CxtwnTOg1uQgm6mTrNUIU8LkXJ3BkTycjWteQvuU=";
19 };
20
21 postPatch = ''
22 mv tuna-cmd.py tuna/cmd.py
23
24 substituteInPlace setup.py \
25 --replace-fail 'packages = ["tuna", "tuna/gui"],' \
26 'packages = ["tuna", "tuna/gui"], entry_points={"console_scripts":["tuna=tuna.cmd:main"]},'
27
28 substituteInPlace tuna/tuna_gui.py \
29 --replace-fail "self.binpath + 'pkexec'" "'/run/wrappers/bin/pkexec'" \
30 --replace-fail 'tuna_glade_dirs = [".", "tuna", "/usr/share/tuna"]' "tuna_glade_dirs = [ \"$out/share/tuna\" ]"
31 '';
32
33 build-system = with python3.pkgs; [ setuptools ];
34
35 nativeBuildInputs = [
36 glib.dev
37 gobject-introspection
38 gtk3
39 wrapGAppsHook3
40 ];
41
42 dependencies = with python3.pkgs; [
43 pygobject3
44 python-linux-procfs
45 ethtool
46 ];
47
48 postInstall = ''
49 mkdir -p $out/share/tuna
50 cp tuna/tuna_gui.glade $out/share/tuna/
51 '';
52
53 # contains no tests
54 doCheck = false;
55 pythonImportsCheck = [ "tuna" ];
56
57 meta = with lib; {
58 description = "Thread and IRQ affinity setting GUI and cmd line tool";
59 mainProgram = "tuna";
60 homepage = "https://git.kernel.org/pub/scm/utils/tuna/tuna.git";
61 license = licenses.gpl2Plus;
62 platforms = platforms.linux;
63 };
64}