From 303b44debd116cd91aebd4c03cd560d518c56872 Mon Sep 17 00:00:00 2001 From: Florian Brandes Date: Tue, 31 Dec 2024 16:03:44 +0100 Subject: [PATCH] glances: 4.2.1 -> 4.3.0.6 fixes #361545 closes #368794 Changelog: https://github.com/nicolargo/glances/blob/v4.3.0.6/NEWS.rst Signed-off-by: Florian Brandes --- pkgs/applications/system/glances/default.nix | 37 ++++++++++++-------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/pkgs/applications/system/glances/default.nix b/pkgs/applications/system/glances/default.nix index 3085d9920bf9a..6e5696ea4dc0e 100644 --- a/pkgs/applications/system/glances/default.nix +++ b/pkgs/applications/system/glances/default.nix @@ -3,19 +3,23 @@ buildPythonApplication, fetchFromGitHub, isPyPy, + pythonOlder, lib, defusedxml, packaging, psutil, setuptools, - pydantic, nixosTests, + pytestCheckHook, + which, + podman, + selenium, # Optional dependencies: fastapi, jinja2, pysnmp, hddtemp, - netifaces, # IP module + netifaces2, # IP module uvicorn, requests, prometheus-client, @@ -23,16 +27,16 @@ buildPythonApplication rec { pname = "glances"; - version = "4.2.1"; + version = "4.3.0.6"; pyproject = true; - disabled = isPyPy; + disabled = isPyPy || pythonOlder "3.9"; src = fetchFromGitHub { owner = "nicolargo"; repo = "glances"; tag = "v${version}"; - hash = "sha256-8Jm6DE3B7OQkaNwX/KwXMNZHUyvPtln8mJYaD6yzJRM="; + hash = "sha256-r4wDuV7WS3BQ5hidp2x6JqvHQLf6FchoHisMMEye1PM="; }; build-system = [ setuptools ]; @@ -50,17 +54,9 @@ buildPythonApplication rec { # some tests fail in darwin sandbox doCheck = !stdenv.hostPlatform.isDarwin; - checkPhase = '' - runHook preCheck - - python unittest-core.py - - runHook postCheck - ''; - dependencies = [ defusedxml - netifaces + netifaces2 packaging psutil pysnmp @@ -68,6 +64,7 @@ buildPythonApplication rec { uvicorn requests jinja2 + which prometheus-client ] ++ lib.optional stdenv.hostPlatform.isLinux hddtemp; @@ -75,6 +72,18 @@ buildPythonApplication rec { service = nixosTests.glances; }; + nativeCheckInputs = [ + which + pytestCheckHook + selenium + podman + ]; + + disabledTestPaths = [ + # Message: Unable to obtain driver for chrome + "tests/test_webui.py" + ]; + meta = { homepage = "https://nicolargo.github.io/glances/"; description = "Cross-platform curses-based monitoring tool";