Skip to content

Commit

Permalink
glances: 4.2.1 -> 4.3.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
gador committed Dec 31, 2024
1 parent be53115 commit 2ee0aee
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions pkgs/applications/system/glances/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,40 @@
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,
}:

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";
rev = "refs/tags/v${version}";
hash = "sha256-8Jm6DE3B7OQkaNwX/KwXMNZHUyvPtln8mJYaD6yzJRM=";
hash = "sha256-r4wDuV7WS3BQ5hidp2x6JqvHQLf6FchoHisMMEye1PM=";
};

build-system = [ setuptools ];
Expand All @@ -50,31 +54,36 @@ 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
fastapi
uvicorn
requests
jinja2
which
prometheus-client
] ++ lib.optional stdenv.hostPlatform.isLinux hddtemp;

passthru.tests = {
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";
Expand Down

0 comments on commit 2ee0aee

Please sign in to comment.