about summary refs log tree commit diff
path: root/pkgs/applications/system/glances/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/system/glances/default.nix')
-rw-r--r--pkgs/applications/system/glances/default.nix59
1 files changed, 44 insertions, 15 deletions
diff --git a/pkgs/applications/system/glances/default.nix b/pkgs/applications/system/glances/default.nix
index 1aaf202c9f14e..3e387f34a7341 100644
--- a/pkgs/applications/system/glances/default.nix
+++ b/pkgs/applications/system/glances/default.nix
@@ -1,22 +1,40 @@
-{ stdenv, buildPythonApplication, fetchFromGitHub, fetchpatch, isPyPy, lib
-, defusedxml, future, ujson, packaging, psutil, setuptools
-# Optional dependencies:
-, bottle, pysnmp
-, hddtemp
-, netifaces # IP module
-, py-cpuinfo
+{
+  stdenv,
+  buildPythonApplication,
+  fetchFromGitHub,
+  isPyPy,
+  lib,
+  defusedxml,
+  future,
+  ujson,
+  packaging,
+  psutil,
+  setuptools,
+  pydantic,
+  # Optional dependencies:
+  fastapi,
+  jinja2,
+  orjson,
+  pysnmp,
+  hddtemp,
+  netifaces, # IP module
+  py-cpuinfo,
+  uvicorn,
+  requests,
+  prometheus-client,
 }:
 
 buildPythonApplication rec {
   pname = "glances";
-  version = "3.4.0.5";
+  # use unstable to fix a build error for aarch64.
+  version = "4.0.8-unstable-2024-06-09";
   disabled = isPyPy;
 
   src = fetchFromGitHub {
     owner = "nicolargo";
     repo = "glances";
-    rev = "refs/tags/v${version}";
-    hash = "sha256-Ho4vcmTEVja7rkgLSfNkXvnpopYupRxPL1UVlnmdGCg=";
+    rev = "051006e12f7c90281dda4af60871b535b0dcdcb9";
+    hash = "sha256-iCK5soTACQwtCVMmMsFaqXvZtTKX9WbTul0mUeSWC2M=";
   };
 
   # On Darwin this package segfaults due to mismatch of pure and impure
@@ -24,7 +42,9 @@ buildPythonApplication rec {
   # scripts a workaround below is still required.
   # Relevant: https://github.com/NixOS/nixpkgs/issues/24693
   makeWrapperArgs = lib.optionals stdenv.isDarwin [
-    "--set" "DYLD_FRAMEWORK_PATH" "/System/Library/Frameworks"
+    "--set"
+    "DYLD_FRAMEWORK_PATH"
+    "/System/Library/Frameworks"
   ];
 
   doCheck = true;
@@ -33,7 +53,6 @@ buildPythonApplication rec {
   '';
 
   propagatedBuildInputs = [
-    bottle
     defusedxml
     future
     ujson
@@ -43,14 +62,24 @@ buildPythonApplication rec {
     pysnmp
     setuptools
     py-cpuinfo
+    pydantic
+    fastapi
+    uvicorn
+    requests
+    jinja2
+    orjson
+    prometheus-client
   ] ++ lib.optional stdenv.isLinux hddtemp;
 
-  meta = with lib; {
+  meta = {
     homepage = "https://nicolargo.github.io/glances/";
     description = "Cross-platform curses-based monitoring tool";
     mainProgram = "glances";
     changelog = "https://github.com/nicolargo/glances/blob/v${version}/NEWS.rst";
-    license = licenses.lgpl3Only;
-    maintainers = with maintainers; [ jonringer primeos koral ];
+    license = lib.licenses.lgpl3Only;
+    maintainers = with lib.maintainers; [
+      primeos
+      koral
+    ];
   };
 }