From 30201167de4c6b75fb3eef89e1b73682a766d7be Mon Sep 17 00:00:00 2001 From: misuzu Date: Thu, 6 Feb 2025 10:11:55 +0200 Subject: [PATCH] glances: 4.3.0.6 -> 4.2.1 Updated version fails to build on x86_64-linux due to an update of selenium, see issue https://github.com/SeleniumHQ/selenium/pull/14823. --- pkgs/applications/system/glances/default.nix | 37 ++++++++------------ 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/pkgs/applications/system/glances/default.nix b/pkgs/applications/system/glances/default.nix index 6e5696ea4dc0e..3085d9920bf9a 100644 --- a/pkgs/applications/system/glances/default.nix +++ b/pkgs/applications/system/glances/default.nix @@ -3,23 +3,19 @@ buildPythonApplication, fetchFromGitHub, isPyPy, - pythonOlder, lib, defusedxml, packaging, psutil, setuptools, + pydantic, nixosTests, - pytestCheckHook, - which, - podman, - selenium, # Optional dependencies: fastapi, jinja2, pysnmp, hddtemp, - netifaces2, # IP module + netifaces, # IP module uvicorn, requests, prometheus-client, @@ -27,16 +23,16 @@ buildPythonApplication rec { pname = "glances"; - version = "4.3.0.6"; + version = "4.2.1"; pyproject = true; - disabled = isPyPy || pythonOlder "3.9"; + disabled = isPyPy; src = fetchFromGitHub { owner = "nicolargo"; repo = "glances"; tag = "v${version}"; - hash = "sha256-r4wDuV7WS3BQ5hidp2x6JqvHQLf6FchoHisMMEye1PM="; + hash = "sha256-8Jm6DE3B7OQkaNwX/KwXMNZHUyvPtln8mJYaD6yzJRM="; }; build-system = [ setuptools ]; @@ -54,9 +50,17 @@ buildPythonApplication rec { # some tests fail in darwin sandbox doCheck = !stdenv.hostPlatform.isDarwin; + checkPhase = '' + runHook preCheck + + python unittest-core.py + + runHook postCheck + ''; + dependencies = [ defusedxml - netifaces2 + netifaces packaging psutil pysnmp @@ -64,7 +68,6 @@ buildPythonApplication rec { uvicorn requests jinja2 - which prometheus-client ] ++ lib.optional stdenv.hostPlatform.isLinux hddtemp; @@ -72,18 +75,6 @@ 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";