From b60dd6b426b545b9b71bb4f3db5efeca9c60efd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 23 Jul 2024 08:02:43 -0700 Subject: [PATCH] tuna: 0.15 -> 0.19 --- pkgs/os-specific/linux/tuna/default.nix | 43 ++++++++++++++----------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/pkgs/os-specific/linux/tuna/default.nix b/pkgs/os-specific/linux/tuna/default.nix index 3e326eed8489..18b907aacb13 100644 --- a/pkgs/os-specific/linux/tuna/default.nix +++ b/pkgs/os-specific/linux/tuna/default.nix @@ -1,36 +1,37 @@ -{ lib -, buildPythonApplication -, fetchzip -, pygobject3 -, glib -, gobject-introspection -, gtk3 -, python-linux-procfs -, ethtool -, wrapGAppsHook3 +{ + lib, + python3, + fetchurl, + glib, + gobject-introspection, + gtk3, + wrapGAppsHook3, }: -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "tuna"; - version = "0.15"; + version = "0.19"; + pyproject = true; - src = fetchzip { + src = fetchurl { url = "https://git.kernel.org/pub/scm/utils/tuna/tuna.git/snapshot/tuna-v${version}.tar.gz"; - sha256 = "MwyLBwKz5ur1sBXHiCLq/Nq2u5aaiC+KzXqvGBmQii8="; + hash = "sha256-t10CxtwnTOg1uQgm6mTrNUIU8LkXJ3BkTycjWteQvuU="; }; 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"]},' + --replace-fail '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\" ]" + --replace-fail "self.binpath + 'pkexec'" "'/run/wrappers/bin/pkexec'" \ + --replace-fail 'tuna_glade_dirs = [".", "tuna", "/usr/share/tuna"]' "tuna_glade_dirs = [ \"$out/share/tuna\" ]" ''; + build-system = with python3.pkgs; [ setuptools ]; + nativeBuildInputs = [ glib.dev gobject-introspection @@ -38,7 +39,11 @@ buildPythonApplication rec { wrapGAppsHook3 ]; - propagatedBuildInputs = [ pygobject3 python-linux-procfs ethtool ]; + dependencies = with python3.pkgs; [ + pygobject3 + python-linux-procfs + ethtool + ]; postInstall = '' mkdir -p $out/share/tuna diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 24c05bba8f60..e7cc53465429 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34471,7 +34471,7 @@ with pkgs; tudu = callPackage ../applications/office/tudu { }; - tuna = python3Packages.callPackage ../os-specific/linux/tuna { }; + tuna = callPackage ../os-specific/linux/tuna { }; tunefish = callPackage ../applications/audio/tunefish { stdenv = clangStdenv; # https://github.com/jpcima/tunefish/issues/4