biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / system / glances / default.nix
blobff8b4c3106629d1222995b04e839d19e3680c6c9
2   stdenv,
3   buildPythonApplication,
4   fetchFromGitHub,
5   isPyPy,
6   lib,
7   defusedxml,
8   future,
9   ujson,
10   packaging,
11   psutil,
12   setuptools,
13   pydantic,
14   # Optional dependencies:
15   fastapi,
16   jinja2,
17   orjson,
18   pysnmp,
19   hddtemp,
20   netifaces, # IP module
21   py-cpuinfo,
22   uvicorn,
23   requests,
24   prometheus-client,
27 buildPythonApplication rec {
28   pname = "glances";
29   version = "4.1.2.1";
30   disabled = isPyPy;
32   src = fetchFromGitHub {
33     owner = "nicolargo";
34     repo = "glances";
35     rev = "refs/tags/v${version}";
36     hash = "sha256-SlKt+wjzI9QRmMVvbIERuhQuCCaOh7L89WuNUXNhkuI=";
37   };
39   # On Darwin this package segfaults due to mismatch of pure and impure
40   # CoreFoundation. This issues was solved for binaries but for interpreted
41   # scripts a workaround below is still required.
42   # Relevant: https://github.com/NixOS/nixpkgs/issues/24693
43   makeWrapperArgs = lib.optionals stdenv.hostPlatform.isDarwin [
44     "--set"
45     "DYLD_FRAMEWORK_PATH"
46     "/System/Library/Frameworks"
47   ];
49   doCheck = true;
50   preCheck = lib.optionalString stdenv.hostPlatform.isDarwin ''
51     export DYLD_FRAMEWORK_PATH=/System/Library/Frameworks
52   '';
54   propagatedBuildInputs = [
55     defusedxml
56     future
57     ujson
58     netifaces
59     packaging
60     psutil
61     pysnmp
62     setuptools
63     py-cpuinfo
64     pydantic
65     fastapi
66     uvicorn
67     requests
68     jinja2
69     orjson
70     prometheus-client
71   ] ++ lib.optional stdenv.hostPlatform.isLinux hddtemp;
73   meta = {
74     homepage = "https://nicolargo.github.io/glances/";
75     description = "Cross-platform curses-based monitoring tool";
76     mainProgram = "glances";
77     changelog = "https://github.com/nicolargo/glances/blob/v${version}/NEWS.rst";
78     license = lib.licenses.lgpl3Only;
79     maintainers = with lib.maintainers; [
80       primeos
81       koral
82     ];
83   };