nixpkgs/pkgs/applications/system/glances/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

90 lines
1.8 KiB
Nix
Raw Normal View History

{
stdenv,
buildPythonApplication,
fetchFromGitHub,
isPyPy,
lib,
defusedxml,
packaging,
psutil,
setuptools,
2024-04-01 20:44:08 +00:00
pydantic,
nixosTests,
# Optional dependencies:
fastapi,
jinja2,
pysnmp,
hddtemp,
netifaces, # IP module
uvicorn,
requests,
prometheus-client,
2018-09-29 09:36:59 +00:00
}:
buildPythonApplication rec {
pname = "glances";
2024-10-25 21:09:43 +00:00
version = "4.2.0";
2024-11-01 13:54:45 +00:00
pyproject = true;
2018-09-29 09:36:59 +00:00
disabled = isPyPy;
src = fetchFromGitHub {
owner = "nicolargo";
repo = "glances";
rev = "refs/tags/v${version}";
2024-10-25 21:09:43 +00:00
hash = "sha256-liyrMaqBgK7UZjWIKIgIFbskTGaWfyrK8L74DKmaDmY=";
2018-09-29 09:36:59 +00:00
};
2024-11-01 13:54:45 +00:00
build-system = [ setuptools ];
# On Darwin this package segfaults due to mismatch of pure and impure
# CoreFoundation. This issues was solved for binaries but for interpreted
# scripts a workaround below is still required.
# Relevant: https://github.com/NixOS/nixpkgs/issues/24693
makeWrapperArgs = lib.optionals stdenv.hostPlatform.isDarwin [
"--set"
"DYLD_FRAMEWORK_PATH"
"/System/Library/Frameworks"
];
2024-11-01 14:04:11 +00:00
# some tests fail in darwin sandbox
doCheck = !stdenv.hostPlatform.isDarwin;
checkPhase = ''
runHook preCheck
python unittest-core.py
runHook postCheck
'';
2018-09-29 09:36:59 +00:00
2024-11-01 13:54:45 +00:00
dependencies = [
2021-07-10 09:42:39 +00:00
defusedxml
netifaces
2021-11-22 19:43:15 +00:00
packaging
psutil
pysnmp
fastapi
uvicorn
requests
jinja2
prometheus-client
] ++ lib.optional stdenv.hostPlatform.isLinux hddtemp;
2018-09-29 09:36:59 +00:00
2024-04-01 20:44:08 +00:00
passthru.tests = {
service = nixosTests.glances;
};
meta = {
homepage = "https://nicolargo.github.io/glances/";
2018-09-29 09:36:59 +00:00
description = "Cross-platform curses-based monitoring tool";
mainProgram = "glances";
2021-07-03 09:40:51 +00:00
changelog = "https://github.com/nicolargo/glances/blob/v${version}/NEWS.rst";
license = lib.licenses.lgpl3Only;
maintainers = with lib.maintainers; [
primeos
koral
];
2018-09-29 09:36:59 +00:00
};
}